mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 22:30:15 +00:00
Fix most actor compiler warnings (#656)
* functions.h * Bg_Hidan_Kowarerukabe * Demo_Geff * Arrow_Fire * Demo_Sa * Arms_Hook * En_Okarina_Effect * Demo_Im * Bg_Menkuri_Kaiten * Bg_Spot09_Obj (minus CollisionHeader) * Obj_Hsblock * Obj_Elevator * En_Anubice_Tag * Bg_Ydan_Hasi (minus BgYdanHasi_MoveWater return shenanigans) * En_Heishi4 * Demo_Go * Bg_Spot00_Break * Bg_Hidan_Kousi * Bg_Spot17_Bakudankabe * Bg_Spot18_Basket * En_Dha * Bg_Jya_Goroiwa * En_Js * Bg_Mori_Hineri * Bg_Spot18_Shutter * Bg_Jya_Bombchuiwa * Bg_Bdan_Objects * Bg_Jya_Amishutter * Bg_Toki_Swd * En_Heishi2 * En_Fu * Bg_Jya_Kanaami * Bg_Pushbox * Bg_Spot12_Saku * En_Ani * En_Zl1 * En_Vase * Bg_Spot05_Soko * En_Crow (and a rename in En_Firefly) * Bg_Hidan_Fslift * En_Dog * Bg_Heavy_Block * En_Boom * Bg_Ddan_Kd * Bg_Spot16_Bombstone * Demo_Effect * Bg_Hidan_Syoku * En_Firefly * En_Fw * Bg_Jya_Bombiwa * En_Fd * ovl_Bg_Spot15_Saku * En_Mb * Bg_Spot18_Obj * Bg_Zg * Bg_Bdan_Switch * En_Md * En_Box * En_Bw * En_Viewer * En_Hs2 * Bg_Ydan_Maruta * En_St * En_Ru1 * Bg_Ddan_Jd * En_Sb * Bg_Jya_Cobra * Bg_Spot12_Gate * Bg_Haka_Trap * En_Ms * En_Kakasi2 * En_Horse_Link_Child * Obj_Bombiwa * En_Ds * En_Kz * Bg_Umajump * Bg_Spot03_Taki * Door_Toki * Item_Etcetera * En_Ru2 * En_Niw * Bg_Spot15_Rrbox * Demo_Tre_Lgt * Obj_Oshihiki * Bg_Mjin * Bg_Spot18_Futa * Bg_Spot01_Idosoko * En_Arow_Trap * Bg_Mizu_Uzu * En_Horse_Zelda * Player * fix func_800358DC to work in functions.h * fix fix to functions.h * enum fixes * Some review comments addressed * DynaPoly_GetActor standardisation * ovl_Daiku_Kakariko * ovl_En_Vase * ovl_En_Mk * ovl_Bg_Spot00_Hanebasi * ovl_Bg_Spot06_Objects * ovl_En_Go * ovl_En_Go2 * ovl_Bg_Jya_Bombiwa * ovl_En_Cs * ovl_En_Dodojr * ovl_En_Ny * ovl_En_Mm2 * Apply review suggestion
This commit is contained in:
parent
ced724fb9b
commit
02b3640bde
122 changed files with 1129 additions and 1125 deletions
|
@ -95,14 +95,14 @@ static EnGoAnimation sAnimationEntries[] = {
|
|||
{ &D_06010590, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
};
|
||||
|
||||
void EnGo_SetupAction(EnGo* this, EnGoActionFunc* actionFunc) {
|
||||
void EnGo_SetupAction(EnGo* this, EnGoActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
}
|
||||
|
||||
u16 EnGo_GetTextID(GlobalContext* globalCtx, EnGo* this) {
|
||||
u16 EnGo_GetTextID(GlobalContext* globalCtx, Actor* thisx) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
switch (this->actor.params & 0xF0) {
|
||||
switch (thisx->params & 0xF0) {
|
||||
case 0x90:
|
||||
if (gSaveContext.bgsFlag) {
|
||||
return 0x305E;
|
||||
|
@ -146,7 +146,7 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, EnGo* this) {
|
|||
}
|
||||
}
|
||||
case 0x10:
|
||||
if (Flags_GetSwitch(globalCtx, this->actor.params >> 8)) {
|
||||
if (Flags_GetSwitch(globalCtx, thisx->params >> 8)) {
|
||||
return 0x3052;
|
||||
} else {
|
||||
return 0x3051;
|
||||
|
@ -206,16 +206,16 @@ u16 EnGo_GetTextID(GlobalContext* globalCtx, EnGo* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, EnGo* this) {
|
||||
s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, Actor* thisx) {
|
||||
s16 unkState = 1;
|
||||
f32 xzRange;
|
||||
f32 yRange = fabsf(this->actor.yDistToPlayer) + 1.0f;
|
||||
f32 yRange = fabsf(thisx->yDistToPlayer) + 1.0f;
|
||||
|
||||
xzRange = this->actor.xzDistToPlayer + 1.0f;
|
||||
xzRange = thisx->xzDistToPlayer + 1.0f;
|
||||
switch (func_8010BDBC(&globalCtx->msgCtx)) {
|
||||
if (globalCtx) {}
|
||||
case 2:
|
||||
switch (this->actor.textId) {
|
||||
switch (thisx->textId) {
|
||||
case 0x3008:
|
||||
gSaveContext.infTable[14] |= 1;
|
||||
unkState = 0;
|
||||
|
@ -237,7 +237,7 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, EnGo* this) {
|
|||
unkState = 0;
|
||||
break;
|
||||
case 0x3036:
|
||||
func_8002F434(&this->actor, globalCtx, GI_TUNIC_GORON, xzRange, yRange);
|
||||
func_8002F434(thisx, globalCtx, GI_TUNIC_GORON, xzRange, yRange);
|
||||
gSaveContext.infTable[16] |= 0x2000; // EnGo exclusive flag
|
||||
unkState = 2;
|
||||
break;
|
||||
|
@ -268,33 +268,33 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, EnGo* this) {
|
|||
break;
|
||||
case 4:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
switch (thisx->textId) {
|
||||
case 0x300A:
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (CUR_UPG_VALUE(UPG_STRENGTH) || (gSaveContext.infTable[14] & 0x800)) {
|
||||
this->actor.textId = 0x300B;
|
||||
thisx->textId = 0x300B;
|
||||
} else {
|
||||
this->actor.textId = 0x300C;
|
||||
thisx->textId = 0x300C;
|
||||
}
|
||||
} else {
|
||||
this->actor.textId = 0x300D;
|
||||
thisx->textId = 0x300D;
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
func_8010B720(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
break;
|
||||
case 0x3034:
|
||||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.infTable[16] & 0x800) {
|
||||
this->actor.textId = 0x3033;
|
||||
thisx->textId = 0x3033;
|
||||
} else {
|
||||
this->actor.textId = 0x3035;
|
||||
thisx->textId = 0x3035;
|
||||
}
|
||||
} else if (gSaveContext.infTable[16] & 0x800) {
|
||||
this->actor.textId = 0x3036;
|
||||
thisx->textId = 0x3036;
|
||||
} else {
|
||||
this->actor.textId = 0x3033;
|
||||
thisx->textId = 0x3033;
|
||||
}
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
func_8010B720(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
break;
|
||||
case 0x3054:
|
||||
|
@ -302,8 +302,8 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, EnGo* this) {
|
|||
if (globalCtx->msgCtx.choiceIndex == 0) {
|
||||
unkState = 2;
|
||||
} else {
|
||||
this->actor.textId = 0x3056;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
thisx->textId = 0x3056;
|
||||
func_8010B720(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
}
|
||||
gSaveContext.infTable[11] |= 0x10;
|
||||
|
@ -313,13 +313,13 @@ s16 EnGo_SetFlagsGetStates(GlobalContext* globalCtx, EnGo* this) {
|
|||
break;
|
||||
case 5:
|
||||
if (func_80106BC8(globalCtx)) {
|
||||
switch (this->actor.textId) {
|
||||
switch (thisx->textId) {
|
||||
case 0x3035:
|
||||
gSaveContext.infTable[16] |= 0x800;
|
||||
case 0x3032:
|
||||
case 0x3033:
|
||||
this->actor.textId = 0x3034;
|
||||
func_8010B720(globalCtx, this->actor.textId);
|
||||
thisx->textId = 0x3034;
|
||||
func_8010B720(globalCtx, thisx->textId);
|
||||
unkState = 1;
|
||||
break;
|
||||
default:
|
||||
|
@ -597,10 +597,10 @@ void func_80A3F908(EnGo* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((this->actor.params & 0xF0) == 0x90) {
|
||||
isUnkCondition =
|
||||
func_80A3ED24(globalCtx, &this->actor, &this->unk_1E0, float1, EnGo_GetTextID, EnGo_SetFlagsGetStates);
|
||||
func_80A3ED24(globalCtx, this, &this->unk_1E0, float1, EnGo_GetTextID, EnGo_SetFlagsGetStates);
|
||||
} else {
|
||||
isUnkCondition =
|
||||
func_800343CC(globalCtx, &this->actor, &this->unk_1E0, float1, EnGo_GetTextID, EnGo_SetFlagsGetStates);
|
||||
func_800343CC(globalCtx, &this->actor, &this->unk_1E0.unk_00, float1, EnGo_GetTextID, EnGo_SetFlagsGetStates);
|
||||
}
|
||||
|
||||
if (((this->actor.params & 0xF0) == 0x90) && (isUnkCondition == true)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue