1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 14:50: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:
EllipticEllipsis 2021-02-02 23:44:24 +00:00 committed by GitHub
parent ced724fb9b
commit 02b3640bde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
122 changed files with 1129 additions and 1125 deletions

View file

@ -83,7 +83,7 @@ void EnMs_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06003DC0, &D_060005EC, this->jointTable, this->morphTable, 9);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinderType1(globalCtx, &this->collider, this, &sCylinderInit);
Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
Actor_SetScale(&this->actor, 0.015f);
@ -92,7 +92,7 @@ void EnMs_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.velocity.y = 0.0f;
this->actor.gravity = -1.0f;
EnMs_SetOfferText(&this->actor, globalCtx);
EnMs_SetOfferText(this, globalCtx);
this->actionFunc = EnMs_Wait;
}
@ -107,13 +107,11 @@ void EnMs_Wait(EnMs* this, GlobalContext* globalCtx) {
s16 yawDiff;
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
EnMs_SetOfferText(&this->actor, globalCtx);
if (func_8002F194(&this->actor, globalCtx) != 0) { // if talk is initiated
this->actionFunc = EnMs_Talk;
return;
}
EnMs_SetOfferText(this, globalCtx);
if ((this->actor.xzDistToPlayer < 90.0f) && (ABS(yawDiff) < 0x2000)) { // talk range
if (func_8002F194(&this->actor, globalCtx)) { // if talk is initiated
this->actionFunc = EnMs_Talk;
} else if ((this->actor.xzDistToPlayer < 90.0f) && (ABS(yawDiff) < 0x2000)) { // talk range
func_8002F2CC(&this->actor, globalCtx, 90.0f);
}
}
@ -126,22 +124,20 @@ void EnMs_Talk(EnMs* this, GlobalContext* globalCtx) {
if ((dialogState == 6) && (func_80106BC8(globalCtx) != 0)) { // advanced final textbox
this->actionFunc = EnMs_Wait;
}
} else {
if (func_80106BC8(globalCtx) != 0) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0: // yes
if (gSaveContext.rupees < sPrices[BEANS_BOUGHT]) {
func_8010B720(globalCtx, 0x4069); // not enough rupees text
return;
}
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
this->actionFunc = EnMs_Sell;
} else if (func_80106BC8(globalCtx) != 0) {
switch (globalCtx->msgCtx.choiceIndex) {
case 0: // yes
if (gSaveContext.rupees < sPrices[BEANS_BOUGHT]) {
func_8010B720(globalCtx, 0x4069); // not enough rupees text
return;
case 1: // no
func_8010B720(globalCtx, 0x4068);
default:
return;
}
}
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
this->actionFunc = EnMs_Sell;
return;
case 1: // no
func_8010B720(globalCtx, 0x4068);
default:
return;
}
}
}
@ -151,9 +147,9 @@ void EnMs_Sell(EnMs* this, GlobalContext* globalCtx) {
Rupees_ChangeBy(-sPrices[BEANS_BOUGHT]);
this->actor.parent = NULL;
this->actionFunc = EnMs_TalkAfterPurchase;
return;
} else {
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
}
func_8002F434(&this->actor, globalCtx, GI_BEAN, 90.0f, 10.0f);
}
void EnMs_TalkAfterPurchase(EnMs* this, GlobalContext* globalCtx) {