From 2d8c2b5be11980629b7705ca776bcd48577b2b33 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Tue, 11 Feb 2025 22:31:36 -0500 Subject: [PATCH 01/41] Began work on d_a_npc_jagar --- include/d/actor/d_a_npc_jagar.h | 50 +++++- src/d/actor/d_a_npc_jagar.cpp | 281 +++++++++++++++++++++++++++----- 2 files changed, 284 insertions(+), 47 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 38732a793b9..08749c731dd 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -14,7 +14,7 @@ class daNpc_Jagar_c : public fopAc_ac_c { public: /* 80A1470C */ ~daNpc_Jagar_c(); - /* 80A14858 */ void create(); + /* 80A14858 */ int create(); /* 80A14B20 */ void CreateHeap(); /* 80A14F4C */ void Delete(); /* 80A14F80 */ void Execute(); @@ -79,7 +79,53 @@ class daNpc_Jagar_Param_c { public: /* 80A1A2C4 */ ~daNpc_Jagar_Param_c(); - static u8 const m[160]; + struct param { + float field_0; // 160.0f + float field_1; // -3.0f + float field_2; // 1.0f + float field_3; // 400.0f + float field_4; // 255.0f + float field_5; // 160.0f + float field_6; // 35.0f + float field_7; // 30.0f + float field_8; // 0.0f + float field_9; // 0.0f + float field_10; // 10.0f + float field_11; // -10.0f + float field_12; // 30.0f + float field_13; // -10.0f + float field_14; // 45.0f + float field_15; // -45.0f + float field_16; // 0.6f + float field_17; // 12.0f + int field_18; // 3 + int field_19; // 6 + int field_20; // 5 + int field_21; // 6 + float field_22; // 110.0f + float field_23; // 500.0f + float field_24; // 300.0f + float field_25; // -300.0f + float field_26; // 60 + int field_27; // 8 + float field_28; // 0.0f + float field_29; // 0.0f + float field_30; // 0.0f + float field_31; // 4.0f + float field_32; // 0.0f + float field_33; // 0.0f + float field_34; // 0.0f + float field_35; // 0.0f + float field_36; // 0.0f + float field_37; // 0.0f + float field_38; // 0.0f + float field_39; // 1400.0f + float field_40; // 200.0f + float field_41; // -800.0f + float field_42; // 16.0f + float field_43; // 1800.0f + }; + static daNpc_Jagar_Param_c::param const m; }; #endif /* D_A_NPC_JAGAR_H */ diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index b3a340ccc79..c4592a0a19e 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -4,6 +4,13 @@ */ #include "d/actor/d_a_npc_jagar.h" +#include "d/actor/d_a_npc.h" +#include "f_op/f_op_actor_mng.h" +#include "Z2AudioLib/Z2Creature.h" +#include "d/d_particle_copoly.h" +#include "d/d_bg_s_acch.h" +#include "d/d_cc_d.h" +#include "d/d_com_inf_game.h" #include "dol2asm.h" // @@ -330,25 +337,26 @@ SECTION_DATA static u8 l_bmdData[8] = { /* 80A1A570-80A1A5B8 -00001 0048+00 0/1 0/0 0/0 .data l_evtList */ #pragma push #pragma force_active on -SECTION_DATA static void* l_evtList[18] = { - (void*)&d_a_npc_jagar__stringBase0, - (void*)NULL, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x1), - (void*)NULL, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0xD), - (void*)0x00000002, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x15), - (void*)0x00000002, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x24), - (void*)0x00000002, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x2A), - (void*)0x00000003, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x40), - (void*)0x00000003, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x5A), - (void*)0x00000003, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x64), - (void*)0x00000003, +SECTION_DATA static daNpcT_evtData_c l_evtList[18] = { + {"", 0}, + {"NO_RESPONSE", 0}, + {"CLIMBUP", 2}, + {"NEED_YOUR_HELP", 2}, + {"ANGER", 2}, + {"CONVERSATION_WITH_BOU", 3}, + {"CONFIDENTIAL_CONVERSATION", 3}, + {"FIND_WOLF", 3}, + {"FIND_WOLF_VER2", 3}, + // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x24), + // (void*)0x00000002, + // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x2A), + // (void*)0x00000003, + // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x40), + // (void*)0x00000003, + // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x5A), + // (void*)0x00000003, + // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x64), + // (void*)0x00000003, }; #pragma pop @@ -820,33 +828,109 @@ SECTION_DATA extern void* __vt__13daNpc_Jagar_c[49] = { /* 80A1470C-80A14858 0000EC 014C+00 1/0 0/0 0/0 .text __dt__13daNpc_Jagar_cFv */ daNpc_Jagar_c::~daNpc_Jagar_c() { + short in_r4; + if (this == NULL) return; + + // Assign pointer at offset 0xe3c + *(void**)((char*)this + 0xe3c) = __vt__13daNpc_Jagar_c; + + // Stop animation if it exists + mDoExt_McaMorfSO* animation = *(mDoExt_McaMorfSO**)((char*)this + 0x578); + if (animation != NULL) { + animation->stopZelAnime(); + } + + // Delete resources + // void deleteRes( + // // reinterpret_cast(this), + // l_loadResPtrn9[*(unsigned int*)((char*)this + 0xf80)], + // (const char **)l_resNameList + // ); + + // Assign pointer at offset 0xfd0 (if not specific memory location) + if (this != reinterpret_cast(0xfffff054)) { + *(void**)((char*)this + 0xfd0) = __vt__13daNpcT_Path_c; + } + + // Destroy an array of `daNpcT_ActorMngr_c` objects + // __destroy_arr( + // (char*)this + 0xf84, + // ~daNpcT_ActorMngr_c, + // 8, 5 + // ); + + // Assign virtual tables and pointers for collision objects + // if (this != reinterpret_cast(0xfffff1bc)) { + // *(void**)((char*)this + 0xe80) = &dCcD_Cyl::__vt; + // *(void**)((char*)this + 0xf64) = &PTR_803ac07c; + // *(void**)((char*)this + 0xf7c) = &PTR_803ac0d4; + + // if (this != reinterpret_cast(0xfffff0b8)) { + // *(void**)((char*)this + 0xf64) = &cCcD_CylAttr::__vt; + // *(void**)((char*)this + 0xf7c) = &PTR_803c35fc; + + // if (this != reinterpret_cast(0xfffff098)) { + // *(void**)((char*)this + 0xf7c) = &DAT_80a1acf0; + // } + + // if (this != reinterpret_cast(0xfffff0b8)) { + // *(void**)((char*)this + 0xf64) = &cCcD_ShapeAttr::__vt; + + // if (this != reinterpret_cast(0xfffff0b8)) { + // *(void**)((char*)this + 0xf60) = &DAT_80a1ace4; + // } + // } + // } + // } + + // Destroy collision object + reinterpret_cast((char*)this + 0xe44)->~dCcD_GObjInf(); + + // Call base class destructor + reinterpret_cast(this)->~daNpcT_c(); + + // Free memory if in_r4 > 0 + // if (in_r4 > 0) { + // JKernel::operator_delete(this); + // } // NONMATCHING } /* ############################################################################################## */ /* 80A1A330-80A1A3D0 000000 00A0+00 13/13 0/0 1/1 .rodata m__19daNpc_Jagar_Param_c */ -SECTION_RODATA u8 const daNpc_Jagar_Param_c::m[160] = { - 0x43, 0x2A, 0x00, 0x00, 0xC0, 0x40, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x43, 0xC8, 0x00, 0x00, - 0x43, 0x7F, 0x00, 0x00, 0x43, 0x20, 0x00, 0x00, 0x42, 0x0C, 0x00, 0x00, 0x41, 0xF0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x20, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, - 0x41, 0xF0, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, 0x42, 0x34, 0x00, 0x00, 0xC2, 0x34, 0x00, 0x00, - 0x3F, 0x19, 0x99, 0x9A, 0x41, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x05, 0x00, 0x06, - 0x42, 0xDC, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00, 0x43, 0x96, 0x00, 0x00, 0xC3, 0x96, 0x00, 0x00, - 0x00, 0x3C, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xAF, 0x00, 0x00, - 0x43, 0x48, 0x00, 0x00, 0xC4, 0x48, 0x00, 0x00, 0x41, 0x80, 0x00, 0x00, 0x44, 0xE1, 0x00, 0x00, +daNpc_Jagar_Param_c::param const daNpc_Jagar_Param_c::m = { + 160.0f, -3.0f, 1.0f, 400.0f, 255.0f, 160.0f, + 35.0f, 30.0f, 0.0f, 0.0f, 10.0f, -10.0f, + 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f, + 3, 6, 5, 6, 110.0f, 500.0f, 300.0f, -300.0f, + 60, 8, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1400.0f, + 200.0f, -800.0f, 16.0f, 1800.0f + // 0x43, 0x2A, 0x00, 0x00, 0xC0, 0x40, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x43, 0xC8, 0x00, 0x00, + // 0x43, 0x7F, 0x00, 0x00, 0x43, 0x20, 0x00, 0x00, 0x42, 0x0C, 0x00, 0x00, 0x41, 0xF0, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x20, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, + // 0x41, 0xF0, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, 0x42, 0x34, 0x00, 0x00, 0xC2, 0x34, 0x00, 0x00, + // 0x3F, 0x19, 0x99, 0x9A, 0x41, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x05, 0x00, 0x06, + // 0x42, 0xDC, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00, 0x43, 0x96, 0x00, 0x00, 0xC3, 0x96, 0x00, 0x00, + // 0x00, 0x3C, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xAF, 0x00, 0x00, + // 0x43, 0x48, 0x00, 0x00, 0xC4, 0x48, 0x00, 0x00, 0x41, 0x80, 0x00, 0x00, 0x44, 0xE1, 0x00, 0x00, }; -COMPILER_STRIP_GATE(0x80A1A330, &daNpc_Jagar_Param_c::m); +// COMPILER_STRIP_GATE(0x80A1A330, &daNpc_Jagar_Param_c::m); /* 80A1A3D0-80A1A3E0 0000A0 0010+00 0/1 0/0 0/0 .rodata heapSize$4099 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const heapSize[16] = { - 0x00, 0x00, 0x38, 0x50, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, +// #pragma push +// #pragma force_active on +static int const heapSize[4] = { + 0x3850, 0x3870, 0x3870, 0 + // 0x00, 0x00, 0x38, 0x50, + // 0x00, 0x00, 0x38, 0x70, + // 0x00, 0x00, 0x38, 0x70, + // 0x00, 0x00, 0x00, 0x00, }; -COMPILER_STRIP_GATE(0x80A1A3D0, &heapSize); -#pragma pop +// COMPILER_STRIP_GATE(0x80A1A3D0, &heapSize); +// #pragma pop /* 80A1A3E0-80A1A3E4 0000B0 0004+00 0/2 0/0 0/0 .rodata @4165 */ #pragma push @@ -877,13 +961,16 @@ COMPILER_STRIP_GATE(0x80A1A3EC, &lit_4168); #pragma pop /* 80A1A3F0-80A1A3F4 0000C0 0004+00 4/15 0/0 0/0 .rodata @4169 */ -SECTION_RODATA static u8 const lit_4169[4] = { - 0x00, - 0x00, - 0x00, - 0x00, +// SECTION_RODATA static u8 const lit_4169[4] = { +// 0x00, +// 0x00, +// 0x00, +// 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A3F0, &lit_4169); +static u8 const lit_4169[4] = { + 0x00, 0x00, 0x00, 0x00, }; -COMPILER_STRIP_GATE(0x80A1A3F0, &lit_4169); /* 80A1A3F4-80A1A3F8 0000C4 0004+00 0/1 0/0 0/0 .rodata @4170 */ #pragma push @@ -893,8 +980,112 @@ COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); #pragma pop /* 80A14858-80A14B20 000238 02C8+00 1/1 0/0 0/0 .text create__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::create() { - // NONMATCHING +int daNpc_Jagar_c::create() { + // NONMATCHING + fopAcM_SetupActor2(this, daNpc_Jagar_c, (const daNpcT_faceMotionAnmData_c *)l_faceMotionAnmData, + (const daNpcT_motionAnmData_c *)l_motionAnmData, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *) l_faceMotionSequenceData, 4, + (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList + ); +// daNpc_Jagar_c* self = this; +unsigned int uVar1; +// daNpc_Jagar_c dVar4; +// int iVar2; +// int iVar3; +// bool bVar5; + +// extern daNpcT_faceMotionAnmData_c DAT_80a1a5ec; +// extern daNpcT_motionAnmData_c DAT_80a1a704; +// extern daNpcT_MotionSeqMngr_c::sequenceStepData_c DAT_80a1a8fc; +// extern daNpcT_MotionSeqMngr_c::sequenceStepData_c DAT_80a1a98c; +// extern daNpcT_evtData_c d_a_npc_jagar_l_bmdData; +// // extern char* PTR_6305_80a1a5b8; +// // l_resNameList; +// // void* base = (char*)l_resNameList - 0x70; +// // void* adjustedPointer = (char*)base + 0x70; + +// if ((*(unsigned int *)(this + 0x4a0) & 8) == 0) { +// if (this != (daNpc_Jagar_c *)0x0) { +// new (this) daNpc_Jagar_c( +// &DAT_80a1a5ec, // Face Motion Animation Data +// &DAT_80a1a704, // Motion Animation Data +// &DAT_80a1a8fc, // Sequence Step Data +// 4, // Integer Parameter +// &DAT_80a1a98c, // More Sequence Step Data +// 4, // Another Integer Parameter +// &d_a_npc_jagar_l_bmdData, // Event Data +// (char**)l_resNameList // Pointer to additional data +// ); +// // daNpc_Jagar_c(this,(daNpcT_faceMotionAnmData_c *)&DAT_80a1a5ec, +// // (daNpcT_motionAnmData_c *)&DAT_80a1a704,(sequenceStepData_c *)&DAT_80a1a8fc,4, +// // (sequenceStepData_c *)&DAT_80a1a98c,4, +// // (daNpcT_evtData_c *)&d_a_npc_jagar::l_bmdData,&PTR_@6305_80a1a5b8); +// } +// *(unsigned int *)(this + 0x4a0) = *(unsigned int *)(this + 0x4a0) | 8; +// } +// // dVar4 = (daNpc_Jagar_c)getType(this); +// // this[0xf80] = dVar4; +// uVar1 = 0xffffffff; +// if (*(unsigned short *)(this + 0x4b4) != 0xffff) { +// uVar1 = (unsigned int)*(unsigned short *)(this + 0x4b4); +// } +// *(unsigned int *)(this + 0xa7c) = uVar1; +// *(unsigned char*)((char*)this + 0xa89) = 0; // Set the byte at offset 0xA89 to 0 +// iVar2 = ((daNpcT_c *)this)->loadRes((const signed char*)&l_loadResPtrn9[*(char*)(this + 0xf80)],(const char **)l_resNameList); +// if (iVar2 == 4) { +// // iVar3 = isDelete(this); +// if (iVar3 == 0) { +// bVar5 = fopAcM_entrySolidHeap +// ((fopAc_ac_c *)this,createHeapCallBack, +// *(u32 *)(&heapSize + (unsigned int)(*(unsigned char*)(this + 0xf80)) * 4)); +// if (bVar5) { +// *(int *)(this + 0x504) = *(int *)(*(int *)(this + 0x578) + 4) + 0x24; +// fopAcM_setCullSizeBox +// ((fopAc_ac_c *)this,-200.0,-100.0,-200.0,200.0,300.0,200.0); +// ((Z2Creature *)(this + 0x580))->init((Vec *)(this + 0x4d0), (Vec *)(this + 0x538), '\x03', '\x01'); +// ((dPaPo_c *)(this + 0x9c0))->init((dBgS_Acch *)(this + 0x68c),0.0f,0.0f); +// (this)->reset(); +// ((dBgS_Acch *)(this + 0x68c))->Set((cXyz *)(this + 0x4d0),(cXyz *)(this + 0x4bc), +// (fopAc_ac_c *)this,1,(dBgS_AcchCir *)(this + 0x8a0),(cXyz *)(this + 0x4f8), +// (csXyz *)(this + 0x4dc),(csXyz *)(this + 0x4e4)); +// ((dCcD_Stts *)(this + 0x864))->Init(0xff,0,(fopAc_ac_c *)this); +// ((dCcD_Cyl *)(this + 0xe44))->Set(daNpcT_c::mCcDCyl); +// *(daNpc_Jagar_c **)(this + 0xe88) = this + 0x864; +// *(void (**)(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*))(this + 0xee8) = ::daNpcT_c::tgHitCallBack; +// ((dBgS_Acch *)(this + 0x68c))->CrrPos(dComIfG_Bgsp()) +// ; +// *(unsigned int *)(this + 0x930) = *(unsigned int *)(this + 0x768); +// *(unsigned int *)(this + 0x934) = *(unsigned int *)(this + 0x76c); +// *(unsigned int *)(this + 0x938) = *(unsigned int *)(this + 0x770); +// this[0x93c] = this[0x774]; +// *(unsigned short *)(this + 0x944) = *(unsigned short *)(this + 0x77c); +// *(unsigned short *)(this + 0x946) = *(unsigned short *)(this + 0x77e); +// *(unsigned int *)(this + 0x948) = *(unsigned int *)(this + 0x780); +// *(unsigned int *)(this + 0x94c) = *(unsigned int *)(this + 0x784); +// *(unsigned int *)(this + 0x954) = *(unsigned int *)(this + 0x78c); +// *(unsigned int *)(this + 0x958) = *(unsigned int *)(this + 0x790); +// *(unsigned int *)(this + 0x95c) = *(unsigned int *)(this + 0x794); +// *(unsigned int *)(this + 0x960) = *(unsigned int *)(this + 0x798); +// *(unsigned int *)(this + 0x964) = *(unsigned int *)(this + 0x79c); +// *(unsigned int *)(this + 0x968) = *(unsigned int *)(this + 0x7a0); +// *(unsigned int *)(this + 0xdf4) = *(unsigned int *)(this + 0x724); +// if (*(float *)(this + 0xdf4) != -1e+09) { +// ((daNpcT_c *)this)->setEnvTevColor(); +// ((daNpcT_c *)this)->setRoomNo(); +// } +// *(unsigned char *)(this + 0xa88) = 0x1; +// // Execute(this); +// *(unsigned char *)(this + 0xa88) = 0x0; +// } +// else { +// iVar2 = 5; +// } +// } +// else { +// iVar2 = 5; +// } +// } +// return iVar2; + return 0; } /* ############################################################################################## */ From d9b7f656181f516f4736ff55edd33a4522ffb6c8 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 12 Feb 2025 16:02:17 -0500 Subject: [PATCH 02/41] Major work on daNpc_Jagar_c::create() --- include/d/actor/d_a_npc_jagar.h | 17 +- src/d/actor/d_a_npc_jagar.cpp | 307 +++++++++++++++++++------------- 2 files changed, 196 insertions(+), 128 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 08749c731dd..03e3eef8888 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -15,14 +15,14 @@ class daNpc_Jagar_c : public fopAc_ac_c { public: /* 80A1470C */ ~daNpc_Jagar_c(); /* 80A14858 */ int create(); - /* 80A14B20 */ void CreateHeap(); - /* 80A14F4C */ void Delete(); - /* 80A14F80 */ void Execute(); - /* 80A14FA0 */ void Draw(); - /* 80A15034 */ void createHeapCallBack(fopAc_ac_c*); - /* 80A15054 */ void ctrlJointCallBack(J3DJoint*, int); + /* 80A14B20 */ int CreateHeap(); + /* 80A14F4C */ int Delete(); + /* 80A14F80 */ int Execute(); + /* 80A14FA0 */ int Draw(); + /* 80A15034 */ static int createHeapCallBack(fopAc_ac_c*); + /* 80A15054 */ static int ctrlJointCallBack(J3DJoint*, int); /* 80A150AC */ void getType(); - /* 80A150F8 */ void isDelete(); + /* 80A150F8 */ int isDelete(); /* 80A15198 */ void reset(); /* 80A15364 */ void afterJntAnm(int); /* 80A153E8 */ void setParam(); @@ -71,6 +71,9 @@ class daNpc_Jagar_c : public fopAc_ac_c { private: /* 0x568 */ u8 field_0x568[0x100c - 0x568]; + /* 0x0F80 */ u8 mType; + /* 0x0F84 */ daNpcF_ActorMngr_c mActorMngr[5]; + }; STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index c4592a0a19e..d67cb5d21b3 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1,7 +1,7 @@ /** - * @file d_a_npc_jagar.cpp - * -*/ + * d_a_npc_jagar.cpp + * NPC - Jaggle + */ #include "d/actor/d_a_npc_jagar.h" #include "d/actor/d_a_npc.h" @@ -981,111 +981,50 @@ COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); /* 80A14858-80A14B20 000238 02C8+00 1/1 0/0 0/0 .text create__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::create() { - // NONMATCHING fopAcM_SetupActor2(this, daNpc_Jagar_c, (const daNpcT_faceMotionAnmData_c *)l_faceMotionAnmData, (const daNpcT_motionAnmData_c *)l_motionAnmData, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *) l_faceMotionSequenceData, 4, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList ); -// daNpc_Jagar_c* self = this; -unsigned int uVar1; -// daNpc_Jagar_c dVar4; -// int iVar2; -// int iVar3; -// bool bVar5; - -// extern daNpcT_faceMotionAnmData_c DAT_80a1a5ec; -// extern daNpcT_motionAnmData_c DAT_80a1a704; -// extern daNpcT_MotionSeqMngr_c::sequenceStepData_c DAT_80a1a8fc; -// extern daNpcT_MotionSeqMngr_c::sequenceStepData_c DAT_80a1a98c; -// extern daNpcT_evtData_c d_a_npc_jagar_l_bmdData; -// // extern char* PTR_6305_80a1a5b8; -// // l_resNameList; -// // void* base = (char*)l_resNameList - 0x70; -// // void* adjustedPointer = (char*)base + 0x70; - -// if ((*(unsigned int *)(this + 0x4a0) & 8) == 0) { -// if (this != (daNpc_Jagar_c *)0x0) { -// new (this) daNpc_Jagar_c( -// &DAT_80a1a5ec, // Face Motion Animation Data -// &DAT_80a1a704, // Motion Animation Data -// &DAT_80a1a8fc, // Sequence Step Data -// 4, // Integer Parameter -// &DAT_80a1a98c, // More Sequence Step Data -// 4, // Another Integer Parameter -// &d_a_npc_jagar_l_bmdData, // Event Data -// (char**)l_resNameList // Pointer to additional data -// ); -// // daNpc_Jagar_c(this,(daNpcT_faceMotionAnmData_c *)&DAT_80a1a5ec, -// // (daNpcT_motionAnmData_c *)&DAT_80a1a704,(sequenceStepData_c *)&DAT_80a1a8fc,4, -// // (sequenceStepData_c *)&DAT_80a1a98c,4, -// // (daNpcT_evtData_c *)&d_a_npc_jagar::l_bmdData,&PTR_@6305_80a1a5b8); -// } -// *(unsigned int *)(this + 0x4a0) = *(unsigned int *)(this + 0x4a0) | 8; -// } -// // dVar4 = (daNpc_Jagar_c)getType(this); -// // this[0xf80] = dVar4; -// uVar1 = 0xffffffff; -// if (*(unsigned short *)(this + 0x4b4) != 0xffff) { -// uVar1 = (unsigned int)*(unsigned short *)(this + 0x4b4); -// } -// *(unsigned int *)(this + 0xa7c) = uVar1; -// *(unsigned char*)((char*)this + 0xa89) = 0; // Set the byte at offset 0xA89 to 0 -// iVar2 = ((daNpcT_c *)this)->loadRes((const signed char*)&l_loadResPtrn9[*(char*)(this + 0xf80)],(const char **)l_resNameList); -// if (iVar2 == 4) { -// // iVar3 = isDelete(this); -// if (iVar3 == 0) { -// bVar5 = fopAcM_entrySolidHeap -// ((fopAc_ac_c *)this,createHeapCallBack, -// *(u32 *)(&heapSize + (unsigned int)(*(unsigned char*)(this + 0xf80)) * 4)); -// if (bVar5) { -// *(int *)(this + 0x504) = *(int *)(*(int *)(this + 0x578) + 4) + 0x24; -// fopAcM_setCullSizeBox -// ((fopAc_ac_c *)this,-200.0,-100.0,-200.0,200.0,300.0,200.0); -// ((Z2Creature *)(this + 0x580))->init((Vec *)(this + 0x4d0), (Vec *)(this + 0x538), '\x03', '\x01'); -// ((dPaPo_c *)(this + 0x9c0))->init((dBgS_Acch *)(this + 0x68c),0.0f,0.0f); -// (this)->reset(); -// ((dBgS_Acch *)(this + 0x68c))->Set((cXyz *)(this + 0x4d0),(cXyz *)(this + 0x4bc), -// (fopAc_ac_c *)this,1,(dBgS_AcchCir *)(this + 0x8a0),(cXyz *)(this + 0x4f8), -// (csXyz *)(this + 0x4dc),(csXyz *)(this + 0x4e4)); -// ((dCcD_Stts *)(this + 0x864))->Init(0xff,0,(fopAc_ac_c *)this); -// ((dCcD_Cyl *)(this + 0xe44))->Set(daNpcT_c::mCcDCyl); -// *(daNpc_Jagar_c **)(this + 0xe88) = this + 0x864; -// *(void (**)(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*))(this + 0xee8) = ::daNpcT_c::tgHitCallBack; -// ((dBgS_Acch *)(this + 0x68c))->CrrPos(dComIfG_Bgsp()) -// ; -// *(unsigned int *)(this + 0x930) = *(unsigned int *)(this + 0x768); -// *(unsigned int *)(this + 0x934) = *(unsigned int *)(this + 0x76c); -// *(unsigned int *)(this + 0x938) = *(unsigned int *)(this + 0x770); -// this[0x93c] = this[0x774]; -// *(unsigned short *)(this + 0x944) = *(unsigned short *)(this + 0x77c); -// *(unsigned short *)(this + 0x946) = *(unsigned short *)(this + 0x77e); -// *(unsigned int *)(this + 0x948) = *(unsigned int *)(this + 0x780); -// *(unsigned int *)(this + 0x94c) = *(unsigned int *)(this + 0x784); -// *(unsigned int *)(this + 0x954) = *(unsigned int *)(this + 0x78c); -// *(unsigned int *)(this + 0x958) = *(unsigned int *)(this + 0x790); -// *(unsigned int *)(this + 0x95c) = *(unsigned int *)(this + 0x794); -// *(unsigned int *)(this + 0x960) = *(unsigned int *)(this + 0x798); -// *(unsigned int *)(this + 0x964) = *(unsigned int *)(this + 0x79c); -// *(unsigned int *)(this + 0x968) = *(unsigned int *)(this + 0x7a0); -// *(unsigned int *)(this + 0xdf4) = *(unsigned int *)(this + 0x724); -// if (*(float *)(this + 0xdf4) != -1e+09) { -// ((daNpcT_c *)this)->setEnvTevColor(); -// ((daNpcT_c *)this)->setRoomNo(); -// } -// *(unsigned char *)(this + 0xa88) = 0x1; -// // Execute(this); -// *(unsigned char *)(this + 0xa88) = 0x0; -// } -// else { -// iVar2 = 5; -// } -// } -// else { -// iVar2 = 5; -// } -// } -// return iVar2; - return 0; + mType = getType(); + field_0xa7c = getFlowNodeNo(); + field_0xa89 = 0; + int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + if (rv == cPhs_COMPLEATE_e) { + OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, + field_0xa7c, getPathID(), fopAcM_GetParam(this)); + if (isDelete()) { + return cPhs_ERROR_e; + } + OS_REPORT("\n"); + if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) { + OS_REPORT("===>isDelete:TRUE\n"); + return cPhs_ERROR_e; + } + J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); + fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); + fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); + field_0x580.init(¤t.pos, &eyePos, 3, 1); + field_0x9c0.init(&field_0x68c, 60.0f, 0.0f); + reset(); + field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, + &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), + fopAcM_GetShapeAngle_p(this)); + field_0x864.Init(daNpc_Hanjo_Param_c::m.field_0x10, 0, this); + mCyl1.Set(mCcDCyl); // <-- Check value?? + mCyl1.SetStts(&field_0x8B4); // <-- 864 or 8B4? + mCyl1.SetTgHitCallback(tgHitCallBack); + field_0x68c.CrrPos(dComIfG_Bgsp()); + field_0x930 = field_0x68c.m_gnd; + field_0xdf4 = field_0x68c.GetGroundH(); + if (field_0xdf4 != -1e9f) { + setEnvTevColor(); + setRoomNo(); + } + field_0xa88 = 1; + Execute(); + field_0xa88 = 0; + } + return rv; } /* ############################################################################################## */ @@ -1108,7 +1047,7 @@ SECTION_RODATA static f32 const lit_4475 = 1.0f; COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); /* 80A14B20-80A14D90 000500 0270+00 1/1 0/0 0/0 .text CreateHeap__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::CreateHeap() { +int daNpc_Jagar_c::CreateHeap() { // NONMATCHING } @@ -1173,34 +1112,34 @@ extern "C" void __ct__14J3DMatColorAnmFv() { } /* 80A14F4C-80A14F80 00092C 0034+00 1/1 0/0 0/0 .text Delete__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::Delete() { +int daNpc_Jagar_c::Delete() { // NONMATCHING } /* 80A14F80-80A14FA0 000960 0020+00 2/2 0/0 0/0 .text Execute__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::Execute() { +int daNpc_Jagar_c::Execute() { // NONMATCHING } /* ############################################################################################## */ /* 80A1A404-80A1A408 0000D4 0004+00 1/2 0/0 0/0 .rodata @4524 */ -SECTION_RODATA static f32 const lit_4524 = 100.0f; -COMPILER_STRIP_GATE(0x80A1A404, &lit_4524); +// SECTION_RODATA static f32 const lit_4524 = 100.0f; +// COMPILER_STRIP_GATE(0x80A1A404, &lit_4524); /* 80A14FA0-80A15034 000980 0094+00 1/1 0/0 0/0 .text Draw__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::Draw() { +int daNpc_Jagar_c::Draw() { // NONMATCHING } /* 80A15034-80A15054 000A14 0020+00 1/1 0/0 0/0 .text * createHeapCallBack__13daNpc_Jagar_cFP10fopAc_ac_c */ -void daNpc_Jagar_c::createHeapCallBack(fopAc_ac_c* param_0) { +int daNpc_Jagar_c::createHeapCallBack(fopAc_ac_c* i_this) { // NONMATCHING } /* 80A15054-80A150AC 000A34 0058+00 1/1 0/0 0/0 .text * ctrlJointCallBack__13daNpc_Jagar_cFP8J3DJointi */ -void daNpc_Jagar_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) { +int daNpc_Jagar_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) { // NONMATCHING } @@ -1216,8 +1155,134 @@ void daNpc_Jagar_c::isDelete() { /* 80A15198-80A15364 000B78 01CC+00 1/1 0/0 0/0 .text reset__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::reset() { - // NONMATCHING -} + csXyz acStack_20; + initialize(); + for (int i = 0; i < 5; i++) { + mActorMngr[i].initialize(); + } + // int iVar1; +// csXyz in_stack_ffffffda; +// csXyz acStack_20 [2]; + +// csXyz::csXyz(acStack_20); + if (*(int *)(this + 0x9bc) != 0) { + ::daNpcT_MatAnm_c::initialize(*(daNpcT_MatAnm_c **)(this + 0x9bc)); + } + ::daNpcT_c::initialize((daNpcT_c *)this); + for (iVar1 = 0; iVar1 < 5; iVar1 = iVar1 + 1) { + ::daNpcT_ActorMngr_c::initialize((daNpcT_ActorMngr_c *)(this + iVar1 * 8 + 0xfd4)); + } + FUN_800047b4(this + 0x1024,0,0x34); + csXyz::setall(acStack_20,0); + acStack_20[0].y = *(s16 *)(this + 0x4ba); + if ((this[0xfd0] == (daNpc_Jagar_c)0x0) && (iVar1 = d_a_npc::daNpcT_chkEvtBit(0x1c), iVar1 != 0)) + { + iVar1 = d_a_npc::daNpcT_chkEvtBit(0x86); + if (iVar1 == 0) { + d_a_npc::daNpcT_onEvtBit(0x86); + } + this[0x1051] = (daNpc_Jagar_c)0x1; + } + d_a_npc::daNpcT_offTmpBit(0x1b); + d_a_npc::daNpcT_offTmpBit(0x10); + csXyz::csXyz((csXyz *)&stack0xffffffd8,acStack_20); + ::daNpcT_c::setAngle((daNpcT_c *)this,in_stack_ffffffda); + csXyz::~csXyz((csXyz *)&stack0xffffffd8); + return; +} + +// Jagar.reset() +/* +void __thiscall daNpc_Jagar_c::reset(daNpc_Jagar_c *this) + +{ + int iVar1; + csXyz in_stack_ffffffda; + csXyz acStack_20 [2]; + + csXyz::csXyz(acStack_20); + if (*(int *)(this + 0x9bc) != 0) { + ::daNpcT_MatAnm_c::initialize(*(daNpcT_MatAnm_c **)(this + 0x9bc)); + } + ::daNpcT_c::initialize((daNpcT_c *)this); + for (iVar1 = 0; iVar1 < 5; iVar1 = iVar1 + 1) { + ::daNpcT_ActorMngr_c::initialize((daNpcT_ActorMngr_c *)(this + iVar1 * 8 + 0xfd4)); + } + FUN_800047b4(this + 0x1024,0,0x34); + csXyz::setall(acStack_20,0); + acStack_20[0].y = *(s16 *)(this + 0x4ba); + if ((this[0xfd0] == (daNpc_Jagar_c)0x0) && (iVar1 = d_a_npc::daNpcT_chkEvtBit(0x1c), iVar1 != 0)) + { + iVar1 = d_a_npc::daNpcT_chkEvtBit(0x86); + if (iVar1 == 0) { + d_a_npc::daNpcT_onEvtBit(0x86); + } + this[0x1051] = (daNpc_Jagar_c)0x1; + } + d_a_npc::daNpcT_offTmpBit(0x1b); + d_a_npc::daNpcT_offTmpBit(0x10); + csXyz::csXyz((csXyz *)&stack0xffffffd8,acStack_20); + ::daNpcT_c::setAngle((daNpcT_c *)this,in_stack_ffffffda); + csXyz::~csXyz((csXyz *)&stack0xffffffd8); + return; +} + +// Hanjo.reset() +/* +/* WARNING: Inlined function: _savegpr_27 */ +/* WARNING: Inlined function: _restgpr_27 */ +/* WARNING: Removing unreachable block (ram,0x80e4d7fc) */ +/* __thiscall daNpc_Hanjo_c::reset(void) + +void __thiscall daNpc_Hanjo_c::reset(daNpc_Hanjo_c *this) + +{ + char cVar1; + uchar uVar2; + int iVar3; + csXyz in_stack_ffffffda; + csXyz acStack_20 [2]; + + csXyz::csXyz(acStack_20); + if (*(int *)(this + 0x9bc) != 0) { + ::daNpcT_MatAnm_c::initialize(*(daNpcT_MatAnm_c **)(this + 0x9bc)); + } + ::daNpcT_c::initialize((daNpcT_c *)this); + for (iVar3 = 0; iVar3 < 4; iVar3 = iVar3 + 1) { + ::daNpcT_ActorMngr_c::initialize((daNpcT_ActorMngr_c *)(this + iVar3 * 8 + 0x1118)); + } + FUN_800047b4(this + 0x1730,0,0x48); + cVar1 = getPathID(this); + if (cVar1 != -1) { + ::daNpcT_Path_c::initialize((daNpcT_Path_c *)(this + 0x1138)); + cVar1 = f_op_actor_mng::fopAcM_GetRoomNo((fopAc_ac_c *)this); + uVar2 = getPathID(this); + ::daNpcT_Path_c::setPathInfo((daNpcT_Path_c *)(this + 0x1138),uVar2,cVar1,'\0'); + } + csXyz::setall(acStack_20,0); + acStack_20[0].y = *(s16 *)(this + 0x4ba); + if (this[0x1114] == (daNpc_Hanjo_c)0x1) { + iVar3 = d_a_npc::daNpcT_chkEvtBit(0xcf); + if (iVar3 != 0) { + *(short *)(this + 0x4ba) = *(short *)(this + 0x4ba) + -0x8000; + acStack_20[0].y = *(s16 *)(this + 0x4ba); + } + } + else if ((this[0x1114] == (daNpc_Hanjo_c)0x0) && + (iVar3 = d_a_npc::daNpcT_chkEvtBit(0xad), iVar3 != 0)) { + *(undefined4 *)(this + 0x1768) = 0x3f800000; + } + d_a_npc::daNpcT_offTmpBit(0xac); + iVar3 = d_a_npc::daNpcT_chkEvtBit(0xb1); + if (iVar3 != 0) { + d_a_npc::daNpcT_onTmpBit(0xac); + } + csXyz::csXyz((csXyz *)&stack0xffffffd8,acStack_20); + ::daNpcT_c::setAngle((daNpcT_c *)this,in_stack_ffffffda); + csXyz::~csXyz((csXyz *)&stack0xffffffd8); + return; +}*/ + /* 80A15364-80A153E8 000D44 0084+00 1/0 0/0 0/0 .text afterJntAnm__13daNpc_Jagar_cFi */ void daNpc_Jagar_c::afterJntAnm(int param_0) { @@ -1704,28 +1769,28 @@ void daNpc_Jagar_c::talk(void* param_0) { } /* 80A18F28-80A18F48 004908 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Create__FPv */ -static void daNpc_Jagar_Create(void* param_0) { - // NONMATCHING +static int daNpc_Jagar_Create(void* i_this) { + return static_cast(i_this)->create(); } /* 80A18F48-80A18F68 004928 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Delete__FPv */ -static void daNpc_Jagar_Delete(void* param_0) { +static int daNpc_Jagar_Delete(void* i_this) { // NONMATCHING } /* 80A18F68-80A18F88 004948 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Execute__FPv */ -static void daNpc_Jagar_Execute(void* param_0) { +static int daNpc_Jagar_Execute(void* i_this) { // NONMATCHING } /* 80A18F88-80A18FA8 004968 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Draw__FPv */ -static void daNpc_Jagar_Draw(void* param_0) { +static int daNpc_Jagar_Draw(void* i_this) { // NONMATCHING } /* 80A18FA8-80A18FB0 004988 0008+00 1/0 0/0 0/0 .text daNpc_Jagar_IsDelete__FPv */ -static bool daNpc_Jagar_IsDelete(void* param_0) { - return true; +static int daNpc_Jagar_IsDelete(void* i_this) { + return 1; } /* 80A18FB0-80A18FE0 004990 0030+00 1/0 0/0 0/0 .text calc__11J3DTexNoAnmCFPUs */ From bcd3df6bf1e557089b62ab4458d20aa803e82b60 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 12 Feb 2025 20:54:48 -0500 Subject: [PATCH 03/41] Jagar create() - 11% --- include/d/actor/d_a_npc_jagar.h | 27 ++++- src/d/actor/d_a_npc_jagar.cpp | 169 +++++++++++++++++++------------- 2 files changed, 124 insertions(+), 72 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 03e3eef8888..0f3199436e8 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -21,7 +21,7 @@ class daNpc_Jagar_c : public fopAc_ac_c { /* 80A14FA0 */ int Draw(); /* 80A15034 */ static int createHeapCallBack(fopAc_ac_c*); /* 80A15054 */ static int ctrlJointCallBack(J3DJoint*, int); - /* 80A150AC */ void getType(); + /* 80A150AC */ u8 getType(); /* 80A150F8 */ int isDelete(); /* 80A15198 */ void reset(); /* 80A15364 */ void afterJntAnm(int); @@ -66,6 +66,16 @@ class daNpc_Jagar_c : public fopAc_ac_c { /* 80A1A2B4 */ s32 getFootLJointNo(); /* 80A1A2BC */ s32 getFootRJointNo(); + int getFlowNodeNo() { + u16 nodeNo = home.angle.x; + if (nodeNo == 0xffff) { + return -1; + } + return nodeNo; + } + + u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } + static void* mCutNameList[7]; static u8 mCutList[84]; @@ -73,10 +83,23 @@ class daNpc_Jagar_c : public fopAc_ac_c { /* 0x568 */ u8 field_0x568[0x100c - 0x568]; /* 0x0F80 */ u8 mType; /* 0x0F84 */ daNpcF_ActorMngr_c mActorMngr[5]; + int field_0xa7c; + int field_0xa89; + dBgS_AcchCir field_0x580; + dBgS_Acch field_0x68c; + dBgS_AcchCir field_0x9c0; + cXyz field_0x8a0; + cXyz field_0x8B4; + int field_0x768; + int field_0x930; + int field_0x76C; + int field_0x934; + float field_0xdf4; + int field_0xa88; }; -STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); +// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); class daNpc_Jagar_Param_c { public: diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index d67cb5d21b3..9e5534f7c48 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -4,6 +4,14 @@ */ #include "d/actor/d_a_npc_jagar.h" +#include "d/actor/d_a_npc_tk.h" +#include "d/actor/d_a_player.h" +#include "JSystem/J3DGraphBase/J3DMaterial.h" +#include "SSystem/SComponent/c_counter.h" +#include "d/actor/d_a_tag_evtarea.h" +#include "d/d_cc_uty.h" +#include "d/d_particle_copoly.h" +#include "Z2AudioLib/Z2Instances.h" #include "d/actor/d_a_npc.h" #include "f_op/f_op_actor_mng.h" #include "Z2AudioLib/Z2Creature.h" @@ -370,36 +378,31 @@ SECTION_DATA static void* l_resNameList[5] = { }; /* 80A1A5CC-80A1A5D0 000084 0004+00 1/0 0/0 0/0 .data l_loadResPtrn0 */ -SECTION_DATA static u32 l_loadResPtrn0 = 0x010204FF; +// SECTION_DATA static u32 l_loadResPtrn0 = 0x010204FF; +static s8 l_loadResPtrn0[] = { 0x01, 0x02, 0x04, (s8)0xFF }; /* 80A1A5D0-80A1A5D4 000088 0003+01 1/0 0/0 0/0 .data l_loadResPtrn1 */ -SECTION_DATA static u8 l_loadResPtrn1[3 + 1 /* padding */] = { - 0x01, - 0x03, - 0xFF, - /* padding */ - 0x00, +static s8 l_loadResPtrn1[3] = { + 1, + 3, + -1 }; /* 80A1A5D4-80A1A5DC 00008C 0005+03 1/0 0/0 0/0 .data l_loadResPtrn9 */ -SECTION_DATA static u8 l_loadResPtrn9[5 + 3 /* padding */] = { - 0x01, - 0x02, - 0x03, - 0x04, - 0xFF, - /* padding */ - 0x00, - 0x00, - 0x00, +static s8 l_loadResPtrn9[5] = { + 1, + 2, + 3, + 4, + -1 }; /* 80A1A5DC-80A1A5EC -00001 0010+00 1/2 0/0 0/0 .data l_loadResPtrnList */ -SECTION_DATA static void* l_loadResPtrnList[4] = { - (void*)&l_loadResPtrn0, - (void*)&l_loadResPtrn1, - (void*)&l_loadResPtrn9, - (void*)&l_loadResPtrn9, +static s8* l_loadResPtrnList[4] = { + l_loadResPtrn0, + l_loadResPtrn1, + l_loadResPtrn9, + l_loadResPtrn9, }; /* 80A1A5EC-80A1A704 0000A4 0118+00 0/1 0/0 0/0 .data l_faceMotionAnmData */ @@ -988,7 +991,9 @@ int daNpc_Jagar_c::create() { mType = getType(); field_0xa7c = getFlowNodeNo(); field_0xa89 = 0; - int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + int rv = 0; // Placeholder value + /* Work In Progess */ + // int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (rv == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, field_0xa7c, getPathID(), fopAcM_GetParam(this)); @@ -1000,25 +1005,36 @@ int daNpc_Jagar_c::create() { OS_REPORT("===>isDelete:TRUE\n"); return cPhs_ERROR_e; } - J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); - fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); + /* WIP */ + // J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); + // fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); + Z2Creature field_0x580; // <-- Move into header file field_0x580.init(¤t.pos, &eyePos, 3, 1); + dPaPo_c field_0x9c0; // <-- Move into header file field_0x9c0.init(&field_0x68c, 60.0f, 0.0f); reset(); - field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, - &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), - fopAcM_GetShapeAngle_p(this)); - field_0x864.Init(daNpc_Hanjo_Param_c::m.field_0x10, 0, this); + /* WIP */ + // field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, + // &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), + // fopAcM_GetShapeAngle_p(this)); + dCcD_Stts field_0x864; // <-- Move into header file + field_0x864.Init(-1, 0, this); + dCcD_Cyl mCyl1; // <-- Move into header file + dCcD_SrcCyl mCcDCyl; // <-- Move into header file mCyl1.Set(mCcDCyl); // <-- Check value?? - mCyl1.SetStts(&field_0x8B4); // <-- 864 or 8B4? - mCyl1.SetTgHitCallback(tgHitCallBack); + /* WIP */ + // mCyl1.SetStts(&field_0x8B4); // <-- 864 or 8B4? + /* WIP */ + // mCyl1.SetTgHitCallback(tgHitCallBack); field_0x68c.CrrPos(dComIfG_Bgsp()); - field_0x930 = field_0x68c.m_gnd; + // dBgS_GndChk field_0x930; // <-- Move into header file + // field_0x930 = field_0x68c.m_gnd; field_0xdf4 = field_0x68c.GetGroundH(); if (field_0xdf4 != -1e9f) { - setEnvTevColor(); - setRoomNo(); + /* WIP */ + // setEnvTevColor(); + // setRoomNo(); } field_0xa88 = 1; Execute(); @@ -1048,7 +1064,12 @@ COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); /* 80A14B20-80A14D90 000500 0270+00 1/1 0/0 0/0 .text CreateHeap__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::CreateHeap() { - // NONMATCHING + // mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &field_0x580, + // 0x80000, 0x11020284); + // if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { + // return 0; + // } + return 0; // Placeholder value } /* 80A14D90-80A14DCC 000770 003C+00 1/1 0/0 0/0 .text __dt__15J3DTevKColorAnmFv */ @@ -1114,11 +1135,13 @@ extern "C" void __ct__14J3DMatColorAnmFv() { /* 80A14F4C-80A14F80 00092C 0034+00 1/1 0/0 0/0 .text Delete__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::Delete() { // NONMATCHING + return 0; // Placeholder value } /* 80A14F80-80A14FA0 000960 0020+00 2/2 0/0 0/0 .text Execute__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::Execute() { // NONMATCHING + return 0; // Placeholder value } /* ############################################################################################## */ @@ -1129,66 +1152,72 @@ int daNpc_Jagar_c::Execute() { /* 80A14FA0-80A15034 000980 0094+00 1/1 0/0 0/0 .text Draw__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::Draw() { // NONMATCHING + return 0; // Placeholder value } /* 80A15034-80A15054 000A14 0020+00 1/1 0/0 0/0 .text * createHeapCallBack__13daNpc_Jagar_cFP10fopAc_ac_c */ int daNpc_Jagar_c::createHeapCallBack(fopAc_ac_c* i_this) { // NONMATCHING + return 0; // Placeholder value } /* 80A15054-80A150AC 000A34 0058+00 1/1 0/0 0/0 .text * ctrlJointCallBack__13daNpc_Jagar_cFP8J3DJointi */ int daNpc_Jagar_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) { // NONMATCHING + return 0; // Placeholder value } /* 80A150AC-80A150F8 000A8C 004C+00 1/1 0/0 2/2 .text getType__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::getType() { +u8 daNpc_Jagar_c::getType() { // NONMATCHING + return 0; // Placeholder value } /* 80A150F8-80A15198 000AD8 00A0+00 1/1 0/0 0/0 .text isDelete__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::isDelete() { +int daNpc_Jagar_c::isDelete() { // NONMATCHING + return 0; // Placeholder value } /* 80A15198-80A15364 000B78 01CC+00 1/1 0/0 0/0 .text reset__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::reset() { - csXyz acStack_20; - initialize(); - for (int i = 0; i < 5; i++) { - mActorMngr[i].initialize(); - } - // int iVar1; -// csXyz in_stack_ffffffda; -// csXyz acStack_20 [2]; + /* WIP */ +// csXyz acStack_20; +// initialize(); +// for (int i = 0; i < 5; i++) { +// mActorMngr[i].initialize(); +// } +// // int iVar1; +// // csXyz in_stack_ffffffda; +// // csXyz acStack_20 [2]; -// csXyz::csXyz(acStack_20); - if (*(int *)(this + 0x9bc) != 0) { - ::daNpcT_MatAnm_c::initialize(*(daNpcT_MatAnm_c **)(this + 0x9bc)); - } - ::daNpcT_c::initialize((daNpcT_c *)this); - for (iVar1 = 0; iVar1 < 5; iVar1 = iVar1 + 1) { - ::daNpcT_ActorMngr_c::initialize((daNpcT_ActorMngr_c *)(this + iVar1 * 8 + 0xfd4)); - } - FUN_800047b4(this + 0x1024,0,0x34); - csXyz::setall(acStack_20,0); - acStack_20[0].y = *(s16 *)(this + 0x4ba); - if ((this[0xfd0] == (daNpc_Jagar_c)0x0) && (iVar1 = d_a_npc::daNpcT_chkEvtBit(0x1c), iVar1 != 0)) - { - iVar1 = d_a_npc::daNpcT_chkEvtBit(0x86); - if (iVar1 == 0) { - d_a_npc::daNpcT_onEvtBit(0x86); - } - this[0x1051] = (daNpc_Jagar_c)0x1; - } - d_a_npc::daNpcT_offTmpBit(0x1b); - d_a_npc::daNpcT_offTmpBit(0x10); - csXyz::csXyz((csXyz *)&stack0xffffffd8,acStack_20); - ::daNpcT_c::setAngle((daNpcT_c *)this,in_stack_ffffffda); - csXyz::~csXyz((csXyz *)&stack0xffffffd8); - return; +// // csXyz::csXyz(acStack_20); +// if (*(int *)(this + 0x9bc) != 0) { +// ::daNpcT_MatAnm_c::initialize(*(daNpcT_MatAnm_c **)(this + 0x9bc)); +// } +// ::daNpcT_c::initialize((daNpcT_c *)this); +// for (iVar1 = 0; iVar1 < 5; iVar1 = iVar1 + 1) { +// ::daNpcT_ActorMngr_c::initialize((daNpcT_ActorMngr_c *)(this + iVar1 * 8 + 0xfd4)); +// } +// FUN_800047b4(this + 0x1024,0,0x34); +// csXyz::setall(acStack_20,0); +// acStack_20[0].y = *(s16 *)(this + 0x4ba); +// if ((this[0xfd0] == (daNpc_Jagar_c)0x0) && (iVar1 = d_a_npc::daNpcT_chkEvtBit(0x1c), iVar1 != 0)) +// { +// iVar1 = d_a_npc::daNpcT_chkEvtBit(0x86); +// if (iVar1 == 0) { +// d_a_npc::daNpcT_onEvtBit(0x86); +// } +// this[0x1051] = (daNpc_Jagar_c)0x1; +// } +// d_a_npc::daNpcT_offTmpBit(0x1b); +// d_a_npc::daNpcT_offTmpBit(0x10); +// csXyz::csXyz((csXyz *)&stack0xffffffd8,acStack_20); +// ::daNpcT_c::setAngle((daNpcT_c *)this,in_stack_ffffffda); +// csXyz::~csXyz((csXyz *)&stack0xffffffd8); +// return; } // Jagar.reset() From 52b7b773dccb570897f5ac05d08c879e20611352 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Thu, 13 Feb 2025 15:26:00 -0500 Subject: [PATCH 04/41] Continued work on daNpc_Jagar_c --- include/d/actor/d_a_npc_jagar.h | 34 ++++++++++++++++----------------- src/d/actor/d_a_npc_jagar.cpp | 29 ++++++++++------------------ 2 files changed, 27 insertions(+), 36 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 0f3199436e8..9e1bc3f8057 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -11,7 +11,7 @@ * @details * */ -class daNpc_Jagar_c : public fopAc_ac_c { +class daNpc_Jagar_c : public daNpcT_c { public: /* 80A1470C */ ~daNpc_Jagar_c(); /* 80A14858 */ int create(); @@ -78,28 +78,28 @@ class daNpc_Jagar_c : public fopAc_ac_c { static void* mCutNameList[7]; static u8 mCutList[84]; - private: - /* 0x568 */ u8 field_0x568[0x100c - 0x568]; + /* 0x0568 */ u8 field_0x568[0x100c - 0x568]; /* 0x0F80 */ u8 mType; /* 0x0F84 */ daNpcF_ActorMngr_c mActorMngr[5]; - int field_0xa7c; - int field_0xa89; - dBgS_AcchCir field_0x580; - dBgS_Acch field_0x68c; - dBgS_AcchCir field_0x9c0; - cXyz field_0x8a0; - cXyz field_0x8B4; - int field_0x768; - int field_0x930; - int field_0x76C; - int field_0x934; - float field_0xdf4; - int field_0xa88; + // int field_0xa7c; + // int field_0xa89; + /* 0x0E44 */ dCcD_Cyl mCyl1; + + /* WIP */ + // dBgS_AcchCir field_0x580; + // dBgS_AcchCir field_0x9c0; + // cXyz field_0x8a0; + // cXyz field_0x8B4; + // int field_0x768; + // int field_0x76C; + // int field_0x934; + // float field_0xdf4; + // int field_0xa88; }; -// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); +STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x1018); class daNpc_Jagar_Param_c { public: diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 9e5534f7c48..28ab1a37e7a 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1009,32 +1009,23 @@ int daNpc_Jagar_c::create() { // J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); // fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); - Z2Creature field_0x580; // <-- Move into header file field_0x580.init(¤t.pos, &eyePos, 3, 1); - dPaPo_c field_0x9c0; // <-- Move into header file field_0x9c0.init(&field_0x68c, 60.0f, 0.0f); reset(); - /* WIP */ - // field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, - // &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), - // fopAcM_GetShapeAngle_p(this)); - dCcD_Stts field_0x864; // <-- Move into header file - field_0x864.Init(-1, 0, this); - dCcD_Cyl mCyl1; // <-- Move into header file - dCcD_SrcCyl mCcDCyl; // <-- Move into header file + field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, + &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), + fopAcM_GetShapeAngle_p(this)); + field_0x864.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); + // dCcD_SrcCyl mCcDCyl; // <-- Move into header file? mCyl1.Set(mCcDCyl); // <-- Check value?? - /* WIP */ - // mCyl1.SetStts(&field_0x8B4); // <-- 864 or 8B4? - /* WIP */ - // mCyl1.SetTgHitCallback(tgHitCallBack); + mCyl1.SetStts(&field_0x8B4); // <-- 864 or 8B4? + mCyl1.SetTgHitCallback(tgHitCallBack); field_0x68c.CrrPos(dComIfG_Bgsp()); - // dBgS_GndChk field_0x930; // <-- Move into header file - // field_0x930 = field_0x68c.m_gnd; + field_0x930 = field_0x68c.m_gnd; field_0xdf4 = field_0x68c.GetGroundH(); if (field_0xdf4 != -1e9f) { - /* WIP */ - // setEnvTevColor(); - // setRoomNo(); + setEnvTevColor(); + setRoomNo(); } field_0xa88 = 1; Execute(); From 3f7e0fee22e070683c1a59b68d71ee6aa3e588bd Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Thu, 13 Feb 2025 21:16:33 -0500 Subject: [PATCH 05/41] Jagar create() - 87% --- include/d/actor/d_a_npc_jagar.h | 29 ++++---- src/d/actor/d_a_npc_jagar.cpp | 127 +++++++++----------------------- 2 files changed, 49 insertions(+), 107 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 9e1bc3f8057..2088ae71d67 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -26,16 +26,16 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A15198 */ void reset(); /* 80A15364 */ void afterJntAnm(int); /* 80A153E8 */ void setParam(); - /* 80A155E4 */ void checkChangeEvt(); + /* 80A155E4 */ bool checkChangeEvt(); /* 80A15714 */ void setAfterTalkMotion(); /* 80A157B4 */ void srchActors(); - /* 80A158A0 */ void evtTalk(); - /* 80A15940 */ void evtCutProc(); + /* 80A158A0 */ bool evtTalk(); + /* 80A15940 */ bool evtCutProc(); /* 80A15A08 */ void action(); /* 80A15CA4 */ void beforeMove(); /* 80A15D68 */ void setAttnPos(); /* 80A1607C */ void setCollision(); - /* 80A161EC */ bool drawDbgInfo(); + /* 80A161EC */ int drawDbgInfo(); /* 80A161F4 */ void changeBtp(int*, int*); /* 80A16234 */ void selectAction(); /* 80A162B0 */ void chkAction(int (daNpc_Jagar_c::*)(void*)); @@ -53,16 +53,18 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A17A2C */ void wait(void*); /* 80A1856C */ void talkwithBou(void*); /* 80A18B74 */ void talk(void*); - /* 80A1A194 */ daNpc_Jagar_c(daNpcT_faceMotionAnmData_c const*, daNpcT_motionAnmData_c const*, - daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int, - daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int, - daNpcT_evtData_c const*, char**); + /* 80A1A194 */ daNpc_Jagar_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2, + daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4, + daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6, + daNpcT_evtData_c const* param_7, char** param_8) : + daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) + {} /* 80A1A274 */ s32 getEyeballMaterialNo(); /* 80A1A27C */ s32 getHeadJointNo(); /* 80A1A284 */ s32 getNeckJointNo(); - /* 80A1A28C */ bool getBackboneJointNo(); - /* 80A1A294 */ void checkChangeJoint(int); - /* 80A1A2A4 */ void checkRemoveJoint(int); + /* 80A1A28C */ s32 getBackboneJointNo(); + /* 80A1A294 */ int checkChangeJoint(int); + /* 80A1A2A4 */ int checkRemoveJoint(int); /* 80A1A2B4 */ s32 getFootLJointNo(); /* 80A1A2BC */ s32 getFootRJointNo(); @@ -99,11 +101,11 @@ class daNpc_Jagar_c : public daNpcT_c { }; -STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x1018); +// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); class daNpc_Jagar_Param_c { public: - /* 80A1A2C4 */ ~daNpc_Jagar_Param_c(); + /* 80A1A2C4 */ virtual ~daNpc_Jagar_Param_c() {} struct param { float field_0; // 160.0f @@ -150,6 +152,7 @@ class daNpc_Jagar_Param_c { float field_41; // -800.0f float field_42; // 16.0f float field_43; // 1800.0f + /* 0x10 */ f32 field_0x10; }; static daNpc_Jagar_Param_c::param const m; }; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 28ab1a37e7a..7802c5d5c8f 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -831,71 +831,6 @@ SECTION_DATA extern void* __vt__13daNpc_Jagar_c[49] = { /* 80A1470C-80A14858 0000EC 014C+00 1/0 0/0 0/0 .text __dt__13daNpc_Jagar_cFv */ daNpc_Jagar_c::~daNpc_Jagar_c() { - short in_r4; - if (this == NULL) return; - - // Assign pointer at offset 0xe3c - *(void**)((char*)this + 0xe3c) = __vt__13daNpc_Jagar_c; - - // Stop animation if it exists - mDoExt_McaMorfSO* animation = *(mDoExt_McaMorfSO**)((char*)this + 0x578); - if (animation != NULL) { - animation->stopZelAnime(); - } - - // Delete resources - // void deleteRes( - // // reinterpret_cast(this), - // l_loadResPtrn9[*(unsigned int*)((char*)this + 0xf80)], - // (const char **)l_resNameList - // ); - - // Assign pointer at offset 0xfd0 (if not specific memory location) - if (this != reinterpret_cast(0xfffff054)) { - *(void**)((char*)this + 0xfd0) = __vt__13daNpcT_Path_c; - } - - // Destroy an array of `daNpcT_ActorMngr_c` objects - // __destroy_arr( - // (char*)this + 0xf84, - // ~daNpcT_ActorMngr_c, - // 8, 5 - // ); - - // Assign virtual tables and pointers for collision objects - // if (this != reinterpret_cast(0xfffff1bc)) { - // *(void**)((char*)this + 0xe80) = &dCcD_Cyl::__vt; - // *(void**)((char*)this + 0xf64) = &PTR_803ac07c; - // *(void**)((char*)this + 0xf7c) = &PTR_803ac0d4; - - // if (this != reinterpret_cast(0xfffff0b8)) { - // *(void**)((char*)this + 0xf64) = &cCcD_CylAttr::__vt; - // *(void**)((char*)this + 0xf7c) = &PTR_803c35fc; - - // if (this != reinterpret_cast(0xfffff098)) { - // *(void**)((char*)this + 0xf7c) = &DAT_80a1acf0; - // } - - // if (this != reinterpret_cast(0xfffff0b8)) { - // *(void**)((char*)this + 0xf64) = &cCcD_ShapeAttr::__vt; - - // if (this != reinterpret_cast(0xfffff0b8)) { - // *(void**)((char*)this + 0xf60) = &DAT_80a1ace4; - // } - // } - // } - // } - - // Destroy collision object - reinterpret_cast((char*)this + 0xe44)->~dCcD_GObjInf(); - - // Call base class destructor - reinterpret_cast(this)->~daNpcT_c(); - - // Free memory if in_r4 > 0 - // if (in_r4 > 0) { - // JKernel::operator_delete(this); - // } // NONMATCHING } @@ -991,9 +926,7 @@ int daNpc_Jagar_c::create() { mType = getType(); field_0xa7c = getFlowNodeNo(); field_0xa89 = 0; - int rv = 0; // Placeholder value - /* Work In Progess */ - // int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (rv == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, field_0xa7c, getPathID(), fopAcM_GetParam(this)); @@ -1005,9 +938,8 @@ int daNpc_Jagar_c::create() { OS_REPORT("===>isDelete:TRUE\n"); return cPhs_ERROR_e; } - /* WIP */ - // J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); - // fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); + J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); + fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); field_0x580.init(¤t.pos, &eyePos, 3, 1); field_0x9c0.init(&field_0x68c, 60.0f, 0.0f); @@ -1016,9 +948,8 @@ int daNpc_Jagar_c::create() { &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), fopAcM_GetShapeAngle_p(this)); field_0x864.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); - // dCcD_SrcCyl mCcDCyl; // <-- Move into header file? mCyl1.Set(mCcDCyl); // <-- Check value?? - mCyl1.SetStts(&field_0x8B4); // <-- 864 or 8B4? + mCyl1.SetStts(&field_0x864); mCyl1.SetTgHitCallback(tgHitCallBack); field_0x68c.CrrPos(dComIfG_Bgsp()); field_0x930 = field_0x68c.m_gnd; @@ -1316,8 +1247,9 @@ void daNpc_Jagar_c::setParam() { /* 80A155E4-80A15714 000FC4 0130+00 1/0 0/0 0/0 .text checkChangeEvt__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::checkChangeEvt() { +bool daNpc_Jagar_c::checkChangeEvt() { // NONMATCHING + return true; // Placeholder value } /* ############################################################################################## */ @@ -1336,13 +1268,15 @@ void daNpc_Jagar_c::srchActors() { } /* 80A158A0-80A15940 001280 00A0+00 1/0 0/0 0/0 .text evtTalk__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::evtTalk() { +bool daNpc_Jagar_c::evtTalk() { // NONMATCHING + return true; // Placeholder value } /* 80A15940-80A15A08 001320 00C8+00 1/0 0/0 0/0 .text evtCutProc__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::evtCutProc() { +bool daNpc_Jagar_c::evtCutProc() { // NONMATCHING + return true; // Placeholder value } /* 80A15A08-80A15CA4 0013E8 029C+00 1/0 0/0 0/0 .text action__13daNpc_Jagar_cFv */ @@ -1572,8 +1506,8 @@ void daNpc_Jagar_c::setCollision() { } /* 80A161EC-80A161F4 001BCC 0008+00 1/0 0/0 0/0 .text drawDbgInfo__13daNpc_Jagar_cFv */ -bool daNpc_Jagar_c::drawDbgInfo() { - return false; +int daNpc_Jagar_c::drawDbgInfo() { + return 0; // Placeholder value } /* 80A161F4-80A16234 001BD4 0040+00 1/0 0/0 0/0 .text changeBtp__13daNpc_Jagar_cFPiPi */ @@ -1796,21 +1730,24 @@ static int daNpc_Jagar_Create(void* i_this) { /* 80A18F48-80A18F68 004928 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Delete__FPv */ static int daNpc_Jagar_Delete(void* i_this) { // NONMATCHING + return 1; // Placeholder value } /* 80A18F68-80A18F88 004948 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Execute__FPv */ static int daNpc_Jagar_Execute(void* i_this) { // NONMATCHING + return 1; // Placeholder value } /* 80A18F88-80A18FA8 004968 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Draw__FPv */ static int daNpc_Jagar_Draw(void* i_this) { // NONMATCHING + return 1; // Placeholder value } /* 80A18FA8-80A18FB0 004988 0008+00 1/0 0/0 0/0 .text daNpc_Jagar_IsDelete__FPv */ static int daNpc_Jagar_IsDelete(void* i_this) { - return 1; + return 1; // Placeholder value } /* 80A18FB0-80A18FE0 004990 0030+00 1/0 0/0 0/0 .text calc__11J3DTexNoAnmCFPUs */ @@ -2077,14 +2014,14 @@ REGISTER_CTORS(0x80A1A098, __sinit_d_a_npc_jagar_cpp); /* 80A1A194-80A1A274 005B74 00E0+00 1/1 0/0 0/0 .text * __ct__13daNpc_Jagar_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc */ -daNpc_Jagar_c::daNpc_Jagar_c(daNpcT_faceMotionAnmData_c const* param_0, - daNpcT_motionAnmData_c const* param_1, - daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_2, - int param_3, - daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_4, - int param_5, daNpcT_evtData_c const* param_6, char** param_7) { - // NONMATCHING -} +// daNpc_Jagar_c::daNpc_Jagar_c(daNpcT_faceMotionAnmData_c const* param_0, +// daNpcT_motionAnmData_c const* param_1, +// daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_2, +// int param_3, +// daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_4, +// int param_5, daNpcT_evtData_c const* param_6, char** param_7) { +// // NONMATCHING +// } /* 80A1A274-80A1A27C 005C54 0008+00 1/0 0/0 0/0 .text getEyeballMaterialNo__13daNpc_Jagar_cFv */ s32 daNpc_Jagar_c::getEyeballMaterialNo() { @@ -2104,20 +2041,22 @@ s32 daNpc_Jagar_c::getNeckJointNo() { } /* 80A1A28C-80A1A294 005C6C 0008+00 1/0 0/0 0/0 .text getBackboneJointNo__13daNpc_Jagar_cFv */ -bool daNpc_Jagar_c::getBackboneJointNo() { - return true; +long daNpc_Jagar_c::getBackboneJointNo() { + return 0; // Placeholder value } /* 80A1A294-80A1A2A4 005C74 0010+00 1/0 0/0 0/0 .text checkChangeJoint__13daNpc_Jagar_cFi */ -void daNpc_Jagar_c::checkChangeJoint(int param_0) { +int daNpc_Jagar_c::checkChangeJoint(int param_0) { // NONMATCHING + return 0; // Placeholder value } /* 80A1A2A4-80A1A2B4 005C84 0010+00 1/0 0/0 0/0 .text checkRemoveJoint__13daNpc_Jagar_cFi */ -void daNpc_Jagar_c::checkRemoveJoint(int param_0) { +int daNpc_Jagar_c::checkRemoveJoint(int param_0) { // NONMATCHING + return 0; // Placeholder value } /* 80A1A2B4-80A1A2BC 005C94 0008+00 1/0 0/0 0/0 .text getFootLJointNo__13daNpc_Jagar_cFv @@ -2133,9 +2072,9 @@ s32 daNpc_Jagar_c::getFootRJointNo() { } /* 80A1A2C4-80A1A30C 005CA4 0048+00 2/1 0/0 0/0 .text __dt__19daNpc_Jagar_Param_cFv */ -daNpc_Jagar_Param_c::~daNpc_Jagar_Param_c() { - // NONMATCHING -} +// daNpc_Jagar_Param_c::~daNpc_Jagar_Param_c() { +// // NONMATCHING +// } /* 80A1A30C-80A1A314 005CEC 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ static void func_80A1A30C() { From db2e20f52a1738683fe6f35bbd0928c97065a162 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Fri, 14 Feb 2025 15:19:43 -0500 Subject: [PATCH 06/41] Continues work on Jagar --- include/d/actor/d_a_npc_jagar.h | 9 ++++++ src/d/actor/d_a_npc_jagar.cpp | 50 +++++++++++++++++++++++++++------ 2 files changed, 51 insertions(+), 8 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 2088ae71d67..b16e80d40bf 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -2,6 +2,7 @@ #define D_A_NPC_JAGAR_H #include "d/actor/d_a_npc.h" +#include "f_op/f_op_actor_mng.h" // <-- Does this get the GetParam function? /** * @ingroup actors-npcs @@ -13,6 +14,13 @@ */ class daNpc_Jagar_c : public daNpcT_c { public: + enum Type { + TYPE_0, + TYPE_1, + TYPE_2, + TYPE_3, + }; + /* 80A1470C */ ~daNpc_Jagar_c(); /* 80A14858 */ int create(); /* 80A14B20 */ int CreateHeap(); @@ -87,6 +95,7 @@ class daNpc_Jagar_c : public daNpcT_c { // int field_0xa7c; // int field_0xa89; /* 0x0E44 */ dCcD_Cyl mCyl1; + /* 0x0FE0 */ actionFunc field_0x0fe0; /* WIP */ // dBgS_AcchCir field_0x580; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 7802c5d5c8f..800689c7557 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1093,8 +1093,16 @@ int daNpc_Jagar_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) { /* 80A150AC-80A150F8 000A8C 004C+00 1/1 0/0 2/2 .text getType__13daNpc_Jagar_cFv */ u8 daNpc_Jagar_c::getType() { - // NONMATCHING - return 0; // Placeholder value + switch ((u8)fopAcM_GetParam(this)) { + case 0: + return TYPE_0; + case 1: + return TYPE_1; + case 2: + return TYPE_2; + case 3: + return TYPE_3; + } } /* 80A150F8-80A15198 000AD8 00A0+00 1/1 0/0 0/0 .text isDelete__13daNpc_Jagar_cFv */ @@ -1236,8 +1244,14 @@ void __thiscall daNpc_Hanjo_c::reset(daNpc_Hanjo_c *this) /* 80A15364-80A153E8 000D44 0084+00 1/0 0/0 0/0 .text afterJntAnm__13daNpc_Jagar_cFi */ -void daNpc_Jagar_c::afterJntAnm(int param_0) { - // NONMATCHING +void daNpc_Jagar_c::afterJntAnm(int param_1) { + if (param_1 == 1) { + mDoMtx_stack_c::YrotM(field_0xd08.getAngleZ(1)); + mDoMtx_stack_c::ZrotM(-field_0xd08.getAngleX(1)); + } else if (param_1 == 4) { + mDoMtx_stack_c::YrotM(field_0xd08.getAngleZ(0)); + mDoMtx_stack_c::ZrotM(field_0xd08.getAngleX(0)); + } } /* 80A153E8-80A155E4 000DC8 01FC+00 1/0 0/0 0/0 .text setParam__13daNpc_Jagar_cFv */ @@ -1259,18 +1273,38 @@ COMPILER_STRIP_GATE(0x80A1A408, &lit_4718); /* 80A15714-80A157B4 0010F4 00A0+00 1/0 0/0 0/0 .text setAfterTalkMotion__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setAfterTalkMotion() { - // NONMATCHING + int iVar2 = 8; + switch(field_0xb50.getNo()) { + case 0: + iVar2 = 6; + break; + case 1: + break; + case 2: + iVar2 = 7; + break; + case 3: + iVar2 = 5; + break; + } + field_0xb50.setNo(iVar2, -1.0f, 0, 0); } /* 80A157B4-80A158A0 001194 00EC+00 1/1 0/0 0/0 .text srchActors__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::srchActors() { - // NONMATCHING + switch(mType) { + + } } /* 80A158A0-80A15940 001280 00A0+00 1/0 0/0 0/0 .text evtTalk__13daNpc_Jagar_cFv */ bool daNpc_Jagar_c::evtTalk() { - // NONMATCHING - return true; // Placeholder value + if (chkAction(&daNpc_Jagar_c::talk)) { + (this->*field_0x0fe0)(NULL); + } else { + setAction(&daNpc_Jagar_c::talk); + } + return 1; } /* 80A15940-80A15A08 001320 00C8+00 1/0 0/0 0/0 .text evtCutProc__13daNpc_Jagar_cFv */ From bdb2f5bd9c057eb391a69957dc0647b2bedc0ef3 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Mon, 17 Feb 2025 15:07:22 -0500 Subject: [PATCH 07/41] Work on Jagar.checkChangeEvt() --- include/d/actor/d_a_npc_jagar.h | 3 +- src/d/actor/d_a_npc_jagar.cpp | 51 +++++++++++++++++++++++++++++---- 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index b16e80d40bf..4bef63d1c94 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -92,8 +92,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0568 */ u8 field_0x568[0x100c - 0x568]; /* 0x0F80 */ u8 mType; /* 0x0F84 */ daNpcF_ActorMngr_c mActorMngr[5]; - // int field_0xa7c; - // int field_0xa89; + /* 0x0F94 */ daNpcT_ActorMngr_c field_0x0f94; /* 0x0E44 */ dCcD_Cyl mCyl1; /* 0x0FE0 */ actionFunc field_0x0fe0; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 800689c7557..a23da7fba46 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -19,6 +19,7 @@ #include "d/d_bg_s_acch.h" #include "d/d_cc_d.h" #include "d/d_com_inf_game.h" +#include "d/d_a_npc_bou.h" // For action method? #include "dol2asm.h" // @@ -1262,8 +1263,9 @@ void daNpc_Jagar_c::setParam() { /* 80A155E4-80A15714 000FC4 0130+00 1/0 0/0 0/0 .text checkChangeEvt__13daNpc_Jagar_cFv */ bool daNpc_Jagar_c::checkChangeEvt() { - // NONMATCHING - return true; // Placeholder value + if (!chkAction(&daNpc_Jagar_c::talk)) { + field_0xe2e[0] = 0; + } } /* ############################################################################################## */ @@ -1309,18 +1311,55 @@ bool daNpc_Jagar_c::evtTalk() { /* 80A15940-80A15A08 001320 00C8+00 1/0 0/0 0/0 .text evtCutProc__13daNpc_Jagar_cFv */ bool daNpc_Jagar_c::evtCutProc() { - // NONMATCHING - return true; // Placeholder value + int staffId = dComIfGp_getEventManager().getMyStaffId("Jagar", this, -1); + if (staffId != -1) { + field_0xdac = staffId; + int actIdx = + dComIfGp_getEventManager().getMyActIdx(field_0xdac, (char**)mCutNameList, 7, 0, 0); + if ((this->*(mCutList[actIdx]))(field_0xdac) != 0) { + dComIfGp_getEventManager().cutEnd(field_0xdac); + } + return true; + } + return false; } /* 80A15A08-80A15CA4 0013E8 029C+00 1/0 0/0 0/0 .text action__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::action() { - // NONMATCHING + fopAc_ac_c* hitActor = hitChk(&mCyl1, 0xffffffff); + /* WIP */ + if (hitActor != NULL) { + if (mType == 1) { + daNpc_Bou_c* this_00 = getActorP(field_0xf94) + if (this_00 && this_00->getType() == 1 && field_0xd08.mStagger == 0) { + if (field_0xb50.mNo != 1) { + field_0xb50.intialize(); + field_0xb50.mNo = 1; + field_0xb50.field_0x18 = -1; + } + if (field_0xb74.mNo != 3) { + field_0xb74.initialize(); + field_0xb74.mNo = 3; + field_0xb74.field_0x18 = -1; + } + // *(undefined2 *)(this + 0xcd4) = 0; + // *(undefined2 *)(this + 0xcd6) = 0; + // this[0xcff] = (daNpc_Jagar_c)0x1; + } + + } + } } /* 80A15CA4-80A15D68 001684 00C4+00 1/0 0/0 0/0 .text beforeMove__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::beforeMove() { - // NONMATCHING + fopAcM_OffStatus(this, 0x8000000); + if (checkHide()) { + fopAcM_OnStatus(this, 0x8000000); + } + if (checkHide() || field_0xe2b != 0) { + attention_info.flags = 0; + } } /* ############################################################################################## */ From 6c9db9819fd60f56543529bd4849fee12c2e9ff5 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Tue, 18 Feb 2025 17:24:06 -0500 Subject: [PATCH 08/41] Working on Jagar.talk() --- include/d/actor/d_a_npc_bou.h | 2 +- include/d/actor/d_a_npc_jagar.h | 129 ++-- src/d/actor/d_a_npc_bou.cpp | 17 +- src/d/actor/d_a_npc_jagar.cpp | 1080 ++++++++++++++++--------------- 4 files changed, 640 insertions(+), 588 deletions(-) diff --git a/include/d/actor/d_a_npc_bou.h b/include/d/actor/d_a_npc_bou.h index ee383764b51..b3e3121c6e2 100644 --- a/include/d/actor/d_a_npc_bou.h +++ b/include/d/actor/d_a_npc_bou.h @@ -23,7 +23,7 @@ class daNpc_Bou_c : public daNpcT_c { /* 8096D8C0 */ void ctrlJointCallBack(J3DJoint*, int); /* 8096D918 */ void srchCow(void*, void*); /* 8096D9B4 */ void getCowP(); - /* 8096DA78 */ void getType(); + /* 8096DA78 */ u8 getType(); /* 8096DADC */ void isDelete(); /* 8096DBBC */ void reset(); /* 8096E18C */ void srchActors(); diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 4bef63d1c94..2ff24e00849 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -14,11 +14,15 @@ */ class daNpc_Jagar_c : public daNpcT_c { public: + typedef int (daNpc_Jagar_c::*cutFunc)(int); + typedef int (daNpc_Jagar_c::*actionFunc)(void*); + enum Type { TYPE_0, TYPE_1, TYPE_2, TYPE_3, + TYPE_4, }; /* 80A1470C */ ~daNpc_Jagar_c(); @@ -46,21 +50,21 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A161EC */ int drawDbgInfo(); /* 80A161F4 */ void changeBtp(int*, int*); /* 80A16234 */ void selectAction(); - /* 80A162B0 */ void chkAction(int (daNpc_Jagar_c::*)(void*)); + /* 80A162B0 */ int chkAction(int (daNpc_Jagar_c::*)(void*)); /* 80A162DC */ void setAction(int (daNpc_Jagar_c::*)(void*)); - /* 80A16384 */ void cutClimbUp(int); - /* 80A16544 */ void cutNeedYourHelp(int); - /* 80A16CD8 */ void cutAnger(int); - /* 80A16EFC */ void cutConversationWithBou(int); - /* 80A1705C */ void cutConfidentialConversation(int); - /* 80A173D8 */ void cutFindWolf(int); + /* 80A16384 */ int cutClimbUp(int); + /* 80A16544 */ int cutNeedYourHelp(int); + /* 80A16CD8 */ int cutAnger(int); + /* 80A16EFC */ int cutConversationWithBou(int); + /* 80A1705C */ int cutConfidentialConversation(int); + /* 80A173D8 */ int cutFindWolf(int); /* 80A17898 */ void chkSitMotion(); /* 80A17924 */ void chkSitMotion2(); /* 80A17984 */ void chkChuMotion(); /* 80A179F8 */ void chkToMotion(); /* 80A17A2C */ void wait(void*); /* 80A1856C */ void talkwithBou(void*); - /* 80A18B74 */ void talk(void*); + /* 80A18B74 */ int talk(void*); /* 80A1A194 */ daNpc_Jagar_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2, daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4, daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6, @@ -86,15 +90,19 @@ class daNpc_Jagar_c : public daNpcT_c { u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } - static void* mCutNameList[7]; - static u8 mCutList[84]; + static char* mCutNameList[7]; + static cutFunc mCutList[7]; private: + /* 0x00B0 */ int field_0xb0; /* 0x0568 */ u8 field_0x568[0x100c - 0x568]; + /* 0x0BA0 */ daNpcT_ActorMngr_c field_0x0ba0; + /* 0x0E30 */ int field_0xe30; + /* 0x0E44 */ dCcD_Cyl mCyl1; /* 0x0F80 */ u8 mType; /* 0x0F84 */ daNpcF_ActorMngr_c mActorMngr[5]; - /* 0x0F94 */ daNpcT_ActorMngr_c field_0x0f94; - /* 0x0E44 */ dCcD_Cyl mCyl1; - /* 0x0FE0 */ actionFunc field_0x0fe0; + /* 0x0F94 */ daNpcT_ActorMngr_c field_0xf94; + /* 0x0FE0 */ actionFunc field_0xfe0; + /* 0x0FE4 */ actionFunc field_0xfe4; /* WIP */ // dBgS_AcchCir field_0x580; @@ -109,58 +117,63 @@ class daNpc_Jagar_c : public daNpcT_c { }; -// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); +// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x172c); class daNpc_Jagar_Param_c { public: /* 80A1A2C4 */ virtual ~daNpc_Jagar_Param_c() {} struct param { - float field_0; // 160.0f - float field_1; // -3.0f - float field_2; // 1.0f - float field_3; // 400.0f - float field_4; // 255.0f - float field_5; // 160.0f - float field_6; // 35.0f - float field_7; // 30.0f - float field_8; // 0.0f - float field_9; // 0.0f - float field_10; // 10.0f - float field_11; // -10.0f - float field_12; // 30.0f - float field_13; // -10.0f - float field_14; // 45.0f - float field_15; // -45.0f - float field_16; // 0.6f - float field_17; // 12.0f - int field_18; // 3 - int field_19; // 6 - int field_20; // 5 - int field_21; // 6 - float field_22; // 110.0f - float field_23; // 500.0f - float field_24; // 300.0f - float field_25; // -300.0f - float field_26; // 60 - int field_27; // 8 - float field_28; // 0.0f - float field_29; // 0.0f - float field_30; // 0.0f - float field_31; // 4.0f - float field_32; // 0.0f - float field_33; // 0.0f - float field_34; // 0.0f - float field_35; // 0.0f - float field_36; // 0.0f - float field_37; // 0.0f - float field_38; // 0.0f - float field_39; // 1400.0f - float field_40; // 200.0f - float field_41; // -800.0f - float field_42; // 16.0f - float field_43; // 1800.0f + /* 0x00 */ f32 field_0x00; + /* 0x04 */ f32 field_0x04; + /* 0x08 */ f32 field_0x08; + /* 0x0C */ f32 field_0x0c; /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ f32 field_0x1c; + /* 0x20 */ f32 field_0x20; + /* 0x24 */ f32 field_0x24; + /* 0x28 */ f32 field_0x28; + /* 0x2C */ f32 field_0x2c; + /* 0x30 */ f32 field_0x30; + /* 0x34 */ f32 field_0x34; + /* 0x38 */ f32 field_0x38; + /* 0x3C */ f32 field_0x3c; + /* 0x40 */ f32 field_0x40; + /* 0x44 */ f32 field_0x44; + /* 0x48 */ s16 field_0x48; + /* 0x4A */ s16 field_0x4a; + /* 0x4C */ s16 field_0x4c; + /* 0x4E */ s16 field_0x4e; + /* 0x50 */ f32 field_0x50; + /* 0x54 */ f32 field_0x54; + /* 0x58 */ f32 field_0x58; + /* 0x5C */ f32 field_0x5c; + /* 0x60 */ s16 field_0x60; + /* 0x62 */ s16 field_0x62; + /* 0x64 */ int field_0x64; + /* 0x68 */ int field_0x68; + /* 0x6C */ f32 field_0x6c; + /* 0x70 */ f32 field_0x70; + /* 0x74 */ f32 field_0x74; + /* 0x78 */ f32 field_0x78; + /* 0x7C */ f32 field_0x7c; + /* 0x80 */ f32 field_0x80; + /* 0x84 */ f32 field_0x84; + /* 0x88 */ f32 field_0x88; + /* 0x8C */ f32 field_0x8c; + /* 0x90 */ f32 field_0x90; + /* 0x94 */ f32 field_0x94; + /* 0x98 */ f32 field_0x98; + /* 0x9C */ f32 field_0x9c; + /* 0xA0 */ f32 field_0xa0; + /* 0xA4 */ f32 field_0xa4; + /* 0xA8 */ f32 field_0xa8; + /* 0xAC */ s16 field_0xac; + /* 0xAE */ s16 field_0xae; + /* 0xB0 */ s16 field_0xb0; + /* 0xB2 */ s16 field_0xb2; }; static daNpc_Jagar_Param_c::param const m; }; diff --git a/src/d/actor/d_a_npc_bou.cpp b/src/d/actor/d_a_npc_bou.cpp index 8acb2ab570b..99334ea5c2b 100644 --- a/src/d/actor/d_a_npc_bou.cpp +++ b/src/d/actor/d_a_npc_bou.cpp @@ -1088,8 +1088,21 @@ void daNpc_Bou_c::getCowP() { } /* 8096DA78-8096DADC 000BD8 0064+00 1/1 0/0 2/2 .text getType__11daNpc_Bou_cFv */ -void daNpc_Bou_c::getType() { - // NONMATCHING +u8 daNpc_Bou_c::getType() { + switch ((u8)fopAcM_GetParam(this)) { + case 0: + return TYPE_0; + case 1: + return TYPE_1; + case 2: + return TYPE_2; + case 3: + return TYPE_3; + case 4: + return TYPE_4; + default: + return TYPE_5; + } } /* 8096DADC-8096DBBC 000C3C 00E0+00 1/1 0/0 0/0 .text isDelete__11daNpc_Bou_cFv */ diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index a23da7fba46..0609517a125 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -19,7 +19,7 @@ #include "d/d_bg_s_acch.h" #include "d/d_cc_d.h" #include "d/d_com_inf_game.h" -#include "d/d_a_npc_bou.h" // For action method? +#include "d/actor/d_a_npc_bou.h" // For action method? #include "dol2asm.h" // @@ -303,22 +303,22 @@ extern "C" void __register_global_object(); /* ############################################################################################## */ /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80A1A49C = ""; -SECTION_DEAD static char const* const stringBase_80A1A49D = "NO_RESPONSE"; -SECTION_DEAD static char const* const stringBase_80A1A4A9 = "CLIMBUP"; -SECTION_DEAD static char const* const stringBase_80A1A4B1 = "NEED_YOUR_HELP"; -SECTION_DEAD static char const* const stringBase_80A1A4C0 = "ANGER"; -SECTION_DEAD static char const* const stringBase_80A1A4C6 = "CONVERSATION_WITH_BOU"; -SECTION_DEAD static char const* const stringBase_80A1A4DC = "CONFIDENTIAL_CONVERSATION"; -SECTION_DEAD static char const* const stringBase_80A1A4F6 = "FIND_WOLF"; -SECTION_DEAD static char const* const stringBase_80A1A500 = "FIND_WOLF_VER2"; -SECTION_DEAD static char const* const stringBase_80A1A50F = "Jagar"; -SECTION_DEAD static char const* const stringBase_80A1A515 = "Jagar1"; -SECTION_DEAD static char const* const stringBase_80A1A51C = "Jagar2"; -SECTION_DEAD static char const* const stringBase_80A1A523 = "Jagar3"; -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_DEAD static char const* const stringBase_80A1A49C = ""; +// SECTION_DEAD static char const* const stringBase_80A1A49D = "NO_RESPONSE"; +// SECTION_DEAD static char const* const stringBase_80A1A4A9 = "CLIMBUP"; +// SECTION_DEAD static char const* const stringBase_80A1A4B1 = "NEED_YOUR_HELP"; +// SECTION_DEAD static char const* const stringBase_80A1A4C0 = "ANGER"; +// SECTION_DEAD static char const* const stringBase_80A1A4C6 = "CONVERSATION_WITH_BOU"; +// SECTION_DEAD static char const* const stringBase_80A1A4DC = "CONFIDENTIAL_CONVERSATION"; +// SECTION_DEAD static char const* const stringBase_80A1A4F6 = "FIND_WOLF"; +// SECTION_DEAD static char const* const stringBase_80A1A500 = "FIND_WOLF_VER2"; +// SECTION_DEAD static char const* const stringBase_80A1A50F = "Jagar"; +// SECTION_DEAD static char const* const stringBase_80A1A515 = "Jagar1"; +// SECTION_DEAD static char const* const stringBase_80A1A51C = "Jagar2"; +// SECTION_DEAD static char const* const stringBase_80A1A523 = "Jagar3"; +// #pragma pop /* 80A1A548-80A1A554 000000 000C+00 2/2 0/0 0/0 .data cNullVec__6Z2Calc */ SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { @@ -339,13 +339,11 @@ SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = { #pragma pop /* 80A1A568-80A1A570 000020 0008+00 1/1 0/0 0/0 .data l_bmdData */ -SECTION_DATA static u8 l_bmdData[8] = { +static int l_bmdData[8] = { 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x01, }; /* 80A1A570-80A1A5B8 -00001 0048+00 0/1 0/0 0/0 .data l_evtList */ -#pragma push -#pragma force_active on SECTION_DATA static daNpcT_evtData_c l_evtList[18] = { {"", 0}, {"NO_RESPONSE", 0}, @@ -356,46 +354,31 @@ SECTION_DATA static daNpcT_evtData_c l_evtList[18] = { {"CONFIDENTIAL_CONVERSATION", 3}, {"FIND_WOLF", 3}, {"FIND_WOLF_VER2", 3}, - // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x24), - // (void*)0x00000002, - // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x2A), - // (void*)0x00000003, - // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x40), - // (void*)0x00000003, - // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x5A), - // (void*)0x00000003, - // (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x64), - // (void*)0x00000003, }; -#pragma pop /* 80A1A5B8-80A1A5CC -00001 0014+00 2/3 0/0 0/0 .data l_resNameList */ -SECTION_DATA static void* l_resNameList[5] = { - (void*)&d_a_npc_jagar__stringBase0, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x73), - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x79), - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x80), - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x87), +static char* l_resNameList[5] = { + "", + "Jagar", + "Jagar1", + "Jagar2", + "Jagar3", }; /* 80A1A5CC-80A1A5D0 000084 0004+00 1/0 0/0 0/0 .data l_loadResPtrn0 */ // SECTION_DATA static u32 l_loadResPtrn0 = 0x010204FF; -static s8 l_loadResPtrn0[] = { 0x01, 0x02, 0x04, (s8)0xFF }; +static s8 l_loadResPtrn0[] = { + 1, 2, 4, -1, +}; /* 80A1A5D0-80A1A5D4 000088 0003+01 1/0 0/0 0/0 .data l_loadResPtrn1 */ static s8 l_loadResPtrn1[3] = { - 1, - 3, - -1 + 1, 3, -1 }; /* 80A1A5D4-80A1A5DC 00008C 0005+03 1/0 0/0 0/0 .data l_loadResPtrn9 */ static s8 l_loadResPtrn9[5] = { - 1, - 2, - 3, - 4, - -1 + 1, 2, 3, 4, -1 }; /* 80A1A5DC-80A1A5EC -00001 0010+00 1/2 0/0 0/0 .data l_loadResPtrnList */ @@ -409,31 +392,21 @@ static s8* l_loadResPtrnList[4] = { /* 80A1A5EC-80A1A704 0000A4 0118+00 0/1 0/0 0/0 .data l_faceMotionAnmData */ #pragma push #pragma force_active on -SECTION_DATA static u8 l_faceMotionAnmData[280] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x12, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, +static daNpcT_faceMotionAnmData_c l_faceMotionAnmData[10] = { + {-1, 0, 0, 19, 2, 1, 1}, + {6, 0, 1, 20, 0, 1, 0}, + {6, 0, 2, 19, 2, 1, 1}, + {4, 0, 4, 9, 0, 4, 0}, + {7, 0, 3, 20, 0, 3, 0}, + {5, 2, 4, 10, 2, 4, 0}, + {-1, 0, 0, -1, 0, 0, 0}, + {7, 2, 1, 21, 2, 1, 0}, + {5, 0, 3, 18, 0, 3, 0}, + {6, 2, 3, 19, 2, 3, 0}, }; #pragma pop /* 80A1A704-80A1A8FC 0001BC 01F8+00 0/1 0/0 0/0 .data l_motionAnmData */ -#pragma push -#pragma force_active on SECTION_DATA static u8 l_motionAnmData[504] = { 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, @@ -468,11 +441,8 @@ SECTION_DATA static u8 l_motionAnmData[504] = { 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, }; -#pragma pop /* 80A1A8FC-80A1A98C 0003B4 0090+00 0/1 0/0 0/0 .data l_faceMotionSequenceData */ -#pragma push -#pragma force_active on SECTION_DATA static u8 l_faceMotionSequenceData[144] = { 0x00, 0x01, 0xFF, 0x01, 0x00, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x08, 0xFF, 0x01, 0x00, 0x09, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, @@ -484,11 +454,8 @@ SECTION_DATA static u8 l_faceMotionSequenceData[144] = { 0x00, 0x06, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, }; -#pragma pop /* 80A1A98C-80A1AABC 000444 0130+00 0/1 0/0 0/0 .data l_motionSequenceData */ -#pragma push -#pragma force_active on SECTION_DATA static u8 l_motionSequenceData[304] = { 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x08, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, @@ -510,123 +477,123 @@ SECTION_DATA static u8 l_motionSequenceData[304] = { 0x00, 0x03, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0D, 0xFF, 0x01, 0x00, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, }; -#pragma pop /* 80A1AABC-80A1AAD8 -00001 001C+00 1/1 0/0 0/0 .data mCutNameList__13daNpc_Jagar_c */ -SECTION_DATA void* daNpc_Jagar_c::mCutNameList[7] = { - (void*)&d_a_npc_jagar__stringBase0, - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0xD), - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x15), - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x24), - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x2A), - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x40), - (void*)(((char*)&d_a_npc_jagar__stringBase0) + 0x5A), +SECTION_DATA char* daNpc_Jagar_c::mCutNameList[7] = { + "", + "CLIMBUP", + "NEED_YOUR_HELP", + "ANGER", + "CONVERSATION_WITH_BOU", + "CONFIDENTIAL_CONVERSATION", + "FIND_WOLF", }; /* 80A1AAD8-80A1AAE4 -00001 000C+00 0/1 0/0 0/0 .data @3939 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3939[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)cutClimbUp__13daNpc_Jagar_cFi, -}; -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_DATA static void* lit_3939[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)cutClimbUp__13daNpc_Jagar_cFi, +// }; +// #pragma pop -/* 80A1AAE4-80A1AAF0 -00001 000C+00 0/1 0/0 0/0 .data @3940 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3940[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)cutNeedYourHelp__13daNpc_Jagar_cFi, -}; -#pragma pop +// /* 80A1AAE4-80A1AAF0 -00001 000C+00 0/1 0/0 0/0 .data @3940 */ +// #pragma push +// #pragma force_active on +// SECTION_DATA static void* lit_3940[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)cutNeedYourHelp__13daNpc_Jagar_cFi, +// }; +// #pragma pop -/* 80A1AAF0-80A1AAFC -00001 000C+00 0/1 0/0 0/0 .data @3941 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3941[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)cutAnger__13daNpc_Jagar_cFi, -}; -#pragma pop +// /* 80A1AAF0-80A1AAFC -00001 000C+00 0/1 0/0 0/0 .data @3941 */ +// #pragma push +// #pragma force_active on +// SECTION_DATA static void* lit_3941[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)cutAnger__13daNpc_Jagar_cFi, +// }; +// #pragma pop -/* 80A1AAFC-80A1AB08 -00001 000C+00 0/1 0/0 0/0 .data @3942 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3942[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)cutConversationWithBou__13daNpc_Jagar_cFi, -}; -#pragma pop +// /* 80A1AAFC-80A1AB08 -00001 000C+00 0/1 0/0 0/0 .data @3942 */ +// #pragma push +// #pragma force_active on +// SECTION_DATA static void* lit_3942[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)cutConversationWithBou__13daNpc_Jagar_cFi, +// }; +// #pragma pop -/* 80A1AB08-80A1AB14 -00001 000C+00 0/1 0/0 0/0 .data @3943 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3943[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)cutConfidentialConversation__13daNpc_Jagar_cFi, -}; -#pragma pop +// /* 80A1AB08-80A1AB14 -00001 000C+00 0/1 0/0 0/0 .data @3943 */ +// #pragma push +// #pragma force_active on +// SECTION_DATA static void* lit_3943[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)cutConfidentialConversation__13daNpc_Jagar_cFi, +// }; +// #pragma pop -/* 80A1AB14-80A1AB20 -00001 000C+00 0/1 0/0 0/0 .data @3944 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3944[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)cutFindWolf__13daNpc_Jagar_cFi, -}; -#pragma pop +// /* 80A1AB14-80A1AB20 -00001 000C+00 0/1 0/0 0/0 .data @3944 */ +// #pragma push +// #pragma force_active on +// SECTION_DATA static void* lit_3944[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)cutFindWolf__13daNpc_Jagar_cFi, +// }; +// #pragma pop /* 80A1AB20-80A1AB74 0005D8 0054+00 1/2 0/0 0/0 .data mCutList__13daNpc_Jagar_c */ -SECTION_DATA u8 daNpc_Jagar_c::mCutList[84] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +daNpc_Jagar_c::cutFunc daNpc_Jagar_c::mCutList[7] = { + &daNpc_Jagar_c::cutClimbUp, + &daNpc_Jagar_c::cutNeedYourHelp, + &daNpc_Jagar_c::cutAnger, + &daNpc_Jagar_c::cutConversationWithBou, + &daNpc_Jagar_c::cutConfidentialConversation, + &daNpc_Jagar_c::cutFindWolf, + NULL, }; /* 80A1AB74-80A1AB80 -00001 000C+00 1/1 0/0 0/0 .data @4674 */ -SECTION_DATA static void* lit_4674[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)talk__13daNpc_Jagar_cFPv, -}; +// SECTION_DATA static void* lit_4674[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)talk__13daNpc_Jagar_cFPv, +// }; /* 80A1AB80-80A1AB8C -00001 000C+00 1/1 0/0 0/0 .data @4739 */ -SECTION_DATA static void* lit_4739[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)talk__13daNpc_Jagar_cFPv, -}; +// SECTION_DATA static void* lit_4739[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)talk__13daNpc_Jagar_cFPv, +// }; /* 80A1AB8C-80A1AB98 -00001 000C+00 1/1 0/0 0/0 .data @4744 */ -SECTION_DATA static void* lit_4744[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)talk__13daNpc_Jagar_cFPv, -}; +// SECTION_DATA static void* lit_4744[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)talk__13daNpc_Jagar_cFPv, +// }; /* 80A1AB98-80A1ABA4 -00001 000C+00 1/1 0/0 0/0 .data @5061 */ -SECTION_DATA static void* lit_5061[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)talkwithBou__13daNpc_Jagar_cFPv, -}; +// SECTION_DATA static void* lit_5061[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)talkwithBou__13daNpc_Jagar_cFPv, +// }; /* 80A1ABA4-80A1ABB0 -00001 000C+00 1/1 0/0 0/0 .data @5063 */ -SECTION_DATA static void* lit_5063[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)wait__13daNpc_Jagar_cFPv, -}; +// SECTION_DATA static void* lit_5063[3] = { +// (void*)NULL, +// (void*)0xFFFFFFFF, +// (void*)wait__13daNpc_Jagar_cFPv, +// }; /* 80A1ABB0-80A1ABE0 -00001 0030+00 1/1 0/0 0/0 .data @5661 */ SECTION_DATA static void* lit_5661[12] = { @@ -687,148 +654,148 @@ extern actor_process_profile_definition g_profile_NPC_JAGAR = { fopAc_CULLBOX_CUSTOM_e, // cullType }; -/* 80A1AC60-80A1AC6C 000718 000C+00 2/2 0/0 0/0 .data __vt__11J3DTexNoAnm */ -SECTION_DATA extern void* __vt__11J3DTexNoAnm[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)calc__11J3DTexNoAnmCFPUs, -}; +// /* 80A1AC60-80A1AC6C 000718 000C+00 2/2 0/0 0/0 .data __vt__11J3DTexNoAnm */ +// SECTION_DATA extern void* __vt__11J3DTexNoAnm[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)calc__11J3DTexNoAnmCFPUs, +// }; -/* 80A1AC6C-80A1AC78 000724 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ -SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12J3DFrameCtrlFv, -}; +// /* 80A1AC6C-80A1AC78 000724 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ +// SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__12J3DFrameCtrlFv, +// }; -/* 80A1AC78-80A1AC9C 000730 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_ObjAcchFv, - (void*)NULL, - (void*)NULL, - (void*)func_80A1A314, - (void*)NULL, - (void*)NULL, - (void*)func_80A1A30C, -}; +// /* 80A1AC78-80A1AC9C 000730 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ +// SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__12dBgS_ObjAcchFv, +// (void*)NULL, +// (void*)NULL, +// (void*)func_80A1A314, +// (void*)NULL, +// (void*)NULL, +// (void*)func_80A1A30C, +// }; -/* 80A1AC9C-80A1ACA8 000754 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ -SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_AcchCirFv, -}; +// /* 80A1AC9C-80A1ACA8 000754 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ +// SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__12dBgS_AcchCirFv, +// }; -/* 80A1ACA8-80A1ACB4 000760 000C+00 3/3 0/0 0/0 .data __vt__10cCcD_GStts */ -SECTION_DATA extern void* __vt__10cCcD_GStts[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__10cCcD_GSttsFv, -}; +// /* 80A1ACA8-80A1ACB4 000760 000C+00 3/3 0/0 0/0 .data __vt__10cCcD_GStts */ +// SECTION_DATA extern void* __vt__10cCcD_GStts[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__10cCcD_GSttsFv, +// }; -/* 80A1ACB4-80A1ACC0 00076C 000C+00 2/2 0/0 0/0 .data __vt__10dCcD_GStts */ -SECTION_DATA extern void* __vt__10dCcD_GStts[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__10dCcD_GSttsFv, -}; +// /* 80A1ACB4-80A1ACC0 00076C 000C+00 2/2 0/0 0/0 .data __vt__10dCcD_GStts */ +// SECTION_DATA extern void* __vt__10dCcD_GStts[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__10dCcD_GSttsFv, +// }; -/* 80A1ACC0-80A1ACCC 000778 000C+00 3/3 0/0 0/0 .data __vt__22daNpcT_MotionSeqMngr_c */ -SECTION_DATA extern void* __vt__22daNpcT_MotionSeqMngr_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__22daNpcT_MotionSeqMngr_cFv, -}; +// /* 80A1ACC0-80A1ACCC 000778 000C+00 3/3 0/0 0/0 .data __vt__22daNpcT_MotionSeqMngr_c */ +// SECTION_DATA extern void* __vt__22daNpcT_MotionSeqMngr_c[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__22daNpcT_MotionSeqMngr_cFv, +// }; -/* 80A1ACCC-80A1ACD8 000784 000C+00 5/5 0/0 0/0 .data __vt__18daNpcT_ActorMngr_c */ -SECTION_DATA extern void* __vt__18daNpcT_ActorMngr_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__18daNpcT_ActorMngr_cFv, -}; +// /* 80A1ACCC-80A1ACD8 000784 000C+00 5/5 0/0 0/0 .data __vt__18daNpcT_ActorMngr_c */ +// SECTION_DATA extern void* __vt__18daNpcT_ActorMngr_c[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__18daNpcT_ActorMngr_cFv, +// }; -/* 80A1ACD8-80A1ACE4 000790 000C+00 3/3 0/0 0/0 .data __vt__15daNpcT_JntAnm_c */ -SECTION_DATA extern void* __vt__15daNpcT_JntAnm_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__15daNpcT_JntAnm_cFv, -}; +// /* 80A1ACD8-80A1ACE4 000790 000C+00 3/3 0/0 0/0 .data __vt__15daNpcT_JntAnm_c */ +// SECTION_DATA extern void* __vt__15daNpcT_JntAnm_c[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__15daNpcT_JntAnm_cFv, +// }; -/* 80A1ACE4-80A1ACF0 00079C 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGAab */ -SECTION_DATA extern void* __vt__8cM3dGAab[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGAabFv, -}; +// /* 80A1ACE4-80A1ACF0 00079C 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGAab */ +// SECTION_DATA extern void* __vt__8cM3dGAab[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__8cM3dGAabFv, +// }; -/* 80A1ACF0-80A1ACFC 0007A8 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ -SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGCylFv, -}; +// /* 80A1ACF0-80A1ACFC 0007A8 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ +// SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__8cM3dGCylFv, +// }; -/* 80A1ACFC-80A1AD08 0007B4 000C+00 3/3 0/0 0/0 .data __vt__13daNpcT_Path_c */ -SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__13daNpcT_Path_cFv, -}; +// /* 80A1ACFC-80A1AD08 0007B4 000C+00 3/3 0/0 0/0 .data __vt__13daNpcT_Path_c */ +// SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__13daNpcT_Path_cFv, +// }; /* 80A1AD08-80A1ADCC 0007C0 00C4+00 2/2 0/0 0/0 .data __vt__13daNpc_Jagar_c */ -SECTION_DATA extern void* __vt__13daNpc_Jagar_c[49] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__13daNpc_Jagar_cFv, - (void*)ctrlBtk__8daNpcT_cFv, - (void*)ctrlSubFaceMotion__8daNpcT_cFi, - (void*)checkChangeJoint__13daNpc_Jagar_cFi, - (void*)checkRemoveJoint__13daNpc_Jagar_cFi, - (void*)getBackboneJointNo__13daNpc_Jagar_cFv, - (void*)getNeckJointNo__13daNpc_Jagar_cFv, - (void*)getHeadJointNo__13daNpc_Jagar_cFv, - (void*)getFootLJointNo__13daNpc_Jagar_cFv, - (void*)getFootRJointNo__13daNpc_Jagar_cFv, - (void*)getEyeballLMaterialNo__8daNpcT_cFv, - (void*)getEyeballRMaterialNo__8daNpcT_cFv, - (void*)getEyeballMaterialNo__13daNpc_Jagar_cFv, - (void*)ctrlJoint__8daNpcT_cFP8J3DJointP8J3DModel, - (void*)afterJntAnm__13daNpc_Jagar_cFi, - (void*)setParam__13daNpc_Jagar_cFv, - (void*)checkChangeEvt__13daNpc_Jagar_cFv, - (void*)evtTalk__13daNpc_Jagar_cFv, - (void*)evtEndProc__8daNpcT_cFv, - (void*)evtCutProc__13daNpc_Jagar_cFv, - (void*)setAfterTalkMotion__13daNpc_Jagar_cFv, - (void*)evtProc__8daNpcT_cFv, - (void*)action__13daNpc_Jagar_cFv, - (void*)beforeMove__13daNpc_Jagar_cFv, - (void*)afterMoved__8daNpcT_cFv, - (void*)setAttnPos__13daNpc_Jagar_cFv, - (void*)setFootPos__8daNpcT_cFv, - (void*)setCollision__13daNpc_Jagar_cFv, - (void*)setFootPrtcl__8daNpcT_cFP4cXyzff, - (void*)checkCullDraw__8daNpcT_cFv, - (void*)twilight__8daNpcT_cFv, - (void*)chkXYItems__8daNpcT_cFv, - (void*)evtOrder__8daNpcT_cFv, - (void*)decTmr__8daNpcT_cFv, - (void*)clrParam__8daNpcT_cFv, - (void*)drawDbgInfo__13daNpc_Jagar_cFv, - (void*)drawOtherMdl__8daNpcT_cFv, - (void*)drawGhost__8daNpcT_cFv, - (void*)afterSetFaceMotionAnm__8daNpcT_cFiifi, - (void*)afterSetMotionAnm__8daNpcT_cFiifi, - (void*)getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c, - (void*)getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c, - (void*)changeAnm__8daNpcT_cFPiPi, - (void*)changeBck__8daNpcT_cFPiPi, - (void*)changeBtp__13daNpc_Jagar_cFPiPi, - (void*)changeBtk__8daNpcT_cFPiPi, - (void*)setMotionAnm__8daNpcT_cFifi, -}; +// SECTION_DATA extern void* __vt__13daNpc_Jagar_c[49] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__13daNpc_Jagar_cFv, +// (void*)ctrlBtk__8daNpcT_cFv, +// (void*)ctrlSubFaceMotion__8daNpcT_cFi, +// (void*)checkChangeJoint__13daNpc_Jagar_cFi, +// (void*)checkRemoveJoint__13daNpc_Jagar_cFi, +// (void*)getBackboneJointNo__13daNpc_Jagar_cFv, +// (void*)getNeckJointNo__13daNpc_Jagar_cFv, +// (void*)getHeadJointNo__13daNpc_Jagar_cFv, +// (void*)getFootLJointNo__13daNpc_Jagar_cFv, +// (void*)getFootRJointNo__13daNpc_Jagar_cFv, +// (void*)getEyeballLMaterialNo__8daNpcT_cFv, +// (void*)getEyeballRMaterialNo__8daNpcT_cFv, +// (void*)getEyeballMaterialNo__13daNpc_Jagar_cFv, +// (void*)ctrlJoint__8daNpcT_cFP8J3DJointP8J3DModel, +// (void*)afterJntAnm__13daNpc_Jagar_cFi, +// (void*)setParam__13daNpc_Jagar_cFv, +// (void*)checkChangeEvt__13daNpc_Jagar_cFv, +// (void*)evtTalk__13daNpc_Jagar_cFv, +// (void*)evtEndProc__8daNpcT_cFv, +// (void*)evtCutProc__13daNpc_Jagar_cFv, +// (void*)setAfterTalkMotion__13daNpc_Jagar_cFv, +// (void*)evtProc__8daNpcT_cFv, +// (void*)action__13daNpc_Jagar_cFv, +// (void*)beforeMove__13daNpc_Jagar_cFv, +// (void*)afterMoved__8daNpcT_cFv, +// (void*)setAttnPos__13daNpc_Jagar_cFv, +// (void*)setFootPos__8daNpcT_cFv, +// (void*)setCollision__13daNpc_Jagar_cFv, +// (void*)setFootPrtcl__8daNpcT_cFP4cXyzff, +// (void*)checkCullDraw__8daNpcT_cFv, +// (void*)twilight__8daNpcT_cFv, +// (void*)chkXYItems__8daNpcT_cFv, +// (void*)evtOrder__8daNpcT_cFv, +// (void*)decTmr__8daNpcT_cFv, +// (void*)clrParam__8daNpcT_cFv, +// (void*)drawDbgInfo__13daNpc_Jagar_cFv, +// (void*)drawOtherMdl__8daNpcT_cFv, +// (void*)drawGhost__8daNpcT_cFv, +// (void*)afterSetFaceMotionAnm__8daNpcT_cFiifi, +// (void*)afterSetMotionAnm__8daNpcT_cFiifi, +// (void*)getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c, +// (void*)getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c, +// (void*)changeAnm__8daNpcT_cFPiPi, +// (void*)changeBck__8daNpcT_cFPiPi, +// (void*)changeBtp__13daNpc_Jagar_cFPiPi, +// (void*)changeBtk__8daNpcT_cFPiPi, +// (void*)setMotionAnm__8daNpcT_cFifi, +// }; /* 80A1470C-80A14858 0000EC 014C+00 1/0 0/0 0/0 .text __dt__13daNpc_Jagar_cFv */ daNpc_Jagar_c::~daNpc_Jagar_c() { @@ -872,32 +839,32 @@ static int const heapSize[4] = { // #pragma pop /* 80A1A3E0-80A1A3E4 0000B0 0004+00 0/2 0/0 0/0 .rodata @4165 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4165 = -200.0f; -COMPILER_STRIP_GATE(0x80A1A3E0, &lit_4165); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4165 = -200.0f; +// COMPILER_STRIP_GATE(0x80A1A3E0, &lit_4165); +// #pragma pop /* 80A1A3E4-80A1A3E8 0000B4 0004+00 0/1 0/0 0/0 .rodata @4166 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4166 = -100.0f; -COMPILER_STRIP_GATE(0x80A1A3E4, &lit_4166); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4166 = -100.0f; +// COMPILER_STRIP_GATE(0x80A1A3E4, &lit_4166); +// #pragma pop /* 80A1A3E8-80A1A3EC 0000B8 0004+00 0/1 0/0 0/0 .rodata @4167 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4167 = 200.0f; -COMPILER_STRIP_GATE(0x80A1A3E8, &lit_4167); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4167 = 200.0f; +// COMPILER_STRIP_GATE(0x80A1A3E8, &lit_4167); +// #pragma pop /* 80A1A3EC-80A1A3F0 0000BC 0004+00 0/2 0/0 0/0 .rodata @4168 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4168 = 300.0f; -COMPILER_STRIP_GATE(0x80A1A3EC, &lit_4168); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4168 = 300.0f; +// COMPILER_STRIP_GATE(0x80A1A3EC, &lit_4168); +// #pragma pop /* 80A1A3F0-80A1A3F4 0000C0 0004+00 4/15 0/0 0/0 .rodata @4169 */ // SECTION_RODATA static u8 const lit_4169[4] = { @@ -907,16 +874,16 @@ COMPILER_STRIP_GATE(0x80A1A3EC, &lit_4168); // 0x00, // }; // COMPILER_STRIP_GATE(0x80A1A3F0, &lit_4169); -static u8 const lit_4169[4] = { - 0x00, 0x00, 0x00, 0x00, -}; +// static u8 const lit_4169[4] = { +// 0x00, 0x00, 0x00, 0x00, +// }; /* 80A1A3F4-80A1A3F8 0000C4 0004+00 0/1 0/0 0/0 .rodata @4170 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4170 = -1000000000.0f; -COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4170 = -1000000000.0f; +// COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); +// #pragma pop /* 80A14858-80A14B20 000238 02C8+00 1/1 0/0 0/0 .text create__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::create() { @@ -968,22 +935,22 @@ int daNpc_Jagar_c::create() { /* ############################################################################################## */ /* 80A1A3F8-80A1A3FC 0000C8 0004+00 0/2 0/0 0/0 .rodata @4332 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4332 = 65536.0f; -COMPILER_STRIP_GATE(0x80A1A3F8, &lit_4332); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4332 = 65536.0f; +// COMPILER_STRIP_GATE(0x80A1A3F8, &lit_4332); +// #pragma pop /* 80A1A3FC-80A1A400 0000CC 0004+00 0/3 0/0 0/0 .rodata @4333 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4333 = 1.0f / 5.0f; -COMPILER_STRIP_GATE(0x80A1A3FC, &lit_4333); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4333 = 1.0f / 5.0f; +// COMPILER_STRIP_GATE(0x80A1A3FC, &lit_4333); +// #pragma pop /* 80A1A400-80A1A404 0000D0 0004+00 2/5 0/0 0/0 .rodata @4475 */ -SECTION_RODATA static f32 const lit_4475 = 1.0f; -COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); +// SECTION_RODATA static f32 const lit_4475 = 1.0f; +// COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); /* 80A14B20-80A14D90 000500 0270+00 1/1 0/0 0/0 .text CreateHeap__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::CreateHeap() { @@ -1101,7 +1068,7 @@ u8 daNpc_Jagar_c::getType() { return TYPE_1; case 2: return TYPE_2; - case 3: + default: return TYPE_3; } } @@ -1266,12 +1233,13 @@ bool daNpc_Jagar_c::checkChangeEvt() { if (!chkAction(&daNpc_Jagar_c::talk)) { field_0xe2e[0] = 0; } + return true; // Placeholder value } /* ############################################################################################## */ /* 80A1A408-80A1A40C 0000D8 0004+00 2/8 0/0 0/0 .rodata @4718 */ -SECTION_RODATA static f32 const lit_4718 = -1.0f; -COMPILER_STRIP_GATE(0x80A1A408, &lit_4718); +// SECTION_RODATA static f32 const lit_4718 = -1.0f; +// COMPILER_STRIP_GATE(0x80A1A408, &lit_4718); /* 80A15714-80A157B4 0010F4 00A0+00 1/0 0/0 0/0 .text setAfterTalkMotion__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setAfterTalkMotion() { @@ -1302,7 +1270,7 @@ void daNpc_Jagar_c::srchActors() { /* 80A158A0-80A15940 001280 00A0+00 1/0 0/0 0/0 .text evtTalk__13daNpc_Jagar_cFv */ bool daNpc_Jagar_c::evtTalk() { if (chkAction(&daNpc_Jagar_c::talk)) { - (this->*field_0x0fe0)(NULL); + (this->*field_0xfe0)(NULL); } else { setAction(&daNpc_Jagar_c::talk); } @@ -1326,29 +1294,72 @@ bool daNpc_Jagar_c::evtCutProc() { /* 80A15A08-80A15CA4 0013E8 029C+00 1/0 0/0 0/0 .text action__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::action() { + // fopAc_ac_c* hitActor = hitChk(&mCyl1, 0xffffffff); + // /* WIP */ + // if (hitActor != NULL) { + // cCcD_Obj* hitObj = mCyl1.GetTgHitObj(); + // if (mType == 1) { + // daNpc_Bou_c* this_00 = field_0x0f94.getActorP(); + // /* WIP */ + // // if (this_00 && this_00->getType() == 1 && field_0xd08.mStagger == 0) { + // if (field_0xb50.getNo() != 1) { + // // field_0xb50.intialize(); + // // field_0xb50.getNo() = 1; + // // field_0xb50.field_0x18 = -1; + // field_0xb50.setNo(1, -1, 1, 0); + // } + // if (field_0xb74.getNo() != 3) { + // // field_0xb74.initialize(); + // // field_0xb74.getNo() = 3; + // // field_0xb74.field_0x18 = -1; + // field_0xb74.setNo(3, -1, 1, 0); + // } + // // *(undefined2 *)(this + 0xcd4) = 0; + // // *(undefined2 *)(this + 0xcd6) = 0; + // // this[0xcff] = (daNpc_Jagar_c)0x1; + // // } + + // } + // } fopAc_ac_c* hitActor = hitChk(&mCyl1, 0xffffffff); - /* WIP */ if (hitActor != NULL) { - if (mType == 1) { - daNpc_Bou_c* this_00 = getActorP(field_0xf94) - if (this_00 && this_00->getType() == 1 && field_0xd08.mStagger == 0) { - if (field_0xb50.mNo != 1) { - field_0xb50.intialize(); - field_0xb50.mNo = 1; - field_0xb50.field_0x18 = -1; - } - if (field_0xb74.mNo != 3) { - field_0xb74.initialize(); - field_0xb74.mNo = 3; - field_0xb74.field_0x18 = -1; - } - // *(undefined2 *)(this + 0xcd4) = 0; - // *(undefined2 *)(this + 0xcd6) = 0; - // this[0xcff] = (daNpc_Jagar_c)0x1; + cCcD_Obj* hitObj = mCyl1.GetTgHitObj(); + daNpc_Bou_c* this_00 = static_cast(field_0xf94.getActorP()); + if (this_00 && this_00->getType() == TYPE_1 && field_0xd08.checkStagger() == 0) { + if (field_0xb50.getNo() != 1) { + field_0xb50.setNo(1, -1, 1, 0); } - + if (field_0xb74.getNo() != 3) { + field_0xb74.setNo(3, -1, 1, 0); + } + } + if (hitObj->ChkAtType(AT_TYPE_THROW_OBJ) && mType != TYPE_2) { + field_0xd08.setParam(this, hitActor, field_0xd78.y); + setDamage(0, 8, 0); + field_0xdb8 = 0; + field_0xba8.lookNone(1); + } + } + if (field_0xd08.checkRebirth()) { + field_0xd08.initialize(); + field_0xe22 = 1; + } + if (field_0xfe0) { + if (field_0xfe4 == field_0xfe0) { + (this->*field_0xfe4)(NULL); + } else { + setAction(field_0xfe0); } } + if (field_0x0ba0.getActorP()) { + + if (field_0xb0 == 2) { + field_0xe30 = 5; + } + } + // if ((mType != TYPE_0) && field_0x1721 != 0) { + // fopAcM_delete(this); + // } } /* 80A15CA4-80A15D68 001684 00C4+00 1/0 0/0 0/0 .text beforeMove__13daNpc_Jagar_cFv */ @@ -1364,56 +1375,56 @@ void daNpc_Jagar_c::beforeMove() { /* ############################################################################################## */ /* 80A1A40C-80A1A410 0000DC 0004+00 0/2 0/0 0/0 .rodata @4932 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4932 = -10.0f; -COMPILER_STRIP_GATE(0x80A1A40C, &lit_4932); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4932 = -10.0f; +// COMPILER_STRIP_GATE(0x80A1A40C, &lit_4932); +// #pragma pop /* 80A1A410-80A1A414 0000E0 0004+00 0/2 0/0 0/0 .rodata @4933 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4933 = 10.0f; -COMPILER_STRIP_GATE(0x80A1A410, &lit_4933); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4933 = 10.0f; +// COMPILER_STRIP_GATE(0x80A1A410, &lit_4933); +// #pragma pop /* 80A1A414-80A1A418 0000E4 0004+00 0/1 0/0 0/0 .rodata @4934 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4934 = 0x38C90FDB; -COMPILER_STRIP_GATE(0x80A1A414, &lit_4934); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u32 const lit_4934 = 0x38C90FDB; +// COMPILER_STRIP_GATE(0x80A1A414, &lit_4934); +// #pragma pop /* 80A1A418-80A1A41C 0000E8 0004+00 0/1 0/0 0/0 .rodata @4935 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4935 = -60.0f; -COMPILER_STRIP_GATE(0x80A1A418, &lit_4935); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4935 = -60.0f; +// COMPILER_STRIP_GATE(0x80A1A418, &lit_4935); +// #pragma pop /* 80A1A41C-80A1A420 0000EC 0004+00 0/1 0/0 0/0 .rodata @4936 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4936 = 3.0f; -COMPILER_STRIP_GATE(0x80A1A41C, &lit_4936); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4936 = 3.0f; +// COMPILER_STRIP_GATE(0x80A1A41C, &lit_4936); +// #pragma pop /* 80A1A420-80A1A428 0000F0 0004+04 0/1 0/0 0/0 .rodata @4937 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4937[1 + 1 /* padding */] = { - 11.0f, - /* padding */ - 0.0f, -}; -COMPILER_STRIP_GATE(0x80A1A420, &lit_4937); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4937[1 + 1 /* padding */] = { +// 11.0f, +// /* padding */ +// 0.0f, +// }; +// COMPILER_STRIP_GATE(0x80A1A420, &lit_4937); +// #pragma pop /* 80A1A428-80A1A430 0000F8 0008+00 1/3 0/0 0/0 .rodata @4939 */ -SECTION_RODATA static u8 const lit_4939[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A428, &lit_4939); +// SECTION_RODATA static u8 const lit_4939[8] = { +// 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A428, &lit_4939); /* 80A1ADE0-80A1ADE4 000008 0001+03 1/1 0/0 0/0 .bss @1109 */ static u8 lit_1109[1 + 3 /* padding */]; @@ -1533,45 +1544,45 @@ void daNpc_Jagar_c::setAttnPos() { /* ############################################################################################## */ /* 80A1A430-80A1A438 000100 0008+00 0/2 0/0 0/0 .rodata @4997 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4997[8] = { - 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A430, &lit_4997); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_4997[8] = { +// 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A430, &lit_4997); +// #pragma pop /* 80A1A438-80A1A440 000108 0008+00 0/2 0/0 0/0 .rodata @4998 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4998[8] = { - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A438, &lit_4998); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_4998[8] = { +// 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A438, &lit_4998); +// #pragma pop /* 80A1A440-80A1A448 000110 0008+00 0/2 0/0 0/0 .rodata @4999 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4999[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A440, &lit_4999); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_4999[8] = { +// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A440, &lit_4999); +// #pragma pop /* 80A1A448-80A1A44C 000118 0004+00 0/1 0/0 0/0 .rodata @5039 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5039 = 70.0f; -COMPILER_STRIP_GATE(0x80A1A448, &lit_5039); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_5039 = 70.0f; +// COMPILER_STRIP_GATE(0x80A1A448, &lit_5039); +// #pragma pop /* 80A1A44C-80A1A450 00011C 0004+00 0/1 0/0 0/0 .rodata @5040 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5040 = 90.0f; -COMPILER_STRIP_GATE(0x80A1A44C, &lit_5040); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_5040 = 90.0f; +// COMPILER_STRIP_GATE(0x80A1A44C, &lit_5040); +// #pragma pop /* 80A1607C-80A161EC 001A5C 0170+00 1/0 0/0 0/0 .text setCollision__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setCollision() { @@ -1595,8 +1606,8 @@ void daNpc_Jagar_c::selectAction() { /* 80A162B0-80A162DC 001C90 002C+00 2/2 0/0 0/0 .text * chkAction__13daNpc_Jagar_cFM13daNpc_Jagar_cFPCvPvPv_i */ -void daNpc_Jagar_c::chkAction(int (daNpc_Jagar_c::*param_0)(void*)) { - // NONMATCHING +int daNpc_Jagar_c::chkAction(int (daNpc_Jagar_c::*action)(void*)) { + return 0; // Placeholder value } /* 80A162DC-80A16384 001CBC 00A8+00 2/2 0/0 0/0 .text @@ -1607,92 +1618,92 @@ void daNpc_Jagar_c::setAction(int (daNpc_Jagar_c::*param_0)(void*)) { /* ############################################################################################## */ /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80A1A52A = "prm"; -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_DEAD static char const* const stringBase_80A1A52A = "prm"; +// #pragma pop /* 80A16384-80A16544 001D64 01C0+00 1/0 0/0 0/0 .text cutClimbUp__13daNpc_Jagar_cFi */ -void daNpc_Jagar_c::cutClimbUp(int param_0) { - // NONMATCHING +int daNpc_Jagar_c::cutClimbUp(int param_0) { + return 0; // Placeholder value } /* ############################################################################################## */ /* 80A1A450-80A1A45C 000120 000C+00 0/1 0/0 0/0 .rodata @5148 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_5148[12] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -}; -COMPILER_STRIP_GATE(0x80A1A450, &lit_5148); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_5148[12] = { +// 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +// }; +// COMPILER_STRIP_GATE(0x80A1A450, &lit_5148); +// #pragma pop /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80A1A52E = "msgNo"; -SECTION_DEAD static char const* const stringBase_80A1A534 = "msgNo2"; -SECTION_DEAD static char const* const stringBase_80A1A53B = "send"; -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_DEAD static char const* const stringBase_80A1A52E = "msgNo"; +// SECTION_DEAD static char const* const stringBase_80A1A534 = "msgNo2"; +// SECTION_DEAD static char const* const stringBase_80A1A53B = "send"; +// #pragma pop /* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ -void daNpc_Jagar_c::cutNeedYourHelp(int param_0) { - // NONMATCHING +int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { + return 0; // Placeholder value } /* 80A16CD8-80A16EFC 0026B8 0224+00 1/0 0/0 0/0 .text cutAnger__13daNpc_Jagar_cFi */ -void daNpc_Jagar_c::cutAnger(int param_0) { - // NONMATCHING +int daNpc_Jagar_c::cutAnger(int param_0) { + return 0; // Placeholder value } /* ############################################################################################## */ /* 80A1A45C-80A1A464 00012C 0008+00 1/1 0/0 0/0 .rodata @5412 */ -SECTION_RODATA static u8 const lit_5412[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A45C, &lit_5412); +// SECTION_RODATA static u8 const lit_5412[8] = { +// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A45C, &lit_5412); /* 80A16EFC-80A1705C 0028DC 0160+00 1/0 0/0 0/0 .text cutConversationWithBou__13daNpc_Jagar_cFi */ -void daNpc_Jagar_c::cutConversationWithBou(int param_0) { - // NONMATCHING +int daNpc_Jagar_c::cutConversationWithBou(int param_0) { + return 0; // Placeholder value } /* ############################################################################################## */ /* 80A1A464-80A1A46C 000134 0008+00 0/1 0/0 0/0 .rodata @5445 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_5445[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A464, &lit_5445); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_5445[8] = { +// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A464, &lit_5445); +// #pragma pop /* 80A1A46C-80A1A478 00013C 000C+00 0/1 0/0 0/0 .rodata @5455 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_5455[12] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -}; -COMPILER_STRIP_GATE(0x80A1A46C, &lit_5455); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_5455[12] = { +// 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +// }; +// COMPILER_STRIP_GATE(0x80A1A46C, &lit_5455); +// #pragma pop /* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text * cutConfidentialConversation__13daNpc_Jagar_cFi */ -void daNpc_Jagar_c::cutConfidentialConversation(int param_0) { - // NONMATCHING +int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { + return 0; // Placeholder value } /* ############################################################################################## */ /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80A1A540 = "timer"; -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_DEAD static char const* const stringBase_80A1A540 = "timer"; +// #pragma pop /* 80A173D8-80A17898 002DB8 04C0+00 3/0 0/0 0/0 .text cutFindWolf__13daNpc_Jagar_cFi */ -void daNpc_Jagar_c::cutFindWolf(int param_0) { - // NONMATCHING +int daNpc_Jagar_c::cutFindWolf(int param_0) { + return 0; // Placeholder value } /* 80A17898-80A17924 003278 008C+00 1/1 0/0 0/0 .text chkSitMotion__13daNpc_Jagar_cFv */ @@ -1717,25 +1728,25 @@ void daNpc_Jagar_c::chkToMotion() { /* ############################################################################################## */ /* 80A1A478-80A1A47C 000148 0004+00 0/2 0/0 0/0 .rodata @5527 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5527 = -40.0f; -COMPILER_STRIP_GATE(0x80A1A478, &lit_5527); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_5527 = -40.0f; +// COMPILER_STRIP_GATE(0x80A1A478, &lit_5527); +// #pragma pop /* 80A1A47C-80A1A480 00014C 0004+00 0/2 0/0 0/0 .rodata @5659 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5659 = 0.5f; -COMPILER_STRIP_GATE(0x80A1A47C, &lit_5659); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_5659 = 0.5f; +// COMPILER_STRIP_GATE(0x80A1A47C, &lit_5659); +// #pragma pop /* 80A1A480-80A1A484 000150 0004+00 0/1 0/0 0/0 .rodata @6101 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6101 = 180.0f; -COMPILER_STRIP_GATE(0x80A1A480, &lit_6101); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6101 = 180.0f; +// COMPILER_STRIP_GATE(0x80A1A480, &lit_6101); +// #pragma pop /* 80A17A2C-80A1856C 00340C 0B40+00 1/0 0/0 0/0 .text wait__13daNpc_Jagar_cFPv */ void daNpc_Jagar_c::wait(void* param_0) { @@ -1744,46 +1755,46 @@ void daNpc_Jagar_c::wait(void* param_0) { /* ############################################################################################## */ /* 80A1A484-80A1A488 000154 0004+00 0/1 0/0 0/0 .rodata @6301 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6301 = -300.0f; -COMPILER_STRIP_GATE(0x80A1A484, &lit_6301); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6301 = -300.0f; +// COMPILER_STRIP_GATE(0x80A1A484, &lit_6301); +// #pragma pop /* 80A1A488-80A1A48C 000158 0004+00 0/1 0/0 0/0 .rodata @6302 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6302 = -50.0f; -COMPILER_STRIP_GATE(0x80A1A488, &lit_6302); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6302 = -50.0f; +// COMPILER_STRIP_GATE(0x80A1A488, &lit_6302); +// #pragma pop /* 80A1A48C-80A1A490 00015C 0004+00 0/1 0/0 0/0 .rodata @6303 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6303 = 400.0f; -COMPILER_STRIP_GATE(0x80A1A48C, &lit_6303); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6303 = 400.0f; +// COMPILER_STRIP_GATE(0x80A1A48C, &lit_6303); +// #pragma pop /* 80A1A490-80A1A494 000160 0004+00 0/1 0/0 0/0 .rodata @6304 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6304 = 45.0f; -COMPILER_STRIP_GATE(0x80A1A490, &lit_6304); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6304 = 45.0f; +// COMPILER_STRIP_GATE(0x80A1A490, &lit_6304); +// #pragma pop /* 80A1A494-80A1A498 000164 0004+00 0/1 0/0 0/0 .rodata @6305 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6305 = 135.0f; -COMPILER_STRIP_GATE(0x80A1A494, &lit_6305); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6305 = 135.0f; +// COMPILER_STRIP_GATE(0x80A1A494, &lit_6305); +// #pragma pop /* 80A1A498-80A1A49C 000168 0004+00 0/1 0/0 0/0 .rodata @6306 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6306 = 450.0f; -COMPILER_STRIP_GATE(0x80A1A498, &lit_6306); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6306 = 450.0f; +// COMPILER_STRIP_GATE(0x80A1A498, &lit_6306); +// #pragma pop /* 80A1856C-80A18B74 003F4C 0608+00 1/0 0/0 0/0 .text talkwithBou__13daNpc_Jagar_cFPv */ void daNpc_Jagar_c::talkwithBou(void* param_0) { @@ -1791,8 +1802,23 @@ void daNpc_Jagar_c::talkwithBou(void* param_0) { } /* 80A18B74-80A18F28 004554 03B4+00 3/0 0/0 0/0 .text talk__13daNpc_Jagar_cFPv */ -void daNpc_Jagar_c::talk(void* param_0) { - // NONMATCHING +int daNpc_Jagar_c::talk(void* param_0) { + if (field_0xe22 != 2) { + if (field_0xe22 > 1) { + return 0; + } + if (mType == TYPE_1) { + daNpc_Bou_c* this_00 = static_cast(field_0xf94.getActorP()); + if (this_00 && this_00->getType() == TYPE_1 && field_0xd08.checkStagger() != 0) { + if (field_0xb50.getNo() != 10) { + field_0xb50.setNo(1, -1, 1, 0); + } + if (field_0xb74.getNo() != 4) { + field_0xb74.setNo(4, -1, 1, 0); + } + } + } + } } /* 80A18F28-80A18F48 004908 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Create__FPv */ From 6584d5cec9a5f71045f52501a11c33a4fb9ac8b8 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 19 Feb 2025 08:38:20 -0500 Subject: [PATCH 09/41] Work on Jagar.changeBtp() --- src/d/actor/d_a_npc_jagar.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 0609517a125..d6f80e968a3 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1596,7 +1596,11 @@ int daNpc_Jagar_c::drawDbgInfo() { /* 80A161F4-80A16234 001BD4 0040+00 1/0 0/0 0/0 .text changeBtp__13daNpc_Jagar_cFPiPi */ void daNpc_Jagar_c::changeBtp(int* param_0, int* param_1) { - // NONMATCHING + if (((mType == TYPE_1 || mType == TYPE_2) && param_0 == 19) && param_1 == 1) { + param_0 = 17; + param_1 = 3; + } + return; } /* 80A16234-80A162B0 001C14 007C+00 1/1 0/0 0/0 .text selectAction__13daNpc_Jagar_cFv */ From 6df3c09d477d89919f0f5e17ee2e455f9eac311e Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 19 Feb 2025 09:13:22 -0500 Subject: [PATCH 10/41] Jagar.checkChangeJoint() & checkRemoveJoint() --- include/d/actor/d_a_npc_jagar.h | 7 +++++-- src/d/actor/d_a_npc_jagar.cpp | 14 -------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 2ff24e00849..5de022789cc 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -12,6 +12,9 @@ * @details * */ + +class daNpc_Bou_c; // For action method? + class daNpc_Jagar_c : public daNpcT_c { public: typedef int (daNpc_Jagar_c::*cutFunc)(int); @@ -75,8 +78,8 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A1A27C */ s32 getHeadJointNo(); /* 80A1A284 */ s32 getNeckJointNo(); /* 80A1A28C */ s32 getBackboneJointNo(); - /* 80A1A294 */ int checkChangeJoint(int); - /* 80A1A2A4 */ int checkRemoveJoint(int); + /* 80A1A294 */ int checkChangeJoint(int param_1) { return param_1 == 4; } + /* 80A1A2A4 */ int checkRemoveJoint(int param_1) { return param_1 == 8; } /* 80A1A2B4 */ s32 getFootLJointNo(); /* 80A1A2BC */ s32 getFootRJointNo(); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index d6f80e968a3..2aeba017ba4 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -2148,20 +2148,6 @@ long daNpc_Jagar_c::getBackboneJointNo() { return 0; // Placeholder value } -/* 80A1A294-80A1A2A4 005C74 0010+00 1/0 0/0 0/0 .text checkChangeJoint__13daNpc_Jagar_cFi - */ -int daNpc_Jagar_c::checkChangeJoint(int param_0) { - // NONMATCHING - return 0; // Placeholder value -} - -/* 80A1A2A4-80A1A2B4 005C84 0010+00 1/0 0/0 0/0 .text checkRemoveJoint__13daNpc_Jagar_cFi - */ -int daNpc_Jagar_c::checkRemoveJoint(int param_0) { - // NONMATCHING - return 0; // Placeholder value -} - /* 80A1A2B4-80A1A2BC 005C94 0008+00 1/0 0/0 0/0 .text getFootLJointNo__13daNpc_Jagar_cFv */ s32 daNpc_Jagar_c::getFootLJointNo() { From 1167076f62c21dc40b3a8b57b5e0a915d99d1afc Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 19 Feb 2025 09:42:00 -0500 Subject: [PATCH 11/41] Jagar.chkAction() & setAction() --- include/d/actor/d_a_npc_jagar.h | 2 +- src/d/actor/d_a_npc_jagar.cpp | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 5de022789cc..4ea7fdedb75 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -54,7 +54,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A161F4 */ void changeBtp(int*, int*); /* 80A16234 */ void selectAction(); /* 80A162B0 */ int chkAction(int (daNpc_Jagar_c::*)(void*)); - /* 80A162DC */ void setAction(int (daNpc_Jagar_c::*)(void*)); + /* 80A162DC */ int setAction(int (daNpc_Jagar_c::*)(void*)); /* 80A16384 */ int cutClimbUp(int); /* 80A16544 */ int cutNeedYourHelp(int); /* 80A16CD8 */ int cutAnger(int); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 2aeba017ba4..ffff973ca2d 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1611,13 +1611,22 @@ void daNpc_Jagar_c::selectAction() { /* 80A162B0-80A162DC 001C90 002C+00 2/2 0/0 0/0 .text * chkAction__13daNpc_Jagar_cFM13daNpc_Jagar_cFPCvPvPv_i */ int daNpc_Jagar_c::chkAction(int (daNpc_Jagar_c::*action)(void*)) { - return 0; // Placeholder value + return field_0xfe0 == action; } /* 80A162DC-80A16384 001CBC 00A8+00 2/2 0/0 0/0 .text * setAction__13daNpc_Jagar_cFM13daNpc_Jagar_cFPCvPvPv_i */ -void daNpc_Jagar_c::setAction(int (daNpc_Jagar_c::*param_0)(void*)) { - // NONMATCHING +int daNpc_Jagar_c::setAction(int (daNpc_Jagar_c::*action)(void*)) { + field_0xe22 = 3; + if (field_0xfe0 != NULL) { + (this->*field_0xfe0)(NULL); + } + field_0xe22 = 0; + field_0xfe0 = action; + if (field_0xfe0 != NULL) { + (this->*field_0xfe0)(NULL); + } + return 1; } /* ############################################################################################## */ From 1ac5c8432069baaea29eb03e3022a00eac5f881a Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 19 Feb 2025 10:21:49 -0500 Subject: [PATCH 12/41] Jagar.chkChuMotion() --- include/d/actor/d_a_npc_jagar.h | 15 ++------------- src/d/actor/d_a_npc_jagar.cpp | 12 ++++++++++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 4ea7fdedb75..08cfcea4cc6 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -63,7 +63,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A173D8 */ int cutFindWolf(int); /* 80A17898 */ void chkSitMotion(); /* 80A17924 */ void chkSitMotion2(); - /* 80A17984 */ void chkChuMotion(); + /* 80A17984 */ int chkChuMotion(); /* 80A179F8 */ void chkToMotion(); /* 80A17A2C */ void wait(void*); /* 80A1856C */ void talkwithBou(void*); @@ -106,18 +106,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0F94 */ daNpcT_ActorMngr_c field_0xf94; /* 0x0FE0 */ actionFunc field_0xfe0; /* 0x0FE4 */ actionFunc field_0xfe4; - - /* WIP */ - // dBgS_AcchCir field_0x580; - // dBgS_AcchCir field_0x9c0; - // cXyz field_0x8a0; - // cXyz field_0x8B4; - // int field_0x768; - // int field_0x76C; - // int field_0x934; - // float field_0xdf4; - // int field_0xa88; - + /* 0x1001 */ u8 field_0x1001; }; // STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x172c); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index ffff973ca2d..7713cbbe5d5 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1730,8 +1730,16 @@ void daNpc_Jagar_c::chkSitMotion2() { } /* 80A17984-80A179F8 003364 0074+00 3/3 0/0 0/0 .text chkChuMotion__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::chkChuMotion() { - // NONMATCHING +int daNpc_Jagar_c::chkChuMotion() { + if (daNpcT_chkEvtBit(0x235) == 0 && daNpcT_chkEvtBit(0x1c) != 0) { + if (daNpcT_chkEvtBit(0x87) == 0) { + return (field_0x1001 = 0) ? 1 : 0; // Is this right? + } else { + return 0; + } + } else { + return 0; + } } /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ From 4f7a38593741f91189548582d3cbf1f4e7b0305f Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 19 Feb 2025 10:31:08 -0500 Subject: [PATCH 13/41] Jagar.chkSitMotion() & chkSitMotion2() --- include/d/actor/d_a_npc_jagar.h | 5 +++-- src/d/actor/d_a_npc_jagar.cpp | 29 +++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 08cfcea4cc6..c9da4967d48 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -61,8 +61,8 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A16EFC */ int cutConversationWithBou(int); /* 80A1705C */ int cutConfidentialConversation(int); /* 80A173D8 */ int cutFindWolf(int); - /* 80A17898 */ void chkSitMotion(); - /* 80A17924 */ void chkSitMotion2(); + /* 80A17898 */ int chkSitMotion(); + /* 80A17924 */ int chkSitMotion2(); /* 80A17984 */ int chkChuMotion(); /* 80A179F8 */ void chkToMotion(); /* 80A17A2C */ void wait(void*); @@ -107,6 +107,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0FE0 */ actionFunc field_0xfe0; /* 0x0FE4 */ actionFunc field_0xfe4; /* 0x1001 */ u8 field_0x1001; + /* 0x1002 */ u8 field_0x1002; // Not sure if u8 }; // STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x172c); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 7713cbbe5d5..c161c5cf753 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1720,13 +1720,34 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { } /* 80A17898-80A17924 003278 008C+00 1/1 0/0 0/0 .text chkSitMotion__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::chkSitMotion() { - // NONMATCHING +int daNpc_Jagar_c::chkSitMotion() { + if (daNpcT_chkEvtBit(0x235) == 0) { + if (daNpcT_chkEvtBit(0x1c) != 0) { + if (daNpcT_chkEvtBit(0x87) != 0) { + return 0; + } + if (field_0x1002 != 0) { // 0 or TYPE_0? + return 0; + } + } + } else if (field_0x1002 != 0) { // 0 or TYPE_0? + return 0; + } + return 1; } /* 80A17924-80A17984 003304 0060+00 1/1 0/0 0/0 .text chkSitMotion2__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::chkSitMotion2() { - // NONMATCHING +int daNpc_Jagar_c::chkSitMotion2() { + if (daNpcT_chkEvtBit(0x235) == 0) { + if (daNpcT_chkEvtBit(0x8a) != 0) { + return 1; + } + } else { + if (daNpcT_chkEvtBit(0x224) != 0) { + return 1; + } + } + return 0; } /* 80A17984-80A179F8 003364 0074+00 3/3 0/0 0/0 .text chkChuMotion__13daNpc_Jagar_cFv */ From ce61e7955d6324ecaa1b92df720ff418649740a5 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 19 Feb 2025 10:35:58 -0500 Subject: [PATCH 14/41] Jagar.chkToMotion() --- include/d/actor/d_a_npc_jagar.h | 3 ++- src/d/actor/d_a_npc_jagar.cpp | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index c9da4967d48..beb9bed6df2 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -64,7 +64,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A17898 */ int chkSitMotion(); /* 80A17924 */ int chkSitMotion2(); /* 80A17984 */ int chkChuMotion(); - /* 80A179F8 */ void chkToMotion(); + /* 80A179F8 */ int chkToMotion(); /* 80A17A2C */ void wait(void*); /* 80A1856C */ void talkwithBou(void*); /* 80A18B74 */ int talk(void*); @@ -98,6 +98,7 @@ class daNpc_Jagar_c : public daNpcT_c { private: /* 0x00B0 */ int field_0xb0; /* 0x0568 */ u8 field_0x568[0x100c - 0x568]; + /* 0x0B7C */ int field_0xb7c; /* 0x0BA0 */ daNpcT_ActorMngr_c field_0x0ba0; /* 0x0E30 */ int field_0xe30; /* 0x0E44 */ dCcD_Cyl mCyl1; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index c161c5cf753..42db44006e3 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1764,8 +1764,16 @@ int daNpc_Jagar_c::chkChuMotion() { } /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::chkToMotion() { - // NONMATCHING +int daNpc_Jagar_c::chkToMotion() { + switch(field_0xb7c) { + case 10: + case 11: + case 12: + case 13: + return 1; + default: + return 0; + } } /* ############################################################################################## */ From 15adb57d8f89e172cc60e2e3246341f2aa9cd7af Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 19 Feb 2025 11:06:08 -0500 Subject: [PATCH 15/41] Jagar.CreateHeap() --- src/d/actor/d_a_npc_jagar.cpp | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 42db44006e3..bb01f3add9d 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -339,8 +339,9 @@ SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = { #pragma pop /* 80A1A568-80A1A570 000020 0008+00 1/1 0/0 0/0 .data l_bmdData */ -static int l_bmdData[8] = { - 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x01, +static int l_bmdData[1][2] = { + // 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x01, + 13, 1, }; /* 80A1A570-80A1A5B8 -00001 0048+00 0/1 0/0 0/0 .data l_evtList */ @@ -954,12 +955,30 @@ int daNpc_Jagar_c::create() { /* 80A14B20-80A14D90 000500 0270+00 1/1 0/0 0/0 .text CreateHeap__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::CreateHeap() { - // mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &field_0x580, - // 0x80000, 0x11020284); - // if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { - // return 0; - // } - return 0; // Placeholder value + J3DModelData* modelData = static_cast(dComIfG_getObjectRes( + l_resNameList[l_bmdData[0][1]], l_bmdData[0][0])); + if (modelData == NULL) { + return 0; + } + mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &field_0x580, + 0x80000, 0x11020284); + if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { + return 0; + } + J3DModel* model = mpMorf[0]->getModel(); + for (u16 i = 0; i < modelData->getJointNum(); i++) { + modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack); + } + model->setUserArea((u32)this); + field_0x96c = new daNpcT_MatAnm_c(); + if (field_0x96c == NULL) { + return 0; + } + if (setFaceMotionAnm(1, false) && setMotionAnm(0, 0.0f, 0)) + { + return 1; + } + return 0; } /* 80A14D90-80A14DCC 000770 003C+00 1/1 0/0 0/0 .text __dt__15J3DTevKColorAnmFv */ From 554de513b4be2fe4a5f7d06431569c6e37eea934 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 19 Feb 2025 11:11:00 -0500 Subject: [PATCH 16/41] Jagar.createHeapCallBack() & ctrlJointCallBack() --- src/d/actor/d_a_npc_jagar.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index bb01f3add9d..f1fbecba0fa 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1067,15 +1067,20 @@ int daNpc_Jagar_c::Draw() { /* 80A15034-80A15054 000A14 0020+00 1/1 0/0 0/0 .text * createHeapCallBack__13daNpc_Jagar_cFP10fopAc_ac_c */ int daNpc_Jagar_c::createHeapCallBack(fopAc_ac_c* i_this) { - // NONMATCHING - return 0; // Placeholder value + return static_cast(i_this)->CreateHeap(); } /* 80A15054-80A150AC 000A34 0058+00 1/1 0/0 0/0 .text * ctrlJointCallBack__13daNpc_Jagar_cFP8J3DJointi */ int daNpc_Jagar_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) { - // NONMATCHING - return 0; // Placeholder value + if (param_2 == 0) { + J3DModel* model = j3dSys.getModel(); + daNpc_Hanjo_c* i_this = reinterpret_cast(model->getUserArea()); + if (i_this != 0) { + i_this->ctrlJoint(param_1, model); + } + } + return 1; } /* 80A150AC-80A150F8 000A8C 004C+00 1/1 0/0 2/2 .text getType__13daNpc_Jagar_cFv */ From a2e9b16f9c60dd08f44438798c1b58b7bbe93d78 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 19 Feb 2025 13:15:44 -0500 Subject: [PATCH 17/41] Jagar.cuAnger() --- include/d/actor/d_a_npc_jagar.h | 3 ++- src/d/actor/d_a_npc_jagar.cpp | 37 +++++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index beb9bed6df2..e460ac9a888 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -98,8 +98,8 @@ class daNpc_Jagar_c : public daNpcT_c { private: /* 0x00B0 */ int field_0xb0; /* 0x0568 */ u8 field_0x568[0x100c - 0x568]; + /* 0x0B58 */ int field_0xb58; // CutAnger field /* 0x0B7C */ int field_0xb7c; - /* 0x0BA0 */ daNpcT_ActorMngr_c field_0x0ba0; /* 0x0E30 */ int field_0xe30; /* 0x0E44 */ dCcD_Cyl mCyl1; /* 0x0F80 */ u8 mType; @@ -109,6 +109,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0FE4 */ actionFunc field_0xfe4; /* 0x1001 */ u8 field_0x1001; /* 0x1002 */ u8 field_0x1002; // Not sure if u8 + /* 0x1003 */ u8 field_0x1003; // CutAnger field }; // STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x172c); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index f1fbecba0fa..4dc73696fe2 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1375,7 +1375,7 @@ void daNpc_Jagar_c::action() { setAction(field_0xfe0); } } - if (field_0x0ba0.getActorP()) { + if (field_0xba0.getActorP()) { if (field_0xb0 == 2) { field_0xe30 = 5; @@ -1691,7 +1691,40 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { /* 80A16CD8-80A16EFC 0026B8 0224+00 1/0 0/0 0/0 .text cutAnger__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutAnger(int param_0) { - return 0; // Placeholder value + int rv = 0; + int local_b4 = -1; + int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); + if (piVar1 != NULL) { + local_b4 = *piVar1; + } + if ((((dComIfGp_getEventManager().getIsAddvance(param_1)) && local_b4 != 1) && local_b4 < 1) && local_b4 > -1) { + if (field_0xb58 != 8) { + field_0xb50.setNo(8, 0.0, 0, 0); + } + if (field_0xb7c != 0) { + field_0xb74.setNo(0, 0.0, 0, 0); + } + field_0x1003 = 0; + s16 sVar3 = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)); // Correct? + setAngle((daNpcT_c *)this, sVar3); + initTalk(field_0xa7c, NULL); + } + if (local_b4 == 1) { + field_0xba8.lookNone(0); + if (field_0x4b6 == field_0xd7a) { + rv = 1; + } else { + step(field_0x4b6, 8, 14, 15, 0); + } + } else if (local_b4 < 1 && local_b4 > -1) { + if (field_0xce0 != 1) { + field_0xba8.lookPlayer(0); + if (talkProc(NULL, 0, NULL, 0) && && mFlow.checkEndFlow()) { + rv = 1; + } + } + } + return rv; } /* ############################################################################################## */ From fb8fa94112dcc250b51b3258b32f6b5ba41f96d2 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Thu, 20 Feb 2025 13:34:18 -0500 Subject: [PATCH 18/41] Jagar.cutClimbUp() - 92% --- include/d/actor/d_a_npc_jagar.h | 8 ++- src/d/actor/d_a_npc_jagar.cpp | 96 ++++++++++++++++++++++----------- 2 files changed, 72 insertions(+), 32 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index e460ac9a888..5bef6df559a 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -97,9 +97,13 @@ class daNpc_Jagar_c : public daNpcT_c { static cutFunc mCutList[7]; private: /* 0x00B0 */ int field_0xb0; + /* 0x04B6 */ s16 field_0x4b6; /* 0x0568 */ u8 field_0x568[0x100c - 0x568]; - /* 0x0B58 */ int field_0xb58; // CutAnger field + /* 0x0B58 */ int field_0xb58; // CutAnger int /* 0x0B7C */ int field_0xb7c; + /* 0x0CE0 */ int field_0xce0; // CutAnger int + /* 0x0CFF */ u8 field_0xcff; + /* 0x0D7A */ short field_0xd7a; // CutAnger short /* 0x0E30 */ int field_0xe30; /* 0x0E44 */ dCcD_Cyl mCyl1; /* 0x0F80 */ u8 mType; @@ -109,7 +113,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0FE4 */ actionFunc field_0xfe4; /* 0x1001 */ u8 field_0x1001; /* 0x1002 */ u8 field_0x1002; // Not sure if u8 - /* 0x1003 */ u8 field_0x1003; // CutAnger field + /* 0x1003 */ u8 field_0x1003; // CutAnger u8 }; // STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x172c); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 4dc73696fe2..3034ae60bc4 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1067,17 +1067,17 @@ int daNpc_Jagar_c::Draw() { /* 80A15034-80A15054 000A14 0020+00 1/1 0/0 0/0 .text * createHeapCallBack__13daNpc_Jagar_cFP10fopAc_ac_c */ int daNpc_Jagar_c::createHeapCallBack(fopAc_ac_c* i_this) { - return static_cast(i_this)->CreateHeap(); + return static_cast(i_this)->CreateHeap(); } /* 80A15054-80A150AC 000A34 0058+00 1/1 0/0 0/0 .text * ctrlJointCallBack__13daNpc_Jagar_cFP8J3DJointi */ int daNpc_Jagar_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) { - if (param_2 == 0) { + if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); - daNpc_Hanjo_c* i_this = reinterpret_cast(model->getUserArea()); + daNpc_Jagar_c* i_this = reinterpret_cast(model->getUserArea()); if (i_this != 0) { - i_this->ctrlJoint(param_1, model); + i_this->ctrlJoint(param_0, model); } } return 1; @@ -1620,9 +1620,9 @@ int daNpc_Jagar_c::drawDbgInfo() { /* 80A161F4-80A16234 001BD4 0040+00 1/0 0/0 0/0 .text changeBtp__13daNpc_Jagar_cFPiPi */ void daNpc_Jagar_c::changeBtp(int* param_0, int* param_1) { - if (((mType == TYPE_1 || mType == TYPE_2) && param_0 == 19) && param_1 == 1) { - param_0 = 17; - param_1 = 3; + if (((mType == TYPE_1 || mType == TYPE_2) && *param_0 == 19) && *param_1 == 1) { + *param_0 = 17; + *param_1 = 3; } return; } @@ -1653,16 +1653,39 @@ int daNpc_Jagar_c::setAction(int (daNpc_Jagar_c::*action)(void*)) { return 1; } -/* ############################################################################################## */ -/* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -// #pragma push -// #pragma force_active on -// SECTION_DEAD static char const* const stringBase_80A1A52A = "prm"; -// #pragma pop - /* 80A16384-80A16544 001D64 01C0+00 1/0 0/0 0/0 .text cutClimbUp__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutClimbUp(int param_0) { - return 0; // Placeholder value + int rv = 0; + int iVar4 = -1; + int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + if (piVar1) { + iVar4 = *piVar1; + } + if (dComIfGp_getEventManager().getIsAddvance(param_0)) { + switch (iVar4) { + case 0: + field_0xb50.setNo(8, 0.0f, 0, 0); + field_0xb74.setNo(2, 0.0f, 0, 0); + field_0xba8.lookNone(1); + field_0x1003 = 1; + setAngle(field_0x4b6); + initTalk(field_0xa7c, NULL); + break; + case 2: + break; + } + } + switch (iVar4) { + case 0: + if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { + rv = 1; + } + break; + case 2: + rv = 1; + break; + } + return rv; } /* ############################################################################################## */ @@ -1693,11 +1716,11 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { int daNpc_Jagar_c::cutAnger(int param_0) { int rv = 0; int local_b4 = -1; - int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); + int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); if (piVar1 != NULL) { local_b4 = *piVar1; } - if ((((dComIfGp_getEventManager().getIsAddvance(param_1)) && local_b4 != 1) && local_b4 < 1) && local_b4 > -1) { + if ((((dComIfGp_getEventManager().getIsAddvance(param_0)) && local_b4 != 1) && local_b4 < 1) && local_b4 > -1) { if (field_0xb58 != 8) { field_0xb50.setNo(8, 0.0, 0, 0); } @@ -1706,23 +1729,23 @@ int daNpc_Jagar_c::cutAnger(int param_0) { } field_0x1003 = 0; s16 sVar3 = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)); // Correct? - setAngle((daNpcT_c *)this, sVar3); + setAngle(sVar3); initTalk(field_0xa7c, NULL); } if (local_b4 == 1) { field_0xba8.lookNone(0); - if (field_0x4b6 == field_0xd7a) { - rv = 1; - } else { - step(field_0x4b6, 8, 14, 15, 0); - } + // if (field_0x4b6 == field_0xd7a) { + // rv = 1; + // } else { + // step(field_0x4b6, 8, 14, 15, 0); + // } } else if (local_b4 < 1 && local_b4 > -1) { - if (field_0xce0 != 1) { - field_0xba8.lookPlayer(0); - if (talkProc(NULL, 0, NULL, 0) && && mFlow.checkEndFlow()) { - rv = 1; - } - } + // if (field_0xce0 != 1) { + // field_0xba8.lookPlayer(0); + // if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { + // rv = 1; + // } + // } } return rv; } @@ -1761,7 +1784,20 @@ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { /* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text * cutConfidentialConversation__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { - return 0; // Placeholder value + int rv = 0; + int iVar9 = -1; + int iVar8 = 0; + int* piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + if(piVar2) { + iVar9 = *piVar2; + } + piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); + if(piVar2) { + iVar8 = *piVar2; + } + // field_0xf94.getActorP(); // Check this? + dComIfGp_setMesgCameraInfoActor(field_0xf94.getActorP(), (fopAc_ac_c *)this, 0, 0, 0, 0, 0, 0, 0, 0); + } /* ############################################################################################## */ From 876bf11e595d1bfd4a1d8ec94a63a8a7a413d49a Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Thu, 20 Feb 2025 16:03:16 -0500 Subject: [PATCH 19/41] Jagar.setAttnPos() - 85% --- include/d/actor/d_a_npc_jagar.h | 95 ++--- src/d/actor/d_a_npc_jagar.cpp | 707 +++++++++++++------------------- 2 files changed, 325 insertions(+), 477 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 5bef6df559a..bef7fabcdd3 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -114,6 +114,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x1001 */ u8 field_0x1001; /* 0x1002 */ u8 field_0x1002; // Not sure if u8 /* 0x1003 */ u8 field_0x1003; // CutAnger u8 + /* 0x1004 */ u8 field_0x1004; }; // STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x172c); @@ -123,56 +124,50 @@ class daNpc_Jagar_Param_c { /* 80A1A2C4 */ virtual ~daNpc_Jagar_Param_c() {} struct param { - /* 0x00 */ f32 field_0x00; - /* 0x04 */ f32 field_0x04; - /* 0x08 */ f32 field_0x08; - /* 0x0C */ f32 field_0x0c; - /* 0x10 */ f32 field_0x10; - /* 0x14 */ f32 field_0x14; - /* 0x18 */ f32 field_0x18; - /* 0x1C */ f32 field_0x1c; - /* 0x20 */ f32 field_0x20; - /* 0x24 */ f32 field_0x24; - /* 0x28 */ f32 field_0x28; - /* 0x2C */ f32 field_0x2c; - /* 0x30 */ f32 field_0x30; - /* 0x34 */ f32 field_0x34; - /* 0x38 */ f32 field_0x38; - /* 0x3C */ f32 field_0x3c; - /* 0x40 */ f32 field_0x40; - /* 0x44 */ f32 field_0x44; - /* 0x48 */ s16 field_0x48; - /* 0x4A */ s16 field_0x4a; - /* 0x4C */ s16 field_0x4c; - /* 0x4E */ s16 field_0x4e; - /* 0x50 */ f32 field_0x50; - /* 0x54 */ f32 field_0x54; - /* 0x58 */ f32 field_0x58; - /* 0x5C */ f32 field_0x5c; - /* 0x60 */ s16 field_0x60; - /* 0x62 */ s16 field_0x62; - /* 0x64 */ int field_0x64; - /* 0x68 */ int field_0x68; - /* 0x6C */ f32 field_0x6c; - /* 0x70 */ f32 field_0x70; - /* 0x74 */ f32 field_0x74; - /* 0x78 */ f32 field_0x78; - /* 0x7C */ f32 field_0x7c; - /* 0x80 */ f32 field_0x80; - /* 0x84 */ f32 field_0x84; - /* 0x88 */ f32 field_0x88; - /* 0x8C */ f32 field_0x8c; - /* 0x90 */ f32 field_0x90; - /* 0x94 */ f32 field_0x94; - /* 0x98 */ f32 field_0x98; - /* 0x9C */ f32 field_0x9c; - /* 0xA0 */ f32 field_0xa0; - /* 0xA4 */ f32 field_0xa4; - /* 0xA8 */ f32 field_0xa8; - /* 0xAC */ s16 field_0xac; - /* 0xAE */ s16 field_0xae; - /* 0xB0 */ s16 field_0xb0; - /* 0xB2 */ s16 field_0xb2; + /* 0x00 */ f32 field_0x00; // 170.0f + /* 0x04 */ f32 field_0x04; // -3.0f + /* 0x08 */ f32 field_0x08; // 1.0f + /* 0x0C */ f32 field_0x0c; // 400.0f + /* 0x10 */ f32 field_0x10; // 255.0f + /* 0x14 */ f32 field_0x14; // 160.0f + /* 0x18 */ f32 field_0x18; // 35.0f + /* 0x1C */ f32 field_0x1c; // 30.0f + /* 0x20 */ f32 field_0x20; // 0.0f + /* 0x24 */ f32 field_0x24; // 0.0f + /* 0x28 */ f32 field_0x28; // 10.0f + /* 0x2C */ f32 field_0x2c; // -10.0f + /* 0x30 */ f32 field_0x30; // 30.0f + /* 0x34 */ f32 field_0x34; // -10.0f + /* 0x38 */ f32 field_0x38; // 45.0f + /* 0x3C */ f32 field_0x3c; // -45.0f + /* 0x40 */ f32 field_0x40; // 0.6f + /* 0x44 */ f32 field_0x44; // 12.0f + /* 0x48 */ s16 field_0x48; // 3 + /* 0x4A */ s16 field_0x4a; // 6 + /* 0x4C */ s16 field_0x4c; // 5 + /* 0x4E */ s16 field_0x4e; // 6 + /* 0x50 */ f32 field_0x50; // 110.0f + /* 0x54 */ f32 field_0x54; // 500.0f + /* 0x58 */ f32 field_0x58; // 300.0f + /* 0x5C */ f32 field_0x5c; // -300.0f + /* 0x60 */ s16 field_0x60; // 60 + /* 0x62 */ s16 field_0x62; // 8 + /* 0x64 */ f32 field_0x64; // 0.0f + /* 0x68 */ f32 field_0x68; // 0.0f + /* 0x6C */ f32 field_0x6c; // 4.0f + /* 0x70 */ f32 field_0x70; // 0.0f + /* 0x74 */ f32 field_0x74; // 0.0f + /* 0x78 */ f32 field_0x78; // 0.0f + /* 0x7C */ f32 field_0x7c; // 0.0f + /* 0x80 */ f32 field_0x80; // 0.0f + /* 0x84 */ f32 field_0x84; // 0.0f + /* 0x88 */ f32 field_0x88; // 0.0f + /* 0x8C */ f32 field_0x8c; // 1400.0f + /* 0x90 */ f32 field_0x90; // 200.0f + /* 0x94 */ f32 field_0x94; // -800.0f + /* 0x98 */ f32 field_0x98; // 16.0f + /* 0x9C */ f32 field_0x9c; // 1800.0f + }; static daNpc_Jagar_Param_c::param const m; }; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 3034ae60bc4..29bc4d33f7d 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -303,22 +303,22 @@ extern "C" void __register_global_object(); /* ############################################################################################## */ /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -// #pragma push -// #pragma force_active on -// SECTION_DEAD static char const* const stringBase_80A1A49C = ""; -// SECTION_DEAD static char const* const stringBase_80A1A49D = "NO_RESPONSE"; -// SECTION_DEAD static char const* const stringBase_80A1A4A9 = "CLIMBUP"; -// SECTION_DEAD static char const* const stringBase_80A1A4B1 = "NEED_YOUR_HELP"; -// SECTION_DEAD static char const* const stringBase_80A1A4C0 = "ANGER"; -// SECTION_DEAD static char const* const stringBase_80A1A4C6 = "CONVERSATION_WITH_BOU"; -// SECTION_DEAD static char const* const stringBase_80A1A4DC = "CONFIDENTIAL_CONVERSATION"; -// SECTION_DEAD static char const* const stringBase_80A1A4F6 = "FIND_WOLF"; -// SECTION_DEAD static char const* const stringBase_80A1A500 = "FIND_WOLF_VER2"; -// SECTION_DEAD static char const* const stringBase_80A1A50F = "Jagar"; -// SECTION_DEAD static char const* const stringBase_80A1A515 = "Jagar1"; -// SECTION_DEAD static char const* const stringBase_80A1A51C = "Jagar2"; -// SECTION_DEAD static char const* const stringBase_80A1A523 = "Jagar3"; -// #pragma pop +#pragma push +#pragma force_active on +SECTION_DEAD static char const* const stringBase_80A1A49C = ""; +SECTION_DEAD static char const* const stringBase_80A1A49D = "NO_RESPONSE"; +SECTION_DEAD static char const* const stringBase_80A1A4A9 = "CLIMBUP"; +SECTION_DEAD static char const* const stringBase_80A1A4B1 = "NEED_YOUR_HELP"; +SECTION_DEAD static char const* const stringBase_80A1A4C0 = "ANGER"; +SECTION_DEAD static char const* const stringBase_80A1A4C6 = "CONVERSATION_WITH_BOU"; +SECTION_DEAD static char const* const stringBase_80A1A4DC = "CONFIDENTIAL_CONVERSATION"; +SECTION_DEAD static char const* const stringBase_80A1A4F6 = "FIND_WOLF"; +SECTION_DEAD static char const* const stringBase_80A1A500 = "FIND_WOLF_VER2"; +SECTION_DEAD static char const* const stringBase_80A1A50F = "Jagar"; +SECTION_DEAD static char const* const stringBase_80A1A515 = "Jagar1"; +SECTION_DEAD static char const* const stringBase_80A1A51C = "Jagar2"; +SECTION_DEAD static char const* const stringBase_80A1A523 = "Jagar3"; +#pragma pop /* 80A1A548-80A1A554 000000 000C+00 2/2 0/0 0/0 .data cNullVec__6Z2Calc */ SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { @@ -806,25 +806,14 @@ daNpc_Jagar_c::~daNpc_Jagar_c() { /* ############################################################################################## */ /* 80A1A330-80A1A3D0 000000 00A0+00 13/13 0/0 1/1 .rodata m__19daNpc_Jagar_Param_c */ daNpc_Jagar_Param_c::param const daNpc_Jagar_Param_c::m = { - 160.0f, -3.0f, 1.0f, 400.0f, 255.0f, 160.0f, + 170.0f, -3.0f, 1.0f, 400.0f, 255.0f, 160.0f, 35.0f, 30.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f, 3, 6, 5, 6, 110.0f, 500.0f, 300.0f, -300.0f, - 60, 8, 0.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, + 60, 8, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1400.0f, - 200.0f, -800.0f, 16.0f, 1800.0f - // 0x43, 0x2A, 0x00, 0x00, 0xC0, 0x40, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x43, 0xC8, 0x00, 0x00, - // 0x43, 0x7F, 0x00, 0x00, 0x43, 0x20, 0x00, 0x00, 0x42, 0x0C, 0x00, 0x00, 0x41, 0xF0, 0x00, 0x00, - // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x20, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, - // 0x41, 0xF0, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, 0x42, 0x34, 0x00, 0x00, 0xC2, 0x34, 0x00, 0x00, - // 0x3F, 0x19, 0x99, 0x9A, 0x41, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x05, 0x00, 0x06, - // 0x42, 0xDC, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00, 0x43, 0x96, 0x00, 0x00, 0xC3, 0x96, 0x00, 0x00, - // 0x00, 0x3C, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, - // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xAF, 0x00, 0x00, - // 0x43, 0x48, 0x00, 0x00, 0xC4, 0x48, 0x00, 0x00, 0x41, 0x80, 0x00, 0x00, 0x44, 0xE1, 0x00, 0x00, + 200.0f, -800.0f, 16.0f, 1800.0f, }; -// COMPILER_STRIP_GATE(0x80A1A330, &daNpc_Jagar_Param_c::m); /* 80A1A3D0-80A1A3E0 0000A0 0010+00 0/1 0/0 0/0 .rodata heapSize$4099 */ // #pragma push @@ -840,144 +829,141 @@ static int const heapSize[4] = { // #pragma pop /* 80A1A3E0-80A1A3E4 0000B0 0004+00 0/2 0/0 0/0 .rodata @4165 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4165 = -200.0f; -// COMPILER_STRIP_GATE(0x80A1A3E0, &lit_4165); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_4165 = -200.0f; +COMPILER_STRIP_GATE(0x80A1A3E0, &lit_4165); +#pragma pop /* 80A1A3E4-80A1A3E8 0000B4 0004+00 0/1 0/0 0/0 .rodata @4166 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4166 = -100.0f; -// COMPILER_STRIP_GATE(0x80A1A3E4, &lit_4166); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_4166 = -100.0f; +COMPILER_STRIP_GATE(0x80A1A3E4, &lit_4166); +#pragma pop /* 80A1A3E8-80A1A3EC 0000B8 0004+00 0/1 0/0 0/0 .rodata @4167 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4167 = 200.0f; -// COMPILER_STRIP_GATE(0x80A1A3E8, &lit_4167); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_4167 = 200.0f; +COMPILER_STRIP_GATE(0x80A1A3E8, &lit_4167); +#pragma pop /* 80A1A3EC-80A1A3F0 0000BC 0004+00 0/2 0/0 0/0 .rodata @4168 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4168 = 300.0f; -// COMPILER_STRIP_GATE(0x80A1A3EC, &lit_4168); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_4168 = 300.0f; +COMPILER_STRIP_GATE(0x80A1A3EC, &lit_4168); +#pragma pop /* 80A1A3F0-80A1A3F4 0000C0 0004+00 4/15 0/0 0/0 .rodata @4169 */ -// SECTION_RODATA static u8 const lit_4169[4] = { -// 0x00, -// 0x00, -// 0x00, -// 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A3F0, &lit_4169); -// static u8 const lit_4169[4] = { -// 0x00, 0x00, 0x00, 0x00, -// }; +SECTION_RODATA static u8 const lit_4169[4] = { + 0x00, + 0x00, + 0x00, + 0x00, +}; /* 80A1A3F4-80A1A3F8 0000C4 0004+00 0/1 0/0 0/0 .rodata @4170 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4170 = -1000000000.0f; -// COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_4170 = -1000000000.0f; +COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); +#pragma pop /* 80A14858-80A14B20 000238 02C8+00 1/1 0/0 0/0 .text create__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::create() { - fopAcM_SetupActor2(this, daNpc_Jagar_c, (const daNpcT_faceMotionAnmData_c *)l_faceMotionAnmData, - (const daNpcT_motionAnmData_c *)l_motionAnmData, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *) l_faceMotionSequenceData, 4, - (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList - ); - mType = getType(); - field_0xa7c = getFlowNodeNo(); - field_0xa89 = 0; - int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); - if (rv == cPhs_COMPLEATE_e) { - OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, - field_0xa7c, getPathID(), fopAcM_GetParam(this)); - if (isDelete()) { - return cPhs_ERROR_e; - } - OS_REPORT("\n"); - if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) { - OS_REPORT("===>isDelete:TRUE\n"); - return cPhs_ERROR_e; - } - J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); - fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); - fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); - field_0x580.init(¤t.pos, &eyePos, 3, 1); - field_0x9c0.init(&field_0x68c, 60.0f, 0.0f); - reset(); - field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, - &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), - fopAcM_GetShapeAngle_p(this)); - field_0x864.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); - mCyl1.Set(mCcDCyl); // <-- Check value?? - mCyl1.SetStts(&field_0x864); - mCyl1.SetTgHitCallback(tgHitCallBack); - field_0x68c.CrrPos(dComIfG_Bgsp()); - field_0x930 = field_0x68c.m_gnd; - field_0xdf4 = field_0x68c.GetGroundH(); - if (field_0xdf4 != -1e9f) { - setEnvTevColor(); - setRoomNo(); - } - field_0xa88 = 1; - Execute(); - field_0xa88 = 0; - } - return rv; + // fopAcM_SetupActor2(this, daNpc_Jagar_c, (const daNpcT_faceMotionAnmData_c *)l_faceMotionAnmData, + // (const daNpcT_motionAnmData_c *)l_motionAnmData, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *) l_faceMotionSequenceData, 4, + // (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList + // ); + // mType = getType(); + // field_0xa7c = getFlowNodeNo(); + // field_0xa89 = 0; + // int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + // if (rv == cPhs_COMPLEATE_e) { + // OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, + // field_0xa7c, getPathID(), fopAcM_GetParam(this)); + // if (isDelete()) { + // return cPhs_ERROR_e; + // } + // OS_REPORT("\n"); + // if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) { + // OS_REPORT("===>isDelete:TRUE\n"); + // return cPhs_ERROR_e; + // } + // J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); + // fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); + // fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); + // field_0x580.init(¤t.pos, &eyePos, 3, 1); + // field_0x9c0.init(&field_0x68c, 60.0f, 0.0f); + // reset(); + // field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, + // &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), + // fopAcM_GetShapeAngle_p(this)); + // field_0x864.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); + // mCyl1.Set(mCcDCyl); // <-- Check value?? + // mCyl1.SetStts(&field_0x864); + // mCyl1.SetTgHitCallback(tgHitCallBack); + // field_0x68c.CrrPos(dComIfG_Bgsp()); + // field_0x930 = field_0x68c.m_gnd; + // field_0xdf4 = field_0x68c.GetGroundH(); + // if (field_0xdf4 != -1e9f) { + // setEnvTevColor(); + // setRoomNo(); + // } + // field_0xa88 = 1; + // Execute(); + // field_0xa88 = 0; + // } + // return rv; + return 1; } /* ############################################################################################## */ /* 80A1A3F8-80A1A3FC 0000C8 0004+00 0/2 0/0 0/0 .rodata @4332 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4332 = 65536.0f; -// COMPILER_STRIP_GATE(0x80A1A3F8, &lit_4332); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_4332 = 65536.0f; +COMPILER_STRIP_GATE(0x80A1A3F8, &lit_4332); +#pragma pop /* 80A1A3FC-80A1A400 0000CC 0004+00 0/3 0/0 0/0 .rodata @4333 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4333 = 1.0f / 5.0f; -// COMPILER_STRIP_GATE(0x80A1A3FC, &lit_4333); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_4333 = 1.0f / 5.0f; +COMPILER_STRIP_GATE(0x80A1A3FC, &lit_4333); +#pragma pop /* 80A1A400-80A1A404 0000D0 0004+00 2/5 0/0 0/0 .rodata @4475 */ -// SECTION_RODATA static f32 const lit_4475 = 1.0f; -// COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); +SECTION_RODATA static f32 const lit_4475 = 1.0f; +COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); /* 80A14B20-80A14D90 000500 0270+00 1/1 0/0 0/0 .text CreateHeap__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::CreateHeap() { - J3DModelData* modelData = static_cast(dComIfG_getObjectRes( - l_resNameList[l_bmdData[0][1]], l_bmdData[0][0])); - if (modelData == NULL) { - return 0; - } - mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &field_0x580, - 0x80000, 0x11020284); - if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { - return 0; - } - J3DModel* model = mpMorf[0]->getModel(); - for (u16 i = 0; i < modelData->getJointNum(); i++) { - modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack); - } - model->setUserArea((u32)this); - field_0x96c = new daNpcT_MatAnm_c(); - if (field_0x96c == NULL) { - return 0; - } - if (setFaceMotionAnm(1, false) && setMotionAnm(0, 0.0f, 0)) - { - return 1; - } + // J3DModelData* modelData = static_cast(dComIfG_getObjectRes( + // l_resNameList[l_bmdData[0][1]], l_bmdData[0][0])); + // if (modelData == NULL) { + // return 0; + // } + // mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &field_0x580, + // 0x80000, 0x11020284); + // if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { + // return 0; + // } + // J3DModel* model = mpMorf[0]->getModel(); + // for (u16 i = 0; i < modelData->getJointNum(); i++) { + // modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack); + // } + // model->setUserArea((u32)this); + // field_0x96c = new daNpcT_MatAnm_c(); + // if (field_0x96c == NULL) { + // return 0; + // } + // if (setFaceMotionAnm(1, false) && setMotionAnm(0, 0.0f, 0)) + // { + // return 1; + // } return 0; } @@ -1055,8 +1041,8 @@ int daNpc_Jagar_c::Execute() { /* ############################################################################################## */ /* 80A1A404-80A1A408 0000D4 0004+00 1/2 0/0 0/0 .rodata @4524 */ -// SECTION_RODATA static f32 const lit_4524 = 100.0f; -// COMPILER_STRIP_GATE(0x80A1A404, &lit_4524); +SECTION_RODATA static f32 const lit_4524 = 100.0f; +COMPILER_STRIP_GATE(0x80A1A404, &lit_4524); /* 80A14FA0-80A15034 000980 0094+00 1/1 0/0 0/0 .text Draw__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::Draw() { @@ -1105,135 +1091,7 @@ int daNpc_Jagar_c::isDelete() { /* 80A15198-80A15364 000B78 01CC+00 1/1 0/0 0/0 .text reset__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::reset() { - /* WIP */ -// csXyz acStack_20; -// initialize(); -// for (int i = 0; i < 5; i++) { -// mActorMngr[i].initialize(); -// } -// // int iVar1; -// // csXyz in_stack_ffffffda; -// // csXyz acStack_20 [2]; - -// // csXyz::csXyz(acStack_20); -// if (*(int *)(this + 0x9bc) != 0) { -// ::daNpcT_MatAnm_c::initialize(*(daNpcT_MatAnm_c **)(this + 0x9bc)); -// } -// ::daNpcT_c::initialize((daNpcT_c *)this); -// for (iVar1 = 0; iVar1 < 5; iVar1 = iVar1 + 1) { -// ::daNpcT_ActorMngr_c::initialize((daNpcT_ActorMngr_c *)(this + iVar1 * 8 + 0xfd4)); -// } -// FUN_800047b4(this + 0x1024,0,0x34); -// csXyz::setall(acStack_20,0); -// acStack_20[0].y = *(s16 *)(this + 0x4ba); -// if ((this[0xfd0] == (daNpc_Jagar_c)0x0) && (iVar1 = d_a_npc::daNpcT_chkEvtBit(0x1c), iVar1 != 0)) -// { -// iVar1 = d_a_npc::daNpcT_chkEvtBit(0x86); -// if (iVar1 == 0) { -// d_a_npc::daNpcT_onEvtBit(0x86); -// } -// this[0x1051] = (daNpc_Jagar_c)0x1; -// } -// d_a_npc::daNpcT_offTmpBit(0x1b); -// d_a_npc::daNpcT_offTmpBit(0x10); -// csXyz::csXyz((csXyz *)&stack0xffffffd8,acStack_20); -// ::daNpcT_c::setAngle((daNpcT_c *)this,in_stack_ffffffda); -// csXyz::~csXyz((csXyz *)&stack0xffffffd8); -// return; -} - -// Jagar.reset() -/* -void __thiscall daNpc_Jagar_c::reset(daNpc_Jagar_c *this) - -{ - int iVar1; - csXyz in_stack_ffffffda; - csXyz acStack_20 [2]; - - csXyz::csXyz(acStack_20); - if (*(int *)(this + 0x9bc) != 0) { - ::daNpcT_MatAnm_c::initialize(*(daNpcT_MatAnm_c **)(this + 0x9bc)); - } - ::daNpcT_c::initialize((daNpcT_c *)this); - for (iVar1 = 0; iVar1 < 5; iVar1 = iVar1 + 1) { - ::daNpcT_ActorMngr_c::initialize((daNpcT_ActorMngr_c *)(this + iVar1 * 8 + 0xfd4)); - } - FUN_800047b4(this + 0x1024,0,0x34); - csXyz::setall(acStack_20,0); - acStack_20[0].y = *(s16 *)(this + 0x4ba); - if ((this[0xfd0] == (daNpc_Jagar_c)0x0) && (iVar1 = d_a_npc::daNpcT_chkEvtBit(0x1c), iVar1 != 0)) - { - iVar1 = d_a_npc::daNpcT_chkEvtBit(0x86); - if (iVar1 == 0) { - d_a_npc::daNpcT_onEvtBit(0x86); - } - this[0x1051] = (daNpc_Jagar_c)0x1; - } - d_a_npc::daNpcT_offTmpBit(0x1b); - d_a_npc::daNpcT_offTmpBit(0x10); - csXyz::csXyz((csXyz *)&stack0xffffffd8,acStack_20); - ::daNpcT_c::setAngle((daNpcT_c *)this,in_stack_ffffffda); - csXyz::~csXyz((csXyz *)&stack0xffffffd8); - return; -} - -// Hanjo.reset() -/* -/* WARNING: Inlined function: _savegpr_27 */ -/* WARNING: Inlined function: _restgpr_27 */ -/* WARNING: Removing unreachable block (ram,0x80e4d7fc) */ -/* __thiscall daNpc_Hanjo_c::reset(void) - -void __thiscall daNpc_Hanjo_c::reset(daNpc_Hanjo_c *this) - -{ - char cVar1; - uchar uVar2; - int iVar3; - csXyz in_stack_ffffffda; - csXyz acStack_20 [2]; - - csXyz::csXyz(acStack_20); - if (*(int *)(this + 0x9bc) != 0) { - ::daNpcT_MatAnm_c::initialize(*(daNpcT_MatAnm_c **)(this + 0x9bc)); - } - ::daNpcT_c::initialize((daNpcT_c *)this); - for (iVar3 = 0; iVar3 < 4; iVar3 = iVar3 + 1) { - ::daNpcT_ActorMngr_c::initialize((daNpcT_ActorMngr_c *)(this + iVar3 * 8 + 0x1118)); - } - FUN_800047b4(this + 0x1730,0,0x48); - cVar1 = getPathID(this); - if (cVar1 != -1) { - ::daNpcT_Path_c::initialize((daNpcT_Path_c *)(this + 0x1138)); - cVar1 = f_op_actor_mng::fopAcM_GetRoomNo((fopAc_ac_c *)this); - uVar2 = getPathID(this); - ::daNpcT_Path_c::setPathInfo((daNpcT_Path_c *)(this + 0x1138),uVar2,cVar1,'\0'); - } - csXyz::setall(acStack_20,0); - acStack_20[0].y = *(s16 *)(this + 0x4ba); - if (this[0x1114] == (daNpc_Hanjo_c)0x1) { - iVar3 = d_a_npc::daNpcT_chkEvtBit(0xcf); - if (iVar3 != 0) { - *(short *)(this + 0x4ba) = *(short *)(this + 0x4ba) + -0x8000; - acStack_20[0].y = *(s16 *)(this + 0x4ba); - } - } - else if ((this[0x1114] == (daNpc_Hanjo_c)0x0) && - (iVar3 = d_a_npc::daNpcT_chkEvtBit(0xad), iVar3 != 0)) { - *(undefined4 *)(this + 0x1768) = 0x3f800000; - } - d_a_npc::daNpcT_offTmpBit(0xac); - iVar3 = d_a_npc::daNpcT_chkEvtBit(0xb1); - if (iVar3 != 0) { - d_a_npc::daNpcT_onTmpBit(0xac); - } - csXyz::csXyz((csXyz *)&stack0xffffffd8,acStack_20); - ::daNpcT_c::setAngle((daNpcT_c *)this,in_stack_ffffffda); - csXyz::~csXyz((csXyz *)&stack0xffffffd8); - return; -}*/ - +} /* 80A15364-80A153E8 000D44 0084+00 1/0 0/0 0/0 .text afterJntAnm__13daNpc_Jagar_cFi */ void daNpc_Jagar_c::afterJntAnm(int param_1) { @@ -1261,9 +1119,6 @@ bool daNpc_Jagar_c::checkChangeEvt() { } /* ############################################################################################## */ -/* 80A1A408-80A1A40C 0000D8 0004+00 2/8 0/0 0/0 .rodata @4718 */ -// SECTION_RODATA static f32 const lit_4718 = -1.0f; -// COMPILER_STRIP_GATE(0x80A1A408, &lit_4718); /* 80A15714-80A157B4 0010F4 00A0+00 1/0 0/0 0/0 .text setAfterTalkMotion__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setAfterTalkMotion() { @@ -1318,33 +1173,6 @@ bool daNpc_Jagar_c::evtCutProc() { /* 80A15A08-80A15CA4 0013E8 029C+00 1/0 0/0 0/0 .text action__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::action() { - // fopAc_ac_c* hitActor = hitChk(&mCyl1, 0xffffffff); - // /* WIP */ - // if (hitActor != NULL) { - // cCcD_Obj* hitObj = mCyl1.GetTgHitObj(); - // if (mType == 1) { - // daNpc_Bou_c* this_00 = field_0x0f94.getActorP(); - // /* WIP */ - // // if (this_00 && this_00->getType() == 1 && field_0xd08.mStagger == 0) { - // if (field_0xb50.getNo() != 1) { - // // field_0xb50.intialize(); - // // field_0xb50.getNo() = 1; - // // field_0xb50.field_0x18 = -1; - // field_0xb50.setNo(1, -1, 1, 0); - // } - // if (field_0xb74.getNo() != 3) { - // // field_0xb74.initialize(); - // // field_0xb74.getNo() = 3; - // // field_0xb74.field_0x18 = -1; - // field_0xb74.setNo(3, -1, 1, 0); - // } - // // *(undefined2 *)(this + 0xcd4) = 0; - // // *(undefined2 *)(this + 0xcd6) = 0; - // // this[0xcff] = (daNpc_Jagar_c)0x1; - // // } - - // } - // } fopAc_ac_c* hitActor = hitChk(&mCyl1, 0xffffffff); if (hitActor != NULL) { cCcD_Obj* hitObj = mCyl1.GetTgHitObj(); @@ -1381,9 +1209,6 @@ void daNpc_Jagar_c::action() { field_0xe30 = 5; } } - // if ((mType != TYPE_0) && field_0x1721 != 0) { - // fopAcM_delete(this); - // } } /* 80A15CA4-80A15D68 001684 00C4+00 1/0 0/0 0/0 .text beforeMove__13daNpc_Jagar_cFv */ @@ -1405,35 +1230,35 @@ void daNpc_Jagar_c::beforeMove() { // COMPILER_STRIP_GATE(0x80A1A40C, &lit_4932); // #pragma pop -/* 80A1A410-80A1A414 0000E0 0004+00 0/2 0/0 0/0 .rodata @4933 */ +// // /* 80A1A410-80A1A414 0000E0 0004+00 0/2 0/0 0/0 .rodata @4933 */ // #pragma push // #pragma force_active on // SECTION_RODATA static f32 const lit_4933 = 10.0f; // COMPILER_STRIP_GATE(0x80A1A410, &lit_4933); // #pragma pop -/* 80A1A414-80A1A418 0000E4 0004+00 0/1 0/0 0/0 .rodata @4934 */ +// // /* 80A1A414-80A1A418 0000E4 0004+00 0/1 0/0 0/0 .rodata @4934 */ // #pragma push // #pragma force_active on // SECTION_RODATA static u32 const lit_4934 = 0x38C90FDB; // COMPILER_STRIP_GATE(0x80A1A414, &lit_4934); // #pragma pop -/* 80A1A418-80A1A41C 0000E8 0004+00 0/1 0/0 0/0 .rodata @4935 */ +// // /* 80A1A418-80A1A41C 0000E8 0004+00 0/1 0/0 0/0 .rodata @4935 */ // #pragma push // #pragma force_active on // SECTION_RODATA static f32 const lit_4935 = -60.0f; // COMPILER_STRIP_GATE(0x80A1A418, &lit_4935); // #pragma pop -/* 80A1A41C-80A1A420 0000EC 0004+00 0/1 0/0 0/0 .rodata @4936 */ +// // /* 80A1A41C-80A1A420 0000EC 0004+00 0/1 0/0 0/0 .rodata @4936 */ // #pragma push // #pragma force_active on // SECTION_RODATA static f32 const lit_4936 = 3.0f; // COMPILER_STRIP_GATE(0x80A1A41C, &lit_4936); // #pragma pop -/* 80A1A420-80A1A428 0000F0 0004+04 0/1 0/0 0/0 .rodata @4937 */ +// // /* 80A1A420-80A1A428 0000F0 0004+04 0/1 0/0 0/0 .rodata @4937 */ // #pragma push // #pragma force_active on // SECTION_RODATA static f32 const lit_4937[1 + 1 /* padding */] = { @@ -1444,13 +1269,13 @@ void daNpc_Jagar_c::beforeMove() { // COMPILER_STRIP_GATE(0x80A1A420, &lit_4937); // #pragma pop -/* 80A1A428-80A1A430 0000F8 0008+00 1/3 0/0 0/0 .rodata @4939 */ +// /* 80A1A428-80A1A430 0000F8 0008+00 1/3 0/0 0/0 .rodata @4939 */ // SECTION_RODATA static u8 const lit_4939[8] = { // 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, // }; // COMPILER_STRIP_GATE(0x80A1A428, &lit_4939); -/* 80A1ADE0-80A1ADE4 000008 0001+03 1/1 0/0 0/0 .bss @1109 */ +// /* 80A1ADE0-80A1ADE4 000008 0001+03 1/1 0/0 0/0 .bss @1109 */ static u8 lit_1109[1 + 3 /* padding */]; /* 80A1ADE4-80A1ADE8 00000C 0001+03 0/0 0/0 0/0 .bss @1107 */ @@ -1563,50 +1388,78 @@ static u8 prtclScl[12]; /* 80A15D68-80A1607C 001748 0314+00 1/0 0/0 0/0 .text setAttnPos__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setAttnPos() { - // NONMATCHING + cXyz cStack_3c(-10.0f, 10.0f, 0.0f); + field_0xd08.calc(0); + f32 dVar8 = cM_s2rad(field_0xd78.y - field_0xd7e.y); + J3DModel* model = mpMorf[0]->getModel(); + field_0xba8.setParam(this, model, &cStack_3c, getBackboneJointNo(), getNeckJointNo(), + getHeadJointNo(), daNpc_Jagar_Param_c::m.field_0x24, daNpc_Jagar_Param_c::m.field_0x20, + daNpc_Jagar_Param_c::m.field_0x2c, daNpc_Jagar_Param_c::m.field_0x28, + daNpc_Jagar_Param_c::m.field_0x34, daNpc_Jagar_Param_c::m.field_0x30, + daNpc_Jagar_Param_c::m.field_0x3c, daNpc_Jagar_Param_c::m.field_0x38, + daNpc_Jagar_Param_c::m.field_0x40, dVar8, NULL); + field_0xba8.calcJntRad(0.2f, 1.0f, dVar8); + setMtx(); + mDoMtx_stack_c::copy(mpMorf[0]->getModel()->getAnmMtx(getHeadJointNo())); + mDoMtx_stack_c::multVec(&cStack_3c, &eyePos); + field_0xba8.setEyeAngleX(eyePos, 1.0f, 0); + field_0xba8.setEyeAngleY(eyePos, field_0xd78.y, 1, 1.0f, 0); + cStack_3c.set(0.0f, 0.0f, 10.0f); + cStack_3c.y = daNpc_Jagar_Param_c::m.field_0x00; + if (field_0x1004 != 0) { + cStack_3c.set(0.0f, 100.0f, -60.0f); + } + mDoMtx_stack_c::YrotS(field_0xd78.y); + mDoMtx_stack_c::multVec(&cStack_3c, &cStack_3c); + attention_info.position = current.pos + cStack_3c; + static cXyz prtclScl(1.0f, 1.0f, 1.0f); + setFootPos(); + if (3.0f < speedF) { + setFootPrtcl(&prtclScl, 17.0f, 2.0f); + } } /* ############################################################################################## */ /* 80A1A430-80A1A438 000100 0008+00 0/2 0/0 0/0 .rodata @4997 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_4997[8] = { -// 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A430, &lit_4997); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static u8 const lit_4997[8] = { + 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +COMPILER_STRIP_GATE(0x80A1A430, &lit_4997); +#pragma pop /* 80A1A438-80A1A440 000108 0008+00 0/2 0/0 0/0 .rodata @4998 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_4998[8] = { -// 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A438, &lit_4998); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static u8 const lit_4998[8] = { + 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +COMPILER_STRIP_GATE(0x80A1A438, &lit_4998); +#pragma pop /* 80A1A440-80A1A448 000110 0008+00 0/2 0/0 0/0 .rodata @4999 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_4999[8] = { -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A440, &lit_4999); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static u8 const lit_4999[8] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +COMPILER_STRIP_GATE(0x80A1A440, &lit_4999); +#pragma pop /* 80A1A448-80A1A44C 000118 0004+00 0/1 0/0 0/0 .rodata @5039 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5039 = 70.0f; -// COMPILER_STRIP_GATE(0x80A1A448, &lit_5039); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_5039 = 70.0f; +COMPILER_STRIP_GATE(0x80A1A448, &lit_5039); +#pragma pop /* 80A1A44C-80A1A450 00011C 0004+00 0/1 0/0 0/0 .rodata @5040 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5040 = 90.0f; -// COMPILER_STRIP_GATE(0x80A1A44C, &lit_5040); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_5040 = 90.0f; +COMPILER_STRIP_GATE(0x80A1A44C, &lit_5040); +#pragma pop /* 80A1607C-80A161EC 001A5C 0170+00 1/0 0/0 0/0 .text setCollision__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setCollision() { @@ -1690,21 +1543,21 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { /* ############################################################################################## */ /* 80A1A450-80A1A45C 000120 000C+00 0/1 0/0 0/0 .rodata @5148 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_5148[12] = { -// 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -// }; -// COMPILER_STRIP_GATE(0x80A1A450, &lit_5148); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static u8 const lit_5148[12] = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +}; +COMPILER_STRIP_GATE(0x80A1A450, &lit_5148); +#pragma pop /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -// #pragma push -// #pragma force_active on -// SECTION_DEAD static char const* const stringBase_80A1A52E = "msgNo"; -// SECTION_DEAD static char const* const stringBase_80A1A534 = "msgNo2"; -// SECTION_DEAD static char const* const stringBase_80A1A53B = "send"; -// #pragma pop +#pragma push +#pragma force_active on +SECTION_DEAD static char const* const stringBase_80A1A52E = "msgNo"; +SECTION_DEAD static char const* const stringBase_80A1A534 = "msgNo2"; +SECTION_DEAD static char const* const stringBase_80A1A53B = "send"; +#pragma pop /* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ @@ -1752,10 +1605,10 @@ int daNpc_Jagar_c::cutAnger(int param_0) { /* ############################################################################################## */ /* 80A1A45C-80A1A464 00012C 0008+00 1/1 0/0 0/0 .rodata @5412 */ -// SECTION_RODATA static u8 const lit_5412[8] = { -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A45C, &lit_5412); +SECTION_RODATA static u8 const lit_5412[8] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +COMPILER_STRIP_GATE(0x80A1A45C, &lit_5412); /* 80A16EFC-80A1705C 0028DC 0160+00 1/0 0/0 0/0 .text cutConversationWithBou__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { @@ -1764,22 +1617,22 @@ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { /* ############################################################################################## */ /* 80A1A464-80A1A46C 000134 0008+00 0/1 0/0 0/0 .rodata @5445 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_5445[8] = { -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A464, &lit_5445); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static u8 const lit_5445[8] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +COMPILER_STRIP_GATE(0x80A1A464, &lit_5445); +#pragma pop /* 80A1A46C-80A1A478 00013C 000C+00 0/1 0/0 0/0 .rodata @5455 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_5455[12] = { -// 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -// }; -// COMPILER_STRIP_GATE(0x80A1A46C, &lit_5455); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static u8 const lit_5455[12] = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +}; +COMPILER_STRIP_GATE(0x80A1A46C, &lit_5455); +#pragma pop /* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text * cutConfidentialConversation__13daNpc_Jagar_cFi */ @@ -1802,10 +1655,10 @@ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { /* ############################################################################################## */ /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -// #pragma push -// #pragma force_active on -// SECTION_DEAD static char const* const stringBase_80A1A540 = "timer"; -// #pragma pop +#pragma push +#pragma force_active on +SECTION_DEAD static char const* const stringBase_80A1A540 = "timer"; +#pragma pop /* 80A173D8-80A17898 002DB8 04C0+00 3/0 0/0 0/0 .text cutFindWolf__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutFindWolf(int param_0) { @@ -1871,25 +1724,25 @@ int daNpc_Jagar_c::chkToMotion() { /* ############################################################################################## */ /* 80A1A478-80A1A47C 000148 0004+00 0/2 0/0 0/0 .rodata @5527 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5527 = -40.0f; -// COMPILER_STRIP_GATE(0x80A1A478, &lit_5527); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_5527 = -40.0f; +COMPILER_STRIP_GATE(0x80A1A478, &lit_5527); +#pragma pop /* 80A1A47C-80A1A480 00014C 0004+00 0/2 0/0 0/0 .rodata @5659 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5659 = 0.5f; -// COMPILER_STRIP_GATE(0x80A1A47C, &lit_5659); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_5659 = 0.5f; +COMPILER_STRIP_GATE(0x80A1A47C, &lit_5659); +#pragma pop /* 80A1A480-80A1A484 000150 0004+00 0/1 0/0 0/0 .rodata @6101 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6101 = 180.0f; -// COMPILER_STRIP_GATE(0x80A1A480, &lit_6101); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_6101 = 180.0f; +COMPILER_STRIP_GATE(0x80A1A480, &lit_6101); +#pragma pop /* 80A17A2C-80A1856C 00340C 0B40+00 1/0 0/0 0/0 .text wait__13daNpc_Jagar_cFPv */ void daNpc_Jagar_c::wait(void* param_0) { @@ -1898,46 +1751,46 @@ void daNpc_Jagar_c::wait(void* param_0) { /* ############################################################################################## */ /* 80A1A484-80A1A488 000154 0004+00 0/1 0/0 0/0 .rodata @6301 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6301 = -300.0f; -// COMPILER_STRIP_GATE(0x80A1A484, &lit_6301); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_6301 = -300.0f; +COMPILER_STRIP_GATE(0x80A1A484, &lit_6301); +#pragma pop /* 80A1A488-80A1A48C 000158 0004+00 0/1 0/0 0/0 .rodata @6302 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6302 = -50.0f; -// COMPILER_STRIP_GATE(0x80A1A488, &lit_6302); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_6302 = -50.0f; +COMPILER_STRIP_GATE(0x80A1A488, &lit_6302); +#pragma pop /* 80A1A48C-80A1A490 00015C 0004+00 0/1 0/0 0/0 .rodata @6303 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6303 = 400.0f; -// COMPILER_STRIP_GATE(0x80A1A48C, &lit_6303); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_6303 = 400.0f; +COMPILER_STRIP_GATE(0x80A1A48C, &lit_6303); +#pragma pop /* 80A1A490-80A1A494 000160 0004+00 0/1 0/0 0/0 .rodata @6304 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6304 = 45.0f; -// COMPILER_STRIP_GATE(0x80A1A490, &lit_6304); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_6304 = 45.0f; +COMPILER_STRIP_GATE(0x80A1A490, &lit_6304); +#pragma pop /* 80A1A494-80A1A498 000164 0004+00 0/1 0/0 0/0 .rodata @6305 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6305 = 135.0f; -// COMPILER_STRIP_GATE(0x80A1A494, &lit_6305); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_6305 = 135.0f; +COMPILER_STRIP_GATE(0x80A1A494, &lit_6305); +#pragma pop /* 80A1A498-80A1A49C 000168 0004+00 0/1 0/0 0/0 .rodata @6306 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6306 = 450.0f; -// COMPILER_STRIP_GATE(0x80A1A498, &lit_6306); -// #pragma pop +#pragma push +#pragma force_active on +SECTION_RODATA static f32 const lit_6306 = 450.0f; +COMPILER_STRIP_GATE(0x80A1A498, &lit_6306); +#pragma pop /* 80A1856C-80A18B74 003F4C 0608+00 1/0 0/0 0/0 .text talkwithBou__13daNpc_Jagar_cFPv */ void daNpc_Jagar_c::talkwithBou(void* param_0) { From 356a74ab7ee3d5d7186b47b81a7e1fcfb53c845c Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Thu, 20 Feb 2025 21:15:59 -0500 Subject: [PATCH 20/41] Jagar.cutConversationWithBou() - 48% --- include/d/actor/d_a_npc_jagar.h | 4 +- src/d/actor/d_a_npc_jagar.cpp | 107 +++++++++++++++++++------------- 2 files changed, 66 insertions(+), 45 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index bef7fabcdd3..1de608b2fbd 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -97,10 +97,12 @@ class daNpc_Jagar_c : public daNpcT_c { static cutFunc mCutList[7]; private: /* 0x00B0 */ int field_0xb0; + /* 0x04B4 */ short field_0x4b4; /* 0x04B6 */ s16 field_0x4b6; /* 0x0568 */ u8 field_0x568[0x100c - 0x568]; /* 0x0B58 */ int field_0xb58; // CutAnger int /* 0x0B7C */ int field_0xb7c; + /* 0x0BA0 */ daNpcT_ActorMngr_c field_0xba0; /* 0x0CE0 */ int field_0xce0; // CutAnger int /* 0x0CFF */ u8 field_0xcff; /* 0x0D7A */ short field_0xd7a; // CutAnger short @@ -117,7 +119,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x1004 */ u8 field_0x1004; }; -// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x172c); +// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); class daNpc_Jagar_Param_c { public: diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 29bc4d33f7d..bc812d4f1f0 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -341,7 +341,7 @@ SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = { /* 80A1A568-80A1A570 000020 0008+00 1/1 0/0 0/0 .data l_bmdData */ static int l_bmdData[1][2] = { // 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x01, - 13, 1, + {13, 1}, }; /* 80A1A570-80A1A5B8 -00001 0048+00 0/1 0/0 0/0 .data l_evtList */ @@ -368,7 +368,7 @@ static char* l_resNameList[5] = { /* 80A1A5CC-80A1A5D0 000084 0004+00 1/0 0/0 0/0 .data l_loadResPtrn0 */ // SECTION_DATA static u32 l_loadResPtrn0 = 0x010204FF; -static s8 l_loadResPtrn0[] = { +static s8 l_loadResPtrn0[4] = { 1, 2, 4, -1, }; @@ -656,38 +656,38 @@ extern actor_process_profile_definition g_profile_NPC_JAGAR = { }; // /* 80A1AC60-80A1AC6C 000718 000C+00 2/2 0/0 0/0 .data __vt__11J3DTexNoAnm */ -// SECTION_DATA extern void* __vt__11J3DTexNoAnm[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)calc__11J3DTexNoAnmCFPUs, -// }; +SECTION_DATA extern void* __vt__11J3DTexNoAnm[3] = { + (void*)NULL /* RTTI */, + (void*)NULL, + (void*)calc__11J3DTexNoAnmCFPUs, +}; -// /* 80A1AC6C-80A1AC78 000724 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ -// SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__12J3DFrameCtrlFv, -// }; +/* 80A1AC6C-80A1AC78 000724 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ +SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { + (void*)NULL /* RTTI */, + (void*)NULL, + (void*)__dt__12J3DFrameCtrlFv, +}; -// /* 80A1AC78-80A1AC9C 000730 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -// SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__12dBgS_ObjAcchFv, -// (void*)NULL, -// (void*)NULL, -// (void*)func_80A1A314, -// (void*)NULL, -// (void*)NULL, -// (void*)func_80A1A30C, -// }; +/* 80A1AC78-80A1AC9C 000730 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ +SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { + (void*)NULL /* RTTI */, + (void*)NULL, + (void*)__dt__12dBgS_ObjAcchFv, + (void*)NULL, + (void*)NULL, + (void*)func_80A1A314, + (void*)NULL, + (void*)NULL, + (void*)func_80A1A30C, +}; -// /* 80A1AC9C-80A1ACA8 000754 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ -// SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__12dBgS_AcchCirFv, -// }; +/* 80A1AC9C-80A1ACA8 000754 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ +SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { + (void*)NULL /* RTTI */, + (void*)NULL, + (void*)__dt__12dBgS_AcchCirFv, +}; // /* 80A1ACA8-80A1ACB4 000760 000C+00 3/3 0/0 0/0 .data __vt__10cCcD_GStts */ // SECTION_DATA extern void* __vt__10cCcD_GStts[3] = { @@ -731,19 +731,19 @@ extern actor_process_profile_definition g_profile_NPC_JAGAR = { // (void*)__dt__8cM3dGAabFv, // }; -// /* 80A1ACF0-80A1ACFC 0007A8 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ -// SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__8cM3dGCylFv, -// }; +/* 80A1ACF0-80A1ACFC 0007A8 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ +SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { + (void*)NULL /* RTTI */, + (void*)NULL, + (void*)__dt__8cM3dGCylFv, +}; -// /* 80A1ACFC-80A1AD08 0007B4 000C+00 3/3 0/0 0/0 .data __vt__13daNpcT_Path_c */ -// SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__13daNpcT_Path_cFv, -// }; +/* 80A1ACFC-80A1AD08 0007B4 000C+00 3/3 0/0 0/0 .data __vt__13daNpcT_Path_c */ +SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { + (void*)NULL /* RTTI */, + (void*)NULL, + (void*)__dt__13daNpcT_Path_cFv, +}; /* 80A1AD08-80A1ADCC 0007C0 00C4+00 2/2 0/0 0/0 .data __vt__13daNpc_Jagar_c */ // SECTION_DATA extern void* __vt__13daNpc_Jagar_c[49] = { @@ -1612,7 +1612,26 @@ COMPILER_STRIP_GATE(0x80A1A45C, &lit_5412); /* 80A16EFC-80A1705C 0028DC 0160+00 1/0 0/0 0/0 .text cutConversationWithBou__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { - return 0; // Placeholder value + fopAc_ac_c* iVar1 = field_0xba0.getActorP(); + int iVar5 = -1; + int iVar6 = 0; + int* piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + if (piVar2 != NULL) { + iVar5 = *piVar2; + } + fopAc_ac_c* Bo = field_0xf94.getActorP(); + fopAc_ac_c* Jaggle = (fopAc_ac_c *) this; + dComIfGp_setMesgCameraInfoActor(Bo, Jaggle, 0, 0, 0, 0, 0, 0, 0, 0); + if ((dComIfGp_getEventManager().getIsAddvance(param_0) != 0) && iVar5 == 0) { + if (field_0x4b4 != -1) { + int uVar4 = field_0x4b4; + } + initTalk(field_0x4b4, &Jaggle); + } + if (talkProc(NULL, 0, &Jaggle, 0) && mFlow.checkEndFlow()) { + return 1; + } + return 0; } /* ############################################################################################## */ From 8563354c23ba07a0b57c9322ad04f534e21ec552 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Fri, 21 Feb 2025 17:18:11 -0500 Subject: [PATCH 21/41] Jagar work and daNpcT_c::getActorDistance - 83% --- include/d/actor/d_a_npc.h | 2 +- include/d/actor/d_a_npc_jagar.h | 16 +- src/d/actor/d_a_npc.cpp | 30 +- src/d/actor/d_a_npc_jagar.cpp | 1085 +++++++++++++++---------------- 4 files changed, 562 insertions(+), 571 deletions(-) diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h index 2abe7e6e109..7c7ae84c002 100644 --- a/include/d/actor/d_a_npc.h +++ b/include/d/actor/d_a_npc.h @@ -492,7 +492,7 @@ class daNpcT_c : public fopAc_ac_c { /* 8014B4A4 */ void turn(s16, int, int); /* 8014B648 */ int step(s16, int, int, int, int); /* 8014B808 */ void calcSpeedAndAngle(cXyz, int, s16, s16); - /* 8014BB00 */ void getActorDistance(fopAc_ac_c*, int, int); + /* 8014BB00 */ int getActorDistance(fopAc_ac_c*, int, int); /* 8014BBF0 */ int initTalk(int, fopAc_ac_c**); /* 8014BC78 */ int talkProc(int*, int, fopAc_ac_c**, int); /* 8014BE2C */ fopAc_ac_c* getNearestActorP(s16); diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 1de608b2fbd..06473815882 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -109,14 +109,18 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0E30 */ int field_0xe30; /* 0x0E44 */ dCcD_Cyl mCyl1; /* 0x0F80 */ u8 mType; - /* 0x0F84 */ daNpcF_ActorMngr_c mActorMngr[5]; + /* 0x0F84 */ daNpcT_ActorMngr_c mActorMngr[5]; /* 0x0F94 */ daNpcT_ActorMngr_c field_0xf94; + /* 0x0FD4 */ actionFunc field_0xfd4; /* 0x0FE0 */ actionFunc field_0xfe0; /* 0x0FE4 */ actionFunc field_0xfe4; + /* 0x0FF0 */ int field_0xff0; + /* 0x0FF4 */ int field_0xff4; /* 0x1001 */ u8 field_0x1001; - /* 0x1002 */ u8 field_0x1002; // Not sure if u8 + /* 0x1002 */ u8 field_0x1002; // Not sure if u8 /* 0x1003 */ u8 field_0x1003; // CutAnger u8 /* 0x1004 */ u8 field_0x1004; + /* 0x1008 */ int field_0x1008; }; // STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); @@ -144,10 +148,10 @@ class daNpc_Jagar_Param_c { /* 0x3C */ f32 field_0x3c; // -45.0f /* 0x40 */ f32 field_0x40; // 0.6f /* 0x44 */ f32 field_0x44; // 12.0f - /* 0x48 */ s16 field_0x48; // 3 - /* 0x4A */ s16 field_0x4a; // 6 - /* 0x4C */ s16 field_0x4c; // 5 - /* 0x4E */ s16 field_0x4e; // 6 + /* 0x48 */ s16 field_0x48; + /* 0x4A */ s16 field_0x4a; + /* 0x4C */ s16 field_0x4c; + /* 0x4E */ s16 field_0x4e; /* 0x50 */ f32 field_0x50; // 110.0f /* 0x54 */ f32 field_0x54; // 500.0f /* 0x58 */ f32 field_0x58; // 300.0f diff --git a/src/d/actor/d_a_npc.cpp b/src/d/actor/d_a_npc.cpp index 7db452cbe7b..8ad7b1c3925 100644 --- a/src/d/actor/d_a_npc.cpp +++ b/src/d/actor/d_a_npc.cpp @@ -1859,6 +1859,7 @@ SECTION_DEAD static char const* const stringBase_80392710 = "DEFAULT_GETITEM"; /* 8014997C-80149BB4 1442BC 0238+00 1/0 1/0 58/0 .text evtProc__8daNpcT_cFv */ int daNpcT_c::evtProc() { // NONMATCHING + return 0; // Return Placeholder } /* 80149BB4-80149D7C 1444F4 01C8+00 1/0 1/0 60/0 .text setFootPos__8daNpcT_cFv */ @@ -1908,11 +1909,13 @@ void daNpcT_c::clrParam() { /* 8014A388-8014A628 144CC8 02A0+00 1/1 0/0 57/57 .text setFaceMotionAnm__8daNpcT_cFib */ bool daNpcT_c::setFaceMotionAnm(int param_0, bool param_1) { // NONMATCHING + return false; // Return Placeholder } /* 8014A628-8014A908 144F68 02E0+00 1/0 1/0 59/0 .text setMotionAnm__8daNpcT_cFifi */ bool daNpcT_c::setMotionAnm(int param_0, f32 param_1, int param_2) { // NONMATCHING + return false; // Return Placeholder } /* ############################################################################################## */ @@ -1980,6 +1983,7 @@ SECTION_SDATA2 static f32 lit_6775 = 180.0f; */ BOOL daNpcT_c::chkActorInSight(fopAc_ac_c* param_0, f32 param_1, s16 param_2) { // NONMATCHING + return false; // Return Placeholder } /* 8014ACF0-8014ADA0 145630 00B0+00 2/2 0/0 12/12 .text chkPointInArea__8daNpcT_cF4cXyz4cXyzfffs @@ -1987,12 +1991,14 @@ BOOL daNpcT_c::chkActorInSight(fopAc_ac_c* param_0, f32 param_1, s16 param_2) { BOOL daNpcT_c::chkPointInArea(cXyz param_0, cXyz param_1, f32 param_2, f32 param_3, f32 param_4, s16 param_5) { // NONMATCHING + return false; // Return Placeholder } /* 8014ADA0-8014AE1C 1456E0 007C+00 1/1 0/0 1/1 .text chkPointInArea__8daNpcT_cF4cXyz4cXyz4cXyzs */ BOOL daNpcT_c::chkPointInArea(cXyz param_0, cXyz param_1, cXyz param_2, s16 param_3) { // NONMATCHING + return false; // Return Placeholder } /* ############################################################################################## */ @@ -2021,7 +2027,7 @@ void daNpcT_c::chkFindActor(fopAc_ac_c* param_0, int param_1, s16 param_2) { /* 8014B010-8014B024 145950 0014+00 5/5 1/1 0/0 .text getDistTable__12dAttention_cFi */ dist_entry& dAttention_c::getDistTable(int param_0) { - // NONMATCHING + return *(dist_table + param_0); } /* 8014B024-8014B0C8 145964 00A4+00 1/1 0/0 0/0 .text chkWolfAction__8daNpcT_cFv */ @@ -2038,6 +2044,7 @@ void daNpcT_c::chkFindWolf(s16 param_0, int param_1, int param_2, f32 param_3, f /* 8014B338-8014B3EC 145C78 00B4+00 0/0 0/0 75/75 .text srchPlayerActor__8daNpcT_cFv */ BOOL daNpcT_c::srchPlayerActor() { // NONMATCHING + return false; // Return Placeholder } /* 8014B3EC-8014B4A4 145D2C 00B8+00 3/3 0/0 5/5 .text getAttnPos__8daNpcT_cFP10fopAc_ac_c @@ -2064,6 +2071,7 @@ void daNpcT_c::turn(s16 param_0, int param_1, int param_2) { /* 8014B648-8014B808 145F88 01C0+00 0/0 0/0 177/177 .text step__8daNpcT_cFsiiii */ int daNpcT_c::step(s16 param_0, int param_1, int param_2, int param_3, int param_4) { // NONMATCHING + return 0; // Return Placeholder } /* ############################################################################################## */ @@ -2076,13 +2084,23 @@ void daNpcT_c::calcSpeedAndAngle(cXyz param_0, int param_1, s16 param_2, s16 par } /* ############################################################################################## */ -/* 80453478-8045347C 001A78 0004+00 1/1 0/0 0/0 .sdata2 @7242 */ -SECTION_SDATA2 static f32 lit_7242 = 6.0f; - /* 8014BB00-8014BBF0 146440 00F0+00 0/0 0/0 2/2 .text getActorDistance__8daNpcT_cFP10fopAc_ac_cii */ -void daNpcT_c::getActorDistance(fopAc_ac_c* param_0, int param_1, int param_2) { - // NONMATCHING +int daNpcT_c::getActorDistance(fopAc_ac_c* param_0, int param_1, int param_2) { + int rv = 0; + double dVar7 = (double)*reinterpret_cast(&::dAttention_c::getDistTable(param_1)); + double dVar6 = (double)*reinterpret_cast(&::dAttention_c::getDistTable(param_2)); + double dVar5 = (double)fopAcM_searchActorDistanceXZ(this, param_0); + if (dVar5 < dVar7) { + for (int i = 0; i < 5;) { + if (((float)(dVar5 - dVar7)) / 6.0f < ((double)(dVar6 - dVar7)) * (float)(i + 1 ^ 2147483648)) { + return rv; + } + i++; + rv++; + } + } + return rv; } /* 8014BBF0-8014BC78 146530 0088+00 0/0 1/1 180/180 .text initTalk__8daNpcT_cFiPP10fopAc_ac_c */ diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index bc812d4f1f0..4ca309afc12 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -408,75 +408,36 @@ static daNpcT_faceMotionAnmData_c l_faceMotionAnmData[10] = { #pragma pop /* 80A1A704-80A1A8FC 0001BC 01F8+00 0/1 0/0 0/0 .data l_motionAnmData */ -SECTION_DATA static u8 l_motionAnmData[504] = { - 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, +SECTION_DATA static int l_motionAnmData[140] = { + 10, 2, 1, 16, 0, 1, 65536, 4, 2, 2, 16, 0, 1, 65536, 7, 2, 2, 16, 0, 1, 65536, + 10, 2, 2, 16, 0, 1, 65536, 8, 0, 2, 16, 0, 1, 65536, 9, 0, 2, 16, 0, 1, 65536, + 5, 0, 2, 16, 0, 1, 65536, 11, 0, 2, 16, 0, 1, 65536, 6, 0, 4, 16, 0, 1, 65536, + 9, 0, 1, 16, 0, 1, 65536, 8, 0, 1, 16, 0, 1, 65536, 8, 2, 3, 16, 0, 1, 65536, + 13, 2, 3, 16, 0, 1, 65536, 12, 0, 3, 16, 0, 1, 65536, 14, 2, 3, 16, 0, 1, 65536, + 9, 0, 3, 16, 0, 1, 65536, 11, 0, 3, 16, 0, 1, 65536, 10, 2, 3, 16, 0, 1, 65536, }; /* 80A1A8FC-80A1A98C 0003B4 0090+00 0/1 0/0 0/0 .data l_faceMotionSequenceData */ -SECTION_DATA static u8 l_faceMotionSequenceData[144] = { - 0x00, 0x01, 0xFF, 0x01, 0x00, 0x07, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x08, 0xFF, 0x01, 0x00, 0x09, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x02, 0xFF, 0x01, 0x00, 0x06, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x03, 0xFF, 0x01, 0x00, 0x05, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x04, 0xFF, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x05, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x07, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x06, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, +static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_faceMotionSequenceData[36] = { + {1, -1, 1}, {7, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {8, -1, 1}, {9, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {2, -1, 1}, {6, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {3, -1, 1}, {5, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {4, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {7, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {6, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; /* 80A1A98C-80A1AABC 000444 0130+00 0/1 0/0 0/0 .data l_motionSequenceData */ -SECTION_DATA static u8 l_motionSequenceData[304] = { - 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x08, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x01, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x02, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x09, 0xFF, 0x01, 0x00, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x0C, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x0D, 0xFF, 0x01, 0x00, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x0F, 0xFF, 0x01, 0x00, 0x11, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x10, 0xFF, 0x01, 0x00, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x11, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x04, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x05, 0xFF, 0x01, 0x00, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x06, 0xFF, 0x01, 0x00, 0x02, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x07, 0xFF, 0x01, 0x00, 0x02, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x0A, 0x04, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x0B, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x0E, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x03, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x0D, 0xFF, 0x01, 0x00, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, +static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[76] = { + {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {8, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {9, -1, 1}, {3, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {12, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {13, -1, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {15, -1, 1}, {17, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {16, -1, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {17, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {4, -1, 1}, {0, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, -1, 1}, {1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {6, -1, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {7, -1, 1}, {2, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {10, 4, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {11, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {14, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {13, -1, 1}, {12, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; /* 80A1AABC-80A1AAD8 -00001 001C+00 1/1 0/0 0/0 .data mCutNameList__13daNpc_Jagar_c */ @@ -596,37 +557,39 @@ daNpc_Jagar_c::cutFunc daNpc_Jagar_c::mCutList[7] = { // (void*)wait__13daNpc_Jagar_cFPv, // }; -/* 80A1ABB0-80A1ABE0 -00001 0030+00 1/1 0/0 0/0 .data @5661 */ -SECTION_DATA static void* lit_5661[12] = { - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x304), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x370), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x3B0), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x440), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x47C), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x490), -}; +// /* 80A1ABB0-80A1ABE0 -00001 0030+00 1/1 0/0 0/0 .data @5661 */ +// SECTION_DATA static void* lit_5661[12] = { +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x304), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x370), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x3B0), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x440), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x4A4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x47C), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x490), +// }; -/* 80A1ABE0-80A1AC10 -00001 0030+00 1/1 0/0 0/0 .data @5660 */ -SECTION_DATA static void* lit_5660[12] = { - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0xBC), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x194), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x22C), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), - (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E0), -}; +// /* 80A1ABE0-80A1AC10 -00001 0030+00 1/1 0/0 0/0 .data @5660 */ +// SECTION_DATA static void* lit_5660[12] = { +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0xBC), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x194), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x22C), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), +// (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E0), +// }; + +AUDIO_INSTANCES; /* 80A1AC10-80A1AC30 -00001 0020+00 1/0 0/0 0/0 .data daNpc_Jagar_MethodTable */ static actor_method_class daNpc_Jagar_MethodTable = { @@ -873,51 +836,50 @@ COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); /* 80A14858-80A14B20 000238 02C8+00 1/1 0/0 0/0 .text create__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::create() { - // fopAcM_SetupActor2(this, daNpc_Jagar_c, (const daNpcT_faceMotionAnmData_c *)l_faceMotionAnmData, - // (const daNpcT_motionAnmData_c *)l_motionAnmData, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *) l_faceMotionSequenceData, 4, - // (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList - // ); - // mType = getType(); - // field_0xa7c = getFlowNodeNo(); - // field_0xa89 = 0; - // int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); - // if (rv == cPhs_COMPLEATE_e) { + fopAcM_SetupActor2(this, daNpc_Jagar_c, (const daNpcT_faceMotionAnmData_c *)l_faceMotionAnmData, + (const daNpcT_motionAnmData_c *)l_motionAnmData, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *) l_faceMotionSequenceData, 4, + (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList + ); + mType = getType(); + field_0xa7c = getFlowNodeNo(); + field_0xa89 = 0; + int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + if (rv == cPhs_COMPLEATE_e) { // OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, // field_0xa7c, getPathID(), fopAcM_GetParam(this)); - // if (isDelete()) { - // return cPhs_ERROR_e; - // } + if (isDelete()) { + return cPhs_ERROR_e; + } // OS_REPORT("\n"); - // if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) { - // OS_REPORT("===>isDelete:TRUE\n"); - // return cPhs_ERROR_e; - // } - // J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); - // fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); - // fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); - // field_0x580.init(¤t.pos, &eyePos, 3, 1); - // field_0x9c0.init(&field_0x68c, 60.0f, 0.0f); - // reset(); - // field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, - // &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), - // fopAcM_GetShapeAngle_p(this)); - // field_0x864.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); - // mCyl1.Set(mCcDCyl); // <-- Check value?? - // mCyl1.SetStts(&field_0x864); - // mCyl1.SetTgHitCallback(tgHitCallBack); - // field_0x68c.CrrPos(dComIfG_Bgsp()); - // field_0x930 = field_0x68c.m_gnd; - // field_0xdf4 = field_0x68c.GetGroundH(); - // if (field_0xdf4 != -1e9f) { - // setEnvTevColor(); - // setRoomNo(); - // } - // field_0xa88 = 1; - // Execute(); - // field_0xa88 = 0; - // } - // return rv; - return 1; + if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) { + OS_REPORT("===>isDelete:TRUE\n"); + return cPhs_ERROR_e; + } + J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); + fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); + fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); + field_0x580.init(¤t.pos, &eyePos, 3, 1); + field_0x9c0.init(&field_0x68c, 60.0f, 0.0f); + reset(); + field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, + &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), + fopAcM_GetShapeAngle_p(this)); + field_0x864.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); + mCyl1.Set(mCcDCyl); // <-- Check value?? + mCyl1.SetStts(&field_0x864); + mCyl1.SetTgHitCallback(tgHitCallBack); + field_0x68c.CrrPos(dComIfG_Bgsp()); + field_0x930 = field_0x68c.m_gnd; + field_0xdf4 = field_0x68c.GetGroundH(); + if (field_0xdf4 != -1e9f) { + setEnvTevColor(); + setRoomNo(); + } + field_0xa88 = 1; + Execute(); + field_0xa88 = 0; + } + return rv; } /* ############################################################################################## */ @@ -941,113 +903,55 @@ COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); /* 80A14B20-80A14D90 000500 0270+00 1/1 0/0 0/0 .text CreateHeap__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::CreateHeap() { - // J3DModelData* modelData = static_cast(dComIfG_getObjectRes( - // l_resNameList[l_bmdData[0][1]], l_bmdData[0][0])); - // if (modelData == NULL) { - // return 0; - // } - // mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &field_0x580, - // 0x80000, 0x11020284); - // if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { - // return 0; - // } - // J3DModel* model = mpMorf[0]->getModel(); - // for (u16 i = 0; i < modelData->getJointNum(); i++) { - // modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack); - // } - // model->setUserArea((u32)this); - // field_0x96c = new daNpcT_MatAnm_c(); - // if (field_0x96c == NULL) { - // return 0; - // } - // if (setFaceMotionAnm(1, false) && setMotionAnm(0, 0.0f, 0)) - // { - // return 1; - // } - return 0; -} - -/* 80A14D90-80A14DCC 000770 003C+00 1/1 0/0 0/0 .text __dt__15J3DTevKColorAnmFv */ -// J3DTevKColorAnm::~J3DTevKColorAnm() { -extern "C" void __dt__15J3DTevKColorAnmFv() { - // NONMATCHING -} - -/* 80A14DCC-80A14DE4 0007AC 0018+00 1/1 0/0 0/0 .text __ct__15J3DTevKColorAnmFv */ -// J3DTevKColorAnm::J3DTevKColorAnm() { -extern "C" void __ct__15J3DTevKColorAnmFv() { - // NONMATCHING -} - -/* 80A14DE4-80A14E20 0007C4 003C+00 1/1 0/0 0/0 .text __dt__14J3DTevColorAnmFv */ -// J3DTevColorAnm::~J3DTevColorAnm() { -extern "C" void __dt__14J3DTevColorAnmFv() { - // NONMATCHING -} - -/* 80A14E20-80A14E38 000800 0018+00 1/1 0/0 0/0 .text __ct__14J3DTevColorAnmFv */ -// J3DTevColorAnm::J3DTevColorAnm() { -extern "C" void __ct__14J3DTevColorAnmFv() { - // NONMATCHING -} - -/* 80A14E38-80A14E80 000818 0048+00 1/1 0/0 0/0 .text __dt__11J3DTexNoAnmFv */ -// J3DTexNoAnm::~J3DTexNoAnm() { -extern "C" void __dt__11J3DTexNoAnmFv() { - // NONMATCHING -} - -/* 80A14E80-80A14EA4 000860 0024+00 1/1 0/0 0/0 .text __ct__11J3DTexNoAnmFv */ -// J3DTexNoAnm::J3DTexNoAnm() { -extern "C" void __ct__11J3DTexNoAnmFv() { - // NONMATCHING -} - -/* 80A14EA4-80A14EE0 000884 003C+00 1/1 0/0 0/0 .text __dt__12J3DTexMtxAnmFv */ -// J3DTexMtxAnm::~J3DTexMtxAnm() { -extern "C" void __dt__12J3DTexMtxAnmFv() { - // NONMATCHING -} - -/* 80A14EE0-80A14EF8 0008C0 0018+00 1/1 0/0 0/0 .text __ct__12J3DTexMtxAnmFv */ -// J3DTexMtxAnm::J3DTexMtxAnm() { -extern "C" void __ct__12J3DTexMtxAnmFv() { - // NONMATCHING -} - -/* 80A14EF8-80A14F34 0008D8 003C+00 1/1 0/0 0/0 .text __dt__14J3DMatColorAnmFv */ -// J3DMatColorAnm::~J3DMatColorAnm() { -extern "C" void __dt__14J3DMatColorAnmFv() { - // NONMATCHING -} - -/* 80A14F34-80A14F4C 000914 0018+00 1/1 0/0 0/0 .text __ct__14J3DMatColorAnmFv */ -// J3DMatColorAnm::J3DMatColorAnm() { -extern "C" void __ct__14J3DMatColorAnmFv() { - // NONMATCHING + J3DModelData* modelData = static_cast(dComIfG_getObjectRes( + l_resNameList[l_bmdData[0][1]], l_bmdData[0][0])); + if (modelData == NULL) { + return 0; + } + mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &field_0x580, + 0x80000, 0x11020284); + if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { + return 0; + } + J3DModel* model = mpMorf[0]->getModel(); + for (u16 i = 0; i < modelData->getJointNum(); i++) { + modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack); + } + model->setUserArea((u32)this); + field_0x96c = new daNpcT_MatAnm_c(); + if (field_0x96c == NULL) { + return 0; + } + if (setFaceMotionAnm(1, false) && setMotionAnm(0, 0.0f, 0)) + { + return 1; + } } /* 80A14F4C-80A14F80 00092C 0034+00 1/1 0/0 0/0 .text Delete__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::Delete() { - // NONMATCHING - return 0; // Placeholder value + fopAcM_GetID(this); + this->~daNpc_Jagar_c(); + return 1; } /* 80A14F80-80A14FA0 000960 0020+00 2/2 0/0 0/0 .text Execute__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::Execute() { - // NONMATCHING - return 0; // Placeholder value + return daNpcT_c::execute(); } -/* ############################################################################################## */ -/* 80A1A404-80A1A408 0000D4 0004+00 1/2 0/0 0/0 .rodata @4524 */ -SECTION_RODATA static f32 const lit_4524 = 100.0f; -COMPILER_STRIP_GATE(0x80A1A404, &lit_4524); +// /* ############################################################################################## */ +// /* 80A1A404-80A1A408 0000D4 0004+00 1/2 0/0 0/0 .rodata @4524 */ +// SECTION_RODATA static f32 const lit_4524 = 100.0f; +// COMPILER_STRIP_GATE(0x80A1A404, &lit_4524); /* 80A14FA0-80A15034 000980 0094+00 1/1 0/0 0/0 .text Draw__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::Draw() { - // NONMATCHING - return 0; // Placeholder value + if (field_0x96c != NULL) { + J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); + modelData->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(field_0x96c); + } + return daNpcT_c::draw(0, 0, field_0xde8, NULL, 100.0f, 0, 0, 0); } /* 80A15034-80A15054 000A14 0020+00 1/1 0/0 0/0 .text @@ -1085,12 +989,52 @@ u8 daNpc_Jagar_c::getType() { /* 80A150F8-80A15198 000AD8 00A0+00 1/1 0/0 0/0 .text isDelete__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::isDelete() { - // NONMATCHING - return 0; // Placeholder value + switch (mType) { + case TYPE_0: + return FALSE; + case TYPE_1: { + bool rv = true; + if (!daNpcT_chkEvtBit(0xd0) && !dComIfGs_isCollectShield(0)) { + rv = false; + } + return rv; + } + case TYPE_2: + return FALSE; + default: + return FALSE; + } } /* 80A15198-80A15364 000B78 01CC+00 1/1 0/0 0/0 .text reset__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::reset() { + csXyz acStack_20; + int iVar1 = (u8*)&field_0x1008 - (u8*)&field_0xfd4; + if (field_0x96c != NULL) { + field_0x96c->initialize(); + } + initialize(); + for (int i = 0; i < 4; i++) { + mActorMngr[i].initialize(); + } + memset(&field_0xfd4, 0, iVar1); + acStack_20.setall(0); + acStack_20.y = home.angle.y; + switch (mType) { + case TYPE_0: + if (daNpcT_chkEvtBit(0x1c) != 0) { + if (daNpcT_chkEvtBit(0x86) == 0) { + daNpcT_onEvtBit(0x86); + } + field_0x1001 = 1; + } + case TYPE_1: + case TYPE_2: + default: + daNpcT_offTmpBit(0x1b); + daNpcT_offTmpBit(0x10); + setAngle(acStack_20); + } } /* 80A15364-80A153E8 000D44 0084+00 1/0 0/0 0/0 .text afterJntAnm__13daNpc_Jagar_cFi */ @@ -1106,7 +1050,32 @@ void daNpc_Jagar_c::afterJntAnm(int param_1) { /* 80A153E8-80A155E4 000DC8 01FC+00 1/0 0/0 0/0 .text setParam__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setParam() { - // NONMATCHING + selectAction(); + srchActors(); + s16 sVar9 = daNpc_Jagar_Param_c::m.field_0x48; + s16 sVar8 = daNpc_Jagar_Param_c::m.field_0x4a; + s16 sVar7 = daNpc_Jagar_Param_c::m.field_0x4c; + s16 sVar6 = daNpc_Jagar_Param_c::m.field_0x4e; + if (mType == TYPE_1) { + sVar9 = 19; + sVar7 = 19; + sVar8 = 6; + sVar6 = 6; + } else if (mType == TYPE_0) { + sVar9 = 4; + sVar7 = 5; + } else if ((int)mType < 3) { + sVar9 = 3; + sVar7 = 5; + } + attention_info.distances[0] = daNpcT_getDistTableIdx((int)sVar7, 6); + attention_info.distances[1] = attention_info.distances[0]; + attention_info.distances[3] = daNpcT_getDistTableIdx((int)sVar7, 6); + daPy_py_c* player = daPy_getPlayerActorClass(); + if (mType == TYPE_1) { + // daNpcT_getDistTableIdx(field_0xff0, field_0xff4); + int uVar4 = getActorDistance(player, daNpcT_getDistTableIdx(field_0xff0, field_0xff4), attention_info.distances[1]); + } } /* 80A155E4-80A15714 000FC4 0130+00 1/0 0/0 0/0 .text checkChangeEvt__13daNpc_Jagar_cFv @@ -1864,65 +1833,65 @@ static int daNpc_Jagar_IsDelete(void* i_this) { return 1; // Placeholder value } -/* 80A18FB0-80A18FE0 004990 0030+00 1/0 0/0 0/0 .text calc__11J3DTexNoAnmCFPUs */ -// void J3DTexNoAnm::calc(u16* param_0) const { -extern "C" void calc__11J3DTexNoAnmCFPUs() { - // NONMATCHING -} +// /* 80A18FB0-80A18FE0 004990 0030+00 1/0 0/0 0/0 .text calc__11J3DTexNoAnmCFPUs */ +// // void J3DTexNoAnm::calc(u16* param_0) const { +// extern "C" void calc__11J3DTexNoAnmCFPUs() { +// // NONMATCHING +// } -/* 80A18FE0-80A19028 0049C0 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// cCcD_GStts::~cCcD_GStts() { -extern "C" void __dt__10cCcD_GSttsFv() { - // NONMATCHING -} +// /* 80A18FE0-80A19028 0049C0 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ +// // cCcD_GStts::~cCcD_GStts() { +// extern "C" void __dt__10cCcD_GSttsFv() { +// // NONMATCHING +// } -/* 80A19028-80A193B0 004A08 0388+00 1/1 0/0 0/0 .text __dt__8daNpcT_cFv */ -// daNpcT_c::~daNpcT_c() { -extern "C" void __dt__8daNpcT_cFv() { - // NONMATCHING -} +// /* 80A19028-80A193B0 004A08 0388+00 1/1 0/0 0/0 .text __dt__8daNpcT_cFv */ +// // daNpcT_c::~daNpcT_c() { +// extern "C" void __dt__8daNpcT_cFv() { +// // NONMATCHING +// } -/* 80A193B0-80A193EC 004D90 003C+00 4/4 0/0 0/0 .text __dt__4cXyzFv */ -// cXyz::~cXyz() { -extern "C" void __dt__4cXyzFv() { - // NONMATCHING -} +// /* 80A193B0-80A193EC 004D90 003C+00 4/4 0/0 0/0 .text __dt__4cXyzFv */ +// // cXyz::~cXyz() { +// extern "C" void __dt__4cXyzFv() { +// // NONMATCHING +// } -/* 80A193EC-80A19428 004DCC 003C+00 2/2 0/0 0/0 .text __dt__5csXyzFv */ -// csXyz::~csXyz() { -extern "C" void __dt__5csXyzFv() { - // NONMATCHING -} +// /* 80A193EC-80A19428 004DCC 003C+00 2/2 0/0 0/0 .text __dt__5csXyzFv */ +// // csXyz::~csXyz() { +// extern "C" void __dt__5csXyzFv() { +// // NONMATCHING +// } -/* 80A19428-80A19470 004E08 0048+00 3/2 0/0 0/0 .text __dt__18daNpcT_ActorMngr_cFv */ -// daNpcT_ActorMngr_c::~daNpcT_ActorMngr_c() { -extern "C" void __dt__18daNpcT_ActorMngr_cFv() { - // NONMATCHING -} +// /* 80A19428-80A19470 004E08 0048+00 3/2 0/0 0/0 .text __dt__18daNpcT_ActorMngr_cFv */ +// // daNpcT_ActorMngr_c::~daNpcT_ActorMngr_c() { +// extern "C" void __dt__18daNpcT_ActorMngr_cFv() { +// // NONMATCHING +// } -/* 80A19470-80A194B8 004E50 0048+00 1/0 0/0 0/0 .text __dt__13daNpcT_Path_cFv */ -// daNpcT_Path_c::~daNpcT_Path_c() { -extern "C" void __dt__13daNpcT_Path_cFv() { - // NONMATCHING -} +// /* 80A19470-80A194B8 004E50 0048+00 1/0 0/0 0/0 .text __dt__13daNpcT_Path_cFv */ +// // daNpcT_Path_c::~daNpcT_Path_c() { +// extern "C" void __dt__13daNpcT_Path_cFv() { +// // NONMATCHING +// } -/* 80A194B8-80A194F4 004E98 003C+00 1/1 0/0 0/0 .text __ct__18daNpcT_ActorMngr_cFv */ -// daNpcT_ActorMngr_c::daNpcT_ActorMngr_c() { -extern "C" void __ct__18daNpcT_ActorMngr_cFv() { - // NONMATCHING -} +// /* 80A194B8-80A194F4 004E98 003C+00 1/1 0/0 0/0 .text __ct__18daNpcT_ActorMngr_cFv */ +// // daNpcT_ActorMngr_c::daNpcT_ActorMngr_c() { +// extern "C" void __ct__18daNpcT_ActorMngr_cFv() { +// // NONMATCHING +// } -/* 80A194F4-80A1953C 004ED4 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */ -// cM3dGCyl::~cM3dGCyl() { -extern "C" void __dt__8cM3dGCylFv() { - // NONMATCHING -} +// /* 80A194F4-80A1953C 004ED4 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */ +// // cM3dGCyl::~cM3dGCyl() { +// extern "C" void __dt__8cM3dGCylFv() { +// // NONMATCHING +// } -/* 80A1953C-80A19584 004F1C 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} +// /* 80A1953C-80A19584 004F1C 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ +// // cM3dGAab::~cM3dGAab() { +// extern "C" void __dt__8cM3dGAabFv() { +// // NONMATCHING +// } /* 80A19584-80A19988 004F64 0404+00 1/1 0/0 0/0 .text * __ct__8daNpcT_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc @@ -1932,180 +1901,180 @@ extern "C" void __dt__8cM3dGAabFv() { // daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_2, int param_3, // daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_4, int param_5, // daNpcT_evtData_c const* param_6, char** param_7) { -extern "C" void __ct__8daNpcT_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc() { - // NONMATCHING -} +// extern "C" void __ct__8daNpcT_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc() { +// // NONMATCHING +// } -/* 80A19988-80A1998C 005368 0004+00 1/1 0/0 0/0 .text __ct__5csXyzFv */ -// csXyz::csXyz() { -extern "C" void __ct__5csXyzFv() { - /* empty function */ -} +// /* 80A19988-80A1998C 005368 0004+00 1/1 0/0 0/0 .text __ct__5csXyzFv */ +// // csXyz::csXyz() { +// extern "C" void __ct__5csXyzFv() { +// /* empty function */ +// } -/* 80A1998C-80A19A88 00536C 00FC+00 1/0 0/0 0/0 .text __dt__15daNpcT_JntAnm_cFv */ -// daNpcT_JntAnm_c::~daNpcT_JntAnm_c() { -extern "C" void __dt__15daNpcT_JntAnm_cFv() { - // NONMATCHING -} +// /* 80A1998C-80A19A88 00536C 00FC+00 1/0 0/0 0/0 .text __dt__15daNpcT_JntAnm_cFv */ +// // daNpcT_JntAnm_c::~daNpcT_JntAnm_c() { +// extern "C" void __dt__15daNpcT_JntAnm_cFv() { +// // NONMATCHING +// } -/* 80A19A88-80A19A8C 005468 0004+00 1/1 0/0 0/0 .text __ct__4cXyzFv */ -// cXyz::cXyz() { -extern "C" void __ct__4cXyzFv() { - /* empty function */ -} +// /* 80A19A88-80A19A8C 005468 0004+00 1/1 0/0 0/0 .text __ct__4cXyzFv */ +// // cXyz::cXyz() { +// extern "C" void __ct__4cXyzFv() { +// /* empty function */ +// } /* 80A19A8C-80A19AD4 00546C 0048+00 1/0 0/0 0/0 .text __dt__22daNpcT_MotionSeqMngr_cFv */ // daNpcT_MotionSeqMngr_c::~daNpcT_MotionSeqMngr_c() { -extern "C" void __dt__22daNpcT_MotionSeqMngr_cFv() { - // NONMATCHING -} +// extern "C" void __dt__22daNpcT_MotionSeqMngr_cFv() { +// // NONMATCHING +// } /* 80A19AD4-80A19B44 0054B4 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ // dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} +// extern "C" void __dt__12dBgS_AcchCirFv() { +// // NONMATCHING +// } /* 80A19B44-80A19BA0 005524 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ // dCcD_GStts::~dCcD_GStts() { -extern "C" void __dt__10dCcD_GSttsFv() { - // NONMATCHING -} +// extern "C" void __dt__10dCcD_GSttsFv() { +// // NONMATCHING +// } /* 80A19BA0-80A19C10 005580 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ // dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} +// extern "C" void __dt__12dBgS_ObjAcchFv() { +// // NONMATCHING +// } /* 80A19C10-80A19C58 0055F0 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ // J3DFrameCtrl::~J3DFrameCtrl() { -extern "C" void __dt__12J3DFrameCtrlFv() { - // NONMATCHING -} +// extern "C" void __dt__12J3DFrameCtrlFv() { +// // NONMATCHING +// } /* 80A19C58-80A19D74 005638 011C+00 1/1 0/0 0/0 .text setEyeAngleY__15daNpcT_JntAnm_cF4cXyzsifs */ // void daNpcT_JntAnm_c::setEyeAngleY(cXyz param_0, s16 param_1, int param_2, f32 param_3, // s16 param_4) { -extern "C" void setEyeAngleY__15daNpcT_JntAnm_cF4cXyzsifs() { - // NONMATCHING -} +// extern "C" void setEyeAngleY__15daNpcT_JntAnm_cF4cXyzsifs() { +// // NONMATCHING +// } -/* 80A19D74-80A19F7C 005754 0208+00 1/1 0/0 0/0 .text setEyeAngleX__15daNpcT_JntAnm_cF4cXyzfs */ -// void daNpcT_JntAnm_c::setEyeAngleX(cXyz param_0, f32 param_1, s16 param_2) { -extern "C" void setEyeAngleX__15daNpcT_JntAnm_cF4cXyzfs() { - // NONMATCHING -} +// /* 80A19D74-80A19F7C 005754 0208+00 1/1 0/0 0/0 .text setEyeAngleX__15daNpcT_JntAnm_cF4cXyzfs */ +// // void daNpcT_JntAnm_c::setEyeAngleX(cXyz param_0, f32 param_1, s16 param_2) { +// extern "C" void setEyeAngleX__15daNpcT_JntAnm_cF4cXyzfs() { +// // NONMATCHING +// } -/* 80A19F7C-80A19F80 00595C 0004+00 1/0 0/0 0/0 .text ctrlSubFaceMotion__8daNpcT_cFi */ -// void daNpcT_c::ctrlSubFaceMotion(int param_0) { -extern "C" void ctrlSubFaceMotion__8daNpcT_cFi() { - /* empty function */ -} +// /* 80A19F7C-80A19F80 00595C 0004+00 1/0 0/0 0/0 .text ctrlSubFaceMotion__8daNpcT_cFi */ +// // void daNpcT_c::ctrlSubFaceMotion(int param_0) { +// extern "C" void ctrlSubFaceMotion__8daNpcT_cFi() { +// /* empty function */ +// } -/* 80A19F80-80A19F88 005960 0008+00 1/0 0/0 0/0 .text getEyeballLMaterialNo__8daNpcT_cFv - */ -// bool daNpcT_c::getEyeballLMaterialNo() { -extern "C" bool getEyeballLMaterialNo__8daNpcT_cFv() { - return false; -} +// /* 80A19F80-80A19F88 005960 0008+00 1/0 0/0 0/0 .text getEyeballLMaterialNo__8daNpcT_cFv +// */ +// // bool daNpcT_c::getEyeballLMaterialNo() { +// extern "C" bool getEyeballLMaterialNo__8daNpcT_cFv() { +// return false; +// } -/* 80A19F88-80A19F90 005968 0008+00 1/0 0/0 0/0 .text getEyeballRMaterialNo__8daNpcT_cFv - */ -// bool daNpcT_c::getEyeballRMaterialNo() { -extern "C" bool getEyeballRMaterialNo__8daNpcT_cFv() { - return false; -} +// /* 80A19F88-80A19F90 005968 0008+00 1/0 0/0 0/0 .text getEyeballRMaterialNo__8daNpcT_cFv +// */ +// // bool daNpcT_c::getEyeballRMaterialNo() { +// extern "C" bool getEyeballRMaterialNo__8daNpcT_cFv() { +// return false; +// } -/* 80A19F90-80A19F98 005970 0008+00 1/0 0/0 0/0 .text evtEndProc__8daNpcT_cFv */ -// bool daNpcT_c::evtEndProc() { -extern "C" bool evtEndProc__8daNpcT_cFv() { - return true; -} +// /* 80A19F90-80A19F98 005970 0008+00 1/0 0/0 0/0 .text evtEndProc__8daNpcT_cFv */ +// // bool daNpcT_c::evtEndProc() { +// extern "C" bool evtEndProc__8daNpcT_cFv() { +// return true; +// } /* 80A19F98-80A19F9C 005978 0004+00 1/0 0/0 0/0 .text afterMoved__8daNpcT_cFv */ void daNpcT_c::afterMoved() { /* empty function */ } -/* 80A19F9C-80A19FA4 00597C 0008+00 1/0 0/0 0/0 .text chkXYItems__8daNpcT_cFv */ -// bool daNpcT_c::chkXYItems() { -extern "C" bool chkXYItems__8daNpcT_cFv() { - return false; -} +// /* 80A19F9C-80A19FA4 00597C 0008+00 1/0 0/0 0/0 .text chkXYItems__8daNpcT_cFv */ +// // bool daNpcT_c::chkXYItems() { +// extern "C" bool chkXYItems__8daNpcT_cFv() { +// return false; +// } -/* 80A19FA4-80A19FBC 005984 0018+00 1/0 0/0 0/0 .text decTmr__8daNpcT_cFv */ -// void daNpcT_c::decTmr() { -extern "C" void decTmr__8daNpcT_cFv() { - // NONMATCHING -} +// /* 80A19FA4-80A19FBC 005984 0018+00 1/0 0/0 0/0 .text decTmr__8daNpcT_cFv */ +// // void daNpcT_c::decTmr() { +// extern "C" void decTmr__8daNpcT_cFv() { +// // NONMATCHING +// } -/* 80A19FBC-80A19FC0 00599C 0004+00 1/0 0/0 0/0 .text drawOtherMdl__8daNpcT_cFv */ -// void daNpcT_c::drawOtherMdl() { -extern "C" void drawOtherMdl__8daNpcT_cFv() { - /* empty function */ -} +// /* 80A19FBC-80A19FC0 00599C 0004+00 1/0 0/0 0/0 .text drawOtherMdl__8daNpcT_cFv */ +// // void daNpcT_c::drawOtherMdl() { +// extern "C" void drawOtherMdl__8daNpcT_cFv() { +// /* empty function */ +// } -/* 80A19FC0-80A19FC4 0059A0 0004+00 1/0 0/0 0/0 .text drawGhost__8daNpcT_cFv */ -// void daNpcT_c::drawGhost() { -extern "C" void drawGhost__8daNpcT_cFv() { - /* empty function */ -} +// /* 80A19FC0-80A19FC4 0059A0 0004+00 1/0 0/0 0/0 .text drawGhost__8daNpcT_cFv */ +// // void daNpcT_c::drawGhost() { +// extern "C" void drawGhost__8daNpcT_cFv() { +// /* empty function */ +// } -/* 80A19FC4-80A19FCC 0059A4 0008+00 1/0 0/0 0/0 .text afterSetFaceMotionAnm__8daNpcT_cFiifi */ -// bool daNpcT_c::afterSetFaceMotionAnm(int param_0, int param_1, f32 param_2, int param_3) { -extern "C" bool afterSetFaceMotionAnm__8daNpcT_cFiifi() { - return true; -} +// /* 80A19FC4-80A19FCC 0059A4 0008+00 1/0 0/0 0/0 .text afterSetFaceMotionAnm__8daNpcT_cFiifi */ +// // bool daNpcT_c::afterSetFaceMotionAnm(int param_0, int param_1, f32 param_2, int param_3) { +// extern "C" bool afterSetFaceMotionAnm__8daNpcT_cFiifi() { +// return true; +// } -/* 80A19FCC-80A19FD4 0059AC 0008+00 1/0 0/0 0/0 .text afterSetMotionAnm__8daNpcT_cFiifi - */ -// bool daNpcT_c::afterSetMotionAnm(int param_0, int param_1, f32 param_2, int param_3) { -extern "C" bool afterSetMotionAnm__8daNpcT_cFiifi() { - return true; -} +// /* 80A19FCC-80A19FD4 0059AC 0008+00 1/0 0/0 0/0 .text afterSetMotionAnm__8daNpcT_cFiifi +// */ +// // bool daNpcT_c::afterSetMotionAnm(int param_0, int param_1, f32 param_2, int param_3) { +// extern "C" bool afterSetMotionAnm__8daNpcT_cFiifi() { +// return true; +// } -/* 80A19FD4-80A1A004 0059B4 0030+00 1/0 0/0 0/0 .text - * getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c */ -// void daNpcT_c::getFaceMotionAnm(daNpcT_faceMotionAnmData_c param_0) { -extern "C" void getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c() { - // NONMATCHING -} +// /* 80A19FD4-80A1A004 0059B4 0030+00 1/0 0/0 0/0 .text +// * getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c */ +// // void daNpcT_c::getFaceMotionAnm(daNpcT_faceMotionAnmData_c param_0) { +// extern "C" void getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c() { +// // NONMATCHING +// } -/* 80A1A004-80A1A034 0059E4 0030+00 1/0 0/0 0/0 .text - * getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c */ -// void daNpcT_c::getMotionAnm(daNpcT_motionAnmData_c param_0) { -extern "C" void getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c() { - // NONMATCHING -} +// /* 80A1A004-80A1A034 0059E4 0030+00 1/0 0/0 0/0 .text +// * getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c */ +// // void daNpcT_c::getMotionAnm(daNpcT_motionAnmData_c param_0) { +// extern "C" void getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c() { +// // NONMATCHING +// } -/* 80A1A034-80A1A038 005A14 0004+00 1/0 0/0 0/0 .text changeAnm__8daNpcT_cFPiPi */ -// void daNpcT_c::changeAnm(int* param_0, int* param_1) { -extern "C" void changeAnm__8daNpcT_cFPiPi() { - /* empty function */ -} +// /* 80A1A034-80A1A038 005A14 0004+00 1/0 0/0 0/0 .text changeAnm__8daNpcT_cFPiPi */ +// // void daNpcT_c::changeAnm(int* param_0, int* param_1) { +// extern "C" void changeAnm__8daNpcT_cFPiPi() { +// /* empty function */ +// } -/* 80A1A038-80A1A03C 005A18 0004+00 1/0 0/0 0/0 .text changeBck__8daNpcT_cFPiPi */ -// void daNpcT_c::changeBck(int* param_0, int* param_1) { -extern "C" void changeBck__8daNpcT_cFPiPi() { - /* empty function */ -} +// /* 80A1A038-80A1A03C 005A18 0004+00 1/0 0/0 0/0 .text changeBck__8daNpcT_cFPiPi */ +// // void daNpcT_c::changeBck(int* param_0, int* param_1) { +// extern "C" void changeBck__8daNpcT_cFPiPi() { +// /* empty function */ +// } -/* 80A1A03C-80A1A040 005A1C 0004+00 1/0 0/0 0/0 .text changeBtk__8daNpcT_cFPiPi */ -// void daNpcT_c::changeBtk(int* param_0, int* param_1) { -extern "C" void changeBtk__8daNpcT_cFPiPi() { - /* empty function */ -} +// /* 80A1A03C-80A1A040 005A1C 0004+00 1/0 0/0 0/0 .text changeBtk__8daNpcT_cFPiPi */ +// // void daNpcT_c::changeBtk(int* param_0, int* param_1) { +// extern "C" void changeBtk__8daNpcT_cFPiPi() { +// /* empty function */ +// } -/* 80A1A040-80A1A05C 005A20 001C+00 2/2 0/0 0/0 .text cLib_calcTimer__FPi */ -extern "C" void func_80A1A040(void* _this, int* param_0) { - // NONMATCHING -} +// /* 80A1A040-80A1A05C 005A20 001C+00 2/2 0/0 0/0 .text cLib_calcTimer__FPi */ +// extern "C" void func_80A1A040(void* _this, int* param_0) { +// // NONMATCHING +// } -/* 80A1A05C-80A1A098 005A3C 003C+00 1/1 0/0 0/0 .text cLib_getRndValue__Fff */ -extern "C" void func_80A1A05C(void* _this, f32 param_0, f32 param_1) { - // NONMATCHING -} +// /* 80A1A05C-80A1A098 005A3C 003C+00 1/1 0/0 0/0 .text cLib_getRndValue__Fff */ +// extern "C" void func_80A1A05C(void* _this, f32 param_0, f32 param_1) { +// // NONMATCHING +// } /* ############################################################################################## */ /* 80A1ADCC-80A1ADD8 000884 000C+00 2/2 0/0 0/0 .data __vt__19daNpc_Jagar_Param_c */ @@ -2186,176 +2155,176 @@ static void func_80A1A314() { // NONMATCHING } -/* ############################################################################################## */ -/* 80A1AE4C-80A1AE50 000074 0004+00 0/0 0/0 0/0 .bss - * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE4C[4]; -#pragma pop +// /* ############################################################################################## */ +// /* 80A1AE4C-80A1AE50 000074 0004+00 0/0 0/0 0/0 .bss +// * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE4C[4]; +// #pragma pop -/* 80A1AE50-80A1AE54 000078 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14JASAudioThread> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE50[4]; -#pragma pop +// /* 80A1AE50-80A1AE54 000078 0004+00 0/0 0/0 0/0 .bss +// * sInstance__35JASGlobalInstance<14JASAudioThread> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE50[4]; +// #pragma pop -/* 80A1AE54-80A1AE58 00007C 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE54[4]; -#pragma pop +// /* 80A1AE54-80A1AE58 00007C 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE54[4]; +// #pragma pop -/* 80A1AE58-80A1AE5C 000080 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE58[4]; -#pragma pop +// /* 80A1AE58-80A1AE5C 000080 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE58[4]; +// #pragma pop -/* 80A1AE5C-80A1AE60 000084 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80A1AE5C[4]; -#pragma pop +// /* 80A1AE5C-80A1AE60 000084 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> +// */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE5C[4]; +// #pragma pop -/* 80A1AE60-80A1AE64 000088 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80A1AE60[4]; -#pragma pop +// /* 80A1AE60-80A1AE64 000088 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> +// */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE60[4]; +// #pragma pop -/* 80A1AE64-80A1AE68 00008C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> - */ -#pragma push -#pragma force_active on -static u8 data_80A1AE64[4]; -#pragma pop +// /* 80A1AE64-80A1AE68 00008C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> +// */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE64[4]; +// #pragma pop -/* 80A1AE68-80A1AE6C 000090 0004+00 0/0 0/0 0/0 .bss - * sInstance__36JASGlobalInstance<15JAISoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE68[4]; -#pragma pop +// /* 80A1AE68-80A1AE6C 000090 0004+00 0/0 0/0 0/0 .bss +// * sInstance__36JASGlobalInstance<15JAISoundStarter> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE68[4]; +// #pragma pop -/* 80A1AE6C-80A1AE70 000094 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE6C[4]; -#pragma pop +// /* 80A1AE6C-80A1AE70 000094 0004+00 0/0 0/0 0/0 .bss +// * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE6C[4]; +// #pragma pop -/* 80A1AE70-80A1AE74 000098 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE70[4]; -#pragma pop +// /* 80A1AE70-80A1AE74 000098 0004+00 0/0 0/0 0/0 .bss +// * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE70[4]; +// #pragma pop -/* 80A1AE74-80A1AE78 00009C 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE74[4]; -#pragma pop +// /* 80A1AE74-80A1AE78 00009C 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE74[4]; +// #pragma pop -/* 80A1AE78-80A1AE7C 0000A0 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE78[4]; -#pragma pop +// /* 80A1AE78-80A1AE7C 0000A0 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE78[4]; +// #pragma pop -/* 80A1AE7C-80A1AE80 0000A4 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE7C[4]; -#pragma pop +// /* 80A1AE7C-80A1AE80 0000A4 0004+00 0/0 0/0 0/0 .bss +// * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE7C[4]; +// #pragma pop -/* 80A1AE80-80A1AE84 0000A8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80A1AE80[4]; -#pragma pop +// /* 80A1AE80-80A1AE84 0000A8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> +// */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE80[4]; +// #pragma pop -/* 80A1AE84-80A1AE88 0000AC 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAISoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE84[4]; -#pragma pop +// /* 80A1AE84-80A1AE88 0000AC 0004+00 0/0 0/0 0/0 .bss +// * sInstance__33JASGlobalInstance<12JAISoundInfo> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE84[4]; +// #pragma pop -/* 80A1AE88-80A1AE8C 0000B0 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13JAUSoundTable> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE88[4]; -#pragma pop +// /* 80A1AE88-80A1AE8C 0000B0 0004+00 0/0 0/0 0/0 .bss +// * sInstance__34JASGlobalInstance<13JAUSoundTable> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE88[4]; +// #pragma pop -/* 80A1AE8C-80A1AE90 0000B4 0004+00 0/0 0/0 0/0 .bss - * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE8C[4]; -#pragma pop +// /* 80A1AE8C-80A1AE90 0000B4 0004+00 0/0 0/0 0/0 .bss +// * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE8C[4]; +// #pragma pop -/* 80A1AE90-80A1AE94 0000B8 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE90[4]; -#pragma pop +// /* 80A1AE90-80A1AE94 0000B8 0004+00 0/0 0/0 0/0 .bss +// * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE90[4]; +// #pragma pop -/* 80A1AE94-80A1AE98 0000BC 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> - */ -#pragma push -#pragma force_active on -static u8 data_80A1AE94[4]; -#pragma pop +// /* 80A1AE94-80A1AE98 0000BC 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> +// */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE94[4]; +// #pragma pop -/* 80A1AE98-80A1AE9C 0000C0 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ -#pragma push -#pragma force_active on -static u8 data_80A1AE98[4]; -#pragma pop +// /* 80A1AE98-80A1AE9C 0000C0 0004+00 0/0 0/0 0/0 .bss +// * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE98[4]; +// #pragma pop -/* 80A1AE9C-80A1AEA0 0000C4 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> - */ -#pragma push -#pragma force_active on -static u8 data_80A1AE9C[4]; -#pragma pop +// /* 80A1AE9C-80A1AEA0 0000C4 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> +// */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AE9C[4]; +// #pragma pop -/* 80A1AEA0-80A1AEA4 0000C8 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80A1AEA0[4]; -#pragma pop +// /* 80A1AEA0-80A1AEA4 0000C8 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> +// */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AEA0[4]; +// #pragma pop -/* 80A1AEA4-80A1AEA8 0000CC 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80A1AEA4[4]; -#pragma pop +// /* 80A1AEA4-80A1AEA8 0000CC 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> +// */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AEA4[4]; +// #pragma pop -/* 80A1AEA8-80A1AEAC 0000D0 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80A1AEA8[4]; -#pragma pop +// /* 80A1AEA8-80A1AEAC 0000D0 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> +// */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AEA8[4]; +// #pragma pop -/* 80A1AEAC-80A1AEB0 0000D4 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ -#pragma push -#pragma force_active on -static u8 data_80A1AEAC[4]; -#pragma pop +// /* 80A1AEAC-80A1AEB0 0000D4 0004+00 0/0 0/0 0/0 .bss +// * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ +// #pragma push +// #pragma force_active on +// static u8 data_80A1AEAC[4]; +// #pragma pop /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ From f3c23d63bba5c32d8c69fea9ef21e53e64be4709 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Fri, 21 Feb 2025 17:50:24 -0500 Subject: [PATCH 22/41] Jagar setParam work and daNpcT_c::getActorDistance - 85% --- include/d/actor/d_a_npc_jagar.h | 1 + src/d/actor/d_a_npc.cpp | 13 +++++++------ src/d/actor/d_a_npc_jagar.cpp | 5 ++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 06473815882..c8cc5fde784 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -114,6 +114,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0FD4 */ actionFunc field_0xfd4; /* 0x0FE0 */ actionFunc field_0xfe0; /* 0x0FE4 */ actionFunc field_0xfe4; + /* 0x0FEC */ int field_0xfec; /* 0x0FF0 */ int field_0xff0; /* 0x0FF4 */ int field_0xff4; /* 0x1001 */ u8 field_0x1001; diff --git a/src/d/actor/d_a_npc.cpp b/src/d/actor/d_a_npc.cpp index 8ad7b1c3925..a7dac8b032d 100644 --- a/src/d/actor/d_a_npc.cpp +++ b/src/d/actor/d_a_npc.cpp @@ -2092,13 +2092,14 @@ int daNpcT_c::getActorDistance(fopAc_ac_c* param_0, int param_1, int param_2) { double dVar6 = (double)*reinterpret_cast(&::dAttention_c::getDistTable(param_2)); double dVar5 = (double)fopAcM_searchActorDistanceXZ(this, param_0); if (dVar5 < dVar7) { - for (int i = 0; i < 5;) { - if (((float)(dVar5 - dVar7)) / 6.0f < ((double)(dVar6 - dVar7)) * (float)(i + 1 ^ 2147483648)) { - return rv; - } - i++; - rv++; + return 0; + } + for (int i = 0; i < 5;) { + if (((float)(dVar5 - dVar7)) < ((double)(dVar6 - dVar7)) * (float)(i + 1 ^ 2147483648)) { + return rv; } + i++; + rv++; } return rv; } diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 4ca309afc12..f082aaa5a60 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -21,6 +21,7 @@ #include "d/d_com_inf_game.h" #include "d/actor/d_a_npc_bou.h" // For action method? #include "dol2asm.h" +#include "d/d_meter2_info.h" // // Forward References: @@ -292,7 +293,6 @@ extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; extern "C" extern void* __vt__9cCcD_Stts[8]; extern "C" extern void* __vt__14J3DMaterialAnm[4]; extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern u8 g_meter2_info[248]; extern "C" void getType__11daNpc_Bou_cFv(); extern "C" u8 const m__17daNpc_Bou_Param_c[156]; extern "C" void __register_global_object(); @@ -1075,6 +1075,9 @@ void daNpc_Jagar_c::setParam() { if (mType == TYPE_1) { // daNpcT_getDistTableIdx(field_0xff0, field_0xff4); int uVar4 = getActorDistance(player, daNpcT_getDistTableIdx(field_0xff0, field_0xff4), attention_info.distances[1]); + if (field_0xfec < 4) { + g_meter2_info.mBlinkButton |= 1; + } } } From 6d0103cd84c3ea2f1792f25bd89c6e78264793e6 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Sun, 23 Feb 2025 17:49:24 -0500 Subject: [PATCH 23/41] Prep Jagar push to main --- include/d/actor/d_a_npc_jagar.h | 20 +- include/d/actor/d_a_player.h | 2 + src/d/actor/d_a_alink.cpp | 2 +- src/d/actor/d_a_npc_jagar.cpp | 638 ++++++++++++++++++++++++++++---- 4 files changed, 566 insertions(+), 96 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index c8cc5fde784..b0ec8ab3858 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -2,7 +2,6 @@ #define D_A_NPC_JAGAR_H #include "d/actor/d_a_npc.h" -#include "f_op/f_op_actor_mng.h" // <-- Does this get the GetParam function? /** * @ingroup actors-npcs @@ -25,7 +24,6 @@ class daNpc_Jagar_c : public daNpcT_c { TYPE_1, TYPE_2, TYPE_3, - TYPE_4, }; /* 80A1470C */ ~daNpc_Jagar_c(); @@ -52,7 +50,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A1607C */ void setCollision(); /* 80A161EC */ int drawDbgInfo(); /* 80A161F4 */ void changeBtp(int*, int*); - /* 80A16234 */ void selectAction(); + /* 80A16234 */ int selectAction(); /* 80A162B0 */ int chkAction(int (daNpc_Jagar_c::*)(void*)); /* 80A162DC */ int setAction(int (daNpc_Jagar_c::*)(void*)); /* 80A16384 */ int cutClimbUp(int); @@ -65,8 +63,8 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A17924 */ int chkSitMotion2(); /* 80A17984 */ int chkChuMotion(); /* 80A179F8 */ int chkToMotion(); - /* 80A17A2C */ void wait(void*); - /* 80A1856C */ void talkwithBou(void*); + /* 80A17A2C */ int wait(void*); + /* 80A1856C */ int talkwithBou(void*); /* 80A18B74 */ int talk(void*); /* 80A1A194 */ daNpc_Jagar_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2, daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4, @@ -96,21 +94,9 @@ class daNpc_Jagar_c : public daNpcT_c { static char* mCutNameList[7]; static cutFunc mCutList[7]; private: - /* 0x00B0 */ int field_0xb0; - /* 0x04B4 */ short field_0x4b4; - /* 0x04B6 */ s16 field_0x4b6; - /* 0x0568 */ u8 field_0x568[0x100c - 0x568]; - /* 0x0B58 */ int field_0xb58; // CutAnger int - /* 0x0B7C */ int field_0xb7c; - /* 0x0BA0 */ daNpcT_ActorMngr_c field_0xba0; - /* 0x0CE0 */ int field_0xce0; // CutAnger int - /* 0x0CFF */ u8 field_0xcff; - /* 0x0D7A */ short field_0xd7a; // CutAnger short - /* 0x0E30 */ int field_0xe30; /* 0x0E44 */ dCcD_Cyl mCyl1; /* 0x0F80 */ u8 mType; /* 0x0F84 */ daNpcT_ActorMngr_c mActorMngr[5]; - /* 0x0F94 */ daNpcT_ActorMngr_c field_0xf94; /* 0x0FD4 */ actionFunc field_0xfd4; /* 0x0FE0 */ actionFunc field_0xfe0; /* 0x0FE4 */ actionFunc field_0xfe4; diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h index 7c5131ec644..b9d3377f1e1 100644 --- a/include/d/actor/d_a_player.h +++ b/include/d/actor/d_a_player.h @@ -1094,6 +1094,8 @@ class daPy_py_c : public fopAc_ac_c { onNoResetFlg3(FLG3_UNK_200000); } + BOOL checkClimbEndHang() { return checkResetFlg0(RFLG0_UNK_40000); } + static daMidna_c* m_midnaActor; }; diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index 6137d8635fd..ec2fddc1a30 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -10314,7 +10314,7 @@ void daAlink_c::setBgCheckParam() { mAcchCir[0].SetWallH(-50.0f); mAcchCir[1].SetWallH(-25.0f); mAcchCir[2].SetWallH(0.0f); - mAcchCir[0].SetWallR(35.0f); + mAcchCir[0].35.0f); } else if (checkModeFlg(0x1000000)) { if (mProcID == PROC_WOLF_LIE_AUTO_MOVE) { mAcchCir[0].SetWallR(11.655f); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index f082aaa5a60..2182e118f8b 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -12,16 +12,15 @@ #include "d/d_cc_uty.h" #include "d/d_particle_copoly.h" #include "Z2AudioLib/Z2Instances.h" -#include "d/actor/d_a_npc.h" -#include "f_op/f_op_actor_mng.h" #include "Z2AudioLib/Z2Creature.h" #include "d/d_particle_copoly.h" #include "d/d_bg_s_acch.h" #include "d/d_cc_d.h" -#include "d/d_com_inf_game.h" #include "d/actor/d_a_npc_bou.h" // For action method? #include "dol2asm.h" #include "d/d_meter2_info.h" +#include "d/d_meter_button.h" +#include "m_Do/m_Do_mtx.h" // // Forward References: @@ -293,6 +292,7 @@ extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; extern "C" extern void* __vt__9cCcD_Stts[8]; extern "C" extern void* __vt__14J3DMaterialAnm[4]; extern "C" u8 now__14mDoMtx_stack_c[48]; +extern "C" extern dMeter2Info_c g_meter2_info; extern "C" void getType__11daNpc_Bou_cFv(); extern "C" u8 const m__17daNpc_Bou_Param_c[156]; extern "C" void __register_global_object(); @@ -926,6 +926,7 @@ int daNpc_Jagar_c::CreateHeap() { { return 1; } + return 0; } /* 80A14F4C-80A14F80 00092C 0034+00 1/1 0/0 0/0 .text Delete__13daNpc_Jagar_cFv */ @@ -1052,33 +1053,59 @@ void daNpc_Jagar_c::afterJntAnm(int param_1) { void daNpc_Jagar_c::setParam() { selectAction(); srchActors(); - s16 sVar9 = daNpc_Jagar_Param_c::m.field_0x48; - s16 sVar8 = daNpc_Jagar_Param_c::m.field_0x4a; - s16 sVar7 = daNpc_Jagar_Param_c::m.field_0x4c; - s16 sVar6 = daNpc_Jagar_Param_c::m.field_0x4e; - if (mType == TYPE_1) { - sVar9 = 19; - sVar7 = 19; - sVar8 = 6; - sVar6 = 6; - } else if (mType == TYPE_0) { - sVar9 = 4; - sVar7 = 5; - } else if ((int)mType < 3) { - sVar9 = 3; - sVar7 = 5; + // short sVar6 = 3; + // short sVar5 = 5; + s16 sVar6 = daNpc_Jagar_Param_c::m.field_0x48; + // s16 sVar5 = daNpc_Hanjo_Param_c::m.field_0x4a; + s16 sVar5 = daNpc_Jagar_Param_c::m.field_0x4c; + s16 sVar1 = daNpc_Jagar_Param_c::m.field_0x4e; + u32 uVar7 = 10; + switch (mType) { + case TYPE_0: + sVar6 = 4; + sVar5 = 5; + break; + case TYPE_2: + field_0xff0 = 3; + field_0xff4 = 6; + // sVar6 = 19; + // sVar5 = 19; + break; + default: + sVar6 = 3; + sVar5 = 5; + break; } - attention_info.distances[0] = daNpcT_getDistTableIdx((int)sVar7, 6); + attention_info.distances[0] = daNpcT_getDistTableIdx(sVar5, 6); attention_info.distances[1] = attention_info.distances[0]; - attention_info.distances[3] = daNpcT_getDistTableIdx((int)sVar7, 6); - daPy_py_c* player = daPy_getPlayerActorClass(); + attention_info.distances[3] = daNpcT_getDistTableIdx(sVar6, 6); if (mType == TYPE_1) { - // daNpcT_getDistTableIdx(field_0xff0, field_0xff4); - int uVar4 = getActorDistance(player, daNpcT_getDistTableIdx(field_0xff0, field_0xff4), attention_info.distances[1]); + field_0xfec = getActorDistance(daPy_getPlayerActorClass(), daNpcT_getDistTableIdx(field_0xff0, field_0xff4), attention_info.distances[1]); if (field_0xfec < 4) { g_meter2_info.mBlinkButton |= 1; } + } else { + if (chkChuMotion() != 0) { + attention_info.distances[0] = 20; + attention_info.distances[1] = 20; + attention_info.distances[3] = 20; + uVar7 = 2; + } } + attention_info.flags = uVar7; + // mAcchCir[0].SetWallR(); + scale.set(daNpc_Jagar_Param_c::m.field_0x08, daNpc_Jagar_Param_c::m.field_0x08, + daNpc_Jagar_Param_c::m.field_0x08); + field_0x864.SetWeight(daNpc_Jagar_Param_c::m.field_0x10); + field_0xdec = daNpc_Jagar_Param_c::m.field_0x14; + field_0xdf0 = daNpc_Jagar_Param_c::m.field_0x1c; + field_0xdf8 = daNpc_Jagar_Param_c::m.field_0x50; + field_0x8a0.SetWallR(field_0xdf0); + field_0x8a0.SetWallH(daNpc_Jagar_Param_c::m.field_0x18); + field_0xde8 = daNpc_Jagar_Param_c::m.field_0x0c; + field_0xa80 = daNpc_Jagar_Param_c::m.field_0x6c; + field_0xa84 = daNpc_Jagar_Param_c::m.field_0x44; + gravity = daNpc_Jagar_Param_c::m.field_0x04; } /* 80A155E4-80A15714 000FC4 0130+00 1/0 0/0 0/0 .text checkChangeEvt__13daNpc_Jagar_cFv @@ -1086,8 +1113,29 @@ void daNpc_Jagar_c::setParam() { bool daNpc_Jagar_c::checkChangeEvt() { if (!chkAction(&daNpc_Jagar_c::talk)) { field_0xe2e[0] = 0; + if (dComIfGp_event_chkTalkXY()) { + if (dComIfGp_evmng_ChkPresentEnd()) { + field_0xe30 = 1; + evtChange(); + } + return true; + } + switch (mType) { + case TYPE_0: + if (daNpcT_chkEvtBit(0x1c) && chkChuMotion()) { + field_0xe30 = 2; + evtChange(); + return true; + } + case TYPE_1: + if (field_0xfec < 4) { + field_0xe30 = 6; + evtChange(); + return true; + } + } } - return true; // Placeholder value + return false; } /* ############################################################################################## */ @@ -1114,7 +1162,23 @@ void daNpc_Jagar_c::setAfterTalkMotion() { /* 80A157B4-80A158A0 001194 00EC+00 1/1 0/0 0/0 .text srchActors__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::srchActors() { switch(mType) { - + case TYPE_0: + if (!mActorMngr[1].getActorP()) { + mActorMngr[1].entry(getNearestActorP(0x15a)); + } + if (!mActorMngr[0].getActorP()) { + mActorMngr[0].entry(getNearestActorP(0x10d)); + } + break; + case TYPE_1: + if (!mActorMngr[1].getActorP()) { + mActorMngr[1].entry(getNearestActorP(0x15a)); + } + if (!mActorMngr[2].getActorP()) { + mActorMngr[2].entry(getNearestActorP(0x246)); + } + case TYPE_2: + break; } } @@ -1148,7 +1212,7 @@ void daNpc_Jagar_c::action() { fopAc_ac_c* hitActor = hitChk(&mCyl1, 0xffffffff); if (hitActor != NULL) { cCcD_Obj* hitObj = mCyl1.GetTgHitObj(); - daNpc_Bou_c* this_00 = static_cast(field_0xf94.getActorP()); + daNpc_Bou_c* this_00 = static_cast(mActorMngr[2].getActorP()); if (this_00 && this_00->getType() == TYPE_1 && field_0xd08.checkStagger() == 0) { if (field_0xb50.getNo() != 1) { field_0xb50.setNo(1, -1, 1, 0); @@ -1175,12 +1239,15 @@ void daNpc_Jagar_c::action() { setAction(field_0xfe0); } } - if (field_0xba0.getActorP()) { - - if (field_0xb0 == 2) { - field_0xe30 = 5; - } - } + // if (field_0xba0.getActorP()) { + // u32 uVar2 = -1; + // if (base.parameters != -1) { + // uVar2 = base.parameters; + // } + // if (uVar2 == 2) { + // field_0xe30 = 5; + // } + // } } /* 80A15CA4-80A15D68 001684 00C4+00 1/0 0/0 0/0 .text beforeMove__13daNpc_Jagar_cFv */ @@ -1435,7 +1502,40 @@ COMPILER_STRIP_GATE(0x80A1A44C, &lit_5040); /* 80A1607C-80A161EC 001A5C 0170+00 1/0 0/0 0/0 .text setCollision__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setCollision() { - // NONMATCHING + cXyz cStack_48; + if (field_0xe25 == 0) { + u32 tgType = -0x27040201; + u32 tgSPrm = 0x1f; + if (field_0xa89 != 0) { + tgType = 0; + tgSPrm = 0; + } else { + if (field_0xd08.checkStagger()) { + tgType = 0; + tgSPrm = 0; + } + } + mCyl1.SetCoSPrm(0x79); + mCyl1.SetTgType(tgType); + mCyl1.SetTgSPrm(tgSPrm); + mCyl1.OnTgNoHitMark(); + cStack_48.set(0.0f, 0.0f, 0.0f); + f32 cylHeight = field_0xdec; + f32 cylRadius = field_0xdf0; + if (field_0x1004 == 2) { + cylHeight = 70.0f; + cylRadius = 90.0f; + } + mDoMtx_stack_c::YrotS(field_0xd78.y); + mDoMtx_stack_c::multVec(&cStack_48, &cStack_48); + cStack_48 += current.pos; + mCyl1.SetH(cylHeight); + mCyl1.SetR(cylRadius); + mCyl1.SetC(cStack_48); + dComIfG_Ccsp()->Set(&mCyl1); + } + mCyl1.ClrCoHit(); + mCyl1.ClrTgHit(); } /* 80A161EC-80A161F4 001BCC 0008+00 1/0 0/0 0/0 .text drawDbgInfo__13daNpc_Jagar_cFv */ @@ -1453,8 +1553,17 @@ void daNpc_Jagar_c::changeBtp(int* param_0, int* param_1) { } /* 80A16234-80A162B0 001C14 007C+00 1/1 0/0 0/0 .text selectAction__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::selectAction() { - // NONMATCHING +int daNpc_Jagar_c::selectAction() { + field_0xfd4 = NULL; + switch (mType) { + case TYPE_1: + field_0xfd4 = &daNpc_Jagar_c::talkwithBou; + break; + default: + field_0xfd4 = &daNpc_Jagar_c::wait; + break; + } + return 1; } /* 80A162B0-80A162DC 001C90 002C+00 2/2 0/0 0/0 .text @@ -1493,7 +1602,7 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { field_0xb74.setNo(2, 0.0f, 0, 0); field_0xba8.lookNone(1); field_0x1003 = 1; - setAngle(field_0x4b6); + // setAngle(field_0x4b6); initTalk(field_0xa7c, NULL); break; case 2: @@ -1534,7 +1643,101 @@ SECTION_DEAD static char const* const stringBase_80A1A53B = "send"; /* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { - return 0; // Placeholder value + int rv = 0; + int iVar12 = -1; + int iVar11 = 0; + int iVar10 = 0; + int iVar9 = 0; + // int* piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + if (* dComIfGp_evmng_getMyIntegerP(param_0, "prm")) { + iVar12 = * dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + } + if (* dComIfGp_evmng_getMyIntegerP(param_0, "msgNo")) { + iVar11 = * dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); + } + // if (* dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2")) { + // iVar10 = * dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2"); + // } + // if (* dComIfGp_evmng_getMyIntegerP(param_0, "send")) { + // iVar9 = * dComIfGp_evmng_getMyIntegerP(param_0, "send"); + // } + if (dComIfGp_getEventManager().getIsAddvance(param_0)) { + switch (iVar12) { + case 0: + dComIfGp_getEvent().setPt2(mActorMngr[0].getActorP()); + break; + case 1: + initTalk(field_0xa7c, NULL); + break; + case 7: + dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); + break; + case 8: + field_0x1002 = 0; + field_0x1003 = 0; + } + } + int local_40 = -1; + int local_3c = -1; + int local_38 = -1; + switch (iVar12) { + case 0: + + field_0xba8.lookNone(0); + if (field_0xb74.getNo() == 10) { + // if (field_0xb74.getStepNo() < 1) { + // return 0; + // } + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(0, -1.0f, 0, 0); + rv = 1; + } + if (field_0xb74.getNo() != 0) { + return 0; + } + return 1; + case 1: + field_0xba8.lookPlayer(0); + if (field_0xdc8 == field_0xd78.y) { + return 1; + } + step(field_0xdc8, 8, 0xe, 0xf, 0); + return 0; + case 3: + case 4: + case 5: + if (mActorMngr[0].getActorP()) { + field_0xd6c.setall(0.0); + mDoMtx_stack_c::YrotS(field_0xd78.y); + mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); + field_0xd6c += current.pos; + // csXyz local_58(current.pos.z, current.pos.x, 0); + // PSVECSquareDistance(); + } + case 6: + return 0; + case 7: + if (mActorMngr[1].getActorP()) { + field_0xd6c.setall(0.0); + mDoMtx_stack_c::YrotS(field_0xd78.y); + // PSMTXMultVec(reinterpret_cast(&mDoMtx_stack_c::now), (const Vec *)&field_0xd6c, (Vec *)&field_0xd6c); + // csXyz local_70(current.pos.z, current.pos.x, 0); + // PSVECSquareDistance(); + // field_0xd6c = + // PSVECAdd((const Vec *)&field_0xd6c, (const Vec *)current, (Vec *)&field_0xd6c); + } + case 8: + return 1; + default: + // if (iVar12 < 0) { + // return 0; + // } + return 0; + } + if (field_0xba8.getMode() != 1) { + mFlow.remove(); + + } } /* 80A16CD8-80A16EFC 0026B8 0224+00 1/0 0/0 0/0 .text cutAnger__13daNpc_Jagar_cFi */ @@ -1546,12 +1749,12 @@ int daNpc_Jagar_c::cutAnger(int param_0) { local_b4 = *piVar1; } if ((((dComIfGp_getEventManager().getIsAddvance(param_0)) && local_b4 != 1) && local_b4 < 1) && local_b4 > -1) { - if (field_0xb58 != 8) { - field_0xb50.setNo(8, 0.0, 0, 0); - } - if (field_0xb7c != 0) { - field_0xb74.setNo(0, 0.0, 0, 0); - } + // if (field_0xb58 != 8) { + // field_0xb50.setNo(8, 0.0, 0, 0); + // } + // if (field_0xb7c != 0) { + // field_0xb74.setNo(0, 0.0, 0, 0); + // } field_0x1003 = 0; s16 sVar3 = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)); // Correct? setAngle(sVar3); @@ -1584,26 +1787,27 @@ COMPILER_STRIP_GATE(0x80A1A45C, &lit_5412); /* 80A16EFC-80A1705C 0028DC 0160+00 1/0 0/0 0/0 .text cutConversationWithBou__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { - fopAc_ac_c* iVar1 = field_0xba0.getActorP(); + // fopAc_ac_c* iVar1 = field_0xba0.getActorP(); + int rv = 0; int iVar5 = -1; - int iVar6 = 0; int* piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); if (piVar2 != NULL) { iVar5 = *piVar2; } - fopAc_ac_c* Bo = field_0xf94.getActorP(); + fopAc_ac_c* Bo = mActorMngr[2].getActorP(); fopAc_ac_c* Jaggle = (fopAc_ac_c *) this; - dComIfGp_setMesgCameraInfoActor(Bo, Jaggle, 0, 0, 0, 0, 0, 0, 0, 0); - if ((dComIfGp_getEventManager().getIsAddvance(param_0) != 0) && iVar5 == 0) { - if (field_0x4b4 != -1) { - int uVar4 = field_0x4b4; + dComIfGp_setMesgCameraInfoActor(Jaggle, Bo, 0, 0, 0, 0, 0, 0, 0, 0); + if (dComIfGp_getEventManager().getIsAddvance(param_0) && iVar5 == 0) { + int uVar4 = -1; + if (home.angle.GetX() != -1) { + uVar4 = home.angle.GetX(); } - initTalk(field_0x4b4, &Jaggle); + initTalk(uVar4, &Jaggle); } if (talkProc(NULL, 0, &Jaggle, 0) && mFlow.checkEndFlow()) { - return 1; + rv = 1; } - return 0; + return rv; } /* ############################################################################################## */ @@ -1628,32 +1832,188 @@ COMPILER_STRIP_GATE(0x80A1A46C, &lit_5455); /* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text * cutConfidentialConversation__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { + bool bVar1 = true; // true is just placeholder int rv = 0; - int iVar9 = -1; - int iVar8 = 0; + int iVar8 = -1; + int iVar7 = 0; + int local_30[4]; int* piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); if(piVar2) { - iVar9 = *piVar2; + iVar8 = *piVar2; } piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); if(piVar2) { - iVar8 = *piVar2; + iVar7 = *piVar2; } - // field_0xf94.getActorP(); // Check this? - dComIfGp_setMesgCameraInfoActor(field_0xf94.getActorP(), (fopAc_ac_c *)this, 0, 0, 0, 0, 0, 0, 0, 0); - + // mActorMngr[2].getActorP(); + // local_30[2] = {-1, -1}; + local_30[0] = -1; + local_30[1] = -1; + local_30[2] = -1; + dComIfGp_setMesgCameraInfoActor(mActorMngr[2].getActorP(), (fopAc_ac_c *)this, 0, 0, 0, 0, 0, 0, 0, 0); + if (dComIfGp_getEventManager().getIsAddvance(param_0)) { + switch (iVar8) { + case 0: + if (field_0xb50.getNo() != 8) { + field_0xb50.setNo(0, 8, -1.0f, 0); + } + if (field_0xb74.getNo() != 5) { + field_0xb74.setNo(0, 5, -1.0f, 0); + } + initTalk(0xd7, NULL); + break; + // case 2: + // // field_0xba8.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + // if (field_0xba8.getMode() == 2) { + // bVar1 = false; + // } else { + // // field_0xba8.setMode(2, 1); + // bVar1 = true; + // } + // if (bVar1) { + // field_0xba8.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + // } + // break; + case 1: + dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); + // if (field_0xb50.getNo() != 8) { + // // field_0xb50.setNo(0, 8, -1.0f, 0); + // } + // if (field_0xb74.getNo() != 5) { + // // field_0xb74.setNo(0, 5, -1.0f, 0); + // } + // if (field_0xba8.getMode() == 2) { + // bVar1 = false; + // } else { + // // field_0xba8.setMode(2, 1); + // bVar1 = true; + // } + // if (bVar1) { + // field_0xba8.lookActor(mActorMngr[1].getActorP(), 0.0f, 0); + // } + // break; + // case 4: + // field_0xe30 = 7; + // evtChange(); + } + } + switch (iVar8) { + case 0: + break; + case 1: + // if (field_0xba8.getMode() == 2) { + // bVar1 = false; + // } else { + // field_0xba8.setMode(2, 1); + // bVar1 = true; + // } + if (bVar1) { + field_0xba8.lookActor(mActorMngr[1].getActorP(), 0.0f, 0); + } + break; + case 2: + field_0xba8.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + break; + // default: + // // field_0xe30 = 7; + // evtChange(); + + } + local_30[0] = iVar7; + if (talkProc(local_30, 0, (fopAc_ac_c **)&local_30, 0) && mFlow.checkEndFlow()) { + return 1; + } + return rv; } /* ############################################################################################## */ -/* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80A1A540 = "timer"; -#pragma pop /* 80A173D8-80A17898 002DB8 04C0+00 3/0 0/0 0/0 .text cutFindWolf__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutFindWolf(int param_0) { - return 0; // Placeholder value + // cXyz cStack_44; + csXyz cStack_38; + int rv = 0; + int uVar6 = -1; + int iVar4 = 0; + int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + if (piVar1 != NULL) { + uVar6 = *piVar1; + } + int* puVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "timer"); + if (puVar2 != NULL) { + iVar4 = *puVar2; + } + if (dComIfGp_getEventManager().getIsAddvance(param_0)) { + switch (uVar6) { + case 0: + field_0xb50.setNo(1, -1.0f, 0, 0); + field_0xb74.setNo(7, -1.0f, 0, 0); + field_0x580.startCreatureVoice(Z2SE_JAGA_V_SURPRISE, -1); + field_0xdc8 = fopAcM_searchActorAngleY(this, daPy_getPlayerActorClass()); + mStepNo = 0; + dComIfGp_getVibration().StartShock(9, 15, cXyz(0.0f, 1.0f, 0.0f)); + break; + case 2: + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(15, -1.0f, 0, 0); + current.angle.y = home.angle.y; + if (field_0xdc8 - home.angle.y < 1) { + current.angle.y = current.angle.y + 0x4000; + } else { + current.angle.y = current.angle.y + -0x4000; + } + field_0xdc4 = iVar4; + break; + case 3: + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(5, -1.0f, 0, 0); + // setPos(cStack_44); + setAngle(home.angle.y); + speedF = 0; + speed.setall(0.0f); + field_0x68c.ClrWallNone(); + field_0xe25 = 1; + break; + default: + field_0xdc4 = iVar4; + } + } + switch (uVar6) { + case 0: + field_0xba8.lookPlayer(0); + if (field_0xdc8 == field_0xd78.y) { + rv = 1; + } else { + step(field_0xdc8, -1, -1, 15, 0); + } + break; + case 1: + field_0xba8.lookPlayer(0); + rv = 1; + break; + case 2: + field_0xba8.lookPlayer(0); + cLib_chaseS(&shape_angle.y, current.angle.y, 0x800); + cLib_chaseF(&speedF, 16.0f, 0.5f); + if (cLib_calcTimer(&field_0xdc4) == 0) { + rv = 1; + } + break; + case 3: + field_0xba8.lookPlayer(0); + rv = 1; + break; + case 10: + if (field_0xb74.getStepNo() > 0) { + rv = 1; + } + break; + case 11: + if (cLib_calcTimer(&field_0xdc4) == 0) { + rv = 1; + } + } + return rv; } /* 80A17898-80A17924 003278 008C+00 1/1 0/0 0/0 .text chkSitMotion__13daNpc_Jagar_cFv */ @@ -1702,15 +2062,12 @@ int daNpc_Jagar_c::chkChuMotion() { /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkToMotion() { - switch(field_0xb7c) { - case 10: - case 11: - case 12: - case 13: - return 1; - default: - return 0; + int rv = 0; + if (field_0xb74.getNo() == 10 || field_0xb74.getNo() == 11 || field_0xb74.getNo() == 12 || field_0xb74.getNo() == 13) { + rv = 1; } + rv = rv & ((1U << 8) - 1); + return rv; } /* ############################################################################################## */ @@ -1736,8 +2093,132 @@ COMPILER_STRIP_GATE(0x80A1A480, &lit_6101); #pragma pop /* 80A17A2C-80A1856C 00340C 0B40+00 1/0 0/0 0/0 .text wait__13daNpc_Jagar_cFPv */ -void daNpc_Jagar_c::wait(void* param_0) { - // NONMATCHING +int daNpc_Jagar_c::wait(void* param_0) { + cXyz cStack_30; + cXyz cStack_24; + cXyz cStack_3c; + cXyz cStack_48; + if (mType == TYPE_0) { + if(!chkSitMotion2()) { + if (chkSitMotion()) { + if (!chkChuMotion()) { + field_0x1004 = 2; + } else { + field_0x1004 = 1; + } + } + } else { + field_0x1004 = 2; + } + } + if (field_0x1004 != field_0x1003) { + field_0xe22 = 1; + } + if (field_0xe22 != 2) { + if (field_0xe22 > 1) { + return 1; + } + if (field_0xa88 == 0) { + if (field_0xd08.checkStagger()) { + switch (field_0x1004) { + case 0: + if (field_0x1003 == 2) { + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(10, -1.0f, 0, 0); + } else { + if (mType == TYPE_2) { + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(11, -1.0f, 0, 0); + } else { + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(0, -1.0f, 0, 0); + } + field_0x1003 = 0; + } + break; + case 1: + if (field_0x1003 == 2) { + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(11, -1.0f, 0, 0); + } else { + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(2, -1.0f, 0, 0); + field_0x1003 = 1; + } + break; + case 2: + if (field_0x1003 == 1) { + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(12, -1.0f, 0, 0); + } else if (field_0x1003 == 0) { + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(13, -1.0f, 0, 0); + } + } + field_0xe22 = 2; + } + } else { + switch (field_0x1004) { + case 0: + if (mType == TYPE_2) { + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(17, -1.0f, 0, 0); + } else { + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(0, -1.0f, 0, 0); + } + field_0x1003 = 0; + break; + case 1: + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(2, -1.0f, 0, 0); + field_0x1003 = 1; + break; + case 2: + field_0xb50.setNo(8, -1.0f, 0, 0); + field_0xb74.setNo(3, -1.0f, 0, 0); + } + field_0xe22 = 2; + } + } + switch (mType) { + case 0: + daNpcT_offTmpBit(0x10); + cStack_24.set(0x43fa0000, 0x41200000, 0x43fa0000); + cStack_30 = cXyz(daPy_getPlayerActorClass()->current.pos); + cStack_48.set(500.0f, 10.0f, 500.0f); + // cXyz(current.pos); + if (chkPointInArea(cStack_30, cXyz(current.pos), cStack_48, 0) != 0) { + if (daPy_getPlayerActorClass()->checkPlayerFly() && + daPy_getPlayerActorClass()->checkClimbEndHang()) { + field_0x1002 = 1; + } + daNpcT_onTmpBit(0x10); + } + if (daNpcT_chkEvtBit(0x235) == 0) { + if (daNpcT_chkEvtBit(0xae) == 0 && daNpcT_chkTmpBit(0x1b) != 0) { + field_0xe30 = 4; + } else { + if ((chkSitMotion() || field_0x1002 != 0) && + (((daNpcT_chkEvtBit(0x235) == 0 && daNpcT_chkEvtBit(0x87) == 0) && + daNpcT_chkEvtBit(0x10) != 0) && eventInfo.chkCondition(1)) + ) { + field_0xe30 = 3; + } + } + } + break; + case 2: + if (field_0xe25 == 0) { + daNpcT_getDistTableIdx(field_0xff0, field_0xff4); + // if (chkFindWolf(field_0xd78.y, daNpcT_getDistTableIdx(field_0xff0, field_0xff4) & -1, field_0xfec, + // 500.0f, 180.0f, 300.0f, -300.0f, 1)) { + // field_0xe30 = 8; + // } + } + break; + } + return 0; } /* ############################################################################################## */ @@ -1784,8 +2265,9 @@ COMPILER_STRIP_GATE(0x80A1A498, &lit_6306); #pragma pop /* 80A1856C-80A18B74 003F4C 0608+00 1/0 0/0 0/0 .text talkwithBou__13daNpc_Jagar_cFPv */ -void daNpc_Jagar_c::talkwithBou(void* param_0) { +int daNpc_Jagar_c::talkwithBou(void* param_0) { // NONMATCHING + return 0; } /* 80A18B74-80A18F28 004554 03B4+00 3/0 0/0 0/0 .text talk__13daNpc_Jagar_cFPv */ @@ -1795,7 +2277,7 @@ int daNpc_Jagar_c::talk(void* param_0) { return 0; } if (mType == TYPE_1) { - daNpc_Bou_c* this_00 = static_cast(field_0xf94.getActorP()); + daNpc_Bou_c* this_00 = static_cast(mActorMngr[2].getActorP()); if (this_00 && this_00->getType() == TYPE_1 && field_0xd08.checkStagger() != 0) { if (field_0xb50.getNo() != 10) { field_0xb50.setNo(1, -1, 1, 0); From 0b556e5d7b4b4faaf5f6967001d1325bf6cd531e Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Sun, 23 Feb 2025 18:26:29 -0500 Subject: [PATCH 24/41] little cleanup --- include/d/actor/d_a_npc_jagar.h | 12 ++++++------ src/d/actor/d_a_alink.cpp | 2 +- src/d/actor/d_a_npc_jagar.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index b0ec8ab3858..48d6829bc07 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -12,7 +12,7 @@ * */ -class daNpc_Bou_c; // For action method? +class daNpc_Bou_c; // Temporary class daNpc_Jagar_c : public daNpcT_c { public: @@ -76,8 +76,8 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A1A27C */ s32 getHeadJointNo(); /* 80A1A284 */ s32 getNeckJointNo(); /* 80A1A28C */ s32 getBackboneJointNo(); - /* 80A1A294 */ int checkChangeJoint(int param_1) { return param_1 == 4; } - /* 80A1A2A4 */ int checkRemoveJoint(int param_1) { return param_1 == 8; } + /* 80A1A294 */ bool checkChangeJoint(int param_1) { return param_1 == 4; } + /* 80A1A2A4 */ bool checkRemoveJoint(int param_1) { return param_1 == 8; } /* 80A1A2B4 */ s32 getFootLJointNo(); /* 80A1A2BC */ s32 getFootRJointNo(); @@ -104,13 +104,13 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0FF0 */ int field_0xff0; /* 0x0FF4 */ int field_0xff4; /* 0x1001 */ u8 field_0x1001; - /* 0x1002 */ u8 field_0x1002; // Not sure if u8 - /* 0x1003 */ u8 field_0x1003; // CutAnger u8 + /* 0x1002 */ u8 field_0x1002; + /* 0x1003 */ u8 field_0x1003; /* 0x1004 */ u8 field_0x1004; /* 0x1008 */ int field_0x1008; }; -// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); +// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); // Temporary omission class daNpc_Jagar_Param_c { public: diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index 7319b0c917b..9b86a430545 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -10309,7 +10309,7 @@ void daAlink_c::setBgCheckParam() { mAcchCir[0].SetWallH(-50.0f); mAcchCir[1].SetWallH(-25.0f); mAcchCir[2].SetWallH(0.0f); - mAcchCir[0].35.0f); + mAcchCir[0].SetWallR(35.0f); } else if (checkModeFlg(0x1000000)) { if (mProcID == PROC_WOLF_LIE_AUTO_MOVE) { mAcchCir[0].SetWallR(11.655f); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 2182e118f8b..b55c8ccc912 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -16,7 +16,7 @@ #include "d/d_particle_copoly.h" #include "d/d_bg_s_acch.h" #include "d/d_cc_d.h" -#include "d/actor/d_a_npc_bou.h" // For action method? +#include "d/actor/d_a_npc_bou.h" // Temporary - will be removed #include "dol2asm.h" #include "d/d_meter2_info.h" #include "d/d_meter_button.h" From b71d4218c5d7687cdb393173dcb5bf25fde791f0 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Sun, 23 Feb 2025 18:31:19 -0500 Subject: [PATCH 25/41] Fixed return type discrepancy --- include/d/actor/d_a_npc_jagar.h | 2 +- src/d/actor/d_a_npc_jagar.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index b0ec8ab3858..1b1772310ff 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -41,7 +41,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A153E8 */ void setParam(); /* 80A155E4 */ bool checkChangeEvt(); /* 80A15714 */ void setAfterTalkMotion(); - /* 80A157B4 */ void srchActors(); + /* 80A157B4 */ int srchActors(); /* 80A158A0 */ bool evtTalk(); /* 80A15940 */ bool evtCutProc(); /* 80A15A08 */ void action(); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 2182e118f8b..11ab1b506c9 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1160,7 +1160,7 @@ void daNpc_Jagar_c::setAfterTalkMotion() { } /* 80A157B4-80A158A0 001194 00EC+00 1/1 0/0 0/0 .text srchActors__13daNpc_Jagar_cFv */ -void daNpc_Jagar_c::srchActors() { +int daNpc_Jagar_c::srchActors() { switch(mType) { case TYPE_0: if (!mActorMngr[1].getActorP()) { @@ -1180,6 +1180,7 @@ void daNpc_Jagar_c::srchActors() { case TYPE_2: break; } + return 0; // Temporary Placeholder } /* 80A158A0-80A15940 001280 00A0+00 1/0 0/0 0/0 .text evtTalk__13daNpc_Jagar_cFv */ From 5d670d72827545634efcd632bbb012fb9c5e3293 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Sun, 23 Feb 2025 19:45:44 -0500 Subject: [PATCH 26/41] Fixed *other* return type issues & variable names for Jagar --- include/d/actor/d_a_npc_jagar.h | 10 +- src/d/actor/d_a_npc_jagar.cpp | 277 ++++++++++++++++---------------- 2 files changed, 144 insertions(+), 143 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index ca10870e072..afcedc91b79 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -39,11 +39,11 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A15198 */ void reset(); /* 80A15364 */ void afterJntAnm(int); /* 80A153E8 */ void setParam(); - /* 80A155E4 */ bool checkChangeEvt(); + /* 80A155E4 */ BOOL checkChangeEvt(); /* 80A15714 */ void setAfterTalkMotion(); /* 80A157B4 */ int srchActors(); - /* 80A158A0 */ bool evtTalk(); - /* 80A15940 */ bool evtCutProc(); + /* 80A158A0 */ BOOL evtTalk(); + /* 80A15940 */ BOOL evtCutProc(); /* 80A15A08 */ void action(); /* 80A15CA4 */ void beforeMove(); /* 80A15D68 */ void setAttnPos(); @@ -76,8 +76,8 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A1A27C */ s32 getHeadJointNo(); /* 80A1A284 */ s32 getNeckJointNo(); /* 80A1A28C */ s32 getBackboneJointNo(); - /* 80A1A294 */ bool checkChangeJoint(int param_1) { return param_1 == 4; } - /* 80A1A2A4 */ bool checkRemoveJoint(int param_1) { return param_1 == 8; } + /* 80A1A294 */ BOOL checkChangeJoint(int param_1) { return param_1 == 4; } + /* 80A1A2A4 */ BOOL checkRemoveJoint(int param_1) { return param_1 == 8; } /* 80A1A2B4 */ s32 getFootLJointNo(); /* 80A1A2BC */ s32 getFootRJointNo(); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 03067d6058b..be0bfd13445 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -842,7 +842,7 @@ int daNpc_Jagar_c::create() { ); mType = getType(); field_0xa7c = getFlowNodeNo(); - field_0xa89 = 0; + // mTwilight = 0; /* WIP */ int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (rv == cPhs_COMPLEATE_e) { // OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, @@ -858,20 +858,20 @@ int daNpc_Jagar_c::create() { J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); - field_0x580.init(¤t.pos, &eyePos, 3, 1); - field_0x9c0.init(&field_0x68c, 60.0f, 0.0f); + mSound.init(¤t.pos, &eyePos, 3, 1); + field_0x9c0.init(&mAcch, 60.0f, 0.0f); reset(); - field_0x68c.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, + mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), fopAcM_GetShapeAngle_p(this)); - field_0x864.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); + mCcStts.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); mCyl1.Set(mCcDCyl); // <-- Check value?? - mCyl1.SetStts(&field_0x864); + mCyl1.SetStts(&mCcStts); mCyl1.SetTgHitCallback(tgHitCallBack); - field_0x68c.CrrPos(dComIfG_Bgsp()); - field_0x930 = field_0x68c.m_gnd; - field_0xdf4 = field_0x68c.GetGroundH(); - if (field_0xdf4 != -1e9f) { + mAcch.CrrPos(dComIfG_Bgsp()); + mGndChk = mAcch.m_gnd; + mGroundH = mAcch.GetGroundH(); + if (mGroundH != -1e9f) { setEnvTevColor(); setRoomNo(); } @@ -908,7 +908,7 @@ int daNpc_Jagar_c::CreateHeap() { if (modelData == NULL) { return 0; } - mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &field_0x580, + mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000, 0x11020284); if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { return 0; @@ -918,8 +918,8 @@ int daNpc_Jagar_c::CreateHeap() { modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack); } model->setUserArea((u32)this); - field_0x96c = new daNpcT_MatAnm_c(); - if (field_0x96c == NULL) { + mpMatAnm = new daNpcT_MatAnm_c(); + if (mpMatAnm == NULL) { return 0; } if (setFaceMotionAnm(1, false) && setMotionAnm(0, 0.0f, 0)) @@ -948,9 +948,9 @@ int daNpc_Jagar_c::Execute() { /* 80A14FA0-80A15034 000980 0094+00 1/1 0/0 0/0 .text Draw__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::Draw() { - if (field_0x96c != NULL) { + if (mpMatAnm != NULL) { J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); - modelData->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(field_0x96c); + modelData->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(mpMatAnm); } return daNpcT_c::draw(0, 0, field_0xde8, NULL, 100.0f, 0, 0, 0); } @@ -1011,8 +1011,8 @@ int daNpc_Jagar_c::isDelete() { void daNpc_Jagar_c::reset() { csXyz acStack_20; int iVar1 = (u8*)&field_0x1008 - (u8*)&field_0xfd4; - if (field_0x96c != NULL) { - field_0x96c->initialize(); + if (mpMatAnm != NULL) { + mpMatAnm->initialize(); } initialize(); for (int i = 0; i < 4; i++) { @@ -1096,7 +1096,7 @@ void daNpc_Jagar_c::setParam() { // mAcchCir[0].SetWallR(); scale.set(daNpc_Jagar_Param_c::m.field_0x08, daNpc_Jagar_Param_c::m.field_0x08, daNpc_Jagar_Param_c::m.field_0x08); - field_0x864.SetWeight(daNpc_Jagar_Param_c::m.field_0x10); + mCcStts.SetWeight(daNpc_Jagar_Param_c::m.field_0x10); field_0xdec = daNpc_Jagar_Param_c::m.field_0x14; field_0xdf0 = daNpc_Jagar_Param_c::m.field_0x1c; field_0xdf8 = daNpc_Jagar_Param_c::m.field_0x50; @@ -1110,12 +1110,12 @@ void daNpc_Jagar_c::setParam() { /* 80A155E4-80A15714 000FC4 0130+00 1/0 0/0 0/0 .text checkChangeEvt__13daNpc_Jagar_cFv */ -bool daNpc_Jagar_c::checkChangeEvt() { +int daNpc_Jagar_c::checkChangeEvt() { if (!chkAction(&daNpc_Jagar_c::talk)) { field_0xe2e[0] = 0; if (dComIfGp_event_chkTalkXY()) { if (dComIfGp_evmng_ChkPresentEnd()) { - field_0xe30 = 1; + mEvtNo = 1; evtChange(); } return true; @@ -1123,13 +1123,13 @@ bool daNpc_Jagar_c::checkChangeEvt() { switch (mType) { case TYPE_0: if (daNpcT_chkEvtBit(0x1c) && chkChuMotion()) { - field_0xe30 = 2; + mEvtNo = 2; evtChange(); return true; } case TYPE_1: if (field_0xfec < 4) { - field_0xe30 = 6; + mEvtNo = 6; evtChange(); return true; } @@ -1143,7 +1143,7 @@ bool daNpc_Jagar_c::checkChangeEvt() { /* 80A15714-80A157B4 0010F4 00A0+00 1/0 0/0 0/0 .text setAfterTalkMotion__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setAfterTalkMotion() { int iVar2 = 8; - switch(field_0xb50.getNo()) { + switch(mFaceMotionSeqMngr.getNo()) { case 0: iVar2 = 6; break; @@ -1156,7 +1156,7 @@ void daNpc_Jagar_c::setAfterTalkMotion() { iVar2 = 5; break; } - field_0xb50.setNo(iVar2, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(iVar2, -1.0f, 0, 0); } /* 80A157B4-80A158A0 001194 00EC+00 1/1 0/0 0/0 .text srchActors__13daNpc_Jagar_cFv */ @@ -1184,7 +1184,7 @@ int daNpc_Jagar_c::srchActors() { } /* 80A158A0-80A15940 001280 00A0+00 1/0 0/0 0/0 .text evtTalk__13daNpc_Jagar_cFv */ -bool daNpc_Jagar_c::evtTalk() { +BOOL daNpc_Jagar_c::evtTalk() { if (chkAction(&daNpc_Jagar_c::talk)) { (this->*field_0xfe0)(NULL); } else { @@ -1194,7 +1194,7 @@ bool daNpc_Jagar_c::evtTalk() { } /* 80A15940-80A15A08 001320 00C8+00 1/0 0/0 0/0 .text evtCutProc__13daNpc_Jagar_cFv */ -bool daNpc_Jagar_c::evtCutProc() { +BOOL daNpc_Jagar_c::evtCutProc() { int staffId = dComIfGp_getEventManager().getMyStaffId("Jagar", this, -1); if (staffId != -1) { field_0xdac = staffId; @@ -1215,18 +1215,18 @@ void daNpc_Jagar_c::action() { cCcD_Obj* hitObj = mCyl1.GetTgHitObj(); daNpc_Bou_c* this_00 = static_cast(mActorMngr[2].getActorP()); if (this_00 && this_00->getType() == TYPE_1 && field_0xd08.checkStagger() == 0) { - if (field_0xb50.getNo() != 1) { - field_0xb50.setNo(1, -1, 1, 0); + if (mFaceMotionSeqMngr.getNo() != 1) { + mFaceMotionSeqMngr.setNo(1, -1, 1, 0); } - if (field_0xb74.getNo() != 3) { - field_0xb74.setNo(3, -1, 1, 0); + if (mMotionSeqMngr.getNo() != 3) { + mMotionSeqMngr.setNo(3, -1, 1, 0); } } if (hitObj->ChkAtType(AT_TYPE_THROW_OBJ) && mType != TYPE_2) { - field_0xd08.setParam(this, hitActor, field_0xd78.y); + field_0xd08.setParam(this, hitActor, mCurAngle.y); setDamage(0, 8, 0); - field_0xdb8 = 0; - field_0xba8.lookNone(1); + mDamageTimerStart = 0; + mJntAnm.lookNone(1); } } if (field_0xd08.checkRebirth()) { @@ -1246,7 +1246,7 @@ void daNpc_Jagar_c::action() { // uVar2 = base.parameters; // } // if (uVar2 == 2) { - // field_0xe30 = 5; + // mEvtNo = 5; // } // } } @@ -1257,7 +1257,7 @@ void daNpc_Jagar_c::beforeMove() { if (checkHide()) { fopAcM_OnStatus(this, 0x8000000); } - if (checkHide() || field_0xe2b != 0) { + if (checkHide() || mNoDraw != 0) { attention_info.flags = 0; } } @@ -1430,26 +1430,26 @@ static u8 prtclScl[12]; void daNpc_Jagar_c::setAttnPos() { cXyz cStack_3c(-10.0f, 10.0f, 0.0f); field_0xd08.calc(0); - f32 dVar8 = cM_s2rad(field_0xd78.y - field_0xd7e.y); + f32 dVar8 = cM_s2rad(mCurAngle.y - field_0xd7e.y); J3DModel* model = mpMorf[0]->getModel(); - field_0xba8.setParam(this, model, &cStack_3c, getBackboneJointNo(), getNeckJointNo(), + mJntAnm.setParam(this, model, &cStack_3c, getBackboneJointNo(), getNeckJointNo(), getHeadJointNo(), daNpc_Jagar_Param_c::m.field_0x24, daNpc_Jagar_Param_c::m.field_0x20, daNpc_Jagar_Param_c::m.field_0x2c, daNpc_Jagar_Param_c::m.field_0x28, daNpc_Jagar_Param_c::m.field_0x34, daNpc_Jagar_Param_c::m.field_0x30, daNpc_Jagar_Param_c::m.field_0x3c, daNpc_Jagar_Param_c::m.field_0x38, daNpc_Jagar_Param_c::m.field_0x40, dVar8, NULL); - field_0xba8.calcJntRad(0.2f, 1.0f, dVar8); + mJntAnm.calcJntRad(0.2f, 1.0f, dVar8); setMtx(); mDoMtx_stack_c::copy(mpMorf[0]->getModel()->getAnmMtx(getHeadJointNo())); mDoMtx_stack_c::multVec(&cStack_3c, &eyePos); - field_0xba8.setEyeAngleX(eyePos, 1.0f, 0); - field_0xba8.setEyeAngleY(eyePos, field_0xd78.y, 1, 1.0f, 0); + mJntAnm.setEyeAngleX(eyePos, 1.0f, 0); + mJntAnm.setEyeAngleY(eyePos, mCurAngle.y, 1, 1.0f, 0); cStack_3c.set(0.0f, 0.0f, 10.0f); cStack_3c.y = daNpc_Jagar_Param_c::m.field_0x00; if (field_0x1004 != 0) { cStack_3c.set(0.0f, 100.0f, -60.0f); } - mDoMtx_stack_c::YrotS(field_0xd78.y); + mDoMtx_stack_c::YrotS(mCurAngle.y); mDoMtx_stack_c::multVec(&cStack_3c, &cStack_3c); attention_info.position = current.pos + cStack_3c; static cXyz prtclScl(1.0f, 1.0f, 1.0f); @@ -1507,7 +1507,7 @@ void daNpc_Jagar_c::setCollision() { if (field_0xe25 == 0) { u32 tgType = -0x27040201; u32 tgSPrm = 0x1f; - if (field_0xa89 != 0) { + if (mTwilight) { tgType = 0; tgSPrm = 0; } else { @@ -1527,7 +1527,7 @@ void daNpc_Jagar_c::setCollision() { cylHeight = 70.0f; cylRadius = 90.0f; } - mDoMtx_stack_c::YrotS(field_0xd78.y); + mDoMtx_stack_c::YrotS(mCurAngle.y); mDoMtx_stack_c::multVec(&cStack_48, &cStack_48); cStack_48 += current.pos; mCyl1.SetH(cylHeight); @@ -1599,12 +1599,12 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { if (dComIfGp_getEventManager().getIsAddvance(param_0)) { switch (iVar4) { case 0: - field_0xb50.setNo(8, 0.0f, 0, 0); - field_0xb74.setNo(2, 0.0f, 0, 0); - field_0xba8.lookNone(1); + mFaceMotionSeqMngr.setNo(8, 0.0f, 0, 0); + mMotionSeqMngr.setNo(2, 0.0f, 0, 0); + mJntAnm.lookNone(1); field_0x1003 = 1; // setAngle(field_0x4b6); - initTalk(field_0xa7c, NULL); + // initTalk(field_0xa7c, NULL); break; case 2: break; @@ -1668,7 +1668,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { dComIfGp_getEvent().setPt2(mActorMngr[0].getActorP()); break; case 1: - initTalk(field_0xa7c, NULL); + // initTalk(field_0xa7c, NULL); break; case 7: dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); @@ -1684,32 +1684,32 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { switch (iVar12) { case 0: - field_0xba8.lookNone(0); - if (field_0xb74.getNo() == 10) { - // if (field_0xb74.getStepNo() < 1) { + mJntAnm.lookNone(0); + if (mMotionSeqMngr.getNo() == 10) { + // if (mMotionSeqMngr.getStepNo() < 1) { // return 0; // } - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0f, 0, 0); rv = 1; } - if (field_0xb74.getNo() != 0) { + if (mMotionSeqMngr.getNo() != 0) { return 0; } return 1; case 1: - field_0xba8.lookPlayer(0); - if (field_0xdc8 == field_0xd78.y) { + mJntAnm.lookPlayer(0); + if (field_0xdc8 == mCurAngle.y) { return 1; } - step(field_0xdc8, 8, 0xe, 0xf, 0); + // step(field_0xdc8, 8, 0xe, 0xf, 0); return 0; case 3: case 4: case 5: if (mActorMngr[0].getActorP()) { field_0xd6c.setall(0.0); - mDoMtx_stack_c::YrotS(field_0xd78.y); + mDoMtx_stack_c::YrotS(mCurAngle.y); mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); field_0xd6c += current.pos; // csXyz local_58(current.pos.z, current.pos.x, 0); @@ -1720,7 +1720,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { case 7: if (mActorMngr[1].getActorP()) { field_0xd6c.setall(0.0); - mDoMtx_stack_c::YrotS(field_0xd78.y); + mDoMtx_stack_c::YrotS(mCurAngle.y); // PSMTXMultVec(reinterpret_cast(&mDoMtx_stack_c::now), (const Vec *)&field_0xd6c, (Vec *)&field_0xd6c); // csXyz local_70(current.pos.z, current.pos.x, 0); // PSVECSquareDistance(); @@ -1735,7 +1735,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { // } return 0; } - if (field_0xba8.getMode() != 1) { + if (mJntAnm.getMode() != 1) { mFlow.remove(); } @@ -1751,18 +1751,18 @@ int daNpc_Jagar_c::cutAnger(int param_0) { } if ((((dComIfGp_getEventManager().getIsAddvance(param_0)) && local_b4 != 1) && local_b4 < 1) && local_b4 > -1) { // if (field_0xb58 != 8) { - // field_0xb50.setNo(8, 0.0, 0, 0); + // mFaceMotionSeqMngr.setNo(8, 0.0, 0, 0); // } // if (field_0xb7c != 0) { - // field_0xb74.setNo(0, 0.0, 0, 0); + // mMotionSeqMngr.setNo(0, 0.0, 0, 0); // } field_0x1003 = 0; s16 sVar3 = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)); // Correct? setAngle(sVar3); - initTalk(field_0xa7c, NULL); + // initTalk(field_0xa7c, NULL); } if (local_b4 == 1) { - field_0xba8.lookNone(0); + mJntAnm.lookNone(0); // if (field_0x4b6 == field_0xd7a) { // rv = 1; // } else { @@ -1770,7 +1770,7 @@ int daNpc_Jagar_c::cutAnger(int param_0) { // } } else if (local_b4 < 1 && local_b4 > -1) { // if (field_0xce0 != 1) { - // field_0xba8.lookPlayer(0); + // mJntAnm.lookPlayer(0); // if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { // rv = 1; // } @@ -1803,7 +1803,7 @@ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { if (home.angle.GetX() != -1) { uVar4 = home.angle.GetX(); } - initTalk(uVar4, &Jaggle); + // initTalk(uVar4, &Jaggle); } if (talkProc(NULL, 0, &Jaggle, 0) && mFlow.checkEndFlow()) { rv = 1; @@ -1855,46 +1855,46 @@ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { if (dComIfGp_getEventManager().getIsAddvance(param_0)) { switch (iVar8) { case 0: - if (field_0xb50.getNo() != 8) { - field_0xb50.setNo(0, 8, -1.0f, 0); + if (mFaceMotionSeqMngr.getNo() != 8) { + mFaceMotionSeqMngr.setNo(0, 8, -1.0f, 0); } - if (field_0xb74.getNo() != 5) { - field_0xb74.setNo(0, 5, -1.0f, 0); + if (mMotionSeqMngr.getNo() != 5) { + mMotionSeqMngr.setNo(0, 5, -1.0f, 0); } - initTalk(0xd7, NULL); + // initTalk(0xd7, NULL); break; // case 2: - // // field_0xba8.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); - // if (field_0xba8.getMode() == 2) { + // // mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + // if (mJntAnm.getMode() == 2) { // bVar1 = false; // } else { - // // field_0xba8.setMode(2, 1); + // // mJntAnm.setMode(2, 1); // bVar1 = true; // } // if (bVar1) { - // field_0xba8.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + // mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); // } // break; case 1: dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); - // if (field_0xb50.getNo() != 8) { - // // field_0xb50.setNo(0, 8, -1.0f, 0); + // if (mFaceMotionSeqMngr.getNo() != 8) { + // // mFaceMotionSeqMngr.setNo(0, 8, -1.0f, 0); // } - // if (field_0xb74.getNo() != 5) { - // // field_0xb74.setNo(0, 5, -1.0f, 0); + // if (mMotionSeqMngr.getNo() != 5) { + // // mMotionSeqMngr.setNo(0, 5, -1.0f, 0); // } - // if (field_0xba8.getMode() == 2) { + // if (mJntAnm.getMode() == 2) { // bVar1 = false; // } else { - // // field_0xba8.setMode(2, 1); + // // mJntAnm.setMode(2, 1); // bVar1 = true; // } // if (bVar1) { - // field_0xba8.lookActor(mActorMngr[1].getActorP(), 0.0f, 0); + // mJntAnm.lookActor(mActorMngr[1].getActorP(), 0.0f, 0); // } // break; // case 4: - // field_0xe30 = 7; + // mEvtNo = 7; // evtChange(); } } @@ -1902,21 +1902,21 @@ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { case 0: break; case 1: - // if (field_0xba8.getMode() == 2) { + // if (mJntAnm.getMode() == 2) { // bVar1 = false; // } else { - // field_0xba8.setMode(2, 1); + // mJntAnm.setMode(2, 1); // bVar1 = true; // } if (bVar1) { - field_0xba8.lookActor(mActorMngr[1].getActorP(), 0.0f, 0); + mJntAnm.lookActor(mActorMngr[1].getActorP(), 0.0f, 0); } break; case 2: - field_0xba8.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); break; // default: - // // field_0xe30 = 7; + // // mEvtNo = 7; // evtChange(); } @@ -1947,16 +1947,16 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { if (dComIfGp_getEventManager().getIsAddvance(param_0)) { switch (uVar6) { case 0: - field_0xb50.setNo(1, -1.0f, 0, 0); - field_0xb74.setNo(7, -1.0f, 0, 0); - field_0x580.startCreatureVoice(Z2SE_JAGA_V_SURPRISE, -1); + mFaceMotionSeqMngr.setNo(1, -1.0f, 0, 0); + mMotionSeqMngr.setNo(7, -1.0f, 0, 0); + mSound.startCreatureVoice(Z2SE_JAGA_V_SURPRISE, -1); field_0xdc8 = fopAcM_searchActorAngleY(this, daPy_getPlayerActorClass()); - mStepNo = 0; + mStepMode = 0; dComIfGp_getVibration().StartShock(9, 15, cXyz(0.0f, 1.0f, 0.0f)); break; case 2: - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(15, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(15, -1.0f, 0, 0); current.angle.y = home.angle.y; if (field_0xdc8 - home.angle.y < 1) { current.angle.y = current.angle.y + 0x4000; @@ -1966,13 +1966,13 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { field_0xdc4 = iVar4; break; case 3: - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(5, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(5, -1.0f, 0, 0); // setPos(cStack_44); setAngle(home.angle.y); speedF = 0; speed.setall(0.0f); - field_0x68c.ClrWallNone(); + mAcch.ClrWallNone(); field_0xe25 = 1; break; default: @@ -1981,19 +1981,19 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { } switch (uVar6) { case 0: - field_0xba8.lookPlayer(0); - if (field_0xdc8 == field_0xd78.y) { + mJntAnm.lookPlayer(0); + if (field_0xdc8 == mCurAngle.y) { rv = 1; } else { - step(field_0xdc8, -1, -1, 15, 0); + // step(field_0xdc8, -1, -1, 15, 0); } break; case 1: - field_0xba8.lookPlayer(0); + mJntAnm.lookPlayer(0); rv = 1; break; case 2: - field_0xba8.lookPlayer(0); + mJntAnm.lookPlayer(0); cLib_chaseS(&shape_angle.y, current.angle.y, 0x800); cLib_chaseF(&speedF, 16.0f, 0.5f); if (cLib_calcTimer(&field_0xdc4) == 0) { @@ -2001,11 +2001,11 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { } break; case 3: - field_0xba8.lookPlayer(0); + mJntAnm.lookPlayer(0); rv = 1; break; case 10: - if (field_0xb74.getStepNo() > 0) { + if (mMotionSeqMngr.getStepNo() > 0) { rv = 1; } break; @@ -2064,7 +2064,7 @@ int daNpc_Jagar_c::chkChuMotion() { /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkToMotion() { int rv = 0; - if (field_0xb74.getNo() == 10 || field_0xb74.getNo() == 11 || field_0xb74.getNo() == 12 || field_0xb74.getNo() == 13) { + if (mMotionSeqMngr.getNo() == 10 || mMotionSeqMngr.getNo() == 11 || mMotionSeqMngr.getNo() == 12 || mMotionSeqMngr.getNo() == 13) { rv = 1; } rv = rv & ((1U << 8) - 1); @@ -2124,36 +2124,36 @@ int daNpc_Jagar_c::wait(void* param_0) { switch (field_0x1004) { case 0: if (field_0x1003 == 2) { - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(10, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(10, -1.0f, 0, 0); } else { if (mType == TYPE_2) { - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(11, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(11, -1.0f, 0, 0); } else { - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0f, 0, 0); } field_0x1003 = 0; } break; case 1: if (field_0x1003 == 2) { - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(11, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(11, -1.0f, 0, 0); } else { - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(2, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(2, -1.0f, 0, 0); field_0x1003 = 1; } break; case 2: if (field_0x1003 == 1) { - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(12, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(12, -1.0f, 0, 0); } else if (field_0x1003 == 0) { - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(13, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(13, -1.0f, 0, 0); } } field_0xe22 = 2; @@ -2162,22 +2162,22 @@ int daNpc_Jagar_c::wait(void* param_0) { switch (field_0x1004) { case 0: if (mType == TYPE_2) { - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(17, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(17, -1.0f, 0, 0); } else { - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(0, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0f, 0, 0); } field_0x1003 = 0; break; case 1: - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(2, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(2, -1.0f, 0, 0); field_0x1003 = 1; break; case 2: - field_0xb50.setNo(8, -1.0f, 0, 0); - field_0xb74.setNo(3, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(3, -1.0f, 0, 0); } field_0xe22 = 2; } @@ -2198,13 +2198,13 @@ int daNpc_Jagar_c::wait(void* param_0) { } if (daNpcT_chkEvtBit(0x235) == 0) { if (daNpcT_chkEvtBit(0xae) == 0 && daNpcT_chkTmpBit(0x1b) != 0) { - field_0xe30 = 4; + mEvtNo = 4; } else { if ((chkSitMotion() || field_0x1002 != 0) && (((daNpcT_chkEvtBit(0x235) == 0 && daNpcT_chkEvtBit(0x87) == 0) && daNpcT_chkEvtBit(0x10) != 0) && eventInfo.chkCondition(1)) ) { - field_0xe30 = 3; + mEvtNo = 3; } } } @@ -2212,9 +2212,9 @@ int daNpc_Jagar_c::wait(void* param_0) { case 2: if (field_0xe25 == 0) { daNpcT_getDistTableIdx(field_0xff0, field_0xff4); - // if (chkFindWolf(field_0xd78.y, daNpcT_getDistTableIdx(field_0xff0, field_0xff4) & -1, field_0xfec, + // if (chkFindWolf(mCurAngle.y, daNpcT_getDistTableIdx(field_0xff0, field_0xff4) & -1, field_0xfec, // 500.0f, 180.0f, 300.0f, -300.0f, 1)) { - // field_0xe30 = 8; + // mEvtNo = 8; // } } break; @@ -2280,15 +2280,16 @@ int daNpc_Jagar_c::talk(void* param_0) { if (mType == TYPE_1) { daNpc_Bou_c* this_00 = static_cast(mActorMngr[2].getActorP()); if (this_00 && this_00->getType() == TYPE_1 && field_0xd08.checkStagger() != 0) { - if (field_0xb50.getNo() != 10) { - field_0xb50.setNo(1, -1, 1, 0); + if (mFaceMotionSeqMngr.getNo() != 10) { + mFaceMotionSeqMngr.setNo(1, -1, 1, 0); } - if (field_0xb74.getNo() != 4) { - field_0xb74.setNo(4, -1, 1, 0); + if (mMotionSeqMngr.getNo() != 4) { + mMotionSeqMngr.setNo(4, -1, 1, 0); } } } } + return 0; // Placeholder } /* 80A18F28-80A18F48 004908 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Create__FPv */ @@ -2479,9 +2480,9 @@ static int daNpc_Jagar_IsDelete(void* i_this) { // } /* 80A19F98-80A19F9C 005978 0004+00 1/0 0/0 0/0 .text afterMoved__8daNpcT_cFv */ -void daNpcT_c::afterMoved() { - /* empty function */ -} +// void daNpcT_c::afterMoved() { +// /* empty function */ +// } // /* 80A19F9C-80A19FA4 00597C 0008+00 1/0 0/0 0/0 .text chkXYItems__8daNpcT_cFv */ // // bool daNpcT_c::chkXYItems() { From 443bfd3bf212a4c1aecfcdc3da4622f240da7ec8 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:00:01 -0500 Subject: [PATCH 27/41] Jagar talkWithBou work --- include/d/actor/d_a_npc_jagar.h | 3 + src/d/actor/d_a_npc_jagar.cpp | 203 ++++++++++++++++++++++++++------ 2 files changed, 169 insertions(+), 37 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index afcedc91b79..e20ab381c12 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -103,10 +103,13 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0FEC */ int field_0xfec; /* 0x0FF0 */ int field_0xff0; /* 0x0FF4 */ int field_0xff4; + /* 0x0FF8 */ int field_0xff8; + /* 0x1000 */ u8 field_0x1000; /* 0x1001 */ u8 field_0x1001; /* 0x1002 */ u8 field_0x1002; /* 0x1003 */ u8 field_0x1003; /* 0x1004 */ u8 field_0x1004; + /* 0x1005 */ u8 field_0x1005; /* 0x1008 */ int field_0x1008; }; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index be0bfd13445..cc4dd7cf6a1 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -2224,51 +2224,180 @@ int daNpc_Jagar_c::wait(void* param_0) { /* ############################################################################################## */ /* 80A1A484-80A1A488 000154 0004+00 0/1 0/0 0/0 .rodata @6301 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6301 = -300.0f; -COMPILER_STRIP_GATE(0x80A1A484, &lit_6301); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6301 = -300.0f; +// COMPILER_STRIP_GATE(0x80A1A484, &lit_6301); +// #pragma pop -/* 80A1A488-80A1A48C 000158 0004+00 0/1 0/0 0/0 .rodata @6302 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6302 = -50.0f; -COMPILER_STRIP_GATE(0x80A1A488, &lit_6302); -#pragma pop +// /* 80A1A488-80A1A48C 000158 0004+00 0/1 0/0 0/0 .rodata @6302 */ +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6302 = -50.0f; +// COMPILER_STRIP_GATE(0x80A1A488, &lit_6302); +// #pragma pop -/* 80A1A48C-80A1A490 00015C 0004+00 0/1 0/0 0/0 .rodata @6303 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6303 = 400.0f; -COMPILER_STRIP_GATE(0x80A1A48C, &lit_6303); -#pragma pop +// /* 80A1A48C-80A1A490 00015C 0004+00 0/1 0/0 0/0 .rodata @6303 */ +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6303 = 400.0f; +// COMPILER_STRIP_GATE(0x80A1A48C, &lit_6303); +// #pragma pop -/* 80A1A490-80A1A494 000160 0004+00 0/1 0/0 0/0 .rodata @6304 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6304 = 45.0f; -COMPILER_STRIP_GATE(0x80A1A490, &lit_6304); -#pragma pop +// /* 80A1A490-80A1A494 000160 0004+00 0/1 0/0 0/0 .rodata @6304 */ +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6304 = 45.0f; +// COMPILER_STRIP_GATE(0x80A1A490, &lit_6304); +// #pragma pop -/* 80A1A494-80A1A498 000164 0004+00 0/1 0/0 0/0 .rodata @6305 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6305 = 135.0f; -COMPILER_STRIP_GATE(0x80A1A494, &lit_6305); -#pragma pop +// /* 80A1A494-80A1A498 000164 0004+00 0/1 0/0 0/0 .rodata @6305 */ +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6305 = 135.0f; +// COMPILER_STRIP_GATE(0x80A1A494, &lit_6305); +// #pragma pop -/* 80A1A498-80A1A49C 000168 0004+00 0/1 0/0 0/0 .rodata @6306 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6306 = 450.0f; -COMPILER_STRIP_GATE(0x80A1A498, &lit_6306); -#pragma pop +// /* 80A1A498-80A1A49C 000168 0004+00 0/1 0/0 0/0 .rodata @6306 */ +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6306 = 450.0f; +// COMPILER_STRIP_GATE(0x80A1A498, &lit_6306); +// #pragma pop /* 80A1856C-80A18B74 003F4C 0608+00 1/0 0/0 0/0 .text talkwithBou__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::talkwithBou(void* param_0) { - // NONMATCHING - return 0; + bool bVar2; + int uVar3; + daNpcT_c *Bo = (daNpcT_c *)mActorMngr[2].getActorP(); + u16 uVar1 = field_0xe22; + switch (field_0xe22) { + case 0: + break; + case 1: + if (field_0xd08.checkStagger() == 0) { + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(5, -1.0f, 0, 0); + field_0xe22 = 2; + } + } + if (field_0xe25 != 0 && daNpcT_chkEvtBit(0xd3) == 0 && (fopAcM_searchActorDistanceXZ(this, daPy_getPlayerActorClass()) > 1800.0f) && field_0xe34 != NULL) { + if (Bo) { + Bo->field_0xe25 = 0; + } + field_0xe25 = 0; + } + if (field_0xe25 != 0) { + fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-200.0f,300.0f,300.0f,400.0f); + goto LAB_80a18a8c; + } + // if (field_0xe25 != 0) { + uVar3 = (int)daNpcT_getDistTableIdx(field_0xff0, field_0xff4) & 0xff; + if (!chkFindWolf(mCurAngle.y, uVar3, field_0xfec, 500.0f, 110.0f, 300.0f, -300.0f, 1)) { + if (Bo) { + if (chkFindWolf(mCurAngle.y, (daNpcT_getDistTableIdx(daNpc_Bou_Param_c::m[84], daNpc_Bou_Param_c::m[80]) & 0xff), + field_0xfec, 500.0f, 110.0f, 300.0f, -300.0f, 1)) { + goto LAB_80a18744; + } + } + } else { +LAB_80a18744: + mEvtNo = 7; + } + if (Bo) { + if (field_0x1005 == 0) { + if (cLib_calcTimer(&field_0xff8) == 0) { + if (field_0xd08.checkStagger() == 0) { + if (mMotionSeqMngr.getNo() == 7 || + mMotionSeqMngr.getNo() == 6 || + mMotionSeqMngr.getNo() == 8) { + if(mMotionSeqMngr.getStepNo() < 1) goto LAB_80a187c4; + bVar2 = true; + } else if (mMotionSeqMngr.getNo() == 5) { + bVar2 = true; + } else { +LAB_80a187c4: + bVar2 = false; + } + } else { + bVar2 = false; + } + if (bVar2) { + if (field_0xd08.checkStagger() == 0) { + if (mMotionSeqMngr.getNo() == 3 || + mMotionSeqMngr.getNo() == 2 || + mMotionSeqMngr.getNo() == 4) { + if(mMotionSeqMngr.getStepNo() < 1) goto LAB_80a18824; + bVar2 = true; + } else if (mMotionSeqMngr.getNo() == 1) { + bVar2 = true; + } else { +LAB_80a18824: + bVar2 = false; + } + } + if (bVar2) { + field_0xff8 = cLib_getRndValue(45.0f, 142.0f); + if (field_0x1000 == 0) { + Bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); + if ((cM_rnd() - 0.5f) <= 0.0f) { + Bo->mMotionSeqMngr.setNo(1, -1.0f, 0, 0); + } else { + Bo->mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(6, -1.0f, 0, 0); + } + } else { + Bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); + Bo->mMotionSeqMngr.setNo(2, -1.0f, 0, 0); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + if ((cM_rnd() - 0.5f) + 0.0f < 0.0f) { + mMotionSeqMngr.setNo(5, -1.0f, 0, 0); + } else { + mMotionSeqMngr.setNo(8, -1.0f, 0, 0); + } + } + } + } + } + } else { + field_0xff8 = 0; + } + } + fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-300.0f,300.0f,450.0f,300.0f); + // if (mActorMngr[2].getActorP() == NULL) { + // mJntAnm.setMode(0, 0); + // mJntAnm.lookNone(0); + // mJntAnm.lookActor(this, -40.0f, 0); + // } else { + // fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-200.0f,300.0f,300.0f,400.0f); + // mJntAnm.lookNone(0); + // } + + // } + // fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-200.0f,300.0f,300.0f,400.0f); + // if (mActorMngr[2].getActorP() == NULL) { + // mJntAnm.lookNone(0); + // mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + // } + // } + // chkFindWolf(mCurAngle.y, (int)daNpcT_getDistTableIdx(field_0xff0, field_0xff4) & 0xff, field_0xfec, 500.0f, 110.0f, 300.0f, -300.0f, 1); + // // if (mActorMngr[2].getActorP()) { + // uVar3 = daNpcT_getDistTableIdx((int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.y, + // (int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.z); + // if (chkFindWolf(mCurAngle.y, (daNpcT_getDistTableIdx((int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.y, + // (int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.z) & 0xff), + // (int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.x, 500.0f, 110.0f, 300.0f, -300.0f, 1) != 0) { + // mEvtNo = 7; + // } + // // } +LAB_80a18a8c: + if (Bo) { + mJntAnm.lookActor((fopAc_ac_c *)Bo, -40.0f, 0); + } else { + mJntAnm.lookNone(0); + } + return 1; } /* 80A18B74-80A18F28 004554 03B4+00 3/0 0/0 0/0 .text talk__13daNpc_Jagar_cFPv */ From 4c4f2cf1e84f33cc80f1de4eb2713032323bd945 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:15:03 -0500 Subject: [PATCH 28/41] Work on Jagar talk --- src/d/actor/d_a_npc_jagar.cpp | 63 +++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index cc4dd7cf6a1..398b77dd958 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -2402,23 +2402,60 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { /* 80A18B74-80A18F28 004554 03B4+00 3/0 0/0 0/0 .text talk__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::talk(void* param_0) { - if (field_0xe22 != 2) { - if (field_0xe22 > 1) { - return 0; - } - if (mType == TYPE_1) { - daNpc_Bou_c* this_00 = static_cast(mActorMngr[2].getActorP()); - if (this_00 && this_00->getType() == TYPE_1 && field_0xd08.checkStagger() != 0) { - if (mFaceMotionSeqMngr.getNo() != 10) { - mFaceMotionSeqMngr.setNo(1, -1, 1, 0); + switch (field_0xe22) { + case 0: + case 1: + if (!field_0xd08.checkStagger()) { + if (mType == TYPE_1) { + daNpc_Bou_c *Bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); + if (Bo && Bo->getType() == TYPE_1 && + (unsigned int)!Bo->field_0xd08.checkStagger() >> 5) { // Bit shift not correct + mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); + if ((cM_rnd() -0.5f) + -10.0f < 0.0f) { + mMotionSeqMngr.setNo(1, -1.0f, 0, 0); + } else { + mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + } + } + switch (field_0xfec) { + case 4: + initTalk(0xd6, NULL); + break; + default: + initTalk(0xd5, NULL); + } + } else { + initTalk(field_0xa7c, NULL); } - if (mMotionSeqMngr.getNo() != 4) { - mMotionSeqMngr.setNo(4, -1, 1, 0); + field_0xe22 = 2; + } + case 2: + if (!field_0xd08.checkStagger()) { + if ((mTwilight == 0 && field_0xdc8 != mCurAngle.y) && + (mType != TYPE_1 && field_0x1003 > 0)) { + if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { + mPlayerActorMngr.entry(daPy_getPlayerActorClass()); + dComIfGp_event_reset(); + field_0xe22 = 3; + } + } + if (mType == TYPE_1) { + mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + } else { + mJntAnm.lookPlayer(0); + } + if (mTwilight == 0 && field_0x1003 == 2) { + mJntAnm.lookNone(0); + break; } + mJntAnm.lookPlayer(0); + step(field_0xdc8, 8, 0xe, 0xf, 0); } - } + case 3: + default: + break; } - return 0; // Placeholder + return 0; } /* 80A18F28-80A18F48 004908 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Create__FPv */ From ebc0662ca26e84f32b023e0c11cf8f9b49c81541 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 26 Feb 2025 18:13:40 -0500 Subject: [PATCH 29/41] Data & function cleanup --- include/d/actor/d_a_npc_jagar.h | 2 + src/d/actor/d_a_npc_jagar.cpp | 862 +++++++++++++++++--------------- 2 files changed, 448 insertions(+), 416 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index e20ab381c12..f78feec1830 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -94,9 +94,11 @@ class daNpc_Jagar_c : public daNpcT_c { static char* mCutNameList[7]; static cutFunc mCutList[7]; private: + /* 0x0E40 */ int field_0xe40; /* 0x0E44 */ dCcD_Cyl mCyl1; /* 0x0F80 */ u8 mType; /* 0x0F84 */ daNpcT_ActorMngr_c mActorMngr[5]; + /* 0x0FAC */ daNpcT_Path_c field_0xfac; /* 0x0FD4 */ actionFunc field_0xfd4; /* 0x0FE0 */ actionFunc field_0xfe0; /* 0x0FE4 */ actionFunc field_0xfe4; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 398b77dd958..691a3e933bb 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -297,28 +297,12 @@ extern "C" void getType__11daNpc_Bou_cFv(); extern "C" u8 const m__17daNpc_Bou_Param_c[156]; extern "C" void __register_global_object(); +UNK_REL_BSS; // // Declarations: // /* ############################################################################################## */ -/* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80A1A49C = ""; -SECTION_DEAD static char const* const stringBase_80A1A49D = "NO_RESPONSE"; -SECTION_DEAD static char const* const stringBase_80A1A4A9 = "CLIMBUP"; -SECTION_DEAD static char const* const stringBase_80A1A4B1 = "NEED_YOUR_HELP"; -SECTION_DEAD static char const* const stringBase_80A1A4C0 = "ANGER"; -SECTION_DEAD static char const* const stringBase_80A1A4C6 = "CONVERSATION_WITH_BOU"; -SECTION_DEAD static char const* const stringBase_80A1A4DC = "CONFIDENTIAL_CONVERSATION"; -SECTION_DEAD static char const* const stringBase_80A1A4F6 = "FIND_WOLF"; -SECTION_DEAD static char const* const stringBase_80A1A500 = "FIND_WOLF_VER2"; -SECTION_DEAD static char const* const stringBase_80A1A50F = "Jagar"; -SECTION_DEAD static char const* const stringBase_80A1A515 = "Jagar1"; -SECTION_DEAD static char const* const stringBase_80A1A51C = "Jagar2"; -SECTION_DEAD static char const* const stringBase_80A1A523 = "Jagar3"; -#pragma pop /* 80A1A548-80A1A554 000000 000C+00 2/2 0/0 0/0 .data cNullVec__6Z2Calc */ SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { @@ -345,7 +329,7 @@ static int l_bmdData[1][2] = { }; /* 80A1A570-80A1A5B8 -00001 0048+00 0/1 0/0 0/0 .data l_evtList */ -SECTION_DATA static daNpcT_evtData_c l_evtList[18] = { +SECTION_DATA static daNpcT_evtData_c l_evtList[9] = { {"", 0}, {"NO_RESPONSE", 0}, {"CLIMBUP", 2}, @@ -366,6 +350,24 @@ static char* l_resNameList[5] = { "Jagar3", }; +/* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ +// #pragma push +// #pragma force_active on +// SECTION_DEAD static char const* const stringBase_80A1A49C = ""; +// SECTION_DEAD static char const* const stringBase_80A1A49D = "NO_RESPONSE"; +// SECTION_DEAD static char const* const stringBase_80A1A4A9 = "CLIMBUP"; +// SECTION_DEAD static char const* const stringBase_80A1A4B1 = "NEED_YOUR_HELP"; +// SECTION_DEAD static char const* const stringBase_80A1A4C0 = "ANGER"; +// SECTION_DEAD static char const* const stringBase_80A1A4C6 = "CONVERSATION_WITH_BOU"; +// SECTION_DEAD static char const* const stringBase_80A1A4DC = "CONFIDENTIAL_CONVERSATION"; +// SECTION_DEAD static char const* const stringBase_80A1A4F6 = "FIND_WOLF"; +// SECTION_DEAD static char const* const stringBase_80A1A500 = "FIND_WOLF_VER2"; +// SECTION_DEAD static char const* const stringBase_80A1A50F = "Jagar"; +// SECTION_DEAD static char const* const stringBase_80A1A515 = "Jagar1"; +// SECTION_DEAD static char const* const stringBase_80A1A51C = "Jagar2"; +// SECTION_DEAD static char const* const stringBase_80A1A523 = "Jagar3"; +// #pragma pop + /* 80A1A5CC-80A1A5D0 000084 0004+00 1/0 0/0 0/0 .data l_loadResPtrn0 */ // SECTION_DATA static u32 l_loadResPtrn0 = 0x010204FF; static s8 l_loadResPtrn0[4] = { @@ -391,8 +393,6 @@ static s8* l_loadResPtrnList[4] = { }; /* 80A1A5EC-80A1A704 0000A4 0118+00 0/1 0/0 0/0 .data l_faceMotionAnmData */ -#pragma push -#pragma force_active on static daNpcT_faceMotionAnmData_c l_faceMotionAnmData[10] = { {-1, 0, 0, 19, 2, 1, 1}, {6, 0, 1, 20, 0, 1, 0}, @@ -405,16 +405,27 @@ static daNpcT_faceMotionAnmData_c l_faceMotionAnmData[10] = { {5, 0, 3, 18, 0, 3, 0}, {6, 2, 3, 19, 2, 3, 0}, }; -#pragma pop /* 80A1A704-80A1A8FC 0001BC 01F8+00 0/1 0/0 0/0 .data l_motionAnmData */ -SECTION_DATA static int l_motionAnmData[140] = { - 10, 2, 1, 16, 0, 1, 65536, 4, 2, 2, 16, 0, 1, 65536, 7, 2, 2, 16, 0, 1, 65536, - 10, 2, 2, 16, 0, 1, 65536, 8, 0, 2, 16, 0, 1, 65536, 9, 0, 2, 16, 0, 1, 65536, - 5, 0, 2, 16, 0, 1, 65536, 11, 0, 2, 16, 0, 1, 65536, 6, 0, 4, 16, 0, 1, 65536, - 9, 0, 1, 16, 0, 1, 65536, 8, 0, 1, 16, 0, 1, 65536, 8, 2, 3, 16, 0, 1, 65536, - 13, 2, 3, 16, 0, 1, 65536, 12, 0, 3, 16, 0, 1, 65536, 14, 2, 3, 16, 0, 1, 65536, - 9, 0, 3, 16, 0, 1, 65536, 11, 0, 3, 16, 0, 1, 65536, 10, 2, 3, 16, 0, 1, 65536, +daNpcT_motionAnmData_c l_motionAnmData[18] = { + {10, 2, 1, 16, 0, 1, 1, 0}, + {4, 2, 2, 16, 0, 1, 1, 0}, + {7, 2, 2, 16, 0, 1, 1, 0}, + {10, 2, 2, 16, 0, 1, 1, 0}, + {8, 0, 2, 16, 0, 1, 1, 0}, + {9, 0, 2, 16, 0, 1, 1, 0}, + {5, 0, 2, 16, 0, 1, 1, 0}, + {11, 0, 2, 16, 0, 1, 1, 0}, + {6, 0, 4, 16, 0, 1, 1, 0}, + {9, 0, 1, 16, 0, 1, 1, 0}, + {8, 0, 1, 16, 0, 1, 1, 0}, + {8, 2, 3, 16, 0, 1, 1, 0}, + {13, 2, 3, 16, 0, 1, 1, 0}, + {12, 0, 3, 16, 0, 1, 1, 0}, + {14, 2, 3, 16, 0, 1, 1, 0}, + {9, 0, 3, 16, 0, 1, 1, 0}, + {11, 0, 3, 16, 0, 1, 1, 0}, + {10, 2, 3, 16, 0, 1, 1, 0}, }; /* 80A1A8FC-80A1A98C 0003B4 0090+00 0/1 0/0 0/0 .data l_faceMotionSequenceData */ @@ -573,7 +584,7 @@ daNpc_Jagar_c::cutFunc daNpc_Jagar_c::mCutList[7] = { // (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x490), // }; -// /* 80A1ABE0-80A1AC10 -00001 0030+00 1/1 0/0 0/0 .data @5660 */ +/* 80A1ABE0-80A1AC10 -00001 0030+00 1/1 0/0 0/0 .data @5660 */ // SECTION_DATA static void* lit_5660[12] = { // (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0xBC), // (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E4), @@ -589,68 +600,39 @@ daNpc_Jagar_c::cutFunc daNpc_Jagar_c::mCutList[7] = { // (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E0), // }; -AUDIO_INSTANCES; - -/* 80A1AC10-80A1AC30 -00001 0020+00 1/0 0/0 0/0 .data daNpc_Jagar_MethodTable */ -static actor_method_class daNpc_Jagar_MethodTable = { - (process_method_func)daNpc_Jagar_Create__FPv, - (process_method_func)daNpc_Jagar_Delete__FPv, - (process_method_func)daNpc_Jagar_Execute__FPv, - (process_method_func)daNpc_Jagar_IsDelete__FPv, - (process_method_func)daNpc_Jagar_Draw__FPv, -}; - -/* 80A1AC30-80A1AC60 -00001 0030+00 0/0 0/0 1/0 .data g_profile_NPC_JAGAR */ -extern actor_process_profile_definition g_profile_NPC_JAGAR = { - fpcLy_CURRENT_e, // mLayerID - 7, // mListID - fpcPi_CURRENT_e, // mListPrio - PROC_NPC_JAGAR, // mProcName - &g_fpcLf_Method.base, // sub_method - sizeof(daNpc_Jagar_c), // mSize - 0, // mSizeOther - 0, // mParameters - &g_fopAc_Method.base, // sub_method - 345, // mPriority - &daNpc_Jagar_MethodTable, // sub_method - 0x00040107, // mStatus - fopAc_NPC_e, // mActorType - fopAc_CULLBOX_CUSTOM_e, // cullType -}; - -// /* 80A1AC60-80A1AC6C 000718 000C+00 2/2 0/0 0/0 .data __vt__11J3DTexNoAnm */ -SECTION_DATA extern void* __vt__11J3DTexNoAnm[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)calc__11J3DTexNoAnmCFPUs, -}; +// // /* 80A1AC60-80A1AC6C 000718 000C+00 2/2 0/0 0/0 .data __vt__11J3DTexNoAnm */ +// SECTION_DATA extern void* __vt__11J3DTexNoAnm[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)calc__11J3DTexNoAnmCFPUs, +// }; -/* 80A1AC6C-80A1AC78 000724 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ -SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12J3DFrameCtrlFv, -}; +// /* 80A1AC6C-80A1AC78 000724 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ +// SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__12J3DFrameCtrlFv, +// }; -/* 80A1AC78-80A1AC9C 000730 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_ObjAcchFv, - (void*)NULL, - (void*)NULL, - (void*)func_80A1A314, - (void*)NULL, - (void*)NULL, - (void*)func_80A1A30C, -}; +// /* 80A1AC78-80A1AC9C 000730 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ +// SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__12dBgS_ObjAcchFv, +// (void*)NULL, +// (void*)NULL, +// (void*)func_80A1A314, +// (void*)NULL, +// (void*)NULL, +// (void*)func_80A1A30C, +// }; -/* 80A1AC9C-80A1ACA8 000754 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ -SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_AcchCirFv, -}; +// /* 80A1AC9C-80A1ACA8 000754 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ +// SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__12dBgS_AcchCirFv, +// }; // /* 80A1ACA8-80A1ACB4 000760 000C+00 3/3 0/0 0/0 .data __vt__10cCcD_GStts */ // SECTION_DATA extern void* __vt__10cCcD_GStts[3] = { @@ -694,19 +676,19 @@ SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { // (void*)__dt__8cM3dGAabFv, // }; -/* 80A1ACF0-80A1ACFC 0007A8 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ -SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGCylFv, -}; +// /* 80A1ACF0-80A1ACFC 0007A8 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ +// SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__8cM3dGCylFv, +// }; -/* 80A1ACFC-80A1AD08 0007B4 000C+00 3/3 0/0 0/0 .data __vt__13daNpcT_Path_c */ -SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__13daNpcT_Path_cFv, -}; +// /* 80A1ACFC-80A1AD08 0007B4 000C+00 3/3 0/0 0/0 .data __vt__13daNpcT_Path_c */ +// SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__13daNpcT_Path_cFv, +// }; /* 80A1AD08-80A1ADCC 0007C0 00C4+00 2/2 0/0 0/0 .data __vt__13daNpc_Jagar_c */ // SECTION_DATA extern void* __vt__13daNpc_Jagar_c[49] = { @@ -763,7 +745,10 @@ SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { /* 80A1470C-80A14858 0000EC 014C+00 1/0 0/0 0/0 .text __dt__13daNpc_Jagar_cFv */ daNpc_Jagar_c::~daNpc_Jagar_c() { - // NONMATCHING + if (mpMorf[0] != 0) { + mpMorf[0]->stopZelAnime(); + } + deleteRes(l_loadResPtrnList[mType], (char const**)l_resNameList); } /* ############################################################################################## */ @@ -792,57 +777,58 @@ static int const heapSize[4] = { // #pragma pop /* 80A1A3E0-80A1A3E4 0000B0 0004+00 0/2 0/0 0/0 .rodata @4165 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4165 = -200.0f; -COMPILER_STRIP_GATE(0x80A1A3E0, &lit_4165); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4165 = -200.0f; +// COMPILER_STRIP_GATE(0x80A1A3E0, &lit_4165); +// #pragma pop -/* 80A1A3E4-80A1A3E8 0000B4 0004+00 0/1 0/0 0/0 .rodata @4166 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4166 = -100.0f; -COMPILER_STRIP_GATE(0x80A1A3E4, &lit_4166); -#pragma pop +// /* 80A1A3E4-80A1A3E8 0000B4 0004+00 0/1 0/0 0/0 .rodata @4166 */ +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4166 = -100.0f; +// COMPILER_STRIP_GATE(0x80A1A3E4, &lit_4166); +// #pragma pop -/* 80A1A3E8-80A1A3EC 0000B8 0004+00 0/1 0/0 0/0 .rodata @4167 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4167 = 200.0f; -COMPILER_STRIP_GATE(0x80A1A3E8, &lit_4167); -#pragma pop +// /* 80A1A3E8-80A1A3EC 0000B8 0004+00 0/1 0/0 0/0 .rodata @4167 */ +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4167 = 200.0f; +// COMPILER_STRIP_GATE(0x80A1A3E8, &lit_4167); +// #pragma pop -/* 80A1A3EC-80A1A3F0 0000BC 0004+00 0/2 0/0 0/0 .rodata @4168 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4168 = 300.0f; -COMPILER_STRIP_GATE(0x80A1A3EC, &lit_4168); -#pragma pop +// /* 80A1A3EC-80A1A3F0 0000BC 0004+00 0/2 0/0 0/0 .rodata @4168 */ +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4168 = 300.0f; +// COMPILER_STRIP_GATE(0x80A1A3EC, &lit_4168); +// #pragma pop -/* 80A1A3F0-80A1A3F4 0000C0 0004+00 4/15 0/0 0/0 .rodata @4169 */ -SECTION_RODATA static u8 const lit_4169[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; +// /* 80A1A3F0-80A1A3F4 0000C0 0004+00 4/15 0/0 0/0 .rodata @4169 */ +// SECTION_RODATA static u8 const lit_4169[4] = { +// 0x00, +// 0x00, +// 0x00, +// 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A3F0, &lit_4169); /* 80A1A3F4-80A1A3F8 0000C4 0004+00 0/1 0/0 0/0 .rodata @4170 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4170 = -1000000000.0f; -COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4170 = -1000000000.0f; +// COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); +// #pragma pop /* 80A14858-80A14B20 000238 02C8+00 1/1 0/0 0/0 .text create__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::create() { - fopAcM_SetupActor2(this, daNpc_Jagar_c, (const daNpcT_faceMotionAnmData_c *)l_faceMotionAnmData, + fopAcM_SetupActor2(this, daNpc_Jagar_c, l_faceMotionAnmData, (const daNpcT_motionAnmData_c *)l_motionAnmData, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *) l_faceMotionSequenceData, 4, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList ); mType = getType(); field_0xa7c = getFlowNodeNo(); - // mTwilight = 0; /* WIP */ + mTwilight = 0; /* WIP */ int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (rv == cPhs_COMPLEATE_e) { // OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, @@ -859,7 +845,7 @@ int daNpc_Jagar_c::create() { fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); mSound.init(¤t.pos, &eyePos, 3, 1); - field_0x9c0.init(&mAcch, 60.0f, 0.0f); + field_0x9c0.init(&mAcch, 0.0f, 0.0f); reset(); mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), @@ -871,7 +857,7 @@ int daNpc_Jagar_c::create() { mAcch.CrrPos(dComIfG_Bgsp()); mGndChk = mAcch.m_gnd; mGroundH = mAcch.GetGroundH(); - if (mGroundH != -1e9f) { + if (mGroundH != -1000000000.0f) { setEnvTevColor(); setRoomNo(); } @@ -884,22 +870,22 @@ int daNpc_Jagar_c::create() { /* ############################################################################################## */ /* 80A1A3F8-80A1A3FC 0000C8 0004+00 0/2 0/0 0/0 .rodata @4332 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4332 = 65536.0f; -COMPILER_STRIP_GATE(0x80A1A3F8, &lit_4332); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4332 = 65536.0f; +// COMPILER_STRIP_GATE(0x80A1A3F8, &lit_4332); +// #pragma pop /* 80A1A3FC-80A1A400 0000CC 0004+00 0/3 0/0 0/0 .rodata @4333 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4333 = 1.0f / 5.0f; -COMPILER_STRIP_GATE(0x80A1A3FC, &lit_4333); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_4333 = 1.0f / 5.0f; +// COMPILER_STRIP_GATE(0x80A1A3FC, &lit_4333); +// #pragma pop /* 80A1A400-80A1A404 0000D0 0004+00 2/5 0/0 0/0 .rodata @4475 */ -SECTION_RODATA static f32 const lit_4475 = 1.0f; -COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); +// SECTION_RODATA static f32 const lit_4475 = 1.0f; +// COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); /* 80A14B20-80A14D90 000500 0270+00 1/1 0/0 0/0 .text CreateHeap__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::CreateHeap() { @@ -995,7 +981,7 @@ int daNpc_Jagar_c::isDelete() { return FALSE; case TYPE_1: { bool rv = true; - if (!daNpcT_chkEvtBit(0xd0) && !dComIfGs_isCollectShield(0)) { + if (!daNpcT_chkEvtBit(0xd3) && !dComIfGs_isCollectShield(0)) { rv = false; } return rv; @@ -1010,12 +996,12 @@ int daNpc_Jagar_c::isDelete() { /* 80A15198-80A15364 000B78 01CC+00 1/1 0/0 0/0 .text reset__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::reset() { csXyz acStack_20; - int iVar1 = (u8*)&field_0x1008 - (u8*)&field_0xfd4; + int iVar1 = (u8*)&mpMatAnm - (u8*)&field_0xfd4; if (mpMatAnm != NULL) { mpMatAnm->initialize(); } initialize(); - for (int i = 0; i < 4; i++) { + for (int i = 0; i < 5; i++) { mActorMngr[i].initialize(); } memset(&field_0xfd4, 0, iVar1); @@ -1053,33 +1039,38 @@ void daNpc_Jagar_c::afterJntAnm(int param_1) { void daNpc_Jagar_c::setParam() { selectAction(); srchActors(); - // short sVar6 = 3; - // short sVar5 = 5; - s16 sVar6 = daNpc_Jagar_Param_c::m.field_0x48; - // s16 sVar5 = daNpc_Hanjo_Param_c::m.field_0x4a; - s16 sVar5 = daNpc_Jagar_Param_c::m.field_0x4c; - s16 sVar1 = daNpc_Jagar_Param_c::m.field_0x4e; u32 uVar7 = 10; + s16 sVar10 = daNpc_Jagar_Param_c::m.field_0x48; + s16 sVar9 = daNpc_Jagar_Param_c::m.field_0x4a; + s16 sVar8 = daNpc_Jagar_Param_c::m.field_0x4c; + s16 sVar7 = daNpc_Jagar_Param_c::m.field_0x4e; switch (mType) { case TYPE_0: - sVar6 = 4; - sVar5 = 5; + sVar10 = 4; + sVar9 = 6; + sVar8 = 5; + sVar7 = 6; break; - case TYPE_2: + case TYPE_1: field_0xff0 = 3; field_0xff4 = 6; - // sVar6 = 19; - // sVar5 = 19; + sVar10 = 19; + sVar9 = 6; + sVar8 = 19; + sVar7 = 6; break; - default: - sVar6 = 3; - sVar5 = 5; + case TYPE_2: + sVar10 = 3; + sVar9 = 6; + sVar8 = 5; + sVar7 = 6; break; } - attention_info.distances[0] = daNpcT_getDistTableIdx(sVar5, 6); + attention_info.distances[0] = daNpcT_getDistTableIdx(sVar8, sVar7); attention_info.distances[1] = attention_info.distances[0]; - attention_info.distances[3] = daNpcT_getDistTableIdx(sVar6, 6); + attention_info.distances[3] = daNpcT_getDistTableIdx(sVar10, sVar9); if (mType == TYPE_1) { + uVar7 |= (0x80 << 16); field_0xfec = getActorDistance(daPy_getPlayerActorClass(), daNpcT_getDistTableIdx(field_0xff0, field_0xff4), attention_info.distances[1]); if (field_0xfec < 4) { g_meter2_info.mBlinkButton |= 1; @@ -1127,6 +1118,7 @@ int daNpc_Jagar_c::checkChangeEvt() { evtChange(); return true; } + break; case TYPE_1: if (field_0xfec < 4) { mEvtNo = 6; @@ -1180,7 +1172,6 @@ int daNpc_Jagar_c::srchActors() { case TYPE_2: break; } - return 0; // Temporary Placeholder } /* 80A158A0-80A15940 001280 00A0+00 1/0 0/0 0/0 .text evtTalk__13daNpc_Jagar_cFv */ @@ -1211,26 +1202,29 @@ BOOL daNpc_Jagar_c::evtCutProc() { /* 80A15A08-80A15CA4 0013E8 029C+00 1/0 0/0 0/0 .text action__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::action() { fopAc_ac_c* hitActor = hitChk(&mCyl1, 0xffffffff); - if (hitActor != NULL) { - cCcD_Obj* hitObj = mCyl1.GetTgHitObj(); - daNpc_Bou_c* this_00 = static_cast(mActorMngr[2].getActorP()); - if (this_00 && this_00->getType() == TYPE_1 && field_0xd08.checkStagger() == 0) { - if (mFaceMotionSeqMngr.getNo() != 1) { - mFaceMotionSeqMngr.setNo(1, -1, 1, 0); - } - if (mMotionSeqMngr.getNo() != 3) { - mMotionSeqMngr.setNo(3, -1, 1, 0); + if (hitActor && mCyl1.GetTgHitObj()->ChkAtType(AT_TYPE_THROW_OBJ)) { + if (mType == TYPE_1) { + daNpc_Bou_c *Bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); + if (Bo && Bo->getType() == TYPE_1) { + if (Bo->field_0xd08.checkStagger() ? 0 : 1) { + Bo->mFaceMotionSeqMngr.setNo(1, -1, 0, 0); + Bo->mMotionSeqMngr.setNo(3, -1, 0, 0); + field_0xff8 = 0; + field_0x1000 = 1; + } + if (field_0x1003 != 2 && field_0x1004 != 2) { + field_0xd08.setParam(this, hitActor, mCurAngle.y); + setDamage(0, 8, 0); + mDamageTimerStart = 0; + mJntAnm.setMode(0, 0); + mJntAnm.setDirect(1); + } } } - if (hitObj->ChkAtType(AT_TYPE_THROW_OBJ) && mType != TYPE_2) { - field_0xd08.setParam(this, hitActor, mCurAngle.y); - setDamage(0, 8, 0); - mDamageTimerStart = 0; - mJntAnm.lookNone(1); - } } if (field_0xd08.checkRebirth()) { field_0xd08.initialize(); + field_0x1003 = 0; field_0xe22 = 1; } if (field_0xfe0) { @@ -1240,15 +1234,17 @@ void daNpc_Jagar_c::action() { setAction(field_0xfe0); } } - // if (field_0xba0.getActorP()) { - // u32 uVar2 = -1; - // if (base.parameters != -1) { - // uVar2 = base.parameters; - // } - // if (uVar2 == 2) { - // mEvtNo = 5; - // } - // } + /* WIP */ + int iVar4 = (int)field_0xba0.getActorP(); + if (iVar4) { + unsigned int uVar2; + if ((iVar4 + 0xb0) >> 24 != 0xff) { + uVar2 = (iVar4 + 0xb0) >> 24; + } + if (getPathID() != 2) { + mEvtNo = 5; + } + } } /* 80A15CA4-80A15D68 001684 00C4+00 1/0 0/0 0/0 .text beforeMove__13daNpc_Jagar_cFv */ @@ -1316,97 +1312,97 @@ void daNpc_Jagar_c::beforeMove() { // COMPILER_STRIP_GATE(0x80A1A428, &lit_4939); // /* 80A1ADE0-80A1ADE4 000008 0001+03 1/1 0/0 0/0 .bss @1109 */ -static u8 lit_1109[1 + 3 /* padding */]; +// static u8 lit_1109[1 + 3 /* padding */]; /* 80A1ADE4-80A1ADE8 00000C 0001+03 0/0 0/0 0/0 .bss @1107 */ -#pragma push -#pragma force_active on -static u8 lit_1107[1 + 3 /* padding */]; -#pragma pop +// #pragma push +// #pragma force_active on +// static u8 lit_1107[1 + 3 /* padding */]; +// #pragma pop -/* 80A1ADE8-80A1ADEC 000010 0001+03 0/0 0/0 0/0 .bss @1105 */ -#pragma push -#pragma force_active on -static u8 lit_1105[1 + 3 /* padding */]; -#pragma pop +// /* 80A1ADE8-80A1ADEC 000010 0001+03 0/0 0/0 0/0 .bss @1105 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1105[1 + 3 /* padding */]; +// #pragma pop -/* 80A1ADEC-80A1ADF0 000014 0001+03 0/0 0/0 0/0 .bss @1104 */ -#pragma push -#pragma force_active on -static u8 lit_1104[1 + 3 /* padding */]; -#pragma pop +// /* 80A1ADEC-80A1ADF0 000014 0001+03 0/0 0/0 0/0 .bss @1104 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1104[1 + 3 /* padding */]; +// #pragma pop -/* 80A1ADF0-80A1ADF4 000018 0001+03 0/0 0/0 0/0 .bss @1099 */ -#pragma push -#pragma force_active on -static u8 lit_1099[1 + 3 /* padding */]; -#pragma pop +// /* 80A1ADF0-80A1ADF4 000018 0001+03 0/0 0/0 0/0 .bss @1099 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1099[1 + 3 /* padding */]; +// #pragma pop -/* 80A1ADF4-80A1ADF8 00001C 0001+03 0/0 0/0 0/0 .bss @1097 */ -#pragma push -#pragma force_active on -static u8 lit_1097[1 + 3 /* padding */]; -#pragma pop +// /* 80A1ADF4-80A1ADF8 00001C 0001+03 0/0 0/0 0/0 .bss @1097 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1097[1 + 3 /* padding */]; +// #pragma pop -/* 80A1ADF8-80A1ADFC 000020 0001+03 0/0 0/0 0/0 .bss @1095 */ -#pragma push -#pragma force_active on -static u8 lit_1095[1 + 3 /* padding */]; -#pragma pop +// /* 80A1ADF8-80A1ADFC 000020 0001+03 0/0 0/0 0/0 .bss @1095 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1095[1 + 3 /* padding */]; +// #pragma pop -/* 80A1ADFC-80A1AE00 000024 0001+03 0/0 0/0 0/0 .bss @1094 */ -#pragma push -#pragma force_active on -static u8 lit_1094[1 + 3 /* padding */]; -#pragma pop +// /* 80A1ADFC-80A1AE00 000024 0001+03 0/0 0/0 0/0 .bss @1094 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1094[1 + 3 /* padding */]; +// #pragma pop -/* 80A1AE00-80A1AE04 000028 0001+03 0/0 0/0 0/0 .bss @1057 */ -#pragma push -#pragma force_active on -static u8 lit_1057[1 + 3 /* padding */]; -#pragma pop +// /* 80A1AE00-80A1AE04 000028 0001+03 0/0 0/0 0/0 .bss @1057 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1057[1 + 3 /* padding */]; +// #pragma pop -/* 80A1AE04-80A1AE08 00002C 0001+03 0/0 0/0 0/0 .bss @1055 */ -#pragma push -#pragma force_active on -static u8 lit_1055[1 + 3 /* padding */]; -#pragma pop +// /* 80A1AE04-80A1AE08 00002C 0001+03 0/0 0/0 0/0 .bss @1055 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1055[1 + 3 /* padding */]; +// #pragma pop -/* 80A1AE08-80A1AE0C 000030 0001+03 0/0 0/0 0/0 .bss @1053 */ -#pragma push -#pragma force_active on -static u8 lit_1053[1 + 3 /* padding */]; -#pragma pop +// /* 80A1AE08-80A1AE0C 000030 0001+03 0/0 0/0 0/0 .bss @1053 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1053[1 + 3 /* padding */]; +// #pragma pop -/* 80A1AE0C-80A1AE10 000034 0001+03 0/0 0/0 0/0 .bss @1052 */ -#pragma push -#pragma force_active on -static u8 lit_1052[1 + 3 /* padding */]; -#pragma pop +// /* 80A1AE0C-80A1AE10 000034 0001+03 0/0 0/0 0/0 .bss @1052 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1052[1 + 3 /* padding */]; +// #pragma pop -/* 80A1AE10-80A1AE14 000038 0001+03 0/0 0/0 0/0 .bss @1014 */ -#pragma push -#pragma force_active on -static u8 lit_1014[1 + 3 /* padding */]; -#pragma pop +// /* 80A1AE10-80A1AE14 000038 0001+03 0/0 0/0 0/0 .bss @1014 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1014[1 + 3 /* padding */]; +// #pragma pop -/* 80A1AE14-80A1AE18 00003C 0001+03 0/0 0/0 0/0 .bss @1012 */ -#pragma push -#pragma force_active on -static u8 lit_1012[1 + 3 /* padding */]; -#pragma pop +// /* 80A1AE14-80A1AE18 00003C 0001+03 0/0 0/0 0/0 .bss @1012 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1012[1 + 3 /* padding */]; +// #pragma pop -/* 80A1AE18-80A1AE1C 000040 0001+03 0/0 0/0 0/0 .bss @1010 */ -#pragma push -#pragma force_active on -static u8 lit_1010[1 + 3 /* padding */]; -#pragma pop +// /* 80A1AE18-80A1AE1C 000040 0001+03 0/0 0/0 0/0 .bss @1010 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1010[1 + 3 /* padding */]; +// #pragma pop -/* 80A1AE1C-80A1AE20 000044 0001+03 0/0 0/0 0/0 .bss @1009 */ -#pragma push -#pragma force_active on -static u8 lit_1009[1 + 3 /* padding */]; -#pragma pop +// /* 80A1AE1C-80A1AE20 000044 0001+03 0/0 0/0 0/0 .bss @1009 */ +// #pragma push +// #pragma force_active on +// static u8 lit_1009[1 + 3 /* padding */]; +// #pragma pop /* 80A1AE20-80A1AE2C 000048 000C+00 1/1 0/0 0/0 .bss @3945 */ static u8 lit_3945[12]; @@ -1415,16 +1411,16 @@ static u8 lit_3945[12]; static u8 l_HIO[4]; /* 80A1AE30-80A1AE40 000058 000C+04 0/1 0/0 0/0 .bss @4873 */ -#pragma push -#pragma force_active on -static u8 lit_4873[12 + 4 /* padding */]; -#pragma pop +// #pragma push +// #pragma force_active on +// static u8 lit_4873[12 + 4 /* padding */]; +// #pragma pop -/* 80A1AE40-80A1AE4C 000068 000C+00 0/1 0/0 0/0 .bss prtclScl$4872 */ -#pragma push -#pragma force_active on -static u8 prtclScl[12]; -#pragma pop +// /* 80A1AE40-80A1AE4C 000068 000C+00 0/1 0/0 0/0 .bss prtclScl$4872 */ +// #pragma push +// #pragma force_active on +// static u8 prtclScl[12]; +// #pragma pop /* 80A15D68-80A1607C 001748 0314+00 1/0 0/0 0/0 .text setAttnPos__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setAttnPos() { @@ -1442,11 +1438,11 @@ void daNpc_Jagar_c::setAttnPos() { setMtx(); mDoMtx_stack_c::copy(mpMorf[0]->getModel()->getAnmMtx(getHeadJointNo())); mDoMtx_stack_c::multVec(&cStack_3c, &eyePos); - mJntAnm.setEyeAngleX(eyePos, 1.0f, 0); + mJntAnm.setEyeAngleX(eyePos, 1.0f, -0x2800); mJntAnm.setEyeAngleY(eyePos, mCurAngle.y, 1, 1.0f, 0); cStack_3c.set(0.0f, 0.0f, 10.0f); cStack_3c.y = daNpc_Jagar_Param_c::m.field_0x00; - if (field_0x1004 != 0) { + if (field_0x1004 == 0) { cStack_3c.set(0.0f, 100.0f, -60.0f); } mDoMtx_stack_c::YrotS(mCurAngle.y); @@ -1461,45 +1457,45 @@ void daNpc_Jagar_c::setAttnPos() { /* ############################################################################################## */ /* 80A1A430-80A1A438 000100 0008+00 0/2 0/0 0/0 .rodata @4997 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4997[8] = { - 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A430, &lit_4997); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_4997[8] = { +// 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A430, &lit_4997); +// #pragma pop /* 80A1A438-80A1A440 000108 0008+00 0/2 0/0 0/0 .rodata @4998 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4998[8] = { - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A438, &lit_4998); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_4998[8] = { +// 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A438, &lit_4998); +// #pragma pop /* 80A1A440-80A1A448 000110 0008+00 0/2 0/0 0/0 .rodata @4999 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4999[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A440, &lit_4999); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_4999[8] = { +// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A440, &lit_4999); +// #pragma pop /* 80A1A448-80A1A44C 000118 0004+00 0/1 0/0 0/0 .rodata @5039 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5039 = 70.0f; -COMPILER_STRIP_GATE(0x80A1A448, &lit_5039); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_5039 = 70.0f; +// COMPILER_STRIP_GATE(0x80A1A448, &lit_5039); +// #pragma pop /* 80A1A44C-80A1A450 00011C 0004+00 0/1 0/0 0/0 .rodata @5040 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5040 = 90.0f; -COMPILER_STRIP_GATE(0x80A1A44C, &lit_5040); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_5040 = 90.0f; +// COMPILER_STRIP_GATE(0x80A1A44C, &lit_5040); +// #pragma pop /* 80A1607C-80A161EC 001A5C 0170+00 1/0 0/0 0/0 .text setCollision__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setCollision() { @@ -1603,8 +1599,8 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { mMotionSeqMngr.setNo(2, 0.0f, 0, 0); mJntAnm.lookNone(1); field_0x1003 = 1; - // setAngle(field_0x4b6); - // initTalk(field_0xa7c, NULL); + setAngle(home.angle.y); + initTalk(field_0xa7c, NULL); break; case 2: break; @@ -1625,21 +1621,21 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { /* ############################################################################################## */ /* 80A1A450-80A1A45C 000120 000C+00 0/1 0/0 0/0 .rodata @5148 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_5148[12] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -}; -COMPILER_STRIP_GATE(0x80A1A450, &lit_5148); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_5148[12] = { +// 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +// }; +// COMPILER_STRIP_GATE(0x80A1A450, &lit_5148); +// #pragma pop /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80A1A52E = "msgNo"; -SECTION_DEAD static char const* const stringBase_80A1A534 = "msgNo2"; -SECTION_DEAD static char const* const stringBase_80A1A53B = "send"; -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_DEAD static char const* const stringBase_80A1A52E = "msgNo"; +// SECTION_DEAD static char const* const stringBase_80A1A534 = "msgNo2"; +// SECTION_DEAD static char const* const stringBase_80A1A53B = "send"; +// #pragma pop /* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ @@ -1649,26 +1645,29 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { int iVar11 = 0; int iVar10 = 0; int iVar9 = 0; - // int* piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); - if (* dComIfGp_evmng_getMyIntegerP(param_0, "prm")) { - iVar12 = * dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + int *piVar5 = (int *)dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + if (piVar5) { + iVar12 = *piVar5; } - if (* dComIfGp_evmng_getMyIntegerP(param_0, "msgNo")) { - iVar11 = * dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); + piVar5 = (int *)dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); + if (piVar5) { + iVar11 = *piVar5; + } + piVar5 = (int *)dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2"); + if (piVar5) { + iVar10 = *piVar5; + } + piVar5 = (int *)dComIfGp_evmng_getMyIntegerP(param_0, "send"); + if (piVar5) { + iVar9 = *piVar5; } - // if (* dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2")) { - // iVar10 = * dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2"); - // } - // if (* dComIfGp_evmng_getMyIntegerP(param_0, "send")) { - // iVar9 = * dComIfGp_evmng_getMyIntegerP(param_0, "send"); - // } if (dComIfGp_getEventManager().getIsAddvance(param_0)) { switch (iVar12) { case 0: dComIfGp_getEvent().setPt2(mActorMngr[0].getActorP()); break; case 1: - // initTalk(field_0xa7c, NULL); + initTalk(field_0xa7c, NULL); break; case 7: dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); @@ -1683,17 +1682,14 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { int local_38 = -1; switch (iVar12) { case 0: - - mJntAnm.lookNone(0); - if (mMotionSeqMngr.getNo() == 10) { - // if (mMotionSeqMngr.getStepNo() < 1) { - // return 0; - // } + mJntAnm.setMode(0, 0); + iVar9 = mMotionSeqMngr.getNo(); + if (iVar9 == 10) { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(0, -1.0f, 0, 0); - rv = 1; + return 1; } - if (mMotionSeqMngr.getNo() != 0) { + if (iVar9 != 0) { return 0; } return 1; @@ -1702,7 +1698,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { if (field_0xdc8 == mCurAngle.y) { return 1; } - // step(field_0xdc8, 8, 0xe, 0xf, 0); + step(field_0xdc8, 8, 0xe, 0xf, 0); return 0; case 3: case 4: @@ -1781,10 +1777,10 @@ int daNpc_Jagar_c::cutAnger(int param_0) { /* ############################################################################################## */ /* 80A1A45C-80A1A464 00012C 0008+00 1/1 0/0 0/0 .rodata @5412 */ -SECTION_RODATA static u8 const lit_5412[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A45C, &lit_5412); +// SECTION_RODATA static u8 const lit_5412[8] = { +// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A45C, &lit_5412); /* 80A16EFC-80A1705C 0028DC 0160+00 1/0 0/0 0/0 .text cutConversationWithBou__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { @@ -1813,22 +1809,22 @@ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { /* ############################################################################################## */ /* 80A1A464-80A1A46C 000134 0008+00 0/1 0/0 0/0 .rodata @5445 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_5445[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A1A464, &lit_5445); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_5445[8] = { +// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +// }; +// COMPILER_STRIP_GATE(0x80A1A464, &lit_5445); +// #pragma pop /* 80A1A46C-80A1A478 00013C 000C+00 0/1 0/0 0/0 .rodata @5455 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_5455[12] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -}; -COMPILER_STRIP_GATE(0x80A1A46C, &lit_5455); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static u8 const lit_5455[12] = { +// 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +// }; +// COMPILER_STRIP_GATE(0x80A1A46C, &lit_5455); +// #pragma pop /* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text * cutConfidentialConversation__13daNpc_Jagar_cFi */ @@ -2036,12 +2032,12 @@ int daNpc_Jagar_c::chkSitMotion() { /* 80A17924-80A17984 003304 0060+00 1/1 0/0 0/0 .text chkSitMotion2__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkSitMotion2() { - if (daNpcT_chkEvtBit(0x235) == 0) { - if (daNpcT_chkEvtBit(0x8a) != 0) { + if (daNpcT_chkEvtBit(0x235) != 0) { + if (daNpcT_chkEvtBit(0x224) != 0) { return 1; } } else { - if (daNpcT_chkEvtBit(0x224) != 0) { + if (daNpcT_chkEvtBit(0x8a) != 0) { return 1; } } @@ -2073,25 +2069,25 @@ int daNpc_Jagar_c::chkToMotion() { /* ############################################################################################## */ /* 80A1A478-80A1A47C 000148 0004+00 0/2 0/0 0/0 .rodata @5527 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5527 = -40.0f; -COMPILER_STRIP_GATE(0x80A1A478, &lit_5527); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_5527 = -40.0f; +// COMPILER_STRIP_GATE(0x80A1A478, &lit_5527); +// #pragma pop /* 80A1A47C-80A1A480 00014C 0004+00 0/2 0/0 0/0 .rodata @5659 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5659 = 0.5f; -COMPILER_STRIP_GATE(0x80A1A47C, &lit_5659); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_5659 = 0.5f; +// COMPILER_STRIP_GATE(0x80A1A47C, &lit_5659); +// #pragma pop /* 80A1A480-80A1A484 000150 0004+00 0/1 0/0 0/0 .rodata @6101 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_6101 = 180.0f; -COMPILER_STRIP_GATE(0x80A1A480, &lit_6101); -#pragma pop +// #pragma push +// #pragma force_active on +// SECTION_RODATA static f32 const lit_6101 = 180.0f; +// COMPILER_STRIP_GATE(0x80A1A480, &lit_6101); +// #pragma pop /* 80A17A2C-80A1856C 00340C 0B40+00 1/0 0/0 0/0 .text wait__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::wait(void* param_0) { @@ -2412,9 +2408,9 @@ int daNpc_Jagar_c::talk(void* param_0) { (unsigned int)!Bo->field_0xd08.checkStagger() >> 5) { // Bit shift not correct mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); if ((cM_rnd() -0.5f) + -10.0f < 0.0f) { - mMotionSeqMngr.setNo(1, -1.0f, 0, 0); - } else { mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + } else { + mMotionSeqMngr.setNo(1, -1.0f, 0, 0); } } switch (field_0xfec) { @@ -2465,25 +2461,22 @@ static int daNpc_Jagar_Create(void* i_this) { /* 80A18F48-80A18F68 004928 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Delete__FPv */ static int daNpc_Jagar_Delete(void* i_this) { - // NONMATCHING - return 1; // Placeholder value + return static_cast(i_this)->Delete(); } /* 80A18F68-80A18F88 004948 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Execute__FPv */ static int daNpc_Jagar_Execute(void* i_this) { - // NONMATCHING - return 1; // Placeholder value + return static_cast(i_this)->Execute(); } /* 80A18F88-80A18FA8 004968 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Draw__FPv */ static int daNpc_Jagar_Draw(void* i_this) { - // NONMATCHING - return 1; // Placeholder value + return static_cast(i_this)->Draw(); } /* 80A18FA8-80A18FB0 004988 0008+00 1/0 0/0 0/0 .text daNpc_Jagar_IsDelete__FPv */ static int daNpc_Jagar_IsDelete(void* i_this) { - return 1; // Placeholder value + return 1; } // /* 80A18FB0-80A18FE0 004990 0030+00 1/0 0/0 0/0 .text calc__11J3DTexNoAnmCFPUs */ @@ -2730,22 +2723,16 @@ static int daNpc_Jagar_IsDelete(void* i_this) { // } /* ############################################################################################## */ -/* 80A1ADCC-80A1ADD8 000884 000C+00 2/2 0/0 0/0 .data __vt__19daNpc_Jagar_Param_c */ -SECTION_DATA extern void* __vt__19daNpc_Jagar_Param_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__19daNpc_Jagar_Param_cFv, -}; -/* 80A1A098-80A1A194 005A78 00FC+00 0/0 1/0 0/0 .text __sinit_d_a_npc_jagar_cpp */ -void __sinit_d_a_npc_jagar_cpp() { - // NONMATCHING -} +// /* 80A1A098-80A1A194 005A78 00FC+00 0/0 1/0 0/0 .text __sinit_d_a_npc_jagar_cpp */ +// void __sinit_d_a_npc_jagar_cpp() { +// // NONMATCHING +// } -#pragma push -#pragma force_active on -REGISTER_CTORS(0x80A1A098, __sinit_d_a_npc_jagar_cpp); -#pragma pop +// #pragma push +// #pragma force_active on +// REGISTER_CTORS(0x80A1A098, __sinit_d_a_npc_jagar_cpp); +// #pragma pop /* 80A1A194-80A1A274 005B74 00E0+00 1/1 0/0 0/0 .text * __ct__13daNpc_Jagar_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc @@ -2778,7 +2765,7 @@ s32 daNpc_Jagar_c::getNeckJointNo() { /* 80A1A28C-80A1A294 005C6C 0008+00 1/0 0/0 0/0 .text getBackboneJointNo__13daNpc_Jagar_cFv */ long daNpc_Jagar_c::getBackboneJointNo() { - return 0; // Placeholder value + return 1; } /* 80A1A2B4-80A1A2BC 005C94 0008+00 1/0 0/0 0/0 .text getFootLJointNo__13daNpc_Jagar_cFv @@ -2799,14 +2786,14 @@ s32 daNpc_Jagar_c::getFootRJointNo() { // } /* 80A1A30C-80A1A314 005CEC 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_80A1A30C() { - // NONMATCHING -} +// static void func_80A1A30C() { +// // NONMATCHING +// } -/* 80A1A314-80A1A31C 005CF4 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_80A1A314() { - // NONMATCHING -} +// /* 80A1A314-80A1A31C 005CF4 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ +// static void func_80A1A314() { +// // NONMATCHING +// } // /* ############################################################################################## */ // /* 80A1AE4C-80A1AE50 000074 0004+00 0/0 0/0 0/0 .bss @@ -2981,3 +2968,46 @@ static void func_80A1A314() { // #pragma pop /* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ + +/* 80A1AC10-80A1AC30 -00001 0020+00 1/0 0/0 0/0 .data daNpc_Jagar_MethodTable */ +static actor_method_class daNpc_Jagar_MethodTable = { + (process_method_func)daNpc_Jagar_Create__FPv, + (process_method_func)daNpc_Jagar_Delete__FPv, + (process_method_func)daNpc_Jagar_Execute__FPv, + (process_method_func)daNpc_Jagar_IsDelete__FPv, + (process_method_func)daNpc_Jagar_Draw__FPv, +}; + +/* 80A1AC30-80A1AC60 -00001 0030+00 0/0 0/0 1/0 .data g_profile_NPC_JAGAR */ +extern actor_process_profile_definition g_profile_NPC_JAGAR = { + fpcLy_CURRENT_e, // mLayerID + 7, // mListID + fpcPi_CURRENT_e, // mListPrio + PROC_NPC_JAGAR, // mProcName + &g_fpcLf_Method.base, // sub_method + sizeof(daNpc_Jagar_c), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // sub_method + 345, // mPriority + &daNpc_Jagar_MethodTable, // sub_method + 0x00040107, // mStatus + fopAc_NPC_e, // mActorType + fopAc_CULLBOX_CUSTOM_e, // cullType +}; + +// /* 80A1ACFC-80A1AD08 0007B4 000C+00 3/3 0/0 0/0 .data __vt__13daNpcT_Path_c */ +SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { + (void*)NULL /* RTTI */, + (void*)NULL, + (void*)__dt__13daNpcT_Path_cFv, +}; + +// /* 80A1ADCC-80A1ADD8 000884 000C+00 2/2 0/0 0/0 .data __vt__19daNpc_Jagar_Param_c */ +// SECTION_DATA extern void* __vt__19daNpc_Jagar_Param_c[3] = { +// (void*)NULL /* RTTI */, +// (void*)NULL, +// (void*)__dt__19daNpc_Jagar_Param_cFv, +// }; + +AUDIO_INSTANCES; From ff3ed4638d86a1cc5f5ec7866641e65a97cce9a3 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Wed, 26 Feb 2025 22:07:46 -0500 Subject: [PATCH 30/41] I dont remember what i added this time lol --- include/d/actor/d_a_npc_jagar.h | 5 +++-- src/d/actor/d_a_npc_jagar.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index f78feec1830..8d59bdcb235 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -99,13 +99,14 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0F80 */ u8 mType; /* 0x0F84 */ daNpcT_ActorMngr_c mActorMngr[5]; /* 0x0FAC */ daNpcT_Path_c field_0xfac; + /* 0x0FCE */ u8 field_0xfce[0xfd4 - 0xfce]; /* 0x0FD4 */ actionFunc field_0xfd4; /* 0x0FE0 */ actionFunc field_0xfe0; - /* 0x0FE4 */ actionFunc field_0xfe4; /* 0x0FEC */ int field_0xfec; /* 0x0FF0 */ int field_0xff0; /* 0x0FF4 */ int field_0xff4; /* 0x0FF8 */ int field_0xff8; + /* 0x0FFC */ u8 field_0xffc[0x1000 - 0xffc]; /* 0x1000 */ u8 field_0x1000; /* 0x1001 */ u8 field_0x1001; /* 0x1002 */ u8 field_0x1002; @@ -115,7 +116,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x1008 */ int field_0x1008; }; -// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); // Temporary omission +STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); class daNpc_Jagar_Param_c { public: diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 691a3e933bb..376e7a27854 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -996,7 +996,7 @@ int daNpc_Jagar_c::isDelete() { /* 80A15198-80A15364 000B78 01CC+00 1/1 0/0 0/0 .text reset__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::reset() { csXyz acStack_20; - int iVar1 = (u8*)&mpMatAnm - (u8*)&field_0xfd4; + int iVar1 = (u8*)field_0x1008 - (u8*)&field_0xfd4; if (mpMatAnm != NULL) { mpMatAnm->initialize(); } @@ -1227,11 +1227,11 @@ void daNpc_Jagar_c::action() { field_0x1003 = 0; field_0xe22 = 1; } - if (field_0xfe0) { - if (field_0xfe4 == field_0xfe0) { - (this->*field_0xfe4)(NULL); + if (field_0xfd4) { + if (field_0xfe0 == field_0xfd4) { + (this->*field_0xfe0)(NULL); } else { - setAction(field_0xfe0); + setAction(field_0xfd4); } } /* WIP */ From a7d0caa336be04b31d4fd4ba1a1a969bb7081181 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:40:13 -0500 Subject: [PATCH 31/41] Finished some functions --- include/d/actor/d_a_npc_jagar.h | 6 +- src/d/actor/d_a_npc_jagar.cpp | 265 ++++++++++++++++++-------------- 2 files changed, 154 insertions(+), 117 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 8d59bdcb235..6b992af479f 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -41,7 +41,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 80A153E8 */ void setParam(); /* 80A155E4 */ BOOL checkChangeEvt(); /* 80A15714 */ void setAfterTalkMotion(); - /* 80A157B4 */ int srchActors(); + /* 80A157B4 */ void srchActors(); /* 80A158A0 */ BOOL evtTalk(); /* 80A15940 */ BOOL evtCutProc(); /* 80A15A08 */ void action(); @@ -99,7 +99,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0F80 */ u8 mType; /* 0x0F84 */ daNpcT_ActorMngr_c mActorMngr[5]; /* 0x0FAC */ daNpcT_Path_c field_0xfac; - /* 0x0FCE */ u8 field_0xfce[0xfd4 - 0xfce]; + // /* 0x0FCE */ u8 field_0xfce[0xfd4 - 0xfce]; /* 0x0FD4 */ actionFunc field_0xfd4; /* 0x0FE0 */ actionFunc field_0xfe0; /* 0x0FEC */ int field_0xfec; @@ -116,7 +116,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x1008 */ int field_0x1008; }; -STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); +// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); class daNpc_Jagar_Param_c { public: diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 376e7a27854..e6bb7f9e82b 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -21,6 +21,7 @@ #include "d/d_meter2_info.h" #include "d/d_meter_button.h" #include "m_Do/m_Do_mtx.h" +#include "d/actor/d_a_tag_push.h" // // Forward References: @@ -996,7 +997,7 @@ int daNpc_Jagar_c::isDelete() { /* 80A15198-80A15364 000B78 01CC+00 1/1 0/0 0/0 .text reset__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::reset() { csXyz acStack_20; - int iVar1 = (u8*)field_0x1008 - (u8*)&field_0xfd4; + int iVar1 = (u8*)&field_0x1008 - (u8*)&field_0xfd4; if (mpMatAnm != NULL) { mpMatAnm->initialize(); } @@ -1125,6 +1126,8 @@ int daNpc_Jagar_c::checkChangeEvt() { evtChange(); return true; } + case TYPE_2: + break; } } return false; @@ -1152,7 +1155,7 @@ void daNpc_Jagar_c::setAfterTalkMotion() { } /* 80A157B4-80A158A0 001194 00EC+00 1/1 0/0 0/0 .text srchActors__13daNpc_Jagar_cFv */ -int daNpc_Jagar_c::srchActors() { +void daNpc_Jagar_c::srchActors() { switch(mType) { case TYPE_0: if (!mActorMngr[1].getActorP()) { @@ -1204,23 +1207,23 @@ void daNpc_Jagar_c::action() { fopAc_ac_c* hitActor = hitChk(&mCyl1, 0xffffffff); if (hitActor && mCyl1.GetTgHitObj()->ChkAtType(AT_TYPE_THROW_OBJ)) { if (mType == TYPE_1) { - daNpc_Bou_c *Bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); - if (Bo && Bo->getType() == TYPE_1) { - if (Bo->field_0xd08.checkStagger() ? 0 : 1) { - Bo->mFaceMotionSeqMngr.setNo(1, -1, 0, 0); - Bo->mMotionSeqMngr.setNo(3, -1, 0, 0); + daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); + if (bo && bo->getType() == TYPE_1) { + if (bo->field_0xd08.checkStagger() ? 0 : 1) { + bo->mFaceMotionSeqMngr.setNo(1, -1, 0, 0); + bo->mMotionSeqMngr.setNo(3, -1, 0, 0); field_0xff8 = 0; field_0x1000 = 1; } - if (field_0x1003 != 2 && field_0x1004 != 2) { - field_0xd08.setParam(this, hitActor, mCurAngle.y); - setDamage(0, 8, 0); - mDamageTimerStart = 0; - mJntAnm.setMode(0, 0); - mJntAnm.setDirect(1); - } } } + if (field_0x1003 != 2 && field_0x1004 != 2) { + field_0xd08.setParam(this, hitActor, mCurAngle.y); + setDamage(0, 8, 0); + mDamageTimerStart = 0; + mJntAnm.setMode(0, 0); + mJntAnm.setDirect(1); + } } if (field_0xd08.checkRebirth()) { field_0xd08.initialize(); @@ -1234,15 +1237,14 @@ void daNpc_Jagar_c::action() { setAction(field_0xfd4); } } - /* WIP */ - int iVar4 = (int)field_0xba0.getActorP(); - if (iVar4) { - unsigned int uVar2; - if ((iVar4 + 0xb0) >> 24 != 0xff) { - uVar2 = (iVar4 + 0xb0) >> 24; - } - if (getPathID() != 2) { - mEvtNo = 5; + daTag_Push_c *uVar4 = (daTag_Push_c *)field_0xba0.getActorP(); + if (uVar4) { + switch ((int)uVar4->getId()) { + case 2: + mEvtNo = 5; + break; + default: + break; } } } @@ -1442,7 +1444,7 @@ void daNpc_Jagar_c::setAttnPos() { mJntAnm.setEyeAngleY(eyePos, mCurAngle.y, 1, 1.0f, 0); cStack_3c.set(0.0f, 0.0f, 10.0f); cStack_3c.y = daNpc_Jagar_Param_c::m.field_0x00; - if (field_0x1004 == 0) { + if (field_0x1004 == 2) { cStack_3c.set(0.0f, 100.0f, -60.0f); } mDoMtx_stack_c::YrotS(mCurAngle.y); @@ -1451,7 +1453,7 @@ void daNpc_Jagar_c::setAttnPos() { static cXyz prtclScl(1.0f, 1.0f, 1.0f); setFootPos(); if (3.0f < speedF) { - setFootPrtcl(&prtclScl, 17.0f, 2.0f); + setFootPrtcl(&prtclScl, 11.0f, 0); } } @@ -1645,6 +1647,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { int iVar11 = 0; int iVar10 = 0; int iVar9 = 0; + fopAc_ac_c* iVar2; int *piVar5 = (int *)dComIfGp_evmng_getMyIntegerP(param_0, "prm"); if (piVar5) { iVar12 = *piVar5; @@ -1672,24 +1675,27 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { case 7: dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); break; - case 8: + default: field_0x1002 = 0; field_0x1003 = 0; } } - int local_40 = -1; - int local_3c = -1; - int local_38 = -1; switch (iVar12) { case 0: - mJntAnm.setMode(0, 0); + mJntAnm.lookNone(0); iVar9 = mMotionSeqMngr.getNo(); if (iVar9 == 10) { + if (mMotionSeqMngr.getNo() < 1) { + return 0; + } mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(0, -1.0f, 0, 0); return 1; } - if (iVar9 != 0) { + if (iVar9 == 0) { + return 0; + } + if (mMotionSeqMngr.getNo() != 0) { return 0; } return 1; @@ -1703,74 +1709,89 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { case 3: case 4: case 5: - if (mActorMngr[0].getActorP()) { + iVar2 = mActorMngr[0].getActorP(); + if (iVar2) { field_0xd6c.setall(0.0); + current.pos.absXZ(iVar2->current.pos); mDoMtx_stack_c::YrotS(mCurAngle.y); mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); field_0xd6c += current.pos; - // csXyz local_58(current.pos.z, current.pos.x, 0); - // PSVECSquareDistance(); + mJntAnm.setMode(3, 0); } + goto LAB_80a16c58; case 6: return 0; case 7: - if (mActorMngr[1].getActorP()) { + iVar2 = mActorMngr[1].getActorP(); + if (iVar2) { field_0xd6c.setall(0.0); + current.pos.absXZ(iVar2->current.pos); mDoMtx_stack_c::YrotS(mCurAngle.y); - // PSMTXMultVec(reinterpret_cast(&mDoMtx_stack_c::now), (const Vec *)&field_0xd6c, (Vec *)&field_0xd6c); - // csXyz local_70(current.pos.z, current.pos.x, 0); - // PSVECSquareDistance(); - // field_0xd6c = - // PSVECAdd((const Vec *)&field_0xd6c, (const Vec *)current, (Vec *)&field_0xd6c); + mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); + field_0xd6c += current.pos; + mJntAnm.setMode(3, 0); } + goto LAB_80a16c58; case 8: return 1; default: - // if (iVar12 < 0) { - // return 0; - // } - return 0; + mJntAnm.lookPlayer(0); } - if (mJntAnm.getMode() != 1) { - mFlow.remove(); - +LAB_80a16c58: + if (talkProc(&iVar11, iVar9, NULL, 0)) { + if (iVar11 == 0 && iVar10 == 0) { + if (mFlow.checkEndFlow()) { + rv = 1; + } + } else { + rv = 1; + } + } + if (iVar12 == 4) { + rv = 1; } + return rv; } /* 80A16CD8-80A16EFC 0026B8 0224+00 1/0 0/0 0/0 .text cutAnger__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutAnger(int param_0) { int rv = 0; int local_b4 = -1; + s16 sVar3; int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); if (piVar1 != NULL) { local_b4 = *piVar1; } - if ((((dComIfGp_getEventManager().getIsAddvance(param_0)) && local_b4 != 1) && local_b4 < 1) && local_b4 > -1) { - // if (field_0xb58 != 8) { - // mFaceMotionSeqMngr.setNo(8, 0.0, 0, 0); - // } - // if (field_0xb7c != 0) { - // mMotionSeqMngr.setNo(0, 0.0, 0, 0); - // } - field_0x1003 = 0; - s16 sVar3 = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)); // Correct? - setAngle(sVar3); - // initTalk(field_0xa7c, NULL); + if (dComIfGp_getEventManager().getIsAddvance(param_0)) { + switch (local_b4) { + case 0: + mFaceMotionSeqMngr.setNo(8, 0.0f, 0, 0); + mMotionSeqMngr.setNo(0, 0.0, 0, 0); + field_0x1003 = 0; + sVar3 = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)); + setAngle(sVar3); + initTalk(field_0xa7c, NULL); + case 1: + break; + } } - if (local_b4 == 1) { - mJntAnm.lookNone(0); - // if (field_0x4b6 == field_0xd7a) { - // rv = 1; - // } else { - // step(field_0x4b6, 8, 14, 15, 0); - // } - } else if (local_b4 < 1 && local_b4 > -1) { - // if (field_0xce0 != 1) { - // mJntAnm.lookPlayer(0); - // if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { - // rv = 1; - // } - // } + switch (local_b4) { + case 0: + mJntAnm.lookPlayer(0); + if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow() == 1) { + rv = 1; + } + break; + case 1: + mJntAnm.lookNone(0); + if (home.angle.y == mCurAngle.y) { + rv = 1; + } else { + step(home.angle.y, 8, 14, 15, 0); + } + break; + default: + break; } return rv; } @@ -1784,24 +1805,22 @@ int daNpc_Jagar_c::cutAnger(int param_0) { /* 80A16EFC-80A1705C 0028DC 0160+00 1/0 0/0 0/0 .text cutConversationWithBou__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { - // fopAc_ac_c* iVar1 = field_0xba0.getActorP(); + fopAc_ac_c* iVar1 = field_0xba0.getActorP(); int rv = 0; int iVar5 = -1; int* piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); if (piVar2 != NULL) { iVar5 = *piVar2; } - fopAc_ac_c* Bo = mActorMngr[2].getActorP(); - fopAc_ac_c* Jaggle = (fopAc_ac_c *) this; - dComIfGp_setMesgCameraInfoActor(Jaggle, Bo, 0, 0, 0, 0, 0, 0, 0, 0); - if (dComIfGp_getEventManager().getIsAddvance(param_0) && iVar5 == 0) { - int uVar4 = -1; - if (home.angle.GetX() != -1) { - uVar4 = home.angle.GetX(); - } - // initTalk(uVar4, &Jaggle); + fopAc_ac_c* bo = mActorMngr[2].getActorP(); + fopAc_ac_c* jaggle = (fopAc_ac_c *) this; + dComIfGp_setMesgCameraInfoActor(jaggle, bo, 0, 0, 0, 0, 0, 0, 0, 0); + if (dComIfGp_getEventManager().getIsAddvance(param_0)) { + // if (iVar5 == 0) { + initTalk(getFlowNodeNo(), (fopAc_ac_c **)this); + // } } - if (talkProc(NULL, 0, &Jaggle, 0) && mFlow.checkEndFlow()) { + if (talkProc(NULL, 0, &jaggle, 0) && mFlow.checkEndFlow() == 1) { rv = 1; } return rv; @@ -2015,16 +2034,26 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { /* 80A17898-80A17924 003278 008C+00 1/1 0/0 0/0 .text chkSitMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkSitMotion() { - if (daNpcT_chkEvtBit(0x235) == 0) { + // if (daNpcT_chkEvtBit(0x235) == 0) { + // if (daNpcT_chkEvtBit(0x1c) != 0) { + // if (daNpcT_chkEvtBit(0x87) != 0) { + // return 0; + // } + // if (field_0x1002 != 0) { // 0 or TYPE_0? + // return 0; + // } + // } + // } else if (field_0x1002 != 0) { // 0 or TYPE_0? + // return 0; + // } + // return 1; + if ((daNpcT_chkEvtBit(0x235) == 0)) { if (daNpcT_chkEvtBit(0x1c) != 0) { if (daNpcT_chkEvtBit(0x87) != 0) { return 0; } - if (field_0x1002 != 0) { // 0 or TYPE_0? - return 0; - } } - } else if (field_0x1002 != 0) { // 0 or TYPE_0? + } else if (field_0x1002) { return 0; } return 1; @@ -2265,7 +2294,7 @@ int daNpc_Jagar_c::wait(void* param_0) { int daNpc_Jagar_c::talkwithBou(void* param_0) { bool bVar2; int uVar3; - daNpcT_c *Bo = (daNpcT_c *)mActorMngr[2].getActorP(); + daNpcT_c *bo = (daNpcT_c *)mActorMngr[2].getActorP(); u16 uVar1 = field_0xe22; switch (field_0xe22) { case 0: @@ -2278,8 +2307,8 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { } } if (field_0xe25 != 0 && daNpcT_chkEvtBit(0xd3) == 0 && (fopAcM_searchActorDistanceXZ(this, daPy_getPlayerActorClass()) > 1800.0f) && field_0xe34 != NULL) { - if (Bo) { - Bo->field_0xe25 = 0; + if (bo) { + bo->field_0xe25 = 0; } field_0xe25 = 0; } @@ -2290,7 +2319,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { // if (field_0xe25 != 0) { uVar3 = (int)daNpcT_getDistTableIdx(field_0xff0, field_0xff4) & 0xff; if (!chkFindWolf(mCurAngle.y, uVar3, field_0xfec, 500.0f, 110.0f, 300.0f, -300.0f, 1)) { - if (Bo) { + if (bo) { if (chkFindWolf(mCurAngle.y, (daNpcT_getDistTableIdx(daNpc_Bou_Param_c::m[84], daNpc_Bou_Param_c::m[80]) & 0xff), field_0xfec, 500.0f, 110.0f, 300.0f, -300.0f, 1)) { goto LAB_80a18744; @@ -2300,7 +2329,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { LAB_80a18744: mEvtNo = 7; } - if (Bo) { + if (bo) { if (field_0x1005 == 0) { if (cLib_calcTimer(&field_0xff8) == 0) { if (field_0xd08.checkStagger() == 0) { @@ -2335,17 +2364,17 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { if (bVar2) { field_0xff8 = cLib_getRndValue(45.0f, 142.0f); if (field_0x1000 == 0) { - Bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); + bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); if ((cM_rnd() - 0.5f) <= 0.0f) { - Bo->mMotionSeqMngr.setNo(1, -1.0f, 0, 0); + bo->mMotionSeqMngr.setNo(1, -1.0f, 0, 0); } else { - Bo->mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + bo->mMotionSeqMngr.setNo(4, -1.0f, 0, 0); mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(6, -1.0f, 0, 0); } } else { - Bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); - Bo->mMotionSeqMngr.setNo(2, -1.0f, 0, 0); + bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); + bo->mMotionSeqMngr.setNo(2, -1.0f, 0, 0); mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); if ((cM_rnd() - 0.5f) + 0.0f < 0.0f) { mMotionSeqMngr.setNo(5, -1.0f, 0, 0); @@ -2388,8 +2417,8 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { // } // // } LAB_80a18a8c: - if (Bo) { - mJntAnm.lookActor((fopAc_ac_c *)Bo, -40.0f, 0); + if (bo) { + mJntAnm.lookActor((fopAc_ac_c *)bo, -40.0f, 0); } else { mJntAnm.lookNone(0); } @@ -2403,9 +2432,9 @@ int daNpc_Jagar_c::talk(void* param_0) { case 1: if (!field_0xd08.checkStagger()) { if (mType == TYPE_1) { - daNpc_Bou_c *Bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); - if (Bo && Bo->getType() == TYPE_1 && - (unsigned int)!Bo->field_0xd08.checkStagger() >> 5) { // Bit shift not correct + daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); + if (bo && bo->getType() == TYPE_1 && + (unsigned int)!bo->field_0xd08.checkStagger() >> 5) { // Bit shift not correct mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); if ((cM_rnd() -0.5f) + -10.0f < 0.0f) { mMotionSeqMngr.setNo(4, -1.0f, 0, 0); @@ -2427,22 +2456,30 @@ int daNpc_Jagar_c::talk(void* param_0) { } case 2: if (!field_0xd08.checkStagger()) { - if ((mTwilight == 0 && field_0xdc8 != mCurAngle.y) && - (mType != TYPE_1 && field_0x1003 > 0)) { + if (mTwilight == 0 && field_0xdc8 != mCurAngle.y) { + if (mType != TYPE_1 && field_0x1003 == 0) { + // mJntAnm.lookPlayer(0); + // step(field_0xdc8, 8, 0xe, 0xf, 0); + } + } else { if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { mPlayerActorMngr.entry(daPy_getPlayerActorClass()); dComIfGp_event_reset(); field_0xe22 = 3; } - } - if (mType == TYPE_1) { - mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); - } else { - mJntAnm.lookPlayer(0); - } - if (mTwilight == 0 && field_0x1003 == 2) { - mJntAnm.lookNone(0); - break; + if (mType == TYPE_1) { + mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + } else { + mJntAnm.lookPlayer(0); + if (mTwilight == 0 && field_0x1003 == 2) { + mJntAnm.lookNone(0); + } + } + // if (mTwilight == 0 && field_0x1003 == 2) { + // mJntAnm.lookNone(0); + // } + // mJntAnm.lookPlayer(0); + // step(field_0xdc8, 8, 0xe, 0xf, 0); } mJntAnm.lookPlayer(0); step(field_0xdc8, 8, 0xe, 0xf, 0); From cf7a68ace2dc3946d744ef30cdea29b81b3f1e57 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Thu, 27 Feb 2025 21:55:22 -0500 Subject: [PATCH 32/41] Reworking Jagar talk() --- src/d/actor/d_a_npc_jagar.cpp | 99 +++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 40 deletions(-) diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index e6bb7f9e82b..8bc44c1f8ec 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -2076,14 +2076,13 @@ int daNpc_Jagar_c::chkSitMotion2() { /* 80A17984-80A179F8 003364 0074+00 3/3 0/0 0/0 .text chkChuMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkChuMotion() { if (daNpcT_chkEvtBit(0x235) == 0 && daNpcT_chkEvtBit(0x1c) != 0) { - if (daNpcT_chkEvtBit(0x87) == 0) { - return (field_0x1001 = 0) ? 1 : 0; // Is this right? + if (daNpcT_chkEvtBit(0x87) != 0) { + return false; } else { - return 0; + return field_0x1001 == 0 ? 1 : 0; } - } else { - return 0; } + return false; } /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ @@ -2433,13 +2432,16 @@ int daNpc_Jagar_c::talk(void* param_0) { if (!field_0xd08.checkStagger()) { if (mType == TYPE_1) { daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); - if (bo && bo->getType() == TYPE_1 && - (unsigned int)!bo->field_0xd08.checkStagger() >> 5) { // Bit shift not correct - mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); - if ((cM_rnd() -0.5f) + -10.0f < 0.0f) { - mMotionSeqMngr.setNo(4, -1.0f, 0, 0); - } else { - mMotionSeqMngr.setNo(1, -1.0f, 0, 0); + if (bo) { + if (bo->getType() == TYPE_1) { + if ((bo->field_0xd08.checkStagger() == 0) ? 0 : 1) { + mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); + if ((cM_rnd() -0.5f) + -10.0f < 0.0f) { + mMotionSeqMngr.setNo(1, -1.0f, 0, 0); + } else { + mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + } + } } } switch (field_0xfec) { @@ -2454,41 +2456,58 @@ int daNpc_Jagar_c::talk(void* param_0) { } field_0xe22 = 2; } - case 2: + // case 2: + } if (!field_0xd08.checkStagger()) { - if (mTwilight == 0 && field_0xdc8 != mCurAngle.y) { - if (mType != TYPE_1 && field_0x1003 == 0) { - // mJntAnm.lookPlayer(0); - // step(field_0xdc8, 8, 0xe, 0xf, 0); - } - } else { - if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { + if (!mTwilight) { + if (field_0xdc8 != mCurAngle.y) { + if (mType != TYPE_1) { + if (field_0x1003 == 0) { + mJntAnm.lookPlayer(0); + step(field_0xdc8,8,0xe,0xf,0); + } + } + + } else + if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow() == 1) { mPlayerActorMngr.entry(daPy_getPlayerActorClass()); dComIfGp_event_reset(); field_0xe22 = 3; } - if (mType == TYPE_1) { - mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); - } else { - mJntAnm.lookPlayer(0); - if (mTwilight == 0 && field_0x1003 == 2) { - mJntAnm.lookNone(0); - } - } - // if (mTwilight == 0 && field_0x1003 == 2) { - // mJntAnm.lookNone(0); - // } - // mJntAnm.lookPlayer(0); - // step(field_0xdc8, 8, 0xe, 0xf, 0); } - mJntAnm.lookPlayer(0); - step(field_0xdc8, 8, 0xe, 0xf, 0); + // if (mTwilight == 0 && field_0xdc8 != mCurAngle.y) { + // if (mType != TYPE_1 && field_0x1003 == 0) { + // // mJntAnm.lookPlayer(0); + // // step(field_0xdc8, 8, 0xe, 0xf, 0); + // } + // } else { + // if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { + // mPlayerActorMngr.entry(daPy_getPlayerActorClass()); + // dComIfGp_event_reset(); + // field_0xe22 = 3; + // } + // if (mType == TYPE_1) { + // mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + // } else { + // mJntAnm.lookPlayer(0); + // if (mTwilight == 0 && field_0x1003 == 2) { + // mJntAnm.lookNone(0); + // } + // } + // // if (mTwilight == 0 && field_0x1003 == 2) { + // // mJntAnm.lookNone(0); + // // } + // // mJntAnm.lookPlayer(0); + // // step(field_0xdc8, 8, 0xe, 0xf, 0); + // } + // mJntAnm.lookPlayer(0); + // step(field_0xdc8, 8, 0xe, 0xf, 0); + + // case 3: + // default: + // break; } - case 3: - default: - break; - } - return 0; + // return 0; } /* 80A18F28-80A18F48 004908 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Create__FPv */ From 37391143a9a4b567d915d9e56450c7ee8cc45f84 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Fri, 28 Feb 2025 17:27:50 -0500 Subject: [PATCH 33/41] Finished some functions --- include/d/actor/d_a_npc_bou.h | 35 +++-- include/d/actor/d_a_npc_jagar.h | 6 +- src/d/actor/d_a_npc_jagar.cpp | 229 ++++++++++++++------------------ 3 files changed, 128 insertions(+), 142 deletions(-) diff --git a/include/d/actor/d_a_npc_bou.h b/include/d/actor/d_a_npc_bou.h index 8322d764a69..7e9e8bf9f63 100644 --- a/include/d/actor/d_a_npc_bou.h +++ b/include/d/actor/d_a_npc_bou.h @@ -11,6 +11,20 @@ * @details * */ + class daNpc_Bou_Param_c { + public: + /* 809727F4 */ ~daNpc_Bou_Param_c(); + + struct Data { + /* 0x58 */ f32 field_0x58; + /* 0x5C */ f32 field_0x5c; + /* 0x60 */ f32 field_0x60; + /* 0x100 */ f32 field_0x100; + }; + + static const Data m; +}; + class daNpc_Bou_c : public daNpcT_c { public: /* 8096CF8C */ ~daNpc_Bou_c(); @@ -69,6 +83,12 @@ class daNpc_Bou_c : public daNpcT_c { static void* mCutNameList[9]; static u8 mCutList[108]; + BOOL chkFindWolf() { + int iVar1 = daNpcT_getDistTableIdx(field_0xfe0, field_0xfe4); + return daNpcT_c::chkFindWolf(mCurAngle.y, iVar1, field_0xfdc, daNpc_Bou_Param_c::m.field_0x5c, + daNpc_Bou_Param_c::m.field_0x58, daNpc_Bou_Param_c::m.field_0x60, daNpc_Bou_Param_c::m.field_0x100, 1); + } + BOOL speakTo() { if (field_0xf80 == 4) { if (current.pos.absXZ(daPy_getPlayerActorClass()->current.pos) < 1100.0f && strlen(mpEvtData[5].eventName) != 0) { @@ -88,22 +108,19 @@ class daNpc_Bou_c : public daNpcT_c { } private: - /* 0xE40 */ u8 field_0xE40[0xE44 - 0xE40]; + /* 0xE40 */ int field_0xe40; /* 0xE44 */ dCcD_Cyl field_0xe44; /* 0xF80 */ u8 field_0xf80; /* 0xF84 */ daNpcT_ActorMngr_c field_0xf84[3]; /* 0xF9C */ daNpcT_Path_c field_0xf9c; - /* 0xFC4 */ u8 field_0xfc4[0xFFC - 0xFC4]; + /* 0xFC4 */ u8 field_0xfc4[0xFDC - 0xFC4]; + /* 0xFDC */ int field_0xfdc; + /* 0xFE0 */ int field_0xfe0; + /* 0xFE4 */ int field_0xfe4; + /* 0xFE8 */ u8 field_0xfe8[0xFFC - 0xFE8]; }; STATIC_ASSERT(sizeof(daNpc_Bou_c) == 0xffc); -class daNpc_Bou_Param_c { -public: - /* 809727F4 */ ~daNpc_Bou_Param_c(); - - static u8 const m[156]; -}; - #endif /* D_A_NPC_BOU_H */ diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 6b992af479f..26f484c74fd 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -165,10 +165,10 @@ class daNpc_Jagar_Param_c { /* 0x90 */ f32 field_0x90; // 200.0f /* 0x94 */ f32 field_0x94; // -800.0f /* 0x98 */ f32 field_0x98; // 16.0f - /* 0x9C */ f32 field_0x9c; // 1800.0f - + /* 0x9C */ f32 field_0x9c; // 1800.0f }; - static daNpc_Jagar_Param_c::param const m; + + static const param m; }; #endif /* D_A_NPC_JAGAR_H */ diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 8bc44c1f8ec..1e9e0358c64 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1648,19 +1648,19 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { int iVar10 = 0; int iVar9 = 0; fopAc_ac_c* iVar2; - int *piVar5 = (int *)dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + int *piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); if (piVar5) { iVar12 = *piVar5; } - piVar5 = (int *)dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); + piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); if (piVar5) { iVar11 = *piVar5; } - piVar5 = (int *)dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2"); + piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2"); if (piVar5) { iVar10 = *piVar5; } - piVar5 = (int *)dComIfGp_evmng_getMyIntegerP(param_0, "send"); + piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "send"); if (piVar5) { iVar9 = *piVar5; } @@ -1673,6 +1673,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { initTalk(field_0xa7c, NULL); break; case 7: + if (mActorMngr[1].getActorP()) dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); break; default: @@ -2034,27 +2035,16 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { /* 80A17898-80A17924 003278 008C+00 1/1 0/0 0/0 .text chkSitMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkSitMotion() { - // if (daNpcT_chkEvtBit(0x235) == 0) { - // if (daNpcT_chkEvtBit(0x1c) != 0) { - // if (daNpcT_chkEvtBit(0x87) != 0) { - // return 0; - // } - // if (field_0x1002 != 0) { // 0 or TYPE_0? - // return 0; - // } - // } - // } else if (field_0x1002 != 0) { // 0 or TYPE_0? - // return 0; - // } - // return 1; - if ((daNpcT_chkEvtBit(0x235) == 0)) { - if (daNpcT_chkEvtBit(0x1c) != 0) { - if (daNpcT_chkEvtBit(0x87) != 0) { - return 0; - } + if ((daNpcT_chkEvtBit(0x235) != 0)) { + if (field_0x1002) { + return 0; + } + } else if (daNpcT_chkEvtBit(0x1c) != 0) { + if (daNpcT_chkEvtBit(0x87) != 0) { + return 0; + } else if (field_0x1002) { + return 0; } - } else if (field_0x1002) { - return 0; } return 1; } @@ -2087,12 +2077,19 @@ int daNpc_Jagar_c::chkChuMotion() { /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkToMotion() { - int rv = 0; + // The inline assembly was the only way I could find to get proper regalloc + asm { + li r0, 0x0 // int rv = 0; + lwz r3, 0xb7c(r3) // Loads mMotionSeqMngr into register 3 + } if (mMotionSeqMngr.getNo() == 10 || mMotionSeqMngr.getNo() == 11 || mMotionSeqMngr.getNo() == 12 || mMotionSeqMngr.getNo() == 13) { - rv = 1; + asm { + li r0, 0x1 // rv = 1; + } + } + asm { + clrlwi r3, r0, 24 // return rv & ((1U << 8) - 1); } - rv = rv & ((1U << 8) - 1); - return rv; } /* ############################################################################################## */ @@ -2123,24 +2120,23 @@ int daNpc_Jagar_c::wait(void* param_0) { cXyz cStack_24; cXyz cStack_3c; cXyz cStack_48; + field_0x1004 = 0; if (mType == TYPE_0) { - if(!chkSitMotion2()) { - if (chkSitMotion()) { - if (!chkChuMotion()) { - field_0x1004 = 2; - } else { - field_0x1004 = 1; - } - } - } else { + if(chkSitMotion2()) { field_0x1004 = 2; + } else if (chkSitMotion()) { + if (chkChuMotion()) { + field_0x1004 = 1; + } } + } else { + field_0x1004 = 2; } if (field_0x1004 != field_0x1003) { field_0xe22 = 1; } if (field_0xe22 != 2) { - if (field_0xe22 > 1) { + if (field_0xe22 < 1) { return 1; } if (field_0xa88 == 0) { @@ -2168,14 +2164,13 @@ int daNpc_Jagar_c::wait(void* param_0) { } else { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(2, -1.0f, 0, 0); - field_0x1003 = 1; } break; case 2: if (field_0x1003 == 1) { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(12, -1.0f, 0, 0); - } else if (field_0x1003 == 0) { + } else { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(13, -1.0f, 0, 0); } @@ -2187,7 +2182,7 @@ int daNpc_Jagar_c::wait(void* param_0) { case 0: if (mType == TYPE_2) { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(17, -1.0f, 0, 0); + mMotionSeqMngr.setNo(11, -1.0f, 0, 0); } else { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(0, -1.0f, 0, 0); @@ -2196,8 +2191,7 @@ int daNpc_Jagar_c::wait(void* param_0) { break; case 1: mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(2, -1.0f, 0, 0); - field_0x1003 = 1; + mMotionSeqMngr.setNo(13, -1.0f, 0, 0); break; case 2: mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); @@ -2210,8 +2204,8 @@ int daNpc_Jagar_c::wait(void* param_0) { case 0: daNpcT_offTmpBit(0x10); cStack_24.set(0x43fa0000, 0x41200000, 0x43fa0000); - cStack_30 = cXyz(daPy_getPlayerActorClass()->current.pos); - cStack_48.set(500.0f, 10.0f, 500.0f); + // cStack_30 = cXyz(daPy_getPlayerActorClass()->current.pos); + // cStack_48.set(500.0f, 10.0f, 500.0f); // cXyz(current.pos); if (chkPointInArea(cStack_30, cXyz(current.pos), cStack_48, 0) != 0) { if (daPy_getPlayerActorClass()->checkPlayerFly() && @@ -2293,34 +2287,37 @@ int daNpc_Jagar_c::wait(void* param_0) { int daNpc_Jagar_c::talkwithBou(void* param_0) { bool bVar2; int uVar3; - daNpcT_c *bo = (daNpcT_c *)mActorMngr[2].getActorP(); + daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); u16 uVar1 = field_0xe22; switch (field_0xe22) { case 0: - break; case 1: if (field_0xd08.checkStagger() == 0) { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(5, -1.0f, 0, 0); field_0xe22 = 2; } + case 2: + default: + break; } - if (field_0xe25 != 0 && daNpcT_chkEvtBit(0xd3) == 0 && (fopAcM_searchActorDistanceXZ(this, daPy_getPlayerActorClass()) > 1800.0f) && field_0xe34 != NULL) { + if (field_0xe25 != 0 && daNpcT_chkEvtBit(0xd3) == 0 && + (fopAcM_searchActorDistanceXZ(this, daPy_getPlayerActorClass()) > daNpc_Jagar_Param_c::m.field_0x9c) && field_0xe34 != NULL) { if (bo) { bo->field_0xe25 = 0; } field_0xe25 = 0; } if (field_0xe25 != 0) { - fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-200.0f,300.0f,300.0f,400.0f); + fopAcM_setCullSizeBox((fopAc_ac_c *)this, -300.0f, -50.0f, -200.0f, 300.0f, 300.0f, 400.0f); goto LAB_80a18a8c; } // if (field_0xe25 != 0) { - uVar3 = (int)daNpcT_getDistTableIdx(field_0xff0, field_0xff4) & 0xff; - if (!chkFindWolf(mCurAngle.y, uVar3, field_0xfec, 500.0f, 110.0f, 300.0f, -300.0f, 1)) { + uVar3 = (int)daNpcT_getDistTableIdx(field_0xff0, field_0xff4); + if (!chkFindWolf(mCurAngle.y, uVar3, field_0xfec, daNpc_Jagar_Param_c::m.field_0x54, daNpc_Jagar_Param_c::m.field_0x50, + daNpc_Jagar_Param_c::m.field_0x58, daNpc_Jagar_Param_c::m.field_0x5c, 1)) { if (bo) { - if (chkFindWolf(mCurAngle.y, (daNpcT_getDistTableIdx(daNpc_Bou_Param_c::m[84], daNpc_Bou_Param_c::m[80]) & 0xff), - field_0xfec, 500.0f, 110.0f, 300.0f, -300.0f, 1)) { + if (bo->chkFindWolf()) { goto LAB_80a18744; } } @@ -2331,11 +2328,11 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { if (bo) { if (field_0x1005 == 0) { if (cLib_calcTimer(&field_0xff8) == 0) { - if (field_0xd08.checkStagger() == 0) { + if (field_0xd08.checkStagger()) { if (mMotionSeqMngr.getNo() == 7 || mMotionSeqMngr.getNo() == 6 || mMotionSeqMngr.getNo() == 8) { - if(mMotionSeqMngr.getStepNo() < 1) goto LAB_80a187c4; + if(mMotionSeqMngr.getStepNo() <= 1) goto LAB_80a187c4; bVar2 = true; } else if (mMotionSeqMngr.getNo() == 5) { bVar2 = true; @@ -2351,7 +2348,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { if (mMotionSeqMngr.getNo() == 3 || mMotionSeqMngr.getNo() == 2 || mMotionSeqMngr.getNo() == 4) { - if(mMotionSeqMngr.getStepNo() < 1) goto LAB_80a18824; + if(mMotionSeqMngr.getStepNo() <= 1) goto LAB_80a18824; bVar2 = true; } else if (mMotionSeqMngr.getNo() == 1) { bVar2 = true; @@ -2362,9 +2359,9 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { } if (bVar2) { field_0xff8 = cLib_getRndValue(45.0f, 142.0f); - if (field_0x1000 == 0) { + if ((field_0x1000 ^ 1) & 1 == 1) { bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); - if ((cM_rnd() - 0.5f) <= 0.0f) { + if (0.0f < 0.0f + (cM_rnd() - 0.5f)) { bo->mMotionSeqMngr.setNo(1, -1.0f, 0, 0); } else { bo->mMotionSeqMngr.setNo(4, -1.0f, 0, 0); @@ -2376,9 +2373,9 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { bo->mMotionSeqMngr.setNo(2, -1.0f, 0, 0); mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); if ((cM_rnd() - 0.5f) + 0.0f < 0.0f) { - mMotionSeqMngr.setNo(5, -1.0f, 0, 0); - } else { mMotionSeqMngr.setNo(8, -1.0f, 0, 0); + } else { + mMotionSeqMngr.setNo(5, -1.0f, 0, 0); } } } @@ -2417,97 +2414,69 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { // // } LAB_80a18a8c: if (bo) { - mJntAnm.lookActor((fopAc_ac_c *)bo, -40.0f, 0); + mJntAnm.lookActor((fopAc_ac_c *)bo, -50.0f, 0); } else { mJntAnm.lookNone(0); } return 1; } +/* REGALLOC ISSUE */ /* 80A18B74-80A18F28 004554 03B4+00 3/0 0/0 0/0 .text talk__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::talk(void* param_0) { - switch (field_0xe22) { + switch(field_0xe22) { case 0: case 1: - if (!field_0xd08.checkStagger()) { - if (mType == TYPE_1) { - daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); - if (bo) { - if (bo->getType() == TYPE_1) { - if ((bo->field_0xd08.checkStagger() == 0) ? 0 : 1) { - mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); - if ((cM_rnd() -0.5f) + -10.0f < 0.0f) { - mMotionSeqMngr.setNo(1, -1.0f, 0, 0); - } else { - mMotionSeqMngr.setNo(4, -1.0f, 0, 0); - } - } - } - } - switch (field_0xfec) { - case 4: - initTalk(0xd6, NULL); - break; - default: - initTalk(0xd5, NULL); + if (!field_0xd08.checkStagger()) { + if (mType == TYPE_1) { + daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); + if (bo && bo->getType() == TYPE_1 && ((bo->field_0xd08.checkStagger()) ? 0 : 1)) { + mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); + if (0.0f < -10.0f + (cM_rnd() - 0.5f)) { + mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + } else { + mMotionSeqMngr.setNo(1, -1.0f, 0, 0); } - } else { - initTalk(field_0xa7c, NULL); } - field_0xe22 = 2; + switch (field_0xfec) { + case 4: + initTalk(0xd6, NULL); + break; + default: + initTalk(0xd5, NULL); + } + } else { + initTalk(field_0xa7c, NULL); } - // case 2: + field_0xe22 = 2; } + case 2: if (!field_0xd08.checkStagger()) { - if (!mTwilight) { - if (field_0xdc8 != mCurAngle.y) { - if (mType != TYPE_1) { - if (field_0x1003 == 0) { - mJntAnm.lookPlayer(0); - step(field_0xdc8,8,0xe,0xf,0); - } - } - - } else - if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow() == 1) { + if (mTwilight != 0 || field_0xdc8 == mCurAngle.y || mType == TYPE_1 || field_0x1003 != 0) { + if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { mPlayerActorMngr.entry(daPy_getPlayerActorClass()); dComIfGp_event_reset(); field_0xe22 = 3; } + if (mType == TYPE_1) { + mJntAnm.lookActor(mActorMngr[2].getActorP(), -50.0f, 0); + } else { + mJntAnm.lookPlayer(0); + if (mTwilight != 0 || field_0x1003 == 2) { + mJntAnm.lookNone(0); + } + } + } else { + mJntAnm.lookPlayer(0); + step(field_0xdc8, 8, 14, 15, 0); } - // if (mTwilight == 0 && field_0xdc8 != mCurAngle.y) { - // if (mType != TYPE_1 && field_0x1003 == 0) { - // // mJntAnm.lookPlayer(0); - // // step(field_0xdc8, 8, 0xe, 0xf, 0); - // } - // } else { - // if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { - // mPlayerActorMngr.entry(daPy_getPlayerActorClass()); - // dComIfGp_event_reset(); - // field_0xe22 = 3; - // } - // if (mType == TYPE_1) { - // mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); - // } else { - // mJntAnm.lookPlayer(0); - // if (mTwilight == 0 && field_0x1003 == 2) { - // mJntAnm.lookNone(0); - // } - // } - // // if (mTwilight == 0 && field_0x1003 == 2) { - // // mJntAnm.lookNone(0); - // // } - // // mJntAnm.lookPlayer(0); - // // step(field_0xdc8, 8, 0xe, 0xf, 0); - // } - // mJntAnm.lookPlayer(0); - // step(field_0xdc8, 8, 0xe, 0xf, 0); - - // case 3: - // default: - // break; } - // return 0; + break; + case 3: + default: + break; + } + return 0; } /* 80A18F28-80A18F48 004908 0020+00 1/0 0/0 0/0 .text daNpc_Jagar_Create__FPv */ From 44f37d9951cbb8f281be265b820ba905c8ef4361 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Fri, 28 Feb 2025 21:21:10 -0500 Subject: [PATCH 34/41] Attempting to rework cutNeedYourHelp --- include/d/actor/d_a_npc.h | 6 ++ include/d/actor/d_a_npc_jagar.h | 4 +- src/d/actor/d_a_npc_jagar.cpp | 183 ++++++++++++++++++++++++-------- 3 files changed, 145 insertions(+), 48 deletions(-) diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h index cea1ddea720..356a15d3fc5 100644 --- a/include/d/actor/d_a_npc.h +++ b/include/d/actor/d_a_npc.h @@ -254,6 +254,12 @@ class daNpcT_JntAnm_c { setMode(1, 0); setDirect(isDirect); } + + void lookPos(u8 param_1, u8 isDirect) { + setMode(3, ((int)mAttnPosP == param_1) ? 0 : 1); + setMode(1, 0); + setDirect(isDirect); + } void lookCamera(u8 isDirect) { setMode(4, 0); diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 26f484c74fd..bec314085df 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -116,7 +116,7 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x1008 */ int field_0x1008; }; -// STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); +STATIC_ASSERT(sizeof(daNpc_Jagar_c) == 0x100c); class daNpc_Jagar_Param_c { public: @@ -165,7 +165,7 @@ class daNpc_Jagar_Param_c { /* 0x90 */ f32 field_0x90; // 200.0f /* 0x94 */ f32 field_0x94; // -800.0f /* 0x98 */ f32 field_0x98; // 16.0f - /* 0x9C */ f32 field_0x9c; // 1800.0f + /* 0x9C */ f32 field_0x9c; // 1800.0f }; static const param m; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 1e9e0358c64..eae57b6eef7 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1641,31 +1641,31 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { /* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ -int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { +int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { int rv = 0; int iVar12 = -1; int iVar11 = 0; int iVar10 = 0; int iVar9 = 0; - fopAc_ac_c* iVar2; - int *piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + void* pvVar7; + int* piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); if (piVar5) { iVar12 = *piVar5; } - piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); + piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "msgNo"); if (piVar5) { iVar11 = *piVar5; } - piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2"); + piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "msgNo2"); if (piVar5) { iVar10 = *piVar5; } - piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "send"); + piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "send"); if (piVar5) { iVar9 = *piVar5; } - if (dComIfGp_getEventManager().getIsAddvance(param_0)) { - switch (iVar12) { + if (dComIfGp_getEventManager().getIsAddvance(param_1)) { + switch(iVar12) { case 0: dComIfGp_getEvent().setPt2(mActorMngr[0].getActorP()); break; @@ -1673,8 +1673,10 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { initTalk(field_0xa7c, NULL); break; case 7: - if (mActorMngr[1].getActorP()) - dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); + pvVar7 = mActorMngr[1].getActorP(); + if (pvVar7) { + dComIfGp_getEvent().setPt2(pvVar7); + } break; default: field_0x1002 = 0; @@ -1684,18 +1686,14 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { switch (iVar12) { case 0: mJntAnm.lookNone(0); - iVar9 = mMotionSeqMngr.getNo(); - if (iVar9 == 10) { - if (mMotionSeqMngr.getNo() < 1) { + if (mMotionSeqMngr.getNo() == 10) { + if (mMotionSeqMngr.getStepNo()) { return 0; } mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(0, -1.0f, 0, 0); return 1; } - if (iVar9 == 0) { - return 0; - } if (mMotionSeqMngr.getNo() != 0) { return 0; } @@ -1705,53 +1703,146 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_0) { if (field_0xdc8 == mCurAngle.y) { return 1; } - step(field_0xdc8, 8, 0xe, 0xf, 0); - return 0; - case 3: - case 4: + step(field_0xdc8,8,0xe,0xf,0); + break; case 5: - iVar2 = mActorMngr[0].getActorP(); - if (iVar2) { - field_0xd6c.setall(0.0); - current.pos.absXZ(iVar2->current.pos); - mDoMtx_stack_c::YrotS(mCurAngle.y); - mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); - field_0xd6c += current.pos; - mJntAnm.setMode(3, 0); - } - goto LAB_80a16c58; + case 4: case 6: - return 0; + mJntAnm.lookPlayer(0); + break; // Or LAB_80a16c58:?? case 7: - iVar2 = mActorMngr[1].getActorP(); - if (iVar2) { - field_0xd6c.setall(0.0); - current.pos.absXZ(iVar2->current.pos); - mDoMtx_stack_c::YrotS(mCurAngle.y); + if (mActorMngr[0].getActorP() != 0) { + field_0xd6c.setall(0.0f); + current.pos.absXZ(mActorMngr[0].getActorP()->current.pos); + mDoMtx_stack_c::YrotS(mCurAngle.y + -0x4000); mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); field_0xd6c += current.pos; - mJntAnm.setMode(3, 0); + mJntAnm.lookPos((int)&field_0xd6c, 0); } - goto LAB_80a16c58; case 8: return 1; default: - mJntAnm.lookPlayer(0); - } -LAB_80a16c58: - if (talkProc(&iVar11, iVar9, NULL, 0)) { - if (iVar11 == 0 && iVar10 == 0) { - if (mFlow.checkEndFlow()) { + if (talkProc((int*)&iVar11, iVar9, NULL, 0)) { + if (mFlow.checkEndFlow() == 1) { rv = 1; } - } else { - rv = 1; } + break; } if (iVar12 == 4) { rv = 1; } return rv; +// int rv = 0; + // int iVar12 = -1; + // int iVar11 = 0; + // int iVar10 = 0; + // int iVar9 = 0; +// fopAc_ac_c* iVar2; + // int *piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + // if (piVar5) { + // iVar12 = *piVar5; + // } + // piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); + // if (piVar5) { + // iVar11 = *piVar5; + // } + // piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2"); + // if (piVar5) { + // iVar10 = *piVar5; + // } + // piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "send"); + // if (piVar5) { + // iVar9 = *piVar5; + // } +// if (dComIfGp_getEventManager().getIsAddvance(param_0)) { +// switch (iVar12) { +// case 0: +// dComIfGp_getEvent().setPt2(mActorMngr[0].getActorP()); +// break; +// case 1: + // initTalk(field_0xa7c, NULL); + // break; +// case 7: +// if (mActorMngr[1].getActorP()) +// dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); +// break; +// default: +// field_0x1002 = 0; +// field_0x1003 = 0; +// } +// } +// switch (iVar12) { +// case 0: +// mJntAnm.lookNone(0); +// iVar9 = mMotionSeqMngr.getNo(); +// if (iVar9 == 10) { +// if (mMotionSeqMngr.getNo() < 1) { +// return 0; +// } + // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + // mMotionSeqMngr.setNo(0, -1.0f, 0, 0); +// return 1; +// } +// if (iVar9 == 0) { +// return 0; +// } +// if (mMotionSeqMngr.getNo() != 0) { +// return 0; +// } +// return 1; +// case 1: +// mJntAnm.lookPlayer(0); +// if (field_0xdc8 == mCurAngle.y) { +// return 1; +// } +// step(field_0xdc8, 8, 0xe, 0xf, 0); +// return 0; +// case 3: +// case 4: +// case 5: +// iVar2 = mActorMngr[0].getActorP(); +// if (iVar2) { +// field_0xd6c.setall(0.0); +// current.pos.absXZ(iVar2->current.pos); +// mDoMtx_stack_c::YrotS(mCurAngle.y); +// mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); +// field_0xd6c += current.pos; +// mJntAnm.setMode(3, 0); +// } +// goto LAB_80a16c58; +// case 6: +// return 0; +// case 7: +// iVar2 = mActorMngr[1].getActorP(); +// if (iVar2) { +// field_0xd6c.setall(0.0); +// current.pos.absXZ(iVar2->current.pos); +// mDoMtx_stack_c::YrotS(mCurAngle.y); +// mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); +// field_0xd6c += current.pos; +// mJntAnm.setMode(3, 0); +// } +// goto LAB_80a16c58; +// case 8: +// return 1; +// default: +// mJntAnm.lookPlayer(0); +// } +// LAB_80a16c58: + // if (talkProc(&iVar11, iVar9, NULL, 0)) { +// if (iVar11 == 0 && iVar10 == 0) { + // if (mFlow.checkEndFlow()) { + // rv = 1; + // } + // } else { + // rv = 1; + // } +// } + // if (iVar12 == 4) { + // rv = 1; + // } +// return rv; } /* 80A16CD8-80A16EFC 0026B8 0224+00 1/0 0/0 0/0 .text cutAnger__13daNpc_Jagar_cFi */ From cd1a498601301ee3c049bc0d395269438a8e3f91 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Sat, 1 Mar 2025 21:32:36 -0500 Subject: [PATCH 35/41] Almost(ish) done with Jaggle --- include/d/actor/d_a_npc.h | 6 - include/d/actor/d_a_npc_jagar.h | 1 + src/d/actor/d_a_npc_jagar.cpp | 557 +++++++++++++++++--------------- 3 files changed, 304 insertions(+), 260 deletions(-) diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h index b3b3ca91f7f..2e375eb90b4 100644 --- a/include/d/actor/d_a_npc.h +++ b/include/d/actor/d_a_npc.h @@ -266,12 +266,6 @@ class daNpcT_JntAnm_c { setMode(LOOK_PLAYER, FALSE); setDirect(isDirect); } - - void lookPos(u8 param_1, u8 isDirect) { - setMode(3, ((int)mAttnPosP == param_1) ? 0 : 1); - setMode(1, 0); - setDirect(isDirect); - } void lookCamera(u8 isDirect) { setMode(LOOK_CAMERA, FALSE); diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index bec314085df..5acd70eaa8c 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -13,6 +13,7 @@ */ class daNpc_Bou_c; // Temporary +class daTag_Push_c; class daNpc_Jagar_c : public daNpcT_c { public: diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index eae57b6eef7..212acb4cce2 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -828,7 +828,7 @@ int daNpc_Jagar_c::create() { (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList ); mType = getType(); - field_0xa7c = getFlowNodeNo(); + mFlowNodeNo = getFlowNodeNo(); mTwilight = 0; /* WIP */ int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (rv == cPhs_COMPLEATE_e) { @@ -849,7 +849,7 @@ int daNpc_Jagar_c::create() { field_0x9c0.init(&mAcch, 0.0f, 0.0f); reset(); mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, - &field_0x8a0, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), + &mAcchCir, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), fopAcM_GetShapeAngle_p(this)); mCcStts.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); mCyl1.Set(mCcDCyl); // <-- Check value?? @@ -862,9 +862,9 @@ int daNpc_Jagar_c::create() { setEnvTevColor(); setRoomNo(); } - field_0xa88 = 1; + mCreating = 1; Execute(); - field_0xa88 = 0; + mCreating = 0; } return rv; } @@ -1028,11 +1028,11 @@ void daNpc_Jagar_c::reset() { /* 80A15364-80A153E8 000D44 0084+00 1/0 0/0 0/0 .text afterJntAnm__13daNpc_Jagar_cFi */ void daNpc_Jagar_c::afterJntAnm(int param_1) { if (param_1 == 1) { - mDoMtx_stack_c::YrotM(field_0xd08.getAngleZ(1)); - mDoMtx_stack_c::ZrotM(-field_0xd08.getAngleX(1)); + mDoMtx_stack_c::YrotM(mStagger.getAngleZ(1)); + mDoMtx_stack_c::ZrotM(-mStagger.getAngleX(1)); } else if (param_1 == 4) { - mDoMtx_stack_c::YrotM(field_0xd08.getAngleZ(0)); - mDoMtx_stack_c::ZrotM(field_0xd08.getAngleX(0)); + mDoMtx_stack_c::YrotM(mStagger.getAngleZ(0)); + mDoMtx_stack_c::ZrotM(mStagger.getAngleX(0)); } } @@ -1089,14 +1089,14 @@ void daNpc_Jagar_c::setParam() { scale.set(daNpc_Jagar_Param_c::m.field_0x08, daNpc_Jagar_Param_c::m.field_0x08, daNpc_Jagar_Param_c::m.field_0x08); mCcStts.SetWeight(daNpc_Jagar_Param_c::m.field_0x10); - field_0xdec = daNpc_Jagar_Param_c::m.field_0x14; - field_0xdf0 = daNpc_Jagar_Param_c::m.field_0x1c; - field_0xdf8 = daNpc_Jagar_Param_c::m.field_0x50; - field_0x8a0.SetWallR(field_0xdf0); - field_0x8a0.SetWallH(daNpc_Jagar_Param_c::m.field_0x18); + mCylH = daNpc_Jagar_Param_c::m.field_0x14; + mWallR = daNpc_Jagar_Param_c::m.field_0x1c; + mAttnFovY = daNpc_Jagar_Param_c::m.field_0x50; + mAcchCir.SetWallR(mWallR); + mAcchCir.SetWallH(daNpc_Jagar_Param_c::m.field_0x18); field_0xde8 = daNpc_Jagar_Param_c::m.field_0x0c; field_0xa80 = daNpc_Jagar_Param_c::m.field_0x6c; - field_0xa84 = daNpc_Jagar_Param_c::m.field_0x44; + mMorfFrames = daNpc_Jagar_Param_c::m.field_0x44; gravity = daNpc_Jagar_Param_c::m.field_0x04; } @@ -1104,7 +1104,7 @@ void daNpc_Jagar_c::setParam() { */ int daNpc_Jagar_c::checkChangeEvt() { if (!chkAction(&daNpc_Jagar_c::talk)) { - field_0xe2e[0] = 0; + mPreItemNo = 0; if (dComIfGp_event_chkTalkXY()) { if (dComIfGp_evmng_ChkPresentEnd()) { mEvtNo = 1; @@ -1191,11 +1191,11 @@ BOOL daNpc_Jagar_c::evtTalk() { BOOL daNpc_Jagar_c::evtCutProc() { int staffId = dComIfGp_getEventManager().getMyStaffId("Jagar", this, -1); if (staffId != -1) { - field_0xdac = staffId; + mStaffId = staffId; int actIdx = - dComIfGp_getEventManager().getMyActIdx(field_0xdac, (char**)mCutNameList, 7, 0, 0); - if ((this->*(mCutList[actIdx]))(field_0xdac) != 0) { - dComIfGp_getEventManager().cutEnd(field_0xdac); + dComIfGp_getEventManager().getMyActIdx(mStaffId, (char**)mCutNameList, 7, 0, 0); + if ((this->*(mCutList[actIdx]))(mStaffId) != 0) { + dComIfGp_getEventManager().cutEnd(mStaffId); } return true; } @@ -1209,7 +1209,7 @@ void daNpc_Jagar_c::action() { if (mType == TYPE_1) { daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); if (bo && bo->getType() == TYPE_1) { - if (bo->field_0xd08.checkStagger() ? 0 : 1) { + if (bo->mStagger.checkStagger() ? 0 : 1) { bo->mFaceMotionSeqMngr.setNo(1, -1, 0, 0); bo->mMotionSeqMngr.setNo(3, -1, 0, 0); field_0xff8 = 0; @@ -1218,17 +1218,17 @@ void daNpc_Jagar_c::action() { } } if (field_0x1003 != 2 && field_0x1004 != 2) { - field_0xd08.setParam(this, hitActor, mCurAngle.y); + mStagger.setParam(this, hitActor, mCurAngle.y); setDamage(0, 8, 0); mDamageTimerStart = 0; mJntAnm.setMode(0, 0); mJntAnm.setDirect(1); } } - if (field_0xd08.checkRebirth()) { - field_0xd08.initialize(); + if (mStagger.checkRebirth()) { + mStagger.initialize(); field_0x1003 = 0; - field_0xe22 = 1; + mMode = 1; } if (field_0xfd4) { if (field_0xfe0 == field_0xfd4) { @@ -1427,7 +1427,7 @@ static u8 l_HIO[4]; /* 80A15D68-80A1607C 001748 0314+00 1/0 0/0 0/0 .text setAttnPos__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setAttnPos() { cXyz cStack_3c(-10.0f, 10.0f, 0.0f); - field_0xd08.calc(0); + mStagger.calc(0); f32 dVar8 = cM_s2rad(mCurAngle.y - field_0xd7e.y); J3DModel* model = mpMorf[0]->getModel(); mJntAnm.setParam(this, model, &cStack_3c, getBackboneJointNo(), getNeckJointNo(), @@ -1502,14 +1502,14 @@ void daNpc_Jagar_c::setAttnPos() { /* 80A1607C-80A161EC 001A5C 0170+00 1/0 0/0 0/0 .text setCollision__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setCollision() { cXyz cStack_48; - if (field_0xe25 == 0) { + if (mHide == 0) { u32 tgType = -0x27040201; u32 tgSPrm = 0x1f; if (mTwilight) { tgType = 0; tgSPrm = 0; } else { - if (field_0xd08.checkStagger()) { + if (mStagger.checkStagger()) { tgType = 0; tgSPrm = 0; } @@ -1519,8 +1519,8 @@ void daNpc_Jagar_c::setCollision() { mCyl1.SetTgSPrm(tgSPrm); mCyl1.OnTgNoHitMark(); cStack_48.set(0.0f, 0.0f, 0.0f); - f32 cylHeight = field_0xdec; - f32 cylRadius = field_0xdf0; + f32 cylHeight = mCylH; + f32 cylRadius = mWallR; if (field_0x1004 == 2) { cylHeight = 70.0f; cylRadius = 90.0f; @@ -1574,11 +1574,11 @@ int daNpc_Jagar_c::chkAction(int (daNpc_Jagar_c::*action)(void*)) { /* 80A162DC-80A16384 001CBC 00A8+00 2/2 0/0 0/0 .text * setAction__13daNpc_Jagar_cFM13daNpc_Jagar_cFPCvPvPv_i */ int daNpc_Jagar_c::setAction(int (daNpc_Jagar_c::*action)(void*)) { - field_0xe22 = 3; + mMode = 3; if (field_0xfe0 != NULL) { (this->*field_0xfe0)(NULL); } - field_0xe22 = 0; + mMode = 0; field_0xfe0 = action; if (field_0xfe0 != NULL) { (this->*field_0xfe0)(NULL); @@ -1602,7 +1602,7 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { mJntAnm.lookNone(1); field_0x1003 = 1; setAngle(home.angle.y); - initTalk(field_0xa7c, NULL); + initTalk(mFlowNodeNo, NULL); break; case 2: break; @@ -1647,6 +1647,8 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { int iVar11 = 0; int iVar10 = 0; int iVar9 = 0; + fopAc_ac_c* pfVar8; + fopAc_ac_c* iVar6; void* pvVar7; int* piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); if (piVar5) { @@ -1670,7 +1672,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { dComIfGp_getEvent().setPt2(mActorMngr[0].getActorP()); break; case 1: - initTalk(field_0xa7c, NULL); + initTalk(mFlowNodeNo, NULL); break; case 7: pvVar7 = mActorMngr[1].getActorP(); @@ -1687,52 +1689,64 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { case 0: mJntAnm.lookNone(0); if (mMotionSeqMngr.getNo() == 10) { - if (mMotionSeqMngr.getStepNo()) { - return 0; + if (mMotionSeqMngr.getStepNo() <= 0) { + break; } mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(0, -1.0f, 0, 0); return 1; } - if (mMotionSeqMngr.getNo() != 0) { + if (mMotionSeqMngr.getNo()) { return 0; } return 1; case 1: mJntAnm.lookPlayer(0); - if (field_0xdc8 == mCurAngle.y) { + if (mPlayerAngle == mCurAngle.y) { return 1; } - step(field_0xdc8,8,0xe,0xf,0); + step(mPlayerAngle,8,0xe,0xf,0); break; - case 5: + case 3: case 4: - case 6: - mJntAnm.lookPlayer(0); - break; // Or LAB_80a16c58:?? + case 5: + pfVar8 = mActorMngr[0].getActorP(); + if (pfVar8) { + field_0xd6c.setall(0.0f); + field_0xd6c.z = current.pos.absXZ(pfVar8->current.pos); + mDoMtx_stack_c::YrotS(mCurAngle.y + 0x4000); + mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); + field_0xd6c += current.pos; + mJntAnm.lookPos(&field_0xd6c, 0); + } + goto LAB_80a16c58; case 7: - if (mActorMngr[0].getActorP() != 0) { + iVar6 = mActorMngr[1].getActorP(); + if (iVar6) { field_0xd6c.setall(0.0f); - current.pos.absXZ(mActorMngr[0].getActorP()->current.pos); + field_0xd6c.z = current.pos.absXZ(pfVar8->current.pos); mDoMtx_stack_c::YrotS(mCurAngle.y + -0x4000); mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); field_0xd6c += current.pos; - mJntAnm.lookPos((int)&field_0xd6c, 0); + mJntAnm.lookPos(&field_0xd6c, 0); } + goto LAB_80a16c58; case 8: return 1; - default: - if (talkProc((int*)&iVar11, iVar9, NULL, 0)) { - if (mFlow.checkEndFlow() == 1) { - rv = 1; - } - } - break; } - if (iVar12 == 4) { - rv = 1; +LAB_80a16c58: +mJntAnm.lookPlayer(0); +if (talkProc((int*)&iVar11, iVar9, NULL, 0)) { + if (!iVar11 && !iVar10) { + if (mFlow.checkEndFlow() == 1) { + rv = 1; + } } - return rv; +} +if (iVar12 == 4) { + rv = 1; +} +return rv; // int rv = 0; // int iVar12 = -1; // int iVar11 = 0; @@ -1862,7 +1876,7 @@ int daNpc_Jagar_c::cutAnger(int param_0) { field_0x1003 = 0; sVar3 = fopAcM_searchActorAngleY(this, dComIfGp_getPlayer(0)); setAngle(sVar3); - initTalk(field_0xa7c, NULL); + initTalk(mFlowNodeNo, NULL); case 1: break; } @@ -1897,23 +1911,27 @@ int daNpc_Jagar_c::cutAnger(int param_0) { /* 80A16EFC-80A1705C 0028DC 0160+00 1/0 0/0 0/0 .text cutConversationWithBou__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { - fopAc_ac_c* iVar1 = field_0xba0.getActorP(); + daTag_Push_c* this_00 = (daTag_Push_c*)field_0xba0.getActorP(); int rv = 0; int iVar5 = -1; - int* piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); - if (piVar2 != NULL) { + int* piVar2 = (int*)dComIfGp_evmng_getMyIntegerP(param_0, "prm"); + if (piVar2) { iVar5 = *piVar2; } - fopAc_ac_c* bo = mActorMngr[2].getActorP(); - fopAc_ac_c* jaggle = (fopAc_ac_c *) this; - dComIfGp_setMesgCameraInfoActor(jaggle, bo, 0, 0, 0, 0, 0, 0, 0, 0); + fopAc_ac_c* actors[2] = {(fopAc_ac_c *) this, mActorMngr[2].getActorP()}; + dComIfGp_setMesgCameraInfoActor(actors[0], actors[1], 0, 0, 0, 0, 0, 0, 0, 0); if (dComIfGp_getEventManager().getIsAddvance(param_0)) { - // if (iVar5 == 0) { - initTalk(getFlowNodeNo(), (fopAc_ac_c **)this); - // } + switch (iVar5) { + case 0: + initTalk(this_00->getFlowNodeNo(), &actors[0]); + } } - if (talkProc(NULL, 0, &jaggle, 0) && mFlow.checkEndFlow() == 1) { - rv = 1; + switch (iVar5) { + case 0: + iVar5 = talkProc(NULL, 0, &actors[0], 0); + if (iVar5 && mFlow.checkEndFlow() == 1) { + rv = 1; + } } return rv; } @@ -1940,11 +1958,9 @@ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { /* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text * cutConfidentialConversation__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { - bool bVar1 = true; // true is just placeholder - int rv = 0; - int iVar8 = -1; int iVar7 = 0; - int local_30[4]; + int iVar8 = -1; + int rv = 0; int* piVar2 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); if(piVar2) { iVar8 = *piVar2; @@ -1953,83 +1969,40 @@ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { if(piVar2) { iVar7 = *piVar2; } - // mActorMngr[2].getActorP(); - // local_30[2] = {-1, -1}; - local_30[0] = -1; - local_30[1] = -1; - local_30[2] = -1; - dComIfGp_setMesgCameraInfoActor(mActorMngr[2].getActorP(), (fopAc_ac_c *)this, 0, 0, 0, 0, 0, 0, 0, 0); + fopAc_ac_c* actors[2] = {(fopAc_ac_c *) this, mActorMngr[2].getActorP()}; + dComIfGp_setMesgCameraInfoActor(actors[0], actors[1], 0, 0, 0, 0, 0, 0, 0, 0); if (dComIfGp_getEventManager().getIsAddvance(param_0)) { switch (iVar8) { case 0: - if (mFaceMotionSeqMngr.getNo() != 8) { - mFaceMotionSeqMngr.setNo(0, 8, -1.0f, 0); - } - if (mMotionSeqMngr.getNo() != 5) { - mMotionSeqMngr.setNo(0, 5, -1.0f, 0); - } - // initTalk(0xd7, NULL); + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(5, -1.0f, 0, 0); + initTalk(0xd7, &actors[0]); break; - // case 2: - // // mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); - // if (mJntAnm.getMode() == 2) { - // bVar1 = false; - // } else { - // // mJntAnm.setMode(2, 1); - // bVar1 = true; - // } - // if (bVar1) { - // mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); - // } - // break; case 1: dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); - // if (mFaceMotionSeqMngr.getNo() != 8) { - // // mFaceMotionSeqMngr.setNo(0, 8, -1.0f, 0); - // } - // if (mMotionSeqMngr.getNo() != 5) { - // // mMotionSeqMngr.setNo(0, 5, -1.0f, 0); - // } - // if (mJntAnm.getMode() == 2) { - // bVar1 = false; - // } else { - // // mJntAnm.setMode(2, 1); - // bVar1 = true; - // } - // if (bVar1) { - // mJntAnm.lookActor(mActorMngr[1].getActorP(), 0.0f, 0); - // } - // break; - // case 4: - // mEvtNo = 7; - // evtChange(); + case 2: + break; } } - switch (iVar8) { - case 0: - break; - case 1: - // if (mJntAnm.getMode() == 2) { - // bVar1 = false; - // } else { - // mJntAnm.setMode(2, 1); - // bVar1 = true; - // } - if (bVar1) { - mJntAnm.lookActor(mActorMngr[1].getActorP(), 0.0f, 0); - } - break; - case 2: - mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); - break; - // default: - // // mEvtNo = 7; - // evtChange(); - + int local_30[3] = {-1, -1, -1}; + if (iVar8 == 0 || iVar8 == 2) { + mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); + } else if (iVar8 == 1) { + fopAc_ac_c* pfVar3 = mActorMngr[1].getActorP(); + mJntAnm.lookActor(pfVar3, 0.0f, 0); } local_30[0] = iVar7; - if (talkProc(local_30, 0, (fopAc_ac_c **)&local_30, 0) && mFlow.checkEndFlow()) { - return 1; + if (talkProc(&local_30[0], 0, &actors[0], 0)) { + if (iVar7 == 0) { + if (mFlow.checkEndFlow()) { + rv = 1; + } + } else { + rv = 1; + } + } else { + mEvtNo = 7; + evtChange(); } return rv; } @@ -2057,7 +2030,7 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { mFaceMotionSeqMngr.setNo(1, -1.0f, 0, 0); mMotionSeqMngr.setNo(7, -1.0f, 0, 0); mSound.startCreatureVoice(Z2SE_JAGA_V_SURPRISE, -1); - field_0xdc8 = fopAcM_searchActorAngleY(this, daPy_getPlayerActorClass()); + mPlayerAngle = fopAcM_searchActorAngleY(this, daPy_getPlayerActorClass()); mStepMode = 0; dComIfGp_getVibration().StartShock(9, 15, cXyz(0.0f, 1.0f, 0.0f)); break; @@ -2065,12 +2038,12 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(15, -1.0f, 0, 0); current.angle.y = home.angle.y; - if (field_0xdc8 - home.angle.y < 1) { + if (mPlayerAngle - home.angle.y < 1) { current.angle.y = current.angle.y + 0x4000; } else { current.angle.y = current.angle.y + -0x4000; } - field_0xdc4 = iVar4; + mEventTimer = iVar4; break; case 3: mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); @@ -2080,16 +2053,16 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { speedF = 0; speed.setall(0.0f); mAcch.ClrWallNone(); - field_0xe25 = 1; + mHide = 1; break; default: - field_0xdc4 = iVar4; + mEventTimer = iVar4; } } switch (uVar6) { case 0: mJntAnm.lookPlayer(0); - if (field_0xdc8 == mCurAngle.y) { + if (mPlayerAngle == mCurAngle.y) { rv = 1; } else { // step(field_0xdc8, -1, -1, 15, 0); @@ -2103,7 +2076,7 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { mJntAnm.lookPlayer(0); cLib_chaseS(&shape_angle.y, current.angle.y, 0x800); cLib_chaseF(&speedF, 16.0f, 0.5f); - if (cLib_calcTimer(&field_0xdc4) == 0) { + if (cLib_calcTimer(&mEventTimer) == 0) { rv = 1; } break; @@ -2117,7 +2090,7 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { } break; case 11: - if (cLib_calcTimer(&field_0xdc4) == 0) { + if (cLib_calcTimer(&mEventTimer) == 0) { rv = 1; } } @@ -2207,10 +2180,6 @@ int daNpc_Jagar_c::chkToMotion() { /* 80A17A2C-80A1856C 00340C 0B40+00 1/0 0/0 0/0 .text wait__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::wait(void* param_0) { - cXyz cStack_30; - cXyz cStack_24; - cXyz cStack_3c; - cXyz cStack_48; field_0x1004 = 0; if (mType == TYPE_0) { if(chkSitMotion2()) { @@ -2218,117 +2187,197 @@ int daNpc_Jagar_c::wait(void* param_0) { } else if (chkSitMotion()) { if (chkChuMotion()) { field_0x1004 = 1; + }else { + field_0x1004 = 2; } } - } else { - field_0x1004 = 2; } + if (field_0x1004 != field_0x1003) { - field_0xe22 = 1; + mMode = 1; } - if (field_0xe22 != 2) { - if (field_0xe22 < 1) { - return 1; - } - if (field_0xa88 == 0) { - if (field_0xd08.checkStagger()) { - switch (field_0x1004) { - case 0: - if (field_0x1003 == 2) { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(10, -1.0f, 0, 0); - } else { - if (mType == TYPE_2) { + + switch(mMode) { + case 0: + case 1: + if (!mCreating) { + if (!mStagger.checkStagger()) { + switch (field_0x1004) { + case 0: + if (field_0x1003 == 2) { + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(17, -1.0, 0, 0); + } else { + if (mType == TYPE_2) { + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0, 0, 0); + } else { + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(2, -1.0, 0, 0); + } + field_0x1003 = 1; + } + break; + case 1: + if (field_0x1003 == 2) { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(11, -1.0f, 0, 0); + mMotionSeqMngr.setNo(3, -1.0, 0, 0); } else { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mMotionSeqMngr.setNo(10, -1.0, 0, 0); } - field_0x1003 = 0; - } - break; - case 1: - if (field_0x1003 == 2) { + break; + case 2: + if (home.angle.y == mCurAngle.y) { + switch (field_0x1003) { + case 0: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(17, -1.0, 0, 0); + break; + case 1: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0, 0, 0); + } + } + } + mMode = 2; + } + } else { + switch (field_0x1004) { + case 0: + if (mType == TYPE_2) { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(11, -1.0f, 0, 0); + mMotionSeqMngr.setNo(11, -1.0, 0, 0); } else { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(2, -1.0f, 0, 0); + mMotionSeqMngr.setNo(2, -1.0, 0, 0); } + field_0x1003 = 1; + break; + case 1: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(13, -1.0, 0, 0); + // field_0x1003 = 1; break; case 2: - if (field_0x1003 == 1) { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(12, -1.0f, 0, 0); - } else { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(13, -1.0f, 0, 0); - } + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(12, -1.0, 0, 0); + // field_0x1003 = 2; } - field_0xe22 = 2; + mMode = 2; } - } else { - switch (field_0x1004) { - case 0: - if (mType == TYPE_2) { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(11, -1.0f, 0, 0); - } else { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + switch (mType) { + case TYPE_0: + daNpcT_offTmpBit(0x10); + if (chkPointInArea(daPy_getPlayerActorClass()->current.pos, current.pos, + cXyz(daNpc_Jagar_Param_c::m.field_0x54, 180.0f, + daNpc_Jagar_Param_c::m.field_0x54), 0)) { + if (daPy_getPlayerActorClass()->checkClimbEndHang()) { + field_0x1002 = 1; + } + daNpcT_onTmpBit(0x10); + } + if (!daNpcT_chkEvtBit(0x235)) { + if (!daNpcT_chkEvtBit(0xae) && daNpcT_chkTmpBit(0x1b)) { + mEvtNo = 4; + } else { + if (chkSitMotion() || field_0x1002 != 0 && + (!daNpcT_chkEvtBit(0x235) && !daNpcT_chkEvtBit(0x87) && + daNpcT_chkTmpBit(0x10))) { + if (daPy_getPlayerActorClass()->eventInfo.chkCondition(1)) { + mEvtNo = 3; + } + } + } } - field_0x1003 = 0; break; - case 1: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(13, -1.0f, 0, 0); + case TYPE_1: break; - case 2: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(3, -1.0f, 0, 0); - } - field_0xe22 = 2; - } - } - switch (mType) { - case 0: - daNpcT_offTmpBit(0x10); - cStack_24.set(0x43fa0000, 0x41200000, 0x43fa0000); - // cStack_30 = cXyz(daPy_getPlayerActorClass()->current.pos); - // cStack_48.set(500.0f, 10.0f, 500.0f); - // cXyz(current.pos); - if (chkPointInArea(cStack_30, cXyz(current.pos), cStack_48, 0) != 0) { - if (daPy_getPlayerActorClass()->checkPlayerFly() && - daPy_getPlayerActorClass()->checkClimbEndHang()) { - field_0x1002 = 1; - } - daNpcT_onTmpBit(0x10); + case TYPE_2: + if (!mHide) { + if (chkFindWolf(mCurAngle.y, daNpcT_getDistTableIdx(field_0xff0, field_0xff4), + field_0xfec, daNpc_Jagar_Param_c::m.field_0x54, + 180.0f, daNpc_Jagar_Param_c::m.field_0x58, daNpc_Jagar_Param_c::m.field_0x5c, 1)) { + mEvtNo = 8; + } + } } - if (daNpcT_chkEvtBit(0x235) == 0) { - if (daNpcT_chkEvtBit(0xae) == 0 && daNpcT_chkTmpBit(0x1b) != 0) { - mEvtNo = 4; + + if (!mStagger.checkStagger()) { + if (chkToMotion() == 0) { + if (field_0x1004 == 2) { + mPlayerActorMngr.remove(); + } else if (field_0x1004 == 1) { + // mPlayerActorMngr.entry((fopAc_ac_c*)daPy_getPlayerActorClass()); + } + if (!mPlayerActorMngr.getActorP()) { + // mJntAnm.lookNone(0); + if (home.angle.y == mCurAngle.y) { + srchPlayerActor(); + } else { + if (field_0xe34 == 0) { + setAngle(home.angle.y); + mMode = 1; + } else { + if (step(home.angle.y, 8, 14, 15, 0)) { + mMode = 1; + } + } + attention_info.flags = 0; + } + } else { + mJntAnm.lookPlayer(0); + if (!chkActorInSight(mPlayerActorMngr.getActorP(), mAttnFovY, mCurAngle.y)) { + mJntAnm.lookNone(0); + } + if (!srchPlayerActor()) { + if (home.angle.y == mCurAngle.y) { + mMode = 1; + } + if (field_0x1003 == 1) { + if (!daNpcT_chkEvtBit(0x86)) { + daNpcT_onEvtBit(0x86); + } + field_0x1001 = 1; + } + } + } } else { - if ((chkSitMotion() || field_0x1002 != 0) && - (((daNpcT_chkEvtBit(0x235) == 0 && daNpcT_chkEvtBit(0x87) == 0) && - daNpcT_chkEvtBit(0x10) != 0) && eventInfo.chkCondition(1)) - ) { - mEvtNo = 3; + if (mMotionSeqMngr.getStepNo() < 1) { + if (mMotionSeqMngr.getNo() != 11) { + attention_info.flags = 0; + } + } else { + // switch (field_0x1004) { + // case 0: + // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + // mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + // field_0x1003 = 0; + // break; + // case 1: + // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + // mMotionSeqMngr.setNo(2, -1.0f, 0, 0); + // field_0x1003 = 1; + // break; + // case 2: + // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + // mMotionSeqMngr.setNo(3, -1.0f, 0, 0); + // field_0x1003 = 2; + // } + // if (field_0x1004 == 1) { + // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + // mMotionSeqMngr.setNo(2, -1.0f, 0, 0); + // } } + // mJntAnm.lookNone(0); } + // mJntAnm.getMode(); } - break; - case 2: - if (field_0xe25 == 0) { - daNpcT_getDistTableIdx(field_0xff0, field_0xff4); - // if (chkFindWolf(mCurAngle.y, daNpcT_getDistTableIdx(field_0xff0, field_0xff4) & -1, field_0xfec, - // 500.0f, 180.0f, 300.0f, -300.0f, 1)) { - // mEvtNo = 8; - // } - } - break; + case 3: + default: + break; } - return 0; + return 1; } /* ############################################################################################## */ @@ -2379,27 +2428,27 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { bool bVar2; int uVar3; daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); - u16 uVar1 = field_0xe22; - switch (field_0xe22) { + u16 uVar1 = mMode; + switch (mMode) { case 0: case 1: - if (field_0xd08.checkStagger() == 0) { + if (mStagger.checkStagger() == 0) { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(5, -1.0f, 0, 0); - field_0xe22 = 2; + mMode = 2; } case 2: default: break; } - if (field_0xe25 != 0 && daNpcT_chkEvtBit(0xd3) == 0 && + if (mHide != 0 && daNpcT_chkEvtBit(0xd3) == 0 && (fopAcM_searchActorDistanceXZ(this, daPy_getPlayerActorClass()) > daNpc_Jagar_Param_c::m.field_0x9c) && field_0xe34 != NULL) { if (bo) { - bo->field_0xe25 = 0; + bo->mHide = 0; } - field_0xe25 = 0; + mHide = 0; } - if (field_0xe25 != 0) { + if (mHide != 0) { fopAcM_setCullSizeBox((fopAc_ac_c *)this, -300.0f, -50.0f, -200.0f, 300.0f, 300.0f, 400.0f); goto LAB_80a18a8c; } @@ -2419,7 +2468,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { if (bo) { if (field_0x1005 == 0) { if (cLib_calcTimer(&field_0xff8) == 0) { - if (field_0xd08.checkStagger()) { + if (mStagger.checkStagger()) { if (mMotionSeqMngr.getNo() == 7 || mMotionSeqMngr.getNo() == 6 || mMotionSeqMngr.getNo() == 8) { @@ -2435,7 +2484,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { bVar2 = false; } if (bVar2) { - if (field_0xd08.checkStagger() == 0) { + if (mStagger.checkStagger() == 0) { if (mMotionSeqMngr.getNo() == 3 || mMotionSeqMngr.getNo() == 2 || mMotionSeqMngr.getNo() == 4) { @@ -2515,13 +2564,13 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { /* REGALLOC ISSUE */ /* 80A18B74-80A18F28 004554 03B4+00 3/0 0/0 0/0 .text talk__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::talk(void* param_0) { - switch(field_0xe22) { + switch(mMode) { case 0: case 1: - if (!field_0xd08.checkStagger()) { + if (!mStagger.checkStagger()) { if (mType == TYPE_1) { daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); - if (bo && bo->getType() == TYPE_1 && ((bo->field_0xd08.checkStagger()) ? 0 : 1)) { + if (bo && bo->getType() == TYPE_1 && ((bo->mStagger.checkStagger()) ? 0 : 1)) { mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); if (0.0f < -10.0f + (cM_rnd() - 0.5f)) { mMotionSeqMngr.setNo(4, -1.0f, 0, 0); @@ -2537,17 +2586,17 @@ int daNpc_Jagar_c::talk(void* param_0) { initTalk(0xd5, NULL); } } else { - initTalk(field_0xa7c, NULL); + initTalk(mFlowNodeNo, NULL); } - field_0xe22 = 2; + mMode = 2; } case 2: - if (!field_0xd08.checkStagger()) { - if (mTwilight != 0 || field_0xdc8 == mCurAngle.y || mType == TYPE_1 || field_0x1003 != 0) { + if (!mStagger.checkStagger()) { + if (mTwilight != 0 || mPlayerAngle == mCurAngle.y || mType == TYPE_1 || field_0x1003 != 0) { if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow()) { mPlayerActorMngr.entry(daPy_getPlayerActorClass()); dComIfGp_event_reset(); - field_0xe22 = 3; + mMode = 3; } if (mType == TYPE_1) { mJntAnm.lookActor(mActorMngr[2].getActorP(), -50.0f, 0); @@ -2559,7 +2608,7 @@ int daNpc_Jagar_c::talk(void* param_0) { } } else { mJntAnm.lookPlayer(0); - step(field_0xdc8, 8, 14, 15, 0); + step(mPlayerAngle, 8, 14, 15, 0); } } break; From ad4e31a9bd80475a96912f1bbc6267cf8287f963 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Sun, 2 Mar 2025 17:02:32 -0500 Subject: [PATCH 36/41] Almost done with Jaggle --- src/d/actor/d_a_npc_jagar.cpp | 522 +++++++++++++--------------------- 1 file changed, 196 insertions(+), 326 deletions(-) diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 212acb4cce2..d8b3312ef57 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -4,23 +4,10 @@ */ #include "d/actor/d_a_npc_jagar.h" -#include "d/actor/d_a_npc_tk.h" -#include "d/actor/d_a_player.h" -#include "JSystem/J3DGraphBase/J3DMaterial.h" -#include "SSystem/SComponent/c_counter.h" -#include "d/actor/d_a_tag_evtarea.h" -#include "d/d_cc_uty.h" -#include "d/d_particle_copoly.h" #include "Z2AudioLib/Z2Instances.h" -#include "Z2AudioLib/Z2Creature.h" -#include "d/d_particle_copoly.h" -#include "d/d_bg_s_acch.h" -#include "d/d_cc_d.h" -#include "d/actor/d_a_npc_bou.h" // Temporary - will be removed +#include "d/actor/d_a_npc_bou.h" #include "dol2asm.h" #include "d/d_meter2_info.h" -#include "d/d_meter_button.h" -#include "m_Do/m_Do_mtx.h" #include "d/actor/d_a_tag_push.h" // @@ -1642,29 +1629,27 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { /* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { + int local_40[3]; int rv = 0; int iVar12 = -1; - int iVar11 = 0; - int iVar10 = 0; - int iVar9 = 0; - fopAc_ac_c* pfVar8; - fopAc_ac_c* iVar6; - void* pvVar7; + int local_30 = 0; + int local_34 = 0; + int local_38 = 0; int* piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); if (piVar5) { iVar12 = *piVar5; } piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "msgNo"); if (piVar5) { - iVar11 = *piVar5; + local_30 = *piVar5; } piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "msgNo2"); if (piVar5) { - iVar10 = *piVar5; + local_34 = *piVar5; } piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "send"); if (piVar5) { - iVar9 = *piVar5; + local_38 = *piVar5; } if (dComIfGp_getEventManager().getIsAddvance(param_1)) { switch(iVar12) { @@ -1675,16 +1660,17 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { initTalk(mFlowNodeNo, NULL); break; case 7: - pvVar7 = mActorMngr[1].getActorP(); - if (pvVar7) { - dComIfGp_getEvent().setPt2(pvVar7); + fopAc_ac_c* iVar6 = mActorMngr[1].getActorP(); + if (iVar6) { + dComIfGp_getEvent().setPt2(iVar6); } break; - default: + case 8: field_0x1002 = 0; field_0x1003 = 0; } - } + } + int local_2c[3] = {-1, -1, -1}; switch (iVar12) { case 0: mJntAnm.lookNone(0); @@ -1696,10 +1682,10 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { mMotionSeqMngr.setNo(0, -1.0f, 0, 0); return 1; } - if (mMotionSeqMngr.getNo()) { - return 0; + if (!mMotionSeqMngr.getNo()) { + return 1; } - return 1; + case 8: case 1: mJntAnm.lookPlayer(0); if (mPlayerAngle == mCurAngle.y) { @@ -1707,156 +1693,52 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { } step(mPlayerAngle,8,0xe,0xf,0); break; - case 3: - case 4: - case 5: - pfVar8 = mActorMngr[0].getActorP(); - if (pfVar8) { - field_0xd6c.setall(0.0f); - field_0xd6c.z = current.pos.absXZ(pfVar8->current.pos); - mDoMtx_stack_c::YrotS(mCurAngle.y + 0x4000); - mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); - field_0xd6c += current.pos; - mJntAnm.lookPos(&field_0xd6c, 0); + default: + switch (iVar12) { + case 3: + case 4: + case 5: + fopAc_ac_c* actor_p = mActorMngr[0].getActorP(); + if (actor_p) { + field_0xd6c.setall(0.0f); + field_0xd6c.z = current.pos.absXZ(actor_p->current.pos); + mDoMtx_stack_c::YrotS(mCurAngle.y + 0x4000); + mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); + field_0xd6c += current.pos; + mJntAnm.lookPos(&field_0xd6c, 0); + } + break; + case 7: + fopAc_ac_c* iVar6 = mActorMngr[1].getActorP(); + if (iVar6) { + field_0xd6c.setall(0.0f); + field_0xd6c.z = current.pos.absXZ(actor_p->current.pos); + mDoMtx_stack_c::YrotS(mCurAngle.y + -0x4000); + mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); + field_0xd6c += current.pos; + mJntAnm.lookPos(&field_0xd6c, 0); + } + break; + default: + mJntAnm.lookPlayer(0); + } + local_2c[0] = local_30; + local_2c[1] = local_34; + if (talkProc(local_2c, local_38, NULL, 0)) { + if (!local_30 && !local_34) { + if (mFlow.checkEndFlow() == 1) { + rv = 1; + } + } else { + rv = 1; + } } - goto LAB_80a16c58; - case 7: - iVar6 = mActorMngr[1].getActorP(); - if (iVar6) { - field_0xd6c.setall(0.0f); - field_0xd6c.z = current.pos.absXZ(pfVar8->current.pos); - mDoMtx_stack_c::YrotS(mCurAngle.y + -0x4000); - mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); - field_0xd6c += current.pos; - mJntAnm.lookPos(&field_0xd6c, 0); + if (iVar12 == 4) { + rv = 1; } - goto LAB_80a16c58; - case 8: - return 1; } -LAB_80a16c58: -mJntAnm.lookPlayer(0); -if (talkProc((int*)&iVar11, iVar9, NULL, 0)) { - if (!iVar11 && !iVar10) { - if (mFlow.checkEndFlow() == 1) { - rv = 1; - } - } -} -if (iVar12 == 4) { - rv = 1; -} -return rv; -// int rv = 0; - // int iVar12 = -1; - // int iVar11 = 0; - // int iVar10 = 0; - // int iVar9 = 0; -// fopAc_ac_c* iVar2; - // int *piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "prm"); - // if (piVar5) { - // iVar12 = *piVar5; - // } - // piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo"); - // if (piVar5) { - // iVar11 = *piVar5; - // } - // piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "msgNo2"); - // if (piVar5) { - // iVar10 = *piVar5; - // } - // piVar5 = dComIfGp_evmng_getMyIntegerP(param_0, "send"); - // if (piVar5) { - // iVar9 = *piVar5; - // } -// if (dComIfGp_getEventManager().getIsAddvance(param_0)) { -// switch (iVar12) { -// case 0: -// dComIfGp_getEvent().setPt2(mActorMngr[0].getActorP()); -// break; -// case 1: - // initTalk(field_0xa7c, NULL); - // break; -// case 7: -// if (mActorMngr[1].getActorP()) -// dComIfGp_getEvent().setPt2(mActorMngr[1].getActorP()); -// break; -// default: -// field_0x1002 = 0; -// field_0x1003 = 0; -// } -// } -// switch (iVar12) { -// case 0: -// mJntAnm.lookNone(0); -// iVar9 = mMotionSeqMngr.getNo(); -// if (iVar9 == 10) { -// if (mMotionSeqMngr.getNo() < 1) { -// return 0; -// } - // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - // mMotionSeqMngr.setNo(0, -1.0f, 0, 0); -// return 1; -// } -// if (iVar9 == 0) { -// return 0; -// } -// if (mMotionSeqMngr.getNo() != 0) { -// return 0; -// } -// return 1; -// case 1: -// mJntAnm.lookPlayer(0); -// if (field_0xdc8 == mCurAngle.y) { -// return 1; -// } -// step(field_0xdc8, 8, 0xe, 0xf, 0); -// return 0; -// case 3: -// case 4: -// case 5: -// iVar2 = mActorMngr[0].getActorP(); -// if (iVar2) { -// field_0xd6c.setall(0.0); -// current.pos.absXZ(iVar2->current.pos); -// mDoMtx_stack_c::YrotS(mCurAngle.y); -// mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); -// field_0xd6c += current.pos; -// mJntAnm.setMode(3, 0); -// } -// goto LAB_80a16c58; -// case 6: -// return 0; -// case 7: -// iVar2 = mActorMngr[1].getActorP(); -// if (iVar2) { -// field_0xd6c.setall(0.0); -// current.pos.absXZ(iVar2->current.pos); -// mDoMtx_stack_c::YrotS(mCurAngle.y); -// mDoMtx_stack_c::multVec(&field_0xd6c, &field_0xd6c); -// field_0xd6c += current.pos; -// mJntAnm.setMode(3, 0); -// } -// goto LAB_80a16c58; -// case 8: -// return 1; -// default: -// mJntAnm.lookPlayer(0); -// } -// LAB_80a16c58: - // if (talkProc(&iVar11, iVar9, NULL, 0)) { -// if (iVar11 == 0 && iVar10 == 0) { - // if (mFlow.checkEndFlow()) { - // rv = 1; - // } - // } else { - // rv = 1; - // } -// } - // if (iVar12 == 4) { - // rv = 1; - // } -// return rv; + + return rv; } /* 80A16CD8-80A16EFC 0026B8 0224+00 1/0 0/0 0/0 .text cutAnger__13daNpc_Jagar_cFi */ @@ -2011,8 +1893,6 @@ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { /* 80A173D8-80A17898 002DB8 04C0+00 3/0 0/0 0/0 .text cutFindWolf__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutFindWolf(int param_0) { - // cXyz cStack_44; - csXyz cStack_38; int rv = 0; int uVar6 = -1; int iVar4 = 0; @@ -2031,31 +1911,34 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { mMotionSeqMngr.setNo(7, -1.0f, 0, 0); mSound.startCreatureVoice(Z2SE_JAGA_V_SURPRISE, -1); mPlayerAngle = fopAcM_searchActorAngleY(this, daPy_getPlayerActorClass()); - mStepMode = 0; + if (checkStep()) { + mStepMode = 0; + } dComIfGp_getVibration().StartShock(9, 15, cXyz(0.0f, 1.0f, 0.0f)); break; case 2: mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(15, -1.0f, 0, 0); current.angle.y = home.angle.y; - if (mPlayerAngle - home.angle.y < 1) { - current.angle.y = current.angle.y + 0x4000; - } else { + if (home.angle.y - mPlayerAngle > 1) { current.angle.y = current.angle.y + -0x4000; + } else { + current.angle.y = current.angle.y + 0x4000; + } mEventTimer = iVar4; break; case 3: mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(5, -1.0f, 0, 0); - // setPos(cStack_44); + setPos(cXyz(home.pos.x, home.pos.y, home.pos.z)); setAngle(home.angle.y); speedF = 0; speed.setall(0.0f); mAcch.ClrWallNone(); mHide = 1; break; - default: + case 11: mEventTimer = iVar4; } } @@ -2065,7 +1948,7 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { if (mPlayerAngle == mCurAngle.y) { rv = 1; } else { - // step(field_0xdc8, -1, -1, 15, 0); + step(mPlayerAngle, -1, -1, 15, 0); } break; case 1: @@ -2075,13 +1958,16 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { case 2: mJntAnm.lookPlayer(0); cLib_chaseS(&shape_angle.y, current.angle.y, 0x800); - cLib_chaseF(&speedF, 16.0f, 0.5f); + mCurAngle.y = shape_angle.y; + field_0xd7e.y = mCurAngle.y; + cLib_chaseF(&speedF, daNpc_Jagar_Param_c::m.field_0x98, 0.5f); + mAcch.SetWallNone(); if (cLib_calcTimer(&mEventTimer) == 0) { rv = 1; } break; case 3: - mJntAnm.lookPlayer(0); + mJntAnm.lookNone(0); rv = 1; break; case 10: @@ -2141,6 +2027,7 @@ int daNpc_Jagar_c::chkChuMotion() { /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkToMotion() { + // TEMPORARY ASSEMBLY // The inline assembly was the only way I could find to get proper regalloc asm { li r0, 0x0 // int rv = 0; @@ -2180,6 +2067,7 @@ int daNpc_Jagar_c::chkToMotion() { /* 80A17A2C-80A1856C 00340C 0B40+00 1/0 0/0 0/0 .text wait__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::wait(void* param_0) { + cXyz cStack_24; field_0x1004 = 0; if (mType == TYPE_0) { if(chkSitMotion2()) { @@ -2200,31 +2088,61 @@ int daNpc_Jagar_c::wait(void* param_0) { switch(mMode) { case 0: case 1: - if (!mCreating) { - if (!mStagger.checkStagger()) { + if (mCreating) { + switch (field_0x1004) { case 0: - if (field_0x1003 == 2) { + if (mType == TYPE_2) { mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); mMotionSeqMngr.setNo(17, -1.0, 0, 0); } else { - if (mType == TYPE_2) { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0, 0, 0); - } else { + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0, 0, 0); + } + field_0x1003 = 0; + break; + case 1: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(2, -1.0, 0, 0); + field_0x1003 = 1; + break; + case 2: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(3, -1.0, 0, 0); + field_0x1003 = 2; + } + mMode = 2; + + } else { + if (!mStagger.checkStagger()) { + switch (field_0x1004) { + case 0: + switch (field_0x1003) { + case 2: mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(2, -1.0, 0, 0); - } - field_0x1003 = 1; + mMotionSeqMngr.setNo(10, -1.0, 0, 0); + break; + default: + if (mType == TYPE_2) { + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(17, -1.0, 0, 0); + } else { + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0, 0, 0); + } + field_0x1003 = 0; } break; case 1: - if (field_0x1003 == 2) { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(3, -1.0, 0, 0); - } else { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(10, -1.0, 0, 0); + switch (field_0x1003) { + case 2: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(11, -1.0, 0, 0); + break; + default: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(2, -1.0, 0, 0); + field_0x1003 = 1; } break; case 2: @@ -2232,67 +2150,46 @@ int daNpc_Jagar_c::wait(void* param_0) { switch (field_0x1003) { case 0: mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(17, -1.0, 0, 0); + mMotionSeqMngr.setNo(13, -1.0, 0, 0); break; case 1: mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(0, -1.0, 0, 0); + mMotionSeqMngr.setNo(12, -1.0, 0, 0); } } } mMode = 2; } - } else { - switch (field_0x1004) { - case 0: - if (mType == TYPE_2) { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(11, -1.0, 0, 0); - } else { - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(2, -1.0, 0, 0); - } - field_0x1003 = 1; - break; - case 1: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(13, -1.0, 0, 0); - // field_0x1003 = 1; - break; - case 2: - mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - mMotionSeqMngr.setNo(12, -1.0, 0, 0); - // field_0x1003 = 2; - } - mMode = 2; } + case 2: switch (mType) { case TYPE_0: daNpcT_offTmpBit(0x10); + cStack_24.set(daNpc_Jagar_Param_c::m.field_0x54, 10.0f, daNpc_Jagar_Param_c::m.field_0x54); if (chkPointInArea(daPy_getPlayerActorClass()->current.pos, current.pos, - cXyz(daNpc_Jagar_Param_c::m.field_0x54, 180.0f, - daNpc_Jagar_Param_c::m.field_0x54), 0)) { + cStack_24, 0)) { + if (daPy_getPlayerActorClass()->checkPlayerFly()) { if (daPy_getPlayerActorClass()->checkClimbEndHang()) { field_0x1002 = 1; } - daNpcT_onTmpBit(0x10); + } + daNpcT_onTmpBit(0x10); } if (!daNpcT_chkEvtBit(0x235)) { if (!daNpcT_chkEvtBit(0xae) && daNpcT_chkTmpBit(0x1b)) { mEvtNo = 4; } else { - if (chkSitMotion() || field_0x1002 != 0 && - (!daNpcT_chkEvtBit(0x235) && !daNpcT_chkEvtBit(0x87) && - daNpcT_chkTmpBit(0x10))) { - if (daPy_getPlayerActorClass()->eventInfo.chkCondition(1)) { + if (chkSitMotion() || field_0x1002 != 0) { + if (!daNpcT_chkEvtBit(0x235) && !daNpcT_chkEvtBit(0x87) && + daNpcT_chkTmpBit(0x10)) { + if (daPy_getPlayerActorClass()->eventInfo.chkCondition(1) != 0 ? 1 : 0) { mEvtNo = 3; } + } } } } break; - case TYPE_1: - break; case TYPE_2: if (!mHide) { if (chkFindWolf(mCurAngle.y, daNpcT_getDistTableIdx(field_0xff0, field_0xff4), @@ -2304,78 +2201,78 @@ int daNpc_Jagar_c::wait(void* param_0) { } if (!mStagger.checkStagger()) { - if (chkToMotion() == 0) { - if (field_0x1004 == 2) { - mPlayerActorMngr.remove(); - } else if (field_0x1004 == 1) { - // mPlayerActorMngr.entry((fopAc_ac_c*)daPy_getPlayerActorClass()); - } - if (!mPlayerActorMngr.getActorP()) { - // mJntAnm.lookNone(0); - if (home.angle.y == mCurAngle.y) { - srchPlayerActor(); - } else { - if (field_0xe34 == 0) { - setAngle(home.angle.y); - mMode = 1; - } else { - if (step(home.angle.y, 8, 14, 15, 0)) { - mMode = 1; - } - } - attention_info.flags = 0; + if (chkToMotion()) { + if (mMotionSeqMngr.getStepNo() > 0) { + switch (field_0x1004) { + case 0: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + field_0x1003 = 0; + break; + case 1: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(2, -1.0f, 0, 0); + field_0x1003 = 1; + break; + case 2: + mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); + mMotionSeqMngr.setNo(3, -1.0f, 0, 0); + field_0x1003 = 2; } } else { - mJntAnm.lookPlayer(0); - if (!chkActorInSight(mPlayerActorMngr.getActorP(), mAttnFovY, mCurAngle.y)) { - mJntAnm.lookNone(0); + if (mMotionSeqMngr.getNo() != 11) { + attention_info.flags = 0; } - if (!srchPlayerActor()) { - if (home.angle.y == mCurAngle.y) { - mMode = 1; - } - if (field_0x1003 == 1) { - if (!daNpcT_chkEvtBit(0x86)) { - daNpcT_onEvtBit(0x86); - } - field_0x1001 = 1; + } + mJntAnm.lookNone(0); + break; + } + if (field_0x1004 == 2) { + mPlayerActorMngr.remove(); + } else if (field_0x1004 == 1) { + mPlayerActorMngr.entry((fopAc_ac_c*)daPy_getPlayerActorClass()); + } + + if (mPlayerActorMngr.getActorP()) { + mJntAnm.lookPlayer(0); + if (!chkActorInSight(mPlayerActorMngr.getActorP(), mAttnFovY, mCurAngle.y)) { + mJntAnm.lookNone(0); + } + + if (!srchPlayerActor()) { + if (home.angle.y == mCurAngle.y) { + mMode = 1; + } + + if (field_0x1003 == 1) { + if (!daNpcT_chkEvtBit(0x86)) { + daNpcT_onEvtBit(0x86); } + field_0x1001 = 1; } } } else { - if (mMotionSeqMngr.getStepNo() < 1) { - if (mMotionSeqMngr.getNo() != 11) { - attention_info.flags = 0; + mJntAnm.lookNone(0); + if (home.angle.y != mCurAngle.y) { + if (field_0xe34) { + + if (step(home.angle.y, 8, 14, 15, 0)) { + mMode = 1; + } + } else { + setAngle(home.angle.y); + mMode = 1; } + attention_info.flags = 0; } else { - // switch (field_0x1004) { - // case 0: - // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - // mMotionSeqMngr.setNo(0, -1.0f, 0, 0); - // field_0x1003 = 0; - // break; - // case 1: - // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - // mMotionSeqMngr.setNo(2, -1.0f, 0, 0); - // field_0x1003 = 1; - // break; - // case 2: - // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - // mMotionSeqMngr.setNo(3, -1.0f, 0, 0); - // field_0x1003 = 2; - // } - // if (field_0x1004 == 1) { - // mFaceMotionSeqMngr.setNo(8, -1.0f, 0, 0); - // mMotionSeqMngr.setNo(2, -1.0f, 0, 0); - // } + srchPlayerActor(); } - // mJntAnm.lookNone(0); } - // mJntAnm.getMode(); + } + break; case 3: - default: - break; + break; } return 1; } @@ -2452,7 +2349,6 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { fopAcM_setCullSizeBox((fopAc_ac_c *)this, -300.0f, -50.0f, -200.0f, 300.0f, 300.0f, 400.0f); goto LAB_80a18a8c; } - // if (field_0xe25 != 0) { uVar3 = (int)daNpcT_getDistTableIdx(field_0xff0, field_0xff4); if (!chkFindWolf(mCurAngle.y, uVar3, field_0xfec, daNpc_Jagar_Param_c::m.field_0x54, daNpc_Jagar_Param_c::m.field_0x50, daNpc_Jagar_Param_c::m.field_0x58, daNpc_Jagar_Param_c::m.field_0x5c, 1)) { @@ -2484,7 +2380,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { bVar2 = false; } if (bVar2) { - if (mStagger.checkStagger() == 0) { + if (mStagger.checkStagger()) { if (mMotionSeqMngr.getNo() == 3 || mMotionSeqMngr.getNo() == 2 || mMotionSeqMngr.getNo() == 4) { @@ -2526,32 +2422,6 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { } } fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-300.0f,300.0f,450.0f,300.0f); - // if (mActorMngr[2].getActorP() == NULL) { - // mJntAnm.setMode(0, 0); - // mJntAnm.lookNone(0); - // mJntAnm.lookActor(this, -40.0f, 0); - // } else { - // fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-200.0f,300.0f,300.0f,400.0f); - // mJntAnm.lookNone(0); - // } - - // } - // fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-200.0f,300.0f,300.0f,400.0f); - // if (mActorMngr[2].getActorP() == NULL) { - // mJntAnm.lookNone(0); - // mJntAnm.lookActor(mActorMngr[2].getActorP(), -40.0f, 0); - // } - // } - // chkFindWolf(mCurAngle.y, (int)daNpcT_getDistTableIdx(field_0xff0, field_0xff4) & 0xff, field_0xfec, 500.0f, 110.0f, 300.0f, -300.0f, 1); - // // if (mActorMngr[2].getActorP()) { - // uVar3 = daNpcT_getDistTableIdx((int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.y, - // (int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.z); - // if (chkFindWolf(mCurAngle.y, (daNpcT_getDistTableIdx((int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.y, - // (int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.z) & 0xff), - // (int)mActorMngr[2].getActorP()->tevStr.mLights[0].getLightInfo().mCosAtten.x, 500.0f, 110.0f, 300.0f, -300.0f, 1) != 0) { - // mEvtNo = 7; - // } - // // } LAB_80a18a8c: if (bo) { mJntAnm.lookActor((fopAc_ac_c *)bo, -50.0f, 0); From 2eb680562af3ade050b489b1ccbc5f2a15bdb004 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Sun, 2 Mar 2025 18:33:45 -0500 Subject: [PATCH 37/41] Took out inline assembly in Jagar.chkToMotion() --- src/d/actor/d_a_npc_jagar.cpp | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index d8b3312ef57..0897cbc5288 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1629,7 +1629,6 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { /* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { - int local_40[3]; int rv = 0; int iVar12 = -1; int local_30 = 0; @@ -1683,9 +1682,9 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { return 1; } if (!mMotionSeqMngr.getNo()) { - return 1; + rv = 1; + return rv; } - case 8: case 1: mJntAnm.lookPlayer(0); if (mPlayerAngle == mCurAngle.y) { @@ -1693,6 +1692,8 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { } step(mPlayerAngle,8,0xe,0xf,0); break; + case 8: + break; default: switch (iVar12) { case 3: @@ -1737,7 +1738,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { rv = 1; } } - + return rv; } @@ -2029,18 +2030,21 @@ int daNpc_Jagar_c::chkChuMotion() { int daNpc_Jagar_c::chkToMotion() { // TEMPORARY ASSEMBLY // The inline assembly was the only way I could find to get proper regalloc - asm { - li r0, 0x0 // int rv = 0; - lwz r3, 0xb7c(r3) // Loads mMotionSeqMngr into register 3 - } + // asm { + // li r0, 0x0 // int rv = 0; + // lwz r3, 0xb7c(r3) // Loads mMotionSeqMngr into register 3 + // } + int rv = 0; if (mMotionSeqMngr.getNo() == 10 || mMotionSeqMngr.getNo() == 11 || mMotionSeqMngr.getNo() == 12 || mMotionSeqMngr.getNo() == 13) { - asm { - li r0, 0x1 // rv = 1; - } - } - asm { - clrlwi r3, r0, 24 // return rv & ((1U << 8) - 1); - } + // asm { + // li r0, 0x1 // rv = 1; + // } + rv = 1; + } + // asm { + // clrlwi r3, r0, 24 // return rv & ((1U << 8) - 1); + // } + return rv & ((1U << 8) - 1); } /* ############################################################################################## */ From 51ba5966ec94d113b7aa24793bd892e3c7a4e392 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Sun, 2 Mar 2025 18:51:40 -0500 Subject: [PATCH 38/41] Cleanup --- include/d/actor/d_a_npc_jagar.h | 4 - src/d/actor/d_a_npc_jagar.cpp | 865 +------------------------------- 2 files changed, 19 insertions(+), 850 deletions(-) diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index 5acd70eaa8c..d8b274798e6 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -12,9 +12,6 @@ * */ -class daNpc_Bou_c; // Temporary -class daTag_Push_c; - class daNpc_Jagar_c : public daNpcT_c { public: typedef int (daNpc_Jagar_c::*cutFunc)(int); @@ -100,7 +97,6 @@ class daNpc_Jagar_c : public daNpcT_c { /* 0x0F80 */ u8 mType; /* 0x0F84 */ daNpcT_ActorMngr_c mActorMngr[5]; /* 0x0FAC */ daNpcT_Path_c field_0xfac; - // /* 0x0FCE */ u8 field_0xfce[0xfd4 - 0xfce]; /* 0x0FD4 */ actionFunc field_0xfd4; /* 0x0FE0 */ actionFunc field_0xfe0; /* 0x0FEC */ int field_0xfec; diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 0897cbc5288..bc0bf3eb756 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -312,7 +312,6 @@ SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = { /* 80A1A568-80A1A570 000020 0008+00 1/1 0/0 0/0 .data l_bmdData */ static int l_bmdData[1][2] = { - // 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x01, {13, 1}, }; @@ -338,24 +337,6 @@ static char* l_resNameList[5] = { "Jagar3", }; -/* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -// #pragma push -// #pragma force_active on -// SECTION_DEAD static char const* const stringBase_80A1A49C = ""; -// SECTION_DEAD static char const* const stringBase_80A1A49D = "NO_RESPONSE"; -// SECTION_DEAD static char const* const stringBase_80A1A4A9 = "CLIMBUP"; -// SECTION_DEAD static char const* const stringBase_80A1A4B1 = "NEED_YOUR_HELP"; -// SECTION_DEAD static char const* const stringBase_80A1A4C0 = "ANGER"; -// SECTION_DEAD static char const* const stringBase_80A1A4C6 = "CONVERSATION_WITH_BOU"; -// SECTION_DEAD static char const* const stringBase_80A1A4DC = "CONFIDENTIAL_CONVERSATION"; -// SECTION_DEAD static char const* const stringBase_80A1A4F6 = "FIND_WOLF"; -// SECTION_DEAD static char const* const stringBase_80A1A500 = "FIND_WOLF_VER2"; -// SECTION_DEAD static char const* const stringBase_80A1A50F = "Jagar"; -// SECTION_DEAD static char const* const stringBase_80A1A515 = "Jagar1"; -// SECTION_DEAD static char const* const stringBase_80A1A51C = "Jagar2"; -// SECTION_DEAD static char const* const stringBase_80A1A523 = "Jagar3"; -// #pragma pop - /* 80A1A5CC-80A1A5D0 000084 0004+00 1/0 0/0 0/0 .data l_loadResPtrn0 */ // SECTION_DATA static u32 l_loadResPtrn0 = 0x010204FF; static s8 l_loadResPtrn0[4] = { @@ -450,66 +431,6 @@ SECTION_DATA char* daNpc_Jagar_c::mCutNameList[7] = { "FIND_WOLF", }; -/* 80A1AAD8-80A1AAE4 -00001 000C+00 0/1 0/0 0/0 .data @3939 */ -// #pragma push -// #pragma force_active on -// SECTION_DATA static void* lit_3939[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)cutClimbUp__13daNpc_Jagar_cFi, -// }; -// #pragma pop - -// /* 80A1AAE4-80A1AAF0 -00001 000C+00 0/1 0/0 0/0 .data @3940 */ -// #pragma push -// #pragma force_active on -// SECTION_DATA static void* lit_3940[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)cutNeedYourHelp__13daNpc_Jagar_cFi, -// }; -// #pragma pop - -// /* 80A1AAF0-80A1AAFC -00001 000C+00 0/1 0/0 0/0 .data @3941 */ -// #pragma push -// #pragma force_active on -// SECTION_DATA static void* lit_3941[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)cutAnger__13daNpc_Jagar_cFi, -// }; -// #pragma pop - -// /* 80A1AAFC-80A1AB08 -00001 000C+00 0/1 0/0 0/0 .data @3942 */ -// #pragma push -// #pragma force_active on -// SECTION_DATA static void* lit_3942[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)cutConversationWithBou__13daNpc_Jagar_cFi, -// }; -// #pragma pop - -// /* 80A1AB08-80A1AB14 -00001 000C+00 0/1 0/0 0/0 .data @3943 */ -// #pragma push -// #pragma force_active on -// SECTION_DATA static void* lit_3943[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)cutConfidentialConversation__13daNpc_Jagar_cFi, -// }; -// #pragma pop - -// /* 80A1AB14-80A1AB20 -00001 000C+00 0/1 0/0 0/0 .data @3944 */ -// #pragma push -// #pragma force_active on -// SECTION_DATA static void* lit_3944[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)cutFindWolf__13daNpc_Jagar_cFi, -// }; -// #pragma pop - /* 80A1AB20-80A1AB74 0005D8 0054+00 1/2 0/0 0/0 .data mCutList__13daNpc_Jagar_c */ daNpc_Jagar_c::cutFunc daNpc_Jagar_c::mCutList[7] = { &daNpc_Jagar_c::cutClimbUp, @@ -521,41 +442,6 @@ daNpc_Jagar_c::cutFunc daNpc_Jagar_c::mCutList[7] = { NULL, }; -/* 80A1AB74-80A1AB80 -00001 000C+00 1/1 0/0 0/0 .data @4674 */ -// SECTION_DATA static void* lit_4674[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)talk__13daNpc_Jagar_cFPv, -// }; - -/* 80A1AB80-80A1AB8C -00001 000C+00 1/1 0/0 0/0 .data @4739 */ -// SECTION_DATA static void* lit_4739[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)talk__13daNpc_Jagar_cFPv, -// }; - -/* 80A1AB8C-80A1AB98 -00001 000C+00 1/1 0/0 0/0 .data @4744 */ -// SECTION_DATA static void* lit_4744[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)talk__13daNpc_Jagar_cFPv, -// }; - -/* 80A1AB98-80A1ABA4 -00001 000C+00 1/1 0/0 0/0 .data @5061 */ -// SECTION_DATA static void* lit_5061[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)talkwithBou__13daNpc_Jagar_cFPv, -// }; - -/* 80A1ABA4-80A1ABB0 -00001 000C+00 1/1 0/0 0/0 .data @5063 */ -// SECTION_DATA static void* lit_5063[3] = { -// (void*)NULL, -// (void*)0xFFFFFFFF, -// (void*)wait__13daNpc_Jagar_cFPv, -// }; - // /* 80A1ABB0-80A1ABE0 -00001 0030+00 1/1 0/0 0/0 .data @5661 */ // SECTION_DATA static void* lit_5661[12] = { // (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x304), @@ -588,149 +474,6 @@ daNpc_Jagar_c::cutFunc daNpc_Jagar_c::mCutList[7] = { // (void*)(((char*)cutFindWolf__13daNpc_Jagar_cFi) + 0x2E0), // }; -// // /* 80A1AC60-80A1AC6C 000718 000C+00 2/2 0/0 0/0 .data __vt__11J3DTexNoAnm */ -// SECTION_DATA extern void* __vt__11J3DTexNoAnm[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)calc__11J3DTexNoAnmCFPUs, -// }; - -// /* 80A1AC6C-80A1AC78 000724 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ -// SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__12J3DFrameCtrlFv, -// }; - -// /* 80A1AC78-80A1AC9C 000730 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -// SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__12dBgS_ObjAcchFv, -// (void*)NULL, -// (void*)NULL, -// (void*)func_80A1A314, -// (void*)NULL, -// (void*)NULL, -// (void*)func_80A1A30C, -// }; - -// /* 80A1AC9C-80A1ACA8 000754 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ -// SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__12dBgS_AcchCirFv, -// }; - -// /* 80A1ACA8-80A1ACB4 000760 000C+00 3/3 0/0 0/0 .data __vt__10cCcD_GStts */ -// SECTION_DATA extern void* __vt__10cCcD_GStts[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__10cCcD_GSttsFv, -// }; - -// /* 80A1ACB4-80A1ACC0 00076C 000C+00 2/2 0/0 0/0 .data __vt__10dCcD_GStts */ -// SECTION_DATA extern void* __vt__10dCcD_GStts[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__10dCcD_GSttsFv, -// }; - -// /* 80A1ACC0-80A1ACCC 000778 000C+00 3/3 0/0 0/0 .data __vt__22daNpcT_MotionSeqMngr_c */ -// SECTION_DATA extern void* __vt__22daNpcT_MotionSeqMngr_c[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__22daNpcT_MotionSeqMngr_cFv, -// }; - -// /* 80A1ACCC-80A1ACD8 000784 000C+00 5/5 0/0 0/0 .data __vt__18daNpcT_ActorMngr_c */ -// SECTION_DATA extern void* __vt__18daNpcT_ActorMngr_c[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__18daNpcT_ActorMngr_cFv, -// }; - -// /* 80A1ACD8-80A1ACE4 000790 000C+00 3/3 0/0 0/0 .data __vt__15daNpcT_JntAnm_c */ -// SECTION_DATA extern void* __vt__15daNpcT_JntAnm_c[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__15daNpcT_JntAnm_cFv, -// }; - -// /* 80A1ACE4-80A1ACF0 00079C 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGAab */ -// SECTION_DATA extern void* __vt__8cM3dGAab[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__8cM3dGAabFv, -// }; - -// /* 80A1ACF0-80A1ACFC 0007A8 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ -// SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__8cM3dGCylFv, -// }; - -// /* 80A1ACFC-80A1AD08 0007B4 000C+00 3/3 0/0 0/0 .data __vt__13daNpcT_Path_c */ -// SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__13daNpcT_Path_cFv, -// }; - -/* 80A1AD08-80A1ADCC 0007C0 00C4+00 2/2 0/0 0/0 .data __vt__13daNpc_Jagar_c */ -// SECTION_DATA extern void* __vt__13daNpc_Jagar_c[49] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__13daNpc_Jagar_cFv, -// (void*)ctrlBtk__8daNpcT_cFv, -// (void*)ctrlSubFaceMotion__8daNpcT_cFi, -// (void*)checkChangeJoint__13daNpc_Jagar_cFi, -// (void*)checkRemoveJoint__13daNpc_Jagar_cFi, -// (void*)getBackboneJointNo__13daNpc_Jagar_cFv, -// (void*)getNeckJointNo__13daNpc_Jagar_cFv, -// (void*)getHeadJointNo__13daNpc_Jagar_cFv, -// (void*)getFootLJointNo__13daNpc_Jagar_cFv, -// (void*)getFootRJointNo__13daNpc_Jagar_cFv, -// (void*)getEyeballLMaterialNo__8daNpcT_cFv, -// (void*)getEyeballRMaterialNo__8daNpcT_cFv, -// (void*)getEyeballMaterialNo__13daNpc_Jagar_cFv, -// (void*)ctrlJoint__8daNpcT_cFP8J3DJointP8J3DModel, -// (void*)afterJntAnm__13daNpc_Jagar_cFi, -// (void*)setParam__13daNpc_Jagar_cFv, -// (void*)checkChangeEvt__13daNpc_Jagar_cFv, -// (void*)evtTalk__13daNpc_Jagar_cFv, -// (void*)evtEndProc__8daNpcT_cFv, -// (void*)evtCutProc__13daNpc_Jagar_cFv, -// (void*)setAfterTalkMotion__13daNpc_Jagar_cFv, -// (void*)evtProc__8daNpcT_cFv, -// (void*)action__13daNpc_Jagar_cFv, -// (void*)beforeMove__13daNpc_Jagar_cFv, -// (void*)afterMoved__8daNpcT_cFv, -// (void*)setAttnPos__13daNpc_Jagar_cFv, -// (void*)setFootPos__8daNpcT_cFv, -// (void*)setCollision__13daNpc_Jagar_cFv, -// (void*)setFootPrtcl__8daNpcT_cFP4cXyzff, -// (void*)checkCullDraw__8daNpcT_cFv, -// (void*)twilight__8daNpcT_cFv, -// (void*)chkXYItems__8daNpcT_cFv, -// (void*)evtOrder__8daNpcT_cFv, -// (void*)decTmr__8daNpcT_cFv, -// (void*)clrParam__8daNpcT_cFv, -// (void*)drawDbgInfo__13daNpc_Jagar_cFv, -// (void*)drawOtherMdl__8daNpcT_cFv, -// (void*)drawGhost__8daNpcT_cFv, -// (void*)afterSetFaceMotionAnm__8daNpcT_cFiifi, -// (void*)afterSetMotionAnm__8daNpcT_cFiifi, -// (void*)getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c, -// (void*)getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c, -// (void*)changeAnm__8daNpcT_cFPiPi, -// (void*)changeBck__8daNpcT_cFPiPi, -// (void*)changeBtp__13daNpc_Jagar_cFPiPi, -// (void*)changeBtk__8daNpcT_cFPiPi, -// (void*)setMotionAnm__8daNpcT_cFifi, -// }; - /* 80A1470C-80A14858 0000EC 014C+00 1/0 0/0 0/0 .text __dt__13daNpc_Jagar_cFv */ daNpc_Jagar_c::~daNpc_Jagar_c() { if (mpMorf[0] != 0) { @@ -752,61 +495,9 @@ daNpc_Jagar_Param_c::param const daNpc_Jagar_Param_c::m = { }; /* 80A1A3D0-80A1A3E0 0000A0 0010+00 0/1 0/0 0/0 .rodata heapSize$4099 */ -// #pragma push -// #pragma force_active on static int const heapSize[4] = { 0x3850, 0x3870, 0x3870, 0 - // 0x00, 0x00, 0x38, 0x50, - // 0x00, 0x00, 0x38, 0x70, - // 0x00, 0x00, 0x38, 0x70, - // 0x00, 0x00, 0x00, 0x00, }; -// COMPILER_STRIP_GATE(0x80A1A3D0, &heapSize); -// #pragma pop - -/* 80A1A3E0-80A1A3E4 0000B0 0004+00 0/2 0/0 0/0 .rodata @4165 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4165 = -200.0f; -// COMPILER_STRIP_GATE(0x80A1A3E0, &lit_4165); -// #pragma pop - -// /* 80A1A3E4-80A1A3E8 0000B4 0004+00 0/1 0/0 0/0 .rodata @4166 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4166 = -100.0f; -// COMPILER_STRIP_GATE(0x80A1A3E4, &lit_4166); -// #pragma pop - -// /* 80A1A3E8-80A1A3EC 0000B8 0004+00 0/1 0/0 0/0 .rodata @4167 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4167 = 200.0f; -// COMPILER_STRIP_GATE(0x80A1A3E8, &lit_4167); -// #pragma pop - -// /* 80A1A3EC-80A1A3F0 0000BC 0004+00 0/2 0/0 0/0 .rodata @4168 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4168 = 300.0f; -// COMPILER_STRIP_GATE(0x80A1A3EC, &lit_4168); -// #pragma pop - -// /* 80A1A3F0-80A1A3F4 0000C0 0004+00 4/15 0/0 0/0 .rodata @4169 */ -// SECTION_RODATA static u8 const lit_4169[4] = { -// 0x00, -// 0x00, -// 0x00, -// 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A3F0, &lit_4169); - -/* 80A1A3F4-80A1A3F8 0000C4 0004+00 0/1 0/0 0/0 .rodata @4170 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4170 = -1000000000.0f; -// COMPILER_STRIP_GATE(0x80A1A3F4, &lit_4170); -// #pragma pop /* 80A14858-80A14B20 000238 02C8+00 1/1 0/0 0/0 .text create__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::create() { @@ -839,7 +530,7 @@ int daNpc_Jagar_c::create() { &mAcchCir, fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), fopAcM_GetShapeAngle_p(this)); mCcStts.Init(daNpc_Jagar_Param_c::m.field_0x10, 0, this); - mCyl1.Set(mCcDCyl); // <-- Check value?? + mCyl1.Set(mCcDCyl); mCyl1.SetStts(&mCcStts); mCyl1.SetTgHitCallback(tgHitCallBack); mAcch.CrrPos(dComIfG_Bgsp()); @@ -856,25 +547,6 @@ int daNpc_Jagar_c::create() { return rv; } -/* ############################################################################################## */ -/* 80A1A3F8-80A1A3FC 0000C8 0004+00 0/2 0/0 0/0 .rodata @4332 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4332 = 65536.0f; -// COMPILER_STRIP_GATE(0x80A1A3F8, &lit_4332); -// #pragma pop - -/* 80A1A3FC-80A1A400 0000CC 0004+00 0/3 0/0 0/0 .rodata @4333 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4333 = 1.0f / 5.0f; -// COMPILER_STRIP_GATE(0x80A1A3FC, &lit_4333); -// #pragma pop - -/* 80A1A400-80A1A404 0000D0 0004+00 2/5 0/0 0/0 .rodata @4475 */ -// SECTION_RODATA static f32 const lit_4475 = 1.0f; -// COMPILER_STRIP_GATE(0x80A1A400, &lit_4475); - /* 80A14B20-80A14D90 000500 0270+00 1/1 0/0 0/0 .text CreateHeap__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::CreateHeap() { J3DModelData* modelData = static_cast(dComIfG_getObjectRes( @@ -896,6 +568,7 @@ int daNpc_Jagar_c::CreateHeap() { if (mpMatAnm == NULL) { return 0; } + if (setFaceMotionAnm(1, false) && setMotionAnm(0, 0.0f, 0)) { return 1; @@ -915,11 +588,6 @@ int daNpc_Jagar_c::Execute() { return daNpcT_c::execute(); } -// /* ############################################################################################## */ -// /* 80A1A404-80A1A408 0000D4 0004+00 1/2 0/0 0/0 .rodata @4524 */ -// SECTION_RODATA static f32 const lit_4524 = 100.0f; -// COMPILER_STRIP_GATE(0x80A1A404, &lit_4524); - /* 80A14FA0-80A15034 000980 0094+00 1/1 0/0 0/0 .text Draw__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::Draw() { if (mpMatAnm != NULL) { @@ -1059,7 +727,9 @@ void daNpc_Jagar_c::setParam() { attention_info.distances[3] = daNpcT_getDistTableIdx(sVar10, sVar9); if (mType == TYPE_1) { uVar7 |= (0x80 << 16); - field_0xfec = getActorDistance(daPy_getPlayerActorClass(), daNpcT_getDistTableIdx(field_0xff0, field_0xff4), attention_info.distances[1]); + field_0xfec = getActorDistance(daPy_getPlayerActorClass(), + daNpcT_getDistTableIdx(field_0xff0, field_0xff4), + attention_info.distances[1]); if (field_0xfec < 4) { g_meter2_info.mBlinkButton |= 1; } @@ -1072,9 +742,8 @@ void daNpc_Jagar_c::setParam() { } } attention_info.flags = uVar7; - // mAcchCir[0].SetWallR(); scale.set(daNpc_Jagar_Param_c::m.field_0x08, daNpc_Jagar_Param_c::m.field_0x08, - daNpc_Jagar_Param_c::m.field_0x08); + daNpc_Jagar_Param_c::m.field_0x08); mCcStts.SetWeight(daNpc_Jagar_Param_c::m.field_0x10); mCylH = daNpc_Jagar_Param_c::m.field_0x14; mWallR = daNpc_Jagar_Param_c::m.field_0x1c; @@ -1087,8 +756,7 @@ void daNpc_Jagar_c::setParam() { gravity = daNpc_Jagar_Param_c::m.field_0x04; } -/* 80A155E4-80A15714 000FC4 0130+00 1/0 0/0 0/0 .text checkChangeEvt__13daNpc_Jagar_cFv - */ +/* 80A155E4-80A15714 000FC4 0130+00 1/0 0/0 0/0 .text checkChangeEvt__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::checkChangeEvt() { if (!chkAction(&daNpc_Jagar_c::talk)) { mPreItemNo = 0; @@ -1120,8 +788,6 @@ int daNpc_Jagar_c::checkChangeEvt() { return false; } -/* ############################################################################################## */ - /* 80A15714-80A157B4 0010F4 00A0+00 1/0 0/0 0/0 .text setAfterTalkMotion__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setAfterTalkMotion() { int iVar2 = 8; @@ -1148,6 +814,7 @@ void daNpc_Jagar_c::srchActors() { if (!mActorMngr[1].getActorP()) { mActorMngr[1].entry(getNearestActorP(0x15a)); } + if (!mActorMngr[0].getActorP()) { mActorMngr[0].entry(getNearestActorP(0x10d)); } @@ -1156,6 +823,7 @@ void daNpc_Jagar_c::srchActors() { if (!mActorMngr[1].getActorP()) { mActorMngr[1].entry(getNearestActorP(0x15a)); } + if (!mActorMngr[2].getActorP()) { mActorMngr[2].entry(getNearestActorP(0x246)); } @@ -1179,8 +847,7 @@ BOOL daNpc_Jagar_c::evtCutProc() { int staffId = dComIfGp_getEventManager().getMyStaffId("Jagar", this, -1); if (staffId != -1) { mStaffId = staffId; - int actIdx = - dComIfGp_getEventManager().getMyActIdx(mStaffId, (char**)mCutNameList, 7, 0, 0); + int actIdx = dComIfGp_getEventManager().getMyActIdx(mStaffId, (char**)mCutNameList, 7, 0, 0); if ((this->*(mCutList[actIdx]))(mStaffId) != 0) { dComIfGp_getEventManager().cutEnd(mStaffId); } @@ -1204,6 +871,7 @@ void daNpc_Jagar_c::action() { } } } + if (field_0x1003 != 2 && field_0x1004 != 2) { mStagger.setParam(this, hitActor, mCurAngle.y); setDamage(0, 8, 0); @@ -1212,11 +880,13 @@ void daNpc_Jagar_c::action() { mJntAnm.setDirect(1); } } + if (mStagger.checkRebirth()) { mStagger.initialize(); field_0x1003 = 0; mMode = 1; } + if (field_0xfd4) { if (field_0xfe0 == field_0xfd4) { (this->*field_0xfe0)(NULL); @@ -1242,64 +912,13 @@ void daNpc_Jagar_c::beforeMove() { if (checkHide()) { fopAcM_OnStatus(this, 0x8000000); } + if (checkHide() || mNoDraw != 0) { attention_info.flags = 0; } } /* ############################################################################################## */ -/* 80A1A40C-80A1A410 0000DC 0004+00 0/2 0/0 0/0 .rodata @4932 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4932 = -10.0f; -// COMPILER_STRIP_GATE(0x80A1A40C, &lit_4932); -// #pragma pop - -// // /* 80A1A410-80A1A414 0000E0 0004+00 0/2 0/0 0/0 .rodata @4933 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4933 = 10.0f; -// COMPILER_STRIP_GATE(0x80A1A410, &lit_4933); -// #pragma pop - -// // /* 80A1A414-80A1A418 0000E4 0004+00 0/1 0/0 0/0 .rodata @4934 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u32 const lit_4934 = 0x38C90FDB; -// COMPILER_STRIP_GATE(0x80A1A414, &lit_4934); -// #pragma pop - -// // /* 80A1A418-80A1A41C 0000E8 0004+00 0/1 0/0 0/0 .rodata @4935 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4935 = -60.0f; -// COMPILER_STRIP_GATE(0x80A1A418, &lit_4935); -// #pragma pop - -// // /* 80A1A41C-80A1A420 0000EC 0004+00 0/1 0/0 0/0 .rodata @4936 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4936 = 3.0f; -// COMPILER_STRIP_GATE(0x80A1A41C, &lit_4936); -// #pragma pop - -// // /* 80A1A420-80A1A428 0000F0 0004+04 0/1 0/0 0/0 .rodata @4937 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_4937[1 + 1 /* padding */] = { -// 11.0f, -// /* padding */ -// 0.0f, -// }; -// COMPILER_STRIP_GATE(0x80A1A420, &lit_4937); -// #pragma pop - -// /* 80A1A428-80A1A430 0000F8 0008+00 1/3 0/0 0/0 .rodata @4939 */ -// SECTION_RODATA static u8 const lit_4939[8] = { -// 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A428, &lit_4939); - // /* 80A1ADE0-80A1ADE4 000008 0001+03 1/1 0/0 0/0 .bss @1109 */ // static u8 lit_1109[1 + 3 /* padding */]; @@ -1444,48 +1063,6 @@ void daNpc_Jagar_c::setAttnPos() { } } -/* ############################################################################################## */ -/* 80A1A430-80A1A438 000100 0008+00 0/2 0/0 0/0 .rodata @4997 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_4997[8] = { -// 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A430, &lit_4997); -// #pragma pop - -/* 80A1A438-80A1A440 000108 0008+00 0/2 0/0 0/0 .rodata @4998 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_4998[8] = { -// 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A438, &lit_4998); -// #pragma pop - -/* 80A1A440-80A1A448 000110 0008+00 0/2 0/0 0/0 .rodata @4999 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_4999[8] = { -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A440, &lit_4999); -// #pragma pop - -/* 80A1A448-80A1A44C 000118 0004+00 0/1 0/0 0/0 .rodata @5039 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5039 = 70.0f; -// COMPILER_STRIP_GATE(0x80A1A448, &lit_5039); -// #pragma pop - -/* 80A1A44C-80A1A450 00011C 0004+00 0/1 0/0 0/0 .rodata @5040 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5040 = 90.0f; -// COMPILER_STRIP_GATE(0x80A1A44C, &lit_5040); -// #pragma pop - /* 80A1607C-80A161EC 001A5C 0170+00 1/0 0/0 0/0 .text setCollision__13daNpc_Jagar_cFv */ void daNpc_Jagar_c::setCollision() { cXyz cStack_48; @@ -1526,7 +1103,7 @@ void daNpc_Jagar_c::setCollision() { /* 80A161EC-80A161F4 001BCC 0008+00 1/0 0/0 0/0 .text drawDbgInfo__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::drawDbgInfo() { - return 0; // Placeholder value + return 0; } /* 80A161F4-80A16234 001BD4 0040+00 1/0 0/0 0/0 .text changeBtp__13daNpc_Jagar_cFPiPi */ @@ -1581,6 +1158,7 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { if (piVar1) { iVar4 = *piVar1; } + if (dComIfGp_getEventManager().getIsAddvance(param_0)) { switch (iVar4) { case 0: @@ -1608,26 +1186,7 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { return rv; } -/* ############################################################################################## */ -/* 80A1A450-80A1A45C 000120 000C+00 0/1 0/0 0/0 .rodata @5148 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_5148[12] = { -// 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -// }; -// COMPILER_STRIP_GATE(0x80A1A450, &lit_5148); -// #pragma pop - -/* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -// #pragma push -// #pragma force_active on -// SECTION_DEAD static char const* const stringBase_80A1A52E = "msgNo"; -// SECTION_DEAD static char const* const stringBase_80A1A534 = "msgNo2"; -// SECTION_DEAD static char const* const stringBase_80A1A53B = "send"; -// #pragma pop - -/* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi - */ +/* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { int rv = 0; int iVar12 = -1; @@ -1785,13 +1344,6 @@ int daNpc_Jagar_c::cutAnger(int param_0) { return rv; } -/* ############################################################################################## */ -/* 80A1A45C-80A1A464 00012C 0008+00 1/1 0/0 0/0 .rodata @5412 */ -// SECTION_RODATA static u8 const lit_5412[8] = { -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A45C, &lit_5412); - /* 80A16EFC-80A1705C 0028DC 0160+00 1/0 0/0 0/0 .text cutConversationWithBou__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { daTag_Push_c* this_00 = (daTag_Push_c*)field_0xba0.getActorP(); @@ -1819,25 +1371,6 @@ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { return rv; } -/* ############################################################################################## */ -/* 80A1A464-80A1A46C 000134 0008+00 0/1 0/0 0/0 .rodata @5445 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_5445[8] = { -// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -// }; -// COMPILER_STRIP_GATE(0x80A1A464, &lit_5445); -// #pragma pop - -/* 80A1A46C-80A1A478 00013C 000C+00 0/1 0/0 0/0 .rodata @5455 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static u8 const lit_5455[12] = { -// 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -// }; -// COMPILER_STRIP_GATE(0x80A1A46C, &lit_5455); -// #pragma pop - /* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text * cutConfidentialConversation__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { @@ -1890,8 +1423,6 @@ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { return rv; } -/* ############################################################################################## */ - /* 80A173D8-80A17898 002DB8 04C0+00 3/0 0/0 0/0 .text cutFindWolf__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutFindWolf(int param_0) { int rv = 0; @@ -1905,6 +1436,7 @@ int daNpc_Jagar_c::cutFindWolf(int param_0) { if (puVar2 != NULL) { iVar4 = *puVar2; } + if (dComIfGp_getEventManager().getIsAddvance(param_0)) { switch (uVar6) { case 0: @@ -2028,7 +1560,6 @@ int daNpc_Jagar_c::chkChuMotion() { /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkToMotion() { - // TEMPORARY ASSEMBLY // The inline assembly was the only way I could find to get proper regalloc // asm { // li r0, 0x0 // int rv = 0; @@ -2047,28 +1578,6 @@ int daNpc_Jagar_c::chkToMotion() { return rv & ((1U << 8) - 1); } -/* ############################################################################################## */ -/* 80A1A478-80A1A47C 000148 0004+00 0/2 0/0 0/0 .rodata @5527 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5527 = -40.0f; -// COMPILER_STRIP_GATE(0x80A1A478, &lit_5527); -// #pragma pop - -/* 80A1A47C-80A1A480 00014C 0004+00 0/2 0/0 0/0 .rodata @5659 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_5659 = 0.5f; -// COMPILER_STRIP_GATE(0x80A1A47C, &lit_5659); -// #pragma pop - -/* 80A1A480-80A1A484 000150 0004+00 0/1 0/0 0/0 .rodata @6101 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6101 = 180.0f; -// COMPILER_STRIP_GATE(0x80A1A480, &lit_6101); -// #pragma pop - /* 80A17A2C-80A1856C 00340C 0B40+00 1/0 0/0 0/0 .text wait__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::wait(void* param_0) { cXyz cStack_24; @@ -2093,7 +1602,6 @@ int daNpc_Jagar_c::wait(void* param_0) { case 0: case 1: if (mCreating) { - switch (field_0x1004) { case 0: if (mType == TYPE_2) { @@ -2259,7 +1767,6 @@ int daNpc_Jagar_c::wait(void* param_0) { mJntAnm.lookNone(0); if (home.angle.y != mCurAngle.y) { if (field_0xe34) { - if (step(home.angle.y, 8, 14, 15, 0)) { mMode = 1; } @@ -2272,7 +1779,6 @@ int daNpc_Jagar_c::wait(void* param_0) { srchPlayerActor(); } } - } break; case 3: @@ -2281,49 +1787,6 @@ int daNpc_Jagar_c::wait(void* param_0) { return 1; } -/* ############################################################################################## */ -/* 80A1A484-80A1A488 000154 0004+00 0/1 0/0 0/0 .rodata @6301 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6301 = -300.0f; -// COMPILER_STRIP_GATE(0x80A1A484, &lit_6301); -// #pragma pop - -// /* 80A1A488-80A1A48C 000158 0004+00 0/1 0/0 0/0 .rodata @6302 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6302 = -50.0f; -// COMPILER_STRIP_GATE(0x80A1A488, &lit_6302); -// #pragma pop - -// /* 80A1A48C-80A1A490 00015C 0004+00 0/1 0/0 0/0 .rodata @6303 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6303 = 400.0f; -// COMPILER_STRIP_GATE(0x80A1A48C, &lit_6303); -// #pragma pop - -// /* 80A1A490-80A1A494 000160 0004+00 0/1 0/0 0/0 .rodata @6304 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6304 = 45.0f; -// COMPILER_STRIP_GATE(0x80A1A490, &lit_6304); -// #pragma pop - -// /* 80A1A494-80A1A498 000164 0004+00 0/1 0/0 0/0 .rodata @6305 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6305 = 135.0f; -// COMPILER_STRIP_GATE(0x80A1A494, &lit_6305); -// #pragma pop - -// /* 80A1A498-80A1A49C 000168 0004+00 0/1 0/0 0/0 .rodata @6306 */ -// #pragma push -// #pragma force_active on -// SECTION_RODATA static f32 const lit_6306 = 450.0f; -// COMPILER_STRIP_GATE(0x80A1A498, &lit_6306); -// #pragma pop - /* 80A1856C-80A18B74 003F4C 0608+00 1/0 0/0 0/0 .text talkwithBou__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::talkwithBou(void* param_0) { bool bVar2; @@ -2472,6 +1935,7 @@ int daNpc_Jagar_c::talk(void* param_0) { dComIfGp_event_reset(); mMode = 3; } + if (mType == TYPE_1) { mJntAnm.lookActor(mActorMngr[2].getActorP(), -50.0f, 0); } else { @@ -2518,273 +1982,6 @@ static int daNpc_Jagar_IsDelete(void* i_this) { return 1; } -// /* 80A18FB0-80A18FE0 004990 0030+00 1/0 0/0 0/0 .text calc__11J3DTexNoAnmCFPUs */ -// // void J3DTexNoAnm::calc(u16* param_0) const { -// extern "C" void calc__11J3DTexNoAnmCFPUs() { -// // NONMATCHING -// } - -// /* 80A18FE0-80A19028 0049C0 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// // cCcD_GStts::~cCcD_GStts() { -// extern "C" void __dt__10cCcD_GSttsFv() { -// // NONMATCHING -// } - -// /* 80A19028-80A193B0 004A08 0388+00 1/1 0/0 0/0 .text __dt__8daNpcT_cFv */ -// // daNpcT_c::~daNpcT_c() { -// extern "C" void __dt__8daNpcT_cFv() { -// // NONMATCHING -// } - -// /* 80A193B0-80A193EC 004D90 003C+00 4/4 0/0 0/0 .text __dt__4cXyzFv */ -// // cXyz::~cXyz() { -// extern "C" void __dt__4cXyzFv() { -// // NONMATCHING -// } - -// /* 80A193EC-80A19428 004DCC 003C+00 2/2 0/0 0/0 .text __dt__5csXyzFv */ -// // csXyz::~csXyz() { -// extern "C" void __dt__5csXyzFv() { -// // NONMATCHING -// } - -// /* 80A19428-80A19470 004E08 0048+00 3/2 0/0 0/0 .text __dt__18daNpcT_ActorMngr_cFv */ -// // daNpcT_ActorMngr_c::~daNpcT_ActorMngr_c() { -// extern "C" void __dt__18daNpcT_ActorMngr_cFv() { -// // NONMATCHING -// } - -// /* 80A19470-80A194B8 004E50 0048+00 1/0 0/0 0/0 .text __dt__13daNpcT_Path_cFv */ -// // daNpcT_Path_c::~daNpcT_Path_c() { -// extern "C" void __dt__13daNpcT_Path_cFv() { -// // NONMATCHING -// } - -// /* 80A194B8-80A194F4 004E98 003C+00 1/1 0/0 0/0 .text __ct__18daNpcT_ActorMngr_cFv */ -// // daNpcT_ActorMngr_c::daNpcT_ActorMngr_c() { -// extern "C" void __ct__18daNpcT_ActorMngr_cFv() { -// // NONMATCHING -// } - -// /* 80A194F4-80A1953C 004ED4 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */ -// // cM3dGCyl::~cM3dGCyl() { -// extern "C" void __dt__8cM3dGCylFv() { -// // NONMATCHING -// } - -// /* 80A1953C-80A19584 004F1C 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// // cM3dGAab::~cM3dGAab() { -// extern "C" void __dt__8cM3dGAabFv() { -// // NONMATCHING -// } - -/* 80A19584-80A19988 004F64 0404+00 1/1 0/0 0/0 .text - * __ct__8daNpcT_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc - */ -// daNpcT_c::daNpcT_c(daNpcT_faceMotionAnmData_c const* param_0, -// daNpcT_motionAnmData_c const* param_1, -// daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_2, int param_3, -// daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_4, int param_5, -// daNpcT_evtData_c const* param_6, char** param_7) { -// extern "C" void __ct__8daNpcT_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc() { -// // NONMATCHING -// } - -// /* 80A19988-80A1998C 005368 0004+00 1/1 0/0 0/0 .text __ct__5csXyzFv */ -// // csXyz::csXyz() { -// extern "C" void __ct__5csXyzFv() { -// /* empty function */ -// } - -// /* 80A1998C-80A19A88 00536C 00FC+00 1/0 0/0 0/0 .text __dt__15daNpcT_JntAnm_cFv */ -// // daNpcT_JntAnm_c::~daNpcT_JntAnm_c() { -// extern "C" void __dt__15daNpcT_JntAnm_cFv() { -// // NONMATCHING -// } - -// /* 80A19A88-80A19A8C 005468 0004+00 1/1 0/0 0/0 .text __ct__4cXyzFv */ -// // cXyz::cXyz() { -// extern "C" void __ct__4cXyzFv() { -// /* empty function */ -// } - -/* 80A19A8C-80A19AD4 00546C 0048+00 1/0 0/0 0/0 .text __dt__22daNpcT_MotionSeqMngr_cFv */ -// daNpcT_MotionSeqMngr_c::~daNpcT_MotionSeqMngr_c() { -// extern "C" void __dt__22daNpcT_MotionSeqMngr_cFv() { -// // NONMATCHING -// } - -/* 80A19AD4-80A19B44 0054B4 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -// extern "C" void __dt__12dBgS_AcchCirFv() { -// // NONMATCHING -// } - -/* 80A19B44-80A19BA0 005524 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ -// dCcD_GStts::~dCcD_GStts() { -// extern "C" void __dt__10dCcD_GSttsFv() { -// // NONMATCHING -// } - -/* 80A19BA0-80A19C10 005580 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -// extern "C" void __dt__12dBgS_ObjAcchFv() { -// // NONMATCHING -// } - -/* 80A19C10-80A19C58 0055F0 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ -// J3DFrameCtrl::~J3DFrameCtrl() { -// extern "C" void __dt__12J3DFrameCtrlFv() { -// // NONMATCHING -// } - -/* 80A19C58-80A19D74 005638 011C+00 1/1 0/0 0/0 .text setEyeAngleY__15daNpcT_JntAnm_cF4cXyzsifs */ -// void daNpcT_JntAnm_c::setEyeAngleY(cXyz param_0, s16 param_1, int param_2, f32 param_3, -// s16 param_4) { -// extern "C" void setEyeAngleY__15daNpcT_JntAnm_cF4cXyzsifs() { -// // NONMATCHING -// } - -// /* 80A19D74-80A19F7C 005754 0208+00 1/1 0/0 0/0 .text setEyeAngleX__15daNpcT_JntAnm_cF4cXyzfs */ -// // void daNpcT_JntAnm_c::setEyeAngleX(cXyz param_0, f32 param_1, s16 param_2) { -// extern "C" void setEyeAngleX__15daNpcT_JntAnm_cF4cXyzfs() { -// // NONMATCHING -// } - -// /* 80A19F7C-80A19F80 00595C 0004+00 1/0 0/0 0/0 .text ctrlSubFaceMotion__8daNpcT_cFi */ -// // void daNpcT_c::ctrlSubFaceMotion(int param_0) { -// extern "C" void ctrlSubFaceMotion__8daNpcT_cFi() { -// /* empty function */ -// } - -// /* 80A19F80-80A19F88 005960 0008+00 1/0 0/0 0/0 .text getEyeballLMaterialNo__8daNpcT_cFv -// */ -// // bool daNpcT_c::getEyeballLMaterialNo() { -// extern "C" bool getEyeballLMaterialNo__8daNpcT_cFv() { -// return false; -// } - -// /* 80A19F88-80A19F90 005968 0008+00 1/0 0/0 0/0 .text getEyeballRMaterialNo__8daNpcT_cFv -// */ -// // bool daNpcT_c::getEyeballRMaterialNo() { -// extern "C" bool getEyeballRMaterialNo__8daNpcT_cFv() { -// return false; -// } - -// /* 80A19F90-80A19F98 005970 0008+00 1/0 0/0 0/0 .text evtEndProc__8daNpcT_cFv */ -// // bool daNpcT_c::evtEndProc() { -// extern "C" bool evtEndProc__8daNpcT_cFv() { -// return true; -// } - -/* 80A19F98-80A19F9C 005978 0004+00 1/0 0/0 0/0 .text afterMoved__8daNpcT_cFv */ -// void daNpcT_c::afterMoved() { -// /* empty function */ -// } - -// /* 80A19F9C-80A19FA4 00597C 0008+00 1/0 0/0 0/0 .text chkXYItems__8daNpcT_cFv */ -// // bool daNpcT_c::chkXYItems() { -// extern "C" bool chkXYItems__8daNpcT_cFv() { -// return false; -// } - -// /* 80A19FA4-80A19FBC 005984 0018+00 1/0 0/0 0/0 .text decTmr__8daNpcT_cFv */ -// // void daNpcT_c::decTmr() { -// extern "C" void decTmr__8daNpcT_cFv() { -// // NONMATCHING -// } - -// /* 80A19FBC-80A19FC0 00599C 0004+00 1/0 0/0 0/0 .text drawOtherMdl__8daNpcT_cFv */ -// // void daNpcT_c::drawOtherMdl() { -// extern "C" void drawOtherMdl__8daNpcT_cFv() { -// /* empty function */ -// } - -// /* 80A19FC0-80A19FC4 0059A0 0004+00 1/0 0/0 0/0 .text drawGhost__8daNpcT_cFv */ -// // void daNpcT_c::drawGhost() { -// extern "C" void drawGhost__8daNpcT_cFv() { -// /* empty function */ -// } - -// /* 80A19FC4-80A19FCC 0059A4 0008+00 1/0 0/0 0/0 .text afterSetFaceMotionAnm__8daNpcT_cFiifi */ -// // bool daNpcT_c::afterSetFaceMotionAnm(int param_0, int param_1, f32 param_2, int param_3) { -// extern "C" bool afterSetFaceMotionAnm__8daNpcT_cFiifi() { -// return true; -// } - -// /* 80A19FCC-80A19FD4 0059AC 0008+00 1/0 0/0 0/0 .text afterSetMotionAnm__8daNpcT_cFiifi -// */ -// // bool daNpcT_c::afterSetMotionAnm(int param_0, int param_1, f32 param_2, int param_3) { -// extern "C" bool afterSetMotionAnm__8daNpcT_cFiifi() { -// return true; -// } - -// /* 80A19FD4-80A1A004 0059B4 0030+00 1/0 0/0 0/0 .text -// * getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c */ -// // void daNpcT_c::getFaceMotionAnm(daNpcT_faceMotionAnmData_c param_0) { -// extern "C" void getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c() { -// // NONMATCHING -// } - -// /* 80A1A004-80A1A034 0059E4 0030+00 1/0 0/0 0/0 .text -// * getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c */ -// // void daNpcT_c::getMotionAnm(daNpcT_motionAnmData_c param_0) { -// extern "C" void getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c() { -// // NONMATCHING -// } - -// /* 80A1A034-80A1A038 005A14 0004+00 1/0 0/0 0/0 .text changeAnm__8daNpcT_cFPiPi */ -// // void daNpcT_c::changeAnm(int* param_0, int* param_1) { -// extern "C" void changeAnm__8daNpcT_cFPiPi() { -// /* empty function */ -// } - -// /* 80A1A038-80A1A03C 005A18 0004+00 1/0 0/0 0/0 .text changeBck__8daNpcT_cFPiPi */ -// // void daNpcT_c::changeBck(int* param_0, int* param_1) { -// extern "C" void changeBck__8daNpcT_cFPiPi() { -// /* empty function */ -// } - -// /* 80A1A03C-80A1A040 005A1C 0004+00 1/0 0/0 0/0 .text changeBtk__8daNpcT_cFPiPi */ -// // void daNpcT_c::changeBtk(int* param_0, int* param_1) { -// extern "C" void changeBtk__8daNpcT_cFPiPi() { -// /* empty function */ -// } - -// /* 80A1A040-80A1A05C 005A20 001C+00 2/2 0/0 0/0 .text cLib_calcTimer__FPi */ -// extern "C" void func_80A1A040(void* _this, int* param_0) { -// // NONMATCHING -// } - -// /* 80A1A05C-80A1A098 005A3C 003C+00 1/1 0/0 0/0 .text cLib_getRndValue__Fff */ -// extern "C" void func_80A1A05C(void* _this, f32 param_0, f32 param_1) { -// // NONMATCHING -// } - -/* ############################################################################################## */ - -// /* 80A1A098-80A1A194 005A78 00FC+00 0/0 1/0 0/0 .text __sinit_d_a_npc_jagar_cpp */ -// void __sinit_d_a_npc_jagar_cpp() { -// // NONMATCHING -// } - -// #pragma push -// #pragma force_active on -// REGISTER_CTORS(0x80A1A098, __sinit_d_a_npc_jagar_cpp); -// #pragma pop - -/* 80A1A194-80A1A274 005B74 00E0+00 1/1 0/0 0/0 .text - * __ct__13daNpc_Jagar_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc - */ -// daNpc_Jagar_c::daNpc_Jagar_c(daNpcT_faceMotionAnmData_c const* param_0, -// daNpcT_motionAnmData_c const* param_1, -// daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_2, -// int param_3, -// daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_4, -// int param_5, daNpcT_evtData_c const* param_6, char** param_7) { -// // NONMATCHING -// } - /* 80A1A274-80A1A27C 005C54 0008+00 1/0 0/0 0/0 .text getEyeballMaterialNo__13daNpc_Jagar_cFv */ s32 daNpc_Jagar_c::getEyeballMaterialNo() { return true; @@ -2819,21 +2016,6 @@ s32 daNpc_Jagar_c::getFootRJointNo() { return 26; } -/* 80A1A2C4-80A1A30C 005CA4 0048+00 2/1 0/0 0/0 .text __dt__19daNpc_Jagar_Param_cFv */ -// daNpc_Jagar_Param_c::~daNpc_Jagar_Param_c() { -// // NONMATCHING -// } - -/* 80A1A30C-80A1A314 005CEC 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -// static void func_80A1A30C() { -// // NONMATCHING -// } - -// /* 80A1A314-80A1A31C 005CF4 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -// static void func_80A1A314() { -// // NONMATCHING -// } - // /* ############################################################################################## */ // /* 80A1AE4C-80A1AE50 000074 0004+00 0/0 0/0 0/0 .bss // * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ @@ -3006,8 +2188,6 @@ s32 daNpc_Jagar_c::getFootRJointNo() { // static u8 data_80A1AEAC[4]; // #pragma pop -/* 80A1A49C-80A1A49C 00016C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ - /* 80A1AC10-80A1AC30 -00001 0020+00 1/0 0/0 0/0 .data daNpc_Jagar_MethodTable */ static actor_method_class daNpc_Jagar_MethodTable = { (process_method_func)daNpc_Jagar_Create__FPv, @@ -3042,11 +2222,4 @@ SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { (void*)__dt__13daNpcT_Path_cFv, }; -// /* 80A1ADCC-80A1ADD8 000884 000C+00 2/2 0/0 0/0 .data __vt__19daNpc_Jagar_Param_c */ -// SECTION_DATA extern void* __vt__19daNpc_Jagar_Param_c[3] = { -// (void*)NULL /* RTTI */, -// (void*)NULL, -// (void*)__dt__19daNpc_Jagar_Param_cFv, -// }; - AUDIO_INSTANCES; From b5426ed82d442497299dfea99f25252228976ed7 Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Sun, 2 Mar 2025 20:57:58 -0500 Subject: [PATCH 39/41] Minor variable initialization change --- src/d/actor/d_a_npc_jagar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index bc0bf3eb756..7abf54cb4ac 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -1193,6 +1193,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { int local_30 = 0; int local_34 = 0; int local_38 = 0; + fopAc_ac_c* actor_p; int* piVar5 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); if (piVar5) { iVar12 = *piVar5; @@ -1258,7 +1259,7 @@ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { case 3: case 4: case 5: - fopAc_ac_c* actor_p = mActorMngr[0].getActorP(); + actor_p = mActorMngr[0].getActorP(); if (actor_p) { field_0xd6c.setall(0.0f); field_0xd6c.z = current.pos.absXZ(actor_p->current.pos); From b7915f0ceda8d55c2671b17bd4edbcdeaeb1af2e Mon Sep 17 00:00:00 2001 From: carter-ktb21 <144170194+carter-ktb21@users.noreply.github.com> Date: Tue, 4 Mar 2025 13:49:13 -0500 Subject: [PATCH 40/41] Small cleanup --- src/d/actor/d_a_npc_jagar.cpp | 222 +++------------------------------- 1 file changed, 19 insertions(+), 203 deletions(-) diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index 7abf54cb4ac..a08987b956a 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -280,12 +280,10 @@ extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; extern "C" extern void* __vt__9cCcD_Stts[8]; extern "C" extern void* __vt__14J3DMaterialAnm[4]; extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern dMeter2Info_c g_meter2_info; extern "C" void getType__11daNpc_Bou_cFv(); extern "C" u8 const m__17daNpc_Bou_Param_c[156]; extern "C" void __register_global_object(); -UNK_REL_BSS; // // Declarations: // @@ -494,30 +492,22 @@ daNpc_Jagar_Param_c::param const daNpc_Jagar_Param_c::m = { 200.0f, -800.0f, 16.0f, 1800.0f, }; -/* 80A1A3D0-80A1A3E0 0000A0 0010+00 0/1 0/0 0/0 .rodata heapSize$4099 */ -static int const heapSize[4] = { - 0x3850, 0x3870, 0x3870, 0 -}; - /* 80A14858-80A14B20 000238 02C8+00 1/1 0/0 0/0 .text create__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::create() { + static int const heapSize[4] = {14416, 14448, 14448, 0}; fopAcM_SetupActor2(this, daNpc_Jagar_c, l_faceMotionAnmData, (const daNpcT_motionAnmData_c *)l_motionAnmData, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *) l_faceMotionSequenceData, 4, (const daNpcT_MotionSeqMngr_c::sequenceStepData_c *)l_motionSequenceData, 4, (const daNpcT_evtData_c *)l_evtList, (char **)l_resNameList ); mType = getType(); mFlowNodeNo = getFlowNodeNo(); - mTwilight = 0; /* WIP */ + mTwilight = 0; int rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (rv == cPhs_COMPLEATE_e) { - // OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), (uint)mType, - // field_0xa7c, getPathID(), fopAcM_GetParam(this)); if (isDelete()) { return cPhs_ERROR_e; } - // OS_REPORT("\n"); if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) { - OS_REPORT("===>isDelete:TRUE\n"); return cPhs_ERROR_e; } J3DModelData* modelData = mpMorf[0]->getModel()->getModelData(); @@ -656,10 +646,12 @@ void daNpc_Jagar_c::reset() { if (mpMatAnm != NULL) { mpMatAnm->initialize(); } + initialize(); for (int i = 0; i < 5; i++) { mActorMngr[i].initialize(); } + memset(&field_0xfd4, 0, iVar1); acStack_20.setall(0); acStack_20.y = home.angle.y; @@ -918,6 +910,7 @@ void daNpc_Jagar_c::beforeMove() { } } +UNK_REL_BSS; /* ############################################################################################## */ // /* 80A1ADE0-80A1ADE4 000008 0001+03 1/1 0/0 0/0 .bss @1109 */ // static u8 lit_1109[1 + 3 /* padding */]; @@ -1188,6 +1181,7 @@ int daNpc_Jagar_c::cutClimbUp(int param_0) { /* 80A16544-80A16CD8 001F24 0794+00 1/0 0/0 0/0 .text cutNeedYourHelp__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutNeedYourHelp(int param_1) { + // NONMATCHING int rv = 0; int iVar12 = -1; int local_30 = 0; @@ -1375,6 +1369,7 @@ int daNpc_Jagar_c::cutConversationWithBou(int param_0) { /* 80A1705C-80A173D8 002A3C 037C+00 1/0 0/0 0/0 .text * cutConfidentialConversation__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { + // NONMATCHING int iVar7 = 0; int iVar8 = -1; int rv = 0; @@ -1426,6 +1421,7 @@ int daNpc_Jagar_c::cutConfidentialConversation(int param_0) { /* 80A173D8-80A17898 002DB8 04C0+00 3/0 0/0 0/0 .text cutFindWolf__13daNpc_Jagar_cFi */ int daNpc_Jagar_c::cutFindWolf(int param_0) { + // NONMATCHING int rv = 0; int uVar6 = -1; int iVar4 = 0; @@ -1561,21 +1557,11 @@ int daNpc_Jagar_c::chkChuMotion() { /* 80A179F8-80A17A2C 0033D8 0034+00 1/1 0/0 0/0 .text chkToMotion__13daNpc_Jagar_cFv */ int daNpc_Jagar_c::chkToMotion() { - // The inline assembly was the only way I could find to get proper regalloc - // asm { - // li r0, 0x0 // int rv = 0; - // lwz r3, 0xb7c(r3) // Loads mMotionSeqMngr into register 3 - // } + // NONMATCHING int rv = 0; if (mMotionSeqMngr.getNo() == 10 || mMotionSeqMngr.getNo() == 11 || mMotionSeqMngr.getNo() == 12 || mMotionSeqMngr.getNo() == 13) { - // asm { - // li r0, 0x1 // rv = 1; - // } rv = 1; } - // asm { - // clrlwi r3, r0, 24 // return rv & ((1U << 8) - 1); - // } return rv & ((1U << 8) - 1); } @@ -1790,6 +1776,7 @@ int daNpc_Jagar_c::wait(void* param_0) { /* 80A1856C-80A18B74 003F4C 0608+00 1/0 0/0 0/0 .text talkwithBou__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::talkwithBou(void* param_0) { + // NONMATCHING bool bVar2; int uVar3; daNpc_Bou_c *bo = (daNpc_Bou_c *)mActorMngr[2].getActorP(); @@ -1815,18 +1802,18 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { } if (mHide != 0) { fopAcM_setCullSizeBox((fopAc_ac_c *)this, -300.0f, -50.0f, -200.0f, 300.0f, 300.0f, 400.0f); - goto LAB_80a18a8c; + goto LAB_80a18a8c; // Fakematch } uVar3 = (int)daNpcT_getDistTableIdx(field_0xff0, field_0xff4); if (!chkFindWolf(mCurAngle.y, uVar3, field_0xfec, daNpc_Jagar_Param_c::m.field_0x54, daNpc_Jagar_Param_c::m.field_0x50, daNpc_Jagar_Param_c::m.field_0x58, daNpc_Jagar_Param_c::m.field_0x5c, 1)) { if (bo) { if (bo->chkFindWolf()) { - goto LAB_80a18744; + goto LAB_80a18744; // Fakematch } } } else { -LAB_80a18744: +LAB_80a18744: // Fakematch mEvtNo = 7; } if (bo) { @@ -1841,7 +1828,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { } else if (mMotionSeqMngr.getNo() == 5) { bVar2 = true; } else { -LAB_80a187c4: +LAB_80a187c4: // Fakematch bVar2 = false; } } else { @@ -1857,13 +1844,13 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { } else if (mMotionSeqMngr.getNo() == 1) { bVar2 = true; } else { -LAB_80a18824: +LAB_80a18824: // Fakematch bVar2 = false; } } if (bVar2) { - field_0xff8 = cLib_getRndValue(45.0f, 142.0f); - if ((field_0x1000 ^ 1) & 1 == 1) { + field_0xff8 = cLib_getRndValue(45.0f, 135.0f); + if ((field_0x1000 ^ 1) & (1 == 1)) { bo->mFaceMotionSeqMngr.setNo(10, -1.0f, 0, 0); if (0.0f < 0.0f + (cM_rnd() - 0.5f)) { bo->mMotionSeqMngr.setNo(1, -1.0f, 0, 0); @@ -1890,7 +1877,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { } } fopAcM_setCullSizeBox((fopAc_ac_c *)this,-300.0f,-50.0f,-300.0f,300.0f,450.0f,300.0f); -LAB_80a18a8c: +LAB_80a18a8c: // Fakematch if (bo) { mJntAnm.lookActor((fopAc_ac_c *)bo, -50.0f, 0); } else { @@ -1902,6 +1889,7 @@ int daNpc_Jagar_c::talkwithBou(void* param_0) { /* REGALLOC ISSUE */ /* 80A18B74-80A18F28 004554 03B4+00 3/0 0/0 0/0 .text talk__13daNpc_Jagar_cFPv */ int daNpc_Jagar_c::talk(void* param_0) { + // NONMATCHING switch(mMode) { case 0: case 1: @@ -2017,178 +2005,6 @@ s32 daNpc_Jagar_c::getFootRJointNo() { return 26; } -// /* ############################################################################################## */ -// /* 80A1AE4C-80A1AE50 000074 0004+00 0/0 0/0 0/0 .bss -// * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE4C[4]; -// #pragma pop - -// /* 80A1AE50-80A1AE54 000078 0004+00 0/0 0/0 0/0 .bss -// * sInstance__35JASGlobalInstance<14JASAudioThread> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE50[4]; -// #pragma pop - -// /* 80A1AE54-80A1AE58 00007C 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE54[4]; -// #pragma pop - -// /* 80A1AE58-80A1AE5C 000080 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE58[4]; -// #pragma pop - -// /* 80A1AE5C-80A1AE60 000084 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> -// */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE5C[4]; -// #pragma pop - -// /* 80A1AE60-80A1AE64 000088 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> -// */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE60[4]; -// #pragma pop - -// /* 80A1AE64-80A1AE68 00008C 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> -// */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE64[4]; -// #pragma pop - -// /* 80A1AE68-80A1AE6C 000090 0004+00 0/0 0/0 0/0 .bss -// * sInstance__36JASGlobalInstance<15JAISoundStarter> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE68[4]; -// #pragma pop - -// /* 80A1AE6C-80A1AE70 000094 0004+00 0/0 0/0 0/0 .bss -// * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE6C[4]; -// #pragma pop - -// /* 80A1AE70-80A1AE74 000098 0004+00 0/0 0/0 0/0 .bss -// * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE70[4]; -// #pragma pop - -// /* 80A1AE74-80A1AE78 00009C 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE74[4]; -// #pragma pop - -// /* 80A1AE78-80A1AE7C 0000A0 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE78[4]; -// #pragma pop - -// /* 80A1AE7C-80A1AE80 0000A4 0004+00 0/0 0/0 0/0 .bss -// * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE7C[4]; -// #pragma pop - -// /* 80A1AE80-80A1AE84 0000A8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> -// */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE80[4]; -// #pragma pop - -// /* 80A1AE84-80A1AE88 0000AC 0004+00 0/0 0/0 0/0 .bss -// * sInstance__33JASGlobalInstance<12JAISoundInfo> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE84[4]; -// #pragma pop - -// /* 80A1AE88-80A1AE8C 0000B0 0004+00 0/0 0/0 0/0 .bss -// * sInstance__34JASGlobalInstance<13JAUSoundTable> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE88[4]; -// #pragma pop - -// /* 80A1AE8C-80A1AE90 0000B4 0004+00 0/0 0/0 0/0 .bss -// * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE8C[4]; -// #pragma pop - -// /* 80A1AE90-80A1AE94 0000B8 0004+00 0/0 0/0 0/0 .bss -// * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE90[4]; -// #pragma pop - -// /* 80A1AE94-80A1AE98 0000BC 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> -// */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE94[4]; -// #pragma pop - -// /* 80A1AE98-80A1AE9C 0000C0 0004+00 0/0 0/0 0/0 .bss -// * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE98[4]; -// #pragma pop - -// /* 80A1AE9C-80A1AEA0 0000C4 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> -// */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AE9C[4]; -// #pragma pop - -// /* 80A1AEA0-80A1AEA4 0000C8 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> -// */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AEA0[4]; -// #pragma pop - -// /* 80A1AEA4-80A1AEA8 0000CC 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> -// */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AEA4[4]; -// #pragma pop - -// /* 80A1AEA8-80A1AEAC 0000D0 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> -// */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AEA8[4]; -// #pragma pop - -// /* 80A1AEAC-80A1AEB0 0000D4 0004+00 0/0 0/0 0/0 .bss -// * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ -// #pragma push -// #pragma force_active on -// static u8 data_80A1AEAC[4]; -// #pragma pop - /* 80A1AC10-80A1AC30 -00001 0020+00 1/0 0/0 0/0 .data daNpc_Jagar_MethodTable */ static actor_method_class daNpc_Jagar_MethodTable = { (process_method_func)daNpc_Jagar_Create__FPv, From f28c01156f34f18170cd0ba535615dff6c740996 Mon Sep 17 00:00:00 2001 From: Carter <144170194+carter-ktb21@users.noreply.github.com> Date: Fri, 7 Mar 2025 12:21:40 -0500 Subject: [PATCH 41/41] Hopefully fixed d_a_npc_bou compilation error --- include/d/actor/d_a_npc_bou.h | 56 ++++++++++++++++++++++++++++++--- include/d/actor/d_a_npc_jagar.h | 4 +-- src/d/actor/d_a_npc_bou.cpp | 17 ++++------ src/d/actor/d_a_npc_jagar.cpp | 2 +- 4 files changed, 61 insertions(+), 18 deletions(-) diff --git a/include/d/actor/d_a_npc_bou.h b/include/d/actor/d_a_npc_bou.h index 7e9e8bf9f63..d0bb47750ae 100644 --- a/include/d/actor/d_a_npc_bou.h +++ b/include/d/actor/d_a_npc_bou.h @@ -16,10 +16,48 @@ /* 809727F4 */ ~daNpc_Bou_Param_c(); struct Data { - /* 0x58 */ f32 field_0x58; - /* 0x5C */ f32 field_0x5c; - /* 0x60 */ f32 field_0x60; - /* 0x100 */ f32 field_0x100; + /* 0x00 */ f32 field_0x00; // 255.0f + /* 0x04 */ f32 field_0x04; // 3.0f + /* 0x08 */ f32 field_0x08; // 1.0f + /* 0x0C */ f32 field_0x0c; // 600.0f + /* 0x10 */ f32 field_0x10; // 255.0f + /* 0x14 */ f32 field_0x14; // 200.0f + /* 0x18 */ f32 field_0x18; // 35.0f + /* 0x1C */ f32 field_0x1c; // 40.0f + /* 0x20 */ f32 field_0x20; // 0.0f + /* 0x24 */ f32 field_0x24; // 0.0f + /* 0x28 */ f32 field_0x28; // 10.0f + /* 0x2C */ f32 field_0x2c; // -10.0f + /* 0x30 */ f32 field_0x30; // 30.0f + /* 0x34 */ f32 field_0x34; // -10.0f + /* 0x38 */ f32 field_0x38; // 45.0f + /* 0x3C */ f32 field_0x3c; // -45.0f + /* 0x40 */ f32 field_0x40; // 0.6f + /* 0x44 */ f32 field_0x44; // 12.0f + /* 0x48 */ s16 field_0x48; // 3 + /* 0x4C */ s16 field_0x4c; // 6 + /* 0x50 */ s16 field_0x50; // 5 + /* 0x54 */ s16 field_0x54; // 6 + /* 0x58 */ f32 field_0x58; // 110.0f + /* 0x5C */ f32 field_0x5c; // 500.0f + /* 0x60 */ f32 field_0x60; // 300.0f + /* 0x64 */ f32 field_0x64; // -300.0f + /* 0x68 */ s16 field_0x68; // 60 + /* 0x6C */ s16 field_0x6c; // 8 + /* 0x70 */ f32 field_0x70; // 0.0f + /* 0x74 */ f32 field_0x74; // 0.0f + /* 0x78 */ f32 field_0x78; // 4.0f + /* 0x7C */ f32 field_0x7c; // 0.0f + /* 0x80 */ f32 field_0x80; // 0.0f + /* 0x84 */ f32 field_0x84; // 0.0f + /* 0x88 */ f32 field_0x88; // 0.0f + /* 0x8C */ f32 field_0x8c; // 0.0f + /* 0x90 */ f32 field_0x90; // 0.0f + /* 0x94 */ f32 field_0x94; // 0.0f + /* 0x98 */ f32 field_0x98; // 16.0f + /* 0x9C */ f32 field_0x9c; // 1000.0f + /* 0x100 */ f32 field_0x100; // 500.0f + /* 0x104 */ f32 field_0x104; // -500.0f }; static const Data m; @@ -27,6 +65,16 @@ class daNpc_Bou_c : public daNpcT_c { public: + + enum Type { + TYPE_0, + TYPE_1, + TYPE_2, + TYPE_3, + TYPE_4, + TYPE_5, + }; + /* 8096CF8C */ ~daNpc_Bou_c(); /* 8096D0D8 */ void create(); /* 8096D38C */ void CreateHeap(); diff --git a/include/d/actor/d_a_npc_jagar.h b/include/d/actor/d_a_npc_jagar.h index d8b274798e6..780cc2e862b 100644 --- a/include/d/actor/d_a_npc_jagar.h +++ b/include/d/actor/d_a_npc_jagar.h @@ -119,7 +119,7 @@ class daNpc_Jagar_Param_c { public: /* 80A1A2C4 */ virtual ~daNpc_Jagar_Param_c() {} - struct param { + struct Data { /* 0x00 */ f32 field_0x00; // 170.0f /* 0x04 */ f32 field_0x04; // -3.0f /* 0x08 */ f32 field_0x08; // 1.0f @@ -165,7 +165,7 @@ class daNpc_Jagar_Param_c { /* 0x9C */ f32 field_0x9c; // 1800.0f }; - static const param m; + static const Data m; }; #endif /* D_A_NPC_JAGAR_H */ diff --git a/src/d/actor/d_a_npc_bou.cpp b/src/d/actor/d_a_npc_bou.cpp index a14e612855c..07e09480737 100644 --- a/src/d/actor/d_a_npc_bou.cpp +++ b/src/d/actor/d_a_npc_bou.cpp @@ -883,17 +883,12 @@ daNpc_Bou_c::~daNpc_Bou_c() { /* ############################################################################################## */ /* 80972860-809728FC 000000 009C+00 13/13 0/0 1/1 .rodata m__17daNpc_Bou_Param_c */ -SECTION_RODATA u8 const daNpc_Bou_Param_c::m[156] = { - 0x43, 0x52, 0x00, 0x00, 0xC0, 0x40, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x44, 0x16, 0x00, 0x00, - 0x43, 0x7F, 0x00, 0x00, 0x43, 0x48, 0x00, 0x00, 0x42, 0x0C, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x20, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, - 0x41, 0xF0, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, 0x42, 0x34, 0x00, 0x00, 0xC2, 0x34, 0x00, 0x00, - 0x3F, 0x19, 0x99, 0x9A, 0x41, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x05, 0x00, 0x06, - 0x42, 0xDC, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00, 0x43, 0x96, 0x00, 0x00, 0xC3, 0x96, 0x00, 0x00, - 0x00, 0x3C, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x80, 0x00, 0x00, - 0x44, 0x7A, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00, 0xC3, 0xFA, 0x00, 0x00, +daNpc_Bou_Param_c::Data const daNpc_Bou_Param_c::m= { + 255.0f, -3.0f, 1.0f, 600.0f, 255.0f, 200.0f, 35.0f, 40.0f, + 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, + 0.6f, 12.0f, 3, 6, 5, 6, 110.0f, 500.0f, 300.0f, -300.0f, + 60, 8, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 16.0f, 1000.0f, 500.0f, -500.0f, }; COMPILER_STRIP_GATE(0x80972860, &daNpc_Bou_Param_c::m); diff --git a/src/d/actor/d_a_npc_jagar.cpp b/src/d/actor/d_a_npc_jagar.cpp index a08987b956a..8eeeb9cc447 100644 --- a/src/d/actor/d_a_npc_jagar.cpp +++ b/src/d/actor/d_a_npc_jagar.cpp @@ -482,7 +482,7 @@ daNpc_Jagar_c::~daNpc_Jagar_c() { /* ############################################################################################## */ /* 80A1A330-80A1A3D0 000000 00A0+00 13/13 0/0 1/1 .rodata m__19daNpc_Jagar_Param_c */ -daNpc_Jagar_Param_c::param const daNpc_Jagar_Param_c::m = { +daNpc_Jagar_Param_c::Data const daNpc_Jagar_Param_c::m = { 170.0f, -3.0f, 1.0f, 400.0f, 255.0f, 160.0f, 35.0f, 30.0f, 0.0f, 0.0f, 10.0f, -10.0f, 30.0f, -10.0f, 45.0f, -45.0f, 0.6f, 12.0f,