1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 23:44:53 +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

@ -544,7 +544,7 @@ void Flags_UnsetSwitch(GlobalContext* globalCtx, s32 flag) {
}
/**
* Tests if current scene unknown flag is set.
* Tests if unknown flag is set.
*/
s32 Flags_GetUnknown(GlobalContext* globalCtx, s32 flag) {
if (flag < 0x20) {
@ -555,7 +555,7 @@ s32 Flags_GetUnknown(GlobalContext* globalCtx, s32 flag) {
}
/**
* Sets current scene unknown flag.
* Sets unknown flag.
*/
void Flags_SetUnknown(GlobalContext* globalCtx, s32 flag) {
if (flag < 0x20) {
@ -566,7 +566,7 @@ void Flags_SetUnknown(GlobalContext* globalCtx, s32 flag) {
}
/**
* Unsets current scene unknown flag.
* Unsets unknown flag.
*/
void Flags_UnsetUnknown(GlobalContext* globalCtx, s32 flag) {
if (flag < 0x20) {

View file

@ -35,8 +35,8 @@ typedef struct {
} LightningBolt; // size = 0x20
typedef struct {
/* 0x00 */ s32 unk0;
/* 0x04 */ s32 unk1;
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
} Struct_8011FAF0; // size = 0x8
Struct_8011FAF0 D_8011FAF0[] = {
@ -213,7 +213,7 @@ u8 sGameOverLightsIntensity;
u16 D_8015FDB0;
s32 func_8006F0A0(s32 a0) {
s32 ret = ((a0 >> 4 & 0x7FF) << D_8011FAF0[a0 >> 15 & 7].unk0) + D_8011FAF0[a0 >> 15 & 7].unk1;
s32 ret = ((a0 >> 4 & 0x7FF) << D_8011FAF0[a0 >> 15 & 7].unk_00) + D_8011FAF0[a0 >> 15 & 7].unk_04;
return ret;
}

View file

@ -166,11 +166,11 @@ s32 Scene_ExecuteCommands(GlobalContext* globalCtx, SceneCmd* sceneCmd) {
osSyncPrintf("*** Scene_Word = { code=%d, data1=%02x, data2=%04x } ***\n", cmdCode, sceneCmd->base.data1,
sceneCmd->base.data2);
if (cmdCode == 0x14) {
if (cmdCode == SCENE_CMD_ID_END) {
break;
}
if (cmdCode <= 0x19) {
if (cmdCode < ARRAY_COUNT(gSceneCmdHandlers)) {
gSceneCmdHandlers[cmdCode](globalCtx, sceneCmd);
} else {
osSyncPrintf(VT_FGCOL(RED));
@ -443,7 +443,7 @@ void func_800991A0(GlobalContext* globalCtx, SceneCmd* cmd) {
if (altHeader != NULL) {
Scene_ExecuteCommands(globalCtx, SEGMENTED_TO_VIRTUAL(altHeader));
(cmd + 1)->base.code = 0x14;
(cmd + 1)->base.code = SCENE_CMD_ID_END;
} else {
// "Coughh! There is no specified dataaaaa!"
osSyncPrintf("\nげぼはっ! 指定されたデータがないでええっす!");
@ -457,7 +457,7 @@ void func_800991A0(GlobalContext* globalCtx, SceneCmd* cmd) {
if (altHeader != NULL) {
Scene_ExecuteCommands(globalCtx, SEGMENTED_TO_VIRTUAL(altHeader));
(cmd + 1)->base.code = 0x14;
(cmd + 1)->base.code = SCENE_CMD_ID_END;
}
}
}
@ -491,7 +491,7 @@ void func_800993C0(GlobalContext* globalCtx, SceneCmd* cmd) {
}
}
void (*gSceneCmdHandlers[])(GlobalContext*, SceneCmd*) = {
void (*gSceneCmdHandlers[SCENE_CMD_ID_MAX])(GlobalContext*, SceneCmd*) = {
func_80098508, func_800985DC, func_80098630, func_80098674, func_800987A4, func_80099090, func_800987F8,
func_8009883C, func_80098904, func_80099134, func_80098958, func_8009899C, func_80098B74, func_80098C24,
func_80098C68, func_80098CC8, func_80098D80, func_80098D1C, func_80098D5C, func_800990F0, NULL,