mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_a_arrow matching (#2513)
* d_a_arrow matching * d_a_demo_item Matching * Change e_ba_class class to hold fopEn_enemy_c
This commit is contained in:
@@ -96,6 +96,7 @@ l_wolf_offset = .bss:0x0000006C; // type:object size:0xC scope:global
|
||||
@3760 = .bss:0x00000078; // type:object size:0xC scope:local
|
||||
l_horse_offset = .bss:0x00000084; // type:object size:0xC scope:global
|
||||
@4275 = .bss:0x00000090; // type:object size:0xC scope:local
|
||||
init$1935 = .bss:0x0000009C; // type:object size:0x1 scope:local
|
||||
@4278 = .bss:0x000000A0; // type:object size:0xC scope:local
|
||||
@4279 = .bss:0x000000AC; // type:object size:0xC scope:local
|
||||
offset_tbl$4274 = .bss:0x000000B8; // type:object size:0x24 scope:local
|
||||
|
||||
+2
-2
@@ -1517,7 +1517,7 @@ config.libs = [
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_tbox2"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_vrbox"),
|
||||
ActorRel(NonMatching, "d_a_vrbox2"),
|
||||
ActorRel(NonMatching, "d_a_arrow"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_arrow"),
|
||||
ActorRel(NonMatching, "d_a_boomerang"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_crod"),
|
||||
ActorRel(NonMatching, "d_a_demo00"),
|
||||
@@ -1535,7 +1535,7 @@ config.libs = [
|
||||
ActorRel(NonMatching, "d_a_bd"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_canoe"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_cstaF"),
|
||||
ActorRel(NonMatching, "d_a_demo_item"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_demo_item"),
|
||||
ActorRel(MatchingFor("GZ2E01"), "d_a_door_bossL1"),
|
||||
ActorRel(Equivalent, "d_a_e_dn"), # weak func order
|
||||
ActorRel(Equivalent, "d_a_e_fm"),
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
void setAction(u8 i_action) { mAction = i_action; }
|
||||
|
||||
u32 chkArgFlag(u8 i_flag) { return field_0x93d & i_flag; }
|
||||
u8 chkArgFlag(u8 i_flag) { return field_0x93d & i_flag; }
|
||||
|
||||
void setOffsetPos(cXyz i_pos) { mOffsetPos = i_pos; }
|
||||
void setMaxScale(f32 i_scale) { mMaxScale = i_scale; }
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* @details
|
||||
*
|
||||
*/
|
||||
class e_ba_class : public fopEn_enemy_c {
|
||||
class e_ba_class {
|
||||
public:
|
||||
enum Type {
|
||||
/* 0 */ TYPE_NORMAL,
|
||||
@@ -54,6 +54,7 @@ public:
|
||||
/* 0xA */ ANM_WAIT,
|
||||
};
|
||||
|
||||
/* 0x000 */ fopEn_enemy_c mEnemy;
|
||||
/* 0x5AC */ request_of_phase_process_class mPhase;
|
||||
/* 0x5B4 */ u8 mHomeType;
|
||||
/* 0x5B5 */ u8 mDistanceParam;
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
void changeDraw();
|
||||
u8 chkDraw();
|
||||
void dead();
|
||||
u8 chkDead();
|
||||
bool chkDead();
|
||||
int CreateItemHeap(char const*, s16, s16, s16, s16, s16, s16, s16);
|
||||
int DeleteBase(char const*);
|
||||
void setListEnd();
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "d/actor/d_a_arrow.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JAudio2/JAUSectionHeap.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
@@ -1121,7 +1122,6 @@ static int daArrow_execute(daArrow_c* i_this) {
|
||||
}
|
||||
|
||||
/* 8049D0CC-8049D40C 00354C 0340+00 1/1 0/0 0/0 .text draw__9daArrow_cFv */
|
||||
// NONMATCHING regalloc
|
||||
int daArrow_c::draw() {
|
||||
g_env_light.settingTevStruct(0, ¤t.pos, &tevStr);
|
||||
|
||||
@@ -1129,7 +1129,7 @@ int daArrow_c::draw() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GXColorS10 tmpColor = {0, 0, 0};
|
||||
static const GXColorS10 tmpColor = {0, 0, 0};
|
||||
J3DGXColorS10 color = (tmpColor);
|
||||
|
||||
daAlink_c* link = daAlink_getAlinkActorClass();
|
||||
@@ -1150,7 +1150,7 @@ int daArrow_c::draw() {
|
||||
if (field_0x950 > explode_time >> 1) {
|
||||
r = fabsf(cM_fsin((field_0x950 - (explode_time >> 1)) * M_PI / (explode_time >> 2)));
|
||||
} else if (field_0x950 > explode_time >> 2) {
|
||||
r = fabsf(cM_fsin((field_0x950 - (explode_time >> 1)) * M_PI / (explode_time >> 3)));
|
||||
r = fabsf(cM_fsin((field_0x950 - (explode_time >> 2)) * M_PI / (explode_time >> 3)));
|
||||
} else {
|
||||
r = fabsf(cM_fsin((field_0x950 - (explode_time >> 3)) * M_PI / (explode_time >> 4)));
|
||||
}
|
||||
@@ -1276,6 +1276,7 @@ static int daArrow_delete(daArrow_c* i_this) {
|
||||
}
|
||||
|
||||
AUDIO_INSTANCES;
|
||||
JAUSectionHeap* JASGlobalInstance<JAUSectionHeap>::sInstance;
|
||||
|
||||
/* 8049DE8C-8049DEAC -00001 0020+00 1/0 0/0 0/0 .data l_daArrowMethodTable */
|
||||
static actor_method_class l_daArrowMethodTable = {
|
||||
|
||||
@@ -12,6 +12,66 @@
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
|
||||
UNK_BSS(1109)
|
||||
UNK_BSS(1107)
|
||||
UNK_BSS(1105)
|
||||
UNK_BSS(1104)
|
||||
UNK_BSS(1099)
|
||||
UNK_BSS(1097)
|
||||
UNK_BSS(1095)
|
||||
UNK_BSS(1094)
|
||||
UNK_BSS(1057)
|
||||
UNK_BSS(1055)
|
||||
UNK_BSS(1053)
|
||||
UNK_BSS(1052)
|
||||
UNK_BSS(1014)
|
||||
UNK_BSS(1012)
|
||||
UNK_BSS(1010)
|
||||
UNK_BSS(1009)
|
||||
|
||||
/* 804E1C34-804E1C40 000054 000C+00 0/2 0/0 0/0 .bss l_player_offset */
|
||||
static cXyz l_player_offset = cXyz(0.0f, 115.0f, 54.0f);
|
||||
|
||||
/* 804E1C4C-804E1C58 00006C 000C+00 0/2 0/0 0/0 .bss l_wolf_offset */
|
||||
static cXyz l_wolf_offset = cXyz(13.0f, 135.0f, 57.0f);
|
||||
|
||||
/* 804E1C64-804E1C70 000084 000C+00 0/2 0/0 0/0 .bss l_horse_offset */
|
||||
static cXyz l_horse_offset = cXyz(0.0f, 20.0f, 54.0f);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
class DitemHIO_c
|
||||
: public mDoHIO_entry_c
|
||||
{
|
||||
public:
|
||||
~DitemHIO_c() {}
|
||||
void genMessage(JORMContext*) {}
|
||||
|
||||
/* 0x08 */ cXyz field_0x08;
|
||||
/* 0x14 */ u16 field_0x14;
|
||||
/* 0x16 */ u16 field_0x16;
|
||||
/* 0x18 */ u16 field_0x18;
|
||||
/* 0x1C */ f32 field_0x1c;
|
||||
/* 0x20 */ u16 field_0x20;
|
||||
/* 0x22 */ u8 field_0x22;
|
||||
/* 0x23 */ u8 field_0x23;
|
||||
/* 0x24 */ u8 field_0x24;
|
||||
|
||||
DitemHIO_c() {
|
||||
field_0x20 = 0xfa;
|
||||
field_0x23 = 0;
|
||||
field_0x08 = l_player_offset;
|
||||
field_0x24 = 0;
|
||||
field_0x14 = 0x8c;
|
||||
field_0x16 = 0x7c;
|
||||
field_0x18 = 0x6a;
|
||||
field_0x1c = 8.0f;
|
||||
field_0x22 = 0;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* 804DFBCC-804DFBD4 0000EC 0008+00 1/0 0/0 0/0 .text __CreateHeap__9daDitem_cFv */
|
||||
int daDitem_c::__CreateHeap() {
|
||||
return 1;
|
||||
@@ -138,7 +198,7 @@ void daDitem_c::actionEvent() {
|
||||
}
|
||||
|
||||
if (m_itemNo == fpcNm_ITEM_KAKERA_HEART) {
|
||||
s32 room_no = dComIfGp_roomControl_getStayNo();
|
||||
int room_no = dComIfGp_roomControl_getStayNo();
|
||||
|
||||
if (strcmp(dComIfGp_getStartStageName(), "F_SP116") == 0 && room_no == 2) {
|
||||
onEventReg(0, 0);
|
||||
@@ -160,8 +220,10 @@ void daDitem_c::actionEvent() {
|
||||
onEventReg(1, 1);
|
||||
} else if (strcmp(dComIfGp_getStartStageName(), "F_SP110") == 0 && room_no == 0) {
|
||||
onEventReg(1, 2);
|
||||
} else if (strcmp(dComIfGp_getStartStageName(), "F_SP109") == 0 && room_no == 0 && dComIfGs_isTmpBit(0x0604)) {
|
||||
onEventReg(1, 3);
|
||||
} else if (strcmp(dComIfGp_getStartStageName(), "F_SP109") == 0 && room_no == 0) {
|
||||
if (dComIfGs_isTmpBit(0x0604)) {
|
||||
onEventReg(1, 3);
|
||||
}
|
||||
} else if (strcmp(dComIfGp_getStartStageName(), "F_SP126") == 0 && room_no == 0) {
|
||||
onEventReg(1, 5);
|
||||
} else if (strcmp(dComIfGp_getStartStageName(), "D_MN05") == 0 && room_no == 5) {
|
||||
@@ -309,32 +371,6 @@ void daDitem_c::onEventReg(int i_regNo, int i_value) {
|
||||
OS_REPORT("ハートの欠片:%d %d\n", i_regNo, i_value);
|
||||
}
|
||||
|
||||
UNK_BSS(1109)
|
||||
UNK_BSS(1107)
|
||||
UNK_BSS(1105)
|
||||
UNK_BSS(1104)
|
||||
UNK_BSS(1099)
|
||||
UNK_BSS(1097)
|
||||
UNK_BSS(1095)
|
||||
UNK_BSS(1094)
|
||||
UNK_BSS(1057)
|
||||
UNK_BSS(1055)
|
||||
UNK_BSS(1053)
|
||||
UNK_BSS(1052)
|
||||
UNK_BSS(1014)
|
||||
UNK_BSS(1012)
|
||||
UNK_BSS(1010)
|
||||
UNK_BSS(1009)
|
||||
|
||||
/* 804E1C34-804E1C40 000054 000C+00 0/2 0/0 0/0 .bss l_player_offset */
|
||||
static cXyz l_player_offset(0.0f, 115.0f, 54.0f);
|
||||
|
||||
/* 804E1C4C-804E1C58 00006C 000C+00 0/2 0/0 0/0 .bss l_wolf_offset */
|
||||
static cXyz l_wolf_offset(13.0f, 135.0f, 57.0f);
|
||||
|
||||
/* 804E1C64-804E1C70 000084 000C+00 0/2 0/0 0/0 .bss l_horse_offset */
|
||||
static cXyz l_horse_offset(0.0f, 20.0f, 54.0f);
|
||||
|
||||
/* 804E0DB4-804E105C 0012D4 02A8+00 1/1 0/0 0/0 .text set_pos__9daDitem_cFv */
|
||||
void daDitem_c::set_pos() {
|
||||
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
|
||||
+172
-151
File diff suppressed because it is too large
Load Diff
@@ -36,8 +36,8 @@ void daItemBase_c::dead() {
|
||||
cLib_onBit<u8>(field_0x92b, 2);
|
||||
}
|
||||
|
||||
u8 daItemBase_c::chkDead() {
|
||||
return cLib_checkBit<u8>(field_0x92b, 2) != 0;
|
||||
bool daItemBase_c::chkDead() {
|
||||
return cLib_checkBit<u8>(field_0x92b, 2);
|
||||
}
|
||||
|
||||
/* 80037B0C-80037B78 03244C 006C+00 0/0 0/0 1/1 .text CheckItemCreateHeap__FP10fopAc_ac_c
|
||||
@@ -84,4 +84,4 @@ const daItemBase_data daItemBase_c::m_data = {
|
||||
-6.0f, // mGetDemoGravity
|
||||
13, // mSimpleExistTime
|
||||
10, // mNoGetTime
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user