mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-09 14:05:28 -04:00
+1
-1
@@ -1574,7 +1574,7 @@ config.libs = [
|
||||
ActorRel(NonMatching, "d_a_obj_flame"),
|
||||
ActorRel(NonMatching, "d_a_obj_ftree"),
|
||||
ActorRel(Matching, "d_a_obj_ganonbed", extra_cflags=['-pragma "nosyminline on"']),
|
||||
ActorRel(NonMatching, "d_a_obj_gaship"),
|
||||
ActorRel(Matching, "d_a_obj_gaship", extra_cflags=['-pragma "nosyminline on"']),
|
||||
ActorRel(Matching, "d_a_obj_gaship2"),
|
||||
ActorRel(NonMatching, "d_a_obj_gnnbtltaki"),
|
||||
ActorRel(NonMatching, "d_a_obj_gnndemotakie"),
|
||||
|
||||
@@ -2,21 +2,28 @@
|
||||
#define D_A_OBJ_GASHIP_H
|
||||
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
|
||||
namespace daObjGaship {
|
||||
class Act_c : public fopAc_ac_c {
|
||||
public:
|
||||
virtual ~Act_c() {}
|
||||
void birth_flag();
|
||||
void solidHeapCB(fopAc_ac_c*);
|
||||
void create_heap();
|
||||
static BOOL solidHeapCB(fopAc_ac_c*);
|
||||
bool create_heap();
|
||||
s32 _create();
|
||||
BOOL _delete();
|
||||
bool _delete();
|
||||
void set_mtx();
|
||||
BOOL _execute();
|
||||
BOOL _draw();
|
||||
|
||||
bool _execute();
|
||||
bool _draw();
|
||||
|
||||
static const char M_arcname[];
|
||||
|
||||
public:
|
||||
/* Place member variables here */
|
||||
/* 0x294 */ request_of_phase_process_class mPhs;
|
||||
/* 0x29C */ J3DModel* mModel;
|
||||
/* 0x2A0 */ Mtx mtx;
|
||||
/* 0x2D0 */ bool birthFlag[2];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -4,73 +4,133 @@
|
||||
//
|
||||
|
||||
#include "d/actor/d_a_obj_gaship.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
#include "d/res/res_gaship.h"
|
||||
|
||||
const char daObjGaship::Act_c::M_arcname[7] = "GaShip";
|
||||
|
||||
static f32 dummy[19];
|
||||
|
||||
/* 000000EC-000002DC .text birth_flag__Q211daObjGaship5Act_cFv */
|
||||
void daObjGaship::Act_c::birth_flag() {
|
||||
/* Nonmatching */
|
||||
|
||||
for (s32 i = 0; i < 2; i++) {
|
||||
if (!birthFlag[i]) {
|
||||
static cXyz flag_offset[2] = {
|
||||
cXyz(-5700.0f, 17140.0f, -5580.0f),
|
||||
cXyz(-7870.0f, 15560.0f, -5530.0f),
|
||||
};
|
||||
|
||||
static csXyz flag_angle[2] = {
|
||||
csXyz(0x0222, 0x0000, 0x0AAA),
|
||||
csXyz(-0x038E, 0x0000, 0x0CCC),
|
||||
};
|
||||
|
||||
cXyz offset;
|
||||
mDoMtx_multVec(mtx, &flag_offset[i], &offset);
|
||||
csXyz angle(flag_angle[i]);
|
||||
fpc_ProcID pid = fopAcM_create(PROC_MAJUU_FLAG, 0x01, &offset, current.roomNo, &angle);
|
||||
if (pid != fpcM_ERROR_PROCESS_ID_e)
|
||||
birthFlag[i] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000354-00000378 .text solidHeapCB__Q211daObjGaship5Act_cFP10fopAc_ac_c */
|
||||
void daObjGaship::Act_c::solidHeapCB(fopAc_ac_c*) {
|
||||
/* Nonmatching */
|
||||
BOOL daObjGaship::Act_c::solidHeapCB(fopAc_ac_c* i_ac) {
|
||||
return ((daObjGaship::Act_c*)i_ac)->create_heap();
|
||||
}
|
||||
|
||||
/* 00000378-00000448 .text create_heap__Q211daObjGaship5Act_cFv */
|
||||
void daObjGaship::Act_c::create_heap() {
|
||||
bool daObjGaship::Act_c::create_heap() {
|
||||
/* Nonmatching */
|
||||
J3DModelData* mdl_data = static_cast<J3DModelData*>(dComIfG_getObjectRes(M_arcname, GASHIP_BDL_GASHIP));
|
||||
JUT_ASSERT(0x8c, mdl_data != NULL);
|
||||
if (mdl_data != NULL)
|
||||
mModel = mDoExt_J3DModel__create(mdl_data, 0, 0x11000002);
|
||||
|
||||
set_mtx();
|
||||
|
||||
return mdl_data != NULL && mModel != NULL;
|
||||
}
|
||||
|
||||
/* 00000448-000004F8 .text _create__Q211daObjGaship5Act_cFv */
|
||||
s32 daObjGaship::Act_c::_create() {
|
||||
/* Nonmatching */
|
||||
fopAcM_SetupActor(this, Act_c);
|
||||
|
||||
s32 ret = dComIfG_resLoad(&mPhs, M_arcname);
|
||||
if (ret == cPhs_COMPLEATE_e) {
|
||||
if (fopAcM_entrySolidHeap(this, solidHeapCB, 0x0)) {
|
||||
fopAcM_SetMtx(this, mModel->getBaseTRMtx());
|
||||
} else {
|
||||
ret = cPhs_ERROR_e;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 000004F8-00000528 .text _delete__Q211daObjGaship5Act_cFv */
|
||||
BOOL daObjGaship::Act_c::_delete() {
|
||||
/* Nonmatching */
|
||||
bool daObjGaship::Act_c::_delete() {
|
||||
dComIfG_resDelete(&mPhs, M_arcname);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 00000528-000005D4 .text set_mtx__Q211daObjGaship5Act_cFv */
|
||||
void daObjGaship::Act_c::set_mtx() {
|
||||
/* Nonmatching */
|
||||
mModel->setBaseScale(scale);
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
mModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), mtx);
|
||||
mModel->calc();
|
||||
}
|
||||
|
||||
/* 000005D4-0000060C .text _execute__Q211daObjGaship5Act_cFv */
|
||||
BOOL daObjGaship::Act_c::_execute() {
|
||||
/* Nonmatching */
|
||||
bool daObjGaship::Act_c::_execute() {
|
||||
set_mtx();
|
||||
birth_flag();
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 0000060C-0000066C .text _draw__Q211daObjGaship5Act_cFv */
|
||||
BOOL daObjGaship::Act_c::_draw() {
|
||||
/* Nonmatching */
|
||||
bool daObjGaship::Act_c::_draw() {
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType(mModel, &tevStr);
|
||||
mDoExt_modelUpdateDL(mModel);
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace daObjGaship {
|
||||
namespace {
|
||||
/* 0000066C-0000068C .text Mthd_Create__Q211daObjGaship28@unnamed@d_a_obj_gaship_cpp@FPv */
|
||||
void Mthd_Create(void*) {
|
||||
/* Nonmatching */
|
||||
s32 Mthd_Create(void* i_ac) {
|
||||
return ((daObjGaship::Act_c*)i_ac)->_create();
|
||||
}
|
||||
|
||||
/* 0000068C-000006B0 .text Mthd_Delete__Q211daObjGaship28@unnamed@d_a_obj_gaship_cpp@FPv */
|
||||
void Mthd_Delete(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL Mthd_Delete(void* i_ac) {
|
||||
return ((daObjGaship::Act_c*)i_ac)->_delete();
|
||||
}
|
||||
|
||||
/* 000006B0-000006D4 .text Mthd_Execute__Q211daObjGaship28@unnamed@d_a_obj_gaship_cpp@FPv */
|
||||
void Mthd_Execute(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL Mthd_Execute(void* i_ac) {
|
||||
return ((daObjGaship::Act_c*)i_ac)->_execute();
|
||||
}
|
||||
|
||||
/* 000006D4-000006F8 .text Mthd_Draw__Q211daObjGaship28@unnamed@d_a_obj_gaship_cpp@FPv */
|
||||
void Mthd_Draw(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL Mthd_Draw(void* i_ac) {
|
||||
return ((daObjGaship::Act_c*)i_ac)->_draw();
|
||||
}
|
||||
|
||||
/* 000006F8-00000700 .text Mthd_IsDelete__Q211daObjGaship28@unnamed@d_a_obj_gaship_cpp@FPv */
|
||||
void Mthd_IsDelete(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL Mthd_IsDelete(void* i_ac) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static actor_method_class Mthd_Table = {
|
||||
|
||||
Reference in New Issue
Block a user