summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/d/actor/d_a_obj_vground.h2
-rw-r--r--src/d/actor/d_a_obj_usaku.cpp39
-rw-r--r--src/d/actor/d_a_obj_vground.cpp41
-rw-r--r--src/d/actor/d_a_obj_window.cpp15
-rw-r--r--src/d/actor/d_a_obj_zcloth.cpp5
5 files changed, 67 insertions, 35 deletions
diff --git a/include/d/actor/d_a_obj_vground.h b/include/d/actor/d_a_obj_vground.h
index 49526eb6c9..fed893aef1 100644
--- a/include/d/actor/d_a_obj_vground.h
+++ b/include/d/actor/d_a_obj_vground.h
@@ -22,7 +22,7 @@ public:
int draw();
int _delete();
- u32 getSwbit() { return fopAcM_GetParamBit(this, 0, 8); }
+ u32 getSwbit() { return (u8) fopAcM_GetParamBit(this, 0, 8); }
private:
/* 0x568 */ request_of_phase_process_class mPhaseReq;
diff --git a/src/d/actor/d_a_obj_usaku.cpp b/src/d/actor/d_a_obj_usaku.cpp
index db9dc4fa17..dd411b050a 100644
--- a/src/d/actor/d_a_obj_usaku.cpp
+++ b/src/d/actor/d_a_obj_usaku.cpp
@@ -11,16 +11,18 @@
#include "d/d_procname.h"
static int daObj_Usaku_Draw(obj_usaku_class* i_this) {
- g_env_light.settingTevStruct(0x10, &i_this->current.pos, &i_this->tevStr);
- g_env_light.setLightTevColorType_MAJI(i_this->mpModel, &i_this->tevStr);
+ fopAc_ac_c* a_this = static_cast<fopAc_ac_c*>(i_this);
+ g_env_light.settingTevStruct(0x10, &a_this->current.pos, &a_this->tevStr);
+ g_env_light.setLightTevColorType_MAJI(i_this->mpModel, &a_this->tevStr);
mDoExt_modelUpdateDL(i_this->mpModel);
return 1;
}
static int daObj_Usaku_Execute(obj_usaku_class* i_this) {
- mDoMtx_stack_c::transS(i_this->current.pos.x, i_this->current.pos.y, i_this->current.pos.z);
- mDoMtx_stack_c::YrotM(i_this->shape_angle.y);
+ fopAc_ac_c* a_this = static_cast<fopAc_ac_c*>(i_this);
+ mDoMtx_stack_c::transS(a_this->current.pos.x, a_this->current.pos.y, a_this->current.pos.z);
+ mDoMtx_stack_c::YrotM(a_this->shape_angle.y);
i_this->mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
if (i_this->mpBgW != NULL) {
@@ -36,6 +38,8 @@ static int daObj_Usaku_IsDelete(obj_usaku_class* i_this) {
}
static int daObj_Usaku_Delete(obj_usaku_class* i_this) {
+ fopAc_ac_c* a_this = static_cast<fopAc_ac_c*>(i_this);
+ fopAcM_RegisterDeleteID(i_this, "Obj_Usaku");
dComIfG_resDelete(&i_this->mPhase, "Obj_usaku");
if (i_this->mpBgW != NULL) {
@@ -48,47 +52,58 @@ static int useHeapInit(fopAc_ac_c* i_this) {
obj_usaku_class* a_this = (obj_usaku_class*)i_this;
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("Obj_usaku", 4);
+ JUT_ASSERT(209, modelData != NULL);
a_this->mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
if (a_this->mpModel == NULL) {
return 0;
}
+ OS_REPORT("//////////////OBJ_USAKU SET 5 !!\n");
a_this->mpBgW = new dBgW();
if (a_this->mpBgW == NULL) {
return 0;
}
- cBgD_t* pdzb = (cBgD_t*)dComIfG_getObjectRes("Obj_usaku", 7);
- if (a_this->mpBgW->Set(pdzb, cBgW::MOVE_BG_e, &a_this->mBgMtx) == 1) {
+ if (a_this->mpBgW->Set((cBgD_t*)dComIfG_getObjectRes("Obj_usaku", 7), cBgW::MOVE_BG_e,
+ &a_this->mBgMtx) == 1)
+ {
return 0;
}
a_this->mpBgW->SetCrrFunc(dBgS_MoveBGProc_Typical);
+ OS_REPORT("//////////////OBJ_USAKU SET 6 !!\n");
return 1;
}
static int daObj_Usaku_Create(fopAc_ac_c* i_this) {
- fopAcM_ct(i_this, obj_usaku_class);
obj_usaku_class* a_this = (obj_usaku_class*)i_this;
+ fopAcM_ct(a_this, obj_usaku_class);
int phase = dComIfG_resLoad(&a_this->mPhase, "Obj_usaku");
if (phase == cPhs_COMPLEATE_e) {
- a_this->field_0x570 = fopAcM_GetParam(a_this) & 0xFF;
+ OS_REPORT("OBJ_USAKU PARAM %x\n", fopAcM_GetParam(i_this));
+ a_this->field_0x570 = fopAcM_GetParam(i_this) & 0xFF;
if (a_this->field_0x570 == 0xFF) {
a_this->field_0x570 = 0;
}
+ OS_REPORT("OBJ_USAKU//////////////OBJ_USAKU SET 1 !!\n");
- if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0xC60)) {
+ if (!fopAcM_entrySolidHeap(i_this, useHeapInit, 0xC60)) {
+ OS_REPORT("//////////////OBJ_USAKU SET NON !!\n");
return cPhs_ERROR_e;
}
+ OS_REPORT("//////////////OBJ_USAKU SET 2 !!\n");
+
+ OS_REPORT("//////////////OBJ_USAKU SET 3 !!\n");
if (a_this->mpBgW != NULL && dComIfG_Bgsp().Regist(a_this->mpBgW, a_this)) {
return cPhs_ERROR_e;
}
+ OS_REPORT("//////////////OBJ_USAKU SET 4 !!\n");
- a_this->cullMtx = a_this->mpModel->getBaseTRMtx();
- fopAcM_SetMin(a_this, -300.0f, -600.0f, -300.0f);
- fopAcM_SetMax(a_this, 300.0f, 600.0f, 300.0f);
+ fopAcM_SetMtx(i_this, a_this->mpModel->getBaseTRMtx());
+ fopAcM_SetMin(i_this, -300.0f, -600.0f, -300.0f);
+ fopAcM_SetMax(i_this, 300.0f, 600.0f, 300.0f);
daObj_Usaku_Execute(a_this);
}
diff --git a/src/d/actor/d_a_obj_vground.cpp b/src/d/actor/d_a_obj_vground.cpp
index e6c8c6818c..8ba4c3d282 100644
--- a/src/d/actor/d_a_obj_vground.cpp
+++ b/src/d/actor/d_a_obj_vground.cpp
@@ -8,8 +8,9 @@
#include "d/actor/d_a_obj_vground.h"
#include "d/d_procname.h"
-static int CheckCreateHeap(fopAc_ac_c* i_this) {
- return static_cast<daObjVGnd_c*>(i_this)->CreateHeap();
+static int CheckCreateHeap(fopAc_ac_c* a_this) {
+ daObjVGnd_c* i_this = static_cast<daObjVGnd_c*>(a_this);
+ return i_this->CreateHeap();
}
void daObjVGnd_c::initBaseMtx() {
@@ -21,7 +22,7 @@ void daObjVGnd_c::initBaseMtx() {
void daObjVGnd_c::setBaseMtx() {
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
mDoMtx_stack_c::YrotM(shape_angle.y);
- MTXCopy(mDoMtx_stack_c::now, mpModel->mBaseTransformMtx);
+ mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
}
int daObjVGnd_c::Create() {
@@ -35,23 +36,29 @@ int daObjVGnd_c::Create() {
static char* l_arcName = "M_VolcGnd";
int daObjVGnd_c::CreateHeap() {
- J3DModelData* mpObjectRes = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 5);
- mpModel = mDoExt_J3DModel__create(mpObjectRes, 0x80000, 0x11000284);
+ J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 0x5);
+ JUT_ASSERT(183, modelData != NULL);
+ mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000284);
if (!mpModel) {
return 0;
}
- J3DAnmTextureSRTKey* mpTextureSRTKey =
- (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 0xb);
- mpBtk = new mDoExt_btkAnm();
- if ((!mpBtk) || (!mpBtk->init(mpObjectRes, mpTextureSRTKey, 1, NULL, 1.0f, NULL, -1))) {
- return 0;
+ {
+ J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 0xb);
+ JUT_ASSERT(198, pbtk != NULL);
+ mpBtk = new mDoExt_btkAnm();
+ if ((!mpBtk) || (!mpBtk->init(modelData, pbtk, 1, NULL, 1.0f, NULL, -1))) {
+ return 0;
+ }
}
- J3DAnmTevRegKey* mpTevReqKey = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, 8);
- mpBrk = new mDoExt_brkAnm();
- if ((!mpBrk) || (!mpBrk->init(mpObjectRes, mpTevReqKey, 1, NULL, 1.0f, NULL, -1))) {
- return 0;
+ {
+ J3DAnmTevRegKey* pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, 0x8);
+ JUT_ASSERT(212, pbrk != NULL);
+ mpBrk = new mDoExt_brkAnm();
+ if ((!mpBrk) || (!mpBrk->init(modelData, pbrk, 1, NULL, 1.0f, NULL, -1))) {
+ return 0;
+ }
}
return 1;
@@ -76,7 +83,7 @@ int daObjVGnd_c::execute() {
mpBrk->setFrame(2.0f);
mpBtk->setFrame(2.0f);
} else {
- if (fopAcM_isSwitch(this, getSwbit())) {
+ if (fopAcM_isSwitch(this, (u8) getSwbit())) {
mpBrk->setFrame(1.0f);
mpBtk->setFrame(1.0f);
} else {
@@ -113,11 +120,13 @@ static int daObjVGnd_Execute(daObjVGnd_c* i_this) {
}
static int daObjVGnd_Delete(daObjVGnd_c* i_this) {
+ fopAcM_RegisterDeleteID(i_this, "Sample");
return i_this->_delete();
}
static int daObjVGnd_Create(fopAc_ac_c* i_this) {
- return static_cast<daObjVGnd_c*>(i_this)->create();
+ fopAcM_RegisterCreateID(daObjVGnd_c, i_this, "Sample");
+ return a_this->create();
}
static actor_method_class l_daObjVGnd_Method = {
diff --git a/src/d/actor/d_a_obj_window.cpp b/src/d/actor/d_a_obj_window.cpp
index 7421152697..c15f97e3cf 100644
--- a/src/d/actor/d_a_obj_window.cpp
+++ b/src/d/actor/d_a_obj_window.cpp
@@ -53,20 +53,25 @@ int daObjWindow_c::Create() {
mCyl.Set(l_cyl_src);
mCyl.SetStts(&mStts);
}
- tevStr.mLightInf.r = getLightInf();
+ u8 light = getLightInf();
+ tevStr.mLightInf.r = light;
return 1;
}
int daObjWindow_c::CreateHeap() {
- J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 9);
- mpModel = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084);
+ J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName, 9);
+ JUT_ASSERT(251, modelData != NULL);
+
+ mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
if (mpModel == NULL) {
return 0;
}
if (l_bck[mType] > 0) {
- J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, l_bck[mType]);
+ J3DAnmTransform* pbck = (J3DAnmTransform*)dComIfG_getObjectRes(l_arcName, l_bck[mType]);
+ JUT_ASSERT(266, pbck != NULL);
+
mpBckAnm = new mDoExt_bckAnm();
- if (mpBckAnm == NULL || !mpBckAnm->init(anm, 1, 2, 1.0f, 0, -1, false)) {
+ if (mpBckAnm == NULL || !mpBckAnm->init(pbck, 1, 2, 1.0f, 0, -1, false)) {
return 0;
}
}
diff --git a/src/d/actor/d_a_obj_zcloth.cpp b/src/d/actor/d_a_obj_zcloth.cpp
index 296fd6c392..a8b4388d42 100644
--- a/src/d/actor/d_a_obj_zcloth.cpp
+++ b/src/d/actor/d_a_obj_zcloth.cpp
@@ -68,11 +68,14 @@ static int daObjZCloth_Execute(daObjZCloth_c* i_this) {
}
static int daObjZCloth_Delete(daObjZCloth_c* i_this) {
+ const fpc_ProcID procID = fopAcM_GetID(i_this);
return i_this->_delete();
}
static int daObjZCloth_Create(fopAc_ac_c* i_this) {
- return static_cast<daObjZCloth_c*>(i_this)->create();
+ daObjZCloth_c* a_this = static_cast<daObjZCloth_c*>(i_this);
+ const fpc_ProcID procID = fopAcM_GetID(i_this);
+ return a_this->create();
}
static actor_method_class l_daObjZCloth_Method = {