From abef65a6dba505cf07dbc59360af644092877a1a Mon Sep 17 00:00:00 2001 From: Isghj <42048411+isghj5@users.noreply.github.com> Date: Thu, 1 Jul 2021 19:20:34 -0700 Subject: En_Niw (Cucco) (#191) * EnNiw: Rebase of WIP to work on collsion init almost matches EnNiw: WIP EnNiw: running low, and too many not-matches for my liking EnNiw: WIP 3 * EnNiw: update to master * EnNiw: fix late rodata * wtf is going on * EnNiw: update is a thing, glad I'm doing it last * EnNiw: likely branch mysery * EnNiw: a horrible little draw function * EnNiw: nope, feather draw still fucked * EnNiw: fixing merge issues with master * EnNiw: update is no longer non-matching * EnNiw: cleaning/docs * EnNiw: cleaning/docs 3 * EnNiw: more docs 4 * EnNiw: OKs again now that data was removed * EnNiw: Docs and cleaning 5 * EnNiw: Docs and cleaning 6 * EnNiw: Docs/cleaning and changed a function and that changed a bunch ugh * EnNiw: format and make check * EnNiw: data re-merged, and matches * EnNiw: forgot about these * EnNiw: another attempt at feather draw, still not even close * Multiple: now that we know the last paramter is a flag, change all to hex * Player: fix wrong padding * EnNiw parameter name consistency Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c REG Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.h Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/overlays/actors/ovl_En_Niw/z_en_niw.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * EnNiw: Likely suggestions first easy suggestions first, then I'll attempt the stuff I'm not sure will match Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * EnNiw: compiling again * EnNiw: more suggestions added * EnNiw: last of minor changes * EnNiw: shorten overly long float * EnNiw: feather counts as define * EnNiw: add c file description * EnNiw: Some Suggested Changes Co-authored-by: Anghelo Carvajal * EnNiw: more suggestions * EnNiw: More suggestions Co-authored-by: Anghelo Carvajal * EnNiw: moved OPEN_DISPS to contentional location, still not close * BgIcicle/EnSb: renamed func_800B78B8 to Actor_UpdateBgCheckInfo Co-authored-by: isghj8 Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Anghelo Carvajal --- src/code/z_actor.c | 18 ++++++++++++------ src/code/z_en_item00.c | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'src/code') diff --git a/src/code/z_actor.c b/src/code/z_actor.c index b0a92b62e..2ceef0159 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -242,8 +242,8 @@ void Actor_TitleCardContextInit(GlobalContext* globalCtx, TitleCardContext* titl titleCardCtx->alpha = 0; } -void Actor_TitleCardCreate(GlobalContext* globalCtx, TitleCardContext* titleCardCtx, u32 texture, s16 param_4, s16 param_5, - u8 param_6, u8 param_7) { +void Actor_TitleCardCreate(GlobalContext* globalCtx, TitleCardContext* titleCardCtx, u32 texture, s16 param_4, + s16 param_5, u8 param_6, u8 param_7) { titleCardCtx->texture = texture; titleCardCtx->unk4 = param_4; titleCardCtx->unk6 = param_5; @@ -568,7 +568,7 @@ s32 Actor_IsActorFacingActorAndWithinRange(Actor* actor, Actor* other, f32 range #pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B7678.asm") -#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B78B8.asm") +#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//Actor_UpdateBgCheckInfo.asm") #pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B7E04.asm") @@ -624,9 +624,9 @@ s32 Actor_IsActorFacingActorAndWithinRange(Actor* actor, Actor* other, f32 range u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx) { if (actor->parent != NULL) { - return 1; + return true; } else { - return 0; + return false; } } @@ -638,7 +638,13 @@ u32 Actor_HasParent(Actor* actor, GlobalContext* globalCtx) { #pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B8BD0.asm") -#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B8BFC.asm") +s32 Actor_HasNoParent(Actor* actor, GlobalContext* globalCtx) { + if (!actor->parent) { + return true; + } else { + return false; + } +} #pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B8C20.asm") diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index bffd14ba2..b0c0eda13 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -461,7 +461,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { if (this->actor.gravity != 0.0f) { Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor); - func_800B78B8(globalCtx, &this->actor, 20.0f, 15.0f, 15.0f, 0x1D); + Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 15.0f, 15.0f, 0x1D); if (this->actor.floorHeight <= -32000.0f) { Actor_MarkForDeath(&this->actor); -- cgit v1.2.3