diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c index 0b658bc51..3562484de 100644 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c +++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c @@ -1,39 +1,17 @@ #include "z_en_invadepoh.h" #include "overlays/actors/ovl_En_Door/z_en_door.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" -#include "assets/objects/object_uch/object_uch.h" -#include "assets/objects/object_ma1/object_ma1.h" -#include "assets/objects/object_ma2/object_ma2.h" -#include "assets/objects/object_cow/object_cow.h" -#include "assets/objects/object_dog/object_dog.h" #define FLAGS 0x00000010 #define THIS ((EnInvadepoh*)thisx) +#if 1 // function prototypes void EnInvadepoh_Init(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B4627C(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46414(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46520(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B465CC(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46644(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B468B4(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B469C4(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46A80(Actor* thisx, PlayState* play); - void EnInvadepoh_Destroy(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46BB0(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46BC0(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46C08(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46C34(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46C7C(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46C50(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46C94(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46CC0(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46CF4(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46D28(Actor* thisx, PlayState* play2); - void EnInvadepoh_Update(Actor* thisx, PlayState* play2); + +// Update functions void EnInvadepoh_func_80B47BAC(Actor* thisx, PlayState* play2); void EnInvadepoh_func_80B47D30(Actor* thisx, PlayState* play2); void EnInvadepoh_func_80B47FA8(Actor* thisx, PlayState* play2); @@ -64,6 +42,7 @@ void EnInvadepoh_func_80B4CFFC(Actor* thisx, PlayState* play2); void EnInvadepoh_func_80B4D054(Actor* thisx, PlayState* play2); void EnInvadepoh_func_80B4D670(Actor* thisx, PlayState* play2); +// Draw functions void EnInvadepoh_func_80B4D760(Actor* thisx, PlayState* play2); void EnInvadepoh_func_80B4D9B4(Actor* thisx, PlayState* play); void EnInvadepoh_func_80B4DB14(Actor* thisx, PlayState* play2); @@ -74,6 +53,99 @@ void EnInvadepoh_func_80B4E3F0(Actor* thisx, PlayState* play2); void EnInvadepoh_func_80B4E660(Actor* thisx, PlayState* play); void EnInvadepoh_func_80B4E7BC(Actor* thisx, PlayState* play); +// Action functions +void EnInvadepoh_func_80B46DA8(EnInvadepoh* this); +void EnInvadepoh_func_80B46DC8(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B46E20(EnInvadepoh* this); +void EnInvadepoh_func_80B46E44(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B46EC0(EnInvadepoh* this); +void EnInvadepoh_func_80B46EE8(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B46F88(EnInvadepoh* this); +void EnInvadepoh_func_80B46FA8(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B47064(EnInvadepoh* this); +void EnInvadepoh_func_80B47084(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B470E0(EnInvadepoh* this); +void EnInvadepoh_func_80B47108(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B471C0(EnInvadepoh* this); +void EnInvadepoh_func_80B471E0(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B47248(EnInvadepoh* this); +void EnInvadepoh_func_80B47268(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B47278(EnInvadepoh* this); +void EnInvadepoh_func_80B47298(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B47304(EnInvadepoh* this); +void EnInvadepoh_func_80B47324(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B473E4(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B474DC(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B47568(EnInvadepoh* this); +void EnInvadepoh_func_80B47600(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4770C(EnInvadepoh* this); +void EnInvadepoh_func_80B477B4(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B478F4(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B47938(EnInvadepoh* this); +void EnInvadepoh_func_80B479E8(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B48324(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B48374(EnInvadepoh* this); +void EnInvadepoh_func_80B483CC(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4843C(EnInvadepoh* this); +void EnInvadepoh_func_80B484EC(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B48588(EnInvadepoh* this); +void EnInvadepoh_func_80B48610(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B48848(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B48948(EnInvadepoh* this); +void EnInvadepoh_func_80B48AD4(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B48E4C(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B491EC(EnInvadepoh* this); +void EnInvadepoh_func_80B49228(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B492FC(EnInvadepoh* this); +void EnInvadepoh_func_80B4934C(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B49404(EnInvadepoh* this); +void EnInvadepoh_func_80B49454(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B49628(EnInvadepoh* this); +void EnInvadepoh_func_80B49670(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B497EC(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B49904(EnInvadepoh* this); +void EnInvadepoh_func_80B4994C(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B499BC(EnInvadepoh* this); +void EnInvadepoh_func_80B49A00(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B49C38(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B49DFC(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4A350(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4A570(EnInvadepoh* this); +void EnInvadepoh_func_80B4A5E4(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4A67C(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4A81C(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4ACF0(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4AD3C(EnInvadepoh* this); +void EnInvadepoh_func_80B4AD60(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4ADB8(EnInvadepoh* this); +void EnInvadepoh_func_80B4ADCC(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4AEC0(EnInvadepoh* this); +void EnInvadepoh_func_80B4AEDC(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4AF80(EnInvadepoh* this); +void EnInvadepoh_func_80B4AF94(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4B024(EnInvadepoh* this); +void EnInvadepoh_func_80B4B048(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4B484(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4B510(EnInvadepoh* this); +void EnInvadepoh_func_80B4B564(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4B724(EnInvadepoh* this); +void EnInvadepoh_func_80B4B768(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4B864(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4BC4C(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4C058(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4C1BC(EnInvadepoh* this); +void EnInvadepoh_func_80B4C218(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4C730(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4CB0C(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4CC70(EnInvadepoh* this); +void EnInvadepoh_func_80B4CCCC(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4D290(EnInvadepoh* this, PlayState* play); +void EnInvadepoh_func_80B4D480(EnInvadepoh* this, PlayState* play); + +s32 EnInvadepoh_func_80B4516C(EnInvadepoh* this); +s32 EnInvadepoh_func_80B450C0(f32* arg0, f32* arg1, f32 arg2, f32 arg3, f32 arg4); +#endif + ActorInit En_Invadepoh_InitVars = { ACTOR_EN_INVADEPOH, ACTORCAT_PROP, @@ -86,206 +158,111 @@ ActorInit En_Invadepoh_InitVars = { (ActorFunc)NULL, }; -#include "z_en_invadepoh_data.inc.c" +ColliderCylinderInit D_80B4E8B0 = { + { + COLTYPE_HIT3, + AT_ON | AT_TYPE_ENEMY, + AC_ON | AC_TYPE_PLAYER, + OC1_ON | OC1_TYPE_ALL, + OC2_TYPE_1, + COLSHAPE_CYLINDER, + }, + { + ELEMTYPE_UNK4, + { 0xF7CFFFFF, 0x00, 0x04 }, + { 0x00003820, 0x00, 0x00 }, + TOUCH_ON | TOUCH_SFX_NONE, + BUMP_ON, + OCELEM_ON, + }, + { 40, 95, 10, { 0, 0, 0 } }, +}; +ColliderCylinderInit D_80B4E8DC = { + { + COLTYPE_NONE, + AT_NONE, + AC_NONE, + OC1_ON | OC1_TYPE_ALL, + OC2_TYPE_2, + COLSHAPE_CYLINDER, + }, + { + ELEMTYPE_UNK0, + { 0x00000000, 0x00, 0x00 }, + { 0x00000000, 0x00, 0x00 }, + TOUCH_NONE | TOUCH_SFX_NORMAL, + BUMP_NONE, + OCELEM_ON, + }, + { 18, 46, 0, { 0, 0, 0 } }, +}; +ColliderCylinderInit D_80B4E908 = { + { + COLTYPE_NONE, + AT_NONE, + AC_NONE, + OC1_ON | OC1_TYPE_ALL, + OC2_TYPE_1, + COLSHAPE_CYLINDER, + }, + { + ELEMTYPE_UNK1, + { 0x00000000, 0x00, 0x00 }, + { 0x00000000, 0x00, 0x00 }, + TOUCH_NONE | TOUCH_SFX_NORMAL, + BUMP_NONE, + OCELEM_ON, + }, + { 13, 19, 0, { 0, 0, 0 } }, +}; +Vec3f D_80B4E934 = { 216.0f, -20.0f, 1395.0f }; +s32 D_80B4E940 = 0; +TexturePtr sRomaniEyeTextures[5] = { + gRomaniEyeOpenTex, gRomaniEyeHalfTex, gRomaniEyeClosedTex, gRomaniEyeHappyTex, gRomaniEyeSadTex, +}; +TexturePtr sRomaniMouthTextures[4] = { + gRomaniMouthHappyTex, + gRomaniMouthFrownTex, + gRomaniMouthHangingOpenTex, + gRomaniMouthSmileTex, +}; +s8 D_80B4E968 = 0; +TexturePtr sCremiaEyeTextures[6] = { + gCremiaEyeOpenTex, gCremiaEyeHalfTex, gCremiaEyeClosedTex, gCremiaEyeHappyTex, gCremiaEyeAngryTex, gCremiaEyeSadTex, +}; -void EnInvadepoh_func_80B457A0(EnInvadepoh* this); -void EnInvadepoh_func_80B4B3DC(EnInvadepoh* this); -void EnInvadepoh_func_80B442E4(EnInvadepoh* this); -void EnInvadepoh_func_80B43F0C(EnInvadepoh* this); -void EnInvadepoh_func_80B443A0(EnInvadepoh* this); -void EnInvadepoh_func_80B44514(EnInvadepoh* this); -void EnInvadepoh_func_80B44570(EnInvadepoh* this); -void EnInvadepoh_func_80B44640(EnInvadepoh* this); -void EnInvadepoh_func_80B44690(EnInvadepoh* this); -void EnInvadepoh_func_80B44700(EnInvadepoh* this); -void EnInvadepoh_func_80B44B78(EnInvadepoh* this); -void EnInvadepoh_func_80B47380(EnInvadepoh* this); -void EnInvadepoh_func_80B47478(EnInvadepoh* this); -void EnInvadepoh_func_80B482D4(EnInvadepoh* this); -void EnInvadepoh_func_80B48DE4(EnInvadepoh* this); -void EnInvadepoh_func_80B497A4(EnInvadepoh* this); -void EnInvadepoh_func_80B49DA0(EnInvadepoh* this); -void EnInvadepoh_func_80B4A7C0(EnInvadepoh* this); -void EnInvadepoh_func_80B4ACDC(EnInvadepoh* this); -void EnInvadepoh_func_80B4B820(EnInvadepoh* this); -void EnInvadepoh_func_80B4BFFC(EnInvadepoh* this); -void EnInvadepoh_func_80B4CAB0(EnInvadepoh* this); -void EnInvadepoh_func_80B4D15C(EnInvadepoh* this); -void EnInvadepoh_func_80B4D3E4(EnInvadepoh* this); -void EnInvadepoh_func_80B47568(EnInvadepoh* this); -void EnInvadepoh_func_80B4770C(EnInvadepoh* this); -void EnInvadepoh_func_80B487B4(EnInvadepoh* this); -void EnInvadepoh_func_80B48948(EnInvadepoh* this); -void EnInvadepoh_func_80B49904(EnInvadepoh* this); -void EnInvadepoh_func_80B49BD0(EnInvadepoh* this); -void EnInvadepoh_func_80B4A2C0(EnInvadepoh* this); -void EnInvadepoh_func_80B4A614(EnInvadepoh* this); -void EnInvadepoh_func_80B4B510(EnInvadepoh* this); -void EnInvadepoh_func_80B4B430(EnInvadepoh* this); -void EnInvadepoh_func_80B4B724(EnInvadepoh* this); -void EnInvadepoh_func_80B4BBE0(EnInvadepoh* this); -void EnInvadepoh_func_80B4C1BC(EnInvadepoh* this); -void EnInvadepoh_func_80B4C6C8(EnInvadepoh* this); -void EnInvadepoh_func_80B4CC70(EnInvadepoh* this); -void EnInvadepoh_func_80B47830(EnInvadepoh* this); -void EnInvadepoh_func_80B47938(EnInvadepoh* this); -void EnInvadepoh_func_80B48374(EnInvadepoh* this); -void EnInvadepoh_func_80B492FC(EnInvadepoh* this); -void EnInvadepoh_func_80B499BC(EnInvadepoh* this); -void EnInvadepoh_func_80B4AEC0(EnInvadepoh* this); -void EnInvadepoh_func_80B4B024(EnInvadepoh* this); -void EnInvadepoh_func_80B4AF80(EnInvadepoh* this); -void EnInvadepoh_func_80B49404(EnInvadepoh* this); -void EnInvadepoh_func_80B4ADB8(EnInvadepoh* this); -void EnInvadepoh_func_80B4AD3C(EnInvadepoh* this); -void EnInvadepoh_func_80B4843C(EnInvadepoh* this); -void EnInvadepoh_func_80B4A570(EnInvadepoh* this); -void EnInvadepoh_func_80B48588(EnInvadepoh* this); -void EnInvadepoh_func_80B491EC(EnInvadepoh* this); -void EnInvadepoh_func_80B49628(EnInvadepoh* this); -void EnInvadepoh_func_80B45648(EnInvadepoh* this); -void EnInvadepoh_func_80B46DA8(EnInvadepoh* this); -void EnInvadepoh_func_80B46F88(EnInvadepoh* this); -void EnInvadepoh_func_80B471C0(EnInvadepoh* this); -void EnInvadepoh_func_80B47248(EnInvadepoh* this); -void EnInvadepoh_func_80B47304(EnInvadepoh* this); -void EnInvadepoh_func_80B46E20(EnInvadepoh* this); -void EnInvadepoh_func_80B46EC0(EnInvadepoh* this); -void EnInvadepoh_func_80B47064(EnInvadepoh* this); -void EnInvadepoh_func_80B47278(EnInvadepoh* this); -void EnInvadepoh_func_80B470E0(EnInvadepoh* this); -void EnInvadepoh_func_80B47248(EnInvadepoh* this); +TexturePtr sCremiaMouthTextures[4] = { + gCremiaMouthNormalTex, + gCremiaMouthSlightSmileTex, + gCremiaMouthFrownTex, + gCremiaMouthHangingOpenTex, +}; +s8 D_80B4E994 = 0; +s8 D_80B4E998 = 0; -void EnInvadepoh_func_80B49454(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B49228(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B49670(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B447C0(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B44A90(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B44C24(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B44E90(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B44EFC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B45460(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B44024(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B473E4(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B474DC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B477B4(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B48E4C(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B497EC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B49DFC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4A81C(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4B864(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4C058(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4CB0C(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4D290(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4D480(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B444BC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B444F4(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B44540(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B44620(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B44664(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B446D0(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B47600(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B48848(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B48AD4(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B49C38(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4A67C(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4B484(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4B564(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4B768(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4BC4C(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4C730(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4AEDC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B479E8(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4934C(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4994C(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4A350(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B48610(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4A5E4(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4AF94(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4B048(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4C218(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4CCCC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4ACF0(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B478F4(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B484EC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4AD60(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B48324(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B483CC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B49A00(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4ADCC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B46DC8(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B46E44(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B46EE8(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B46FA8(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B47084(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B47108(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B471E0(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B47268(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B47298(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B47324(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B451A0(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B452EC(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B454BC(EnInvadepoh* this, PlayState* play); - -s32 EnInvadepoh_func_80B4D9D8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, - Gfx** gfx); -void EnInvadepoh_func_80B4D9F4(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx, Gfx** gfx); -s32 EnInvadepoh_func_80B4E120(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx); -s32 EnInvadepoh_func_80B4E200(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx); -void EnInvadepoh_func_80B4E2AC(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx); -s32 EnInvadepoh_func_80B4E5B0(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx); -void EnInvadepoh_func_80B4E61C(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx); -s32 EnInvadepoh_func_80B4E6E4(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx); -void EnInvadepoh_func_80B4E784(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx); - -void EnInvadepoh_func_80B45CE0(EnInvadePohUnkStruct_324* arg0); -void EnInvadepoh_func_80B45BB8(EnInvadePohUnkStruct_324_1* arg0); -s8 EnInvadepoh_func_80B45980(EnInvadepohUnkStruct4* arg0, s32 arg1); -void EnInvadepoh_func_80B45A4C(EnInvadePohUnkStruct_324_1*, EnInvadepohUnkUnion**); -void EnInvadepoh_func_80B45A94(EnInvadePohUnkStruct_324_1*, EnInvadepohUnkUnion**); -void EnInvadepoh_func_80B45B1C(EnInvadePohUnkStruct_324_1*, EnInvadepohUnkUnion**); - -s32 EnInvadepoh_func_80B4516C(EnInvadepoh* this); -void EnInvadepoh_func_80B43BC8(EnInvadepoh* this, s8* arg1, Vec3f* arg2); -s32 EnInvadepoh_func_80B440B8(EnInvadepoh* thisx, f32 arg1, f32 arg2); -s32 EnInvadepoh_func_80B44B84(EnInvadepoh* this, PlayState* play, f32 arg2, f32 arg3); -void EnInvadepoh_func_80B453F4(EnInvadepoh* this, PlayState* play, s32 arg2); -s32 EnInvadepoh_func_80B45550(EnInvadepoh* this, PlayState* play, f32 arg2, s32 arg3); -s32 EnInvadepoh_func_80B44C80(EnInvadepoh* this, PlayState* play); -void EnInvadepoh_func_80B4560C(EnInvadepoh* this, PlayState* play, u16 arg2); -void EnInvadepoh_func_80B45EC8(EnInvadepoh* this, PlayState* play, s32 arg2); -s32 EnInvadepoh_func_80B44234(EnInvadepoh* this, Vec3f* arg1); -void EnInvadepoh_func_80B43DD4(EnInvadepoh* this, s16 arg1, s16 arg2); -void EnInvadepoh_func_80B43E6C(EnInvadepoh* this, s16 arg1, s16 arg2, s16 arg3); -f32 EnInvadepoh_func_80B43F70(EnInvadepoh* this); -void EnInvadepoh_func_80B4407C(EnInvadepoh* this, s32 arg1); -s32 EnInvadepoh_func_80B43B80(EnInvadepoh* this); - -void EnInvadepoh_func_80B46184(EnInvadepohStructD_80B50350* arg0); -s32 EnInvadepoh_func_80B450C0(f32* arg0, f32* arg1, f32 arg2, f32 arg3, f32 arg4); -s32 EnInvadepoh_func_80B461DC(void); -s32 EnInvadepoh_func_80B43A24(s32); -void EnInvadepoh_func_80B4D7B8(PlayState* play); -void EnInvadepoh_func_80B44F58(void); -void EnInvadepoh_func_80B44FEC(void); -void EnInvadepoh_func_80B45080(void); -EnInvadepoh* EnInvadepoh_func_80B458D8(void); -s32 EnInvadepoh_func_80B46118(Vec3f* arg0); -void EnInvadepoh_func_80B43A74(s32 arg0); -s32 EnInvadepoh_func_80B43A9C(void); -s32 EnInvadepoh_func_80B43AB0(void); -void EnInvadepoh_func_80B43AF0(s32 arg0); -void EnInvadepoh_func_80B45518(Vec3f* arg0); -s32 EnInvadepoh_func_80B456A8(PlayState* play, Vec3f* arg1); +MtxF D_80B502A0; +MtxF D_80B502E0; +EnInvadepoh* D_80B50320[8]; +u8 D_80B50340[8]; +s8 D_80B50348; +EnInvadepohWarpEffect D_80B50350[10]; +Actor* D_80B503F0; +EnInvadepoh* D_80B503F4; +EnInvadepoh* D_80B503F8; +AnimatedMaterial* sAlienEyeBeamTexAnim; +AnimatedMaterial* sAlienEmptyTexAnim; +s16 D_80B50404[3]; +s16 D_80B5040A; +EnInvadepoh* D_80B5040C; void EnInvadepoh_func_80B439B0(s32 arg0, s32 arg1) { arg1 -= CLOCK_TIME(2, 30); arg1 = CLAMP_MIN(arg1, 0); - if (!(arg0 & 1)) { + if ((arg0 % 2) == 0) { gSaveContext.save.unk_E88[arg0 >> 1] = (gSaveContext.save.unk_E88[arg0 >> 1] & 0xFFFF0000) | (arg1 & 0xFFFF); } else { - gSaveContext.save.unk_E88[arg0 >> 1] = (gSaveContext.save.unk_E88[arg0 >> 1] & 0xFFFF) | ((u16)arg1 << 0x10); + gSaveContext.save.unk_E88[arg0 >> 1] = (gSaveContext.save.unk_E88[arg0 >> 1] & 0xFFFF) | ((arg1 & 0xFFFF) << 0x10); } } @@ -321,7 +298,7 @@ s32 EnInvadepoh_func_80B43AB0(void) { void EnInvadepoh_func_80B43AF0(s32 arg0) { s32 sp1C = gSaveContext.save.time; - if (((gSaveContext.save.day % 5) == 1) && (sp1C >= CLOCK_TIME(2, 30)) && (sp1C < CLOCK_TIME(5, 15))) { + if ((CURRENT_DAY == 1) && (sp1C >= CLOCK_TIME(2, 30)) && (sp1C < CLOCK_TIME(5, 15))) { s32 sp18 = (12 - EnInvadepoh_func_80B43A9C()) * 25.0f; EnInvadepoh_func_80B439B0(arg0, sp1C + sp18); @@ -438,7 +415,7 @@ f32 EnInvadepoh_func_80B43F70(EnInvadepoh* this) { } void EnInvadepoh_func_80B44024(EnInvadepoh* this, PlayState* play) { - Path* temp_v0 = &play->setupPathList[(this->actor.params >> 8) & 0x7F]; + Path* temp_v0 = &play->setupPathList[ENINVADEPOH_GET_PARAM_7F00(&this->actor)]; this->unk_308 = temp_v0->count - 1; this->unk_30C = Lib_SegmentedToVirtual(temp_v0->points); @@ -464,7 +441,7 @@ s32 EnInvadepoh_func_80B440B8(EnInvadepoh* thisx, f32 arg1, f32 arg2) { s16 sp1E; if (this->unk_309 >= this->unk_308) { - return 0; + return false; } sp40 = (sp44->x - sp48->x); sp3C = (sp44->z - sp48->z); @@ -474,15 +451,15 @@ s32 EnInvadepoh_func_80B440B8(EnInvadepoh* thisx, f32 arg1, f32 arg2) { sp30 = this->actor.world.pos.x - sp48->x; sp2C = this->actor.world.pos.z - sp48->z; if ((arg1 - arg2) < fabsf((sp30 * sp38) - (sp2C * sp34))) { - return 0; + return false; } temp_fv0_2 = Math3D_XZLength(sp40, sp3C); temp_fa0_2 = (sp2C * sp38) + (sp30 * sp34); if ((temp_fa0_2 < 0.0f) || (temp_fv0_2 < temp_fa0_2)) { - return 0; + return false; } - return 1; + return true; } s32 EnInvadepoh_func_80B44234(EnInvadepoh* this, Vec3f* arg1) { @@ -508,7 +485,7 @@ s32 EnInvadepoh_func_80B44234(EnInvadepoh* this, Vec3f* arg1) { void EnInvadepoh_func_80B442E4(EnInvadepoh* this) { s32 pad; s32 sp18 = gSaveContext.save.time; - s32 temp_v0 = EnInvadepoh_func_80B43A24(this->actor.params & 7); + s32 temp_v0 = EnInvadepoh_func_80B43A24(ENINVADEPOH_GET_PARAM_7(&this->actor)); if (D_80B4E940 == 1) { this->unk_320 = 0.0f; @@ -574,12 +551,12 @@ void EnInvadepoh_func_80B44540(EnInvadepoh* this, PlayState* play) { } void EnInvadepoh_func_80B44570(EnInvadepoh* this) { - if ((gSaveContext.save.time < 0x1555) || (gSaveContext.save.time >= 0x4000)) { + if ((gSaveContext.save.time < CLOCK_TIME(2, 00)) || (gSaveContext.save.time >= CLOCK_TIME(6, 00))) { this->unk_320 = 0.0f; - } else if ((gSaveContext.save.time >= 0x1800) && (gSaveContext.save.time < 0x4000)) { + } else if ((gSaveContext.save.time >= CLOCK_TIME(2, 15)) && (gSaveContext.save.time < CLOCK_TIME(6, 00))) { this->unk_320 = 1.0f; } else { - f32 temp = (gSaveContext.save.time - 0x1555) * (1.0f / 683.0f); + f32 temp = (gSaveContext.save.time - CLOCK_TIME(2, 00)) * (1.0f / (CLOCK_TIME(2, 15) - CLOCK_TIME(2, 00))); this->unk_320 = temp; this->unk_320 = CLAMP(this->unk_320, 0.0f, 1.0f); @@ -616,12 +593,12 @@ void EnInvadepoh_func_80B446D0(EnInvadepoh* this, PlayState* play) { } void EnInvadepoh_func_80B44700(EnInvadepoh* this) { - if ((gSaveContext.save.time < 0xD555) && (gSaveContext.save.time >= 0x4000)) { + if ((gSaveContext.save.time < CLOCK_TIME(20, 00)) && (gSaveContext.save.time >= CLOCK_TIME(6, 00))) { this->unk_320 = 0.0f; - } else if ((gSaveContext.save.time >= 0xD7E1) || (gSaveContext.save.time < 0x4000)) { + } else if ((gSaveContext.save.time >= CLOCK_TIME(20, 14) + 15) || (gSaveContext.save.time < CLOCK_TIME(6, 00))) { this->unk_320 = 1.0f; } else { - f32 temp = (gSaveContext.save.time - 0xD555) * (1.0f / 652.0f); + f32 temp = (gSaveContext.save.time - CLOCK_TIME(20, 00)) * (1.0f / (CLOCK_TIME(20, 14) + 15 - CLOCK_TIME(20, 00))); this->unk_320 = temp; this->unk_320 = CLAMP(this->unk_320, 0.0f, 1.0f); @@ -849,34 +826,34 @@ s32 EnInvadepoh_func_80B450C0(f32* arg0, f32* arg1, f32 arg2, f32 arg3, f32 arg4 *arg0 += temp_fv1 * sp1C; *arg1 += temp_fv1 * sp18; - return 0; + return false; } else { *arg0 = arg2; *arg1 = arg3; - return 1; + return true; } } s32 EnInvadepoh_func_80B4516C(EnInvadepoh* this) { if (this->actor.floorHeight > BGCHECK_Y_MIN + 1.0f) { this->actor.world.pos.y = this->actor.floorHeight; - return 1; + return true; } - return 0; + return false; } void EnInvadepoh_func_80B451A0(EnInvadepoh* this, PlayState* play) { if (D_80B4E940 == 0) { - if (gSaveContext.save.day % 5 <= 0) { + if (CURRENT_DAY < 1) { D_80B4E940 = 1; - } else if (gSaveContext.save.day % 5 == 1) { + } else if (CURRENT_DAY == 1) { s32 sp2C = gSaveContext.save.time; if ((sp2C < CLOCK_TIME(2, 30)) || (sp2C >= CLOCK_TIME(6, 00))) { D_80B4E940 = 1; } else if (sp2C < CLOCK_TIME(5, 15)) { s32 var_s0; - s32 var_s1 = 0x3800; + s32 var_s1 = CLOCK_TIME(5, 15); for (var_s0 = 0; var_s0 < this->unk_379; var_s0++) { s32 temp_v0 = EnInvadepoh_func_80B43A24(var_s0); @@ -884,13 +861,13 @@ void EnInvadepoh_func_80B451A0(EnInvadepoh* this, PlayState* play) { var_s1 = MIN(temp_v0, var_s1); } - if (sp2C < var_s1 + 0xE11) { + if (sp2C < var_s1 + CLOCK_TIME(1, 19) + 6) { D_80B4E940 = 2; } } } if (D_80B4E940 == 0) { - if (gSaveContext.save.weekEventReg[0x16] & 1) { + if (gSaveContext.save.weekEventReg[22] & 1) { D_80B4E940 = 3; } else { D_80B4E940 = 4; @@ -900,13 +877,13 @@ void EnInvadepoh_func_80B451A0(EnInvadepoh* this, PlayState* play) { } void EnInvadepoh_func_80B452EC(EnInvadepoh* this, PlayState* play) { - s32 var_s2 = (this->actor.params >> 8) & 0x7F; + s32 var_s2 = ENINVADEPOH_GET_PARAM_7F00(&this->actor); s32 var_s3; for (var_s3 = 0; var_s3 < this->unk_379; var_s3++) { D_80B50320[var_s3] = - (EnInvadepoh*)Actor_Spawn(&play->actorCtx, play, 0x200, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, (var_s3 & 7) | ((var_s2 << 8) & 0x7F00) | 0x10); + (EnInvadepoh*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_INVADEPOH, this->actor.world.pos.x, this->actor.world.pos.y, + this->actor.world.pos.z, 0, 0, 0, ENINVADEPOH_SET_PARAMS(var_s2, ENINVADEPOH_ALIEN_INVADER, var_s3)); if (var_s2 != 0xFF) { Path* temp_v0 = &play->setupPathList[var_s2]; @@ -916,18 +893,18 @@ void EnInvadepoh_func_80B452EC(EnInvadepoh* this, PlayState* play) { } void EnInvadepoh_func_80B453F4(EnInvadepoh* this, PlayState* play, s32 arg2) { - Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, 0x200, this->actor.home.pos.x, this->actor.home.pos.y, - this->actor.home.pos.z, 0, 0, 0, (arg2 & 7) | 0x20); + Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_INVADEPOH, this->actor.home.pos.x, this->actor.home.pos.y, + this->actor.home.pos.z, 0, 0, 0, ENINVADEPOH_SET_PARAMS(0, ENINVADEPOH_COW, arg2)); } void EnInvadepoh_func_80B45460(EnInvadepoh* this, PlayState* play) { - Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, 0x200, this->actor.home.pos.x, this->actor.home.pos.y, - this->actor.home.pos.z, 0, 0, 0, 0x40); + Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_INVADEPOH, this->actor.home.pos.x, this->actor.home.pos.y, + this->actor.home.pos.z, 0, 0, 0, ENINVADEPOH_SET_PARAMS(0, ENINVADEPOH_ROMANI_ABDUCTED, 0)); } void EnInvadepoh_func_80B454BC(EnInvadepoh* this, PlayState* play) { - D_80B503F0 = Actor_Spawn(&play->actorCtx, play, 0x200, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, 0x60); + D_80B503F0 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_INVADEPOH, this->actor.world.pos.x, this->actor.world.pos.y, + this->actor.world.pos.z, 0, 0, 0, ENINVADEPOH_SET_PARAMS(0, ENINVADEPOH_LIGHT_BALL, 0)); } void EnInvadepoh_func_80B45518(Vec3f* arg0) { @@ -979,22 +956,16 @@ s32 EnInvadepoh_func_80B456A8(PlayState* play, Vec3f* arg1) { f32 sp30; Actor_GetProjectedPos(play, arg1, &sp34, &sp30); - if (sp34.z > 1.0f) { - // temp_fv1 = sp34.x * sp30; - if (fabsf(sp34.x * sp30) < 1.0f) { - // temp_fa0 = sp34.y * sp30; - if (fabsf(sp34.y * sp30) < 1.0f) { - f32 sp2C = (sp34.x * sp30 * 160.0f) + 160.0f; - f32 sp28 = (sp34.y * sp30 * -120.0f) + 120.0f; - s32 sp24 = (s32)(sp34.z * sp30 * 16352.0f) + 16352; + if ((sp34.z > 1.0f) && (fabsf(sp34.x * sp30) < 1.0f) && (fabsf(sp34.y * sp30) < 1.0f)) { + f32 sp2C = (sp34.x * sp30 * 160.0f) + 160.0f; + f32 sp28 = (sp34.y * sp30 * -120.0f) + 120.0f; + s32 sp24 = (s32)(sp34.z * sp30 * 16352.0f) + 16352; - if (sp24 < func_80178A94(sp2C, sp28)) { - return 1; - } - } + if (sp24 < func_80178A94(sp2C, sp28)) { + return true; } } - return 0; + return false; } void EnInvadepoh_func_80B457A0(EnInvadepoh* this) { @@ -1033,80 +1004,173 @@ EnInvadepoh* EnInvadepoh_func_80B458D8(void) { return NULL; } -s8 EnInvadepoh_func_80B45980(EnInvadepohUnkStruct4* arg0, s32 arg1) { +s8 EnInvadepoh_func_80B45980(EnInvadepohFaceAnimNext* arg0, s32 arg1) { f32 temp_fv0 = Rand_ZeroOne(); - EnInvadepohUnkStruct4* var_v0 = arg0; + EnInvadepohFaceAnimNext* var_v0 = arg0; s32 var_v1; arg1--; for (var_v1 = 0; var_v1 < arg1; var_v1++, var_v0++) { - if (temp_fv0 <= var_v0->unk4) { + if (temp_fv0 <= var_v0->chance) { break; } } - return (arg0 + var_v1)->unk0; // TODO: fake? + return (arg0 + var_v1)->index; // TODO: fake? } -void EnInvadepoh_func_80B459E8(EnInvadePohUnkStruct_324_1* arg0, EnInvadepohUnkUnion* arg1) { - arg0->unk_4 = arg1->unk3.unk0; - arg0->unk_8 = arg1; - arg0->unk_E = 0; - arg0->unk_F = *arg1->unk3.unk4->unk0; - if (arg0->unk_4 == 2) { - EnInvadepohUnkStruct6* temp = &arg1->unk6; +void EnInvadepoh_func_80B459E8(EnInvadePohFaceInfo* arg0, EnInvadepohFaceAnim* arg1) { + arg0->curAnimType = arg1->type; + arg0->curAnim = arg1; + arg0->curFrame = 0; + arg0->curIndex = arg1->frames->index[0]; + if (arg0->curAnimType == 2) { + EnInvadepohFaceAnimLoopDelayed* temp = (EnInvadepohFaceAnimLoopDelayed*) arg1; - arg0->unk_C = Rand_S16Offset(temp->unk10, temp->unk12); + arg0->delayTimer = Rand_S16Offset(temp->minDelay, temp->maxDelay); } } -void EnInvadepoh_func_80B45A4C(EnInvadePohUnkStruct_324_1* arg0, EnInvadepohUnkUnion** arg1) { - EnInvadepohUnkStruct3* temp_v0 = &arg0->unk_8->unk3; - EnInvadepohUnkStruct2* temp_v1 = temp_v0->unk4; +void EnInvadepoh_func_80B45A4C(EnInvadePohFaceInfo* arg0, EnInvadepohFaceAnim** arg1) { + EnInvadepohFaceAnim* temp_v0 = arg0->curAnim; + EnInvadepohFaceFrame* temp_v1 = temp_v0->frames; - if (arg0->unk_E < (temp_v1->unk4 - 1)) { - arg0->unk_E++; - arg0->unk_F = temp_v1->unk0[arg0->unk_E]; + if (arg0->curFrame < (temp_v1->count - 1)) { + arg0->curFrame++; + arg0->curIndex = temp_v1->index[arg0->curFrame]; } } -void EnInvadepoh_func_80B45A94(EnInvadePohUnkStruct_324_1* arg0, EnInvadepohUnkUnion** arg1) { - EnInvadepohUnkStruct5* temp_v0 = &arg0->unk_8->unk5; - EnInvadepohUnkStruct2* temp_v1 = temp_v0->unk4; +void EnInvadepoh_func_80B45A94(EnInvadePohFaceInfo* arg0, EnInvadepohFaceAnim** arg1) { + EnInvadepohFaceAnimLoop* temp_v0 = (EnInvadepohFaceAnimLoop*) arg0->curAnim; + EnInvadepohFaceFrame* temp_v1 = temp_v0->anim.frames; - if (arg0->unk_E < (temp_v1->unk4 - 1)) { - arg0->unk_E++; - arg0->unk_F = temp_v1->unk0[arg0->unk_E]; + if (arg0->curFrame < (temp_v1->count - 1)) { + arg0->curFrame++; + arg0->curIndex = temp_v1->index[arg0->curFrame]; } else { - s32 temp_a1 = arg1[EnInvadepoh_func_80B45980(temp_v0->unkC, temp_v0->unk8)]; + EnInvadepohFaceAnim* temp_a1 = arg1[EnInvadepoh_func_80B45980(temp_v0->nextAnims, temp_v0->nextCount)]; EnInvadepoh_func_80B459E8(arg0, temp_a1); } } -void EnInvadepoh_func_80B45B1C(EnInvadePohUnkStruct_324_1* arg0, EnInvadepohUnkUnion** arg1) { - EnInvadepohUnkStruct6* temp_v0 = &arg0->unk_8->unk6; - EnInvadepohUnkStruct2* temp_v1 = temp_v0->unk4; +void EnInvadepoh_func_80B45B1C(EnInvadePohFaceInfo* arg0, EnInvadepohFaceAnim** arg1) { + EnInvadepohFaceAnimLoopDelayed* temp_v0 = (EnInvadepohFaceAnimLoopDelayed*) arg0->curAnim; + EnInvadepohFaceFrame* temp_v1 = temp_v0->loop.anim.frames; - if (arg0->unk_E < (temp_v1->unk4 - 1)) { - arg0->unk_E++; - arg0->unk_F = temp_v1->unk0[arg0->unk_E]; - } else if (arg0->unk_C > 0) { - arg0->unk_C--; + if (arg0->curFrame < (temp_v1->count - 1)) { + arg0->curFrame++; + arg0->curIndex = temp_v1->index[arg0->curFrame]; + } else if (arg0->delayTimer > 0) { + arg0->delayTimer--; } else { - s32 temp_a1 = arg1[EnInvadepoh_func_80B45980(temp_v0->unkC, temp_v0->unk8)]; + EnInvadepohFaceAnim* temp_a1 = arg1[EnInvadepoh_func_80B45980(temp_v0->loop.nextAnims, temp_v0->loop.nextCount)]; EnInvadepoh_func_80B459E8(arg0, temp_a1); } } -void EnInvadepoh_func_80B45BB8(EnInvadePohUnkStruct_324_1* arg0) { - if ((arg0->unk_0 != NULL) && (arg0->unk_8 != NULL)) { - D_80B4EC0C[arg0->unk_4](arg0, arg0->unk_0); +s8 D_80B4E99C[1] = { 0 }; +s8 D_80B4E9A0[4] = { 0, 1, 2, 0 }; +s8 D_80B4E9A4[5] = { 0, 1, 2, 1, 0 }; +s8 D_80B4E9AC[6] = { 0, 1, 2, 2, 1, 0 }; +s8 D_80B4E9B4[8] = { 0, 1, 2, 1, 0, 1, 2, 0 }; +s8 D_80B4E9BC[1] = { 1 }; +s8 D_80B4E9C0[1] = { 3 }; +EnInvadepohFaceFrame D_80B4E9C4 = { D_80B4E99C, 1 }; +EnInvadepohFaceFrame D_80B4E9CC = { D_80B4E9A0, 4 }; +EnInvadepohFaceFrame D_80B4E9D4 = { D_80B4E9A4, 5 }; +EnInvadepohFaceFrame D_80B4E9DC = { D_80B4E9AC, 6 }; +EnInvadepohFaceFrame D_80B4E9E4 = { D_80B4E9B4, 8 }; +EnInvadepohFaceFrame D_80B4E9EC = { D_80B4E9BC, 1 }; +EnInvadepohFaceFrame D_80B4E9F4 = { D_80B4E9C0, 1 }; +EnInvadepohFaceAnim D_80B4E9FC = { 0, &D_80B4E9C4 }; +EnInvadepohFaceAnimNext D_80B4EA04[4] = { + { 2, 0.5f }, + { 3, 0.9f }, + { 4, 0.97f }, + { 5, 1.0f }, +}; +EnInvadepohFaceAnimNext D_80B4EA24[1] = { 1, 1.0f }; +EnInvadepohFaceAnimLoopDelayed D_80B4EA2C = { {{2, &D_80B4E9C4}, 4, D_80B4EA04}, 40, 60 }; +EnInvadepohFaceAnimLoop D_80B4EA40 = { {1, &D_80B4E9CC}, 1, D_80B4EA24 }; +EnInvadepohFaceAnimLoop D_80B4EA50 = { {1, &D_80B4E9D4}, 1, D_80B4EA24 }; +EnInvadepohFaceAnimLoop D_80B4EA60 = { {1, &D_80B4E9DC}, 1, D_80B4EA24 }; +EnInvadepohFaceAnimLoop D_80B4EA70 = { {1, &D_80B4E9E4}, 1, D_80B4EA24 }; +EnInvadepohFaceAnim D_80B4EA80 = { 0, &D_80B4E9EC }; +EnInvadepohFaceAnim D_80B4EA88 = { 0, &D_80B4E9F4 }; +EnInvadepohFaceAnim* D_80B4EA90[8] = { + &D_80B4E9FC, &D_80B4EA2C.loop.anim, &D_80B4EA40.anim, + &D_80B4EA50.anim, &D_80B4EA60.anim, &D_80B4EA70.anim, + &D_80B4EA80, &D_80B4EA88, +}; + +s8 D_80B4EAB0[1] = { 0 }; +s8 D_80B4EAB4[1] = { 1 }; +s8 D_80B4EAB8[1] = { 2 }; +s8 D_80B4EABC[1] = { 3 }; +EnInvadepohFaceFrame D_80B4EAC0 = { D_80B4EAB0, 1 }; +EnInvadepohFaceFrame D_80B4EAC8 = { D_80B4EAB4, 1 }; +EnInvadepohFaceFrame D_80B4EAD0 = { D_80B4EAB8, 1 }; +EnInvadepohFaceFrame D_80B4EAD8 = { D_80B4EABC, 1 }; +EnInvadepohFaceAnim D_80B4EAE0 = { 0, &D_80B4EAC0 }; +EnInvadepohFaceAnim D_80B4EAE8 = { 0, &D_80B4EAC8 }; +EnInvadepohFaceAnim D_80B4EAF0 = { 0, &D_80B4EAD0 }; +EnInvadepohFaceAnim D_80B4EAF8 = { 0, &D_80B4EAD8 }; +EnInvadepohFaceAnim* D_80B4EB00[4] = { + &D_80B4EAE0, + &D_80B4EAE8, + &D_80B4EAF0, + &D_80B4EAF8, +}; + +s8 D_80B4EB10[1] = { 0 }; +s8 D_80B4EB14[4] = { 0, 1, 2, 0 }; +s8 D_80B4EB18[5] = { 0, 1, 2, 1, 0 }; +s8 D_80B4EB20[6] = { 0, 1, 2, 2, 1, 0 }; +s8 D_80B4EB28[8] = { 0, 1, 2, 1, 0, 1, 2, 0 }; +EnInvadepohFaceFrame D_80B4EB30 = { D_80B4EB10, 1 }; +EnInvadepohFaceFrame D_80B4EB38 = { D_80B4EB14, 4 }; +EnInvadepohFaceFrame D_80B4EB40 = { D_80B4EB18, 5 }; +EnInvadepohFaceFrame D_80B4EB48 = { D_80B4EB20, 6 }; +EnInvadepohFaceFrame D_80B4EB50 = { D_80B4EB28, 8 }; +EnInvadepohFaceAnim D_80B4EB58 = { 0, &D_80B4EB30 }; +EnInvadepohFaceAnimNext D_80B4EB60[4] = { + { 2, 0.5f }, + { 3, 0.9f }, + { 4, 0.95f }, + { 5, 1.0f }, +}; +EnInvadepohFaceAnimNext D_80B4EB80[1] = { 1, 1.0f }; +EnInvadepohFaceAnimLoopDelayed D_80B4EB88 = { {{2, &D_80B4EB30}, 4, D_80B4EB60}, 40, 60 }; +EnInvadepohFaceAnimLoop D_80B4EB9C = { {1, &D_80B4EB38}, 1, D_80B4EB80 }; +EnInvadepohFaceAnimLoop D_80B4EBAC = { {1, &D_80B4EB40}, 1, D_80B4EB80 }; +EnInvadepohFaceAnimLoop D_80B4EBBC = { {1, &D_80B4EB48}, 1, D_80B4EB80 }; +EnInvadepohFaceAnimLoop D_80B4EBCC = { {1, &D_80B4EB50}, 1, D_80B4EB80 }; +EnInvadepohFaceAnim* D_80B4EBDC[6] = { + &D_80B4EB58, &D_80B4EB88.loop.anim, &D_80B4EB9C.anim, + &D_80B4EBAC.anim, &D_80B4EBBC.anim, &D_80B4EBCC.anim, +}; + +s8 D_80B4EBF4[1] = { 0 }; +EnInvadepohFaceFrame D_80B4EBF8 = { D_80B4EBF4, 1 }; +EnInvadepohFaceAnim D_80B4EC00 = { 0, &D_80B4EBF8 }; +EnInvadepohFaceAnim* D_80B4EC08[1] = { &D_80B4EC00 }; + +void EnInvadepoh_func_80B45BB8(EnInvadePohFaceInfo* arg0) { + static EnInvadepohFaceFunc D_80B4EC0C[3] = { + EnInvadepoh_func_80B45A4C, + EnInvadepoh_func_80B45A94, + EnInvadepoh_func_80B45B1C, + }; + + if ((arg0->animSet != NULL) && (arg0->curAnim != NULL)) { + D_80B4EC0C[arg0->curAnimType](arg0, arg0->animSet); } } -void EnInvadepoh_func_80B45C04(EnInvadePohUnkStruct_324* arg0, EnInvadepohUnkUnion** arg1, s32 arg2, - EnInvadepohUnkUnion** arg3, s32 arg4, Vec3s* arg5, s16 arg6, f32 arg7, f32 arg8, +void EnInvadepoh_func_80B45C04(EnInvadePohUnkStruct_324* arg0, EnInvadepohFaceAnim** arg1, s32 arg2, + EnInvadepohFaceAnim** arg3, s32 arg4, Vec3s* arg5, s16 arg6, f32 arg7, f32 arg8, f32 arg9) { Math_Vec3s_Copy(&arg0->unk_26, arg5); arg0->unk_2C = arg6; @@ -1114,24 +1178,24 @@ void EnInvadepoh_func_80B45C04(EnInvadePohUnkStruct_324* arg0, EnInvadepohUnkUni arg0->unk_38 = arg8; arg0->unk_3C = arg9; if (arg1 != NULL) { - EnInvadepohUnkUnion* temp_v0 = arg1[arg2]; + EnInvadepohFaceAnim* temp_v0 = arg1[arg2]; - arg0->unk_00.unk_0 = arg1; - arg0->unk_00.unk_4 = temp_v0->unk3.unk0; - arg0->unk_00.unk_8 = temp_v0; - arg0->unk_00.unk_C = 0; - arg0->unk_00.unk_E = 0; - arg0->unk_00.unk_F = temp_v0->unk3.unk4->unk0[0]; + arg0->eyeAnim.animSet = arg1; + arg0->eyeAnim.curAnimType = temp_v0->type; + arg0->eyeAnim.curAnim = temp_v0; + arg0->eyeAnim.delayTimer = 0; + arg0->eyeAnim.curFrame = 0; + arg0->eyeAnim.curIndex = temp_v0->frames->index[0]; } if (arg3 != NULL) { - EnInvadepohUnkUnion* temp_v0 = arg3[arg4]; + EnInvadepohFaceAnim* temp_v0 = arg3[arg4]; - arg0->unk_10.unk_0 = arg3; - arg0->unk_10.unk_4 = temp_v0->unk3.unk0; - arg0->unk_10.unk_8 = temp_v0; - arg0->unk_10.unk_C = 0; - arg0->unk_10.unk_E = 0; - arg0->unk_10.unk_F = temp_v0->unk3.unk4->unk0[0]; + arg0->mouthAnim.animSet = arg3; + arg0->mouthAnim.curAnimType = temp_v0->type; + arg0->mouthAnim.curAnim = temp_v0; + arg0->mouthAnim.delayTimer = 0; + arg0->mouthAnim.curFrame = 0; + arg0->mouthAnim.curIndex = temp_v0->frames->index[0]; } } @@ -1165,11 +1229,13 @@ void EnInvadepoh_func_80B45CE0(EnInvadePohUnkStruct_324* arg0) { var_a2 = CLAMP(var_a2, 100, arg0->unk_48); Math_ScaledStepToS(&arg0->unk_40, arg0->unk_42, var_a2); } - EnInvadepoh_func_80B45BB8(&arg0->unk_00); - EnInvadepoh_func_80B45BB8(&arg0->unk_10); + EnInvadepoh_func_80B45BB8(&arg0->eyeAnim); + EnInvadepoh_func_80B45BB8(&arg0->mouthAnim); } void EnInvadepoh_func_80B45EC8(EnInvadepoh* this, PlayState* play, s32 arg2) { + static Color_RGBA8 D_80B4EC18 = { 255, 255, 200, 255 }; + static Color_RGBA8 D_80B4EC1C = { 255, 200, 0, 0 }; s32 var_s1; Vec3f spA8; Vec3f sp9C; @@ -1178,7 +1244,7 @@ void EnInvadepoh_func_80B45EC8(EnInvadepoh* this, PlayState* play, s32 arg2) { s16 var_s0 = 0; for (var_s1 = 0; var_s1 < arg2; var_s1++) { - var_s0 += (s16)(65536.0f / arg2); + var_s0 += (s16)(0x10000 * 1.0f / arg2); temp_fs0 = (Rand_ZeroOne() * 0.5f) + 0.5f; spA8.x = Math_SinS(var_s0) * temp_fs0; @@ -1200,59 +1266,61 @@ void EnInvadepoh_func_80B45EC8(EnInvadepoh* this, PlayState* play, s32 arg2) { } s32 EnInvadepoh_func_80B46118(Vec3f* arg0) { - EnInvadepohStructD_80B50350* var_v1 = D_80B50350; - s32 var_v0; + EnInvadepohWarpEffect* warpEffect = D_80B50350; + s32 i; - for (var_v0 = 0; var_v0 < 10; var_v0++, var_v1++) { - if (var_v1->unk_1 <= 0) { - var_v1->unk_0 = 0; - var_v1->unk_1 = 40; - Math_Vec3f_Copy(&var_v1->unk_4, arg0); - var_v1->unk_2 = 0; - return 1; + for (i = 0; i < 10; i++, warpEffect++) { + if (warpEffect->timer <= 0) { + warpEffect->unk_0 = 0; + warpEffect->timer = 40; + Math_Vec3f_Copy(&warpEffect->pos, arg0); + warpEffect->alpha = 0; + return true; } } - return 0; + return false; } -void EnInvadepoh_func_80B46184(EnInvadepohStructD_80B50350* arg0) { - if (arg0->unk_1 > 20) { - if (arg0->unk_2 < 125) { - arg0->unk_2 += 10; +void EnInvadepoh_func_80B46184(EnInvadepohWarpEffect* warpEffect) { + if (warpEffect->timer > 20) { + if (warpEffect->alpha < 125) { + warpEffect->alpha += 10; } else { - arg0->unk_2 = 135; + warpEffect->alpha = 135; } } else { - if (arg0->unk_2 > 13) { - arg0->unk_2 -= 13; + if (warpEffect->alpha > 13) { + warpEffect->alpha -= 13; } else { - arg0->unk_2 = 0; + warpEffect->alpha = 0; } } } s32 EnInvadepoh_func_80B461DC(void) { + static void (*D_80B4EC20[1])(EnInvadepohWarpEffect*) = { EnInvadepoh_func_80B46184 }; s32 var_s4 = 0; s32 i; - EnInvadepohStructD_80B50350* var_s0; + EnInvadepohWarpEffect* warpEffect; - for (i = 0, var_s0 = D_80B50350; i < 10; i++, var_s0++) { - if (var_s0->unk_1 > 0) { - D_80B4EC20[var_s0->unk_0](var_s0); + for (i = 0, warpEffect = D_80B50350; i < 10; i++, warpEffect++) { + if (warpEffect->timer > 0) { + D_80B4EC20[warpEffect->unk_0](warpEffect); var_s4 = 1; - var_s0->unk_1 -= 1; + warpEffect->timer -= 1; } } return var_s4; } void EnInvadepoh_func_80B4627C(Actor* thisx, PlayState* play) { + // PlayState* play = play2; Massive problems EnInvadepoh* this = (EnInvadepoh*)thisx; s32 var_a2; s32 var_v1; - this->actor.flags |= 0x20; - var_v1 = (this->actor.params >> 8) & 0x7F; + this->actor.flags |= ACTOR_FLAG_20; + var_v1 = ENINVADEPOH_GET_PARAM_7F00(&this->actor); for (var_a2 = 1; var_a2 < 8; var_a2++) { Path* path = &play->setupPathList[var_v1]; @@ -1269,18 +1337,18 @@ void EnInvadepoh_func_80B4627C(Actor* thisx, PlayState* play) { if (D_80B4E940 == 1) { EnInvadepoh_func_80B46DA8(this); } else if (D_80B4E940 == 2) { - if (gSaveContext.save.time < 0x1AD8) { + if (gSaveContext.save.time < CLOCK_TIME(2, 31)) { EnInvadepoh_func_80B46DA8(this); } else { EnInvadepoh_func_80B454BC(this, play); EnInvadepoh_func_80B452EC(this, play); - Audio_QueueSeqCmd(0x800D); + Audio_QueueSeqCmd(0x8000 | NA_BGM_ALIEN_INVASION); EnInvadepoh_func_80B46F88(this); } } else if (D_80B4E940 == 3) { - if (gSaveContext.save.entrance == 0x6460) { + if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 6)) { EnInvadepoh_func_80B471C0(this); - } else if (gSaveContext.save.entrance == 0x6470) { + } else if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 7)) { EnInvadepoh_func_80B47248(this); } else { EnInvadepoh_func_80B47248(this); @@ -1290,15 +1358,22 @@ void EnInvadepoh_func_80B4627C(Actor* thisx, PlayState* play) { } } +InitChainEntry D_80B4EC24[4] = { + ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 600, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), +}; void EnInvadepoh_func_80B46414(Actor* thisx, PlayState* play) { + // PlayState* play = play2; Stack size problems EnInvadepoh* this = (EnInvadepoh*)thisx; Actor_ProcessInitChain(&this->actor, D_80B4EC24); Collider_InitCylinder(play, &this->unk_2A0); ActorShape_Init(&this->actor.shape, 6800.0f, ActorShadow_DrawWhiteCircle, 150.0f); this->actor.shape.shadowAlpha = 140; - this->actor.flags = 0x80001010; - if (((this->actor.params >> 4) & 0xF) == 0xD) { + this->actor.flags = ACTOR_FLAG_80000000 | ACTOR_FLAG_1000 | ACTOR_FLAG_10; + if (ENINVADEPOH_GET_PARAM_F0(&this->actor) == ENINVADEPOH_ALIEN_ABDUCTOR) { this->actor.update = EnInvadepoh_func_80B4D670; this->actor.world.pos.y = this->actor.home.pos.y + 150.0f; } else { @@ -1306,94 +1381,117 @@ void EnInvadepoh_func_80B46414(Actor* thisx, PlayState* play) { Collider_SetCylinder(play, &this->unk_2A0, &this->actor, &D_80B4E8B0); this->actor.colChkInfo.mass = 40; } - this->unk_2F4 = Object_GetIndex(&play->objectCtx, 0x23E); + this->unk_2F4 = Object_GetIndex(&play->objectCtx, OBJECT_UCH); if (this->unk_2F4 < 0) { Actor_MarkForDeath(&this->actor); } } +InitChainEntry D_80B4EC34[4] = { + ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 200, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), +}; void EnInvadepoh_func_80B46520(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; Actor_ProcessInitChain(&this->actor, D_80B4EC34); this->actor.update = EnInvadepoh_func_80B47FA8; - Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, 0x200, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0x30); - this->unk_2F4 = Object_GetIndex(&play->objectCtx, 0x146); + Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_INVADEPOH, 0.0f, 0.0f, 0.0f, 0, 0, 0, ENINVADEPOH_SET_PARAMS(0, ENINVADEPOH_COW_TAIL, 0)); + this->unk_2F4 = Object_GetIndex(&play->objectCtx, OBJECT_COW); if (this->unk_2F4 < 0) { Actor_MarkForDeath(&this->actor); } } +InitChainEntry D_80B4EC44[4] = { + ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), +}; void EnInvadepoh_func_80B465CC(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; Actor_ProcessInitChain(&this->actor, D_80B4EC44); this->actor.update = EnInvadepoh_func_80B481C4; - this->unk_2F4 = Object_GetIndex(&play->objectCtx, 0x146); + this->unk_2F4 = Object_GetIndex(&play->objectCtx, OBJECT_COW); if (this->unk_2F4 < 0) { Actor_MarkForDeath(&this->actor); } } +InitChainEntry D_80B4EC54[5] = { + ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_CONTINUE), ICHAIN_F32(targetArrowOffset, 1500, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), +}; void EnInvadepoh_func_80B46644(Actor* thisx, PlayState* play) { + // PlayState* play = play2; Stack management problems EnInvadepoh* this = (EnInvadepoh*)thisx; - s32 temp_v1 = (this->actor.params >> 4) & 0xF; + s32 temp_v1 = ENINVADEPOH_GET_PARAM_F0(&this->actor); Actor_ProcessInitChain(&this->actor, D_80B4EC54); - if ((temp_v1 == 7) || (temp_v1 == 0xC)) { + if ((temp_v1 == ENINVADEPOH_ROMANI_NIGHT_1) || (temp_v1 == ENINVADEPOH_ROMANI_NIGHT_3)) { this->actor.targetMode = 3; } else { this->actor.targetMode = 6; } func_800BC154(play, &play->actorCtx, &this->actor, 4); Collider_InitCylinder(play, &this->unk_2A0); - if (temp_v1 != 4) { + if (temp_v1 != ENINVADEPOH_ROMANI_ABDUCTED) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); Collider_SetCylinder(play, &this->unk_2A0, &this->actor, &D_80B4E8DC); this->actor.colChkInfo.mass = 0xFF; } - if (temp_v1 == 4) { + if (temp_v1 == ENINVADEPOH_ROMANI_ABDUCTED) { this->actor.update = EnInvadepoh_func_80B48620; - } else if (temp_v1 == 5) { + } else if (temp_v1 == ENINVADEPOH_ROMANI_CONFUSED) { this->actor.update = EnInvadepoh_func_80B48FB0; - this->actor.flags = 0x19; - } else if (temp_v1 == 7) { + this->actor.flags = ACTOR_FLAG_10 | ACTOR_FLAG_8 | ACTOR_FLAG_1; + } else if (temp_v1 == ENINVADEPOH_ROMANI_NIGHT_1) { this->actor.update = EnInvadepoh_func_80B49F88; - } else if (temp_v1 == 8) { + } else if (temp_v1 == ENINVADEPOH_ROMANI_UNKNOWN) { this->actor.update = EnInvadepoh_func_80B4A9C8; - } else if (temp_v1 == 9) { + } else if (temp_v1 == ENINVADEPOH_ROMANI_REWARD) { this->actor.update = EnInvadepoh_func_80B4B0C4; } else { this->actor.update = EnInvadepoh_func_80B4CE54; } - this->unk_2F4 = Object_GetIndex(&play->objectCtx, 0xB7); + this->unk_2F4 = Object_GetIndex(&play->objectCtx, OBJECT_MA1); if (this->unk_2F4 < 0) { Actor_MarkForDeath(&this->actor); } - if (temp_v1 == 5) { - if (gSaveContext.save.weekEventReg[0x16] & 1) { + if (temp_v1 == ENINVADEPOH_ROMANI_CONFUSED) { + if (gSaveContext.save.weekEventReg[22] & 1) { Actor_MarkForDeath(&this->actor); } - } else if (temp_v1 == 7) { + } else if (temp_v1 == ENINVADEPOH_ROMANI_NIGHT_1) { if ((gSaveContext.save.time < CLOCK_TIME(6, 00)) && (gSaveContext.save.time >= CLOCK_TIME(2, 15))) { Actor_MarkForDeath(&this->actor); } - } else if (temp_v1 == 8) { + } else if (temp_v1 == ENINVADEPOH_ROMANI_UNKNOWN) { // nothing - } else if (temp_v1 == 9) { - if (gSaveContext.save.entrance != 0x6460) { + } else if (temp_v1 == ENINVADEPOH_ROMANI_REWARD) { + if (gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 6)) { Actor_MarkForDeath(&this->actor); } - } else if (temp_v1 == 0xC) { - if (!(gSaveContext.save.weekEventReg[0x16] & 1)) { + } else if (temp_v1 == ENINVADEPOH_ROMANI_NIGHT_3) { + if (!(gSaveContext.save.weekEventReg[22] & 1)) { Actor_MarkForDeath(&this->actor); } D_80B503F4 = this; } } +InitChainEntry D_80B4EC68[6] = { + ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE), ICHAIN_VEC3S(shape, 0, ICHAIN_CONTINUE), + ICHAIN_F32(terminalVelocity, -100, ICHAIN_CONTINUE), ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP), +}; void EnInvadepoh_func_80B468B4(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; @@ -1415,7 +1513,16 @@ void EnInvadepoh_func_80B468B4(Actor* thisx, PlayState* play2) { } } +InitChainEntry D_80B4EC80[6] = { + ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 50, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 50, ICHAIN_CONTINUE), + ICHAIN_F32(gravity, -3, ICHAIN_CONTINUE), + ICHAIN_U8(targetMode, 4, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 7, ICHAIN_STOP), +}; void EnInvadepoh_func_80B469C4(Actor* thisx, PlayState* play) { + // PlayState* play = play2; Stack size problems EnInvadepoh* this = (EnInvadepoh*)thisx; Actor_ProcessInitChain(&this->actor, D_80B4EC80); @@ -1424,13 +1531,22 @@ void EnInvadepoh_func_80B469C4(Actor* thisx, PlayState* play) { Collider_SetCylinder(play, &this->unk_2A0, &this->actor, &D_80B4E908); this->actor.colChkInfo.mass = 0x50; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); - this->unk_2F4 = Object_GetIndex(&play->objectCtx, 0x132); + this->unk_2F4 = Object_GetIndex(&play->objectCtx, OBJECT_DOG); if (this->unk_2F4 < 0) { Actor_MarkForDeath(&this->actor); } } +InitChainEntry D_80B4EC98[6] = { + ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 150, ICHAIN_CONTINUE), + ICHAIN_F32(targetArrowOffset, 1500, ICHAIN_CONTINUE), + ICHAIN_U8(targetMode, 3, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), +}; void EnInvadepoh_func_80B46A80(Actor* thisx, PlayState* play) { + // PlayState* play = play2; Stack size problems EnInvadepoh* this = (EnInvadepoh*)thisx; Actor_ProcessInitChain(&this->actor, D_80B4EC98); @@ -1440,18 +1556,35 @@ void EnInvadepoh_func_80B46A80(Actor* thisx, PlayState* play) { Collider_SetCylinder(play, &this->unk_2A0, &this->actor, &D_80B4E8DC); this->actor.colChkInfo.mass = MASS_HEAVY; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); - this->unk_2F4 = Object_GetIndex(&play->objectCtx, 0xA7); + this->unk_2F4 = Object_GetIndex(&play->objectCtx, OBJECT_MA2); if (this->unk_2F4 < 0) { Actor_MarkForDeath(&this->actor); } - if (!(gSaveContext.save.weekEventReg[0x16] & 1)) { + if (!(gSaveContext.save.weekEventReg[22] & 1)) { Actor_MarkForDeath(&this->actor); } D_80B503F8 = this; } void EnInvadepoh_Init(Actor* thisx, PlayState* play) { - D_80B4ECB0[(thisx->params >> 4) & 0xF](thisx, play); + static ActorFunc D_80B4ECB0[14] = { + EnInvadepoh_func_80B4627C, // Event handler + EnInvadepoh_func_80B46414, // Alien invader + EnInvadepoh_func_80B46520, // Abducted cow + EnInvadepoh_func_80B465CC, // Cow tail + EnInvadepoh_func_80B46644, // Abducted Romani + EnInvadepoh_func_80B46644, // Confused Romani + EnInvadepoh_func_80B468B4, // Light ball + EnInvadepoh_func_80B46644, // Night 1 Romani + EnInvadepoh_func_80B46644, // Unknown Romani + EnInvadepoh_func_80B46644, // Reward Romani + EnInvadepoh_func_80B469C4, // Dog + EnInvadepoh_func_80B46A80, // Night 3 Cremia + EnInvadepoh_func_80B46644, // Night 3 Romani + EnInvadepoh_func_80B46414, // Alien abductor + }; + + D_80B4ECB0[ENINVADEPOH_GET_PARAM_F0(thisx)](thisx, play); } void EnInvadepoh_func_80B46BB0(Actor* thisx, PlayState* play2) { @@ -1459,7 +1592,7 @@ void EnInvadepoh_func_80B46BB0(Actor* thisx, PlayState* play2) { void EnInvadepoh_func_80B46BC0(Actor* thisx, PlayState* play2) { EnInvadepoh* this = (EnInvadepoh*)thisx; - s32 sp18 = this->actor.params & 7; + s32 sp18 = ENINVADEPOH_GET_PARAM_7(&this->actor); PlayState* play = play2; Collider_DestroyCylinder(play, &this->unk_2A0); @@ -1486,7 +1619,7 @@ void EnInvadepoh_func_80B46C34(Actor* thisx, PlayState* play2) { } void EnInvadepoh_func_80B46C50(Actor* thisx, PlayState* play2) { - PlayState* play = play2; + PlayState* play = play2; // both or neither recast required EnInvadepoh* this = (EnInvadepoh*)thisx; Collider_DestroyCylinder(play, &this->unk_2A0); @@ -1497,7 +1630,7 @@ void EnInvadepoh_func_80B46C7C(Actor* thisx, PlayState* play2) { } void EnInvadepoh_func_80B46C94(Actor* thisx, PlayState* play2) { - PlayState* play = play2; + PlayState* play = play2; // both or neither recast required EnInvadepoh* this = (EnInvadepoh*)thisx; Collider_DestroyCylinder(play, &this->unk_2A0); @@ -1521,7 +1654,7 @@ void EnInvadepoh_func_80B46CF4(Actor* thisx, PlayState* play2) { void EnInvadepoh_func_80B46D28(Actor* thisx, PlayState* play2) { PlayState* play = play2; - EnInvadepoh* this = (EnInvadepoh*)thisx; + EnInvadepoh* this = (EnInvadepoh*)thisx; // this recast required Collider_DestroyCylinder(play, &this->unk_2A0); if (this->actor.child != NULL) { @@ -1530,7 +1663,24 @@ void EnInvadepoh_func_80B46D28(Actor* thisx, PlayState* play2) { } void EnInvadepoh_Destroy(Actor* thisx, PlayState* play) { - D_80B4ECE8[(thisx->params >> 4) & 0xF](thisx, play); + static ActorFunc D_80B4ECE8[14] = { + EnInvadepoh_func_80B46BB0, // Event handler + EnInvadepoh_func_80B46BC0, // Alien invader + EnInvadepoh_func_80B46C08, // Abducted cow + EnInvadepoh_func_80B46C34, // Cow tail + EnInvadepoh_func_80B46C50, // Abducted Romani + EnInvadepoh_func_80B46C50, // Confused Romani + EnInvadepoh_func_80B46C7C, // Light ball + EnInvadepoh_func_80B46C50, // Night 1 Romani + EnInvadepoh_func_80B46C50, // Unknown Romani + EnInvadepoh_func_80B46C50, // Reward Romani + EnInvadepoh_func_80B46C94, // Dog + EnInvadepoh_func_80B46CC0, // Night 3 Cremia + EnInvadepoh_func_80B46CF4, // Night 3 Romani + EnInvadepoh_func_80B46D28, // Alien abductor + }; + + D_80B4ECE8[ENINVADEPOH_GET_PARAM_F0(thisx)](thisx, play); } void EnInvadepoh_func_80B46DA8(EnInvadepoh* this) { @@ -1565,11 +1715,14 @@ void EnInvadepoh_func_80B46E44(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_func_80B46EC0(EnInvadepoh* this) { D_80B4E940 = 2; - this->unk_2F0 = 0xA0; + this->unk_2F0 = 160; this->actionFunc = EnInvadepoh_func_80B46EE8; } void EnInvadepoh_func_80B46EE8(EnInvadepoh* this, PlayState* play) { + static s16 D_80B4ED20[8] = { + 130, 125, 115, 100, 80, 78, 76, 74, + }; s32 i; for (i = 0; i < 8; i++) { @@ -1580,7 +1733,7 @@ void EnInvadepoh_func_80B46EE8(EnInvadepoh* this, PlayState* play) { this->unk_2F0--; if (this->unk_2F0 <= 0) { ActorCutscene_Stop(D_80B50404[0]); - Audio_QueueSeqCmd(0x800D); + Audio_QueueSeqCmd(0x8000 | NA_BGM_ALIEN_INVASION); EnInvadepoh_func_80B46F88(this); } } @@ -1599,7 +1752,7 @@ void EnInvadepoh_func_80B46FA8(EnInvadepoh* this, PlayState* play) { s32 i; if ((gSaveContext.save.time < CLOCK_TIME(6, 00)) && (gSaveContext.save.time >= CLOCK_TIME(5, 15))) { - gSaveContext.save.weekEventReg[0x16] |= 1; + gSaveContext.save.weekEventReg[22] |= 1; EnInvadepoh_func_80B47064(this); } else { EnInvadepoh_func_80B457A0(this); @@ -1628,21 +1781,21 @@ void EnInvadepoh_func_80B47084(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_func_80B470E0(EnInvadepoh* this) { D_80B4E940 = 3; - this->unk_2F0 = 0x6E; + this->unk_2F0 = 110; this->actionFunc = EnInvadepoh_func_80B47108; } void EnInvadepoh_func_80B47108(EnInvadepoh* this, PlayState* play) { - if (this->unk_2F0 == 0x64) { - Audio_PlayFanfare(0x19); + if (this->unk_2F0 == 100) { + Audio_PlayFanfare(NA_BGM_CLEAR_EVENT); } this->unk_2F0--; if (this->unk_2F0 <= 0) { - play->nextEntrance = 0x6460; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 6); gSaveContext.nextCutsceneIndex = 0; - play->transitionTrigger = 0x14; - play->transitionType = 0x49; - gSaveContext.nextTransitionType = 0x48; + play->transitionTrigger = TRANS_TRIGGER_START; + play->transitionType = TRANS_TYPE_73; + gSaveContext.nextTransitionType = TRANS_TYPE_72; D_801BDAA0 = 1; D_801BDA9C = 0; EnInvadepoh_func_80B47248(this); @@ -1656,11 +1809,11 @@ void EnInvadepoh_func_80B471C0(EnInvadepoh* this) { void EnInvadepoh_func_80B471E0(EnInvadepoh* this, PlayState* play) { if (D_80B4E998 != 0) { - play->nextEntrance = 0x6470; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 7); gSaveContext.nextCutsceneIndex = 0; - play->transitionTrigger = 0x14; - play->transitionType = 0x48; - gSaveContext.nextTransitionType = 0x48; + play->transitionTrigger = TRANS_TRIGGER_START; + play->transitionType = TRANS_TYPE_72; + gSaveContext.nextTransitionType = TRANS_TYPE_72; EnInvadepoh_func_80B47248(this); } } @@ -1679,12 +1832,12 @@ void EnInvadepoh_func_80B47278(EnInvadepoh* this) { } void EnInvadepoh_func_80B47298(EnInvadepoh* this, PlayState* play) { - play->nextEntrance = 0x6400; - gSaveContext.nextCutsceneIndex = 0xFFF3; - play->transitionTrigger = 0x14; - play->transitionType = 0x48; - gSaveContext.nextTransitionType = 0x48; - gSaveContext.save.weekEventReg[0x59] |= 0x10; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 0); + gSaveContext.nextCutsceneIndex = 0xFFF3; + play->transitionTrigger = TRANS_TRIGGER_START; + play->transitionType = TRANS_TYPE_72; + gSaveContext.nextTransitionType = TRANS_TYPE_72; + gSaveContext.save.weekEventReg[89] |= 0x10; EnInvadepoh_func_80B47304(this); } @@ -1706,10 +1859,10 @@ void EnInvadepoh_Update(Actor* thisx, PlayState* play2) { } void EnInvadepoh_func_80B47380(EnInvadepoh* this) { - this->unk_2A0.base.atFlags &= ~1; - this->unk_2A0.base.acFlags &= ~1; - this->unk_2A0.base.ocFlags1 &= ~1; - this->actor.flags &= ~0x80000000; + this->unk_2A0.base.atFlags &= ~AT_ON; + this->unk_2A0.base.acFlags &= ~AC_ON; + this->unk_2A0.base.ocFlags1 &= ~OC1_ON; + this->actor.flags &= ~ACTOR_FLAG_80000000; this->unk_389 = 0; this->actor.draw = NULL; this->unk_38B = 0; @@ -1722,7 +1875,7 @@ void EnInvadepoh_func_80B473E4(EnInvadepoh* this, PlayState* play) { EnInvadepoh_func_80B442E4(this); EnInvadepoh_func_80B447C0(this, play); EnInvadepoh_func_80B43DD4(this, 0x320, 0); - if (D_80B50340[this->actor.params & 7] & 1) { + if (D_80B50340[ENINVADEPOH_GET_PARAM_7(&this->actor)] & 1) { Actor_SetScale(&this->actor, 0.01f); EnInvadepoh_func_80B4516C(this); EnInvadepoh_func_80B46118(&this->actor.world.pos); @@ -1731,10 +1884,10 @@ void EnInvadepoh_func_80B473E4(EnInvadepoh* this, PlayState* play) { } void EnInvadepoh_func_80B47478(EnInvadepoh* this) { - this->unk_2A0.base.atFlags &= ~1; - this->unk_2A0.base.acFlags &= ~1; - this->unk_2A0.base.ocFlags1 &= ~1; - this->actor.flags &= ~0x80000000; + this->unk_2A0.base.atFlags &= ~AT_ON; + this->unk_2A0.base.acFlags &= ~AC_ON; + this->unk_2A0.base.ocFlags1 &= ~OC1_ON; + this->actor.flags &= ~ACTOR_FLAG_80000000; this->unk_389 = 0; this->actor.draw = NULL; this->unk_38B = 0; @@ -1757,15 +1910,15 @@ void EnInvadepoh_func_80B474DC(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_func_80B47568(EnInvadepoh* this) { Animation_MorphToLoop(&this->skelAnime, &gAlienFloatAnim, -6.0f); - this->unk_2A0.base.atFlags &= ~1; - this->unk_2A0.base.acFlags &= ~1; - this->unk_2A0.base.ocFlags1 &= ~1; + this->unk_2A0.base.atFlags &= ~AT_ON; + this->unk_2A0.base.acFlags &= ~AC_ON; + this->unk_2A0.base.ocFlags1 &= ~OC1_ON; this->unk_389 = 0; this->actor.draw = EnInvadepoh_func_80B4DB14; this->unk_38B = 1; this->unk_38C = 0; this->unk_38D = 0; - this->actor.flags |= 0x80000000; + this->actor.flags |= ACTOR_FLAG_80000000; this->actionFunc = EnInvadepoh_func_80B47600; } @@ -1773,7 +1926,7 @@ void EnInvadepoh_func_80B47600(EnInvadepoh* this, PlayState* play) { EnInvadepoh_func_80B442E4(this); EnInvadepoh_func_80B447C0(this, play); EnInvadepoh_func_80B43DD4(this, 0x320, 0); - func_800B9010(&this->actor, 0x320A); + func_800B9010(&this->actor, NA_SE_EN_FOLLOWERS_BEAM_PRE - SFX_FLAG); if (this->unk_320 >= 0.9999f) { this->unk_38A = 1; } @@ -1783,9 +1936,9 @@ void EnInvadepoh_func_80B47600(EnInvadepoh* this, PlayState* play) { this->unk_389 += 6; } if (this->unk_389 > 128) { - this->unk_2A0.base.atFlags |= 1; - this->unk_2A0.base.acFlags |= 1; - this->unk_2A0.base.ocFlags1 |= 1; + this->unk_2A0.base.atFlags |= AT_ON; + this->unk_2A0.base.acFlags |= AC_ON; + this->unk_2A0.base.ocFlags1 |= OC1_ON; } if (this->unk_389 == 255) { if (this->unk_38D >= 245) { @@ -1801,15 +1954,15 @@ void EnInvadepoh_func_80B4770C(EnInvadepoh* this) { if (this->skelAnime.animation != &gAlienFloatAnim) { Animation_MorphToLoop(&this->skelAnime, &gAlienFloatAnim, -6.0f); } - this->unk_2A0.base.atFlags |= 1; - this->unk_2A0.base.acFlags |= 1; - this->unk_2A0.base.ocFlags1 |= 1; + this->unk_2A0.base.atFlags |= AT_ON; + this->unk_2A0.base.acFlags |= AC_ON; + this->unk_2A0.base.ocFlags1 |= OC1_ON; this->unk_389 = 0xFF; this->actor.draw = EnInvadepoh_func_80B4DB14; this->unk_38B = 1; this->unk_38C = 0; this->unk_38D = 0xFF; - this->actor.flags |= 0x80000000; + this->actor.flags |= ACTOR_FLAG_80000000; this->actionFunc = EnInvadepoh_func_80B477B4; } @@ -1817,16 +1970,16 @@ void EnInvadepoh_func_80B477B4(EnInvadepoh* this, PlayState* play) { EnInvadepoh_func_80B442E4(this); EnInvadepoh_func_80B447C0(this, play); EnInvadepoh_func_80B43DD4(this, 0x320, 0); - func_800B9010(&this->actor, 0x320A); + func_800B9010(&this->actor, NA_SE_EN_FOLLOWERS_BEAM_PRE - SFX_FLAG); if (this->unk_320 >= 0.9999f) { this->unk_38A = 1; } } void EnInvadepoh_func_80B47830(EnInvadepoh* this) { - this->unk_2A0.base.atFlags &= ~1; - this->unk_2A0.base.acFlags &= ~1; - this->unk_2A0.base.ocFlags1 |= 1; + this->unk_2A0.base.atFlags &= ~AT_ON; + this->unk_2A0.base.acFlags &= ~AC_ON; + this->unk_2A0.base.ocFlags1 |= OC1_ON; Animation_PlayLoop(&this->skelAnime, &gAlienJerkingAnim); Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x10); this->unk_389 = 0xFF; @@ -1836,7 +1989,7 @@ void EnInvadepoh_func_80B47830(EnInvadepoh* this) { this->unk_38D = 0; this->unk_2F0 = 8; this->unk_2F2 = 0; - this->actor.flags |= 0x80000000; + this->actor.flags |= ACTOR_FLAG_80000000; this->actionFunc = EnInvadepoh_func_80B478F4; } @@ -1849,22 +2002,31 @@ void EnInvadepoh_func_80B478F4(EnInvadepoh* this, PlayState* play) { } void EnInvadepoh_func_80B47938(EnInvadepoh* this) { - this->unk_2A0.base.atFlags &= ~1; - this->unk_2A0.base.acFlags &= ~1; - this->unk_2A0.base.ocFlags1 &= ~1; + this->unk_2A0.base.atFlags &= ~AT_ON; + this->unk_2A0.base.acFlags &= ~AC_ON; + this->unk_2A0.base.ocFlags1 &= ~OC1_ON; Animation_PlayLoop(&this->skelAnime, &gAlienDeathAnim); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_1; this->unk_2F0 = 0xA; this->unk_389 = 0xFF; this->actor.draw = EnInvadepoh_func_80B4DB14; this->unk_38B = 1; this->unk_38C = 0; this->unk_38D = 0xFF; - this->actor.flags |= 0x80000000; + this->actor.flags |= ACTOR_FLAG_80000000; this->actionFunc = EnInvadepoh_func_80B479E8; } void EnInvadepoh_func_80B479E8(EnInvadepoh* this, PlayState* play) { + static Vec3f D_80B4ED30[5] = { + { 0.01f, 0.01f, 0.01f }, { 0.02f, 0.01f, 0.005f }, { -0.01f, 0.0f, 0.0f }, + { 0.01f, 0.01f, 0.01f }, { 0.005f, 0.01f, 0.02f }, + }; + static Vec3f D_80B4ED6C[7] = { + { 0.0005f, 0.027999999f, 0.01f }, { -0.01f, 0.0f, 0.0f }, { -0.01f, 0.0f, 0.0f }, + { 0.016f, 0.0004f, 0.01f }, { -0.01f, 0.0f, 0.0f }, { 0.0005f, 0.0005f, 0.0005f }, + { 0.0002f, 0.0002f, 0.0002f }, + }; Vec3f* temp; EnInvadepoh_func_80B44B78(this); @@ -1895,15 +2057,15 @@ void EnInvadepoh_func_80B479E8(EnInvadepoh* this, PlayState* play) { } this->unk_2F2++; if (this->unk_2F0 == 8) { - Actor_Spawn(&play->actorCtx, play, 0xA2, this->actor.world.pos.x, this->actor.world.pos.y - 10.0f, - this->actor.world.pos.z, 0, 0, 3, 0xC8); + Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x, this->actor.world.pos.y - 10.0f, + this->actor.world.pos.z, 0, 0, 3, CLEAR_TAG_SMOKE); } if (this->unk_2F0 == 8) { Enemy_StartFinishingBlow(play, &this->actor); } this->unk_2F0--; if (this->unk_2F0 <= 0) { - EnInvadepoh_func_80B43AF0(this->actor.params & 7); + EnInvadepoh_func_80B43AF0(ENINVADEPOH_GET_PARAM_7(&this->actor)); EnInvadepoh_func_80B43AB0(); Item_DropCollectible(play, &this->actor.world.pos, 8); EnInvadepoh_func_80B47478(this); @@ -1919,8 +2081,8 @@ void EnInvadepoh_func_80B47BAC(Actor* thisx, PlayState* play2) { Actor_SetObjectDependency(play, &this->actor); EnInvadepoh_func_80B45080(); this->actor.update = EnInvadepoh_func_80B47D30; - SkelAnime_InitFlex(play, &this->skelAnime, &gAlienSkel, &gAlienFloatAnim, this->unk_188, this->unk_212, 14); - this->skelAnime.curFrame = (this->actor.params & 7) * this->skelAnime.endFrame / 8.0f; + SkelAnime_InitFlex(play, &this->skelAnime, &gAlienSkel, &gAlienFloatAnim, this->unk_188, this->unk_212, ALIEN_LIMB_MAX); + this->skelAnime.curFrame = (ENINVADEPOH_GET_PARAM_7(&this->actor)) * this->skelAnime.endFrame / 8.0f; EnInvadepoh_func_80B444BC(this, play); EnInvadepoh_func_80B442E4(this); EnInvadepoh_func_80B447C0(this, play); @@ -1954,7 +2116,7 @@ void EnInvadepoh_func_80B47D30(Actor* thisx, PlayState* play2) { Actor_MarkForDeath(thisx); return; } - } else if (this->unk_2A0.base.acFlags & 2) { + } else if (this->unk_2A0.base.acFlags & AC_HIT) { Actor* hitbox = this->unk_2A0.base.ac; thisx->speedXZ = hitbox->speedXZ * 0.5f; @@ -1966,7 +2128,7 @@ void EnInvadepoh_func_80B47D30(Actor* thisx, PlayState* play2) { thisx->velocity.y = hitbox->velocity.y * 0.5f; thisx->velocity.y = CLAMP(thisx->velocity.y, -30.0f, 30.0f); - SoundSource_PlaySfxAtFixedWorldPos(play, &thisx->world.pos, 50, 0x3A09); + SoundSource_PlaySfxAtFixedWorldPos(play, &thisx->world.pos, 50, NA_SE_EN_INVADER_DEAD); EnInvadepoh_func_80B47830(this); } @@ -1978,20 +2140,20 @@ void EnInvadepoh_func_80B47D30(Actor* thisx, PlayState* play2) { Collider_UpdateCylinder(thisx, &this->unk_2A0); - if (this->unk_2A0.base.atFlags & 1) { + if (this->unk_2A0.base.atFlags & AT_ON) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->unk_2A0.base); } else { - this->unk_2A0.base.atFlags &= ~2; + this->unk_2A0.base.atFlags &= ~AT_HIT; } - if (this->unk_2A0.base.acFlags & 1) { + if (this->unk_2A0.base.acFlags & AC_ON) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->unk_2A0.base); } else { - this->unk_2A0.base.acFlags &= ~2; + this->unk_2A0.base.acFlags &= ~AC_HIT; } - if (this->unk_2A0.base.ocFlags1 & 1) { + if (this->unk_2A0.base.ocFlags1 & OC1_ON) { CollisionCheck_SetOC(play, &play->colChkCtx, &this->unk_2A0.base); } else { - this->unk_2A0.base.ocFlags1 &= ~2; + this->unk_2A0.base.ocFlags1 &= ~OC1_HIT; } } @@ -2004,12 +2166,13 @@ void EnInvadepoh_func_80B47FA8(Actor* thisx, PlayState* play2) { Actor_SetObjectDependency(play, &this->actor); this->actor.update = EnInvadepoh_func_80B48060; this->actor.draw = EnInvadepoh_func_80B4E158; - SkelAnime_InitFlex(play, &this->skelAnime, &gCowSkel, NULL, this->unk_188, this->unk_212, 6); + SkelAnime_InitFlex(play, &this->skelAnime, &gCowSkel, NULL, this->unk_188, this->unk_212, COW_LIMB_MAX); Animation_PlayLoop(&this->skelAnime, &gCowMooAnim); } } void EnInvadepoh_func_80B48060(Actor* thisx, PlayState* play2) { + static s16 D_80B4EDC0[3] = { -0x1F40, -0x1770, -0x2AF8 }; PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; s32 sp6C; @@ -2018,7 +2181,7 @@ void EnInvadepoh_func_80B48060(Actor* thisx, PlayState* play2) { Actor_MarkForDeath(&this->actor); return; } - sp6C = this->actor.params & 7; + sp6C = ENINVADEPOH_GET_PARAM_7(&this->actor); SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.shape.rot.x, D_80B4EDC0[sp6C], 0x32); if (this->actor.child != NULL) { @@ -2047,7 +2210,7 @@ void EnInvadepoh_func_80B481C4(Actor* thisx, PlayState* play2) { Actor_SetObjectDependency(play, &this->actor); this->actor.update = EnInvadepoh_func_80B4827C; this->actor.draw = EnInvadepoh_func_80B4E1B0; - SkelAnime_InitFlex(play, &this->skelAnime, &gCowTailSkel, NULL, this->unk_188, this->unk_212, 6); + SkelAnime_InitFlex(play, &this->skelAnime, &gCowTailSkel, NULL, this->unk_188, this->unk_212, COW_TAIL_LIMB_MAX); Animation_PlayLoop(&this->skelAnime, &gCowTailSwishAnim); } } @@ -2073,7 +2236,7 @@ void EnInvadepoh_func_80B482D4(EnInvadepoh* this) { void EnInvadepoh_func_80B48324(EnInvadepoh* this, PlayState* play) { this->unk_2F0--; if (this->unk_2F0 <= 0) { - EnInvadepoh_func_80B4560C(this, play, 0x332F); + EnInvadepoh_func_80B4560C(this, play, 0x332F); // Romani's scream when abducted this->actor.draw = EnInvadepoh_func_80B4E324; EnInvadepoh_func_80B48374(this); } @@ -2163,7 +2326,7 @@ void EnInvadepoh_func_80B48620(Actor* thisx, PlayState* play2) { Actor_SetObjectDependency(play, &this->actor); EnInvadepoh_func_80B44F58(); this->actor.update = EnInvadepoh_func_80B4873C; - SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniIdleAnim, this->unk_188, this->unk_212, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniIdleAnim, this->unk_188, this->unk_212, ROMANI_LIMB_MAX); EnInvadepoh_func_80B45C04(&this->unk_324, D_80B4EA90, 6, D_80B4EB00, 2, &gZeroVec3s, 0x1388, 0.05f, 0.3f, 0.12f); Animation_PlayLoop(&this->skelAnime, &gRomaniIdleAnim); @@ -2189,6 +2352,7 @@ void EnInvadepoh_func_80B4873C(Actor* thisx, PlayState* play2) { } void EnInvadepoh_func_80B487B4(EnInvadepoh* this) { + static s16 D_80B4EDC8[4] = { -0x708, -0x3E8, 0, 0x7D0 }; EnInvadePohUnkStruct_324* temp_v1 = &this->unk_324; this->unk_2F0 = Rand_S16Offset(150, 250); @@ -2207,15 +2371,15 @@ void EnInvadepoh_func_80B48848(EnInvadepoh* this, PlayState* play) { Math_StepToF(&this->actor.speedXZ, 1.6f, 0.1f); if (EnInvadepoh_func_80B44B84(this, play, this->actor.speedXZ, 50.0f)) { EnInvadepoh_func_80B44514(this); - this->unk_370 = 200; + this->unk_370 = 0xC8; this->actor.speedXZ *= 0.25f; } else { Math_StepToS(&this->unk_370, 0x7D0, 0x46); } EnInvadepoh_func_80B43E6C(this, 6, this->unk_370, 0x46); - if (CHECK_FLAG_ALL(this->actor.flags, 0x40) && + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40) && (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 7.0f))) { - Actor_PlaySfxAtPos(&this->actor, 0x3ABE); + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ROMANI_WALK); } if (this->unk_2F0 > 0) { this->unk_2F0--; @@ -2356,8 +2520,8 @@ void EnInvadepoh_func_80B48FB0(Actor* thisx, PlayState* play2) { EnInvadepoh_func_80B44F58(); this->actor.update = EnInvadepoh_func_80B490F0; this->actor.draw = EnInvadepoh_func_80B4E324; - this->actor.textId = 0x3330; - SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniIdleAnim, this->unk_188, this->unk_212, 23); + this->actor.textId = 0x3330; // ........ + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniIdleAnim, this->unk_188, this->unk_212, ROMANI_LIMB_MAX); EnInvadepoh_func_80B45C04(&this->unk_324, D_80B4EA90, 6, D_80B4EB00, 2, &gZeroVec3s, 100, 0.03f, 0.3f, 0.03f); EnInvadepoh_func_80B444F4(this, play); EnInvadepoh_func_80B4407C(this, 0); @@ -2370,7 +2534,7 @@ void EnInvadepoh_func_80B48FB0(Actor* thisx, PlayState* play2) { void EnInvadepoh_func_80B490F0(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; - s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, 0x40); + s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 sp28 = Actor_ProcessTalkRequest(&this->actor, &play->state); if (sp28) { @@ -2406,7 +2570,7 @@ void EnInvadepoh_func_80B49228(EnInvadepoh* this, PlayState* play) { this->actor.velocity.y *= 0.97f; sp28 = Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + D_80B4E934.y + 300.0f, 0.7f, fabsf(this->actor.velocity.y), 1.0f); - func_800B9010(&this->actor, 0x217B); + func_800B9010(&this->actor, NA_SE_EV_UFO_APPEAR - SFX_FLAG); if (fabsf(sp28) < 1.0f) { EnInvadepoh_func_80B45EC8(this, play, 50); EnInvadepoh_func_80B492FC(this); @@ -2432,7 +2596,7 @@ void EnInvadepoh_func_80B4934C(EnInvadepoh* this, PlayState* play) { } this->actor.velocity.y *= 0.96f; Actor_MoveWithGravity(&this->actor); - func_800B9010(&this->actor, 0x217B); + func_800B9010(&this->actor, NA_SE_EV_UFO_APPEAR - SFX_FLAG); this->unk_2F0--; if (this->unk_2F0 <= 0) { EnInvadepoh_func_80B49404(this); @@ -2451,6 +2615,10 @@ void EnInvadepoh_func_80B49404(EnInvadepoh* this) { } void EnInvadepoh_func_80B49454(EnInvadepoh* this, PlayState* play) { + static Vec3f D_80B4EDD0[5] = { + { -1813.0f, 374.0f, 1900.0f }, { 2198.0f, 153.0f, 3365.0f }, { -1434.0f, 262.0f, 3365.0f }, + { -393.0f, 396.0f, 1084.0f }, { 0.0f, 1500.0f, 0.0f }, + }; s32 pad; Vec3f sp30; s32 pad2; @@ -2483,7 +2651,7 @@ void EnInvadepoh_func_80B49454(EnInvadepoh* this, PlayState* play) { this->actor.velocity.y += this->actor.gravity; this->actor.velocity.y *= 0.97f; this->actor.world.pos.y += this->actor.velocity.y; - func_800B9010(&this->actor, 0x217B); + func_800B9010(&this->actor, NA_SE_EV_UFO_APPEAR - SFX_FLAG); if (this->unk_2F0 > 0) { this->unk_2F0--; } else { @@ -2642,14 +2810,14 @@ void EnInvadepoh_func_80B49C38(EnInvadepoh* this, PlayState* play) { this->unk_378 = EnInvadepoh_func_80B45550(this, play, 6400.0f, temp_v0_2); } } - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); } else { this->unk_378 = 0; - this->actor.flags |= 9; + this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8); } - if (CHECK_FLAG_ALL(this->actor.flags, 0x40) && + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40) && (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 7.0f))) { - Actor_PlaySfxAtPos(&this->actor, 0x3ABE); + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ROMANI_WALK); } if (this->unk_320 >= 0.9999f) { Actor_MarkForDeath(&this->actor); @@ -2678,9 +2846,9 @@ void EnInvadepoh_func_80B49DFC(EnInvadepoh* this, PlayState* play) { temp_s0->unk_26.y = CLAMP((s16)(temp_v1 * 0.7f), -0x1F40, 0x1F40); if (Actor_TextboxIsClosing(&this->actor, play)) { - if (this->actor.textId == 0x332D) { - gSaveContext.save.weekEventReg[0x36] |= 0x10; - this->actor.textId = 0x332E; + if (this->actor.textId == 0x332D) { // It's almost time, Grasshopper... + gSaveContext.save.weekEventReg[54] |= 0x10; + this->actor.textId = 0x332E; // If you run out of arrows... } EnInvadepoh_func_80B49BD0(this); } @@ -2697,21 +2865,21 @@ void EnInvadepoh_func_80B49F88(Actor* thisx, PlayState* play2) { this->actor.objBankIndex = this->unk_2F4; Actor_SetObjectDependency(play, &this->actor); EnInvadepoh_func_80B44F58(); - SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->unk_188, this->unk_212, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->unk_188, this->unk_212, ROMANI_LIMB_MAX); EnInvadepoh_func_80B45C04(&this->unk_324, D_80B4EA90, 1, D_80B4EB00, 1, &gZeroVec3s, 0x64, 0.03f, 0.3f, 0.03f); EnInvadepoh_func_80B44540(this, play); EnInvadepoh_func_80B44570(this); EnInvadepoh_func_80B44C24(this, play); EnInvadepoh_func_80B43F0C(this); EnInvadepoh_func_80B4516C(this); - if (gSaveContext.save.weekEventReg[0x15] & 0x20) { - if (gSaveContext.save.weekEventReg[0x36] & 0x10) { - this->actor.textId = 0x332E; + if (gSaveContext.save.weekEventReg[21] & 0x20) { + if (gSaveContext.save.weekEventReg[54] & 0x10) { + this->actor.textId = 0x332E; // If you run out of arrows... } else { - this->actor.textId = 0x332D; + this->actor.textId = 0x332D; // It's almost time, Grasshopper... } } else { - this->actor.textId = 0x332C; + this->actor.textId = 0x332C; // ...It's almost time. } if ((sp38 >= CLOCK_TIME(18, 00)) || (sp38 < CLOCK_TIME(2, 00))) { this->actor.update = EnInvadepoh_func_80B4A168; @@ -2740,7 +2908,7 @@ void EnInvadepoh_func_80B4A168(Actor* thisx, PlayState* play2) { void EnInvadepoh_func_80B4A1B8(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; - s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, 0x40); + s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 sp28 = Actor_ProcessTalkRequest(&this->actor, &play->state); if (sp28) { @@ -2771,7 +2939,7 @@ void EnInvadepoh_func_80B4A2C0(EnInvadepoh* this) { this->unk_2F0 = Rand_S16Offset(200, 200); this->unk_304 = this->actor.shape.rot.y; - this->actor.flags |= 9; + this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8); this->actionFunc = EnInvadepoh_func_80B4A350; } @@ -2824,7 +2992,7 @@ void EnInvadepoh_func_80B4A570(EnInvadepoh* this) { temp_v0->unk_26.z = 0; temp_v0->unk_30 = 0.1f; temp_v0->unk_2C = 0x320; - this->actor.flags |= 9; + this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8); this->actionFunc = EnInvadepoh_func_80B4A5E4; } @@ -2862,14 +3030,14 @@ void EnInvadepoh_func_80B4A67C(EnInvadepoh* this, PlayState* play) { if (this->unk_378 == 0) { this->unk_378 = EnInvadepoh_func_80B45550(this, play, 6400.0f, -0xF); } - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); } else { this->unk_378 = 0; - this->actor.flags |= 9; + this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8); } - if (CHECK_FLAG_ALL(this->actor.flags, 0x40) && + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40) && (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 7.0f))) { - Actor_PlaySfxAtPos(&this->actor, 0x3ABE); + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ROMANI_WALK); } if (this->unk_309 == this->unk_308) { EnInvadepoh_func_80B4A2C0(this); @@ -2897,9 +3065,9 @@ void EnInvadepoh_func_80B4A81C(EnInvadepoh* this, PlayState* play) { temp_v1 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; temp_s0->unk_26.y = CLAMP((s16)(temp_v1 * 0.7f), -0x1F40, 0x1F40); if (Actor_TextboxIsClosing(&this->actor, play)) { - if (this->actor.textId == 0x332D) { - gSaveContext.save.weekEventReg[0x36] |= 0x10; - this->actor.textId = 0x332E; + if (this->actor.textId == 0x332D) { // It's almost time, Grasshopper + gSaveContext.save.weekEventReg[54] |= 0x10; + this->actor.textId = 0x332E; // If you run out of arrows... } if (this->unk_309 == this->unk_308) { EnInvadepoh_func_80B4A2C0(this); @@ -2920,7 +3088,7 @@ void EnInvadepoh_func_80B4A9C8(Actor* thisx, PlayState* play2) { this->actor.objBankIndex = this->unk_2F4; Actor_SetObjectDependency(play, &this->actor); EnInvadepoh_func_80B44F58(); - SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->unk_188, this->unk_212, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->unk_188, this->unk_212, ROMANI_LIMB_MAX); EnInvadepoh_func_80B45C04(&this->unk_324, D_80B4EA90, 1, D_80B4EB00, 1, &gZeroVec3s, 100, 0.03f, 0.3f, 0.03f); EnInvadepoh_func_80B44620(this, play2); if ((sp38 < CLOCK_TIME(2, 15)) || (sp38 >= CLOCK_TIME(6, 00))) { @@ -2936,14 +3104,14 @@ void EnInvadepoh_func_80B4A9C8(Actor* thisx, PlayState* play2) { EnInvadepoh_func_80B43F0C(this); func_800B4AEC(play, &this->actor, 50.0f); EnInvadepoh_func_80B4516C(this); - if (gSaveContext.save.weekEventReg[0x15] & 0x20) { - if (gSaveContext.save.weekEventReg[0x36] & 0x10) { - this->actor.textId = 0x332E; + if (gSaveContext.save.weekEventReg[21] & 0x20) { + if (gSaveContext.save.weekEventReg[54] & 0x10) { + this->actor.textId = 0x332E; // If you run out of arrows... } else { - this->actor.textId = 0x332D; + this->actor.textId = 0x332D; // It's almost time, Grasshopper... } } else { - this->actor.textId = 0x332C; + this->actor.textId = 0x332C; // ...It's almost time. } } } @@ -2962,7 +3130,7 @@ void EnInvadepoh_func_80B4AB8C(Actor* thisx, PlayState* play2) { void EnInvadepoh_func_80B4ABDC(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; - s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, 0x40); + s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 sp28 = Actor_ProcessTalkRequest(&this->actor, &play->state); if (sp28) { @@ -2986,21 +3154,21 @@ void EnInvadepoh_func_80B4ACDC(EnInvadepoh* this) { } void EnInvadepoh_func_80B4ACF0(EnInvadepoh* this, PlayState* play) { - if (gSaveContext.save.weekEventReg[0x16] & 1) { + if (gSaveContext.save.weekEventReg[22] & 1) { this->actor.draw = EnInvadepoh_func_80B4E324; - this->actor.flags |= 9; + this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8); EnInvadepoh_func_80B4AD3C(this); } } void EnInvadepoh_func_80B4AD3C(EnInvadepoh* this) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_10000; this->actionFunc = EnInvadepoh_func_80B4AD60; } void EnInvadepoh_func_80B4AD60(EnInvadepoh* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { - EnInvadepoh_func_80B4560C(this, play, 0x3331); + EnInvadepoh_func_80B4560C(this, play, 0x3331); // We did it...We won. EnInvadepoh_func_80B4ADB8(this); } else { func_800B8614(&this->actor, play, 2000.0f); @@ -3013,17 +3181,17 @@ void EnInvadepoh_func_80B4ADB8(EnInvadepoh* this) { void EnInvadepoh_func_80B4ADCC(EnInvadepoh* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == 5) && Message_ShouldAdvance(play)) { - if (this->unk_376 == 0x3331) { - if (gSaveContext.save.weekEventReg[0x16] & 2) { - EnInvadepoh_func_80B4560C(this, play, 0x3334); + if (this->unk_376 == 0x3331) { // We did it...We won. + if (gSaveContext.save.weekEventReg[22] & 2) { + EnInvadepoh_func_80B4560C(this, play, 0x3334); // I have to get back to bed... func_80151BB4(play, 0x1D); func_80151BB4(play, 5); } else { - EnInvadepoh_func_80B4560C(this, play, 0x3333); + EnInvadepoh_func_80B4560C(this, play, 0x3333); // Here's Romani's thanks } - } else if (this->unk_376 == 0x3333) { + } else if (this->unk_376 == 0x3333) { // Here's Romani's thanks EnInvadepoh_func_80B4AEC0(this); - } else if (this->unk_376 == 0x3334) { + } else if (this->unk_376 == 0x3334) { // I have to get back to bed... func_801477B4(play); EnInvadepoh_func_80B4B024(this); } @@ -3044,7 +3212,7 @@ void EnInvadepoh_func_80B4AEDC(EnInvadepoh* this, PlayState* play) { } if (Actor_HasParent(&this->actor, play)) { this->actor.parent = NULL; - gSaveContext.save.weekEventReg[0x16] |= 2; + gSaveContext.save.weekEventReg[22] |= 2; EnInvadepoh_func_80B4AF80(this); } else { Actor_PickUp(&this->actor, play, 0x60, 2000.0f, 2000.0f); @@ -3057,7 +3225,7 @@ void EnInvadepoh_func_80B4AF80(EnInvadepoh* this) { void EnInvadepoh_func_80B4AF94(EnInvadepoh* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { - EnInvadepoh_func_80B4560C(this, play, 0x3334); + EnInvadepoh_func_80B4560C(this, play, 0x3334); // I have to get back to bed.. func_80151BB4(play, 0x1E); func_80151BB4(play, 0x1D); func_80151BB4(play, 5); @@ -3068,7 +3236,7 @@ void EnInvadepoh_func_80B4AF94(EnInvadepoh* this, PlayState* play) { } void EnInvadepoh_func_80B4B024(EnInvadepoh* this) { - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); this->actionFunc = EnInvadepoh_func_80B4B048; } @@ -3092,7 +3260,7 @@ void EnInvadepoh_func_80B4B0C4(Actor* thisx, PlayState* play2) { Actor_SetObjectDependency(play, &this->actor); EnInvadepoh_func_80B44F58(); this->actor.update = EnInvadepoh_func_80B4B218; - SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->unk_188, this->unk_212, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->unk_188, this->unk_212, ROMANI_LIMB_MAX); Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, 0.0f); EnInvadepoh_func_80B45C04(&this->unk_324, D_80B4EA90, 1, D_80B4EB00, 3, &gZeroVec3s, 0x7D0, 0.08f, 0.3f, 0.03f); temp_s0->unk_30 = 0.08f; @@ -3107,7 +3275,7 @@ void EnInvadepoh_func_80B4B218(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; EnInvadePohUnkStruct_324* temp_s0 = &this->unk_324; - s32 sp38 = CHECK_FLAG_ALL(this->actor.flags, 0x40); + s32 sp38 = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); this->actionFunc(this, play); @@ -3134,7 +3302,7 @@ void EnInvadepoh_func_80B4B3DC(EnInvadepoh* this) { s32 pad; if (Animation_OnFrame(&this->skelAnime, 1.0f) || Animation_OnFrame(&this->skelAnime, 7.0f)) { - Actor_PlaySfxAtPos(&this->actor, 0x28EF); + Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_MONKEY_WALK); } } @@ -3193,7 +3361,7 @@ void EnInvadepoh_func_80B4B564(EnInvadepoh* this, PlayState* play) { this->unk_2F0--; } else if (this->unk_3BC >= 0) { if ((D_80B50348 == 0) && (Rand_ZeroOne() < 0.4f)) { - Actor_PlaySfxAtPos(&this->actor, 0x290B); + Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_GROAN); } EnInvadepoh_func_80B4B724(this); } else { @@ -3214,7 +3382,7 @@ void EnInvadepoh_func_80B4B768(EnInvadepoh* this, PlayState* play) { (s16)0x64); EnInvadepoh_func_80B44E90(this, play); if (Animation_OnFrame(&this->skelAnime, 13.0f) || Animation_OnFrame(&this->skelAnime, 19.0f)) { - Actor_PlaySfxAtPos(&this->actor, 0x2910); + Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SMALL_DOG_ANG_BARK); } if (this->unk_29C != 0) { EnInvadepoh_func_80B4B510(this); @@ -3241,7 +3409,7 @@ void EnInvadepoh_func_80B4B8BC(Actor* thisx, PlayState* play2) { if (Object_IsLoaded(&play->objectCtx, this->unk_2F4) && 1) { this->actor.objBankIndex = this->unk_2F4; Actor_SetObjectDependency(play, &this->actor); - SkelAnime_InitFlex(play, &this->skelAnime, &gDogSkel, &gDogWalkAnim, this->unk_188, this->unk_212, 13); + SkelAnime_InitFlex(play, &this->skelAnime, &gDogSkel, &gDogWalkAnim, this->unk_188, this->unk_212, DOG_LIMB_MAX); EnInvadepoh_func_80B45C04(&this->unk_324, NULL, 0, NULL, 0, &gZeroVec3s, 0xBB8, 0.1f, 0.0f, 0.0f); EnInvadepoh_func_80B44664(this, play); EnInvadepoh_func_80B4407C(this, 0); @@ -3251,7 +3419,7 @@ void EnInvadepoh_func_80B4B8BC(Actor* thisx, PlayState* play2) { if (D_80B4E940 == 2) { this->actor.update = EnInvadepoh_func_80B4BA84; this->actor.draw = EnInvadepoh_func_80B4E660; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_1; EnInvadepoh_func_80B4B430(this); } else if (D_80B4E940 == 1) { this->actor.update = EnInvadepoh_func_80B4BA30; @@ -3268,7 +3436,7 @@ void EnInvadepoh_func_80B4BA30(Actor* thisx, PlayState* play2) { if (D_80B4E940 == 2) { this->actor.update = EnInvadepoh_func_80B4BA84; this->actor.draw = EnInvadepoh_func_80B4E660; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_1; EnInvadepoh_func_80B4B430(this); } } @@ -3276,7 +3444,7 @@ void EnInvadepoh_func_80B4BA30(Actor* thisx, PlayState* play2) { void EnInvadepoh_func_80B4BA84(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; - s32 sp34 = CHECK_FLAG_ALL(this->actor.flags, 0x40); + s32 sp34 = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 temp; s32 sp2C; s32 temp_v1_2; @@ -3342,15 +3510,15 @@ void EnInvadepoh_func_80B4BC4C(EnInvadepoh* this, PlayState* play) { if (sp50->unk_309 == 0) { this->unk_2F8 = 40.0f; this->unk_304 = -0x8000; - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); } else if (sp50->unk_309 < (sp50->unk_308 - 1)) { this->unk_2F8 = 40.0f; Math_ScaledStepToS(&this->unk_304, -0x4800, 0xC8); - this->actor.flags |= 9; + this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8); } else { Math_StepToF(&this->unk_2F8, 5.0f, 3.0f); Math_ScaledStepToS(&this->unk_304, -0x8000, 0x12C); - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); } sp42 = this->unk_304 + sp50->actor.world.rot.y; this->actor.world.pos.x = (Math_SinS(sp42) * this->unk_2F8) + sp50->actor.world.pos.x; @@ -3379,11 +3547,11 @@ void EnInvadepoh_func_80B4BC4C(EnInvadepoh* this, PlayState* play) { } } - if (CHECK_FLAG_ALL(this->actor.flags, 0x40) && + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40) && (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 12.0f))) { - Actor_PlaySfxAtPos(&this->actor, 0x3ABE); + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ROMANI_WALK); } - if (gSaveContext.save.time >= 0xD801) { + if (gSaveContext.save.time > CLOCK_TIME(20, 15)) { Actor_MarkForDeath(&this->actor); } else if ((sp50 != NULL) && (sp50->actionFunc == EnInvadepoh_func_80B4CB0C)) { EnInvadepoh_func_80B4C1BC(this); @@ -3453,23 +3621,23 @@ void EnInvadepoh_func_80B4C3A0(Actor* thisx, PlayState* play2) { this->actor.objBankIndex = this->unk_2F4; Actor_SetObjectDependency(play, &this->actor); EnInvadepoh_func_80B44FEC(); - SkelAnime_InitFlex(play, &this->skelAnime, &gCremiaSkel, &gCremiaWalkAnim, this->unk_188, this->unk_212, 22); + SkelAnime_InitFlex(play, &this->skelAnime, &gCremiaSkel, &gCremiaWalkAnim, this->unk_188, this->unk_212, CREMIA_LIMB_MAX); EnInvadepoh_func_80B45C04(&this->unk_324, D_80B4EBDC, 1, D_80B4EC08, 0, &gZeroVec3s, 100, 0.03f, 0.3f, 0.03f); - this->actor.textId = 0x33CD; - if (sp38 < 0xD5A0) { + this->actor.textId = 0x33CD; // Good night... See you...tomorrow...OK? + if (sp38 < CLOCK_TIME(20, 01) + 30) { this->unk_304 = -0x8000; this->unk_2F8 = 40.0f; - } else if (sp38 >= 0xD7D4) { + } else if (sp38 > CLOCK_TIME(20, 14) + 1) { this->unk_304 = -0x4800; this->unk_2F8 = 20.0f; } else { this->unk_304 = -0x8000; this->unk_2F8 = 40.0f; } - if ((sp38 >= 0x4000) && (sp38 < 0xD573)) { + if ((CLOCK_TIME(6, 00) <= sp38) && (sp38 < CLOCK_TIME(20, 00) + 30)) { this->actor.update = EnInvadepoh_func_80B4C568; this->actor.draw = NULL; - } else if ((sp38 >= 0xD573) && (sp38 < 0xD800)) { + } else if ((CLOCK_TIME(20, 00) + 30 <= sp38) && (sp38 < CLOCK_TIME(20, 15))) { this->actor.update = EnInvadepoh_func_80B4C5C0; this->actor.draw = EnInvadepoh_func_80B4E7BC; EnInvadepoh_func_80B4BBE0(this); @@ -3483,7 +3651,7 @@ void EnInvadepoh_func_80B4C568(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; - if ((gSaveContext.save.time >= 0xD573) && (gSaveContext.save.time < 0xD800)) { + if ((gSaveContext.save.time >= CLOCK_TIME(20, 00) + 30) && (gSaveContext.save.time < CLOCK_TIME(20, 15))) { this->actor.update = EnInvadepoh_func_80B4C5C0; this->actor.draw = EnInvadepoh_func_80B4E7BC; EnInvadepoh_func_80B4BBE0(this); @@ -3493,7 +3661,7 @@ void EnInvadepoh_func_80B4C568(Actor* thisx, PlayState* play2) { void EnInvadepoh_func_80B4C5C0(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; - s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, 0x40); + s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 sp28 = Actor_ProcessTalkRequest(&this->actor, &play->state); if (sp28) { @@ -3552,10 +3720,10 @@ void EnInvadepoh_func_80B4C730(EnInvadepoh* this, PlayState* play) { this->unk_378 = EnInvadepoh_func_80B45550(this, play, 6400.0f, temp_v0_2); } } - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); } else { this->unk_378 = 0; - this->actor.flags |= 9; + this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8); } sp60 = play->gameplayFrames % 0x80; if (sp60 & 0x40) { @@ -3572,9 +3740,9 @@ void EnInvadepoh_func_80B4C730(EnInvadepoh* this, PlayState* play) { temp_v1 = sp3A - this->actor.shape.rot.y; temp_s0->unk_26.y = CLAMP((s16)(temp_v1 * 0.7f), -0x1F40, 0x1F40); } - if (CHECK_FLAG_ALL(this->actor.flags, 0x40) && + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40) && (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 7.0f))) { - Actor_PlaySfxAtPos(&this->actor, 0x3ABE); + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_ROMANI_WALK); } if (this->unk_320 >= 0.9999f) { Actor_MarkForDeath(&this->actor); @@ -3646,7 +3814,7 @@ void EnInvadepoh_func_80B4CE54(Actor* thisx, PlayState* play2) { this->actor.objBankIndex = this->unk_2F4; Actor_SetObjectDependency(play, &this->actor); EnInvadepoh_func_80B44F58(); - SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->unk_188, this->unk_212, 23); + SkelAnime_InitFlex(play, &this->skelAnime, &gRomaniSkel, &gRomaniWalkAnim, this->unk_188, this->unk_212, ROMANI_LIMB_MAX); EnInvadepoh_func_80B45C04(&this->unk_324, D_80B4EA90, 1, D_80B4EB00, 3, &gZeroVec3s, 100, 0.03f, 0.3f, 0.03f); EnInvadepoh_func_80B446D0(this, play); this->actor.world.rot.y = this->actor.shape.rot.y; @@ -3654,11 +3822,11 @@ void EnInvadepoh_func_80B4CE54(Actor* thisx, PlayState* play2) { EnInvadepoh_func_80B44EFC(this, play); EnInvadepoh_func_80B43F0C(this); EnInvadepoh_func_80B4516C(this); - this->actor.textId = 0x33CE; - if ((sp38 >= 0x4000) && (sp38 < 0xD555)) { + this->actor.textId = 0x33CE; // See you tomorrow! + if ((sp38 >= CLOCK_TIME(6, 00)) && (sp38 < CLOCK_TIME(20, 00))) { this->actor.update = EnInvadepoh_func_80B4CFFC; this->actor.draw = NULL; - } else if ((sp38 >= 0xD555) && (sp38 < 0xD7E1)) { + } else if ((sp38 >= CLOCK_TIME(20, 00)) && (sp38 < CLOCK_TIME(20, 14) + 15)) { this->actor.update = EnInvadepoh_func_80B4D054; this->actor.draw = EnInvadepoh_func_80B4E324; EnInvadepoh_func_80B4C6C8(this); @@ -3672,7 +3840,7 @@ void EnInvadepoh_func_80B4CFFC(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; - if ((gSaveContext.save.time >= 0xD555) && (gSaveContext.save.time < 0xD7E1)) { + if ((gSaveContext.save.time >= CLOCK_TIME(20, 00)) && (gSaveContext.save.time < CLOCK_TIME(20, 14) + 15)) { this->actor.update = EnInvadepoh_func_80B4D054; this->actor.draw = EnInvadepoh_func_80B4E324; EnInvadepoh_func_80B4C6C8(this); @@ -3682,7 +3850,7 @@ void EnInvadepoh_func_80B4CFFC(Actor* thisx, PlayState* play2) { void EnInvadepoh_func_80B4D054(Actor* thisx, PlayState* play2) { PlayState* play = play2; EnInvadepoh* this = (EnInvadepoh*)thisx; - s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, 0x40); + s32 sp2C = CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_40); s32 sp28 = Actor_ProcessTalkRequest(&this->actor, &play->state); if (sp28 != 0) { @@ -3702,12 +3870,17 @@ void EnInvadepoh_func_80B4D054(Actor* thisx, PlayState* play2) { } void EnInvadepoh_func_80B4D15C(EnInvadepoh* this) { + static EnInvadepohUnkStruct1 D_80B4EE0C[3] = { + { 0.08f, 0x2BC, -0xA }, + { 0.09f, 0x12C, -5 }, + { 0.05f, 0x190, 0 }, + }; s32 pad; - s32 sp28 = this->actor.params & 7; + s32 sp28 = ENINVADEPOH_GET_PARAM_7(&this->actor); s32 pad2; Animation_PlayLoop(&this->skelAnime, &gAlienHoldingCowAnim); - this->skelAnime.curFrame = (this->actor.params & 7) * this->skelAnime.endFrame * 0.25f; + this->skelAnime.curFrame = (ENINVADEPOH_GET_PARAM_7(&this->actor)) * this->skelAnime.endFrame * 0.25f; this->unk_389 = 0xFF; this->actor.draw = EnInvadepoh_func_80B4DB14; this->unk_38B = 1; @@ -3756,7 +3929,7 @@ void EnInvadepoh_func_80B4D290(EnInvadepoh* this, PlayState* play) { void EnInvadepoh_func_80B4D3E4(EnInvadepoh* this) { Animation_PlayLoop(&this->skelAnime, &gAlienHoldingCowAnim); - this->skelAnime.curFrame = (this->actor.params & 7) * this->skelAnime.endFrame * 0.25f; + this->skelAnime.curFrame = (ENINVADEPOH_GET_PARAM_7(&this->actor)) * this->skelAnime.endFrame * 0.25f; this->unk_389 = 0xFF; this->actor.draw = NULL; this->unk_38B = 1; @@ -3823,13 +3996,13 @@ void EnInvadepoh_func_80B4D670(Actor* thisx, PlayState* play2) { s32 sp34; if (Object_IsLoaded(&play->objectCtx, this->unk_2F4)) { - sp34 = this->actor.params & 7; + sp34 = ENINVADEPOH_GET_PARAM_7(&this->actor); this->actor.objBankIndex = this->unk_2F4; Actor_SetObjectDependency(play, &this->actor); EnInvadepoh_func_80B45080(); this->actor.update = EnInvadepoh_func_80B4D760; SkelAnime_InitFlex(play, &this->skelAnime, &gAlienSkel, &gAlienHoldingCowAnim, this->unk_188, this->unk_212, - 14); + ALIEN_LIMB_MAX); if (sp34 < 3) { EnInvadepoh_func_80B453F4(this, play, sp34); EnInvadepoh_func_80B4D15C(this); @@ -3848,27 +4021,27 @@ void EnInvadepoh_func_80B4D760(Actor* thisx, PlayState* play2) { if (this->actor.update != NULL) { SkelAnime_Update(&this->skelAnime); - func_800B9010(&this->actor, 0x320A); + func_800B9010(&this->actor, NA_SE_EN_FOLLOWERS_BEAM_PRE - SFX_FLAG); } } void EnInvadepoh_func_80B4D7B8(PlayState* play) { s32 i; - EnInvadepohStructD_80B50350* var_s2; + EnInvadepohWarpEffect* warpEffect; OPEN_DISPS(play->state.gfxCtx); func_8012C2DC(play->state.gfxCtx); - for (i = 0, var_s2 = D_80B50350; i < 10; i++, var_s2++) { - if (var_s2->unk_1 > 0) { + for (i = 0, warpEffect = D_80B50350; i < 10; i++, warpEffect++) { + if (warpEffect->timer > 0) { u32 temp_s5 = (play->gameplayFrames + (u8)(i * 0x10)) % 0x80; u32 temp_s6 = (play->gameplayFrames * -0xF) % 0x100; - Matrix_Translate(var_s2->unk_4.x, var_s2->unk_4.y, var_s2->unk_4.z, MTXMODE_NEW); + Matrix_Translate(warpEffect->pos.x, warpEffect->pos.y, warpEffect->pos.z, MTXMODE_NEW); Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY); gDPPipeSync(POLY_XLU_DISP++); - gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, var_s2->unk_2); + gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 170, warpEffect->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 255, 50, 0, 0); gSPSegment(POLY_XLU_DISP++, 0x8, Gfx_TwoTexScroll(play->state.gfxCtx, 0, temp_s5, 0, 0x20, 0x40, 1, 0, temp_s6, 0x20, 0x40)); @@ -3885,10 +4058,11 @@ void EnInvadepoh_func_80B4D9B4(Actor* thisx, PlayState* play) { s32 EnInvadepoh_func_80B4D9D8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx, Gfx** gfx) { - return 0; + return false; } void EnInvadepoh_func_80B4D9F4(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx, Gfx** gfx) { + static Vec3f D_80B4EE24 = { 2000.0f, 1000.0f, 0.0f }; EnInvadepoh* this = (EnInvadepoh*)thisx; if ((limbIndex == 12) && (this->unk_38D != 0)) { @@ -4004,7 +4178,7 @@ s32 EnInvadepoh_func_80B4E120(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f if (limbIndex == 5) { rot->x -= this->actor.shape.rot.x; } - return 0; + return false; } void EnInvadepoh_func_80B4E158(Actor* thisx, PlayState* play2) { @@ -4026,22 +4200,23 @@ void EnInvadepoh_func_80B4E1B0(Actor* thisx, PlayState* play2) { } s32 EnInvadepoh_func_80B4E200(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - if (limbIndex == 14) { + if (limbIndex == ROMANI_LIMB_HEAD) { EnInvadepoh* this = ((EnInvadepoh*)thisx); rot->x += this->unk_324.unk_20.y; rot->y += this->unk_324.unk_20.z; rot->z += this->unk_324.unk_20.x; - } else if (limbIndex == 13) { + } else if (limbIndex == ROMANI_LIMB_TORSO) { EnInvadepoh* this = ((EnInvadepoh*)thisx); rot->x += (s16)(this->unk_324.unk_34 * this->unk_324.unk_20.y); rot->z += this->unk_324.unk_40; } - return 0; + return false; } void EnInvadepoh_func_80B4E2AC(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx) { + static Vec3f D_80B4EE30 = { 400.0f, 270.0f, 0.0f }; EnInvadepoh* this = (EnInvadepoh*)thisx; if (limbIndex == 19) { @@ -4058,8 +4233,8 @@ void EnInvadepoh_func_80B4E324(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); func_8012C28C(play->state.gfxCtx); - gSPSegment(POLY_OPA_DISP++, 0x09, sRomaniMouthTextures[this->unk_324.unk_10.unk_F]); - gSPSegment(POLY_OPA_DISP++, 0x08, sRomaniEyeTextures[this->unk_324.unk_00.unk_F]); + gSPSegment(POLY_OPA_DISP++, 0x09, sRomaniMouthTextures[this->unk_324.mouthAnim.curIndex]); + gSPSegment(POLY_OPA_DISP++, 0x08, sRomaniEyeTextures[this->unk_324.eyeAnim.curIndex]); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnInvadepoh_func_80B4E200, EnInvadepoh_func_80B4E2AC, &this->actor); CLOSE_DISPS(play->state.gfxCtx); @@ -4095,14 +4270,14 @@ void EnInvadepoh_func_80B4E3F0(Actor* thisx, PlayState* play2) { } s32 EnInvadepoh_func_80B4E5B0(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - if ((limbIndex == 5) || (limbIndex == 6) || (limbIndex == 7)) { + if ((limbIndex == DOG_LIMB_HEAD) || (limbIndex == DOG_LIMB_RIGHT_FACE_HAIR) || (limbIndex == DOG_LIMB_LEFT_FACE_HAIR)) { EnInvadepoh* this = (EnInvadepoh*)thisx; rot->x += this->unk_324.unk_20.x; rot->y += this->unk_324.unk_20.y; rot->z += this->unk_324.unk_20.z; } - return 0; + return false; } void EnInvadepoh_func_80B4E61C(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx) { @@ -4125,18 +4300,18 @@ void EnInvadepoh_func_80B4E660(Actor* thisx, PlayState* play) { } s32 EnInvadepoh_func_80B4E6E4(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { - if (limbIndex == 9) { + if (limbIndex == CREMIA_LIMB_HEAD) { EnInvadepoh* this = (EnInvadepoh*)thisx; rot->x += this->unk_324.unk_20.y; rot->y += this->unk_324.unk_20.z; rot->z += this->unk_324.unk_20.x; - } else if (limbIndex == 2) { + } else if (limbIndex == CREMIA_LIMB_TORSO) { EnInvadepoh* this = (EnInvadepoh*)thisx; rot->x += (s16)(this->unk_324.unk_34 * this->unk_324.unk_20.y); } - return 0; + return false; } void EnInvadepoh_func_80B4E784(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* pos, Actor* thisx) { @@ -4152,8 +4327,8 @@ void EnInvadepoh_func_80B4E7BC(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx); func_8012C28C(play->state.gfxCtx); - gSPSegment(POLY_OPA_DISP++, 0x09, sCremiaMouthTextures[this->unk_324.unk_10.unk_F]); - gSPSegment(POLY_OPA_DISP++, 0x08, sCremiaEyeTextures[this->unk_324.unk_00.unk_F]); + gSPSegment(POLY_OPA_DISP++, 0x09, sCremiaMouthTextures[this->unk_324.mouthAnim.curIndex]); + gSPSegment(POLY_OPA_DISP++, 0x08, sCremiaEyeTextures[this->unk_324.eyeAnim.curIndex]); SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnInvadepoh_func_80B4E6E4, EnInvadepoh_func_80B4E784, &this->actor); CLOSE_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.h b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.h index 18d7d8809..efb6c611e 100644 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.h +++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.h @@ -2,10 +2,16 @@ #define Z_EN_INVADEPOH_H #include "global.h" +#include "assets/objects/object_uch/object_uch.h" +#include "assets/objects/object_ma1/object_ma1.h" +#include "assets/objects/object_ma2/object_ma2.h" +#include "assets/objects/object_cow/object_cow.h" +#include "assets/objects/object_dog/object_dog.h" struct EnInvadepoh; typedef void (*EnInvadepohActionFunc)(struct EnInvadepoh* this, PlayState* play); +typedef void (*EnInvadepohMainFunc)(Actor* thisx, PlayState* play); // PlayState, not GameState typedef struct { f32 unk0; @@ -13,62 +19,52 @@ typedef struct { s16 unk6; } EnInvadepohUnkStruct1; -typedef struct { - s8* unk0; - s8 unk4; -} EnInvadepohUnkStruct2; - -typedef struct { - s8 unk0; - EnInvadepohUnkStruct2* unk4; -} EnInvadepohUnkStruct3; - -typedef struct { - s8 unk0; - f32 unk4; -} EnInvadepohUnkStruct4; - -typedef struct { - s8 unk0; - EnInvadepohUnkStruct2* unk4; - s8 unk8; - EnInvadepohUnkStruct4* unkC; -} EnInvadepohUnkStruct5; - -typedef struct { - s8 unk0; - EnInvadepohUnkStruct2* unk4; - s8 unk8; - EnInvadepohUnkStruct4* unkC; - s16 unk10; - s16 unk12; -} EnInvadepohUnkStruct6; - -typedef union { - EnInvadepohUnkStruct3 unk3; - EnInvadepohUnkStruct5 unk5; - EnInvadepohUnkStruct6 unk6; -} EnInvadepohUnkUnion; - typedef struct { s8 unk_0; - s8 unk_1; - u8 unk_2; - Vec3f unk_4; -} EnInvadepohStructD_80B50350; + s8 timer; + u8 alpha; + Vec3f pos; +} EnInvadepohWarpEffect; typedef struct { - EnInvadepohUnkUnion** unk_0; - s8 unk_4; - EnInvadepohUnkUnion* unk_8; - s16 unk_C; - s8 unk_E; - s8 unk_F; -} EnInvadePohUnkStruct_324_1; + s8* index; + s8 count; +} EnInvadepohFaceFrame; typedef struct { - EnInvadePohUnkStruct_324_1 unk_00; - EnInvadePohUnkStruct_324_1 unk_10; + s8 type; + EnInvadepohFaceFrame* frames; +} EnInvadepohFaceAnim; + +typedef struct { + s8 index; + f32 chance; +} EnInvadepohFaceAnimNext; + +typedef struct { + EnInvadepohFaceAnim anim; + s8 nextCount; + EnInvadepohFaceAnimNext* nextAnims; +} EnInvadepohFaceAnimLoop; + +typedef struct { + EnInvadepohFaceAnimLoop loop; + s16 minDelay; + s16 maxDelay; +} EnInvadepohFaceAnimLoopDelayed; + +typedef struct { + EnInvadepohFaceAnim** animSet; + s8 curAnimType; + EnInvadepohFaceAnim* curAnim; + s16 delayTimer; + s8 curFrame; + s8 curIndex; +} EnInvadePohFaceInfo; + +typedef struct { + EnInvadePohFaceInfo eyeAnim; + EnInvadePohFaceInfo mouthAnim; Vec3s unk_20; Vec3s unk_26; s16 unk_2C; @@ -82,13 +78,16 @@ typedef struct { s16 unk_48; } EnInvadePohUnkStruct_324; -typedef void (*EnInvadepohUnkFunc) (EnInvadePohUnkStruct_324_1*, EnInvadepohUnkUnion**); +typedef void (*EnInvadepohFaceFunc) (EnInvadePohFaceInfo*, EnInvadepohFaceAnim**); + +#define EN_INVADEPOH_LIMB_MAX 23 +// #define EN_INVADEPOH_LIMB_MAX MAX(MAX(MAX(MAX(MAX(ALIEN_LIMB_MAX, ROMANI_LIMB_MAX), CREMIA_LIMB_MAX), DOG_LIMB_MAX), COW_LIMB_MAX), COW_TAIL_LIMB_MAX) typedef struct EnInvadepoh { /* 0x000 */ Actor actor; /* 0x144 */ SkelAnime skelAnime; - /* 0x188 */ Vec3s unk_188[23]; - /* 0x212 */ Vec3s unk_212[23]; + /* 0x188 */ Vec3s unk_188[EN_INVADEPOH_LIMB_MAX]; + /* 0x212 */ Vec3s unk_212[EN_INVADEPOH_LIMB_MAX]; /* 0x29C */ s8 unk_29C; /* 0x2A0 */ ColliderCylinder unk_2A0; /* 0x2EC */ EnInvadepohActionFunc actionFunc; @@ -133,6 +132,30 @@ typedef struct EnInvadepoh { /* 0x3BC */ s8 unk_3BC; } EnInvadepoh; // size = 0x3C0 +typedef enum { + ENINVADEPOH_HANDLER, // Invasion event handler + ENINVADEPOH_ALIEN_INVADER, // Alien invader + ENINVADEPOH_COW, // Abudcted cow, spawned by unused alien abductor + ENINVADEPOH_COW_TAIL, // Abducted cow tail, spawned by abducted cow + ENINVADEPOH_ROMANI_ABDUCTED, // Abducted Romani, spawned by unused alien abductor + ENINVADEPOH_ROMANI_CONFUSED, // Returned, confused Romani + ENINVADEPOH_LIGHT_BALL, // Light ball spaceship + ENINVADEPOH_ROMANI_NIGHT_1, // Romani running to barn on night 1 + ENINVADEPOH_ROMANI_UNKNOWN, // Unknown, possible duplicate of previous + ENINVADEPOH_ROMANI_REWARD, // Romani rewarding you for defeating invasion + ENINVADEPOH_DOG, // Dog during alien invasion + ENINVADEPOH_CREMIA_NIGHT_3, // Cremia walking from barn to house on night 3 + ENINVADEPOH_ROMANI_NIGHT_3, // Romnani walking from barn to house on night 3 + ENINVADEPOH_ALIEN_ABDUCTOR, // Alien abductor, unused, carries cow or Romani +} EnInvadepohParamsTypes; + +#define ENINVADEPOH_GET_PARAM_7(thisx) ((thisx)->params & 7) +#define ENINVADEPOH_GET_PARAM_F0(thisx) ((thisx)->params >> 4 & 0xF) +#define ENINVADEPOH_GET_PARAM_7F00(thisx) ((thisx)->params >> 8 & 0x7F) + +#define ENINVADEPOH_SET_PARAMS(p7F00, pF0, p7) (((p7) & 7) | (((p7F00) << 8) & 0x7F00) | (((pF0) << 4) & 0xF0)) + + extern ActorInit En_Invadepoh_InitVars; #endif // Z_EN_INVADEPOH_H diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh_data.inc.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh_data.inc.c deleted file mode 100644 index 5545668c8..000000000 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh_data.inc.c +++ /dev/null @@ -1,299 +0,0 @@ -#include "global.h" -#include "z_en_invadepoh.h" -#include "assets/objects/object_ma1/object_ma1.h" -#include "assets/objects/object_ma2/object_ma2.h" - -void EnInvadepoh_func_80B4627C(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46414(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46520(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B465CC(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46644(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B468B4(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B469C4(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46A80(Actor* thisx, PlayState* play); - -void EnInvadepoh_func_80B46BB0(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46BC0(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46C08(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46C34(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46C7C(Actor* thisx, PlayState* play); -void EnInvadepoh_func_80B46C50(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46C94(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46CC0(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46CF4(Actor* thisx, PlayState* play2); -void EnInvadepoh_func_80B46D28(Actor* thisx, PlayState* play2); - -void EnInvadepoh_func_80B45A4C(EnInvadePohUnkStruct_324_1*, EnInvadepohUnkUnion**); -void EnInvadepoh_func_80B45A94(EnInvadePohUnkStruct_324_1*, EnInvadepohUnkUnion**); -void EnInvadepoh_func_80B45B1C(EnInvadePohUnkStruct_324_1*, EnInvadepohUnkUnion**); - -void EnInvadepoh_func_80B46184(EnInvadepohStructD_80B50350* arg0); - -ColliderCylinderInit D_80B4E8B0 = { - { - COLTYPE_HIT3, - AT_ON | AT_TYPE_ENEMY, - AC_ON | AC_TYPE_PLAYER, - OC1_ON | OC1_TYPE_ALL, - OC2_TYPE_1, - COLSHAPE_CYLINDER, - }, - { - ELEMTYPE_UNK4, - { 0xF7CFFFFF, 0x00, 0x04 }, - { 0x00003820, 0x00, 0x00 }, - TOUCH_ON | TOUCH_SFX_NONE, - BUMP_ON, - OCELEM_ON, - }, - { 40, 95, 10, { 0, 0, 0 } }, -}; -ColliderCylinderInit D_80B4E8DC = { - { - COLTYPE_NONE, - AT_NONE, - AC_NONE, - OC1_ON | OC1_TYPE_ALL, - OC2_TYPE_2, - COLSHAPE_CYLINDER, - }, - { - ELEMTYPE_UNK0, - { 0x00000000, 0x00, 0x00 }, - { 0x00000000, 0x00, 0x00 }, - TOUCH_NONE | TOUCH_SFX_NORMAL, - BUMP_NONE, - OCELEM_ON, - }, - { 18, 46, 0, { 0, 0, 0 } }, -}; -ColliderCylinderInit D_80B4E908 = { - { - COLTYPE_NONE, - AT_NONE, - AC_NONE, - OC1_ON | OC1_TYPE_ALL, - OC2_TYPE_1, - COLSHAPE_CYLINDER, - }, - { - ELEMTYPE_UNK1, - { 0x00000000, 0x00, 0x00 }, - { 0x00000000, 0x00, 0x00 }, - TOUCH_NONE | TOUCH_SFX_NORMAL, - BUMP_NONE, - OCELEM_ON, - }, - { 13, 19, 0, { 0, 0, 0 } }, -}; -Vec3f D_80B4E934 = { 216.0f, -20.0f, 1395.0f }; -s32 D_80B4E940 = 0; -TexturePtr sRomaniEyeTextures[5] = { - gRomaniEyeOpenTex, gRomaniEyeHalfTex, gRomaniEyeClosedTex, gRomaniEyeHappyTex, gRomaniEyeSadTex, -}; -TexturePtr sRomaniMouthTextures[4] = { - gRomaniMouthHappyTex, - gRomaniMouthFrownTex, - gRomaniMouthHangingOpenTex, - gRomaniMouthSmileTex, -}; -s8 D_80B4E968 = 0; -TexturePtr sCremiaEyeTextures[6] = { - gCremiaEyeOpenTex, gCremiaEyeHalfTex, gCremiaEyeClosedTex, gCremiaEyeHappyTex, gCremiaEyeAngryTex, gCremiaEyeSadTex, -}; -TexturePtr sCremiaMouthTextures[4] = { - gCremiaMouthNormalTex, - gCremiaMouthSlightSmileTex, - gCremiaMouthFrownTex, - gCremiaMouthHangingOpenTex, -}; -s8 D_80B4E994 = 0; -s8 D_80B4E998 = 0; -s8 D_80B4E99C[1] = { 0 }; -s8 D_80B4E9A0[4] = { 0, 1, 2, 0 }; -s8 D_80B4E9A4[5] = { 0, 1, 2, 1, 0 }; -s8 D_80B4E9AC[6] = { 0, 1, 2, 2, 1, 0 }; -s8 D_80B4E9B4[8] = { 0, 1, 2, 1, 0, 1, 2, 0 }; -s8 D_80B4E9BC[1] = { 1 }; -s8 D_80B4E9C0[1] = { 3 }; -EnInvadepohUnkStruct2 D_80B4E9C4 = { D_80B4E99C, 1 }; -EnInvadepohUnkStruct2 D_80B4E9CC = { D_80B4E9A0, 4 }; -EnInvadepohUnkStruct2 D_80B4E9D4 = { D_80B4E9A4, 5 }; -EnInvadepohUnkStruct2 D_80B4E9DC = { D_80B4E9AC, 6 }; -EnInvadepohUnkStruct2 D_80B4E9E4 = { D_80B4E9B4, 8 }; -EnInvadepohUnkStruct2 D_80B4E9EC = { D_80B4E9BC, 1 }; -EnInvadepohUnkStruct2 D_80B4E9F4 = { D_80B4E9C0, 1 }; -EnInvadepohUnkStruct3 D_80B4E9FC = { 0, &D_80B4E9C4 }; -EnInvadepohUnkStruct4 D_80B4EA04[4] = { - { 2, 0.5f }, - { 3, 0.9f }, - { 4, 0.97f }, - { 5, 1.0f }, -}; -EnInvadepohUnkStruct4 D_80B4EA24[1] = { 1, 1.0f }; -EnInvadepohUnkStruct6 D_80B4EA2C = { 2, &D_80B4E9C4, 4, D_80B4EA04, 40, 60 }; -EnInvadepohUnkStruct5 D_80B4EA40 = { 1, &D_80B4E9CC, 1, D_80B4EA24 }; -EnInvadepohUnkStruct5 D_80B4EA50 = { 1, &D_80B4E9D4, 1, D_80B4EA24 }; -EnInvadepohUnkStruct5 D_80B4EA60 = { 1, &D_80B4E9DC, 1, D_80B4EA24 }; -EnInvadepohUnkStruct5 D_80B4EA70 = { 1, &D_80B4E9E4, 1, D_80B4EA24 }; -EnInvadepohUnkStruct3 D_80B4EA80 = { 0, &D_80B4E9EC }; -EnInvadepohUnkStruct3 D_80B4EA88 = { 0, &D_80B4E9F4 }; -EnInvadepohUnkUnion* D_80B4EA90[8] = { - (EnInvadepohUnkUnion*)&D_80B4E9FC, (EnInvadepohUnkUnion*)&D_80B4EA2C, (EnInvadepohUnkUnion*)&D_80B4EA40, - (EnInvadepohUnkUnion*)&D_80B4EA50, (EnInvadepohUnkUnion*)&D_80B4EA60, (EnInvadepohUnkUnion*)&D_80B4EA70, - (EnInvadepohUnkUnion*)&D_80B4EA80, (EnInvadepohUnkUnion*)&D_80B4EA88, -}; -s8 D_80B4EAB0[1] = { 0 }; -s8 D_80B4EAB4[1] = { 1 }; -s8 D_80B4EAB8[1] = { 2 }; -s8 D_80B4EABC[1] = { 3 }; -EnInvadepohUnkStruct2 D_80B4EAC0 = { D_80B4EAB0, 1 }; -EnInvadepohUnkStruct2 D_80B4EAC8 = { D_80B4EAB4, 1 }; -EnInvadepohUnkStruct2 D_80B4EAD0 = { D_80B4EAB8, 1 }; -EnInvadepohUnkStruct2 D_80B4EAD8 = { D_80B4EABC, 1 }; -EnInvadepohUnkStruct3 D_80B4EAE0 = { 0, &D_80B4EAC0 }; -EnInvadepohUnkStruct3 D_80B4EAE8 = { 0, &D_80B4EAC8 }; -EnInvadepohUnkStruct3 D_80B4EAF0 = { 0, &D_80B4EAD0 }; -EnInvadepohUnkStruct3 D_80B4EAF8 = { 0, &D_80B4EAD8 }; -EnInvadepohUnkUnion* D_80B4EB00[4] = { - (EnInvadepohUnkUnion*)&D_80B4EAE0, - (EnInvadepohUnkUnion*)&D_80B4EAE8, - (EnInvadepohUnkUnion*)&D_80B4EAF0, - (EnInvadepohUnkUnion*)&D_80B4EAF8, -}; -s8 D_80B4EB10[1] = { 0 }; -s8 D_80B4EB14[4] = { 0, 1, 2, 0 }; -s8 D_80B4EB18[5] = { 0, 1, 2, 1, 0 }; -s8 D_80B4EB20[6] = { 0, 1, 2, 2, 1, 0 }; -s8 D_80B4EB28[8] = { 0, 1, 2, 1, 0, 1, 2, 0 }; -EnInvadepohUnkStruct2 D_80B4EB30 = { D_80B4EB10, 1 }; -EnInvadepohUnkStruct2 D_80B4EB38 = { D_80B4EB14, 4 }; -EnInvadepohUnkStruct2 D_80B4EB40 = { D_80B4EB18, 5 }; -EnInvadepohUnkStruct2 D_80B4EB48 = { D_80B4EB20, 6 }; -EnInvadepohUnkStruct2 D_80B4EB50 = { D_80B4EB28, 8 }; -EnInvadepohUnkStruct3 D_80B4EB58 = { 0, &D_80B4EB30 }; -EnInvadepohUnkStruct4 D_80B4EB60[4] = { - { 2, 0.5f }, - { 3, 0.9f }, - { 4, 0.95f }, - { 5, 1.0f }, -}; -EnInvadepohUnkStruct4 D_80B4EB80[1] = { 1, 1.0f }; -EnInvadepohUnkStruct6 D_80B4EB88 = { 2, &D_80B4EB30, 4, D_80B4EB60, 40, 60 }; -EnInvadepohUnkStruct5 D_80B4EB9C = { 1, &D_80B4EB38, 1, D_80B4EB80 }; -EnInvadepohUnkStruct5 D_80B4EBAC = { 1, &D_80B4EB40, 1, D_80B4EB80 }; -EnInvadepohUnkStruct5 D_80B4EBBC = { 1, &D_80B4EB48, 1, D_80B4EB80 }; -EnInvadepohUnkStruct5 D_80B4EBCC = { 1, &D_80B4EB50, 1, D_80B4EB80 }; -EnInvadepohUnkUnion* D_80B4EBDC[6] = { - (EnInvadepohUnkUnion*)&D_80B4EB58, (EnInvadepohUnkUnion*)&D_80B4EB88, (EnInvadepohUnkUnion*)&D_80B4EB9C, - (EnInvadepohUnkUnion*)&D_80B4EBAC, (EnInvadepohUnkUnion*)&D_80B4EBBC, (EnInvadepohUnkUnion*)&D_80B4EBCC, -}; -s8 D_80B4EBF4[1] = { 0 }; -EnInvadepohUnkStruct2 D_80B4EBF8 = { D_80B4EBF4, 1 }; -EnInvadepohUnkStruct3 D_80B4EC00 = { 0, &D_80B4EBF8 }; -EnInvadepohUnkUnion* D_80B4EC08[1] = { (EnInvadepohUnkUnion*)&D_80B4EC00 }; -EnInvadepohUnkFunc D_80B4EC0C[3] = { - EnInvadepoh_func_80B45A4C, - EnInvadepoh_func_80B45A94, - EnInvadepoh_func_80B45B1C, -}; - -Color_RGBA8 D_80B4EC18 = { 255, 255, 200, 255 }; -Color_RGBA8 D_80B4EC1C = { 255, 200, 0, 0 }; -void (*D_80B4EC20[1])(EnInvadepohStructD_80B50350*) = { EnInvadepoh_func_80B46184 }; -InitChainEntry D_80B4EC24[4] = { - ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneDownward, 600, ICHAIN_CONTINUE), - ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), -}; -InitChainEntry D_80B4EC34[4] = { - ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneScale, 200, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_CONTINUE), - ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), -}; -InitChainEntry D_80B4EC44[4] = { - ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_CONTINUE), - ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), -}; -InitChainEntry D_80B4EC54[5] = { - ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneDownward, 100, ICHAIN_CONTINUE), ICHAIN_F32(targetArrowOffset, 1500, ICHAIN_CONTINUE), - ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), -}; -InitChainEntry D_80B4EC68[6] = { - ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), ICHAIN_F32(uncullZoneScale, 1000, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_CONTINUE), ICHAIN_VEC3S(shape, 0, ICHAIN_CONTINUE), - ICHAIN_F32(terminalVelocity, -100, ICHAIN_CONTINUE), ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP), -}; -InitChainEntry D_80B4EC80[6] = { - ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneScale, 50, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneDownward, 50, ICHAIN_CONTINUE), - ICHAIN_F32(gravity, -3, ICHAIN_CONTINUE), - ICHAIN_U8(targetMode, 4, ICHAIN_CONTINUE), - ICHAIN_VEC3F_DIV1000(scale, 7, ICHAIN_STOP), -}; -InitChainEntry D_80B4EC98[6] = { - ICHAIN_F32(uncullZoneForward, 20000, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneScale, 100, ICHAIN_CONTINUE), - ICHAIN_F32(uncullZoneDownward, 150, ICHAIN_CONTINUE), - ICHAIN_F32(targetArrowOffset, 1500, ICHAIN_CONTINUE), - ICHAIN_U8(targetMode, 3, ICHAIN_CONTINUE), - ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP), -}; -ActorFunc D_80B4ECB0[14] = { - EnInvadepoh_func_80B4627C, EnInvadepoh_func_80B46414, EnInvadepoh_func_80B46520, EnInvadepoh_func_80B465CC, - EnInvadepoh_func_80B46644, EnInvadepoh_func_80B46644, EnInvadepoh_func_80B468B4, EnInvadepoh_func_80B46644, - EnInvadepoh_func_80B46644, EnInvadepoh_func_80B46644, EnInvadepoh_func_80B469C4, EnInvadepoh_func_80B46A80, - EnInvadepoh_func_80B46644, EnInvadepoh_func_80B46414, -}; -ActorFunc D_80B4ECE8[14] = { - EnInvadepoh_func_80B46BB0, EnInvadepoh_func_80B46BC0, EnInvadepoh_func_80B46C08, EnInvadepoh_func_80B46C34, - EnInvadepoh_func_80B46C50, EnInvadepoh_func_80B46C50, EnInvadepoh_func_80B46C7C, EnInvadepoh_func_80B46C50, - EnInvadepoh_func_80B46C50, EnInvadepoh_func_80B46C50, EnInvadepoh_func_80B46C94, EnInvadepoh_func_80B46CC0, - EnInvadepoh_func_80B46CF4, EnInvadepoh_func_80B46D28, -}; -s16 D_80B4ED20[8] = { - 130, 125, 115, 100, 80, 78, 76, 74, -}; -Vec3f D_80B4ED30[5] = { - { 0.01f, 0.01f, 0.01f }, { 0.02f, 0.01f, 0.005f }, { -0.01f, 0.0f, 0.0f }, - { 0.01f, 0.01f, 0.01f }, { 0.005f, 0.01f, 0.02f }, -}; -Vec3f D_80B4ED6C[7] = { - { 0.0005f, 0.027999999f, 0.01f }, { -0.01f, 0.0f, 0.0f }, { -0.01f, 0.0f, 0.0f }, - { 0.016f, 0.0004f, 0.01f }, { -0.01f, 0.0f, 0.0f }, { 0.0005f, 0.0005f, 0.0005f }, - { 0.0002f, 0.0002f, 0.0002f }, -}; -s16 D_80B4EDC0[3] = { -0x1F40, -0x1770, -0x2AF8 }; -s16 D_80B4EDC8[4] = { -0x708, -0x3E8, 0, 0x7D0 }; -Vec3f D_80B4EDD0[5] = { - { -1813.0f, 374.0f, 1900.0f }, { 2198.0f, 153.0f, 3365.0f }, { -1434.0f, 262.0f, 3365.0f }, - { -393.0f, 396.0f, 1084.0f }, { 0.0f, 1500.0f, 0.0f }, -}; -EnInvadepohUnkStruct1 D_80B4EE0C[3] = { - { 0.08f, 0x2BC, -0xA }, - { 0.09f, 0x12C, -5 }, - { 0.05f, 0x190, 0 }, -}; -Vec3f D_80B4EE24 = { 2000.0f, 1000.0f, 0.0f }; -Vec3f D_80B4EE30 = { 400.0f, 270.0f, 0.0f }; - -MtxF D_80B502A0; -MtxF D_80B502E0; -EnInvadepoh* D_80B50320[8]; -u8 D_80B50340[8]; -s8 D_80B50348; -EnInvadepohStructD_80B50350 D_80B50350[10]; -Actor* D_80B503F0; -EnInvadepoh* D_80B503F4; -EnInvadepoh* D_80B503F8; -AnimatedMaterial* sAlienEyeBeamTexAnim; -AnimatedMaterial* sAlienEmptyTexAnim; -s16 D_80B50404[3]; -s16 D_80B5040A; -EnInvadepoh* D_80B5040C;