diff --git a/include/z64actor.h b/include/z64actor.h index 6facb1a367..3bb6872c39 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -432,7 +432,7 @@ typedef struct ActorContext { /* 0x0A0 */ Actor* lensActors[LENS_ACTOR_MAX]; // Draws up to LENS_ACTOR_MAX number of invisible actors /* 0x120 */ Attention attention; /* 0x1B8 */ ActorContextSceneFlags sceneFlags; - /* 0x1E4 */ TitleCardContext titleCtxt; + /* 0x1E4 */ TitleCardContext titleCtx; /* 0x1F4 */ PlayerImpact playerImpact; /* 0x208 */ UNK_TYPE1 unk_208[0x4]; /* 0x20C */ ActorSharedMemoryEntry actorSharedMemory[8]; diff --git a/include/z64item.h b/include/z64item.h index 1a43b00af3..69eca8c1b8 100644 --- a/include/z64item.h +++ b/include/z64item.h @@ -322,7 +322,7 @@ typedef enum ItemId { /* 0xAE */ ITEM_MAP_POINT_STONE_TOWER, // Remaining map points are unique to owl warps /* 0xAF */ ITEM_MAP_POINT_GREAT_BAY_COAST, - /* 0xBO */ ITEM_MAP_POINT_SOUTHERN_SWAMP, + /* 0xB0 */ ITEM_MAP_POINT_SOUTHERN_SWAMP, /* 0xB1 */ ITEM_MAP_POINT_MOUNTAIN_VILLAGE, /* 0xB2 */ ITEM_MAP_POINT_MILK_ROAD, /* 0xB3 */ ITEM_MAP_POINT_ZORA_CAPE, diff --git a/spec b/spec index 398deba8ba..4e609fb379 100644 --- a/spec +++ b/spec @@ -790,9 +790,7 @@ endseg beginseg name "buffers" flags NOLOAD - include "$(BUILD_DIR)/src/buffers/gfxyield.o" - include "$(BUILD_DIR)/src/buffers/gfxstack.o" - include "$(BUILD_DIR)/src/buffers/gfxpools.o" + include "$(BUILD_DIR)/src/buffers/gfxbuffers.o" include "$(BUILD_DIR)/src/buffers/audio_heap.o" endseg diff --git a/src/buffers/gfxbuffers.c b/src/buffers/gfxbuffers.c new file mode 100644 index 0000000000..4a20afcbe5 --- /dev/null +++ b/src/buffers/gfxbuffers.c @@ -0,0 +1,8 @@ +#include "prevent_bss_reordering.h" +#include "buffers.h" + +u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE] ALIGNED(16); + +STACK(gGfxSPTaskStack, 0x400) ALIGNED(16); + +GfxPool gGfxPools[2] ALIGNED(16); diff --git a/src/buffers/gfxpools.c b/src/buffers/gfxpools.c deleted file mode 100644 index f7b4ab5b7b..0000000000 --- a/src/buffers/gfxpools.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "buffers.h" - -GfxPool gGfxPools[2] ALIGNED(16); diff --git a/src/buffers/gfxstack.c b/src/buffers/gfxstack.c deleted file mode 100644 index b88e27eaa2..0000000000 --- a/src/buffers/gfxstack.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "buffers.h" - -STACK(gGfxSPTaskStack, 0x400) ALIGNED(16); diff --git a/src/buffers/gfxyield.c b/src/buffers/gfxyield.c deleted file mode 100644 index 866257eac3..0000000000 --- a/src/buffers/gfxyield.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "buffers.h" - -u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE] ALIGNED(16); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 142bae3121..4ed9ead9bd 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -978,7 +978,7 @@ void TitleCard_Draw(GameState* gameState, TitleCardContext* titleCtx) { // unused s32 func_800B6434(PlayState* play, TitleCardContext* titleCtx) { - if ((play->actorCtx.titleCtxt.delayTimer != 0) || (play->actorCtx.titleCtxt.alpha != 0)) { + if ((play->actorCtx.titleCtx.delayTimer != 0) || (play->actorCtx.titleCtx.alpha != 0)) { titleCtx->durationTimer = 0; titleCtx->delayTimer = 0; return false; @@ -2499,7 +2499,7 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* acto actorCtx->sceneFlags.collectible[0] = cycleFlags->collectible; actorCtx->sceneFlags.clearedRoom = cycleFlags->clearedRoom; - TitleCard_ContextInit(&play->state, &actorCtx->titleCtxt); + TitleCard_ContextInit(&play->state, &actorCtx->titleCtx); Actor_InitPlayerImpact(play); actorCtx->absoluteSpace = NULL; @@ -2759,7 +2759,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { Attention_Update(&actorCtx->attention, player, actor, play); } - TitleCard_Update(&play->state, &actorCtx->titleCtxt); + TitleCard_Update(&play->state, &actorCtx->titleCtx); Actor_UpdatePlayerImpact(play); DynaPoly_UpdateBgActorTransforms(play, &play->colCtx.dyna); } @@ -3130,7 +3130,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) { Lights_DrawGlow(play); } - TitleCard_Draw(&play->state, &actorCtx->titleCtxt); + TitleCard_Draw(&play->state, &actorCtx->titleCtx); CLOSE_DISPS(play->state.gfxCtx); } diff --git a/src/overlays/actors/ovl_Boss_01/z_boss_01.c b/src/overlays/actors/ovl_Boss_01/z_boss_01.c index de962b7411..8c69764f4c 100644 --- a/src/overlays/actors/ovl_Boss_01/z_boss_01.c +++ b/src/overlays/actors/ovl_Boss_01/z_boss_01.c @@ -1121,7 +1121,7 @@ void Boss01_IntroCutscene(Boss01* this, PlayState* play) { } if (this->cutsceneTimer == 50) { - TitleCard_InitBossName(&play->state, &play->actorCtx.titleCtxt, + TitleCard_InitBossName(&play->state, &play->actorCtx.titleCtx, Lib_SegmentedToVirtual(&gOdolwaTitleCardTex), 160, 180, 128, 40); } diff --git a/src/overlays/actors/ovl_Boss_02/z_boss_02.c b/src/overlays/actors/ovl_Boss_02/z_boss_02.c index 057a364a76..0e6c7dac5b 100644 --- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c +++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c @@ -2215,7 +2215,7 @@ void func_809DEAC4(Boss02* this, PlayState* play) { } if (this->unk_1D1C == (u32)(KREG(92) + 125)) { - TitleCard_InitBossName(&play->state, &play->actorCtx.titleCtxt, + TitleCard_InitBossName(&play->state, &play->actorCtx.titleCtx, Lib_SegmentedToVirtual(gTwinmoldTitleCardTex), 160, 180, 128, 40); } diff --git a/src/overlays/actors/ovl_Boss_03/z_boss_03.c b/src/overlays/actors/ovl_Boss_03/z_boss_03.c index f7edb25659..70cec6439b 100644 --- a/src/overlays/actors/ovl_Boss_03/z_boss_03.c +++ b/src/overlays/actors/ovl_Boss_03/z_boss_03.c @@ -1319,7 +1319,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_KONB_JUMP_LEV_OLD - SFX_FLAG); if (this->csTimer == 30) { - TitleCard_InitBossName(&play->state, &play->actorCtx.titleCtxt, + TitleCard_InitBossName(&play->state, &play->actorCtx.titleCtx, Lib_SegmentedToVirtual(gGyorgTitleCardTex), 160, 180, 128, 40); } diff --git a/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c b/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c index 2e1a3c9c9b..75d4d14f6f 100644 --- a/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c +++ b/src/overlays/actors/ovl_Boss_Hakugin/z_boss_hakugin.c @@ -1763,7 +1763,7 @@ void BossHakugin_IntroCutsceneWakeUp(BossHakugin* this, PlayState* play) { } if (Animation_OnFrame(&this->skelAnime, 65.0f)) { - TitleCard_InitBossName(&play->state, &play->actorCtx.titleCtxt, Lib_SegmentedToVirtual(&gGohtTitleCardTex), + TitleCard_InitBossName(&play->state, &play->actorCtx.titleCtx, Lib_SegmentedToVirtual(&gGohtTitleCardTex), 160, 180, 128, 40); } diff --git a/tools/disasm/disasm.py b/tools/disasm/disasm.py index 78637296cd..f4b5c3e180 100755 --- a/tools/disasm/disasm.py +++ b/tools/disasm/disasm.py @@ -94,9 +94,6 @@ def discard_decomped_files(files_spec, include_files): if file == "": file = f"{type}_{offset:08X}" include = True - # flg_set_table is not in the spec, and buffers has its own section, just add them - elif file == "flg_set_table" or "buffers" in file: - include = True else: include = False i = seg_start diff --git a/tools/disasm/files.txt b/tools/disasm/files.txt index 2838d687c6..185e12c110 100644 --- a/tools/disasm/files.txt +++ b/tools/disasm/files.txt @@ -519,8 +519,7 @@ 0x801AE3A0 : "z_effect_soft_sprite", 0x801AE3B0 : "z_effect_soft_sprite_old_init", 0x801AE4A0 : "z_effect_soft_sprite_dlftbls", - 0x801AE8F0 : "flg_set_table", - 0x801AEC70 : "flg_set", + 0x801AE8F0 : "flg_set", 0x801AEC80 : "z_actor", 0x801AEFD0 : "z_actor_dlftbls", 0x801B4620 : "z_bgcheck", @@ -754,8 +753,8 @@ 0x80200BE0 : "session_config", 0x80208E90 : "jpegdecoder", 0x80208EA0 : "gfxbuffers", - 0x8024A4C0 : "buffer_audio_heap", - 0x803824C0 : "buffer_system_heap", + 0x8024A4C0 : "audio_heap", + 0x803824C0 : "system_heap", 0x80780000 : "framebuffer_hi", }, ], diff --git a/tools/namefixer.py b/tools/namefixer.py index 71e1b724ca..cbe7af464d 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -1306,6 +1306,7 @@ wordReplace = { "play->actorCtx.attention.unk4C": "play->actorCtx.attention.lockOnIndex", "play->actorCtx.attention.unk50": "play->actorCtx.attention.lockOnTriangleSets", "play->actorCtx.attention.unk8C": "play->actorCtx.attention.nextTarget", + "play->actorCtx.titleCtxt": "play->actorCtx.titleCtx", "play->doorCtx.transitionActorList": "play->transitionActors.list", "play->nextEntranceIndex": "play->nextEntrance", "play->sceneNum": "play->sceneId", @@ -1338,6 +1339,7 @@ wordReplace = { "actorCtx.unk_1F4.timer": "actorCtx.playerImpact.timer", "actorCtx.unk_1F4.unk_04": "actorCtx.playerImpact.dist", "actorCtx.unk_1F4.unk_08": "actorCtx.playerImpact.pos", + "actorCtx->titleCtxt": "actorCtx->titleCtx", "gSaveContext.unk_3DC8": "gSaveContext.timerOsTime", "gSaveContext.unk_3DD0": "gSaveContext.timerStates",