d_a_bg match + fix link's actor profile

This commit is contained in:
LagoLunatic
2023-10-22 03:33:14 -04:00
parent 4abc897e08
commit 2bd38293a8
5 changed files with 24 additions and 15 deletions
+1 -1
View File
@@ -415,7 +415,7 @@ config.libs = [
Object(Matching, "d/d_point_wind.cpp"),
Object(NonMatching, "d/actor/d_a_agb.cpp"),
Object(Matching, "d/actor/d_a_arrow.cpp", extra_cflags=["-sym off"]),
Object(NonMatching, "d/actor/d_a_bg.cpp"),
Object(Matching, "d/actor/d_a_bg.cpp"),
Object(NonMatching, "d/actor/d_a_bomb.cpp"),
Object(NonMatching, "d/actor/d_a_bomb2.cpp"),
Object(NonMatching, "d/actor/d_a_boomerang.cpp"),
+1 -1
View File
@@ -97,7 +97,7 @@ struct actor_process_profile_definition {
/* 0x2D */ u8 mCullType;
};
// Unclear what this is. Only appears in 4 profiles (BG,DSHUTTER,PATH,SCENE_EXIT)
// Unclear what this is. Only appears in 2 profiles (PLAYER,BG)
struct actor_process_profile_definition2 {
/* 0x00 */ actor_process_profile_definition def;
/* 0x30 */ u32 field_0x30;
+16 -8
View File
@@ -47,7 +47,7 @@ class daBg_c : public fopAc_ac_c {
public:
~daBg_c();
const char * setArcName();
BOOL createHeap();
inline BOOL createHeap();
s32 create();
inline BOOL execute();
inline BOOL draw();
@@ -165,7 +165,7 @@ void daBg_brkAnm_c::play() {
}
/* 800D88D8-800D88F8 .text checkCreateHeap__FP10fopAc_ac_c */
BOOL checkCreateHeap(fopAc_ac_c* i_ac) {
static BOOL checkCreateHeap(fopAc_ac_c* i_ac) {
return ((daBg_c*)i_ac)->createHeap();
}
@@ -200,9 +200,8 @@ BOOL daBg_c::createHeap() {
const char * arcName = setArcName();
u32 roomNo = fopAcM_GetParam(this);
for (u32 i = 0; i < 4; i++) {
BgModel * bgm = &bg[i];
BgModel * bgm = bg;
for (int i = 0; i < 4; bgm++, i++) {
J3DModelData * modelData = (J3DModelData *) dComIfG_getStageRes(arcName, l_modelName[i]);
if (modelData == NULL)
modelData = (J3DModelData *) dComIfG_getStageRes(arcName, l_modelName2[i]);
@@ -221,7 +220,7 @@ BOOL daBg_c::createHeap() {
return FALSE;
if (!bgm->btk->create(modelData, btk))
return FALSE;
diffFlag = 0x12000000;
diffFlag |= 0x00001200;
} else {
bgm->btk = NULL;
}
@@ -321,17 +320,25 @@ BOOL daBg_Draw(daBg_c* i_this) {
BOOL daBg_c::execute() {
if (mUnloadTimer != 0) {
#if VERSION == VERSION_JPN
mUnloadTimer = 0;
fopAcM_delete(this);
#else
if (cLib_calcTimer(&mUnloadTimer) == 0)
fopAcM_delete(this);
#endif
return TRUE;
}
if (dComIfGp_roomControl_checkStatusFlag(fopAcM_GetParam(this), 0x04)) {
#if VERSION == VERSION_JPN
mUnloadTimer = 1;
#else
if (strcmp(dComIfGp_getStartStageName(), "sea") == 0)
mUnloadTimer = 16;
else
mUnloadTimer = 1;
#endif
} else {
BgModel * bgm = &bg[0];
for (s32 i = 0; i < 4; i++, bgm++) {
@@ -446,7 +453,7 @@ actor_method_class l_daBg_Method = {
(process_method_func)daBg_Draw,
};
actor_process_profile_definition g_profile_BG = {
actor_process_profile_definition2 g_profile_BG = {
fpcLy_CURRENT_e,
7,
fpcPi_CURRENT_e,
@@ -461,4 +468,5 @@ actor_process_profile_definition g_profile_BG = {
fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
fopAc_ACTOR_e,
fopAc_CULLBOX_0_e,
0,
};
+2 -1
View File
@@ -1998,7 +1998,7 @@ actor_method_class l_daPy_Method = {
(process_method_func)daPy_Draw,
};
actor_process_profile_definition g_profile_PLAYER = {
actor_process_profile_definition2 g_profile_PLAYER = {
/* LayerID */ fpcLy_CURRENT_e,
/* ListID */ 5,
/* ListPrio */ fpcLy_CURRENT_e,
@@ -2013,4 +2013,5 @@ actor_process_profile_definition g_profile_PLAYER = {
/* Status */ fopAcStts_FREEZE_e,
/* Group */ fopAc_PLAYER_e,
/* CullType */ fopAc_CULLBOX_0_e,
/* field_0x30 */ 2,
};
+4 -4
View File
@@ -43,12 +43,12 @@ void daPy_lk_c::checkEndTactMusic() const {
}
/* 8014D9A4-8014D9D0 .text getTactMetronomeRate__9daPy_lk_cFv */
void daPy_lk_c::getTactMetronomeRate() {
f32 daPy_lk_c::getTactMetronomeRate() {
/* Nonmatching */
}
/* 8014D9D0-8014D9F8 .text checkTactLastInput__9daPy_lk_cFv */
void daPy_lk_c::checkTactLastInput() {
int daPy_lk_c::checkTactLastInput() {
/* Nonmatching */
}
@@ -58,7 +58,7 @@ void daPy_lk_c::setTactZev(unsigned int, int, char*) {
}
/* 8014DA78-8014DACC .text getTactTopPos__9daPy_lk_cFP4cXyz */
void daPy_lk_c::getTactTopPos(cXyz*) {
int daPy_lk_c::getTactTopPos(cXyz*) {
/* Nonmatching */
}
@@ -78,7 +78,7 @@ int daPy_lk_c::getTactTimerCancel() const {
}
/* 8014DB74-8014DB9C .text checkTactPlayMelody__9daPy_lk_cFv */
void daPy_lk_c::checkTactPlayMelody() {
int daPy_lk_c::checkTactPlayMelody() {
/* Nonmatching */
}