summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkuchenmitsahne <25233413+kuchenmitsahne@users.noreply.github.com>2024-11-27 13:46:58 -0500
committerGitHub <noreply@github.com>2024-11-27 11:46:58 -0700
commit7c055329a7a71f8652587cb7dc779ac3eb69f5d4 (patch)
tree0d91e8452b99087ccb0762be26946119ea6fbde6 /src
parentd38ac6a9d32e9b5c0e3caafbfc8d311a0f8f51f4 (diff)
ac_hanami_npc1 OK (#228)
* Rename symbols * First pass on struct Hanami_Npc1 * Actor funcs (ct, save, dt, init, draw) OK * Add trailing member to struct_809AEFA4 * Update Clip_unk_040_unk_E4 typedef to ActorFunc signature in order to unify *_actor_draw signatures * All talk functions and proc functions (minus aHM1_think_main_proc.s) OK * mFI_GetPuleIdx (func_8008930C_jp) OK; rename symbols (m_field_info) * aHM1_set_animation OK * aHM1_actor_move OK; update *_actor_move function signature to ActorFunc across project * aHM1_set_request_act, aHM1_check_moveRange OK * aHM1_check_inBlock OK; fix style in aHM1_check_moveRange * aHM1_turn, aHM1_walk, aHM1_set_spd_info OK * aHM1_think_init_proc OK * aHM1_revise_moveRange OK with fake (all functions matching) * Remove extraneous prototypes * Fix aHM1_think_main_proc signature * Import data * Fix aHM1_revise_moveRange signature * Standardize actor accesses * Improve define usage * Name blockX and blockZ members in Actor struct * Remove extraneous comments * mFI_BkNum2WposXZ OK (m_field_info) * Add defines to m_field_info * Formatting pass * Remove extraneous comments * Fix unk_18 type in struct_809AEFA4 --------- Co-authored-by: emilybrooks <emilybrooksemilybrooks@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/code/m_actor.c12
-rw-r--r--src/code/m_field_info.c35
-rw-r--r--src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.c324
-rw-r--r--src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.h39
4 files changed, 368 insertions, 42 deletions
diff --git a/src/code/m_actor.c b/src/code/m_actor.c
index 53c22f9..8995617 100644
--- a/src/code/m_actor.c
+++ b/src/code/m_actor.c
@@ -322,11 +322,11 @@ void Actor_delete_check(Actor* actor, Game_Play* game_play) {
return;
}
- if ((actor->unk_008 < 0) || (actor->unk_009 < 0)) {
+ if ((actor->blockX < 0) || (actor->blockZ < 0)) {
return;
}
- if ((actor->unk_008 == game_play->unk_00E4) && (actor->unk_009 == game_play->unk_00E5)) {
+ if ((actor->blockX == game_play->unk_00E4) && (actor->blockZ == game_play->unk_00E5)) {
return;
}
@@ -761,7 +761,7 @@ s32 Actor_malloc_actor_class(Actor** actorP, ActorProfile* profile, ActorOverlay
}
void Actor_init_actor_class(Actor* actor, ActorProfile* profile, ActorOverlay* overlayEntry, Game_Play* game_play,
- s32 arg4, f32 x, f32 y, f32 z, s16 rotX, s16 rotY, s16 rotZ, s8 argB, s8 argC, s16 argD,
+ s32 arg4, f32 x, f32 y, f32 z, s16 rotX, s16 rotY, s16 rotZ, s8 blockX, s8 blockZ, s16 argD,
u16 fgName, s16 params) {
mem_clear((u8*)actor, profile->instanceSize, 0);
@@ -789,8 +789,8 @@ void Actor_init_actor_class(Actor* actor, ActorProfile* profile, ActorOverlay* o
actor->home.rot.y = rotY;
actor->home.rot.z = rotZ;
- actor->unk_008 = argB;
- actor->unk_009 = argC;
+ actor->blockX = blockX;
+ actor->blockZ = blockZ;
actor->unk_00A = argD;
actor->fgName = fgName;
}
@@ -861,7 +861,7 @@ void restore_fgdata(Actor* actor, Game_Play* game_play UNUSED) {
return;
}
- if ((actor->unk_008 < 0) || (actor->unk_009 < 0)) {
+ if ((actor->blockX < 0) || (actor->blockZ < 0)) {
return;
}
diff --git a/src/code/m_field_info.c b/src/code/m_field_info.c
index a005e5b..9277fa6 100644
--- a/src/code/m_field_info.c
+++ b/src/code/m_field_info.c
@@ -3,6 +3,9 @@
#include "m_collision_bg.h"
#include "libc64/qrand.h"
+s32 mFI_GetPuleTypeIdx(u8 type);
+s32 mFI_BlockCheck(s32 blockX, s32 blockZ);
+
#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/mFI_ClearFieldData.s")
#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/mFI_CheckFieldData.s")
@@ -31,7 +34,7 @@
#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/func_8008819C_jp.s")
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/func_800881AC_jp.s")
+#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/mFI_BlockCheck.s")
#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/func_80088270_jp.s")
@@ -63,7 +66,19 @@
#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/func_80088A58_jp.s")
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/func_80088B3C_jp.s")
+s32 mFI_BkNum2WposXZ(f32* worldPosX, f32* worldPosZ, s32 blockX, s32 blockZ) {
+ s32 result;
+
+ *worldPosX = (f32)(blockX * FI_BK_WORLDSIZE_X);
+ *worldPosZ = (f32)(blockZ * FI_BK_WORLDSIZE_Z);
+ result = FALSE;
+
+ if (mFI_CheckFieldData() == TRUE) {
+ result = mFI_BlockCheck(blockX, blockZ);
+ }
+
+ return result;
+}
#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/mFI_UtNum2PosXZInBk.s")
@@ -105,9 +120,21 @@
#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/mFI_BkNum2BlockType.s")
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/func_800892CC_jp.s")
+#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/mFI_GetPuleTypeIdx.s")
+
+s32 mFI_GetPuleIdx(void) {
+ u32 mask = (1 << 15); // TODO: make an enum/define
+ s32 blockX;
+ s32 blockZ;
+ u8 type;
+ s32 result;
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/func_8008930C_jp.s")
+ mFI_BlockKind2BkNum(&blockX, &blockZ, mask);
+ type = mFI_BkNum2BlockType(blockX, blockZ);
+ result = mFI_GetPuleTypeIdx(type);
+
+ return result;
+}
#pragma GLOBAL_ASM("asm/jp/nonmatchings/code/m_field_info/func_80089348_jp.s")
diff --git a/src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.c b/src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.c
index 14e275a..be40690 100644
--- a/src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.c
+++ b/src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.c
@@ -3,13 +3,22 @@
#include "m_actor_dlftbls.h"
#include "m_object.h"
#include "overlays/gamestates/ovl_play/m_play.h"
+#include "m_field_info.h"
+
+#define THIS ((Hanami_Npc1*)thisx)
+#define ACTION_WALK 1
void aHM1_actor_ct(Actor* thisx, Game_Play* game_play);
void aHM1_actor_dt(Actor* thisx, Game_Play* game_play);
void aHM1_actor_init(Actor* thisx, Game_Play* game_play);
void aHM1_actor_save(Actor* thisx, Game_Play* game_play);
+void aHM1_actor_move(Actor* thisx, Game_Play* game_play);
+void aHM1_actor_draw(Actor* thisx, Game_Play* game_play);
+void aHM1_schedule_proc(Actor* thisx, Game_Play* game_play, s32 processIndex);
+void aHM1_talk_request(Actor* thisx, UNK_TYPE arg1 UNUSED);
+s32 aHM1_talk_init(UNK_TYPE arg0 UNUSED, UNK_TYPE arg1 UNUSED);
+s32 aHM1_talk_end_chk(Actor* thisx, UNK_TYPE arg1 UNUSED);
-#if 0
ActorProfile Hanami_Npc1_Profile = {
/* */ ACTOR_HANAMI_NPC1,
/* */ ACTOR_PART_NPC,
@@ -23,62 +32,315 @@ ActorProfile Hanami_Npc1_Profile = {
/* */ (void*)none_proc1,
/* */ aHM1_actor_save,
};
-#endif
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/aHM1_actor_ct.s")
+struct_809AEFA4 aHM1_ct_data = {
+ /* */ aHM1_actor_move,
+ /* */ aHM1_actor_draw,
+ /* */ 4,
+ /* */ aHM1_talk_request,
+ /* */ aHM1_talk_init,
+ /* */ aHM1_talk_end_chk,
+ /* */ NULL,
+};
+
+void aHM1_actor_ct(Actor* thisx, Game_Play* game_play) {
+ Hanami_Npc1* this = THIS;
+
+ if (common_data.clip.unk_040->unk_BC(&this->actor, game_play) == 1) {
+ this->unk_7C0 = aHM1_schedule_proc;
+ common_data.clip.unk_040->unk_C0(&this->actor, game_play, &aHM1_ct_data);
+ }
+}
+
+void aHM1_actor_save(Actor* thisx, Game_Play* game_play) {
+ common_data.clip.unk_040->unk_C8(thisx, game_play);
+}
+
+void aHM1_actor_dt(Actor* thisx, Game_Play* game_play) {
+ common_data.clip.unk_040->unk_C4(thisx, game_play);
+}
+
+void aHM1_actor_init(Actor* thisx, Game_Play* game_play) {
+ common_data.clip.unk_040->unk_CC(thisx, game_play);
+}
+
+void aHM1_set_animation(Hanami_Npc1* this, s32 processIndex) {
+ static UNK_TYPE4 animeSeqNo[] = { 0x0000004B, 0x0000004B };
+
+ common_data.clip.unk_040->unk_104(&this->actor, animeSeqNo[processIndex], 0, processIndex);
+}
+
+void aHM1_actor_move(Actor* thisx, Game_Play* game_play) {
+ common_data.clip.unk_040->unk_D0(thisx, game_play);
+}
+
+void aHM1_set_request_act(Actor* thisx) {
+ Hanami_Npc1* this = THIS;
+
+ this->unk_7D4 = 4;
+ this->unk_7D5 = 0x12;
+ this->unk_7D6 = 2;
+}
+
+s32 aHM1_check_moveRange(Actor* thisx, xyz_t* destination) {
+ f32 posDiffX = thisx->home.pos.x - destination->x;
+ f32 posDiffZ = thisx->home.pos.z - destination->z;
+ f32 magnitudeSquared;
+ s32 notInRange = FALSE;
+
+ magnitudeSquared = (posDiffX * posDiffX) + (posDiffZ * posDiffZ);
+
+ if (magnitudeSquared > 10000.0f) {
+ notInRange = TRUE;
+ }
+
+ return notInRange;
+}
+
+s32 aHM1_check_inBlock(Actor* thisx, xyz_t* pos, s32* blockX, s32* blockZ) {
+ s32 notInBlock = FALSE;
+
+ mFI_Wpos2BlockNum(blockX, blockZ, *pos);
+
+ if ((thisx->blockX != *blockX) || (thisx->blockZ != *blockZ)) {
+ notInBlock = TRUE;
+ }
+
+ return notInBlock;
+}
+
+void aHM1_revise_moveRange(Hanami_Npc1* this) {
+ static f32 offset[] = { 0.0f, 319.0f };
+ s32 mask = 0;
+
+ if (aHM1_check_moveRange(&this->actor, &this->actor.world.pos) == TRUE) {
+ s16 searchAngle = search_position_angleY(&this->actor.home.pos, &this->actor.world.pos);
+ this->actor.world.pos.x = (sin_s(searchAngle) * 100.0f) + this->actor.home.pos.x;
+ this->actor.world.pos.z = (cos_s(searchAngle) * 100.0f) + this->actor.home.pos.z;
+ mask = 3;
+ } else {
+ s32 blockX;
+ s32 blockZ;
+ f32 worldPosX;
+ f32 worldPosZ;
+
+ if (aHM1_check_inBlock(&this->actor, &this->actor.world.pos, &blockX, &blockZ) == TRUE) {
+ s32 hanamiBlock;
+ s32 offsetIndex;
+
+ mFI_BkNum2WposXZ(&worldPosX, &worldPosZ, this->actor.blockX, this->actor.blockZ);
+
+ //! FAKE
+ if (hanamiBlock) {}
+
+ hanamiBlock = this->actor.blockX;
+ offsetIndex = hanamiBlock < blockX;
+
+ if (blockX != hanamiBlock) {
+ this->actor.world.pos.x = offset[offsetIndex] + worldPosX;
+ }
+
+ hanamiBlock = this->actor.blockZ;
+ offsetIndex = hanamiBlock < blockZ;
+
+ if (blockZ != hanamiBlock) {
+ this->actor.world.pos.z = offset[offsetIndex] + worldPosZ;
+ }
+ mask = 3;
+ }
+ }
+
+ this->unk_910 = (u8)(this->unk_910 | mask);
+}
+
+void aHM1_turn(Actor* thisx) {
+ Hanami_Npc1* this = THIS;
+
+ if (chase_angle(&this->actor.shape.rot.y, this->unk_8DC, 0x800) == TRUE) {
+ this->unk_93C = 1;
+ this->unk_7C6 = 0xFF;
+ }
+
+ this->actor.world.rot.y = this->actor.shape.rot.y;
+}
+
+void aHM1_walk(Actor* thisx) {
+ Hanami_Npc1* this = THIS;
+
+ aHM1_revise_moveRange(this);
+
+ if (this->unk_910 != 0) {
+ this->unk_7C6 = 0xFF;
+ } else if (this->unk_8CC >= 0x1F) {
+ this->unk_7C6 = 0xFF;
+ }
+
+ chase_angle(&this->actor.shape.rot.y, this->unk_8DC, 0x400);
+ this->actor.world.rot.y = this->actor.shape.rot.y;
+}
+
+void aHM1_set_spd_info(Hanami_Npc1* this, s32 action) {
+ if (action == ACTION_WALK) {
+ this->unk_8B4 = 0.1f;
+ this->unk_8B8 = 0.1f;
+ this->unk_8B0 = 1.0f;
+
+ return;
+ }
+
+ this->actor.speed = 0.0f;
+ this->unk_8B0 = 0.0f;
+ this->unk_8B4 = 0.0f;
+ this->unk_8B8 = 0.0f;
+}
+
+void aHM1_setupAction(Hanami_Npc1* this, s32 processIndex) {
+ static Hanami_Npc1_unk_940 process[] = { aHM1_turn, aHM1_walk };
+
+ this->unk_7C6 = 0;
+ this->unk_938 = processIndex;
+ this->unk_940 = process[processIndex];
+ aHM1_set_animation(this, processIndex);
+ aHM1_set_spd_info(this, processIndex);
+}
+
+void aHM1_act_chg_data_proc(Hanami_Npc1* this, Game_Play* game_play UNUSED) {
+ this->unk_7C9 = 1;
+}
+
+void aHM1_act_init_proc(Hanami_Npc1* this, Game_Play* game_play UNUSED) {
+ aHM1_setupAction(this, 1);
+}
+
+void aHM1_act_main_proc(Hanami_Npc1* this, Game_Play* game_play UNUSED) {
+ this->unk_940(&this->actor);
+}
+
+void aHM1_act_proc(Actor* thisx, Game_Play* game_play, s32 processIndex) {
+ static Hanami_Npc1ActionFunc act_proc[] = { aHM1_act_init_proc, aHM1_act_chg_data_proc, aHM1_act_main_proc };
+ Hanami_Npc1* this = THIS;
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/aHM1_actor_save.s")
+ (*act_proc[processIndex])(this, game_play);
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/aHM1_actor_dt.s")
+void aHM1_think_main_proc(Hanami_Npc1* this, Game_Play* game_play UNUSED) {
+ s16 modRotY;
+ s32 modRotYAbsValue;
+ f32 randS16AsFloat;
+ s32 processIndex;
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/aHM1_actor_init.s")
+ if (this->unk_7C6 == 0xFF) {
+ if (this->unk_7C5 == 0x12) {
+ if (this->unk_93C != -1) {
+ processIndex = this->unk_93C;
+ } else {
+ randS16AsFloat = (fqrand() - 0.5f) * 65536.0f;
+ modRotY = ((s16)randS16AsFloat) - this->actor.shape.rot.y;
+ this->unk_8DC = randS16AsFloat;
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DED84_jp.s")
+ if (modRotY >= 0) {
+ modRotYAbsValue = modRotY;
+ } else {
+ modRotYAbsValue = -modRotY;
+ }
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DEDC4_jp.s")
+ if (modRotYAbsValue >= 0x6001) {
+ processIndex = 0;
+ } else {
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DEDF0_jp.s")
+ if (!(this->unk_910 & 3)) {
+ processIndex = 1;
+ } else {
+ processIndex = 0;
+ }
+ }
+ }
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DEE10_jp.s")
+ this->unk_8CC = 0;
+ aHM1_setupAction(this, processIndex);
+ }
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DEE60_jp.s")
+ this->unk_93C = -1;
+ this->unk_80C = 3;
+ aHM1_set_request_act(&this->actor);
+ }
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DEEEC_jp.s")
+void aHM1_think_init_proc(Hanami_Npc1* this, Game_Play* game_play UNUSED) {
+ this->unk_7A8 = 0;
+ this->unk_7D0 = aHM1_act_proc;
+ aHM1_set_request_act(&this->actor);
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF028_jp.s")
+void aHM1_think_proc(Actor* thisx, Game_Play* game_play, s32 processIndex) {
+ static Hanami_Npc1ActionFunc think_proc[] = { aHM1_think_init_proc, aHM1_think_main_proc };
+ Hanami_Npc1* this = THIS;
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF074_jp.s")
+ (*think_proc[processIndex])(this, game_play);
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF0EC_jp.s")
+void aHM1_schedule_init_proc(Hanami_Npc1* this, Game_Play* game_play) {
+ static s16 def_angle[] = { 0x2000, 0x2000, 0xE000, 0xC000, 0x0000, 0xE000, 0xE000 };
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF134_jp.s")
+ this->unk_7A4 = aHM1_think_proc;
+ this->unk_7FD = 0;
+ this->unk_8AC = -1;
+ this->unk_93C = -1;
+ this->unk_80C = 3;
+ this->actor.colStatus.mass = MASS_HEAVY;
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF180_jp.s")
+ {
+ s32 angleIndex = mFI_GetPuleIdx();
+ s16 tempAngle = def_angle[angleIndex];
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF194_jp.s")
+ this->actor.shape.rot.y = tempAngle;
+ this->actor.world.rot.y = tempAngle;
+ this->unk_8DC = tempAngle;
+ }
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF1B8_jp.s")
+ common_data.clip.unk_040->unk_110(&this->actor, game_play, 8, 0);
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF1E0_jp.s")
+void aHM1_schedule_main_proc(Hanami_Npc1* this, Game_Play* game_play) {
+ if (common_data.clip.unk_040->unk_110(&this->actor, game_play, -1, 1) == 0) {
+ common_data.clip.unk_040->unk_110(&this->actor, game_play, -1, 2);
+ }
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF210_jp.s")
+void aHM1_schedule_proc(Actor* thisx, Game_Play* game_play, s32 processIndex) {
+ static Hanami_Npc1ActionFunc sche_proc[] = { aHM1_schedule_init_proc, aHM1_schedule_main_proc };
+ Hanami_Npc1* this = THIS;
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF30C_jp.s")
+ (*sche_proc[processIndex])(this, game_play);
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF33C_jp.s")
+void aHM1_set_talk_info(Actor* thisx) {
+ static u32 msg_base[] = { 0x00001939, 0x00001948, 0x0000192A, 0x00001957, 0x00001966, 0x00001975 };
+ enum NpcLooks looks = mNpc_GetNpcLooks(thisx);
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF36C_jp.s")
+ mDemo_Set_msg_num(msg_base[looks] + ((s32)(fqrand() * 3.0f)));
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF3FC_jp.s")
+void aHM1_talk_request(Actor* thisx, UNK_TYPE arg1 UNUSED) {
+ mDemo_Request(7, thisx, aHM1_set_talk_info);
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF468_jp.s")
+s32 aHM1_talk_init(UNK_TYPE arg0 UNUSED, UNK_TYPE arg1 UNUSED) {
+ mDemo_Set_ListenAble();
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF498_jp.s")
+ return 1;
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF4F0_jp.s")
+s32 aHM1_talk_end_chk(Actor* thisx, UNK_TYPE arg1 UNUSED) {
+ s32 result = FALSE;
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF524_jp.s")
+ if (!mDemo_Check(7, thisx)) {
+ result = TRUE;
+ }
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF550_jp.s")
+ return result;
+}
-#pragma GLOBAL_ASM("asm/jp/nonmatchings/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1/func_809DF590_jp.s")
+void aHM1_actor_draw(Actor* thisx, Game_Play* game_play) {
+ common_data.clip.unk_040->unk_E4(thisx, game_play);
+}
diff --git a/src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.h b/src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.h
index 30a8b91..432a036 100644
--- a/src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.h
+++ b/src/overlays/actors/ovl_Hanami_Npc1/ac_hanami_npc1.h
@@ -9,10 +9,47 @@ struct Game_Play;
struct Hanami_Npc1;
typedef void (*Hanami_Npc1ActionFunc)(struct Hanami_Npc1*, struct Game_Play*);
+typedef void (*Hanami_Npc1_unk_940)(struct Actor*);
typedef struct Hanami_Npc1 {
/* 0x000 */ Actor actor;
- /* 0x174 */ UNK_TYPE1 unk_174[0x7D0];
+ /* 0x174 */ UNK_TYPE1 unk_174[0x630]; // unreferenced in actor file
+ /* 0x7A4 */ UNK_PTR unk_7A4;
+ /* 0x7A8 */ UNK_TYPE4 unk_7A8;
+ /* 0x7AC */ UNK_TYPE1 unk_7AC[0x14]; // unreferenced in actor file
+ /* 0x7C0 */ UNK_PTR unk_7C0;
+ /* 0x7C4 */ UNK_TYPE1 unk_7C4; // inferred from alignment
+ /* 0x7C5 */ u8 unk_7C5;
+ /* 0x7C6 */ u8 unk_7C6;
+ /* 0x7C7 */ UNK_TYPE1 unk_7C7; // inferred from alignment (could be auto padding)
+ /* 0x7C8 */ UNK_TYPE1 unk_7C8; // inferred from alignment
+ /* 0x7C9 */ UNK_TYPE1 unk_7C9;
+ /* 0x7CA */ UNK_TYPE1 unk_7CA[6]; // unreferenced in actor file
+ /* 0x7D0 */ UNK_PTR unk_7D0;
+ /* 0x7D4 */ UNK_TYPE1 unk_7D4;
+ /* 0x7D5 */ UNK_TYPE1 unk_7D5;
+ /* 0x7D6 */ UNK_TYPE1 unk_7D6;
+ /* 0x7D7 */ UNK_TYPE1 unk_7D7; // inferred from alignment (could be auto padding)
+ /* 0x7D8 */ UNK_TYPE1 unk_7D8[0x24]; // unreferenced in actor file
+ /* 0x7FC */ UNK_TYPE1 unk_7FC; // inferred from alignment
+ /* 0x7FD */ UNK_TYPE1 unk_7FD;
+ /* 0x7FE */ UNK_TYPE1 unk_7FE[0xE]; // unreferenced in actor file
+ /* 0x80C */ UNK_TYPE4 unk_80C;
+ /* 0x810 */ UNK_TYPE1 unk_810[0x9C]; // unreferenced in actor file
+ /* 0x8AC */ UNK_TYPE4 unk_8AC;
+ /* 0x8B0 */ f32 unk_8B0;
+ /* 0x8B4 */ f32 unk_8B4;
+ /* 0x8B8 */ f32 unk_8B8;
+ /* 0x8BC */ UNK_TYPE1 unk_8BC[0x10]; // unreferenced in actor file
+ /* 0x8CC */ UNK_TYPE2 unk_8CC;
+ /* 0X8CE */ UNK_TYPE1 unk_8CE[0xE]; // unreferenced in actor file
+ /* 0x8DC */ UNK_TYPE2 unk_8DC;
+ /* 0x8DE */ UNK_TYPE1 unk_8DE[0x32]; // unreferenced in actor file
+ /* 0x910 */ u8 unk_910;
+ /* 0x911 */ UNK_TYPE1 unk_911[0x27]; // unreferenced in actor file
+ /* 0x938 */ UNK_TYPE4 unk_938;
+ /* 0x93C */ UNK_TYPE unk_93C;
+ /* 0x940 */ Hanami_Npc1_unk_940 unk_940;
} Hanami_Npc1; // size = 0x944
#endif