1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-22 06:52:03 +00:00

Fix misc 8 (#1150)

* Use `s32` as type instead of `StackStatus` enum type

* `bossLimbDl` -> `bossLimbDL`

* Fixup comment refering to `Actor.velocity` by struct offset

* Fixup `feetFloorFlags` doc and -> `feetFloorFlag`

* Fixup `xyzDistToPlayerSq` comment

* Make `SkelAnime.mode` comment refer to `AnimationMode` (<- `AnimationModes`)

* Use enum names to refer to anim modes and break long lines in z64animation.h

* `EnDha_OverridePostDraw` -> `EnDha_PostLimbDraw`

* ichains cleanup

* Scene command ids usage cleanup

* Properly name unkXXX members as unk_XXX

* change `gSceneCmdHandlers` length in variables.h too

* Revert Unknown flags to unk0 & unk1

* Remove "current scene" mention from `Flags_*Unknown` as they aren't saved or loaded so not scene-specific

* `Struct_8011FAF0`: unk_00, unk_04

* Run formatter

* Do not break long lines in headers

* Revert "Fixup `feetFloorFlags` doc and -> `feetFloorFlag`"

This reverts commit c45b3611e7.
This commit is contained in:
Dragorn421 2022-03-16 22:14:56 +01:00 committed by GitHub
parent 93096a45b6
commit b2a3fb2f7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 328 additions and 327 deletions

View file

@ -153,7 +153,7 @@ typedef enum {
} SkullKidAction;
typedef struct {
u8 unk0;
u8 unk_0;
EnSkj* skullkid;
} EnSkjUnkStruct;
@ -370,7 +370,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) {
Actor_ProcessInitChain(thisx, sInitChain);
switch (type) {
case 5: // Invisible on the small stump (sarias song))
sSmallStumpSkullKid.unk0 = 1;
sSmallStumpSkullKid.unk_0 = 1;
sSmallStumpSkullKid.skullkid = (EnSkj*)thisx;
this->actor.destroy = NULL;
this->actor.draw = NULL;
@ -381,7 +381,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) {
break;
case 6: // Invisible on the short stump (ocarina game)
sSmallStumpSkullKid.unk0 = 1;
sSmallStumpSkullKid.unk_0 = 1;
sSmallStumpSkullKid.skullkid = (EnSkj*)thisx;
this->actor.destroy = NULL;
this->actor.draw = NULL;
@ -420,7 +420,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) {
if ((type > 0) && (type < 3)) {
this->actor.targetMode = 7;
this->posCopy = this->actor.world.pos;
sOcarinaMinigameSkullKids[type - 1].unk0 = 1;
sOcarinaMinigameSkullKids[type - 1].unk_0 = 1;
sOcarinaMinigameSkullKids[type - 1].skullkid = this;
this->minigameState = 0;
this->alpha = 0;
@ -714,7 +714,7 @@ void EnSkj_SariasSongKidIdle(EnSkj* this, GlobalContext* globalCtx) {
if (!(gSaveContext.itemGetInf[1] & 0x40) && (this->actor.xzDistToPlayer < 200.0f)) {
this->backflipFlag = 1;
EnSkj_Backflip(this);
} else if (sSmallStumpSkullKid.unk0 != 0) {
} else if (sSmallStumpSkullKid.unk_0 != 0) {
Player* player = GET_PLAYER(globalCtx);
if (EnSkj_RangeCheck(player, sSmallStumpSkullKid.skullkid)) {
EnSkj_SetupWaitInRange(this);
@ -1222,7 +1222,7 @@ void EnSkj_OcarinaGameWaitForPlayer(EnSkj* this, GlobalContext* globalCtx) {
s32 EnSkj_IsLeavingGame(EnSkj* this) {
s32 paramDecr = this->actor.params - 1;
if (sOcarinaMinigameSkullKids[paramDecr].unk0 == 2) {
if (sOcarinaMinigameSkullKids[paramDecr].unk_0 == 2) {
EnSkj_SetupLeaveOcarinaGame(this);
return true;
}
@ -1275,7 +1275,7 @@ void EnSkj_SetupLeaveOcarinaGame(EnSkj* this) {
void EnSkj_LeaveOcarinaGame(EnSkj* this, GlobalContext* globalCtx) {
s32 paramsDecr = this->actor.params - 1;
sOcarinaMinigameSkullKids[paramsDecr].unk0 = 0;
sOcarinaMinigameSkullKids[paramsDecr].unk_0 = 0;
sOcarinaMinigameSkullKids[paramsDecr].skullkid = NULL;
this->backflipFlag = 1;
EnSkj_Backflip(this);
@ -1561,15 +1561,15 @@ void EnSkj_FinishOcarinaGameRound(EnSkj* this, GlobalContext* globalCtx) {
void EnSkj_CleanupOcarinaGame(EnSkj* this, GlobalContext* globalCtx) {
if (sOcarinaMinigameSkullKids[SKULL_KID_LEFT].skullkid != NULL) {
sOcarinaMinigameSkullKids[SKULL_KID_LEFT].unk0 = 2;
sOcarinaMinigameSkullKids[SKULL_KID_LEFT].unk_0 = 2;
}
if (sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].skullkid != NULL) {
sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].unk0 = 2;
sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].unk_0 = 2;
}
if ((sOcarinaMinigameSkullKids[SKULL_KID_LEFT].unk0 == 2) &&
(sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].unk0 == 2)) {
if ((sOcarinaMinigameSkullKids[SKULL_KID_LEFT].unk_0 == 2) &&
(sOcarinaMinigameSkullKids[SKULL_KID_RIGHT].unk_0 == 2)) {
func_800F5C2C();
Actor_Kill(&this->actor);
}