mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-26 01:34:39 -04:00
swlight inline fixes
This commit is contained in:
@@ -19,14 +19,24 @@ namespace daObjSwlight {
|
||||
typedef void (Act_c::*ModeFunc)();
|
||||
|
||||
public:
|
||||
|
||||
struct Attr_c {
|
||||
/* 0x00 */ s16 m00;
|
||||
/* 0x04 */ f32 m04;
|
||||
/* 0x08 */ f32 m08;
|
||||
/* 0x0C */ f32 m0C;
|
||||
}; // size = 0x10
|
||||
|
||||
|
||||
enum Prm_e {
|
||||
PRM_SWSAVE_W = 0x08,
|
||||
PRM_SWSAVE_S = 0x00,
|
||||
|
||||
PRM_SWSAVE2_W = 0x08,
|
||||
PRM_SWSAVE2_S = 0x08,
|
||||
|
||||
PRM_TYPE_W = 0x01,
|
||||
PRM_TYPE_S = 0x10,
|
||||
};
|
||||
|
||||
void get_power() const {}
|
||||
bool is_switch() const {
|
||||
return fopAcM_isSwitch(const_cast<Act_c*>(this), prm_get_swSave());
|
||||
@@ -38,22 +48,18 @@ namespace daObjSwlight {
|
||||
fopAcM_onSwitch(const_cast<Act_c*>(this), prm_get_swSave());
|
||||
}
|
||||
s32 prm_get_swSave() const {
|
||||
return daObj::PrmAbstract(this, 8, 0);
|
||||
return daObj::PrmAbstract(this, PRM_SWSAVE_W, PRM_SWSAVE_S);
|
||||
}
|
||||
s32 prm_get_swSave2() const {
|
||||
return daObj::PrmAbstract(this, 8, 8);
|
||||
return daObj::PrmAbstract(this, PRM_SWSAVE2_W, PRM_SWSAVE2_S);
|
||||
}
|
||||
s32 prm_get_type() const {
|
||||
return daObj::PrmAbstract(this, 1, 0x10);
|
||||
return daObj::PrmAbstract(this, PRM_TYPE_W, PRM_TYPE_S);
|
||||
}
|
||||
|
||||
bool is_switch2() const;
|
||||
static BOOL solidHeapCB(fopAc_ac_c*);
|
||||
#if VERSION == VERSION_DEMO
|
||||
bool create_heap();
|
||||
#else
|
||||
u8 create_heap();
|
||||
#endif
|
||||
cPhs_State _create();
|
||||
bool _delete();
|
||||
static BOOL jnodeCB_moon(J3DNode*, int);
|
||||
|
||||
@@ -62,11 +62,7 @@ BOOL Act_c::solidHeapCB(fopAc_ac_c* i_this) {
|
||||
}
|
||||
|
||||
/* 00000178-0000045C .text create_heap__Q212daObjSwlight5Act_cFv */
|
||||
#if VERSION == VERSION_DEMO
|
||||
bool Act_c::create_heap() {
|
||||
#else
|
||||
u8 Act_c::create_heap() {
|
||||
#endif
|
||||
J3DModelData* modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(M_arcname, MMIRROR_BDL_MSUSW));
|
||||
JUT_ASSERT(317, modelData != NULL);
|
||||
|
||||
@@ -95,37 +91,32 @@ u8 Act_c::create_heap() {
|
||||
if (m2C0 != NULL) {
|
||||
cBgD_t* bgw_data = static_cast<cBgD_t*>(dComIfG_getObjectRes(M_arcname, MMIRROR_DZB_MSUSW));
|
||||
JUT_ASSERT(361, bgw_data != NULL);
|
||||
if (!m2C0->Set(bgw_data, cBgW::MOVE_BG_e, &this->mF38)) {
|
||||
if (!m2C0->Set(bgw_data, cBgW::MOVE_BG_e, &mF38)) {
|
||||
bVar1 = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool iVar8 = false;
|
||||
if (m298 != NULL && iVar4) {
|
||||
if (iVar6 && bVar1) {
|
||||
iVar8 = true;
|
||||
}
|
||||
}
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
#if VERSION == VERSION_DEMO
|
||||
return m298 != NULL && iVar4 && iVar6 && bVar1;
|
||||
#else
|
||||
const bool iVar8 = m298 != NULL && iVar4 && iVar6 && bVar1;
|
||||
if (!iVar8) {
|
||||
m2C0 = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return iVar8;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* 0000045C-00000704 .text _create__Q212daObjSwlight5Act_cFv */
|
||||
cPhs_State Act_c::_create() {
|
||||
#if VERSION == VERSION_DEMO
|
||||
mF24 = prm_get_type();
|
||||
#if VERSION > VERSION_DEMO
|
||||
fopAcM_SetupActor(this, Act_c);
|
||||
#endif
|
||||
|
||||
fopAcM_SetupActor(this, Act_c);
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
mF24 = prm_get_type();
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
fopAcM_SetupActor(this, Act_c);
|
||||
#endif
|
||||
|
||||
cPhs_State PVar2 = dComIfG_resLoad(&mPhase, M_arcname);
|
||||
@@ -211,6 +202,7 @@ void Act_c::init_cc() {
|
||||
|
||||
/* 00000E04-00000FC4 .text set_cc_pos__Q212daObjSwlight5Act_cFv */
|
||||
void Act_c::set_cc_pos() {
|
||||
/* Nonmatching */
|
||||
f32 tmp0C;
|
||||
f32 tmp04;
|
||||
f32 tmp08;
|
||||
@@ -422,12 +414,12 @@ void setMaterial(J3DMaterial* material, unsigned char arg2) {
|
||||
material->getShape()->show();
|
||||
if (arg2 == 0xFF) {
|
||||
material->setMaterialMode(1);
|
||||
material->mPEBlock->getZMode()->setUpdateEnable(1);
|
||||
material->mPEBlock->getBlend()->setType(GX_BM_NONE);
|
||||
material->getZMode()->setUpdateEnable(1);
|
||||
material->getBlend()->setType(GX_BM_NONE);
|
||||
} else {
|
||||
material->setMaterialMode(4);
|
||||
material->mPEBlock->getZMode()->setUpdateEnable(0);
|
||||
material->mPEBlock->getBlend()->setType(GX_BM_BLEND);
|
||||
material->getZMode()->setUpdateEnable(0);
|
||||
material->getBlend()->setType(GX_BM_BLEND);
|
||||
}
|
||||
material->getTevKColor(3)->mColor.a = arg2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user