mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_a_obj_lv4floor OK / d_stage wip and cleanup
This commit is contained in:
+18
-2
@@ -223,7 +223,10 @@ public:
|
||||
/* 0x1C */ s16 field_0x1c;
|
||||
}; // Size: 0x20
|
||||
|
||||
struct dStage_MemoryMap_c {};
|
||||
struct dStage_MemoryMap_c {
|
||||
/* 0x0 */ int m_num;
|
||||
/* 0x4 */ u32* field_0x4;
|
||||
};
|
||||
|
||||
struct dPath;
|
||||
struct dStage_dPath_c {
|
||||
@@ -300,7 +303,15 @@ struct dStage_Elst_c {
|
||||
/* 0x4 */ unkData* field_0x4;
|
||||
};
|
||||
|
||||
struct dStage_MemoryConfig_c {};
|
||||
struct dStage_MemoryConfig_data {
|
||||
/* 0x0 */ u8 m_roomNo;
|
||||
/* 0x1 */ u8 m_blockID;
|
||||
}; // Size: 0x2
|
||||
|
||||
struct dStage_MemoryConfig_c {
|
||||
/* 0x0 */ int m_num;
|
||||
/* 0x4 */ dStage_MemoryConfig_data* field_0x4;
|
||||
};
|
||||
|
||||
struct dStage_DMap_c {
|
||||
// DMAP
|
||||
@@ -791,6 +802,11 @@ public:
|
||||
static u32 getProcID() { return mProcID; }
|
||||
static void setStatusProcID(int i_roomNo, unsigned int i_id) { mStatus[i_roomNo].mProcID = i_id; }
|
||||
static int getStatusProcID(int i_roomNo) { return mStatus[i_roomNo].mProcID; }
|
||||
|
||||
static void setMemoryBlockID(int i_roomNo, int i_blockID) {
|
||||
mStatus[i_roomNo].mMemBlockID = i_blockID;
|
||||
}
|
||||
|
||||
static void setFileList2(int i_roomNo, dStage_FileList2_dt_c* list) {
|
||||
mStatus[i_roomNo].mRoomDt.mFileList2Info = list;
|
||||
}
|
||||
|
||||
+13
-13
@@ -8,40 +8,40 @@
|
||||
class dDrawPath_c : public dDlst_base_c {
|
||||
public:
|
||||
struct line_class {
|
||||
/* 0x00 */ u8 unk0;
|
||||
/* 0x01 */ u8 unk1;
|
||||
/* 0x02 */ u8 unk2;
|
||||
/* 0x03 */ u8 unk3;
|
||||
/* 0x04 */ u16* unk4;
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
/* 0x01 */ u8 field_0x1;
|
||||
/* 0x02 */ u8 mDataNum;
|
||||
/* 0x03 */ u8 field_0x3;
|
||||
/* 0x04 */ u16* mpData;
|
||||
}; // Size: 0x8
|
||||
|
||||
struct poly_class {
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
/* 0x01 */ u8 field_0x1;
|
||||
/* 0x04 */ u16* field_0x4;
|
||||
/* 0x01 */ u8 mDataNum;
|
||||
/* 0x04 */ u16* mpData;
|
||||
}; // Size: 0x8
|
||||
|
||||
struct group_class {
|
||||
/* 0x00 */ u8 field_0x0;
|
||||
/* 0x01 */ u8 field_0x1;
|
||||
/* 0x02 */ u8 field_0x2;
|
||||
/* 0x02 */ u8 mLineNum;
|
||||
/* 0x03 */ u8 field_0x3;
|
||||
/* 0x04 */ u8 field_0x4;
|
||||
/* 0x04 */ u8 mPolyNum;
|
||||
/* 0x08 */ dDrawPath_c::line_class* mpLine;
|
||||
/* 0x0C */ u8 field_0xc[4];
|
||||
/* 0x10 */ dDrawPath_c::poly_class* mpPoly;
|
||||
}; // Size: 0x14
|
||||
|
||||
struct floor_class {
|
||||
/* 0x0 */ s8 field_0x0;
|
||||
/* 0x1 */ u8 field_0x1;
|
||||
/* 0x0 */ s8 mFloorNo;
|
||||
/* 0x1 */ u8 mGroupNum;
|
||||
/* 0x4 */ dDrawPath_c::group_class* mpGroup;
|
||||
}; // Size: 0x8
|
||||
|
||||
struct room_class {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x0 */ u8 mFloorNum;
|
||||
/* 0x4 */ dDrawPath_c::floor_class* mpFloor;
|
||||
/* 0x8 */ void* field_0x8;
|
||||
/* 0x8 */ f32* mpFloatData; // might be Vec or cXyz instead
|
||||
};
|
||||
|
||||
/* 8003CB00 */ void rendering(dDrawPath_c::group_class const*);
|
||||
|
||||
@@ -1,6 +1,161 @@
|
||||
#ifndef D_MAP_D_MAP_PATH_FMAP_H
|
||||
#define D_MAP_D_MAP_PATH_FMAP_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "d/map/d_map_path.h"
|
||||
#include "d/d_tresure.h"
|
||||
#include "d/d_stage.h"
|
||||
|
||||
class fmpTresTypeGroupData_c {
|
||||
public:
|
||||
fmpTresTypeGroupData_c() {
|
||||
mpTresData = NULL;
|
||||
mpNext = NULL;
|
||||
}
|
||||
|
||||
/* 8003EB70 */ ~fmpTresTypeGroupData_c();
|
||||
|
||||
void setTypeGroupNo(u8 i_no) { mTypeGroupNo = i_no; }
|
||||
void setNextData(fmpTresTypeGroupData_c* i_next) { mpNext = i_next; }
|
||||
void setTresData(const dTres_c::data_s* i_data) { mpTresData = i_data; }
|
||||
const dTres_c::data_s* getTresData() { return mpTresData; }
|
||||
fmpTresTypeGroupData_c* getNextData() { return mpNext; }
|
||||
|
||||
/* 0x0 */ const dTres_c::data_s* mpTresData;
|
||||
/* 0x0 */ fmpTresTypeGroupData_c* mpNext;
|
||||
/* 0x8 */ u8 mTypeGroupNo;
|
||||
}; // Size: 0xC
|
||||
|
||||
class fmpTresTypeGroupDataList_c {
|
||||
public:
|
||||
/* 8003D790 */ void addTypeGroupData(u8, dTres_c::data_s const*);
|
||||
/* 8003EB10 */ ~fmpTresTypeGroupDataList_c();
|
||||
/* 8003EC90 */ fmpTresTypeGroupDataList_c();
|
||||
|
||||
/* 0x0 */ fmpTresTypeGroupData_c* mpTypeGroupDataHead;
|
||||
/* 0x4 */ fmpTresTypeGroupData_c* mpNextData;
|
||||
};
|
||||
|
||||
class fmpTresTypeGroupDataListAll_c {
|
||||
public:
|
||||
void addTypeGroupData(u8 i_typeGroupNo, const dTres_c::data_s* i_data) {
|
||||
mpTypeGroupData[i_typeGroupNo].addTypeGroupData(i_typeGroupNo, i_data);
|
||||
}
|
||||
|
||||
/* 0x0 */ fmpTresTypeGroupDataList_c mpTypeGroupData[17];
|
||||
};
|
||||
|
||||
class dMenu_Fmap_data_c {
|
||||
public:
|
||||
dTres_c::list_class* getTresure() { return mp_tresure; }
|
||||
f32 getFilelist2MinX() { return m_fileList2->mLeftRmX; }
|
||||
f32 getFilelist2MinZ() { return m_fileList2->mInnerRmZ; }
|
||||
f32 getFilelist2MaxX() { return m_fileList2->mRightRmX; }
|
||||
f32 getFilelist2MaxZ() { return m_fileList2->mFrontRmZ; }
|
||||
|
||||
void setFileList2(dStage_FileList2_dt_c* i_fileList) { m_fileList2 = i_fileList; }
|
||||
void setTresure(dTres_c::list_class* i_list) { mp_tresure = i_list; }
|
||||
void setMapPath(dDrawPath_c::room_class* i_path) { mp_mapPath = i_path; }
|
||||
|
||||
/* 0x0 */ dTres_c::list_class* mp_tresure;
|
||||
/* 0x4 */ dStage_FileList2_dt_c* m_fileList2;
|
||||
/* 0x8 */ dDrawPath_c::room_class* mp_mapPath;
|
||||
/* 0xC */ void* mp_dzsData;
|
||||
};
|
||||
|
||||
class dMenu_Fmap_stage_data_c;
|
||||
class dMenu_Fmap_room_data_c {
|
||||
public:
|
||||
/* 8003D818 */ bool isArrival();
|
||||
/* 8003D868 */ void buildTresTypeGroup(int, int, int);
|
||||
/* 8003D92C */ void buildFmapRoomData(int, int, f32, f32, f32, f32);
|
||||
|
||||
f32 getFileList2MinX() { return mp_fmapData->getFilelist2MinX(); }
|
||||
f32 getFileList2MinZ() { return mp_fmapData->getFilelist2MinZ(); }
|
||||
f32 getFileList2MaxX() { return mp_fmapData->getFilelist2MaxX(); }
|
||||
f32 getFileList2MaxZ() { return mp_fmapData->getFilelist2MaxZ(); }
|
||||
dMenu_Fmap_room_data_c* getNextData() { return mp_nextData; }
|
||||
int getRoomNo() { return m_roomNo; }
|
||||
|
||||
/* 0x00 */ dMenu_Fmap_data_c* mp_fmapData;
|
||||
/* 0x04 */ fmpTresTypeGroupDataListAll_c* mp_fmpTresTypeGroupDataListAll;
|
||||
/* 0x08 */ dMenu_Fmap_room_data_c* mp_nextData;
|
||||
/* 0x0C */ dMenu_Fmap_stage_data_c* mp_parentStage;
|
||||
/* 0x10 */ u8 m_roomNo;
|
||||
};
|
||||
|
||||
class dMenu_Fmap_stage_arc_data_c {
|
||||
public:
|
||||
u8 getVisitedRoomSaveTableNo() { return mVisitedRoomSaveTableNo; }
|
||||
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x1 */ u8 mSaveTableNo;
|
||||
/* 0x2 */ u8 mVisitedRoomSaveTableNo;
|
||||
};
|
||||
|
||||
class dMenu_Fmap_stage_data_c {
|
||||
public:
|
||||
/* 8003D95C */ bool isArrival();
|
||||
/* 8003D9D8 */ int buildFmapStageData(int, f32, f32);
|
||||
|
||||
dMenu_Fmap_stage_arc_data_c* getStageArc() { return mpStageArc; }
|
||||
dMenu_Fmap_stage_data_c* getNextData() { return mpNextData; }
|
||||
|
||||
/* 0x00 */ char name[8];
|
||||
/* 0x08 */ dMenu_Fmap_stage_arc_data_c* mpStageArc;
|
||||
/* 0x0C */ dMenu_Fmap_room_data_c* mp_roomTop;
|
||||
/* 0x10 */ dMenu_Fmap_stage_data_c* mpNextData;
|
||||
/* 0x14 */ f32 m_offsetX;
|
||||
/* 0x18 */ f32 m_offsetZ;
|
||||
/* 0x1C */ f32 m_stageMinX;
|
||||
/* 0x20 */ f32 m_stageMinZ;
|
||||
/* 0x24 */ f32 m_stageMaxX;
|
||||
/* 0x28 */ f32 m_stageMaxZ;
|
||||
/* 0x2C */ int m_stageCntNo;
|
||||
};
|
||||
|
||||
class dMenu_Fmap_region_data_c {
|
||||
public:
|
||||
/* 8003DB48 */ dMenu_Fmap_stage_data_c* getMenuFmapStageData(int);
|
||||
/* 8003DB70 */ void getPointStagePathInnerNo(f32, f32, int, int*, int*);
|
||||
/* 8003DEE0 */ void buildFmapRegionData(int);
|
||||
|
||||
/* 0x00 */ dMenu_Fmap_stage_data_c* mpMenuFmapStageDataTop;
|
||||
/* 0x04 */ dMenu_Fmap_region_data_c* mpNextData;
|
||||
/* 0x08 */ f32 mRegionOffsetX;
|
||||
/* 0x0C */ f32 mRegionOffsetZ;
|
||||
/* 0x10 */ f32 mRegionMinX;
|
||||
/* 0x14 */ f32 mRegionMaxX;
|
||||
/* 0x18 */ f32 mRegionMinZ;
|
||||
/* 0x1C */ f32 mRegionMaxZ;
|
||||
/* 0x20 */ int mRegionNo;
|
||||
};
|
||||
|
||||
struct dMenu_Fmap_world_data_c {
|
||||
/* 8003E028 */ void create(dMenu_Fmap_region_data_c*);
|
||||
/* 8003E04C */ void buildFmapWorldData();
|
||||
|
||||
/* 0x00 */ dMenu_Fmap_region_data_c* mp_fmapRegionData;
|
||||
/* 0x04 */ f32 m_worldMinX;
|
||||
/* 0x08 */ f32 m_worldMinZ;
|
||||
/* 0x0C */ f32 m_worldMaxX;
|
||||
/* 0x10 */ f32 m_worldMaxZ;
|
||||
};
|
||||
|
||||
struct dMenuFmapIconPointer_c {
|
||||
/* 8003E114 */ void init(dMenu_Fmap_region_data_c*, dMenu_Fmap_stage_data_c*, u8, int, int);
|
||||
/* 8003E1C0 */ void getFirstData();
|
||||
/* 8003E2BC */ void getData();
|
||||
/* 8003E350 */ void getFirstRoomData();
|
||||
/* 8003E37C */ void getNextRoomData();
|
||||
/* 8003E3A4 */ void getNextStageData();
|
||||
/* 8003E3D8 */ void getNextData();
|
||||
/* 8003E490 */ void nextData();
|
||||
/* 8003E510 */ void getValidData();
|
||||
};
|
||||
|
||||
struct dMenuFmapIconDisp_c {
|
||||
/* 8003E578 */ void getPosition(int*, int*, f32*, f32*, dTres_c::data_s const**);
|
||||
/* 8003E6E8 */ void isDrawDisp();
|
||||
};
|
||||
|
||||
#endif /* D_MAP_D_MAP_PATH_FMAP_H */
|
||||
|
||||
@@ -1,6 +1,39 @@
|
||||
#ifndef D_A_OBJ_LV4FLOOR_H
|
||||
#define D_A_OBJ_LV4FLOOR_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "d/bg/d_bg_s_movebg_actor.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
class daObjLv4Floor_c : public dBgS_MoveBgActor {
|
||||
public:
|
||||
enum Action_e {
|
||||
MODE_WAIT_e,
|
||||
MODE_MOVE_e,
|
||||
MODE_DEAD_e,
|
||||
};
|
||||
|
||||
/* 80C677F8 */ void initBaseMtx();
|
||||
/* 80C67834 */ void setBaseMtx();
|
||||
/* 80C67944 */ int create1st();
|
||||
/* 80C67A30 */ void action();
|
||||
/* 80C67AD4 */ void mode_wait();
|
||||
/* 80C67B28 */ void mode_init_move();
|
||||
/* 80C67B40 */ void mode_move();
|
||||
/* 80C67BA8 */ void mode_init_dead();
|
||||
/* 80C67BB4 */ void mode_dead();
|
||||
|
||||
/* 80C678D4 */ virtual int CreateHeap();
|
||||
/* 80C678B0 */ virtual int Create();
|
||||
/* 80C679E4 */ virtual int Execute(f32 (**)[3][4]);
|
||||
/* 80C67BD4 */ virtual int Draw();
|
||||
/* 80C67C78 */ virtual int Delete();
|
||||
|
||||
u8 getSwbit() { return fopAcM_GetParamBit(this, 0, 8) & 0xFF; }
|
||||
|
||||
/* 0x5A0 */ request_of_phase_process_class mPhase;
|
||||
/* 0x5A8 */ J3DModel* mpModel;
|
||||
/* 0x5AC */ f32 mMoveYPos;
|
||||
/* 0x5B0 */ u8 mAction;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_LV4FLOOR_H */
|
||||
|
||||
@@ -8,12 +8,10 @@ M534_MAP := $(BUILD_DIR)/rel/d/a/obj/d_a_obj_lv4floor.map
|
||||
|
||||
M534_CPP_FILES := \
|
||||
rel/executor.cpp \
|
||||
rel/d/a/obj/d_a_obj_lv4floor/unknown_translation_unit_bss.cpp \
|
||||
rel/d/a/obj/d_a_obj_lv4floor/d_a_obj_lv4floor.cpp \
|
||||
|
||||
M534_O_FILES := \
|
||||
$(BUILD_DIR)/rel/executor.o \
|
||||
$(BUILD_DIR)/rel/d/a/obj/d_a_obj_lv4floor/unknown_translation_unit_bss.o \
|
||||
$(BUILD_DIR)/rel/d/a/obj/d_a_obj_lv4floor/d_a_obj_lv4floor.o \
|
||||
|
||||
M534_LIBS := \
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,27 +0,0 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: unknown_translation_unit_bss
|
||||
//
|
||||
|
||||
#include "rel/d/a/obj/d_a_obj_lv4floor/unknown_translation_unit_bss.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" extern u8 data_80C67E80[4];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80C67E80-80C67E84 000000 0004+00 0/0 1/1 0/0 .bss None */
|
||||
extern u8 data_80C67E80[4];
|
||||
u8 data_80C67E80[4];
|
||||
+108
-85
@@ -13,7 +13,6 @@
|
||||
#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"
|
||||
@@ -22,6 +21,7 @@
|
||||
#include "dolphin/os/OS.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "global.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
@@ -257,15 +257,15 @@ static void setAlpha(J3DModelData* pModelData) {
|
||||
/* ############################################################################################## */
|
||||
/* 80379840-803798A4 005EA0 0064+00 2/2 0/0 0/0 .rodata l_texMtxInfo */
|
||||
SECTION_RODATA static const J3DTexMtxInfo l_texMtxInfo = {
|
||||
0x00,
|
||||
0x08,
|
||||
0x00,
|
||||
0x08,
|
||||
{0.5f, 0.5f, 0.0f},
|
||||
{ 0.1f, 0.1f, 0, 0.0f, 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 },
|
||||
{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},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -384,7 +384,8 @@ void dRes_info_c::offWarpMaterial(J3DModelData* modelData) {
|
||||
|
||||
/* 8003AD08-8003AE14 035648 010C+00 0/0 1/1 0/0 .text
|
||||
* setWarpSRT__11dRes_info_cFP12J3DModelDataRC4cXyzff */
|
||||
void dRes_info_c::setWarpSRT(J3DModelData* modelData, cXyz const& param_1, f32 translationX, f32 translationY) {
|
||||
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();
|
||||
@@ -416,72 +417,80 @@ SECTION_DATA static void* lit_4017[8] = {
|
||||
*/
|
||||
// regalloc
|
||||
#ifdef NONMATCHING
|
||||
J3DModelData* dRes_info_c::loaderBasicBmd(u32 param_1, void* param_2) {
|
||||
u32 pvVar5 = 0x59020010;
|
||||
J3DModelData* dRes_info_c::loaderBasicBmd(u32 i_type, void* i_data) {
|
||||
u32 flags = 0x59020010;
|
||||
J3DMaterial* pMaterial;
|
||||
J3DModelData* modelData;
|
||||
J3DModelData* modelData;
|
||||
u8 lightMask;
|
||||
if (param_1 == 'BMDE' || param_1 == 'BMDV') {
|
||||
pvVar5 |= 0x20;
|
||||
} else if (param_1 == 'BMWR' || param_1 == 'BMWE') {
|
||||
pvVar5 ^= 0x60020;
|
||||
|
||||
if (i_type == 'BMDE' || i_type == 'BMDV') {
|
||||
flags |= 0x20;
|
||||
} else if (i_type == 'BMWR' || i_type == 'BMWE') {
|
||||
flags ^= 0x60020;
|
||||
}
|
||||
modelData = (J3DModelData*)J3DModelLoaderDataBase::load(param_2, pvVar5);
|
||||
|
||||
modelData = (J3DModelData*)J3DModelLoaderDataBase::load(i_data, flags);
|
||||
if (modelData == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((param_1 == 'BMDE' || param_1 == 'BMDV') || param_1 == 'BMWE') {
|
||||
if (i_type == 'BMDE' || i_type == 'BMDV' || i_type == '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;
|
||||
lightMask &= 0x4;
|
||||
break;
|
||||
case 2:
|
||||
lightMask &= 0xc;
|
||||
lightMask &= 0xC;
|
||||
break;
|
||||
case 3:
|
||||
lightMask &= 0xd;
|
||||
lightMask &= 0xD;
|
||||
break;
|
||||
case 4:
|
||||
lightMask &= 0xf;
|
||||
lightMask &= 0xF;
|
||||
break;
|
||||
case 5:
|
||||
lightMask &= 0x1f;
|
||||
lightMask &= 0x1F;
|
||||
break;
|
||||
case 6:
|
||||
lightMask &= 0x3f;
|
||||
lightMask &= 0x3F;
|
||||
break;
|
||||
case 7:
|
||||
lightMask &= 0x7f;
|
||||
lightMask &= 0x7F;
|
||||
}
|
||||
|
||||
pMaterial->getColorBlock()->getColorChan(0)->setLightMask(lightMask);
|
||||
pMaterial->change();
|
||||
J3DMaterialAnm* local_38 = new J3DMaterialAnm();
|
||||
if (local_38 == NULL) {
|
||||
|
||||
J3DMaterialAnm* material_anm = new J3DMaterialAnm();
|
||||
if (material_anm == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
pMaterial->setMaterialAnm(local_38);
|
||||
|
||||
pMaterial->setMaterialAnm(material_anm);
|
||||
}
|
||||
|
||||
setIndirectTex(modelData);
|
||||
if ((param_1 == 'BMWR') || (param_1 == 'BMWE')) {
|
||||
if (i_type == 'BMWR' || i_type == 'BMWE') {
|
||||
addWarpMaterial(modelData);
|
||||
}
|
||||
if ((param_1 == 'BMDR') || (param_1 == 'BMWR')) {
|
||||
|
||||
if (i_type == 'BMDR' || i_type == 'BMWR') {
|
||||
if (modelData->newSharedDisplayList(0x40000) == 0) {
|
||||
modelData->simpleCalcMaterial(0, (float (*)[4])j3dDefaultMtx);
|
||||
modelData->simpleCalcMaterial(0, (MtxP)j3dDefaultMtx);
|
||||
modelData->makeSharedDL();
|
||||
} else {
|
||||
modelData = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return modelData;
|
||||
}
|
||||
#else
|
||||
@@ -661,14 +670,14 @@ SECTION_DEAD static char const* const stringBase_80379912 = "<%s> res == NULL !!
|
||||
// J3DXXX ctor/dtor inlines
|
||||
#ifdef NONMATCHING
|
||||
int dRes_info_c::loadResource() {
|
||||
s32 pJVar4 = mArchive->countFile();
|
||||
mRes = new void*[pJVar4];
|
||||
s32 file_num = mArchive->countFile();
|
||||
mRes = new void*[file_num];
|
||||
if (mRes == NULL) {
|
||||
OSReport_Error("<%s.arc> setRes: res pointer buffer nothing !!\n", this);
|
||||
OSReport_Error("<%s.arc> setRes: res pointer buffer nothing !!\n", mArchiveName);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < pJVar4; i++) {
|
||||
for (int i = 0; i < file_num; i++) {
|
||||
mRes[i] = NULL;
|
||||
}
|
||||
JKRArchive::SDIDirEntry* node = mArchive->mNodes;
|
||||
@@ -678,52 +687,60 @@ int dRes_info_c::loadResource() {
|
||||
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;
|
||||
OSReport_Error(
|
||||
"<%s> res == NULL !!\n",
|
||||
mArchive->mStringTable +
|
||||
(mArchive->findIdxResource(firstFileIndex)->type_flags_and_name_offset &
|
||||
0xFFFFFF));
|
||||
} else if (nodeType == 'ARC ') {
|
||||
JKRArchive::SDIFileEntry* entry = mArchive->findIdxResource(firstFileIndex);
|
||||
|
||||
const char* name_p = mArchive->mStringTable + entry->getNameOffset();
|
||||
size_t resNameLen = strlen(name_p) - 4;
|
||||
char arc_name[9];
|
||||
strncpy(arc_name, name_p, resNameLen);
|
||||
arc_name[resNameLen] = '\0';
|
||||
|
||||
JKRHeap* parentHeap = JKRHeap::findFromRoot(JKRHeap::getCurrentHeap());
|
||||
if (parentHeap == (JKRHeap*)mDoExt_getGameHeap()) {
|
||||
parentHeap = NULL;
|
||||
}
|
||||
dComIfG_setObjectRes(aJStack_24, result, fileEntry->data_size);
|
||||
|
||||
dComIfG_setObjectRes(arc_name, result, entry->data_size);
|
||||
} else if (nodeType == 'BMDP') {
|
||||
result = (J3DModelData*) J3DModelLoaderDataBase::load(result, 0x59020030);
|
||||
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) {
|
||||
J3DMaterial* material_p = modelData->getMaterialNodePointer(k);
|
||||
material_p->change();
|
||||
|
||||
J3DMaterialAnm* material_anm = new J3DMaterialAnm();
|
||||
if (material_anm == NULL) {
|
||||
return -1;
|
||||
}
|
||||
pMaterial->setMaterialAnm(materialAnm);
|
||||
|
||||
material_p->setMaterialAnm(material_anm);
|
||||
}
|
||||
|
||||
setAlpha(modelData);
|
||||
if (modelData->newSharedDisplayList(0x40000) != 0) {
|
||||
return -1;
|
||||
}
|
||||
modelData->simpleCalcMaterial(0, (float (*)[4])j3dDefaultMtx);
|
||||
|
||||
modelData->simpleCalcMaterial(0, (MtxP)j3dDefaultMtx);
|
||||
modelData->makeSharedDL();
|
||||
} else if ((((nodeType == 'BMDR') ||
|
||||
(nodeType == 'BMDV')) ||
|
||||
(nodeType == 'BMDE')) ||
|
||||
((nodeType == 'BMWR' ||
|
||||
(nodeType == 'BMWE'))))
|
||||
} else if (nodeType == 'BMDR' || nodeType == 'BMDV' || nodeType == 'BMDE' ||
|
||||
nodeType == 'BMWR' || nodeType == 'BMWE')
|
||||
{
|
||||
result = loaderBasicBmd(nodeType, result);
|
||||
if (result == NULL) {
|
||||
@@ -734,60 +751,63 @@ int dRes_info_c::loadResource() {
|
||||
if (result == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
modelData = (J3DModelData*)result;
|
||||
if (modelData->newSharedDisplayList(0x40000) != 0) {
|
||||
return -1;
|
||||
}
|
||||
modelData->simpleCalcMaterial(0, (float (*)[4])j3dDefaultMtx);
|
||||
|
||||
modelData->simpleCalcMaterial(0, (MtxP)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->simpleCalcMaterial(0, (MtxP)j3dDefaultMtx);
|
||||
modelData->makeSharedDL();
|
||||
} else if (nodeType == 'BLS ') {
|
||||
result = J3DClusterLoaderDataBase::load(result);
|
||||
if (result == NULL) {
|
||||
return -1;
|
||||
}
|
||||
} else if ((nodeType == 'BCKS') ||
|
||||
(nodeType == 'BCK '))
|
||||
{
|
||||
} 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 '))))))
|
||||
} 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);
|
||||
result = cBgS::ConvDzb(result);
|
||||
} else if (nodeType == 'KCL ') {
|
||||
result = dBgWKCol::initKCollision(result);
|
||||
}
|
||||
|
||||
mRes[firstFileIndex] = result;
|
||||
}
|
||||
|
||||
firstFileIndex++;
|
||||
}
|
||||
|
||||
node++;
|
||||
}
|
||||
|
||||
@@ -853,9 +873,9 @@ void dRes_info_c::deleteArchiveRes() {
|
||||
/* 8003BA9C-8003BAC4 0363DC 0028+00 2/2 0/0 0/0 .text getArcHeader__FP10JKRArchive */
|
||||
static SArcHeader* getArcHeader(JKRArchive* param_0) {
|
||||
if (param_0 != NULL) {
|
||||
switch(param_0->getMountMode()) {
|
||||
case JKRArchive::MOUNT_MEM:
|
||||
return ((JKRMemArchive*)param_0)->getArcHeader();
|
||||
switch (param_0->getMountMode()) {
|
||||
case JKRArchive::MOUNT_MEM:
|
||||
return ((JKRMemArchive*)param_0)->getArcHeader();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -983,8 +1003,8 @@ 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,
|
||||
dataHeap, blockSize2, param_0->mRes, param_0->getCount(),
|
||||
param_0->getDMCommand(), archive, header, blockSize1, dataHeap,
|
||||
blockSize2, param_0->mRes, param_0->getCount(),
|
||||
param_0->getArchiveName());
|
||||
}
|
||||
param_0++;
|
||||
@@ -1034,14 +1054,17 @@ void dRes_info_c::dump(dRes_info_c* param_0, int param_1) {
|
||||
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);
|
||||
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);
|
||||
"----------------------------------------------\n %6.1f %6x %6.1f %6x Total\n\n",
|
||||
totalArcHeaderSize / 1024.0f, totalArcHeaderSize, totalHeapSize / 1024.0f, totalHeapSize);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
@@ -1184,8 +1207,8 @@ void* dRes_control_c::getRes(char const* arcName, s32 resIdx, dRes_info_c* pInfo
|
||||
u32 fileCount = archive->countFile();
|
||||
|
||||
if (resIdx >= (int)fileCount) {
|
||||
OSReport_Error("<%s.arc> getRes: res index over !! index=%d count=%d\n", arcName,
|
||||
resIdx, fileCount);
|
||||
OSReport_Error("<%s.arc> getRes: res index over !! index=%d count=%d\n", arcName, resIdx,
|
||||
fileCount);
|
||||
return NULL;
|
||||
}
|
||||
return resInfo->getRes(resIdx);
|
||||
|
||||
+293
-257
File diff suppressed because it is too large
Load Diff
+26
-26
@@ -78,16 +78,16 @@ void dMpath_n::dTexObjAggregate_c::remove() {
|
||||
/* 8003C94C-8003CA40 03728C 00F4+00 2/0 9/2 0/0 .text
|
||||
* rendering__11dDrawPath_cFPCQ211dDrawPath_c10line_class */
|
||||
void dDrawPath_c::rendering(dDrawPath_c::line_class const* p_line) {
|
||||
if (isDrawType(p_line->unk0)) {
|
||||
int width = getLineWidth(p_line->unk1);
|
||||
if (isDrawType(p_line->field_0x0)) {
|
||||
int width = getLineWidth(p_line->field_0x1);
|
||||
|
||||
if (width > 0 && p_line->unk2 >= 2) {
|
||||
if (width > 0 && p_line->mDataNum >= 2) {
|
||||
GXSetLineWidth(width, GX_TO_ZERO);
|
||||
GXSetTevColor(GX_TEVREG0, *getLineColor(p_line->unk0 & 0x3F, p_line->unk1));
|
||||
GXBegin(GX_LINESTRIP, GX_VTXFMT0, p_line->unk2);
|
||||
GXSetTevColor(GX_TEVREG0, *getLineColor(p_line->field_0x0 & 0x3F, p_line->field_0x1));
|
||||
GXBegin(GX_LINESTRIP, GX_VTXFMT0, p_line->mDataNum);
|
||||
|
||||
u16* tmp = p_line->unk4;
|
||||
for (int i = 0; i < p_line->unk2; i++) {
|
||||
u16* tmp = p_line->mpData;
|
||||
for (int i = 0; i < p_line->mDataNum; i++) {
|
||||
GXPosition1x16(*tmp);
|
||||
tmp++;
|
||||
}
|
||||
@@ -102,11 +102,11 @@ void dDrawPath_c::rendering(dDrawPath_c::poly_class const* p_poly) {
|
||||
if (isDrawType(p_poly->field_0x0)) {
|
||||
GXSetTevColor(GX_TEVREG0, *getColor(p_poly->field_0x0 & 0x3F));
|
||||
|
||||
if (p_poly->field_0x1 >= 3) {
|
||||
GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, p_poly->field_0x1);
|
||||
if (p_poly->mDataNum >= 3) {
|
||||
GXBegin(GX_TRIANGLESTRIP, GX_VTXFMT0, p_poly->mDataNum);
|
||||
|
||||
u16* tmp = p_poly->field_0x4;
|
||||
for (int i = 0; i < p_poly->field_0x1; i++) {
|
||||
u16* tmp = p_poly->mpData;
|
||||
for (int i = 0; i < p_poly->mDataNum; i++) {
|
||||
GXPosition1x16(*tmp);
|
||||
tmp++;
|
||||
}
|
||||
@@ -120,13 +120,13 @@ void dDrawPath_c::rendering(dDrawPath_c::poly_class const* p_poly) {
|
||||
void dDrawPath_c::rendering(dDrawPath_c::group_class const* p_group) {
|
||||
if (isSwitch(p_group)) {
|
||||
poly_class* poly = p_group->mpPoly;
|
||||
for (int i = 0; i < p_group->field_0x4; i++) {
|
||||
for (int i = 0; i < p_group->mPolyNum; i++) {
|
||||
rendering(poly);
|
||||
poly++;
|
||||
}
|
||||
|
||||
line_class* line = p_group->mpLine;
|
||||
for (int i = 0; i < p_group->field_0x2; i++) {
|
||||
for (int i = 0; i < p_group->mLineNum; i++) {
|
||||
rendering(line);
|
||||
line++;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ void dDrawPath_c::rendering(dDrawPath_c::floor_class const* p_floor) {
|
||||
if (p_floor->mpGroup != NULL) {
|
||||
group_class* group = p_floor->mpGroup;
|
||||
|
||||
for (int i = 0; i < p_floor->field_0x1; i++) {
|
||||
for (int i = 0; i < p_floor->mGroupNum; i++) {
|
||||
rendering(group);
|
||||
group++;
|
||||
}
|
||||
@@ -150,12 +150,12 @@ void dDrawPath_c::rendering(dDrawPath_c::floor_class const* p_floor) {
|
||||
* rendering__11dDrawPath_cFPCQ211dDrawPath_c10room_class */
|
||||
void dDrawPath_c::rendering(dDrawPath_c::room_class const* p_room) {
|
||||
if (p_room != NULL) {
|
||||
GXSetArray(GX_VA_POS, p_room->field_0x8, 8);
|
||||
GXSetArray(GX_VA_POS, p_room->mpFloatData, 8);
|
||||
floor_class* floor = p_room->mpFloor;
|
||||
|
||||
if (floor != NULL) {
|
||||
for (int i = 0; i < p_room->field_0x0; i++) {
|
||||
if (isRenderingFloor(floor->field_0x0)) {
|
||||
for (int i = 0; i < p_room->mFloorNum; i++) {
|
||||
if (isRenderingFloor(floor->mFloorNo)) {
|
||||
rendering(floor);
|
||||
}
|
||||
floor++;
|
||||
@@ -317,7 +317,7 @@ dMpath_n::dTexObjAggregate_c dMpath_n::m_texObjAgg;
|
||||
/* 8003D3C0-8003D68C 037D00 02CC+00 0/0 2/2 0/0 .text
|
||||
* renderingDecoration__18dRenderingFDAmap_cFPCQ211dDrawPath_c10line_class */
|
||||
void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_line) {
|
||||
s32 width = getDecorationLineWidth(p_line->unk1);
|
||||
s32 width = getDecorationLineWidth(p_line->field_0x1);
|
||||
if (width <= 0) {
|
||||
return;
|
||||
}
|
||||
@@ -331,18 +331,18 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li
|
||||
GXSetNumTevStages(1);
|
||||
GXLoadTexObj(dMpath_n::m_texObjAgg.mp_texObj[6], GX_TEXMAP0);
|
||||
|
||||
u16* unk = p_line->unk4;
|
||||
s32 unk2 = p_line->unk2;
|
||||
u16* data_p = p_line->mpData;
|
||||
s32 data_num = p_line->mDataNum;
|
||||
GXSetLineWidth(width, GX_TO_ONE);
|
||||
GXSetPointSize(width, GX_TO_ONE);
|
||||
GXColor lineColor = *getDecoLineColor(p_line->unk0 & 0x3f, p_line->unk1);
|
||||
GXColor lineColor = *getDecoLineColor(p_line->field_0x0 & 0x3f, p_line->field_0x1);
|
||||
GXSetTevColor(GX_TEVREG0, lineColor);
|
||||
lineColor.r = lineColor.r - 4;
|
||||
GXSetTevColor(GX_TEVREG1, lineColor);
|
||||
|
||||
for (int i = 0; i < unk2; unk++, i++) {
|
||||
for (int i = 0; i < data_num; data_p++, i++) {
|
||||
#ifndef HYRULE_FIELD_SPEEDHACK
|
||||
if (i < unk2 - 1) {
|
||||
if (i < data_num - 1) {
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_C0);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE,
|
||||
GX_TEVPREV);
|
||||
@@ -350,9 +350,9 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE,
|
||||
GX_TEVPREV);
|
||||
GXBegin(GX_LINESTRIP, GX_VTXFMT0, 2);
|
||||
GXPosition1x16(unk[0]);
|
||||
GXPosition1x16(data_p[0]);
|
||||
GXTexCoord2f32(0, 0);
|
||||
GXPosition1x16(unk[1]);
|
||||
GXPosition1x16(data_p[1]);
|
||||
GXTexCoord2f32(0, 0);
|
||||
}
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_KONST, GX_CC_TEXC, GX_CC_C1);
|
||||
@@ -361,7 +361,7 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
#endif
|
||||
GXBegin(GX_POINTS, GX_VTXFMT0, 1);
|
||||
GXPosition1x16(unk[0]);
|
||||
GXPosition1x16(data_p[0]);
|
||||
GXTexCoord2f32(0, 0);
|
||||
i_GXEnd();
|
||||
}
|
||||
|
||||
@@ -597,6 +597,82 @@ asm void dMpath_c::createWork() {
|
||||
|
||||
/* 8003F810-8003FA40 03A150 0230+00 1/1 1/1 0/0 .text
|
||||
* setPointer__8dMpath_cFPQ211dDrawPath_c10room_classPScPSc */
|
||||
// close
|
||||
#ifdef NONMATCHING
|
||||
int dMpath_c::setPointer(dDrawPath_c::room_class* i_room, s8* param_1, s8* param_2) {
|
||||
int var_r6 = 0;
|
||||
if ((u32)i_room->mpFloor >= 0x80000000) {
|
||||
dDrawPath_c::floor_class* floor_p = i_room->mpFloor;
|
||||
for (int i = 0; i < i_room->field_0x0; i++) {
|
||||
if (floor_p->field_0x0 < *param_1) {
|
||||
*param_1 = floor_p->field_0x0;
|
||||
}
|
||||
|
||||
if (floor_p->field_0x0 > *param_2) {
|
||||
*param_2 = floor_p->field_0x0;
|
||||
}
|
||||
|
||||
floor_p++;
|
||||
}
|
||||
|
||||
dDrawPath_c::floor_class* floor_e = &i_room->mpFloor[i_room->field_0x0 - 1];
|
||||
dDrawPath_c::group_class* group_e = &floor_e->mpGroup[floor_e->field_0x1 - 1];
|
||||
|
||||
if (group_e->field_0x4 != 0) {
|
||||
dDrawPath_c::poly_class* poly_e = &group_e->mpPoly[group_e->field_0x4 - 1];
|
||||
return (u32)(poly_e->field_0x4 + poly_e->field_0x1) - (u32)i_room;
|
||||
}
|
||||
|
||||
dDrawPath_c::line_class* line_e = &group_e->mpLine[group_e->field_0x2 - 1];
|
||||
return (u32)(line_e->unk4 + line_e->unk2) - (u32)i_room;
|
||||
}
|
||||
|
||||
i_room->mpFloor = (dDrawPath_c::floor_class*)((u32)i_room + (u32)i_room->mpFloor);
|
||||
i_room->field_0x8 = (f32*)((u32)i_room + (u32)i_room->field_0x8);
|
||||
|
||||
dDrawPath_c::floor_class* floor_p = i_room->mpFloor;
|
||||
for (int i = 0; i < i_room->field_0x0; i++) {
|
||||
int room = (int)i_room;
|
||||
floor_p->mpGroup = (dDrawPath_c::group_class*)(room + (u32)floor_p->mpGroup);
|
||||
|
||||
dDrawPath_c::group_class* group_p = floor_p->mpGroup;
|
||||
for (int j = 0; j < floor_p->field_0x1; j++) {
|
||||
var_r6 = (u32)group_p->mpPoly;
|
||||
group_p->mpLine = (dDrawPath_c::line_class*)(room + (u32)group_p->mpLine);
|
||||
|
||||
dDrawPath_c::line_class* line_p = group_p->mpLine;
|
||||
for (int k = 0; k < group_p->field_0x2; k++) {
|
||||
var_r6 = (u32)(line_p->unk4 + line_p->unk2);
|
||||
line_p->unk4 += room;
|
||||
line_p++;
|
||||
}
|
||||
|
||||
group_p->mpPoly = (dDrawPath_c::poly_class*)(room + (u32)group_p->mpPoly);
|
||||
|
||||
dDrawPath_c::poly_class* poly_p = group_p->mpPoly;
|
||||
for (int l = 0; l < group_p->field_0x4; l++) {
|
||||
var_r6 = (u32)(poly_p->field_0x4 + poly_p->field_0x1);
|
||||
poly_p->field_0x4 += room;
|
||||
poly_p++;
|
||||
}
|
||||
|
||||
group_p++;
|
||||
}
|
||||
|
||||
if (floor_p->field_0x0 < *param_1) {
|
||||
*param_1 = floor_p->field_0x0;
|
||||
}
|
||||
|
||||
if (floor_p->field_0x0 > *param_2) {
|
||||
*param_2 = floor_p->field_0x0;
|
||||
}
|
||||
|
||||
floor_p++;
|
||||
}
|
||||
|
||||
return var_r6;
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -605,6 +681,7 @@ asm void dMpath_c::setPointer(dDrawPath_c::room_class* param_0, s8* param_1, s8*
|
||||
#include "asm/d/map/d_map_path_dmap/setPointer__8dMpath_cFPQ211dDrawPath_c10room_classPScPSc.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
struct map_path_class {
|
||||
int field_0x0;
|
||||
|
||||
@@ -6,163 +6,8 @@
|
||||
#include "d/map/d_map_path_fmap.h"
|
||||
#include "MSL_C/float.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/map/d_map_path.h"
|
||||
#include "d/d_tresure.h"
|
||||
#include "dol2asm.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
class fmpTresTypeGroupData_c {
|
||||
public:
|
||||
fmpTresTypeGroupData_c() {
|
||||
mpTresData = NULL;
|
||||
mpNext = NULL;
|
||||
}
|
||||
|
||||
/* 8003EB70 */ ~fmpTresTypeGroupData_c();
|
||||
|
||||
void setTypeGroupNo(u8 i_no) { mTypeGroupNo = i_no; }
|
||||
void setNextData(fmpTresTypeGroupData_c* i_next) { mpNext = i_next; }
|
||||
void setTresData(const dTres_c::data_s* i_data) { mpTresData = i_data; }
|
||||
const dTres_c::data_s* getTresData() { return mpTresData; }
|
||||
fmpTresTypeGroupData_c* getNextData() { return mpNext; }
|
||||
|
||||
/* 0x0 */ const dTres_c::data_s* mpTresData;
|
||||
/* 0x0 */ fmpTresTypeGroupData_c* mpNext;
|
||||
/* 0x8 */ u8 mTypeGroupNo;
|
||||
}; // Size: 0xC
|
||||
|
||||
class fmpTresTypeGroupDataList_c {
|
||||
public:
|
||||
/* 8003D790 */ void addTypeGroupData(u8, dTres_c::data_s const*);
|
||||
/* 8003EB10 */ ~fmpTresTypeGroupDataList_c();
|
||||
/* 8003EC90 */ fmpTresTypeGroupDataList_c();
|
||||
|
||||
/* 0x0 */ fmpTresTypeGroupData_c* mpTypeGroupDataHead;
|
||||
/* 0x4 */ fmpTresTypeGroupData_c* mpNextData;
|
||||
};
|
||||
|
||||
class fmpTresTypeGroupDataListAll_c {
|
||||
public:
|
||||
void addTypeGroupData(u8 i_typeGroupNo, const dTres_c::data_s* i_data) {
|
||||
mpTypeGroupData[i_typeGroupNo].addTypeGroupData(i_typeGroupNo, i_data);
|
||||
}
|
||||
|
||||
/* 0x0 */ fmpTresTypeGroupDataList_c mpTypeGroupData[17];
|
||||
};
|
||||
|
||||
class dMenu_Fmap_data_c {
|
||||
public:
|
||||
dTres_c::list_class* getTresure() { return mp_tresure; }
|
||||
f32 getFilelist2MinX() { return m_fileList2->mLeftRmX; }
|
||||
f32 getFilelist2MinZ() { return m_fileList2->mInnerRmZ; }
|
||||
f32 getFilelist2MaxX() { return m_fileList2->mRightRmX; }
|
||||
f32 getFilelist2MaxZ() { return m_fileList2->mFrontRmZ; }
|
||||
|
||||
/* 0x0 */ dTres_c::list_class* mp_tresure;
|
||||
/* 0x4 */ dStage_FileList2_dt_c* m_fileList2;
|
||||
/* 0x8 */ dDrawPath_c::room_class* mp_mapPath;
|
||||
/* 0xC */ void* mp_dzsData;
|
||||
};
|
||||
|
||||
class dMenu_Fmap_stage_data_c;
|
||||
class dMenu_Fmap_room_data_c {
|
||||
public:
|
||||
/* 8003D818 */ bool isArrival();
|
||||
/* 8003D868 */ void buildTresTypeGroup(int, int, int);
|
||||
/* 8003D92C */ void buildFmapRoomData(int, int, f32, f32, f32, f32);
|
||||
|
||||
f32 getFileList2MinX() { return mp_fmapData->getFilelist2MinX(); }
|
||||
f32 getFileList2MinZ() { return mp_fmapData->getFilelist2MinZ(); }
|
||||
f32 getFileList2MaxX() { return mp_fmapData->getFilelist2MaxX(); }
|
||||
f32 getFileList2MaxZ() { return mp_fmapData->getFilelist2MaxZ(); }
|
||||
dMenu_Fmap_room_data_c* getNextData() { return mp_nextData; }
|
||||
int getRoomNo() { return m_roomNo; }
|
||||
|
||||
/* 0x00 */ dMenu_Fmap_data_c* mp_fmapData;
|
||||
/* 0x04 */ fmpTresTypeGroupDataListAll_c* mp_fmpTresTypeGroupDataListAll;
|
||||
/* 0x08 */ dMenu_Fmap_room_data_c* mp_nextData;
|
||||
/* 0x0C */ dMenu_Fmap_stage_data_c* mp_parentStage;
|
||||
/* 0x10 */ u8 m_roomNo;
|
||||
};
|
||||
|
||||
class dMenu_Fmap_stage_arc_data_c {
|
||||
public:
|
||||
u8 getVisitedRoomSaveTableNo() { return mVisitedRoomSaveTableNo; }
|
||||
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x1 */ u8 mSaveTableNo;
|
||||
/* 0x2 */ u8 mVisitedRoomSaveTableNo;
|
||||
};
|
||||
|
||||
class dMenu_Fmap_stage_data_c {
|
||||
public:
|
||||
/* 8003D95C */ bool isArrival();
|
||||
/* 8003D9D8 */ int buildFmapStageData(int, f32, f32);
|
||||
|
||||
dMenu_Fmap_stage_arc_data_c* getStageArc() { return mpStageArc; }
|
||||
dMenu_Fmap_stage_data_c* getNextData() { return mpNextData; }
|
||||
|
||||
/* 0x00 */ char name[8];
|
||||
/* 0x08 */ dMenu_Fmap_stage_arc_data_c* mpStageArc;
|
||||
/* 0x0C */ dMenu_Fmap_room_data_c* mp_roomTop;
|
||||
/* 0x10 */ dMenu_Fmap_stage_data_c* mpNextData;
|
||||
/* 0x14 */ f32 m_offsetX;
|
||||
/* 0x18 */ f32 m_offsetZ;
|
||||
/* 0x1C */ f32 m_stageMinX;
|
||||
/* 0x20 */ f32 m_stageMinZ;
|
||||
/* 0x24 */ f32 m_stageMaxX;
|
||||
/* 0x28 */ f32 m_stageMaxZ;
|
||||
/* 0x2C */ int m_stageCntNo;
|
||||
};
|
||||
|
||||
class dMenu_Fmap_region_data_c {
|
||||
public:
|
||||
/* 8003DB48 */ dMenu_Fmap_stage_data_c* getMenuFmapStageData(int);
|
||||
/* 8003DB70 */ void getPointStagePathInnerNo(f32, f32, int, int*, int*);
|
||||
/* 8003DEE0 */ void buildFmapRegionData(int);
|
||||
|
||||
/* 0x00 */ dMenu_Fmap_stage_data_c* mpMenuFmapStageDataTop;
|
||||
/* 0x04 */ dMenu_Fmap_region_data_c* mpNextData;
|
||||
/* 0x08 */ f32 mRegionOffsetX;
|
||||
/* 0x0C */ f32 mRegionOffsetZ;
|
||||
/* 0x10 */ f32 mRegionMinX;
|
||||
/* 0x14 */ f32 mRegionMaxX;
|
||||
/* 0x18 */ f32 mRegionMinZ;
|
||||
/* 0x1C */ f32 mRegionMaxZ;
|
||||
/* 0x20 */ int mRegionNo;
|
||||
};
|
||||
|
||||
struct dMenu_Fmap_world_data_c {
|
||||
/* 8003E028 */ void create(dMenu_Fmap_region_data_c*);
|
||||
/* 8003E04C */ void buildFmapWorldData();
|
||||
|
||||
/* 0x00 */ dMenu_Fmap_region_data_c* mp_fmapRegionData;
|
||||
/* 0x04 */ f32 m_worldMinX;
|
||||
/* 0x08 */ f32 m_worldMinZ;
|
||||
/* 0x0C */ f32 m_worldMaxX;
|
||||
/* 0x10 */ f32 m_worldMaxZ;
|
||||
};
|
||||
|
||||
struct dMenuFmapIconPointer_c {
|
||||
/* 8003E114 */ void init(dMenu_Fmap_region_data_c*, dMenu_Fmap_stage_data_c*, u8, int, int);
|
||||
/* 8003E1C0 */ void getFirstData();
|
||||
/* 8003E2BC */ void getData();
|
||||
/* 8003E350 */ void getFirstRoomData();
|
||||
/* 8003E37C */ void getNextRoomData();
|
||||
/* 8003E3A4 */ void getNextStageData();
|
||||
/* 8003E3D8 */ void getNextData();
|
||||
/* 8003E490 */ void nextData();
|
||||
/* 8003E510 */ void getValidData();
|
||||
};
|
||||
|
||||
struct dMenuFmapIconDisp_c {
|
||||
/* 8003E578 */ void getPosition(int*, int*, f32*, f32*, dTres_c::data_s const**);
|
||||
/* 8003E6E8 */ void isDrawDisp();
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user