mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 17:00:19 +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
|
@ -94,7 +94,7 @@ void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Effect_Add(globalCtx, &this->effectIndex, EFFECT_BLURE1, 0, 0, &trail);
|
||||
|
||||
Collider_InitQuad(globalCtx, &this->collider);
|
||||
Collider_SetQuad(globalCtx, &this->collider, this, &sQuadInit);
|
||||
Collider_SetQuad(globalCtx, &this->collider, &this->actor, &sQuadInit);
|
||||
|
||||
EnBoom_SetupAction(this, EnBoom_Fly);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
s32 pad1;
|
||||
f32 distXYZScale;
|
||||
f32 distFromLink;
|
||||
Actor* hitActor;
|
||||
DynaPolyActor* hitActor;
|
||||
s32 hitDynaID;
|
||||
Vec3f hitPoint;
|
||||
s32 pad2;
|
||||
|
@ -138,7 +138,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
distXYZScale = 0.12f;
|
||||
}
|
||||
|
||||
if ((target != (Actor*)player) && ((target->update == NULL) || (ABS(yawDiff) > 0x4000))) {
|
||||
if ((target != &player->actor) && ((target->update == NULL) || (ABS(yawDiff) > 0x4000))) {
|
||||
//! @bug This condition is why the boomerang will randomly fly off in a the down left direction sometimes.
|
||||
// If the actor targetted is not Link and the difference between the 2 y angles is greater than 0x4000,
|
||||
// the moveTo pointer is nulled and it flies off in a seemingly random direction.
|
||||
|
@ -152,7 +152,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
// Set xyz speed, move forward, and play the boomerang sound
|
||||
func_8002D9A4(&this->actor, 12.0f);
|
||||
Actor_MoveForward(&this->actor);
|
||||
func_8002F974(this, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG);
|
||||
func_8002F974(&this->actor, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG);
|
||||
|
||||
// If the boomerang collides with EnItem00 or a Skulltula token, set grabbed pointer to pick it up
|
||||
collided = this->collider.base.atFlags & AT_HIT;
|
||||
|
@ -170,7 +170,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
// Otherwise handle grabbing and colliding.
|
||||
if (DECR(this->returnTimer) == 0) {
|
||||
distFromLink = Math_Vec3f_DistXYZ(&this->actor.world.pos, &player->actor.focus.pos);
|
||||
this->moveTo = player;
|
||||
this->moveTo = &player->actor;
|
||||
|
||||
// If the boomerang is less than 40 units away from Link, he can catch it.
|
||||
if (distFromLink < 40.0f) {
|
||||
|
@ -208,7 +208,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
if (func_8002F9EC(globalCtx, &this->actor, this->actor.wallPoly, hitDynaID, &hitPoint) != 0 ||
|
||||
(hitDynaID != BGCHECK_SCENE &&
|
||||
((hitActor = DynaPoly_GetActor(&globalCtx->colCtx, hitDynaID)) != NULL) &&
|
||||
hitActor->id == ACTOR_BG_BDAN_OBJECTS && hitActor->params == 0)) {
|
||||
hitActor->actor.id == ACTOR_BG_BDAN_OBJECTS && hitActor->actor.params == 0)) {
|
||||
collided = false;
|
||||
} else {
|
||||
CollisionCheck_SpawnShieldParticlesMetal(globalCtx, &hitPoint);
|
||||
|
@ -221,7 +221,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
if (collided) {
|
||||
this->actor.world.rot.x = -this->actor.world.rot.x;
|
||||
this->actor.world.rot.y += 0x8000;
|
||||
this->moveTo = player;
|
||||
this->moveTo = &player->actor;
|
||||
this->returnTimer = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ typedef struct EnBoom {
|
|||
/* 0x01D0 */ Actor* grabbed; // actor grabbed by the boomerang
|
||||
/* 0x01D4 */ u8 returnTimer; // returns to Link when 0
|
||||
/* 0x01D5 */ u8 activeTimer; // increments once every update
|
||||
/* 0x01D8 */ u32 effectIndex; // set by Effect_Add
|
||||
/* 0x01D8 */ s32 effectIndex; // set by Effect_Add
|
||||
/* 0x01DC */ WeaponInfo boomerangInfo;
|
||||
/* 0x01F8 */ EnBoomActionFunc actionFunc;
|
||||
} EnBoom; // size = 0x01FC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue