mirror of
https://github.com/zeldaret/tww.git
synced 2024-11-23 05:19:44 +00:00
stag inlines and cleanup
This commit is contained in:
parent
43d5aaa0e8
commit
40a4d0a1d9
@ -142,8 +142,8 @@ public:
|
||||
|
||||
struct daAgb_Switch {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x1 */ u8 field_0x1;
|
||||
/* 0x1 */ u8 field_0x2;
|
||||
/* 0x1 */ u8 stageNo;
|
||||
/* 0x1 */ u8 roomNo;
|
||||
/* 0x3 */ u8 field_0x3;
|
||||
/* 0x4 */ u8 field_0x4;
|
||||
u8 field_0x5[0x8 - 0x5];
|
||||
|
@ -9,7 +9,7 @@ class daAgb_c;
|
||||
struct agb_mail_struct {
|
||||
/* 0x00 */ u16 msgNo;
|
||||
/* 0x02 */ u8 swToSet;
|
||||
/* 0x03 */ u8 stageSaveTbl;
|
||||
/* 0x03 */ u8 stageNo;
|
||||
/* 0x04 */ u8 roomNo;
|
||||
/* 0x05 */ u8 reactType;
|
||||
/* 0x06 */ u8 swToCheck;
|
||||
|
@ -220,9 +220,9 @@ public:
|
||||
static void setMapChgSizeRealSize() {}
|
||||
|
||||
static void create();
|
||||
static void isEnableEnlargementScroll();
|
||||
static BOOL isEnableEnlargementScroll();
|
||||
static bool isEnableDispMap();
|
||||
static void getKindMapType();
|
||||
static int getKindMapType();
|
||||
static void remove();
|
||||
static void setImage(int, int, f32);
|
||||
static void deleteImage(int);
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
struct stage_stag_info_class {
|
||||
/* 0x00 */ f32 field_0x0;
|
||||
/* 0x04 */ f32 field_0x4;
|
||||
/* 0x08 */ u8 mCameraType;
|
||||
/* 0x08 */ u8 mDefaultCameraType;
|
||||
/* 0x09 */ u8 field_0x09;
|
||||
/* 0x0A */ u16 field_0x0a;
|
||||
/* 0x0C */ u32 field_0x0c;
|
||||
@ -1007,6 +1007,15 @@ void dStage_dt_c_roomReLoader(void* i_data, dStage_dt_c* i_stage, int i_roomNo);
|
||||
dStage_objectNameInf* dStage_searchName(const char*);
|
||||
const char* dStage_getName2(s16 i_procName, s8 i_subtype);
|
||||
|
||||
|
||||
inline u8 dStage_stagInfo_DefaultCameraType(stage_stag_info_class* p_info) {
|
||||
return p_info->mDefaultCameraType;
|
||||
}
|
||||
|
||||
inline s32 dStage_stagInfo_ChkKeyDisp(stage_stag_info_class* i_stagInfo) {
|
||||
return i_stagInfo->field_0x09 & 1;
|
||||
}
|
||||
|
||||
inline s32 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* i_stagInfo) {
|
||||
return (i_stagInfo->field_0x09 >> 1) & 0x7F;
|
||||
}
|
||||
@ -1015,6 +1024,10 @@ inline u32 dStage_stagInfo_GetSTType(stage_stag_info_class* i_stagInfo) {
|
||||
return (i_stagInfo->field_0x0c >> 16) & 7;
|
||||
}
|
||||
|
||||
inline u8 dStage_stagInfo_GetUpButton(stage_stag_info_class* i_stagInfo) {
|
||||
return i_stagInfo->field_0x0a & 3;
|
||||
}
|
||||
|
||||
inline u8 dStage_stagInfo_GetParticleNo(stage_stag_info_class* i_stagInfo) {
|
||||
return (i_stagInfo->field_0x0a >> 0x3) & 0xFF;
|
||||
}
|
||||
@ -1023,19 +1036,20 @@ inline s8 dStage_stagInfo_GetTimeH(stage_stag_info_class* p_info) {
|
||||
return (p_info->field_0x0c >> 8) & 0xFF;
|
||||
}
|
||||
|
||||
inline u8 dStage_stagInfo_GetCullPoint(stage_stag_info_class* p_info) {
|
||||
return p_info->field_0x10 & 0xFFFF;
|
||||
}
|
||||
|
||||
inline u8 dStage_stagInfo_getStartSch(stage_stag_info_class* p_info) {
|
||||
return (p_info->field_0x10 >> 0x10) & 0xFF;
|
||||
}
|
||||
|
||||
inline u8 dStage_stagInfo_GetSchSec(stage_stag_info_class* p_info) {
|
||||
return p_info->field_0x0c & 0xFF;
|
||||
}
|
||||
|
||||
// TODO:
|
||||
// dStage_stagInfo_GetAgbCon__FP21stage_stag_info_class
|
||||
// dStage_stagInfo_DefaultCameraType__FP21stage_stag_info_class
|
||||
// dStage_stagInfo_GetCullPoint__FP21stage_stag_info_class
|
||||
// dStage_stagInfo_GetUpButton__FP21stage_stag_info_class
|
||||
// dStage_stagInfo_ChkKeyDisp__FP21stage_stag_info_class
|
||||
|
||||
inline u8 dStage_roomRead_dt_c_GetLoadRoomIndex(u8 param_0) {
|
||||
return param_0 & 0x3F;
|
||||
|
@ -797,20 +797,20 @@ void daAgb_c::FlagsRecv() {
|
||||
|
||||
/* 800D0978-800D0A54 .text SwitchOn__7daAgb_cFv */
|
||||
void daAgb_c::SwitchOn() {
|
||||
if (mSwitch.field_0x1 == (u8)dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo())) {
|
||||
if (mSwitch.stageNo == (u8)dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo())) {
|
||||
u8 var_r31 = mSwitch.field_0x3 - 1;
|
||||
|
||||
if (mSwitch.field_0x0 != 0xFF) {
|
||||
dComIfGs_revSwitch(mSwitch.field_0x0, mSwitch.field_0x2);
|
||||
dComIfGs_revSwitch(mSwitch.field_0x0, mSwitch.roomNo);
|
||||
}
|
||||
|
||||
if (var_r31 != 9) {
|
||||
u8 sw = mSwitch.field_0x4;
|
||||
if (sw != 0xFF) {
|
||||
if (var_r31 <= 1 || var_r31 == 8) {
|
||||
dComIfGs_onSwitch(sw, mSwitch.field_0x2);
|
||||
if (var_r31 == 0 || var_r31 == 1 || var_r31 == 8) {
|
||||
dComIfGs_onSwitch(sw, mSwitch.roomNo);
|
||||
} else {
|
||||
dComIfGs_revSwitch(sw, mSwitch.field_0x2);
|
||||
dComIfGs_revSwitch(sw, mSwitch.roomNo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2468,7 +2468,7 @@ void daAgbsw0_c::MailSend(u16 msgNo, u8 reactType, u8 toCheck, u8 toSet, u8 sfx)
|
||||
mMail.msgNo = msgNo;
|
||||
mMail.swToSet = toSet;
|
||||
mMail.swToCheck = toCheck;
|
||||
mMail.stageSaveTbl = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
|
||||
mMail.stageNo = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
|
||||
mMail.roomNo = fopAcM_GetHomeRoomNo(this);
|
||||
mMail.reactType = reactType;
|
||||
mMail.sfx = sfx;
|
||||
@ -2529,7 +2529,7 @@ static BOOL daAgbsw0_Delete(daAgbsw0_c* i_this) {
|
||||
info.msgNo = 0xFFFF;
|
||||
info.swToSet = 0xFF;
|
||||
info.swToCheck = 0xFF;
|
||||
info.stageSaveTbl = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
|
||||
info.stageNo = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
|
||||
info.roomNo = fopAcM_GetHomeRoomNo(i_this);
|
||||
info.reactType = 0;
|
||||
info.sfx = 0;
|
||||
|
@ -1154,7 +1154,7 @@ void dComIfGs_setGameStartStage() {
|
||||
point = data_p->mStartCode;
|
||||
} else {
|
||||
u32 stage_type = dStage_stagInfo_GetSTType(dComIfGp_getStageStagInfo());
|
||||
int save_tbl = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
|
||||
int stageNo = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
|
||||
BOOL isNot_PShip = strcmp(dComIfGp_getStartStageName(), "PShip");
|
||||
|
||||
if (!isNot_PShip) {
|
||||
@ -1185,13 +1185,13 @@ void dComIfGs_setGameStartStage() {
|
||||
}
|
||||
} else if (stage_type == dStageType_DUNGEON_e || stage_type == dStageType_MINIBOSS_e ||
|
||||
stage_type == dStageType_BOSS_e || stage_type == dStageType_UNKNOWN_8_e ||
|
||||
save_tbl == dSv_save_c::STAGE_HYRULE)
|
||||
stageNo == dSv_save_c::STAGE_HYRULE)
|
||||
{
|
||||
stage_scls_info_class* scls_p = getSceneList(0);
|
||||
strcpy(stage_name, scls_p->mStage);
|
||||
room_no = scls_p->mRoom;
|
||||
point = scls_p->mStart;
|
||||
} else if (save_tbl == dSv_save_c::STAGE_SHIP) {
|
||||
} else if (stageNo == dSv_save_c::STAGE_SHIP) {
|
||||
cXyz ikada_pos;
|
||||
dComIfGp_getIkadaShipBeforePos(&ikada_pos);
|
||||
|
||||
@ -1199,8 +1199,8 @@ void dComIfGs_setGameStartStage() {
|
||||
strcpy(stage_name, scls_p->mStage);
|
||||
room_no = scls_p->mRoom;
|
||||
point = scls_p->mStart;
|
||||
} else if (save_tbl == dSv_save_c::STAGE_MISC || save_tbl == dSv_save_c::STAGE_SUBDUNGEON ||
|
||||
save_tbl == dSv_save_c::STAGE_SUBDUNGEON_NEW)
|
||||
} else if (stageNo == dSv_save_c::STAGE_MISC || stageNo == dSv_save_c::STAGE_SUBDUNGEON ||
|
||||
stageNo == dSv_save_c::STAGE_SUBDUNGEON_NEW)
|
||||
{
|
||||
strcpy(stage_name, "sea");
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "d/d_map.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "d/actor/d_a_agb.h"
|
||||
|
||||
enum {
|
||||
Floor_B5F = 123,
|
||||
@ -366,8 +367,8 @@ void dMap_c::create() {
|
||||
}
|
||||
|
||||
/* 8004826C-800482B4 .text isEnableEnlargementScroll__6dMap_cFv */
|
||||
void dMap_c::isEnableEnlargementScroll() {
|
||||
/* Nonmatching */
|
||||
BOOL dMap_c::isEnableEnlargementScroll() {
|
||||
return dStage_stagInfo_GetSTType(dComIfGp_getStageStagInfo()) == dStageType_SEA_e;
|
||||
}
|
||||
|
||||
/* 800482B4-800482D8 .text isEnableDispMap__6dMap_cFv */
|
||||
@ -376,8 +377,15 @@ bool dMap_c::isEnableDispMap() {
|
||||
}
|
||||
|
||||
/* 800482D8-80048340 .text getKindMapType__6dMap_cFv */
|
||||
void dMap_c::getKindMapType() {
|
||||
/* Nonmatching */
|
||||
int dMap_c::getKindMapType() {
|
||||
u32 stage_type = dStage_stagInfo_GetSTType(dComIfGp_getStageStagInfo());
|
||||
if (stage_type == dStageType_DUNGEON_e || stage_type == dStageType_FF1_e || stage_type == dStageType_MINIBOSS_e) {
|
||||
return 2;
|
||||
} else if (stage_type == dStageType_SEA_e) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80048340-80048370 .text remove__6dMap_cFv */
|
||||
@ -441,8 +449,12 @@ void dMap_c::setPlayerStayAgbMapTypeNow(f32, f32) {
|
||||
}
|
||||
|
||||
/* 800494C8-80049538 .text agbMapNoSet__6dMap_cFUcUc */
|
||||
void dMap_c::agbMapNoSet(u8, u8) {
|
||||
/* Nonmatching */
|
||||
void dMap_c::agbMapNoSet(u8 r29, u8 r30) {
|
||||
daAgb_c* agb = dComIfGp_getAgb();
|
||||
if (agb) {
|
||||
int stageNo = dStage_stagInfo_GetSaveTbl(dComIfGp_getStageStagInfo());
|
||||
agb->MapNoSet(stageNo, r29, r30);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80049538-800495D8 .text agbMapNoSetCall__6dMap_cFv */
|
||||
|
Loading…
Reference in New Issue
Block a user