match d_a_obj_dragonhead, d_a_obj_adnno

This commit is contained in:
LagoLunatic
2023-11-25 21:54:40 -05:00
parent 897b22f936
commit 30357c1712
3 changed files with 30 additions and 24 deletions
+2 -2
View File
@@ -1503,7 +1503,7 @@ config.libs = [
ActorRel(Matching, "d_a_obj_Vteng", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_YLzou"),
ActorRel(NonMatching, "d_a_obj_Yboil"),
ActorRel(NonMatching, "d_a_obj_adnno"),
ActorRel(Matching, "d_a_obj_adnno"),
ActorRel(NonMatching, "d_a_obj_ajav"),
ActorRel(NonMatching, "d_a_obj_apzl"),
ActorRel(NonMatching, "d_a_obj_ashut"),
@@ -1512,7 +1512,7 @@ config.libs = [
ActorRel(NonMatching, "d_a_obj_buoyrace"),
ActorRel(NonMatching, "d_a_obj_correct"),
ActorRel(Matching, "d_a_obj_dmgroom", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_dragonhead", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(Matching, "d_a_obj_dragonhead", extra_cflags=['-pragma "nosyminline on"']),
ActorRel(NonMatching, "d_a_obj_drift"),
ActorRel(Matching, "d_a_obj_eayogn"),
ActorRel(NonMatching, "d_a_obj_ebomzo"),
+14 -9
View File
@@ -18,7 +18,7 @@ static const u32 daObjAdnno_bmt_table[16] = {
};
/* 00000078-00000098 .text CheckCreateHeap__FP10fopAc_ac_c */
BOOL CheckCreateHeap(fopAc_ac_c* i_this) {
static BOOL CheckCreateHeap(fopAc_ac_c* i_this) {
return ((daObjAdnno_c*)i_this)->CreateHeap();
}
@@ -44,14 +44,19 @@ void daObjAdnno_c::CreateInit() {
/* 000001E8-00000330 .text set_mtx__12daObjAdnno_cFv */
void daObjAdnno_c::set_mtx() {
for (s32 i = 0; i < 16; i++) {
for (int i = 0; i < 16; i++) {
J3DModel * model = mpModel[i];
model->setBaseScale(mScale);
mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::YrotM(current.angle.y);
/* Nonmatching - this translation code is wrong */
mDoMtx_stack_c::transM(40.0f + i * 60.0f, 60.0f - 40.0f * i, 0.0f);
int x = i % 4;
int y = i / 4;
mDoMtx_stack_c::transM(
x * 40.0f - 60.0f,
60.0f - y * 40.0f,
0.0f
);
mpModel[i]->setBaseTRMtx(mDoMtx_stack_c::get());
}
}
@@ -103,27 +108,27 @@ bool daObjAdnno_c::_draw() {
}
/* 00000330-000003D4 .text daObjAdnno_Create__FPv */
s32 daObjAdnno_Create(void* i_this) {
static s32 daObjAdnno_Create(void* i_this) {
return ((daObjAdnno_c*)i_this)->_create();
}
/* 000003D4-00000404 .text daObjAdnno_Delete__FPv */
BOOL daObjAdnno_Delete(void* i_this) {
static BOOL daObjAdnno_Delete(void* i_this) {
return ((daObjAdnno_c*)i_this)->_delete();
}
/* 00000404-000004F8 .text daObjAdnno_Draw__FPv */
BOOL daObjAdnno_Draw(void* i_this) {
static BOOL daObjAdnno_Draw(void* i_this) {
return ((daObjAdnno_c*)i_this)->_draw();
}
/* 000004F8-0000051C .text daObjAdnno_Execute__FPv */
BOOL daObjAdnno_Execute(void* i_this) {
static BOOL daObjAdnno_Execute(void* i_this) {
return ((daObjAdnno_c*)i_this)->_execute();
}
/* 0000051C-00000524 .text daObjAdnno_IsDelete__FPv */
BOOL daObjAdnno_IsDelete(void* i_this) {
static BOOL daObjAdnno_IsDelete(void* i_this) {
return TRUE;
}
+14 -13
View File
@@ -36,7 +36,7 @@ public:
/* 0x41C */ Mtx mtx;
};
dCcD_SrcSph sph_check_src = {
static dCcD_SrcSph sph_check_src = {
// dCcD_SrcGObjInf
{
/* Flags */ 0,
@@ -66,12 +66,12 @@ dCcD_SrcSph sph_check_src = {
};
/* 00000078-00000098 .text CheckCreateHeap__FP10fopAc_ac_c */
BOOL CheckCreateHeap(fopAc_ac_c* i_this) {
static BOOL CheckCreateHeap(fopAc_ac_c* i_this) {
return ((daObjDragonhead_c*)i_this)->CreateHeap();
}
namespace daObjDragonhead_prm {
inline u8 getSwitchNo(daObjDragonhead_c* ac) { return (fopAcM_GetParam(ac) >> 8) & 0xFF; }
inline u32 getSwitchNo(daObjDragonhead_c* ac) { return (fopAcM_GetParam(ac) >> 8) & 0xFF; }
};
/* 00000098-00000228 .text CreateHeap__17daObjDragonhead_cFv */
@@ -106,8 +106,8 @@ void daObjDragonhead_c::CreateInit() {
set_mtx();
field_0x40c = 0;
/* Nonmatching -- swapped switchNo and g_dComIfG_gameInfo load */
if (dComIfGs_isSwitch(daObjDragonhead_prm::getSwitchNo(this), fopAcM_GetHomeRoomNo(this))) {
u32 switchNo = daObjDragonhead_prm::getSwitchNo(this);
if (dComIfGs_isSwitch(switchNo, fopAcM_GetHomeRoomNo(this))) {
mSwitchOn = true;
mAlpha = 0;
} else {
@@ -164,14 +164,15 @@ bool daObjDragonhead_c::_execute() {
if (mSph.ChkTgHit()) {
cCcD_Obj* at = mSph.GetTgHitObj();
if (at != NULL && at->ChkAtType(AT_TYPE_FIRE_ARROW)) {
dComIfGs_onSwitch(daObjDragonhead_prm::getSwitchNo(this), fopAcM_GetHomeRoomNo(this));
u32 switchNo = daObjDragonhead_prm::getSwitchNo(this);
dComIfGs_onSwitch(switchNo, fopAcM_GetHomeRoomNo(this));
mSwitchOn = true;
}
}
}
/* Nonmatching -- swapped switchNo and g_dComIfG_gameInfo load */
if (dComIfGs_isSwitch(daObjDragonhead_prm::getSwitchNo(this), fopAcM_GetHomeRoomNo(this))) {
u32 switchNo = daObjDragonhead_prm::getSwitchNo(this);
if (dComIfGs_isSwitch(switchNo, fopAcM_GetHomeRoomNo(this))) {
if (field_0x40c == 1) {
if (!dComIfG_Bgsp()->Release(mpBgW))
field_0x40c = 0;
@@ -218,27 +219,27 @@ bool daObjDragonhead_c::_draw() {
}
/* 000003CC-000004FC .text daObjDragonhead_Create__FPv */
s32 daObjDragonhead_Create(void* i_this) {
static s32 daObjDragonhead_Create(void* i_this) {
return ((daObjDragonhead_c*)i_this)->_create();
}
/* 000006B4-00000730 .text daObjDragonhead_Delete__FPv */
BOOL daObjDragonhead_Delete(void* i_this) {
static BOOL daObjDragonhead_Delete(void* i_this) {
return ((daObjDragonhead_c*)i_this)->_delete();
}
/* 00000730-00000824 .text daObjDragonhead_Draw__FPv */
BOOL daObjDragonhead_Draw(void* i_this) {
static BOOL daObjDragonhead_Draw(void* i_this) {
return ((daObjDragonhead_c*)i_this)->_draw();
}
/* 00000824-00000A48 .text daObjDragonhead_Execute__FPv */
BOOL daObjDragonhead_Execute(void* i_this) {
static BOOL daObjDragonhead_Execute(void* i_this) {
return ((daObjDragonhead_c*)i_this)->_execute();
}
/* 00000A48-00000A50 .text daObjDragonhead_IsDelete__FPv */
BOOL daObjDragonhead_IsDelete(void* i_this) {
static BOOL daObjDragonhead_IsDelete(void* i_this) {
return TRUE;
}