mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-18 04:48:21 -04:00
Work on d_resorce, d_vibration, d_tresure and others (#347)
* Work on d_resorce * Work on d_a_tag_TWgate * Work on d_meter_map * d_tresure OK * Work on d_vibration * Work on d_a_npc * Work on d_a_npc * Work on d_a_npc
This commit is contained in:
+429
-667
File diff suppressed because it is too large
Load Diff
+22
-18
@@ -305,32 +305,36 @@ struct cBgS_dzb_strgroup {
|
||||
|
||||
/* 80074578-80074618 06EEB8 00A0+00 0/0 1/1 0/0 .text ConvDzb__4cBgSFPv */
|
||||
#ifdef NONMATCHING
|
||||
void cBgS::ConvDzb(void* p_dzb) {
|
||||
void* cBgS::ConvDzb(void* p_dzb) {
|
||||
cBgS_dzb_data* pbgd = (cBgS_dzb_data*)p_dzb;
|
||||
|
||||
if (!(pbgd->field_0x30 & 0x80000000)) {
|
||||
pbgd->field_0x30 |= 0x80000000;
|
||||
|
||||
if (pbgd->m_v_tbl != 0) {
|
||||
pbgd->m_v_tbl += (u32)p_dzb;
|
||||
}
|
||||
|
||||
pbgd->m_t_tbl += (u32)p_dzb;
|
||||
pbgd->m_b_tbl += (u32)p_dzb;
|
||||
pbgd->m_tree_tbl += (u32)p_dzb;
|
||||
pbgd->m_g_tbl += (u32)p_dzb;
|
||||
pbgd->m_ti_tbl += (u32)p_dzb;
|
||||
|
||||
for (int i = 0; i < pbgd->m_g_num; i++) {
|
||||
((cBgS_dzb_strgroup*)pbgd->m_g_tbl)[i].strOffset += (u32)p_dzb;
|
||||
}
|
||||
if ((pbgd->field_0x30 & 0x80000000)) {
|
||||
return;
|
||||
}
|
||||
|
||||
pbgd->field_0x30 |= 0x80000000;
|
||||
|
||||
if (pbgd->m_v_tbl != 0) {
|
||||
pbgd->m_v_tbl += (u32)p_dzb;
|
||||
}
|
||||
|
||||
pbgd->m_t_tbl += (u32)p_dzb;
|
||||
pbgd->m_b_tbl += (u32)p_dzb;
|
||||
pbgd->m_tree_tbl += (u32)p_dzb;
|
||||
pbgd->m_g_tbl += (u32)p_dzb;
|
||||
pbgd->m_ti_tbl += (u32)p_dzb;
|
||||
|
||||
for (int i = 0; i < pbgd->m_g_num; i++) {
|
||||
((cBgS_dzb_strgroup*)pbgd->m_g_tbl)[i].strOffset = (u32)p_dzb + ((cBgS_dzb_strgroup*)pbgd->m_g_tbl)[i].strOffset;
|
||||
}
|
||||
|
||||
return p_dzb;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void cBgS::ConvDzb(void* param_0) {
|
||||
asm void* cBgS::ConvDzb(void* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/bg/d_bg_s/ConvDzb__4cBgSFPv.s"
|
||||
}
|
||||
|
||||
@@ -1270,7 +1270,7 @@ BOOL dComIfG_resetToOpening(scene_class* i_scene) {
|
||||
}
|
||||
|
||||
static int phase_1(char* i_arcName) {
|
||||
if (!dComIfG_setObjectRes(i_arcName, 0, NULL)) {
|
||||
if (!dComIfG_setObjectRes(i_arcName, (u8)0, NULL)) {
|
||||
OSReport_Error("%s.arc Read Error !!\n", i_arcName);
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
@@ -1310,7 +1310,7 @@ int dComIfG_resLoad(request_of_phase_process_class* i_phase, char const* i_arcNa
|
||||
|
||||
/* 8002CEFC-8002CF5C 02783C 0060+00 1/0 0/0 0/0 .text phase_01__FP12phaseParam_c */
|
||||
static int phase_01(phaseParam_c* i_phasePrm) {
|
||||
if (dComIfG_setObjectRes(i_phasePrm->mResName, 0, i_phasePrm->mpHeap) == 0) {
|
||||
if (dComIfG_setObjectRes(i_phasePrm->mResName, (u8)0, i_phasePrm->mpHeap) == 0) {
|
||||
return 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,10 +22,6 @@ namespace std {
|
||||
/* 80182D10 */ void fabs(f32);
|
||||
}; // namespace std
|
||||
|
||||
struct mDoLib_clipper {
|
||||
/* 8001528C */ void setup(f32, f32, f32, f32);
|
||||
};
|
||||
|
||||
struct daTagMwait_c {
|
||||
/* 80182D9C */ void checkEndMessage();
|
||||
};
|
||||
|
||||
+429
-202
@@ -13,6 +13,7 @@
|
||||
#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
|
||||
#include "JSystem/JKernel/JKRMemArchive.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "MSL_C/stdio.h"
|
||||
#include "MSL_C/string.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
@@ -27,7 +28,7 @@
|
||||
//
|
||||
|
||||
struct dBgWKCol {
|
||||
/* 8007E7D0 */ void initKCollision(void*);
|
||||
/* 8007E7D0 */ static void* initKCollision(void*);
|
||||
};
|
||||
|
||||
//
|
||||
@@ -222,23 +223,31 @@ static void setAlpha(J3DMaterialTable* pMatTable) {
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803798B8-803798B8 005F18 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_803798C1 = "fbtex_dummy";
|
||||
SECTION_DEAD static char const* const stringBase_803798CD = "dummy";
|
||||
SECTION_DEAD static char const* const stringBase_803798D3 = "Zbuffer";
|
||||
#pragma pop
|
||||
|
||||
/* 8003A490-8003A81C 034DD0 038C+00 1/1 0/0 0/0 .text setIndirectTex__FP12J3DModelData */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void setIndirectTex(J3DModelData* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/setIndirectTex__FP12J3DModelData.s"
|
||||
static void setIndirectTex(J3DModelData* param_0) {
|
||||
const char* textureName;
|
||||
J3DMaterialTable& materialTable = param_0->getMaterialTable();
|
||||
J3DTexture* texture = materialTable.getTexture();
|
||||
if (texture == NULL)
|
||||
return;
|
||||
JUTNameTab* nameTab = materialTable.getTextureName();
|
||||
if (nameTab == NULL)
|
||||
return;
|
||||
|
||||
for (u16 i = 0; i < texture->getNum(); i++) {
|
||||
textureName = nameTab->getName(i);
|
||||
if (memcmp(textureName, "fbtex_dummy", 0xc) == 0) {
|
||||
texture->setResTIMG(i, *mDoGph_gInf_c::getFrameBufferTimg());
|
||||
}
|
||||
if (memcmp(textureName, "dummy", 6) == 0) {
|
||||
texture->setResTIMG(i, *mDoGph_gInf_c::getFrameBufferTimg());
|
||||
}
|
||||
if (memcmp(textureName, "Zbuffer", 8) == 0) {
|
||||
texture->setResTIMG(i, *mDoGph_gInf_c::getZbufferTimg());
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8003A81C-8003A840 03515C 0024+00 1/1 0/0 0/0 .text setAlpha__FP12J3DModelData */
|
||||
static void setAlpha(J3DModelData* pModelData) {
|
||||
@@ -247,16 +256,18 @@ static void setAlpha(J3DModelData* pModelData) {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80379840-803798A4 005EA0 0064+00 2/2 0/0 0/0 .rodata l_texMtxInfo */
|
||||
SECTION_RODATA static u8 const l_texMtxInfo[100] = {
|
||||
0x00, 0x08, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x3D, 0xCC, 0xCC, 0xCD, 0x3D, 0xCC, 0xCC, 0xCD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00,
|
||||
SECTION_RODATA static const J3DTexMtxInfo l_texMtxInfo = {
|
||||
0x00,
|
||||
0x08,
|
||||
{0.5f, 0.5f, 0.0f},
|
||||
{ 0.1f, 0.1f, 0, 0.0f, 0.0f},
|
||||
{
|
||||
{ 0.5f, 0.0f, 0.0f, 0.5f },
|
||||
{ 0.0f, 0.5f, 0.0f, 0.5f },
|
||||
{ 0.0f, 0.0f, 0.0f, 1.0f },
|
||||
{ 0.0f, 0.0f, 0.0f, 1.0f },
|
||||
},
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80379840, &l_texMtxInfo);
|
||||
|
||||
/* 803798A4-803798B8 005F04 0014+00 1/1 0/0 0/0 .rodata l_tevStageInfo$3774 */
|
||||
SECTION_RODATA static u8 const l_tevStageInfo[20] = {
|
||||
@@ -265,22 +276,15 @@ SECTION_RODATA static u8 const l_tevStageInfo[20] = {
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x803798A4, &l_tevStageInfo);
|
||||
|
||||
/* 803798B8-803798B8 005F18 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_803798DB = "Always";
|
||||
#pragma pop
|
||||
|
||||
/* 80450628-8045062C 0000A8 0004+00 1/1 0/0 0/0 .sdata l_texCoordInfo$3772 */
|
||||
SECTION_SDATA static u8 l_texCoordInfo[4] = {
|
||||
SECTION_SDATA static J3DTexCoordInfo l_texCoordInfo = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x27,
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* 8045062C-80450630 0000AC 0004+00 1/1 0/0 0/0 .sdata l_tevOrderInfo$3773 */
|
||||
SECTION_SDATA static u8 l_tevOrderInfo[4] = {
|
||||
SECTION_SDATA static J3DTevOrderInfo l_tevOrderInfo = {
|
||||
0x00,
|
||||
0x03,
|
||||
0xFF,
|
||||
@@ -288,20 +292,46 @@ SECTION_SDATA static u8 l_tevOrderInfo[4] = {
|
||||
};
|
||||
|
||||
/* 80451DF0-80451DF8 0003F0 0008+00 1/1 0/0 0/0 .sdata2 l_alphaCompInfo$3775 */
|
||||
SECTION_SDATA2 static u8 l_alphaCompInfo[8] = {
|
||||
0x04, 0x80, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00,
|
||||
SECTION_SDATA2 static J3DAlphaCompInfo l_alphaCompInfo = {
|
||||
0x04, 0x80, 0x00, 0x03, 0xFF,
|
||||
};
|
||||
|
||||
/* 8003A840-8003AACC 035180 028C+00 1/1 0/0 0/0 .text addWarpMaterial__FP12J3DModelData
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void addWarpMaterial(J3DModelData* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/addWarpMaterial__FP12J3DModelData.s"
|
||||
static void addWarpMaterial(J3DModelData* param_1) {
|
||||
ResTIMG* objectRes = (ResTIMG*)dComIfG_getObjectRes("Always", 0x5d);
|
||||
J3DTexture* texture = param_1->getTexture();
|
||||
u16 textureNum = texture->getNum();
|
||||
texture->addResTIMG(1, objectRes - textureNum);
|
||||
J3DTexMtx* texMtxInfo = new J3DTexMtx(l_texMtxInfo);
|
||||
|
||||
for (u16 i = 0; i < param_1->getMaterialNum(); i++) {
|
||||
J3DMaterial* pMaterial = param_1->getMaterialNodePointer(i);
|
||||
J3DTexGenBlock* texGenBlock = pMaterial->getTexGenBlock();
|
||||
u32 texGenNum = texGenBlock->getTexGenNum();
|
||||
J3DTexCoord* coord = texGenBlock->getTexCoord(texGenNum);
|
||||
l_texCoordInfo.mTexGenMtx = texGenNum * 3 + 0x1e;
|
||||
coord->setTexCoordInfo(&l_texCoordInfo);
|
||||
coord->resetTexMtxReg();
|
||||
texGenBlock->setTexGenNum(texGenNum + 1);
|
||||
texGenBlock->setTexMtx(texGenNum, texMtxInfo);
|
||||
J3DTevBlock* tevBlock = pMaterial->getTevBlock();
|
||||
u8 tevStageNum = tevBlock->getTevStageNum();
|
||||
l_tevOrderInfo.field_0x0 = texGenNum;
|
||||
tevBlock->setTexNo(3, textureNum);
|
||||
tevBlock->setTevOrder(tevStageNum, l_tevOrderInfo);
|
||||
tevBlock->setTevStage(tevStageNum, J3DTevStage(*(J3DTevStageInfo*)l_tevStageInfo));
|
||||
tevBlock->setTevStageNum(tevStageNum + 1);
|
||||
J3DShape* pShape = pMaterial->getShape();
|
||||
GXAttr attr = (GXAttr)(texGenNum + 1);
|
||||
pShape->addTexMtxIndexInDL(attr, 0);
|
||||
pShape->addTexMtxIndexInVcd(attr);
|
||||
J3DPEBlock* peBlock = pMaterial->getPEBlock();
|
||||
J3DAlphaComp* alphaComp = peBlock->getAlphaComp();
|
||||
alphaComp->setAlphaCompInfo(&l_alphaCompInfo);
|
||||
peBlock->setZCompLoc((u8)0);
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8003AACC-8003AB2C 03540C 0060+00 1/1 2/2 0/0 .text __ct__11J3DTevStageFRC15J3DTevStageInfo */
|
||||
#pragma push
|
||||
@@ -320,37 +350,54 @@ void J3DTexGenBlock::setTexMtx(u32 param_0, J3DTexMtx* param_1) {
|
||||
|
||||
/* 8003AB30-8003AC1C 035470 00EC+00 0/0 2/1 0/0 .text
|
||||
* onWarpMaterial__11dRes_info_cFP12J3DModelData */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dRes_info_c::onWarpMaterial(J3DModelData* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/onWarpMaterial__11dRes_info_cFP12J3DModelData.s"
|
||||
void dRes_info_c::onWarpMaterial(J3DModelData* param_0) {
|
||||
for (u16 i = 0; i < param_0->getMaterialNum(); i++) {
|
||||
J3DMaterial* pMaterial = param_0->getMaterialNodePointer(i);
|
||||
J3DTevBlock* tevBlock = pMaterial->getTevBlock();
|
||||
u8 tevStageNum = tevBlock->getTevStageNum();
|
||||
J3DTevOrder* tevorder = tevBlock->getTevOrder(tevStageNum - 1);
|
||||
if (tevorder->getTexMap() == 3) {
|
||||
break;
|
||||
}
|
||||
tevBlock->setTevStageNum(tevStageNum + 1);
|
||||
J3DTexGenBlock* texGenBlock = pMaterial->getTexGenBlock();
|
||||
texGenBlock->setTexGenNum(texGenBlock->getTexGenNum() + 1);
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8003AC1C-8003AD08 03555C 00EC+00 0/0 2/1 0/0 .text
|
||||
* offWarpMaterial__11dRes_info_cFP12J3DModelData */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dRes_info_c::offWarpMaterial(J3DModelData* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/offWarpMaterial__11dRes_info_cFP12J3DModelData.s"
|
||||
void dRes_info_c::offWarpMaterial(J3DModelData* modelData) {
|
||||
for (u16 i = 0; i < modelData->getMaterialNum(); i++) {
|
||||
J3DMaterial* pMaterial = modelData->getMaterialNodePointer(i);
|
||||
J3DTevBlock* tevBlock = pMaterial->getTevBlock();
|
||||
u8 tevStageNum = tevBlock->getTevStageNum();
|
||||
J3DTevOrder* tevorder = tevBlock->getTevOrder(tevStageNum - 1);
|
||||
if (tevorder->getTexMap() != 3) {
|
||||
break;
|
||||
}
|
||||
tevBlock->setTevStageNum(tevStageNum - 1);
|
||||
J3DTexGenBlock* texGenBlock = pMaterial->getTexGenBlock();
|
||||
texGenBlock->setTexGenNum(texGenBlock->getTexGenNum() - 1);
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8003AD08-8003AE14 035648 010C+00 0/0 1/1 0/0 .text
|
||||
* setWarpSRT__11dRes_info_cFP12J3DModelDataRC4cXyzff */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dRes_info_c::setWarpSRT(J3DModelData* param_0, cXyz const& param_1, f32 param_2,
|
||||
f32 param_3) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/setWarpSRT__11dRes_info_cFP12J3DModelDataRC4cXyzff.s"
|
||||
void dRes_info_c::setWarpSRT(J3DModelData* modelData, cXyz const& param_1, f32 translationX, f32 translationY) {
|
||||
J3DMaterial* pMaterial = modelData->getMaterialNodePointer(0);
|
||||
J3DTexGenBlock* texGenBlock = pMaterial->getTexGenBlock();
|
||||
u32 texGenNum = texGenBlock->getTexGenNum();
|
||||
J3DTexMtx* texMtx = texGenBlock->getTexMtx(texGenNum - 1);
|
||||
J3DTexMtxInfo& texMtxInfo = texMtx->getTexMtxInfo();
|
||||
texMtxInfo.mSRT.mTranslationX = translationX;
|
||||
texMtxInfo.mSRT.mTranslationY = translationY;
|
||||
mDoMtx_stack_c::transS(-param_1.x, -param_1.y, -param_1.z);
|
||||
s16 angleY = fopCamM_GetAngleY(dComIfGp_getCamera(i_dComIfGp_getPlayerCameraID(0)));
|
||||
mDoMtx_stack_c::YrotM(angleY);
|
||||
MtxP stackMtx = mDoMtx_stack_c::get();
|
||||
cMtx_concat(l_texMtxInfo.mEffectMtx, stackMtx, texMtxInfo.mEffectMtx);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803A7C18-803A7C38 -00001 0020+00 1/1 0/0 0/0 .data @4017 */
|
||||
@@ -367,6 +414,77 @@ SECTION_DATA static void* lit_4017[8] = {
|
||||
|
||||
/* 8003AE14-8003B150 035754 033C+00 2/1 1/1 0/0 .text loaderBasicBmd__11dRes_info_cFUlPv
|
||||
*/
|
||||
// regalloc
|
||||
#ifdef NONMATCHING
|
||||
J3DModelData* dRes_info_c::loaderBasicBmd(u32 param_1, void* param_2) {
|
||||
u32 pvVar5 = 0x59020010;
|
||||
J3DMaterial* pMaterial;
|
||||
J3DModelData* modelData;
|
||||
u8 lightMask;
|
||||
if (param_1 == 'BMDE' || param_1 == 'BMDV') {
|
||||
pvVar5 |= 0x20;
|
||||
} else if (param_1 == 'BMWR' || param_1 == 'BMWE') {
|
||||
pvVar5 ^= 0x60020;
|
||||
}
|
||||
modelData = (J3DModelData*)J3DModelLoaderDataBase::load(param_2, pvVar5);
|
||||
if (modelData == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((param_1 == 'BMDE' || param_1 == 'BMDV') || param_1 == 'BMWE') {
|
||||
for (u16 i = 0; i < modelData->getShapeNum(); i++) {
|
||||
modelData->getShapeNodePointer(i)->setTexMtxLoadType(0x2000);
|
||||
}
|
||||
}
|
||||
for (u16 i = 0; i < modelData->getMaterialNum(); i++) {
|
||||
pMaterial = modelData->getMaterialNodePointer(i);
|
||||
lightMask = pMaterial->getColorBlock()->getColorChan(0)->getLightMask();
|
||||
switch (g_env_light.field_0x1308) {
|
||||
case 1:
|
||||
lightMask &= 4;
|
||||
break;
|
||||
case 2:
|
||||
lightMask &= 0xc;
|
||||
break;
|
||||
case 3:
|
||||
lightMask &= 0xd;
|
||||
break;
|
||||
case 4:
|
||||
lightMask &= 0xf;
|
||||
break;
|
||||
case 5:
|
||||
lightMask &= 0x1f;
|
||||
break;
|
||||
case 6:
|
||||
lightMask &= 0x3f;
|
||||
break;
|
||||
case 7:
|
||||
lightMask &= 0x7f;
|
||||
}
|
||||
pMaterial->getColorBlock()->getColorChan(0)->setLightMask(lightMask);
|
||||
pMaterial->change();
|
||||
J3DMaterialAnm* local_38 = new J3DMaterialAnm();
|
||||
if (local_38 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
pMaterial->setMaterialAnm(local_38);
|
||||
}
|
||||
setIndirectTex(modelData);
|
||||
if ((param_1 == 'BMWR') || (param_1 == 'BMWE')) {
|
||||
addWarpMaterial(modelData);
|
||||
}
|
||||
if ((param_1 == 'BMDR') || (param_1 == 'BMWR')) {
|
||||
if (modelData->newSharedDisplayList(0x40000) == 0) {
|
||||
modelData->simpleCalcMaterial(0, (float (*)[4])j3dDefaultMtx);
|
||||
modelData->makeSharedDL();
|
||||
} else {
|
||||
modelData = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return modelData;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -375,6 +493,7 @@ asm J3DModelData* dRes_info_c::loaderBasicBmd(u32 param_0, void* param_1) {
|
||||
#include "asm/d/d_resorce/loaderBasicBmd__11dRes_info_cFUlPv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8003B150-8003B18C 035A90 003C+00 2/2 8/8 0/0 .text __dt__15J3DTevKColorAnmFv */
|
||||
#pragma push
|
||||
@@ -539,6 +658,142 @@ SECTION_DEAD static char const* const stringBase_80379912 = "<%s> res == NULL !!
|
||||
#pragma pop
|
||||
|
||||
/* 8003B30C-8003B8D0 035C4C 05C4+00 2/2 0/0 0/0 .text loadResource__11dRes_info_cFv */
|
||||
// J3DXXX ctor/dtor inlines
|
||||
#ifdef NONMATCHING
|
||||
int dRes_info_c::loadResource() {
|
||||
s32 pJVar4 = mArchive->countFile();
|
||||
mRes = new void*[pJVar4];
|
||||
if (mRes == NULL) {
|
||||
OSReport_Error("<%s.arc> setRes: res pointer buffer nothing !!\n", this);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < pJVar4; i++) {
|
||||
mRes[i] = NULL;
|
||||
}
|
||||
JKRArchive::SDIDirEntry* node = mArchive->mNodes;
|
||||
|
||||
for (int i = 0; i < mArchive->countDirectory(); i++) {
|
||||
u32 nodeType = node->type;
|
||||
u32 firstFileIndex = node->first_file_index;
|
||||
J3DModelData* modelData;
|
||||
void* result;
|
||||
for (int j = 0; j < node->num_entries; j++) {
|
||||
if (mArchive->isFileEntry(firstFileIndex)) {
|
||||
result = mArchive->getIdxResource(firstFileIndex);
|
||||
if (result == NULL) {
|
||||
OSReport_Error("<%s> res == NULL !!\n", mArchive->mStringTable + (mArchive->findIdxResource(firstFileIndex)->type_flags_and_name_offset & 0xFFFFFF));
|
||||
}
|
||||
else if (nodeType == 'ARC ') {
|
||||
JKRArchive::SDIFileEntry* fileEntry = mArchive->findIdxResource(firstFileIndex);
|
||||
const char* __s = mArchive->mStringTable + fileEntry->getNameOffset();
|
||||
size_t len = strlen(__s) - 4;
|
||||
char aJStack_24[9];
|
||||
strncpy(aJStack_24, __s, len);
|
||||
aJStack_24[len] = '\0';
|
||||
JKRHeap* local_58 = JKRHeap::findFromRoot(JKRHeap::getCurrentHeap());
|
||||
JKRHeap* pJVar3 = local_58;
|
||||
|
||||
if (local_58 == (JKRHeap*)mDoExt_getGameHeap()) {
|
||||
local_58 = NULL;
|
||||
}
|
||||
dComIfG_setObjectRes(aJStack_24, result, fileEntry->data_size);
|
||||
} else if (nodeType == 'BMDP') {
|
||||
result = (J3DModelData*) J3DModelLoaderDataBase::load(result, 0x59020030);
|
||||
if (result == NULL) {
|
||||
return -1;
|
||||
}
|
||||
modelData = (J3DModelData*)result;
|
||||
for (u16 k = 0; k < modelData->getMaterialNum(); k++) {
|
||||
J3DMaterial* pMaterial = modelData->getMaterialNodePointer(k);
|
||||
pMaterial->change();
|
||||
J3DMaterialAnm* materialAnm = new J3DMaterialAnm();
|
||||
if (materialAnm == (J3DMaterialAnm*)0x0) {
|
||||
return -1;
|
||||
}
|
||||
pMaterial->setMaterialAnm(materialAnm);
|
||||
}
|
||||
setAlpha(modelData);
|
||||
if (modelData->newSharedDisplayList(0x40000) != 0) {
|
||||
return -1;
|
||||
}
|
||||
modelData->simpleCalcMaterial(0, (float (*)[4])j3dDefaultMtx);
|
||||
modelData->makeSharedDL();
|
||||
} else if ((((nodeType == 'BMDR') ||
|
||||
(nodeType == 'BMDV')) ||
|
||||
(nodeType == 'BMDE')) ||
|
||||
((nodeType == 'BMWR' ||
|
||||
(nodeType == 'BMWE'))))
|
||||
{
|
||||
result = loaderBasicBmd(nodeType, result);
|
||||
if (result == NULL) {
|
||||
return -1;
|
||||
}
|
||||
} else if (nodeType == 'BMDG') {
|
||||
result = (J3DModelData*)J3DModelLoaderDataBase::load(result, 0x59020010);
|
||||
if (result == NULL) {
|
||||
return -1;
|
||||
}
|
||||
modelData = (J3DModelData*)result;
|
||||
if (modelData->newSharedDisplayList(0x40000) != 0) {
|
||||
return -1;
|
||||
}
|
||||
modelData->simpleCalcMaterial(0, (float (*)[4])j3dDefaultMtx);
|
||||
modelData->makeSharedDL();
|
||||
} else if (nodeType == 'BMDA') {
|
||||
result = (J3DModelData*)J3DModelLoaderDataBase::load(result, 0x59020010);
|
||||
if (result == NULL) {
|
||||
return -1;
|
||||
}
|
||||
modelData = (J3DModelData*)result;
|
||||
if (modelData->newSharedDisplayList(0x40000) != 0) {
|
||||
return -1;
|
||||
}
|
||||
modelData->simpleCalcMaterial(0, (float (*)[4])j3dDefaultMtx);
|
||||
modelData->makeSharedDL();
|
||||
} else if (nodeType == 'BLS ') {
|
||||
result = J3DClusterLoaderDataBase::load(result);
|
||||
if (result == NULL) {
|
||||
return -1;
|
||||
}
|
||||
} else if ((nodeType == 'BCKS') ||
|
||||
(nodeType == 'BCK '))
|
||||
{
|
||||
int sVar1 = *(int*)((int)result + 0x1c);
|
||||
void* local_9c = sVar1 != 0xffffffff ? (void*)(sVar1 + (u32)result) : NULL;
|
||||
mDoExt_transAnmBas* transAnmBas = new mDoExt_transAnmBas(local_9c);
|
||||
if (transAnmBas == NULL) {
|
||||
return -1;
|
||||
}
|
||||
J3DAnmLoaderDataBase::setResource(transAnmBas, result);
|
||||
result = transAnmBas;
|
||||
} else if ((((nodeType == 'BTP ') ||
|
||||
(nodeType == 'BTK ')) ||
|
||||
(nodeType == 'BPK ')) ||
|
||||
(((nodeType == 'BRK ' ||
|
||||
(nodeType == 'BLK ')) ||
|
||||
((nodeType == 'BVA ' ||
|
||||
(nodeType == 'BXA '))))))
|
||||
{
|
||||
result = J3DAnmLoaderDataBase::load(result, J3DLOADER_UNK_FLAG0);
|
||||
if (result == NULL) {
|
||||
return -1;
|
||||
}
|
||||
} else if (nodeType == 'DZB ') {
|
||||
result = ((cBgS*)result)->ConvDzb(result);
|
||||
} else if (nodeType == 'KCL ') {
|
||||
result = dBgWKCol::initKCollision(result);
|
||||
}
|
||||
mRes[firstFileIndex] = result;
|
||||
}
|
||||
firstFileIndex++;
|
||||
}
|
||||
node++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -547,6 +802,7 @@ asm int dRes_info_c::loadResource() {
|
||||
#include "asm/d/d_resorce/loadResource__11dRes_info_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8003B8D0-8003B93C 036210 006C+00 1/0 0/0 0/0 .text __dt__18J3DAnmTransformKeyFv */
|
||||
#pragma push
|
||||
@@ -572,24 +828,39 @@ extern "C" asm void __dt__15J3DAnmTransformFv() {
|
||||
|
||||
/* 8003B998-8003BA9C 0362D8 0104+00 1/1 0/0 0/0 .text deleteArchiveRes__11dRes_info_cFv
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dRes_info_c::deleteArchiveRes() {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/deleteArchiveRes__11dRes_info_cFv.s"
|
||||
void dRes_info_c::deleteArchiveRes() {
|
||||
JKRArchive::SDIDirEntry* nodes = mArchive->mNodes;
|
||||
for (int i = 0; i < mArchive->countDirectory(); nodes++, i++) {
|
||||
if (nodes->type == 0x41524320) {
|
||||
u32 firstFileIndex = nodes->first_file_index;
|
||||
for (int j = 0; j < nodes->num_entries; j++) {
|
||||
if (mArchive->isFileEntry(firstFileIndex)) {
|
||||
JKRArchive::SDIFileEntry* fileEntry = mArchive->findIdxResource(firstFileIndex);
|
||||
u32 nameOffset = fileEntry->getNameOffset();
|
||||
char* fileName = mArchive->mStringTable + nameOffset;
|
||||
size_t nameLen = strlen(fileName) - 4;
|
||||
char nameBuffer[12];
|
||||
strncpy(nameBuffer, fileName, nameLen);
|
||||
nameBuffer[nameLen] = '\0';
|
||||
dComIfG_deleteObjectResMain(nameBuffer);
|
||||
}
|
||||
firstFileIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8003BA9C-8003BAC4 0363DC 0028+00 2/2 0/0 0/0 .text getArcHeader__FP10JKRArchive */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void* getArcHeader(JKRArchive* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/getArcHeader__FP10JKRArchive.s"
|
||||
static SArcHeader* getArcHeader(JKRArchive* param_0) {
|
||||
if (param_0 != NULL) {
|
||||
switch(param_0->getMountMode()) {
|
||||
case JKRArchive::MOUNT_MEM:
|
||||
return ((JKRMemArchive*)param_0)->getArcHeader();
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8003BAC4-8003BAF8 036404 0034+00 1/1 0/0 0/0 .text setRes__11dRes_info_cFP10JKRArchiveP7JKRHeap
|
||||
*/
|
||||
@@ -679,28 +950,24 @@ static s32 myGetMemBlockSize0(void* param_0) {
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_8037997F = "%5.1f %5x %5.1f %5x %3d %s\n";
|
||||
SECTION_DEAD static char const* const stringBase_8037999B = "dRes_info_c::dump_long %08x %d\n";
|
||||
SECTION_DEAD static char const* const stringBase_803799BB =
|
||||
"No Command Archive ArcHeader(size) SolidHeap(si"
|
||||
"ze) Resource Cnt ArchiveName\n";
|
||||
SECTION_DEAD static char const* const stringBase_80379A09 =
|
||||
"%2d %08x %08x %08x(%6x) %08x(%5x) %08x %3d %s\n";
|
||||
#pragma pop
|
||||
|
||||
/* 8003BD2C-8003BE38 03666C 010C+00 1/1 0/0 0/0 .text dump_long__11dRes_info_cFP11dRes_info_ci */
|
||||
#ifdef NONMATCHING
|
||||
void dRes_info_c::dump_long(dRes_info_c* param_0, int param_1) {
|
||||
int i;
|
||||
void* header;
|
||||
int blockSize1;
|
||||
int blockSize2;
|
||||
JKRArchive* archive;
|
||||
JKRSolidHeap* dataHeap;
|
||||
|
||||
JUTReportConsole_f("dRes_info_c::dump_long %08x %d\n", param_0, param_1);
|
||||
JUTReportConsole_f(
|
||||
"No Command Archive ArcHeader(size) SolidHeap(size) Resource Cnt ArchiveName\n");
|
||||
|
||||
for (int i = 0; i < param_1; i++) {
|
||||
for (i = 0; i < param_1; i++) {
|
||||
if (param_0->getCount() != 0) {
|
||||
JKRArchive* archive = param_0->getArchive();
|
||||
archive = param_0->getArchive();
|
||||
header = NULL;
|
||||
blockSize1 = 0;
|
||||
|
||||
@@ -709,7 +976,7 @@ void dRes_info_c::dump_long(dRes_info_c* param_0, int param_1) {
|
||||
blockSize1 = myGetMemBlockSize0(header);
|
||||
}
|
||||
|
||||
JKRSolidHeap* dataHeap = param_0->mDataHeap;
|
||||
dataHeap = param_0->mDataHeap;
|
||||
blockSize2 = 0;
|
||||
if (dataHeap != NULL) {
|
||||
blockSize2 = myGetMemBlockSize0((void*)dataHeap);
|
||||
@@ -717,22 +984,12 @@ void dRes_info_c::dump_long(dRes_info_c* param_0, int param_1) {
|
||||
|
||||
JUTReportConsole_f("%2d %08x %08x %08x(%6x) %08x(%5x) %08x %3d %s\n", i,
|
||||
param_0->getDMCommand(), archive, header, blockSize1,
|
||||
¶m_0->mDataHeap, blockSize2, param_0->mRes,
|
||||
dataHeap, blockSize2, param_0->mRes, param_0->getCount(),
|
||||
param_0->getArchiveName());
|
||||
}
|
||||
param_0++;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dRes_info_c::dump_long(dRes_info_c* param_0, int param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/dump_long__11dRes_info_cFP11dRes_info_ci.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803798B8-803798B8 005F18 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
@@ -760,6 +1017,33 @@ SECTION_SDATA2 static f32 lit_4333[1 + 1 /* padding */] = {
|
||||
|
||||
/* 8003BE38-8003BFB0 036778 0178+00 1/1 0/0 0/0 .text dump__11dRes_info_cFP11dRes_info_ci
|
||||
*/
|
||||
// float literal order
|
||||
#ifdef NONMATCHING
|
||||
void dRes_info_c::dump(dRes_info_c* param_0, int param_1) {
|
||||
int totalArcHeaderSize;
|
||||
int totalHeapSize;
|
||||
int arcHeaderSize;
|
||||
int heapSize;
|
||||
char* archiveName;
|
||||
JUTReportConsole_f("dRes_info_c::dump %08x %d\n", param_0, param_1);
|
||||
JUTReportConsole_f("No ArchiveSize(KB) SolidHeapSize(KB) Cnt ArchiveName\n");
|
||||
totalArcHeaderSize = 0;
|
||||
totalHeapSize = 0;
|
||||
for (int i = 0; i < param_1; i++) {
|
||||
if (param_0->getCount()) {
|
||||
arcHeaderSize = JKRGetMemBlockSize(NULL, getArcHeader(param_0->getArchive()));
|
||||
heapSize = JKRGetMemBlockSize(NULL, param_0->mDataHeap);
|
||||
archiveName = param_0->getArchiveName();
|
||||
JUTReportConsole_f("%2d %6.1f %6x %6.1f %6x %3d %s\n", i, arcHeaderSize / 1024.0f, arcHeaderSize, heapSize / 1024.0f, heapSize, param_0->getCount(), archiveName);
|
||||
totalArcHeaderSize += arcHeaderSize;
|
||||
totalHeapSize += heapSize;
|
||||
}
|
||||
param_0++;
|
||||
}
|
||||
JUTReportConsole_f(
|
||||
"----------------------------------------------\n %6.1f %6x %6.1f %6x Total\n\n", totalArcHeaderSize / 1024.0f, totalArcHeaderSize, totalHeapSize / 1024.0f, totalHeapSize);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -768,37 +1052,23 @@ asm void dRes_info_c::dump(dRes_info_c* param_0, int param_1) {
|
||||
#include "asm/d/d_resorce/dump__11dRes_info_cFP11dRes_info_ci.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8003BFB0-8003C078 0368F0 00C8+00 0/0 1/1 0/0 .text __dt__14dRes_control_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm dRes_control_c::~dRes_control_c() {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/__dt__14dRes_control_cFv.s"
|
||||
dRes_control_c::~dRes_control_c() {
|
||||
for (int i = 0; i < (int)ARRAY_SIZE(mObjectInfo); i++) {
|
||||
mObjectInfo[i].~dRes_info_c();
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_SIZE(mStageInfo); i++) {
|
||||
mStageInfo[i].~dRes_info_c();
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803798B8-803798B8 005F18 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
// MWCC ignores mapping of some japanese characters using the
|
||||
// byte 0x5C (ASCII '\'). This is why this string is hex-encoded.
|
||||
SECTION_DEAD static char const* const stringBase_80379AF9 =
|
||||
"\x3C\x25\x73\x2E\x61\x72\x63\x3E\x20\x64\x52\x65\x73\x5F\x63\x6F\x6E\x74\x72\x6F\x6C\x5F\x63"
|
||||
"\x3A\x3A\x73\x65\x74\x52\x65\x73\x3A\x20\x8B\xF3\x82\xAB\x83\x8A\x83\x5C\x81\x5B\x83\x58\x8F"
|
||||
"\xEE\x95"
|
||||
"\xF1\x83\x7C\x83\x43\x83\x93\x83\x5E\x82\xAA\x82\xA0\x82\xE8\x82\xDC\x82\xB9\x82\xF1\x0A";
|
||||
SECTION_DEAD static char const* const stringBase_80379B40 =
|
||||
"<%s.arc> dRes_control_c::setRes: res info set er"
|
||||
"ror !!\n";
|
||||
#pragma pop
|
||||
|
||||
/* 8003C078-8003C160 0369B8 00E8+00 2/2 8/8 0/0 .text
|
||||
* setRes__14dRes_control_cFPCcP11dRes_info_ciPCcUcP7JKRHeap */
|
||||
// matches except resInfo destructor issues?
|
||||
#ifdef NONMATCHING
|
||||
int dRes_control_c::setRes(char const* arcName, dRes_info_c* pInfo, int infoSize,
|
||||
char const* arcPath, u8 param_4, JKRHeap* pHeap) {
|
||||
dRes_info_c* resInfo = getResInfo(arcName, pInfo, infoSize);
|
||||
@@ -807,6 +1077,8 @@ int dRes_control_c::setRes(char const* arcName, dRes_info_c* pInfo, int infoSize
|
||||
resInfo = newResInfo(pInfo, infoSize);
|
||||
|
||||
if (resInfo == NULL) {
|
||||
// MWCC ignores mapping of some japanese characters using the
|
||||
// byte 0x5C (ASCII '\'). This is why this string is hex-encoded.
|
||||
// "<%s.arc> dRes_control_c::setRes: 空きリソース情報ポインタがありません\n"
|
||||
// "<%s.arc> dRes_control_c::setRes: There isn't a free Resource Info pointer\n"
|
||||
OSReport_Error(
|
||||
@@ -815,31 +1087,20 @@ int dRes_control_c::setRes(char const* arcName, dRes_info_c* pInfo, int infoSize
|
||||
"\x5C\x81\x5B\x83\x58\x8F\xEE\x95\xF1\x83\x7C\x83\x43\x83\x93\x83\x5E\x82\xAA\x82"
|
||||
"\xA0\x82\xE8\x82\xDC\x82\xB9\x82\xF1\x0A",
|
||||
arcName);
|
||||
delete resInfo;
|
||||
resInfo->~dRes_info_c();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int resStatus = resInfo->set(arcName, arcPath, param_4, pHeap);
|
||||
if (resStatus == 0) {
|
||||
OSReport_Error("<%s.arc> dRes_control_c::setRes: res info set error !!\n", arcName);
|
||||
delete resInfo;
|
||||
resInfo->~dRes_info_c();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
resInfo->incCount();
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm int dRes_control_c::setRes(char const* param_0, dRes_info_c* param_1, int param_2,
|
||||
char const* param_3, u8 param_4, JKRHeap* param_5) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/setRes__14dRes_control_cFPCcP11dRes_info_ciPCcUcP7JKRHeap.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8003C160-8003C194 036AA0 0034+00 0/0 10/10 1/1 .text
|
||||
* syncRes__14dRes_control_cFPCcP11dRes_info_ci */
|
||||
@@ -855,7 +1116,6 @@ int dRes_control_c::syncRes(char const* arcName, dRes_info_c* pInfo, int infoSiz
|
||||
|
||||
/* 8003C194-8003C1E4 036AD4 0050+00 1/1 7/7 0/0 .text
|
||||
* deleteRes__14dRes_control_cFPCcP11dRes_info_ci */
|
||||
#ifdef NONMATCHING
|
||||
int dRes_control_c::deleteRes(char const* arcName, dRes_info_c* pInfo, int infoSize) {
|
||||
dRes_info_c* resInfo = getResInfo(arcName, pInfo, infoSize);
|
||||
|
||||
@@ -863,21 +1123,11 @@ int dRes_control_c::deleteRes(char const* arcName, dRes_info_c* pInfo, int infoS
|
||||
return 0;
|
||||
} else {
|
||||
if (resInfo->decCount() == 0) {
|
||||
delete resInfo;
|
||||
resInfo->~dRes_info_c();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm int dRes_control_c::deleteRes(char const* param_0, dRes_info_c* param_1, int param_2) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/deleteRes__14dRes_control_cFPCcP11dRes_info_ci.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8003C1E4-8003C260 036B24 007C+00 5/5 5/5 3/3 .text
|
||||
* getResInfo__14dRes_control_cFPCcP11dRes_info_ci */
|
||||
@@ -921,87 +1171,64 @@ dRes_info_c* dRes_control_c::getResInfoLoaded(char const* arcName, dRes_info_c*
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803798B8-803798B8 005F18 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
SECTION_DEAD static char const* const stringBase_80379BA0 =
|
||||
"<%s.arc> getRes: res index over !! index=%d coun"
|
||||
"t=%d\n";
|
||||
#pragma pop
|
||||
|
||||
/* 8003C2EC-8003C37C 036C2C 0090+00 1/1 54/54 894/894 .text
|
||||
* getRes__14dRes_control_cFPCclP11dRes_info_ci */
|
||||
// weird branching
|
||||
#ifdef NONMATCHING
|
||||
void* dRes_control_c::getRes(char const* arcName, s32 resIdx, dRes_info_c* pInfo, int infoSize) {
|
||||
dRes_info_c* resInfo = getResInfoLoaded(arcName, pInfo, infoSize);
|
||||
|
||||
if (resInfo == NULL) {
|
||||
JKRArchive* archive = resInfo->getArchive();
|
||||
u32 fileCount = archive->countFile();
|
||||
return resInfo;
|
||||
}
|
||||
JKRArchive* archive = resInfo->getArchive();
|
||||
u32 fileCount = archive->countFile();
|
||||
|
||||
if (resIdx >= (int)fileCount) {
|
||||
OSReport_Error("<%s.arc> getRes: res index over !! index=%d count=%d\n", arcName,
|
||||
resIdx, fileCount);
|
||||
return NULL;
|
||||
}
|
||||
if (resIdx >= (int)fileCount) {
|
||||
OSReport_Error("<%s.arc> getRes: res index over !! index=%d count=%d\n", arcName,
|
||||
resIdx, fileCount);
|
||||
return NULL;
|
||||
}
|
||||
return resInfo->getRes(resIdx);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void* dRes_control_c::getRes(char const* param_0, s32 param_1, dRes_info_c* param_2,
|
||||
int param_3) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/getRes__14dRes_control_cFPCclP11dRes_info_ci.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8003C37C-8003C400 036CBC 0084+00 0/0 18/18 109/109 .text
|
||||
* getRes__14dRes_control_cFPCcPCcP11dRes_info_ci */
|
||||
// same weird branch issue
|
||||
#ifdef NONMATCHING
|
||||
void* dRes_control_c::getRes(char const* arcName, char const* resName, dRes_info_c* pInfo,
|
||||
int infoSize) {
|
||||
dRes_info_c* resInfo = getResInfoLoaded(arcName, pInfo, infoSize);
|
||||
|
||||
if (resInfo == NULL) {
|
||||
JKRArchive* archive = resInfo->getArchive();
|
||||
JKRArchive::SDIFileEntry* entry = archive->findNameResource(resName);
|
||||
return resInfo;
|
||||
}
|
||||
|
||||
if (entry != NULL) {
|
||||
return resInfo->getRes(entry - archive->mFiles);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
JKRArchive* archive = resInfo->getArchive();
|
||||
JKRArchive::SDIFileEntry* entry = archive->findNameResource(resName);
|
||||
|
||||
if (entry != NULL) {
|
||||
return resInfo->getRes(entry - archive->mFiles);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void* dRes_control_c::getRes(char const* param_0, char const* param_1, dRes_info_c* param_2,
|
||||
int param_3) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/getRes__14dRes_control_cFPCcPCcP11dRes_info_ci.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8003C400-8003C470 036D40 0070+00 0/0 7/7 4/4 .text
|
||||
* getIDRes__14dRes_control_cFPCcUsP11dRes_info_ci */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void* dRes_control_c::getIDRes(char const* param_0, u16 param_1, dRes_info_c* param_2,
|
||||
int param_3) {
|
||||
nofralloc
|
||||
#include "asm/d/d_resorce/getIDRes__14dRes_control_cFPCcUsP11dRes_info_ci.s"
|
||||
void* dRes_control_c::getIDRes(char const* arcName, u16 param_1, dRes_info_c* pInfo, int infoSize) {
|
||||
dRes_info_c* resInfo = getResInfoLoaded(arcName, pInfo, infoSize);
|
||||
|
||||
if (resInfo == NULL) {
|
||||
return resInfo;
|
||||
}
|
||||
|
||||
JKRArchive* archive = resInfo->getArchive();
|
||||
int index = mDoExt_resIDToIndex(archive, param_1);
|
||||
|
||||
if (index < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return resInfo->getRes(index);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8003C470-8003C4E4 036DB0 0074+00 0/0 3/3 0/0 .text syncAllRes__14dRes_control_cFP11dRes_info_ci
|
||||
*/
|
||||
|
||||
+69
-115
@@ -8,65 +8,28 @@
|
||||
#include "d/map/d_map_path_dmap.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "d/d_path.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" void createWork__7dTres_cFv();
|
||||
extern "C" void create__7dTres_cFv();
|
||||
extern "C" void remove__7dTres_cFv();
|
||||
extern "C" void reset__7dTres_cFv();
|
||||
extern "C" void addData__7dTres_cFPQ27dTres_c10list_classSc();
|
||||
extern "C" void checkTreasureBox__7dTres_cFPQ27dTres_c6data_s();
|
||||
extern "C" void onStatus__7dTres_cFUcii();
|
||||
extern "C" void offStatus__7dTres_cFUcii();
|
||||
extern "C" void getBossIconFloorNo__7dTres_cFPi();
|
||||
extern "C" void getFirstData__7dTres_cFUc();
|
||||
extern "C" void getNextData__7dTres_cFPQ27dTres_c15typeGroupData_c();
|
||||
extern "C" void getNextData__7dTres_cFPCQ27dTres_c15typeGroupData_c();
|
||||
extern "C" void setPosition__7dTres_cFiUcPC3Veci();
|
||||
extern "C" void getTypeGroupNoToType__7dTres_cFUc();
|
||||
extern "C" void getTypeToTypeGroupNo__7dTres_cFUc();
|
||||
extern "C" u8 const typeToTypeGroup__7dTres_c[34 + 6 /* padding */];
|
||||
extern "C" u8 mTypeGroupListAll__7dTres_c[204 + 4 /* padding */];
|
||||
extern "C" u8 mTypeGroupData__7dTres_c[4];
|
||||
extern "C" u8 mNum__7dTres_c[2 + 2 /* padding */];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" void mDoMtx_YrotS__FPA4_fs();
|
||||
extern "C" void isDungeonItem__12dSv_memBit_cCFi();
|
||||
extern "C" void isSwitch__10dSv_info_cCFii();
|
||||
extern "C" void correctionOriginPos__10dMapInfo_nFScP3Vec();
|
||||
extern "C" void calcFloorNo__10dMapInfo_cFfbi();
|
||||
extern "C" void dPath_GetRoomPath__Fii();
|
||||
extern "C" void* __nwa__FUl();
|
||||
extern "C" void __construct_new_array();
|
||||
extern "C" void _savegpr_26();
|
||||
extern "C" void _savegpr_27();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _restgpr_26();
|
||||
extern "C" void _restgpr_27();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" u8 now__14mDoMtx_stack_c[48];
|
||||
extern "C" extern bool data_80450680;
|
||||
extern bool data_80450680;
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450F98-80450F9C 000498 0004+00 2/2 0/0 0/0 .sbss mTypeGroupData__7dTres_c */
|
||||
dTres_c::typeGroupData_c* dTres_c::mTypeGroupData;
|
||||
|
||||
/* 8009BBD8-8009BC18 096518 0040+00 0/0 1/1 0/0 .text createWork__7dTres_cFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm int dTres_c::createWork() {
|
||||
nofralloc
|
||||
#include "asm/d/d_tresure/createWork__7dTres_cFv.s"
|
||||
int dTres_c::createWork() {
|
||||
mTypeGroupData = new dTres_c::typeGroupData_c[0x40];
|
||||
return 1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8009BC18-8009BC60 096558 0048+00 0/0 1/1 0/0 .text create__7dTres_cFv */
|
||||
void dTres_c::create() {
|
||||
@@ -82,7 +45,7 @@ void dTres_c::remove() {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80425438-80425508 052158 00CC+04 6/6 3/3 0/0 .bss mTypeGroupListAll__7dTres_c */
|
||||
dTres_c::list_class dTres_c::mTypeGroupListAll[17];
|
||||
dTres_c::type_group_list dTres_c::mTypeGroupListAll[17];
|
||||
|
||||
/* 80450F9C-80450FA0 00049C 0002+02 2/2 0/0 0/0 .sbss mNum__7dTres_c */
|
||||
u16 dTres_c::mNum;
|
||||
@@ -103,88 +66,92 @@ void dTres_c::reset() {
|
||||
|
||||
/* 8009BCB4-8009BE28 0965F4 0174+00 0/0 1/1 0/0 .text addData__7dTres_cFPQ27dTres_c10list_classSc
|
||||
*/
|
||||
#ifdef NONMATCHING
|
||||
void dTres_c::addData(dTres_c::list_class* p_list, s8 roomNo) {
|
||||
if (dStage_stagInfo_GetSTType(i_dComIfGp_getStage()->getStagInfo()) != ST_BOSS_ROOM) {
|
||||
reset();
|
||||
|
||||
typeGroupData_c* listData = p_list->field_0x4;
|
||||
data_s* listData = p_list->field_0x4->getDataPointer();
|
||||
typeGroupData_c* groupData = &mTypeGroupData[mNum];
|
||||
for (int i = 0; i < (int)p_list->field_0x0; i++) {
|
||||
groupData->mData = listData->mData;
|
||||
groupData->mData.mRoomNo = roomNo;
|
||||
groupData->mData.mStatus = 0;
|
||||
for (int i = 0; i < p_list->field_0x0; i++, listData++, groupData++) {
|
||||
*(data_s*)groupData = *listData;
|
||||
groupData->mRoomNo = roomNo;
|
||||
groupData->mStatus = 0;
|
||||
|
||||
u8 typeGroupNo = getTypeToTypeGroupNo(groupData->mData.mType);
|
||||
u32 typeGroupNo = getTypeToTypeGroupNo(groupData->mType);
|
||||
groupData->setNextDataPointer(NULL);
|
||||
groupData->setTypeGroupNo(typeGroupNo);
|
||||
|
||||
list_class* typeGroupList = mTypeGroupListAll + typeGroupNo;
|
||||
type_group_list* typeGroupList = mTypeGroupListAll + typeGroupNo;
|
||||
if (typeGroupList->field_0x0 == NULL) {
|
||||
typeGroupList->field_0x0 = groupData;
|
||||
}
|
||||
|
||||
if (mTypeGroupListAll[i].field_0x4 != NULL) {
|
||||
mTypeGroupListAll[i].field_0x4->setNextDataPointer(groupData);
|
||||
if (typeGroupList->field_0x4 != NULL) {
|
||||
typeGroupList->field_0x4->setNextDataPointer(groupData);
|
||||
}
|
||||
mTypeGroupListAll[i].field_0x4 = groupData;
|
||||
mTypeGroupListAll[i].mNumber++;
|
||||
typeGroupList->field_0x4 = groupData;
|
||||
typeGroupList->mNumber++;
|
||||
|
||||
if ((s32)groupData->mData.mType == 0xFF) {
|
||||
checkTreasureBox(&groupData->mData);
|
||||
switch (groupData->mType) {
|
||||
case 0xFF:
|
||||
checkTreasureBox(groupData);
|
||||
break;
|
||||
}
|
||||
|
||||
mNum++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dTres_c::addData(dTres_c::list_class* param_0, s8 param_1) {
|
||||
nofralloc
|
||||
#include "asm/d/d_tresure/addData__7dTres_cFPQ27dTres_c10list_classSc.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80452BE8-80452BEC 0011E8 0004+00 1/1 0/0 0/0 .sdata2 @3839 */
|
||||
SECTION_SDATA2 static f32 lit_3839 = 182.04444885253906f;
|
||||
|
||||
/* 80452BEC-80452BF0 0011EC 0004+00 1/1 0/0 0/0 .sdata2 @3840 */
|
||||
SECTION_SDATA2 static u8 lit_3840[4] = {
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* 80452BF0-80452BF8 0011F0 0008+00 1/1 0/0 0/0 .sdata2 @3841 */
|
||||
SECTION_SDATA2 static f64 lit_3841 = 0.5;
|
||||
|
||||
/* 80452BF8-80452C00 0011F8 0008+00 1/1 0/0 0/0 .sdata2 @3842 */
|
||||
SECTION_SDATA2 static f64 lit_3842 = 3.0;
|
||||
|
||||
/* 80452C00-80452C08 001200 0008+00 1/1 0/0 0/0 .sdata2 @3843 */
|
||||
SECTION_SDATA2 static u8 lit_3843[8] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/* 80452C08-80452C10 001208 0008+00 1/1 0/0 0/0 .sdata2 @3845 */
|
||||
SECTION_SDATA2 static f64 lit_3845 = 4503601774854144.0 /* cast s32 to float */;
|
||||
|
||||
/* 8009BE28-8009C168 096768 0340+00 1/1 0/0 0/0 .text
|
||||
* checkTreasureBox__7dTres_cFPQ27dTres_c6data_s */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dTres_c::checkTreasureBox(dTres_c::data_s* param_0) {
|
||||
nofralloc
|
||||
#include "asm/d/d_tresure/checkTreasureBox__7dTres_cFPQ27dTres_c6data_s.s"
|
||||
void dTres_c::checkTreasureBox(dTres_c::data_s* param_0) {
|
||||
if (param_0->mSwBit != 0xff && param_0->mArg1 != 0xff){
|
||||
dPath* path = dPath_GetRoomPath(param_0->mArg1, -1);
|
||||
|
||||
if (path == NULL) return;
|
||||
|
||||
if (param_0->mArg2 == 0) {
|
||||
s16 sVar5 = 0;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
int sStack_62;
|
||||
if (dComIfGs_isSwitch(param_0->mSwBit + i, param_0->mRoomNo) != 0) {
|
||||
sStack_62 = (1 << i);
|
||||
} else {
|
||||
sStack_62 = 0;
|
||||
}
|
||||
sVar5 += sStack_62;
|
||||
}
|
||||
if (sVar5 != 0) {
|
||||
s16 uStack_34 = cM_deg2s((sVar5 - 1) * 0x18 + 12);
|
||||
cXyz cStack_48(path->m_points[0].m_position);
|
||||
cXyz cStack_54(path->m_points[path->m_num - 1].m_position);
|
||||
f32 dVar7 = cStack_48.absXZ(cStack_54);
|
||||
cXyz local_60(0.0f, 0.0f, dVar7);
|
||||
mDoMtx_stack_c::YrotS(uStack_34);
|
||||
mDoMtx_stack_c::multVec(&local_60, &local_60);
|
||||
local_60 += cStack_48;
|
||||
local_60.y = cStack_54.y;
|
||||
param_0->mPos = local_60;
|
||||
} else {
|
||||
param_0->mPos = path->m_points[0].m_position;
|
||||
}
|
||||
dMapInfo_n::correctionOriginPos(param_0->mRoomNo, ¶m_0->mPos);
|
||||
} else {
|
||||
dStage_dPnt_c* point;
|
||||
if (dComIfGs_isSwitch(param_0->mSwBit, param_0->mRoomNo)) {
|
||||
point = &path->m_points[path->m_num - 1];
|
||||
} else {
|
||||
point = &path->m_points[0];
|
||||
}
|
||||
|
||||
param_0->mPos = point->m_position;
|
||||
dMapInfo_n::correctionOriginPos(param_0->mRoomNo, ¶m_0->mPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8009C168-8009C1F0 096AA8 0088+00 0/0 0/0 3/3 .text onStatus__7dTres_cFUcii */
|
||||
void dTres_c::onStatus(u8 listIdx, int param_1, int flag) {
|
||||
@@ -203,10 +170,9 @@ void dTres_c::onStatus(u8 listIdx, int param_1, int flag) {
|
||||
}
|
||||
|
||||
/* 8009C1F0-8009C27C 096B30 008C+00 0/0 0/0 3/3 .text offStatus__7dTres_cFUcii */
|
||||
#ifdef NONMATCHING
|
||||
void dTres_c::offStatus(u8 listIdx, int param_1, int flag) {
|
||||
typeGroupData_c* groupData = getFirstData(listIdx);
|
||||
int typeGroupNo = getTypeGroupNumber(listIdx);
|
||||
s32 typeGroupNo = getTypeGroupNumber(listIdx);
|
||||
|
||||
for (int i = 0; i < typeGroupNo; i++) {
|
||||
if (param_1 == groupData->getNo()) {
|
||||
@@ -218,16 +184,6 @@ void dTres_c::offStatus(u8 listIdx, int param_1, int flag) {
|
||||
groupData = getNextData(groupData);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dTres_c::offStatus(u8 param_0, int param_1, int param_2) {
|
||||
nofralloc
|
||||
#include "asm/d/d_tresure/offStatus__7dTres_cFUcii.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8009C27C-8009C360 096BBC 00E4+00 0/0 1/1 0/0 .text getBossIconFloorNo__7dTres_cFPi */
|
||||
int dTres_c::getBossIconFloorNo(int* o_floorNo) {
|
||||
@@ -265,8 +221,7 @@ dTres_c::typeGroupData_c* dTres_c::getFirstData(u8 listIdx) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// this is wrong, fix later
|
||||
return (dTres_c::typeGroupData_c*)mTypeGroupListAll[listIdx].field_0x0;
|
||||
return mTypeGroupListAll[listIdx].field_0x0;
|
||||
}
|
||||
|
||||
/* 8009C39C-8009C3B4 096CDC 0018+00 2/2 3/3 0/0 .text
|
||||
@@ -314,12 +269,11 @@ void dTres_c::setPosition(int dataNo, u8 listIdx, Vec const* i_pos, int i_roomNo
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8037B0D8-8037B100 007738 0022+06 2/2 0/0 0/0 .rodata typeToTypeGroup__7dTres_c */
|
||||
SECTION_RODATA u8 const dTres_c::typeToTypeGroup[17][2] = {
|
||||
u8 const dTres_c::typeToTypeGroup[17][2] = {
|
||||
{0xFF, 0x00}, {0x00, 0x01}, {0x01, 0x02}, {0x02, 0x03}, {0x03, 0x04}, {0x04, 0x05},
|
||||
{0x05, 0x06}, {0x06, 0x07}, {0x07, 0x08}, {0x80, 0x09}, {0x81, 0x0A}, {0x82, 0x0B},
|
||||
{0x83, 0x0C}, {0x84, 0x0D}, {0x85, 0x0E}, {0x87, 0x0F}, {0x88, 0x10},
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x8037B0D8, &dTres_c::typeToTypeGroup);
|
||||
|
||||
/* 8009C49C-8009C4B0 096DDC 0014+00 0/0 1/1 0/0 .text getTypeGroupNoToType__7dTres_cFUc
|
||||
*/
|
||||
|
||||
+308
-43
@@ -8,15 +8,16 @@
|
||||
#include "dolphin/types.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" static void func_8006F168();
|
||||
extern "C" static void func_8006F184();
|
||||
extern "C" static void func_8006F1A4();
|
||||
extern "C" static void func_8006F1D8();
|
||||
extern "C" static void func_8006F168__FPUsUll();
|
||||
extern "C" static void func_8006F184__FUlll();
|
||||
extern "C" static u32 func_8006F1A4__FUlll();
|
||||
extern "C" static void func_8006F1D8__Fll();
|
||||
extern "C" void Run__12dVibration_cFv();
|
||||
extern "C" void StartShock__12dVibration_cFii4cXyz();
|
||||
extern "C" void StartQuake__12dVibration_cFii4cXyz();
|
||||
@@ -63,64 +64,284 @@ extern "C" u8 m_gamePad__8mDoCPd_c[16];
|
||||
|
||||
/* 8006F168-8006F184 069AA8 001C+00 1/1 0/0 0/0 .text makedata__25@unnamed@d_vibration_cpp@FPUsUll
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8006F168() {
|
||||
nofralloc
|
||||
#include "asm/d/d_vibration/func_8006F168.s"
|
||||
static u16* func_8006F168(u16* param_0, u32 param_1, s32 param_2) {
|
||||
param_0[0] = param_2;
|
||||
param_0[1] = param_1 >> 16;
|
||||
param_0[2] = param_1;
|
||||
param_0[3] = 0;
|
||||
return param_0;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8006F184-8006F1A4 069AC4 0020+00 1/1 0/0 0/0 .text rollshift__25@unnamed@d_vibration_cpp@FUlll
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8006F184() {
|
||||
nofralloc
|
||||
#include "asm/d/d_vibration/func_8006F184.s"
|
||||
static s32 func_8006F184(u32 param_0, s32 param_1, s32 param_2) {
|
||||
s32 temp = param_2 / param_1;
|
||||
temp = temp * param_1;
|
||||
temp = param_2 - temp;
|
||||
param_2 = param_0 >> temp;
|
||||
temp = param_1 - temp;
|
||||
temp = param_0 << temp;
|
||||
return param_2 | temp;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8006F1A4-8006F1D8 069AE4 0034+00 2/2 0/0 0/0 .text makebits__25@unnamed@d_vibration_cpp@FUlll
|
||||
*/
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8006F1A4() {
|
||||
nofralloc
|
||||
#include "asm/d/d_vibration/func_8006F1A4.s"
|
||||
static u32 func_8006F1A4(u32 param_0, s32 param_1, s32 param_2) {
|
||||
s32 uVar1 = -1;
|
||||
u32 temp = param_0 & (uVar1 << (32 - param_1));
|
||||
param_0 = temp;
|
||||
uVar1 = param_1;
|
||||
while (uVar1 < param_2) {
|
||||
param_0 = temp | (param_0 >> param_1);
|
||||
uVar1 += param_1;
|
||||
}
|
||||
return param_0;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80452620-80452628 000C20 0008+00 1/1 0/0 0/0 .sdata2 @3756 */
|
||||
SECTION_SDATA2 static f64 lit_3756 = 4503601774854144.0 /* cast s32 to float */;
|
||||
|
||||
/* 8006F1D8-8006F268 069B18 0090+00 1/1 0/0 0/0 .text randombit__25@unnamed@d_vibration_cpp@Fll */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
static asm void func_8006F1D8() {
|
||||
nofralloc
|
||||
#include "asm/d/d_vibration/func_8006F1D8.s"
|
||||
static u32 func_8006F1D8(s32 param_0, s32 param_1) {
|
||||
u32 uVar3 = 0;
|
||||
|
||||
for (s32 iVar2 = 0; iVar2 < param_0; iVar2++) {
|
||||
u32 dVar4 = param_1 * cM_rnd();
|
||||
uVar3 |= 0x40000000 >> dVar4;
|
||||
}
|
||||
return uVar3;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80450F50-80450F58 000450 0008+00 1/1 0/0 0/0 .sbss data$3831 */
|
||||
static u8 data[8];
|
||||
static u16 data[4];
|
||||
|
||||
/* 8006F268-8006FA24 069BA8 07BC+00 0/0 2/2 0/0 .text Run__12dVibration_cFv */
|
||||
// Stack issues
|
||||
#ifdef NONMATCHING
|
||||
int dVibration_c::Run() {
|
||||
|
||||
field_0x8c = 1;
|
||||
if (dComIfGs_checkOptVibration() != 1) {
|
||||
if (field_0x54 != -1) {
|
||||
field_0x54 = -1;
|
||||
field_0x50 |= 1;
|
||||
}
|
||||
if (field_0x70 != -1) {
|
||||
field_0x70 = -1;
|
||||
field_0x6c |= 1;
|
||||
}
|
||||
field_0x80 = -99;
|
||||
field_0x64 = 0xffffff9d;
|
||||
}
|
||||
|
||||
if (((field_0x0.mShock.field_0x0 & 1) != 0) && (field_0x0.mShock.field_0x24 != -99)) {
|
||||
field_0x0.mShock.field_0x24 = 0;
|
||||
field_0x0.mShock.field_0x4 = -1;
|
||||
}
|
||||
if (((field_0x0.mQuake.field_0x0 & 1) != 0) && (field_0x0.mQuake.field_0x24 != -99)) {
|
||||
field_0x0.mQuake.field_0x24 = 0;
|
||||
field_0x0.mQuake.field_0x4 = -1;
|
||||
}
|
||||
|
||||
if (field_0x0.mShock.field_0x24 == 0 || field_0x0.mQuake.field_0x24 == 0) {
|
||||
s32 local_68 = 0;
|
||||
if (field_0x0.mShock.field_0x4 == -1 || (field_0x0.mShock.field_0x0 & 1) != 0) {
|
||||
field_0x0.mShock.field_0x24 = -99;
|
||||
field_0x0.mShock.field_0x8 = 0;
|
||||
field_0x0.mShock.field_0xc = 0;
|
||||
field_0x0.mShock.field_0x10 = 0;
|
||||
} else if (field_0x0.mShock.field_0x24 >= 0) {
|
||||
local_68 |= 1;
|
||||
}
|
||||
|
||||
if (field_0x0.mQuake.field_0x4 == -1 || (field_0x0.mQuake.field_0x0 & 1) != 0) {
|
||||
field_0x0.mQuake.field_0x24 = -99;
|
||||
field_0x0.mQuake.field_0x8 = 0;
|
||||
field_0x0.mQuake.field_0xc = 0;
|
||||
field_0x0.mQuake.field_0x10 = 0;
|
||||
} else if (field_0x0.mQuake.field_0x24 >= 0) {
|
||||
local_68 |= 2;
|
||||
}
|
||||
|
||||
switch (local_68) {
|
||||
case 1:
|
||||
s32 x = field_0x0.mShock.field_0xc;
|
||||
u32 local_60 = field_0x0.mShock.field_0x8;
|
||||
local_60 |= func_8006F1D8(field_0x0.mShock.field_0x10, x);
|
||||
s32 uVar3 = field_0x0.mShock.field_0x14;
|
||||
if (dKy_darkworld_check()) {
|
||||
uVar3 &= ~0x30;
|
||||
}
|
||||
camera_class* pCamera = dComIfGp_getCamera(0);
|
||||
if (pCamera && pCamera->field_0x22f == 0x47) {
|
||||
dCam_getBody()->StartShake(x, (u8*)&local_60, uVar3, field_0x0.mShock.field_0x18.norm());
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
x = field_0x0.mQuake.field_0xc;
|
||||
local_60 = func_8006F184(field_0x0.mQuake.field_0x8, x, field_0x88);
|
||||
local_60 |= func_8006F1D8(field_0x0.mQuake.field_0x10, x);
|
||||
uVar3 = field_0x0.mQuake.field_0x14;
|
||||
if (dKy_darkworld_check()) {
|
||||
uVar3 &= ~0x30;
|
||||
}
|
||||
pCamera = dComIfGp_getCamera(0);
|
||||
if (pCamera && pCamera->field_0x22f == 0x47) {
|
||||
dCam_getBody()->StartShake(x, (u8*)&local_60, uVar3, field_0x0.mQuake.field_0x18.norm());
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
local_60 = field_0x0.mShock.field_0x8 << field_0x0.mShock.field_0x24;
|
||||
x = field_0x0.mShock.field_0xc - field_0x0.mShock.field_0x24;
|
||||
local_60 |= func_8006F184(func_8006F1A4(field_0x0.mQuake.field_0x8, field_0x0.mQuake.field_0xc, x), x, field_0x88);
|
||||
local_60 |= func_8006F1D8(
|
||||
field_0x0.mShock.field_0x10 > field_0x0.mQuake.field_0x10 ? field_0x0.mShock.field_0x10 : field_0x0.mQuake.field_0x10,
|
||||
x
|
||||
);
|
||||
uVar3 = field_0x0.mShock.field_0x14 | field_0x0.mQuake.field_0x14;
|
||||
if (dKy_darkworld_check()) {
|
||||
uVar3 &= ~0x30;
|
||||
}
|
||||
pCamera = dComIfGp_getCamera(0);
|
||||
if (pCamera && pCamera->field_0x22f == 0x47) {
|
||||
cXyz tempSum = field_0x0.mShock.field_0x18 + field_0x0.mQuake.field_0x18;
|
||||
dCam_getBody()->StartShake(x, (u8*)&local_60, uVar3, tempSum.norm());
|
||||
}
|
||||
field_0x0.mQuake.field_0x24 = 0;
|
||||
field_0x0.mShock.field_0x24 = 0;
|
||||
break;
|
||||
default:
|
||||
pCamera = dComIfGp_getCamera(0);
|
||||
if (pCamera && pCamera->field_0x22f == 0x47) {
|
||||
dCam_getBody()->StopShake();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (((field_0x50 & 1) != 0) && (field_0x64 != -99)) {
|
||||
field_0x64 = 0;
|
||||
field_0x54 = -1;
|
||||
}
|
||||
|
||||
if (((field_0x6c & 1) != 0) && (field_0x80 != -99)) {
|
||||
field_0x80 = 0;
|
||||
field_0x70 = -1;
|
||||
}
|
||||
|
||||
if (field_0x64 == 0 || field_0x80 == 0) {
|
||||
s32 local_68 = 0;
|
||||
if (field_0x54 == -1 || (field_0x50 & 1) != 0) {
|
||||
field_0x64 = -99;
|
||||
field_0x58 = 0;
|
||||
field_0x5c = 0;
|
||||
field_0x60 = 0;
|
||||
} else if (field_0x64 >= 0) {
|
||||
local_68 |= 1;
|
||||
}
|
||||
|
||||
if (field_0x70 == -1 || (field_0x6c & 1) != 0) {
|
||||
field_0x80 = -99;
|
||||
field_0x74 = 0;
|
||||
field_0x78 = 0;
|
||||
field_0x7c = 0;
|
||||
} else if (field_0x80 >= 0) {
|
||||
local_68 |= 2;
|
||||
}
|
||||
switch (local_68) {
|
||||
case 1:
|
||||
u32 local_60;
|
||||
s32 x = field_0x5c;
|
||||
local_60 = field_0x58;
|
||||
local_60 |= func_8006F1D8(field_0x60, x);
|
||||
field_0x68 = x;
|
||||
mDoCPd_c::startMotorWave(0, func_8006F168(data, local_60, x), JUTGamePad::CRumble::VAL_0, 0x3c);
|
||||
break;
|
||||
case 2:
|
||||
x = field_0x78;
|
||||
local_60 = func_8006F184(field_0x74, x, field_0x88);
|
||||
local_60 |= func_8006F1D8(field_0x7c, x);
|
||||
field_0x84 = 0x7fffffff;
|
||||
mDoCPd_c::startMotorWave(0, func_8006F168(data, local_60, x), JUTGamePad::CRumble::VAL_1, 0x3c);
|
||||
break;
|
||||
case 3:
|
||||
local_60 = field_0x58 << field_0x64;
|
||||
x = field_0x5c - field_0x64;
|
||||
local_60 |= func_8006F184(func_8006F1A4(field_0x74, field_0x78, x), x, field_0x88);
|
||||
local_60 |= func_8006F1D8(
|
||||
field_0x60 > field_0x7c ? field_0x60 : field_0x7c,
|
||||
x
|
||||
);
|
||||
field_0x84 = x;
|
||||
field_0x68 = x;
|
||||
field_0x80 = 0;
|
||||
field_0x64 = 0;
|
||||
mDoCPd_c::startMotorWave(0, func_8006F168(data, local_60, x), JUTGamePad::CRumble::VAL_0, 0x3c);
|
||||
break;
|
||||
default:
|
||||
mDoCPd_c::stopMotorWave(0);
|
||||
mDoCPd_c::stopMotor(0);
|
||||
field_0x84 = -99;
|
||||
field_0x68 = -99;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
field_0x0.mQuake.field_0x0 = 0;
|
||||
field_0x0.mShock.field_0x0 = 0;
|
||||
field_0x6c = 0;
|
||||
field_0x50 = 0;
|
||||
|
||||
if (field_0x0.mShock.field_0x24 >= 0) {
|
||||
field_0x0.mShock.field_0x24++;
|
||||
|
||||
if (field_0x0.mShock.field_0x24 > field_0x0.mShock.field_0xc) {
|
||||
field_0x0.mShock.field_0x0 |= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (field_0x64 >= 0) {
|
||||
field_0x64++;
|
||||
|
||||
if (field_0x64 > field_0x68) {
|
||||
field_0x50 |= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (field_0x0.mQuake.field_0x24 >= 0) {
|
||||
field_0x0.mQuake.field_0x24++;
|
||||
|
||||
if (field_0x0.mQuake.field_0x24 > field_0x0.mQuake.field_0xc) {
|
||||
field_0x0.mQuake.field_0x24 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (field_0x80 >= 930) {
|
||||
field_0x80 = 0;
|
||||
} else if (field_0x80 >= 900) {
|
||||
mDoCPd_c::stopMotorWave(0);
|
||||
mDoCPd_c::stopMotor(0);
|
||||
field_0x80++;
|
||||
} else if (field_0x80 >= 0) {
|
||||
field_0x80++;
|
||||
if (field_0x80 > field_0x84) {
|
||||
field_0x80 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
field_0x88++;
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dVibration_c::Run() {
|
||||
asm int dVibration_c::Run() {
|
||||
nofralloc
|
||||
#include "asm/d/d_vibration/Run__12dVibration_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8006FA24-8006FB10 06A364 00EC+00 0/0 62/62 298/298 .text StartShock__12dVibration_cFii4cXyz */
|
||||
bool dVibration_c::StartShock(int param_0, int param_1, cXyz param_2) {
|
||||
@@ -170,14 +391,58 @@ bool dVibration_c::StartQuake(int param_0, int param_1, cXyz param_2) {
|
||||
}
|
||||
|
||||
/* 8006FC0C-8006FD94 06A54C 0188+00 0/0 2/2 2/2 .text StartQuake__12dVibration_cFPCUcii4cXyz */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void dVibration_c::StartQuake(u8 const* param_0, int param_1, int param_2, cXyz param_3) {
|
||||
nofralloc
|
||||
#include "asm/d/d_vibration/StartQuake__12dVibration_cFPCUcii4cXyz.s"
|
||||
bool dVibration_c::StartQuake(u8 const* param_0, int param_1, int param_2, cXyz param_3) {
|
||||
int iVar7;
|
||||
int iVar6;
|
||||
int iVar5;
|
||||
int iVar4;
|
||||
bool bVar8 = false;
|
||||
int uVar1 = (param_0[0] << 8) | param_0[1];
|
||||
if (uVar1 >= 9) {
|
||||
iVar7 = 3;
|
||||
} else {
|
||||
iVar7 = 0;
|
||||
}
|
||||
if (uVar1 >= 1) {
|
||||
iVar6 = 2;
|
||||
} else {
|
||||
iVar6 = 0;
|
||||
}
|
||||
|
||||
if (uVar1 >= 0x11) {
|
||||
iVar5 = 4;
|
||||
} else {
|
||||
iVar5 = 0;
|
||||
}
|
||||
if (uVar1 >= 0x19) {
|
||||
iVar4 = 5;
|
||||
} else {
|
||||
iVar4 = 0;
|
||||
}
|
||||
u32 this_00 =
|
||||
param_0[iVar6] << 24 | param_0[iVar7] << 16 | param_0[iVar5] << 8 | (param_0[iVar4]);
|
||||
if ((param_2 & 0x7e) != 0) {
|
||||
field_0x0.mQuake.field_0x4 = 0;
|
||||
field_0x0.mQuake.field_0x24 = 0;
|
||||
field_0x0.mQuake.field_0x14 = param_2;
|
||||
field_0x0.mQuake.field_0x18 = param_3;
|
||||
field_0x0.mQuake.field_0x8 = func_8006F1A4(this_00, param_0[1], 0x20);
|
||||
field_0x0.mQuake.field_0xc = 0x20;
|
||||
field_0x0.mQuake.field_0x10 = param_1;
|
||||
bVar8 = true;
|
||||
}
|
||||
if (((param_2 & 1) != 0) &&
|
||||
(dComIfGs_checkOptVibration() == 1))
|
||||
{
|
||||
field_0x70 = 0;
|
||||
field_0x80 = 0;
|
||||
field_0x74 = func_8006F1A4(this_00, param_0[1], 0x20);
|
||||
field_0x78 = 0x20;
|
||||
field_0x7c = param_1;
|
||||
bVar8 = true;
|
||||
}
|
||||
return bVar8;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 8006FD94-8006FE00 06A6D4 006C+00 0/0 6/6 82/82 .text StopQuake__12dVibration_cFi */
|
||||
int dVibration_c::StopQuake(int param_0) {
|
||||
|
||||
@@ -277,7 +277,7 @@ void dMenu_Fmap_room_data_c::buildTresTypeGroup(int param_0, int param_1, int pa
|
||||
dTres_c::list_class* tresure_p = mp_fmapData->getTresure();
|
||||
if (tresure_p != NULL) {
|
||||
int num = tresure_p->field_0x0;
|
||||
dTres_c::data_s* data_p = tresure_p->field_0x4;
|
||||
dTres_c::data_s* data_p = tresure_p->field_0x4->getDataPointer();
|
||||
|
||||
if (mp_fmpTresTypeGroupDataListAll == NULL) {
|
||||
mp_fmpTresTypeGroupDataListAll = new fmpTresTypeGroupDataListAll_c();
|
||||
|
||||
+18
-37
@@ -107,11 +107,9 @@ bool dMeterMap_c::isEnableDispMap() {
|
||||
}
|
||||
|
||||
/* 8020D528-8020D650 207E68 0128+00 3/3 0/0 0/0 .text getMapDispSizeTypeNo__11dMeterMap_cFv */
|
||||
// stayNo load block in wrong order
|
||||
#ifdef NONMATCHING
|
||||
int dMeterMap_c::getMapDispSizeTypeNo() {
|
||||
int uvar6 = 7;
|
||||
int stayNo = dComIfGp_roomControl_getStayNo();
|
||||
s32 stayNo = dComIfGp_roomControl_getStayNo();
|
||||
|
||||
dStage_FileList_dt_c* fList =
|
||||
dComIfGp_roomControl_getStatusRoomDt(stayNo)->mRoomDt.getFileListInfo();
|
||||
@@ -155,16 +153,6 @@ int dMeterMap_c::getMapDispSizeTypeNo() {
|
||||
|
||||
return mapDispSizeType;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm int dMeterMap_c::getMapDispSizeTypeNo() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter_map/getMapDispSizeTypeNo__11dMeterMap_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8020D650-8020D690 207F90 0040+00 5/5 3/3 0/0 .text
|
||||
* isEnableDispMapAndMapDispSizeTypeNo__11dMeterMap_cFv */
|
||||
@@ -277,17 +265,17 @@ SECTION_SDATA2 static f32 lit_4159 = -36.0f;
|
||||
|
||||
/* 8020D7EC-8020D874 20812C 0088+00 2/2 0/0 0/0 .text getDispPosOutSide_OffsetX__11dMeterMap_cFv
|
||||
*/
|
||||
// calculation order is wrong
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
s16 dMeterMap_c::getDispPosOutSide_OffsetX() {
|
||||
f32 dvar3 = -36.0f - mSizeW;
|
||||
f32 tmp = 0.0f;
|
||||
f32 offset = 0.0f;
|
||||
if (mMap != NULL) {
|
||||
tmp = (mMap->getTexelPerCm() * mMap->getPackX()) +
|
||||
(mMap->getRightEdgePlus() + (mMap->getTexelPerCm() * mMap->getPackPlusZ()));
|
||||
tmp += dvar3;
|
||||
offset = mMap->getTexelPerCm() * mMap->getPackX();
|
||||
offset +=(mMap->getRightEdgePlus() + (mMap->getTexelPerCm() * mMap->getPackPlusZ()));
|
||||
}
|
||||
return tmp - getMapDispEdgeLeftX_Layout();
|
||||
dvar3 += offset;
|
||||
return dvar3 - getMapDispEdgeLeftX_Layout();
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
@@ -474,7 +462,7 @@ SECTION_DEAD static char const* const stringBase_80398208 = "F_SP115";
|
||||
#pragma pop
|
||||
|
||||
/* 8020DCE4-8020DF1C 208624 0238+00 0/0 1/1 0/0 .text _move__11dMeterMap_cFUl */
|
||||
// just regalloc
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
void dMeterMap_c::_move(u32 param_0) {
|
||||
if (!field_0x2b && i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[118])) {
|
||||
@@ -485,7 +473,7 @@ void dMeterMap_c::_move(u32 param_0) {
|
||||
dMeter2Info_setPauseStatus(2);
|
||||
}
|
||||
}
|
||||
int stayNo = dComIfGp_roomControl_getStayNo();
|
||||
s32 stayNo = dComIfGp_roomControl_getStayNo();
|
||||
|
||||
field_0x14 = param_0;
|
||||
field_0x2a = checkMoveStatus();
|
||||
@@ -654,30 +642,23 @@ asm void dMeterMap_c::ctrlShowMap() {
|
||||
#endif
|
||||
|
||||
/* 8020E45C-8020E4C8 208D9C 006C+00 1/1 0/0 0/0 .text checkMoveStatus__11dMeterMap_cFv */
|
||||
// field_0x2d compare is weird
|
||||
#ifdef NONMATCHING
|
||||
u8 dMeterMap_c::checkMoveStatus() {
|
||||
u8 rv;
|
||||
if (isShow(field_0x14)) {
|
||||
if (isEnableDispMapAndMapDispSizeTypeNo()) {
|
||||
if (isDispPosInsideFlg()) {
|
||||
return 1;
|
||||
rv = 1;
|
||||
} else {
|
||||
rv = 2;
|
||||
}
|
||||
return 2;
|
||||
} else {
|
||||
rv = 3;
|
||||
}
|
||||
return 3;
|
||||
} else {
|
||||
rv = 0;
|
||||
}
|
||||
return 0;
|
||||
return rv;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm u8 dMeterMap_c::checkMoveStatus() {
|
||||
nofralloc
|
||||
#include "asm/d/meter/d_meter_map/checkMoveStatus__11dMeterMap_cFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 8020E4C8-8020E620 208E08 0158+00 2/2 0/0 0/0 .text isShow__11dMeterMap_cFUl */
|
||||
// extra gameinfo label load for dComIfGp_event_checkHind
|
||||
|
||||
@@ -793,11 +793,10 @@ void COutFont_c::reset(J2DTextBox* p_textBox) {
|
||||
|
||||
/* 80228490-80228530 222DD0 00A0+00 1/1 0/0 0/0 .text setBlendAnime__10COutFont_cFP10J2DPictures
|
||||
*/
|
||||
// regalloc
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
void COutFont_c::setBlendAnime(J2DPicture* param_0, s16 param_1) {
|
||||
s32 iVar5 = param_1;
|
||||
iVar5 = 0x14 - iVar5 / 0x14 * 0x14;
|
||||
int iVar5 = param_1 % 0x14;
|
||||
if (iVar5 < 10) {
|
||||
f32 dVar6 = fopMsgM_valueIncrease(10, iVar5, 0);
|
||||
param_0->setBlendRatio(1.0f - dVar6, dVar6);
|
||||
|
||||
@@ -543,7 +543,7 @@ static int phase_1(dScnLogo_c* logo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
dComIfG_setObjectRes("LogoUs", 0, logo->field_0x1d0);
|
||||
dComIfG_setObjectRes("LogoUs", (u8)0, logo->field_0x1d0);
|
||||
mDoRst::setLogoScnFlag(1);
|
||||
archiveHeap->dump_sort();
|
||||
return 2;
|
||||
@@ -638,10 +638,10 @@ void dScnLogo_c::logoInitGC() {
|
||||
|
||||
/* 80257FEC-80258420 25292C 0434+00 1/1 0/0 0/0 .text dvdDataLoad__10dScnLogo_cFv */
|
||||
void dScnLogo_c::dvdDataLoad() {
|
||||
dComIfG_setObjectRes("Always", 0, NULL);
|
||||
dComIfG_setObjectRes("Always", (u8)0, NULL);
|
||||
archiveHeap->dump_sort();
|
||||
|
||||
dComIfG_setObjectRes("Alink", 0, NULL);
|
||||
dComIfG_setObjectRes("Alink", (u8)0, NULL);
|
||||
|
||||
mpField0Command = mDoDvdThd_mountXArchive_c::create(
|
||||
"/res/FieldMap/Field0.arc", 0, JKRArchive::MOUNT_ARAM, mDoExt_getJ2dHeap());
|
||||
|
||||
@@ -109,7 +109,7 @@ dSn_HIO_c::dSn_HIO_c() {
|
||||
/* 802587A4-80258820 2530E4 007C+00 1/0 0/0 0/0 .text phase_1__FPc */
|
||||
static s32 phase_1(char* resName) {
|
||||
mDoAud_bgmStart(-1);
|
||||
if (dComIfG_setObjectRes(resName, 0, NULL) == 0) {
|
||||
if (dComIfG_setObjectRes(resName, (u8)0, NULL) == 0) {
|
||||
return 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -771,9 +771,9 @@ static int phase_1_0(dScnPly_c* param_0) {
|
||||
return cPhs_ZERO_e;
|
||||
} else {
|
||||
dStage_infoCreate();
|
||||
dComIfG_setObjectRes("Event", 0, NULL);
|
||||
dComIfG_setObjectRes("Event", (u8)0, NULL);
|
||||
dComIfGp_setCameraParamFileName(0, camparamarc);
|
||||
dComIfG_setObjectRes("CamParam", 0, NULL);
|
||||
dComIfG_setObjectRes("CamParam", (u8)0, NULL);
|
||||
return cPhs_TWO_e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user