diff options
| author | fig02 <fig02srl@gmail.com> | 2025-04-16 08:22:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-16 08:22:42 -0400 |
| commit | 655ec771387927eda89d89b5bc2751192b075909 (patch) | |
| tree | 54a448444c162850017777c43509d05c2f8c4adf /src/code | |
| parent | 0c5282ba66bec5eba8f11fa5922b893b1deed7e7 (diff) | |
variables.h: migrate all remaining varaibles, remove other dependencies except z64.h (#2505)
* move remaining variables from variables.h
* fix other dependencies
* extra newline
* fix and adjust comment
* is this the problem
* fix bss
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/fault_gc.c | 4 | ||||
| -rw-r--r-- | src/code/fault_n64.c | 2 | ||||
| -rw-r--r-- | src/code/game.c | 3 | ||||
| -rw-r--r-- | src/code/main.c | 4 | ||||
| -rw-r--r-- | src/code/object_table.c | 7 | ||||
| -rw-r--r-- | src/code/z_bgcheck.c | 2 | ||||
| -rw-r--r-- | src/code/z_camera.c | 4 | ||||
| -rw-r--r-- | src/code/z_collision_check.c | 2 | ||||
| -rw-r--r-- | src/code/z_effect_soft_sprite_dlftbls.c | 3 | ||||
| -rw-r--r-- | src/code/z_kaleido_scope_call.c | 4 | ||||
| -rw-r--r-- | src/code/z_kankyo.c | 2 | ||||
| -rw-r--r-- | src/code/z_map_exp.c | 1 | ||||
| -rw-r--r-- | src/code/z_message.c | 2 | ||||
| -rw-r--r-- | src/code/z_play.c | 4 | ||||
| -rw-r--r-- | src/code/z_vr_box.c | 4 |
15 files changed, 30 insertions, 18 deletions
diff --git a/src/code/fault_gc.c b/src/code/fault_gc.c index b70bcf80b..c8088f23f 100644 --- a/src/code/fault_gc.c +++ b/src/code/fault_gc.c @@ -41,8 +41,8 @@ * DPad-Down disables sending fault pages over osSyncPrintf. */ -#pragma increment_block_number "gc-eu:96 gc-eu-mq:96 gc-eu-mq-dbg:96 gc-jp:96 gc-jp-ce:96 gc-jp-mq:96 gc-us:96" \ - "gc-us-mq:96 ique-cn:96" +#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-eu-mq-dbg:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128" \ + "gc-us-mq:128 ique-cn:128" #include "libc64/sleep.h" #include "libc64/sprintf.h" diff --git a/src/code/fault_n64.c b/src/code/fault_n64.c index 70549cf8b..ae9d2ba4a 100644 --- a/src/code/fault_n64.c +++ b/src/code/fault_n64.c @@ -12,7 +12,7 @@ #include "global.h" -#pragma increment_block_number "ntsc-1.0:88 ntsc-1.1:88 ntsc-1.2:88 pal-1.0:86 pal-1.1:86" +#pragma increment_block_number "ntsc-1.0:108 ntsc-1.1:108 ntsc-1.2:108 pal-1.0:108 pal-1.1:108" typedef struct FaultMgr { OSThread thread; diff --git a/src/code/game.c b/src/code/game.c index 6db35e563..f08133fc9 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -1,4 +1,5 @@ #include "libc64/malloc.h" +#include "libc64/os_malloc.h" #include "libu64/debug.h" #include "libu64/gfxprint.h" #include "audiomgr.h" @@ -8,7 +9,7 @@ #include "gfx.h" #include "gfxalloc.h" #include "fault.h" -#include "libc64/os_malloc.h" +#include "idle.h" #include "line_numbers.h" #if PLATFORM_N64 #include "n64dd.h" diff --git a/src/code/main.c b/src/code/main.c index 434f999f5..8a7c12a9e 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -23,9 +23,11 @@ extern struct IrqMgr gIrqMgr; #include "debug_arena.h" #include "fault.h" #include "gfx.h" +#include "idle.h" #include "padmgr.h" #include "prenmi_buff.h" #include "regs.h" +#include "segment_symbols.h" #include "segmented_address.h" #include "stack.h" #include "stackcheck.h" @@ -41,7 +43,7 @@ extern struct IrqMgr gIrqMgr; #include "global.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ique-cn:0 ntsc-1.0:51 ntsc-1.1:51 ntsc-1.2:51 pal-1.0:49 pal-1.1:49" + "ique-cn:0 ntsc-1.0:56 ntsc-1.1:56 ntsc-1.2:56 pal-1.0:54 pal-1.1:54" extern u8 _buffersSegmentEnd[]; diff --git a/src/code/object_table.c b/src/code/object_table.c index d0f9e936d..904683596 100644 --- a/src/code/object_table.c +++ b/src/code/object_table.c @@ -1,4 +1,9 @@ -#include "global.h" +#include "segment_symbols.h" +#include "romfile.h" +#include "ultra64.h" +#include "z64object.h" + +#include "macros.h" s16 gLinkObjectIds[] = { OBJECT_LINK_BOY, OBJECT_LINK_CHILD }; diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index 24230152f..469840de9 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -11,7 +11,7 @@ #include "z64player.h" #include "z64skin_matrix.h" -#pragma increment_block_number "ntsc-1.0:160 ntsc-1.1:160 ntsc-1.2:160" +#pragma increment_block_number "ntsc-1.0:152 ntsc-1.1:152 ntsc-1.2:152" u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList); void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector); diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 9f297f795..b7a7d2fad 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -24,7 +24,7 @@ #include "overlays/actors/ovl_En_Horse/z_en_horse.h" #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \ - "ique-cn:192 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192" + "ique-cn:192 ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0" s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags); s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange); @@ -3658,7 +3658,7 @@ s32 Camera_KeepOn3(Camera* camera) { } #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ique-cn:128 ntsc-1.0:106 ntsc-1.1:106 ntsc-1.2:106 pal-1.0:104 pal-1.1:104" + "ique-cn:128 ntsc-1.0:70 ntsc-1.1:70 ntsc-1.2:70 pal-1.0:70 pal-1.1:70" s32 Camera_KeepOn4(Camera* camera) { static Vec3f D_8015BD50; diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index e0ab3b031..15eec283a 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -16,7 +16,7 @@ #include "z_lib.h" #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \ - "ique-cn:192 ntsc-1.0:176 ntsc-1.1:176 ntsc-1.2:176 pal-1.0:176 pal-1.1:176" + "ique-cn:192 ntsc-1.0:168 ntsc-1.1:168 ntsc-1.2:168 pal-1.0:168 pal-1.1:168" typedef s32 (*ColChkResetFunc)(PlayState*, Collider*); typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*); diff --git a/src/code/z_effect_soft_sprite_dlftbls.c b/src/code/z_effect_soft_sprite_dlftbls.c index cb24257c8..7c9e228f6 100644 --- a/src/code/z_effect_soft_sprite_dlftbls.c +++ b/src/code/z_effect_soft_sprite_dlftbls.c @@ -1,4 +1,5 @@ -#include "global.h" +#include "segment_symbols.h" +#include "z64effect.h" // Linker symbol declarations (used in the table below) #define DEFINE_EFFECT_SS(name, _1) DECLARE_OVERLAY_SEGMENT(name) diff --git a/src/code/z_kaleido_scope_call.c b/src/code/z_kaleido_scope_call.c index 0e89a854a..39101b373 100644 --- a/src/code/z_kaleido_scope_call.c +++ b/src/code/z_kaleido_scope_call.c @@ -1,5 +1,5 @@ -#pragma increment_block_number "gc-eu:133 gc-eu-mq:133 gc-jp:135 gc-jp-ce:135 gc-jp-mq:135 gc-us:135 gc-us-mq:135" \ - "ique-cn:125 ntsc-1.0:144 ntsc-1.1:144 ntsc-1.2:144 pal-1.0:142 pal-1.1:142" +#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:0" \ + "ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0" #include "libu64/debug.h" #include "kaleido_manager.h" diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index 081d7abc2..a4bb1295b 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -236,7 +236,7 @@ s16 sSunDepthTestX; s16 sSunDepthTestY; #pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \ - "ique-cn:192 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192" + "ique-cn:160 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192" LightNode* sNGameOverLightNode; LightInfo sNGameOverLightInfo; diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index 3283cd62f..bac9ed222 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -6,6 +6,7 @@ #include "n64dd.h" #endif #include "regs.h" +#include "segment_symbols.h" #include "sfx.h" #include "sys_matrix.h" #include "terminal.h" diff --git a/src/code/z_message.c b/src/code/z_message.c index bfba7cdf4..c13f5c462 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -25,7 +25,7 @@ #include "assets/textures/parameter_static/parameter_static.h" #pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.0:96 ntsc-1.1:96 ntsc-1.2:96 pal-1.0:128 pal-1.1:128" + "ntsc-1.0:112 ntsc-1.1:112 ntsc-1.2:112 pal-1.0:128 pal-1.1:128" #if !PLATFORM_IQUE #define MSG_BUF_DECODED (msgCtx->msgBufDecoded) diff --git a/src/code/z_play.c b/src/code/z_play.c index f37f80c67..36928c9cb 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -44,8 +44,8 @@ #include "global.h" -#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64 ique-cn:64" \ - "ntsc-1.0:240 ntsc-1.1:240 ntsc-1.2:240 pal-1.0:240 pal-1.1:240" +#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ + "ique-cn:96 ntsc-1.0:240 ntsc-1.1:240 ntsc-1.2:240 pal-1.0:240 pal-1.1:240" TransitionTile gTransitionTile; s32 gTransitionTileState; diff --git a/src/code/z_vr_box.c b/src/code/z_vr_box.c index cd8c1b2b8..f53da0df4 100644 --- a/src/code/z_vr_box.c +++ b/src/code/z_vr_box.c @@ -1,8 +1,10 @@ -#include "global.h" +#include "segment_symbols.h" #include "terminal.h" #include "z64environment.h" #include "z64save.h" +#include "global.h" + typedef struct SkyboxFaceParams { /* 0x000 */ s32 xStart; /* 0x004 */ s32 yStart; |
