mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-31 01:15:27 -04:00
d_a_obj_gnndemotakie - matching (#914)
* matching 100% * D44J01 matching * demo stuff
This commit is contained in:
+1
-1
@@ -1704,7 +1704,7 @@ config.libs = [
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_gaship"),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_gaship2"),
|
||||
ActorRel(Matching, "d_a_obj_gnnbtltaki"),
|
||||
ActorRel(NonMatching, "d_a_obj_gnndemotakie"),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_gnndemotakie"),
|
||||
ActorRel(NonMatching, "d_a_obj_gnndemotakis"),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_obj_gong"),
|
||||
ActorRel(NonMatching, "d_a_obj_gtaki"),
|
||||
|
||||
@@ -5,16 +5,20 @@
|
||||
|
||||
class daObjGnntakie_c : public fopAc_ac_c {
|
||||
public:
|
||||
void solidHeapCB(fopAc_ac_c*);
|
||||
void create_heap();
|
||||
static BOOL solidHeapCB(fopAc_ac_c*);
|
||||
BOOL create_heap();
|
||||
cPhs_State _create();
|
||||
bool _delete();
|
||||
void init_mtx();
|
||||
bool _execute();
|
||||
bool _draw();
|
||||
|
||||
static const u32 M_heapsize;
|
||||
static const char M_arcname[];
|
||||
public:
|
||||
/* Place member variables here */
|
||||
};
|
||||
/* 0x290 */ J3DModel* mpModel;
|
||||
/* 0x294 */ request_of_phase_process_class mPhase;
|
||||
/* 0x29C */ mDoExt_btkAnm mpBtkAnm;
|
||||
}; // Size: 0x2B0
|
||||
|
||||
#endif /* D_A_OBJ_GNNDEMOTAKIE_H */
|
||||
|
||||
@@ -7,40 +7,76 @@
|
||||
#include "d/actor/d_a_obj_gnndemotakie.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/d_priority.h"
|
||||
#include "d/res/res_gnndemotakie.h"
|
||||
|
||||
const char daObjGnntakie_c::M_arcname[] = "Gnndemotakie";
|
||||
|
||||
/* 00000078-00000098 .text solidHeapCB__15daObjGnntakie_cFP10fopAc_ac_c */
|
||||
void daObjGnntakie_c::solidHeapCB(fopAc_ac_c*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjGnntakie_c::solidHeapCB(fopAc_ac_c* a_this) {
|
||||
return ((daObjGnntakie_c*)a_this)->create_heap();
|
||||
}
|
||||
|
||||
/* 00000098-000001F4 .text create_heap__15daObjGnntakie_cFv */
|
||||
void daObjGnntakie_c::create_heap() {
|
||||
/* Nonmatching */
|
||||
BOOL daObjGnntakie_c::create_heap() {
|
||||
BOOL ret = FALSE;
|
||||
J3DModelData* mdl_data = static_cast<J3DModelData*>(dComIfG_getObjectRes(M_arcname, GNNDEMOTAKIE_BDL_GNN_DEMO_TAKI_E));
|
||||
JUT_ASSERT(0x5A, mdl_data != NULL);
|
||||
if (mdl_data != NULL) {
|
||||
mpModel = mDoExt_J3DModel__create(mdl_data, 0, 0x11020203);
|
||||
if (mpModel != NULL) {
|
||||
J3DAnmTextureSRTKey* btk_data = static_cast<J3DAnmTextureSRTKey*>(dComIfG_getObjectRes(M_arcname, GNNDEMOTAKIE_BTK_GNN_DEMO_TAKI_E));
|
||||
JUT_ASSERT(0x61, btk_data != NULL);
|
||||
if (btk_data != NULL) {
|
||||
if (mpBtkAnm.init(mdl_data, btk_data, true, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1, false, FALSE)) {
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 000001F4-00000300 .text _create__15daObjGnntakie_cFv */
|
||||
cPhs_State daObjGnntakie_c::_create() {
|
||||
/* Nonmatching */
|
||||
fopAcM_SetupActor(this, daObjGnntakie_c);
|
||||
cPhs_State state = dComIfG_resLoad(&mPhase, M_arcname);
|
||||
if (state == cPhs_COMPLEATE_e) {
|
||||
state = cPhs_ERROR_e;
|
||||
if (fopAcM_entrySolidHeap(this, solidHeapCB, 0x0)) {
|
||||
cullMtx = mpModel->getBaseTRMtx();
|
||||
init_mtx();
|
||||
mpBtkAnm.getFrameCtrl()->setFrame(mpBtkAnm.getStartFrame());
|
||||
mpBtkAnm.setPlaySpeed(1.0);
|
||||
state = cPhs_COMPLEATE_e;
|
||||
}
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
/* 000003A4-000003D4 .text _delete__15daObjGnntakie_cFv */
|
||||
bool daObjGnntakie_c::_delete() {
|
||||
/* Nonmatching */
|
||||
dComIfG_resDeleteDemo(&mPhase, M_arcname);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 000003D4-000003F4 .text init_mtx__15daObjGnntakie_cFv */
|
||||
void daObjGnntakie_c::init_mtx() {
|
||||
/* Nonmatching */
|
||||
mpModel->setBaseScale(scale);
|
||||
}
|
||||
|
||||
/* 000003F4-0000041C .text _execute__15daObjGnntakie_cFv */
|
||||
bool daObjGnntakie_c::_execute() {
|
||||
/* Nonmatching */
|
||||
mpBtkAnm.play();
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 0000041C-00000494 .text _draw__15daObjGnntakie_cFv */
|
||||
bool daObjGnntakie_c::_draw() {
|
||||
/* Nonmatching */
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG3, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, &tevStr);
|
||||
mpBtkAnm.entry(mpModel->getModelData());
|
||||
mDoExt_modelUpdateDL(mpModel);
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
Reference in New Issue
Block a user