diff options
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/flg_set.c | 12 | ||||
| -rw-r--r-- | src/code/pad_801DC9C0.c | 1 | ||||
| -rw-r--r-- | src/code/z_en_item00.c | 74 | ||||
| -rw-r--r-- | src/code/z_eventmgr.c | 7 |
4 files changed, 52 insertions, 42 deletions
diff --git a/src/code/flg_set.c b/src/code/flg_set.c index f7c8c261e..d437fd8b6 100644 --- a/src/code/flg_set.c +++ b/src/code/flg_set.c @@ -265,7 +265,7 @@ void FlagSet_Update(GameState* gameState) { } } -extern s32 D_801ED890; +s32 sFlagBitIndex; void FlagSet_Draw(GameState* gameState) { GraphicsContext* gfxCtx = gameState->gfxCtx; @@ -288,23 +288,23 @@ void FlagSet_Draw(GameState* gameState) { GfxPrint_SetPos(&printer, 12, 15); // Print the flag bits in the current byte, largest to smallest - for (D_801ED890 = 7; D_801ED890 >= 0; D_801ED890--) { + for (sFlagBitIndex = 7; sFlagBitIndex >= 0; sFlagBitIndex--) { // Highlight current flag bit in white, rest in grey - if ((u32)D_801ED890 == sCurrentBit) { + if (sFlagBitIndex == sCurrentBit) { GfxPrint_SetColor(&printer, 200, 200, 200, 255); } else { GfxPrint_SetColor(&printer, 100, 100, 100, 255); } // Display 1 if flag set and 0 if not - if (*sFlagEntries[sEntryIndex].value & (1 << D_801ED890)) { + if (*sFlagEntries[sEntryIndex].value & (1 << sFlagBitIndex)) { GfxPrint_Printf(&printer, "1"); } else { GfxPrint_Printf(&printer, "0"); } // Add a space after each group of 4 - if ((D_801ED890 % 4) == 0) { + if ((sFlagBitIndex % 4) == 0) { GfxPrint_Printf(&printer, " "); } } @@ -318,3 +318,5 @@ void FlagSet_Draw(GameState* gameState) { CLOSE_DISPS(gfxCtx); } + +static const s32 sPad[5] = { 0 }; diff --git a/src/code/pad_801DC9C0.c b/src/code/pad_801DC9C0.c deleted file mode 100644 index f386919de..000000000 --- a/src/code/pad_801DC9C0.c +++ /dev/null @@ -1 +0,0 @@ -static const char pad_801DC9C0[] = { 0 }; diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index 69fe16fdc..6d26060d7 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -59,6 +59,8 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(targetArrowOffset, 2000, ICHAIN_STOP), }; +static s32 sBssPad; + void EnItem00_SetObject(EnItem00* this, PlayState* play, f32* shadowOffset, f32* shadowScale) { Actor_SetObjectDependency(play, &this->actor); Actor_SetScale(&this->actor, 0.5f); @@ -74,43 +76,43 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { f32 shadowOffset = 980.0f; f32 shadowScale = 6.0f; s32 getItemId = GI_NONE; - s32 sp30 = ENITEM00_GET_8000(&this->actor) ? 1 : 0; + s32 sp30 = ENITEM00_GET_8000(thisx) ? 1 : 0; - this->collectibleFlag = ENITEM00_GET_7F00(&this->actor); + this->collectibleFlag = ENITEM00_GET_7F00(thisx); - thisx->params &= 0xFF; // Has to be thisx to match + thisx->params &= 0xFF; if (Flags_GetCollectible(play, this->collectibleFlag)) { - if (this->actor.params == ITEM00_HEART_PIECE) { + if (thisx->params == ITEM00_HEART_PIECE) { sp30 = 0; this->collectibleFlag = 0; - this->actor.params = ITEM00_RECOVERY_HEART; + thisx->params = ITEM00_RECOVERY_HEART; } else { - Actor_Kill(&this->actor); + Actor_Kill(thisx); return; } } - if (this->actor.params == ITEM00_3_HEARTS) { - this->actor.params = ITEM00_RECOVERY_HEART; + if (thisx->params == ITEM00_3_HEARTS) { + thisx->params = ITEM00_RECOVERY_HEART; } - Actor_ProcessInitChain(&this->actor, sInitChain); - Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); + Actor_ProcessInitChain(thisx, sInitChain); + Collider_InitAndSetCylinder(play, &this->collider, thisx, &sCylinderInit); this->unk150 = 1; - switch (this->actor.params) { + switch (thisx->params) { case ITEM00_RUPEE_GREEN: case ITEM00_RUPEE_BLUE: case ITEM00_RUPEE_RED: - Actor_SetScale(&this->actor, 0.015f); + Actor_SetScale(thisx, 0.015f); this->unk154 = 0.015f; shadowOffset = 750.0f; break; case ITEM00_SMALL_KEY: this->unk150 = 0; - Actor_SetScale(&this->actor, 0.03f); + Actor_SetScale(thisx, 0.03f); this->unk154 = 0.03f; shadowOffset = 350.0f; break; @@ -118,18 +120,18 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { case ITEM00_HEART_PIECE: case ITEM00_HEART_CONTAINER: this->unk150 = 0; - Actor_SetScale(&this->actor, 0.02f); + Actor_SetScale(thisx, 0.02f); this->unk154 = 0.02f; shadowOffset = 650.0f; - if (this->actor.params == ITEM00_HEART_CONTAINER) { + if (thisx->params == ITEM00_HEART_CONTAINER) { sp30 = -1; } break; case ITEM00_RECOVERY_HEART: - this->actor.home.rot.z = Rand_CenteredFloat(0xFFFF); + thisx->home.rot.z = Rand_CenteredFloat(0xFFFF); shadowOffset = 430.0f; - Actor_SetScale(&this->actor, 0.02f); + Actor_SetScale(thisx, 0.02f); this->unk154 = 0.02f; break; @@ -137,7 +139,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { case ITEM00_ARROWS_30: case ITEM00_ARROWS_40: case ITEM00_ARROWS_50: - Actor_SetScale(&this->actor, 0.035f); + Actor_SetScale(thisx, 0.035f); this->unk154 = 0.035f; shadowOffset = 250.0f; break; @@ -149,25 +151,25 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { case ITEM00_MAGIC_SMALL: case ITEM00_NUTS_10: case ITEM00_BOMBS_0: - Actor_SetScale(&this->actor, 0.03f); + Actor_SetScale(thisx, 0.03f); this->unk154 = 0.03f; shadowOffset = 320.0f; break; case ITEM00_MAGIC_LARGE: - Actor_SetScale(&this->actor, 4.5f * 0.01f); + Actor_SetScale(thisx, 4.5f * 0.01f); this->unk154 = 4.5f * 0.01f; shadowOffset = 320.0f; break; case ITEM00_RUPEE_HUGE: - Actor_SetScale(&this->actor, 4.5f * 0.01f); + Actor_SetScale(thisx, 4.5f * 0.01f); this->unk154 = 4.5f * 0.01f; shadowOffset = 750.0f; break; case ITEM00_RUPEE_PURPLE: - Actor_SetScale(&this->actor, 0.03f); + Actor_SetScale(thisx, 0.03f); this->unk154 = 0.03f; shadowOffset = 750.0f; break; @@ -175,22 +177,22 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { case ITEM00_FLEXIBLE: case ITEM00_BIG_FAIRY: shadowOffset = 500.0f; - Actor_SetScale(&this->actor, 0.01f); + Actor_SetScale(thisx, 0.01f); this->unk154 = 0.01f; break; case ITEM00_SHIELD_HERO: - this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_SHIELD_2); + thisx->objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_SHIELD_2); EnItem00_SetObject(this, play, &shadowOffset, &shadowScale); break; case ITEM00_MAP: - this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_MAP); + thisx->objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_MAP); EnItem00_SetObject(this, play, &shadowOffset, &shadowScale); break; case ITEM00_COMPASS: - this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_COMPASS); + thisx->objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_COMPASS); EnItem00_SetObject(this, play, &shadowOffset, &shadowScale); break; @@ -199,9 +201,9 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { } this->unk14E = 0; - ActorShape_Init(&this->actor.shape, shadowOffset, ActorShadow_DrawCircle, shadowScale); - this->actor.shape.shadowAlpha = 180; - this->actor.focus.pos = this->actor.world.pos; + ActorShape_Init(&thisx->shape, shadowOffset, ActorShadow_DrawCircle, shadowScale); + thisx->shape.shadowAlpha = 180; + thisx->focus.pos = thisx->world.pos; this->getItemId = GI_NONE; if (sp30 < 0) { @@ -219,11 +221,11 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { this->unk152 = 15; this->unk14C = 35; - this->actor.speed = 0.0f; - this->actor.velocity.y = 0.0f; - this->actor.gravity = 0.0f; + thisx->speed = 0.0f; + thisx->velocity.y = 0.0f; + thisx->gravity = 0.0f; - switch (this->actor.params) { + switch (thisx->params) { case ITEM00_RUPEE_GREEN: Item_Give(play, ITEM_RUPEE_GREEN); break; @@ -298,8 +300,8 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { break; } - if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) { - Actor_OfferGetItem(&this->actor, play, getItemId, 50.0f, 20.0f); + if ((getItemId != GI_NONE) && !Actor_HasParent(thisx, play)) { + Actor_OfferGetItem(thisx, play, getItemId, 50.0f, 20.0f); } this->actionFunc = func_800A6A40; @@ -373,7 +375,7 @@ static Vec3f sEffectVelocity = { 0.0f, 0.1f, 0.0f }; static Vec3f sEffectAccel = { 0.0f, 0.01f, 0.0f }; void func_800A6650(EnItem00* this, PlayState* play) { - u32 pad; + s32 pad; Vec3f pos; if (this->actor.params <= ITEM00_RUPEE_RED) { diff --git a/src/code/z_eventmgr.c b/src/code/z_eventmgr.c index 87c8203cc..88ec794fc 100644 --- a/src/code/z_eventmgr.c +++ b/src/code/z_eventmgr.c @@ -55,6 +55,13 @@ CutsceneManager sCutsceneMgr = { CS_ID_NONE, 0, CS_ID_NONE, SUB_CAM_ID_DONE, NULL, CS_START_0, NULL, CAM_ID_MAIN, false, }; +ActorCutscene* sSceneCutsceneList; +s16 sSceneCutsceneCount; +u8 sWaitingCutsceneList[16]; +static s32 sBssPad; +u8 sNextCutsceneList[16]; +static s32 sBssPad2; + s16 CutsceneManager_SetHudVisibility(s16 csHudVisibility) { u16 hudVisibility; |
