mirror of
https://github.com/zeldaret/ss
synced 2026-05-26 07:38:54 -04:00
more map
This commit is contained in:
+26
-26
@@ -7707,14 +7707,14 @@ finalizeState_Wait__20dLytMapSaveCaption_cFv = .text:0x80132CC0; // type:functio
|
||||
initializeState_Out__20dLytMapSaveCaption_cFv = .text:0x80132CD0; // type:function size:0x48
|
||||
executeState_Out__20dLytMapSaveCaption_cFv = .text:0x80132D20; // type:function size:0x90
|
||||
finalizeState_Out__20dLytMapSaveCaption_cFv = .text:0x80132DB0; // type:function size:0x4
|
||||
fn_80132DC0 = .text:0x80132DC0; // type:function size:0xB0
|
||||
fn_80132E70 = .text:0x80132E70; // type:function size:0x4C
|
||||
fn_80132EC0 = .text:0x80132EC0; // type:function size:0xA0
|
||||
build__20dLytMapSaveCaption_cFPQ23d2d10ResAccIf_c = .text:0x80132DC0; // type:function size:0xB0
|
||||
remove__20dLytMapSaveCaption_cFv = .text:0x80132E70; // type:function size:0x4C
|
||||
execute__20dLytMapSaveCaption_cFv = .text:0x80132EC0; // type:function size:0xA0
|
||||
executeState__89sStateMgr_c<20dLytMapSaveCaption_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80132F60; // type:function size:0x10
|
||||
fn_80132F70 = .text:0x80132F70; // type:function size:0x6C
|
||||
draw__20dLytMapSaveCaption_cFv = .text:0x80132F70; // type:function size:0x6C
|
||||
getStateID__89sStateMgr_c<20dLytMapSaveCaption_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80132FE0; // type:function size:0x10
|
||||
fn_80132FF0 = .text:0x80132FF0; // type:function size:0xA0
|
||||
fn_80133090 = .text:0x80133090; // type:function size:0x19C
|
||||
setType__20dLytMapSaveCaption_cFl = .text:0x80132FF0; // type:function size:0xA0
|
||||
setLabel__20dLytMapSaveCaption_cFPCc = .text:0x80133090; // type:function size:0x19C
|
||||
initializeState_Wait__16dLytMapSaveObj_cFv = .text:0x80133230; // type:function size:0x4
|
||||
executeState_Wait__16dLytMapSaveObj_cFv = .text:0x80133240; // type:function size:0x78
|
||||
changeState__85sStateMgr_c<16dLytMapSaveObj_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x801332C0; // type:function size:0x10
|
||||
@@ -7731,17 +7731,17 @@ finalizeState_ToWait__16dLytMapSaveObj_cFv = .text:0x80133570; // type:function
|
||||
initializeState_Decide__16dLytMapSaveObj_cFv = .text:0x80133580; // type:function size:0x4
|
||||
executeState_Decide__16dLytMapSaveObj_cFv = .text:0x80133590; // type:function size:0x90
|
||||
finalizeState_Decide__16dLytMapSaveObj_cFv = .text:0x80133620; // type:function size:0x4
|
||||
fn_80133630 = .text:0x80133630; // type:function size:0x20
|
||||
fn_80133650 = .text:0x80133650; // type:function size:0xC
|
||||
fn_80133660 = .text:0x80133660; // type:function size:0xB0
|
||||
fn_80133710 = .text:0x80133710; // type:function size:0xF8
|
||||
fn_80133810 = .text:0x80133810; // type:function size:0x4C
|
||||
fn_80133860 = .text:0x80133860; // type:function size:0x54
|
||||
setPosition__16dLytMapSaveObj_cFRC7mVec3_c = .text:0x80133630; // type:function size:0x20
|
||||
setAlpha__16dLytMapSaveObj_cFUc = .text:0x80133650; // type:function size:0xC
|
||||
init__16dLytMapSaveObj_cFv = .text:0x80133660; // type:function size:0xB0
|
||||
build__16dLytMapSaveObj_cFPQ23d2d10ResAccIf_c = .text:0x80133710; // type:function size:0xF8
|
||||
remove__16dLytMapSaveObj_cFv = .text:0x80133810; // type:function size:0x4C
|
||||
execute__16dLytMapSaveObj_cFv = .text:0x80133860; // type:function size:0x54
|
||||
executeState__85sStateMgr_c<16dLytMapSaveObj_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801338C0; // type:function size:0x10
|
||||
fn_801338D0 = .text:0x801338D0; // type:function size:0x60
|
||||
draw__16dLytMapSaveObj_cFv = .text:0x801338D0; // type:function size:0x60
|
||||
__ct__13dLytMapMain_cFv = .text:0x80133930; // type:function size:0x358
|
||||
fn_80133C90 = .text:0x80133C90; // type:function size:0x1C
|
||||
fn_80133CB0 = .text:0x80133CB0; // type:function size:0x40
|
||||
__ct__16LytMap0x80520B5CFv = .text:0x80133C90; // type:function size:0x1C
|
||||
__dt__16LytMap0x80520B5CFv = .text:0x80133CB0; // type:function size:0x40
|
||||
__ct__16dLytMapCapture_cFv = .text:0x80133CF0; // type:function size:0xE0
|
||||
__dt__29sFState_c<16dLytMapCapture_c>Fv = .text:0x80133DD0; // type:function size:0x58
|
||||
__dt__32sFStateFct_c<16dLytMapCapture_c>Fv = .text:0x80133E30; // type:function size:0x6C
|
||||
@@ -7774,8 +7774,8 @@ fn_80135080 = .text:0x80135080; // type:function size:0x74
|
||||
fn_80135100 = .text:0x80135100; // type:function size:0x108
|
||||
fn_80135210 = .text:0x80135210; // type:function size:0x234
|
||||
fn_80135450 = .text:0x80135450; // type:function size:0x78
|
||||
fn_801354D0 = .text:0x801354D0; // type:function size:0x54
|
||||
fn_80135530 = .text:0x80135530; // type:function size:0x5C
|
||||
__ct__16dLytMapPutIcon_cFv = .text:0x801354D0; // type:function size:0x54
|
||||
__dt__16dLytMapPutIcon_cFv = .text:0x80135530; // type:function size:0x5C
|
||||
__ct__16dLytMapSaveObj_cFv = .text:0x80135590; // type:function size:0xC8
|
||||
__dt__29sFState_c<16dLytMapSaveObj_c>Fv = .text:0x80135660; // type:function size:0x58
|
||||
__dt__32sFStateFct_c<16dLytMapSaveObj_c>Fv = .text:0x801356C0; // type:function size:0x6C
|
||||
@@ -7808,8 +7808,8 @@ fn_801365C0 = .text:0x801365C0; // type:function size:0x4
|
||||
fn_801365D0 = .text:0x801365D0; // type:function size:0x40
|
||||
__dt__13dLytMapMain_cFv = .text:0x80136610; // type:function size:0x608
|
||||
getGlobal__13dLytMapMain_cFv = .text:0x80136C20; // type:function size:0xC
|
||||
fn_80136C30 = .text:0x80136C30; // type:function size:0xC8
|
||||
fn_80136D00 = .text:0x80136D00; // type:function size:0x6CC
|
||||
loadTextboxes__13dLytMapMain_cFv = .text:0x80136C30; // type:function size:0xC8
|
||||
build__13dLytMapMain_cFv = .text:0x80136D00; // type:function size:0x6CC
|
||||
changeState__82sStateMgr_c<13dLytMapMain_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x801373D0; // type:function size:0x10
|
||||
fn_801373E0 = .text:0x801373E0; // type:function size:0xAC
|
||||
fn_80137490 = .text:0x80137490; // type:function size:0x2E8
|
||||
@@ -7841,9 +7841,9 @@ fn_801396A0 = .text:0x801396A0; // type:function size:0xA4
|
||||
fn_80139750 = .text:0x80139750; // type:function size:0x5E8
|
||||
fn_80139D40 = .text:0x80139D40; // type:function size:0x15C
|
||||
fn_80139EA0__13dLytMapMain_cCFv = .text:0x80139EA0; // type:function size:0x58
|
||||
fn_80139F00 = .text:0x80139F00; // type:function size:0x44
|
||||
fn_80139F50 = .text:0x80139F50; // type:function size:0xE8
|
||||
fn_8013A040 = .text:0x8013A040; // type:function size:0x3C
|
||||
saveUnkMapData__13dLytMapMain_cFv = .text:0x80139F00; // type:function size:0x44
|
||||
initUnkMapData__13dLytMapMain_cFv = .text:0x80139F50; // type:function size:0xE8
|
||||
loadUnkMapData__13dLytMapMain_cFv = .text:0x8013A040; // type:function size:0x3C
|
||||
fn_8013A080 = .text:0x8013A080; // type:function size:0xE8
|
||||
fn_8013A170 = .text:0x8013A170; // type:function size:0xA84
|
||||
fn_8013AC00 = .text:0x8013AC00; // type:function size:0x4
|
||||
@@ -33531,8 +33531,8 @@ lbl_8051EFCC = .data:0x8051EFCC; // type:object size:0xC data:string
|
||||
lbl_8051EFD8 = .data:0x8051EFD8; // type:object size:0x20
|
||||
lbl_8051EFF8 = .data:0x8051EFF8; // type:object size:0x20
|
||||
lbl_8051F018 = .data:0x8051F018; // type:object size:0x18 data:string
|
||||
lbl_8051F030 = .data:0x8051F030; // type:object size:0x10
|
||||
lbl_8051F040 = .data:0x8051F040; // type:object size:0x10
|
||||
lbl_8051F030 = .data:0x8051F030; // type:object size:0xE data:string
|
||||
lbl_8051F040 = .data:0x8051F040; // type:object size:0xD data:string
|
||||
lbl_8051F050 = .data:0x8051F050; // type:object size:0x24
|
||||
lbl_8051F074 = .data:0x8051F074; // type:object size:0x10
|
||||
lbl_8051F084 = .data:0x8051F084; // type:object size:0x24
|
||||
@@ -40091,8 +40091,8 @@ lbl_80572734 = .sdata:0x80572734; // type:object size:0x8
|
||||
lbl_8057273C = .sdata:0x8057273C; // type:object size:0x8
|
||||
lbl_80572744 = .sdata:0x80572744; // type:object size:0x8
|
||||
lbl_8057274C = .sdata:0x8057274C; // type:object size:0x4 data:4byte
|
||||
lbl_80572750 = .sdata:0x80572750; // type:object size:0x8
|
||||
lbl_80572758 = .sdata:0x80572758; // type:object size:0x8
|
||||
lbl_80572750 = .sdata:0x80572750; // type:object size:0x5 data:string
|
||||
lbl_80572758 = .sdata:0x80572758; // type:object size:0x5 data:string
|
||||
lbl_80572760 = .sdata:0x80572760; // type:object size:0x8 data:4byte
|
||||
lbl_80572768 = .sdata:0x80572768; // type:object size:0x8 data:4byte
|
||||
lbl_80572770 = .sdata:0x80572770; // type:object size:0x8
|
||||
|
||||
@@ -150,6 +150,7 @@ public:
|
||||
}
|
||||
|
||||
bool fn_801B3EE0();
|
||||
void fn_801B3F20();
|
||||
|
||||
private:
|
||||
dRoom_c *createRoom(int roomid, bool flag0x40);
|
||||
|
||||
+4
-4
@@ -73,10 +73,10 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
Layout_c mLayout;
|
||||
nw4r::lyt::DrawInfo mDrawInfo;
|
||||
m2d::ResAccIf_c *mpResAcc;
|
||||
u32 mFlags;
|
||||
/* 0x10 */ Layout_c mLayout;
|
||||
/* 0x30 */ nw4r::lyt::DrawInfo mDrawInfo;
|
||||
/* 0x84 */ m2d::ResAccIf_c *mpResAcc;
|
||||
/* 0x88 */ u32 mFlags;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+78
-26
@@ -17,7 +17,7 @@
|
||||
#include "toBeSorted/d_flow_mgr.h"
|
||||
|
||||
/** Bird Statue Definition (StatueSelectDestination) */
|
||||
struct dMapSaveDefinition {
|
||||
struct dMapSaveObjDefinition {
|
||||
/* 0x00 */ const char *stageName;
|
||||
/* 0x04 */ u8 room;
|
||||
/* 0x05 */ u8 layer;
|
||||
@@ -26,6 +26,19 @@ struct dMapSaveDefinition {
|
||||
/* 0x0C */ const char *statueLabel;
|
||||
};
|
||||
|
||||
/** Something for making sure re-opening the map opens it in a similar state as when it was last closed */
|
||||
struct dMapSavedDataEntry {
|
||||
/* 0x00 */ s32 mapMode;
|
||||
/* 0x04 */ u8 mapUpDirection;
|
||||
/* 0x05 */ u8 field_0x05;
|
||||
/* 0x06 */ u8 field_0x06;
|
||||
};
|
||||
|
||||
struct dMapSavedData {
|
||||
/* 0x00 */ dMapSavedDataEntry entries[6];
|
||||
/* 0x30 */ bool islandNamesOn;
|
||||
};
|
||||
|
||||
struct dMapFootPrintEntry {
|
||||
/* 0x00 */ dMapFootPrintEntry *pPrev;
|
||||
/* 0x04 */ dMapFootPrintEntry *pNext;
|
||||
@@ -406,6 +419,14 @@ public:
|
||||
STATE_FUNC_DECLARE(dLytMapSaveCaption_c, Wait);
|
||||
STATE_FUNC_DECLARE(dLytMapSaveCaption_c, Out);
|
||||
|
||||
void build(d2d::ResAccIf_c *resAcc);
|
||||
void remove();
|
||||
void execute();
|
||||
void draw();
|
||||
|
||||
void setType(s32 type);
|
||||
void setLabel(const char *label);
|
||||
|
||||
private:
|
||||
/* 0x000 */ UI_STATE_MGR_DECLARE(dLytMapSaveCaption_c);
|
||||
/* 0x03C */ d2d::LytBase_c mLyt;
|
||||
@@ -415,7 +436,8 @@ private:
|
||||
// Size 0x190
|
||||
class dLytMapSaveObj_c {
|
||||
public:
|
||||
dLytMapSaveObj_c() : mStateMgr(*this, sStateID::null), field_0x18C(0), field_0x18D(0), field_0x18E(0) {}
|
||||
dLytMapSaveObj_c()
|
||||
: mStateMgr(*this, sStateID::null), mSelectRequest(false), mDecideRequest(false), mDecideFinished(false) {}
|
||||
|
||||
STATE_FUNC_DECLARE(dLytMapSaveObj_c, Wait);
|
||||
STATE_FUNC_DECLARE(dLytMapSaveObj_c, ToSelect);
|
||||
@@ -423,13 +445,22 @@ public:
|
||||
STATE_FUNC_DECLARE(dLytMapSaveObj_c, ToWait);
|
||||
STATE_FUNC_DECLARE(dLytMapSaveObj_c, Decide);
|
||||
|
||||
void build(d2d::ResAccIf_c *resAcc);
|
||||
void remove();
|
||||
void execute();
|
||||
void draw();
|
||||
|
||||
void setPosition(const mVec3_c &position);
|
||||
void setAlpha(u8 alpha);
|
||||
void init();
|
||||
|
||||
private:
|
||||
/* 0x000 */ UI_STATE_MGR_DECLARE(dLytMapSaveObj_c);
|
||||
/* 0x03C */ d2d::LytBase_c mLyt;
|
||||
/* 0x0CC */ d2d::AnmGroup_c mAnmGroups[3];
|
||||
/* 0x18C */ u8 field_0x18C;
|
||||
/* 0x18D */ u8 field_0x18D;
|
||||
/* 0x18E */ u8 field_0x18E;
|
||||
/* 0x18C */ bool mSelectRequest;
|
||||
/* 0x18D */ bool mDecideRequest;
|
||||
/* 0x18E */ bool mDecideFinished;
|
||||
};
|
||||
|
||||
// TODO, name made up
|
||||
@@ -444,7 +475,7 @@ public:
|
||||
/** 2D UI - Map - beacon preview icon following the cursor */
|
||||
class dLytMapPutIcon_c {
|
||||
public:
|
||||
dLytMapPutIcon_c() {}
|
||||
dLytMapPutIcon_c() : mVisible(false), field_0x98(0.0f, 0.0f) {}
|
||||
virtual ~dLytMapPutIcon_c() {}
|
||||
|
||||
void build(d2d::ResAccIf_c *resAcc);
|
||||
@@ -458,7 +489,7 @@ public:
|
||||
private:
|
||||
/* 0x04 */ d2d::LytBase_c mLyt;
|
||||
/* 0x94 */ bool mVisible;
|
||||
/* 0x95 */ u8 _0x95[0x9C - 0x95];
|
||||
/* 0x98 */ mVec2_c field_0x98;
|
||||
};
|
||||
|
||||
class dLytMapMain_c : public m2d::Base_c {
|
||||
@@ -477,7 +508,7 @@ public:
|
||||
bool fn_80139EA0() const;
|
||||
void lightPillarRelated(s32, s32, s32);
|
||||
|
||||
const dMapSaveDefinition *getSaveDefinition(s32 province, s32 statueIdx) const;
|
||||
const dMapSaveObjDefinition *getSaveObjDefinition(s32 province, s32 statueIdx) const;
|
||||
|
||||
STATE_FUNC_DECLARE(dLytMapMain_c, Invisible);
|
||||
STATE_FUNC_DECLARE(dLytMapMain_c, RenderingWait);
|
||||
@@ -536,6 +567,15 @@ private:
|
||||
void zoomOut();
|
||||
void zoomIn();
|
||||
|
||||
void loadTextboxes();
|
||||
|
||||
void saveUnkMapData();
|
||||
void initUnkMapData();
|
||||
void loadUnkMapData();
|
||||
|
||||
static dMapSavedData sSavedMapData;
|
||||
static const dMapSavedData sDefaultMapData;
|
||||
|
||||
/* 0x0010 */ UI_STATE_MGR_DECLARE(dLytMapMain_c);
|
||||
/* 0x004C */ dFlowMgrBase_c mFlowMgr;
|
||||
/* 0x00A4 */ dFlow_c mFlow;
|
||||
@@ -554,9 +594,6 @@ private:
|
||||
/* 0x64C0 */ dLytMapFootPrints_c mFootPrints;
|
||||
|
||||
/* 0x6664 */ dLytMapPutIcon_c mPutIcon;
|
||||
|
||||
/* 0x6700 */ u8 _0x6700[0x6704 - 0x6700];
|
||||
|
||||
/* 0x6704 */ dLytMapSaveObj_c mSaveObjs[12];
|
||||
/* 0x79C4 */ dLytMapSaveCaption_c mSaveCaption;
|
||||
/* 0x7BD0 */ dLytMapSavePopup_c mSavePopup;
|
||||
@@ -564,9 +601,9 @@ private:
|
||||
|
||||
/* 0x8208 */ u8 _0x8208[0x821C - 0x8208];
|
||||
|
||||
/* 0x821C */ nw4r::lyt::Bounding **field_0x821C[10];
|
||||
/* 0x8244 */ nw4r::lyt::Bounding **field_0x8244[6];
|
||||
/* 0x825C */ nw4r::lyt::Bounding **field_0x825C[12];
|
||||
/* 0x821C */ nw4r::lyt::Bounding *field_0x821C[10];
|
||||
/* 0x8244 */ nw4r::lyt::Bounding *field_0x8244[6];
|
||||
/* 0x825C */ nw4r::lyt::Bounding *field_0x825C[12];
|
||||
/* 0x828C */ mVec3_c field_0x828C[12];
|
||||
|
||||
/* 0x831C */ u8 _0x831C[0x832C - 0x831C];
|
||||
@@ -591,13 +628,16 @@ private:
|
||||
/* 0x8C64 */ s32 field_0x8C64;
|
||||
/* 0x8C68 */ s32 field_0x8C68;
|
||||
|
||||
/* 0x8C6C */ u8 _0x8C6C[0x8C90 - 0x8C6C];
|
||||
/* 0x8C6C */ UNKWORD field_0x8C6C;
|
||||
|
||||
/* 0x8C70 */ u8 _0x8C70[0x8C90 - 0x8C70];
|
||||
|
||||
/* 0x8C90 */ u8 field_0x8C90;
|
||||
/* 0x8C91 */ u8 field_0x8C91;
|
||||
/* 0x8C92 */ u8 field_0x8C92;
|
||||
/* 0x8C93 */ u8 field_0x8C93;
|
||||
/* 0x8C94 */ s32 field_0x8C94;
|
||||
|
||||
/* 0x8C98 */ u8 _0x8C98[0x8C9C - 0x8C98];
|
||||
|
||||
/* 0x8C98 */ UNKWORD field_0x8C98;
|
||||
/* 0x8C9C */ UNKWORD field_0x8C9C;
|
||||
|
||||
/* 0x8CA0 */ u8 _0x8CA0[0x8CA4 - 0x8CA0];
|
||||
@@ -605,8 +645,11 @@ private:
|
||||
/* 0x8CA4 */ s32 field_0x8CA4;
|
||||
/* 0x8CA8 */ s32 field_0x8CA8;
|
||||
|
||||
/* 0x8CAC */ u8 _0x8CAC[0x8CC0 - 0x8CAC];
|
||||
/* 0x8CAC */ u8 field_0x8CAC;
|
||||
|
||||
/* 0x8CAD */ u8 _0x8CAC[0x8CBC - 0x8CAD];
|
||||
|
||||
/* 0x8CBC */ nw4r::lyt::Bounding *mpMapBounding;
|
||||
/* 0x8CC0 */ bool field_0x8CC0;
|
||||
/* 0x8CC1 */ bool field_0x8CC1;
|
||||
/* 0x8CC4 */ mVec3_c field_0x8CC4;
|
||||
@@ -636,16 +679,25 @@ private:
|
||||
/* 0x8D6B */ u8 field_0x8D6B;
|
||||
/* 0x8D6C */ UNKWORD field_0x8D6C;
|
||||
/* 0x8D70 */ UNKWORD field_0x8D70;
|
||||
/* 0x8D74 */ u8 _0x8D74[0x8D94 - 0x8D74];
|
||||
/* 0x8D74 */ u8 _0x8D74[0x8D78 - 0x8D74];
|
||||
/* 0x8D78 */ f32 field_0x8D78;
|
||||
/* 0x8D7C */ f32 field_0x8D7C;
|
||||
/* 0x8D80 */ f32 field_0x8D80;
|
||||
/* 0x8D84 */ f32 field_0x8D84;
|
||||
/* 0x8D88 */ f32 field_0x8D88;
|
||||
/* 0x8D8C */ u8 _0x8D8C[0x8D94 - 0x8D8C];
|
||||
/* 0x8D94 */ d2d::SubPaneList mSubpaneList;
|
||||
/* 0x8DA0 */ d2d::SubPaneListNode mSubpane;
|
||||
/* 0x8DB0 */ u8 _0x8DB0[0x8DB4 - 0x8DB0];
|
||||
/* 0x8DB0 */ UNKWORD field_0x8DB0;
|
||||
/* 0x8DB4 */ bool mNavEnabled;
|
||||
/* 0x8DB4 */ bool field_0x8DB5;
|
||||
/* 0x8DB6 */ u8 _0x8DB6[0x8DBC - 0x8DB6];
|
||||
/* 0x8DB5 */ bool field_0x8DB5;
|
||||
/* 0x8DB8 */ UNKWORD field_0x8DB8;
|
||||
/* 0x8DBC */ bool mIslandNamesOn;
|
||||
/* 0x8DBD */ bool field_0x8DBD;
|
||||
/* 0x8DBE */ u8 _0x8DBE[0x8DC8 - 0x8DBE];
|
||||
/* 0x8DBE */ u8 field_0x8DBE;
|
||||
/* 0x8DBF */ u8 field_0x8DBF;
|
||||
/* 0x8DC0 */ UNKWORD field_0x8DC0;
|
||||
/* 0x8DC4 */ UNKWORD field_0x8DC4;
|
||||
/* 0x8DC8 */ dLytMapGlobal_c mGlobal;
|
||||
};
|
||||
|
||||
@@ -707,8 +759,8 @@ public:
|
||||
mMapMain.lightPillarRelated(p1, p2, p3);
|
||||
}
|
||||
|
||||
const dMapSaveDefinition *getSaveDefinition(s32 statueIdx) const {
|
||||
return mMapMain.getSaveDefinition(mMapMain.field_0x8C9C, statueIdx);
|
||||
const dMapSaveObjDefinition *getSaveObjDefinition(s32 statueIdx) const {
|
||||
return mMapMain.getSaveObjDefinition(mMapMain.field_0x8C9C, statueIdx);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -32,6 +32,10 @@ public:
|
||||
return field_0x20;
|
||||
}
|
||||
|
||||
void setField_0x28(const mVec2_c &v) {
|
||||
field_0x28 = v;
|
||||
}
|
||||
|
||||
const mVec3_c &getMapRotationCenter() const {
|
||||
return mMapRotationCenter;
|
||||
}
|
||||
@@ -94,8 +98,7 @@ private:
|
||||
/* 0x0C */ mVec2_c field_0x0C;
|
||||
/* 0x14 */ mVec3_c mMapRotationCenter;
|
||||
/* 0x20 */ mVec2_c field_0x20;
|
||||
/* 0x28 */ f32 field_0x28;
|
||||
/* 0x2C */ f32 field_0x2C;
|
||||
/* 0x28 */ mVec2_c field_0x28;
|
||||
/* 0x30 */ mVec3_c mPlayerPosition;
|
||||
/* 0x3C */ mAng mMapRotation;
|
||||
/* 0x40 */ f32 field_0x40;
|
||||
|
||||
@@ -300,6 +300,9 @@ public:
|
||||
mVec2_c(const EGG::Vector2f &other) {
|
||||
set(other.x, other.y);
|
||||
}
|
||||
mVec2_c(const nw4r::math::VEC2 &other) {
|
||||
set(other.x, other.y);
|
||||
}
|
||||
mVec2_c(f32 fx, f32 fy) {
|
||||
set(fx, fy);
|
||||
}
|
||||
|
||||
+561
-14
@@ -11,6 +11,8 @@
|
||||
#include "d/d_pad_nav.h"
|
||||
#include "d/d_player.h"
|
||||
#include "d/d_rumble.h"
|
||||
#include "d/d_sc_game.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_lyt_control_game.h"
|
||||
#include "d/lyt/d_lyt_map_global.h"
|
||||
@@ -21,10 +23,10 @@
|
||||
#include "egg/core/eggColorFader.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "m/m_video.h"
|
||||
#include "nw4r/g3d/g3d_obj.h"
|
||||
#include "nw4r/lyt/lyt_bounding.h"
|
||||
#include "nw4r/lyt/lyt_group.h"
|
||||
#include "nw4r/lyt/lyt_pane.h"
|
||||
#include "nw4r/lyt/lyt_window.h"
|
||||
#include "nw4r/lyt/lyt_types.h"
|
||||
#include "s/s_StateInterfaces.hpp"
|
||||
#include "sized_string.h"
|
||||
#include "toBeSorted/arc_managers/layout_arc_manager.h"
|
||||
@@ -1548,7 +1550,7 @@ void dLytMapSavePopup_c::draw() {
|
||||
pBounding = mpStatueBoundings[i];
|
||||
mAnmGroups[MAP_SAVE_POPUP_ACTION_ANIM_INPUT].bind(false);
|
||||
mAnmGroups[MAP_SAVE_POPUP_ACTION_ANIM_INPUT].setFrame(30.0f);
|
||||
const dMapSaveDefinition *def = dLytMap_c::GetInstance()->getSaveDefinition(i);
|
||||
const dMapSaveObjDefinition *def = dLytMap_c::GetInstance()->getSaveObjDefinition(i);
|
||||
f32 width = setStatueLabel(def->statueLabel);
|
||||
|
||||
f32 allScaleX = mLyt.findPane("N_all_00")->GetScale().x;
|
||||
@@ -1600,7 +1602,7 @@ f32 dLytMapSavePopup_c::setStatueLabel(const char *label) {
|
||||
textBox->GetLineWidth(nullptr);
|
||||
textBox = mLyt.getTextBox(sTPopup);
|
||||
textBox->setMessageWithGlobalTextProcessor2(label, nullptr);
|
||||
|
||||
|
||||
dWindow_c *w = mLyt.getWindow(sBg);
|
||||
w->UpdateSize(textBox, 60.0f);
|
||||
return w->GetSize().width;
|
||||
@@ -1610,48 +1612,297 @@ void dLytMapSavePopup_c::hide(s32 statueIdx) {
|
||||
mActions[statueIdx].hide();
|
||||
}
|
||||
|
||||
#define MAP_SAVE_CAPTION_ANIM_TYPE 0
|
||||
#define MAP_SAVE_CAPTION_ANIM_TEXTLINE 1
|
||||
#define MAP_SAVE_CAPTION_ANIM_IN 2
|
||||
#define MAP_SAVE_CAPTION_ANIM_LOOP 3
|
||||
#define MAP_SAVE_CAPTION_ANIM_OUT 4
|
||||
|
||||
#define MAP_SAVE_CAPTION_NUM_ANIMS 5
|
||||
|
||||
void dLytMapSaveCaption_c::initializeState_Invisible() {}
|
||||
void dLytMapSaveCaption_c::executeState_Invisible() {}
|
||||
void dLytMapSaveCaption_c::finalizeState_Invisible() {}
|
||||
|
||||
void dLytMapSaveCaption_c::initializeState_In() {}
|
||||
void dLytMapSaveCaption_c::executeState_In() {}
|
||||
void dLytMapSaveCaption_c::initializeState_In() {
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_IN].bind(false);
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_IN].setFrame(0.0f);
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_LOOP].bind(false);
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_LOOP].setFrame(0.0f);
|
||||
|
||||
mLyt.getLayout()->Animate(0);
|
||||
mLyt.calc();
|
||||
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_LOOP].unbind();
|
||||
}
|
||||
void dLytMapSaveCaption_c::executeState_In() {
|
||||
if (mAnmGroups[MAP_SAVE_CAPTION_ANIM_IN].isEndReached()) {
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_LOOP].bind(false);
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_IN].unbind();
|
||||
mStateMgr.changeState(StateID_In);
|
||||
}
|
||||
}
|
||||
void dLytMapSaveCaption_c::finalizeState_In() {}
|
||||
|
||||
void dLytMapSaveCaption_c::initializeState_Wait() {}
|
||||
void dLytMapSaveCaption_c::executeState_Wait() {}
|
||||
void dLytMapSaveCaption_c::finalizeState_Wait() {}
|
||||
|
||||
void dLytMapSaveCaption_c::initializeState_Out() {}
|
||||
void dLytMapSaveCaption_c::executeState_Out() {}
|
||||
void dLytMapSaveCaption_c::initializeState_Out() {
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_OUT].bind(false);
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_OUT].setFrame(0.0f);
|
||||
}
|
||||
void dLytMapSaveCaption_c::executeState_Out() {
|
||||
if (mAnmGroups[MAP_SAVE_CAPTION_ANIM_OUT].isEndReached()) {
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_OUT].unbind();
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_LOOP].unbind();
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
}
|
||||
}
|
||||
void dLytMapSaveCaption_c::finalizeState_Out() {}
|
||||
|
||||
static const d2d::LytBrlanMapping sMapSaveCaptionBrlanMap[] = {
|
||||
{ "mapSaveCaption_00_type.brlan", "G_type_00"},
|
||||
{"mapSaveCaption_00_textLine.brlan", "G_textLine_00"},
|
||||
{ "mapSaveCaption_00_in.brlan", "G__inOut_00"},
|
||||
{ "mapSaveCaption_00_loop.brlan", "G_loop_00"},
|
||||
{ "mapSaveCaption_00_out.brlan", "G__inOut_00"},
|
||||
};
|
||||
|
||||
void dLytMapSaveCaption_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
mLyt.setResAcc(resAcc);
|
||||
mLyt.build("mapSaveCaption_00.brlyt", nullptr);
|
||||
for (int i = 0; i < MAP_SAVE_CAPTION_NUM_ANIMS; i++) {
|
||||
mAnmGroups[i].init(
|
||||
sMapSaveCaptionBrlanMap[i].mFile, resAcc, mLyt.getLayout(), sMapSaveCaptionBrlanMap[i].mName
|
||||
);
|
||||
}
|
||||
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
}
|
||||
|
||||
void dLytMapSaveCaption_c::remove() {
|
||||
for (int i = 0; i < MAP_SAVE_CAPTION_NUM_ANIMS; i++) {
|
||||
mAnmGroups[i].remove();
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapSaveCaption_c::execute() {
|
||||
mStateMgr.executeState();
|
||||
for (int i = 0; i < MAP_SAVE_CAPTION_NUM_ANIMS; i++) {
|
||||
if (mAnmGroups[i].isBound()) {
|
||||
mAnmGroups[i].play();
|
||||
}
|
||||
}
|
||||
mLyt.calc();
|
||||
}
|
||||
|
||||
void dLytMapSaveCaption_c::draw() {
|
||||
if (*mStateMgr.getStateID() != StateID_Invisible) {
|
||||
mLyt.draw();
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapSaveCaption_c::setType(s32 type) {
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_TYPE].bind(false);
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_TYPE].setFrame(type);
|
||||
|
||||
mLyt.getLayout()->Animate(0);
|
||||
mLyt.calc();
|
||||
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_TYPE].unbind();
|
||||
}
|
||||
|
||||
void dLytMapSaveCaption_c::setLabel(const char *label) {
|
||||
mLyt.getTextBox("T_captionS_00")->setMessageWithGlobalTextProcessor2(label, nullptr);
|
||||
mLyt.getTextBox("T_caption_00")->setMessageWithGlobalTextProcessor2(label, nullptr);
|
||||
// ok
|
||||
const char *tmp = "T_captionS_00";
|
||||
dTextBox_c *box = mLyt.getTextBox(tmp);
|
||||
// Setting message twice...
|
||||
box->setMessageWithGlobalTextProcessor2(label, nullptr);
|
||||
|
||||
f32 width = box->GetLineWidth(nullptr);
|
||||
const wchar_t *text = dMessage_c::getTextMessageByLabel(label, true, nullptr, 0);
|
||||
s32 lines = box->calcTextLines(text, dMessage_c::getGlobalTagProcessor());
|
||||
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_TEXTLINE].bind(false);
|
||||
if (width < 226.0f) {
|
||||
if (lines == 1) {
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_TEXTLINE].setFrame(0.0f);
|
||||
} else {
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_TEXTLINE].setFrame(1.0f);
|
||||
}
|
||||
} else {
|
||||
if (lines == 1) {
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_TEXTLINE].setFrame(2.0f);
|
||||
} else {
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_TEXTLINE].setFrame(3.0f);
|
||||
}
|
||||
}
|
||||
|
||||
mLyt.getLayout()->Animate(0);
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_TEXTLINE].unbind();
|
||||
}
|
||||
|
||||
#define MAP_SAVE_OBJ_ANIM_ON_OFF 0
|
||||
#define MAP_SAVE_OBJ_ANIM_DECIDE 1
|
||||
#define MAP_SAVE_OBJ_ANIM_LOOP 2
|
||||
|
||||
#define MAP_SAVE_OBJ_NUM_ANIMS 3
|
||||
|
||||
void dLytMapSaveObj_c::initializeState_Wait() {}
|
||||
void dLytMapSaveObj_c::executeState_Wait() {}
|
||||
void dLytMapSaveObj_c::executeState_Wait() {
|
||||
if (mSelectRequest) {
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].bind(false);
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].setForward();
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].setFrame(0.0f);
|
||||
mStateMgr.changeState(StateID_ToSelect);
|
||||
}
|
||||
}
|
||||
void dLytMapSaveObj_c::finalizeState_Wait() {}
|
||||
|
||||
void dLytMapSaveObj_c::initializeState_ToSelect() {}
|
||||
void dLytMapSaveObj_c::executeState_ToSelect() {}
|
||||
void dLytMapSaveObj_c::executeState_ToSelect() {
|
||||
if (mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].isEndReached()) {
|
||||
dRumble_c::start(dRumble_c::sRumblePreset1, dRumble_c::FLAG_SLOT0);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_POINT_START_POINT);
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].unbind();
|
||||
mStateMgr.changeState(StateID_Select);
|
||||
}
|
||||
|
||||
if (mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].isBound()) {
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].play();
|
||||
}
|
||||
}
|
||||
void dLytMapSaveObj_c::finalizeState_ToSelect() {}
|
||||
|
||||
void dLytMapSaveObj_c::initializeState_Select() {}
|
||||
void dLytMapSaveObj_c::executeState_Select() {}
|
||||
void dLytMapSaveObj_c::executeState_Select() {
|
||||
if (!mSelectRequest) {
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].bind(false);
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].setBackward();
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].setToStart();
|
||||
mDecideRequest = false;
|
||||
mStateMgr.changeState(StateID_ToWait);
|
||||
} else if (mDecideRequest) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_DECIDE_START_POINT);
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_DECIDE].bind(false);
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_DECIDE].setFrame(0.0f);
|
||||
mStateMgr.changeState(StateID_Decide);
|
||||
}
|
||||
}
|
||||
void dLytMapSaveObj_c::finalizeState_Select() {}
|
||||
|
||||
void dLytMapSaveObj_c::initializeState_ToWait() {}
|
||||
void dLytMapSaveObj_c::executeState_ToWait() {}
|
||||
void dLytMapSaveObj_c::executeState_ToWait() {
|
||||
if (mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].isStop2()) {
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].unbind();
|
||||
mStateMgr.changeState(StateID_Select);
|
||||
}
|
||||
|
||||
if (mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].isBound()) {
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].play();
|
||||
}
|
||||
}
|
||||
void dLytMapSaveObj_c::finalizeState_ToWait() {}
|
||||
|
||||
void dLytMapSaveObj_c::initializeState_Decide() {}
|
||||
void dLytMapSaveObj_c::executeState_Decide() {}
|
||||
void dLytMapSaveObj_c::executeState_Decide() {
|
||||
if (mAnmGroups[MAP_SAVE_OBJ_ANIM_DECIDE].isEndReached()) {
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_DECIDE].unbind();
|
||||
mDecideFinished = true;
|
||||
}
|
||||
|
||||
if (mAnmGroups[MAP_SAVE_OBJ_ANIM_DECIDE].isBound()) {
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_DECIDE].play();
|
||||
}
|
||||
}
|
||||
void dLytMapSaveObj_c::finalizeState_Decide() {}
|
||||
|
||||
void dLytMapSaveObj_c::setPosition(const mVec3_c &position) {
|
||||
mLyt.getLayout()->GetRootPane()->SetTranslate(position);
|
||||
}
|
||||
|
||||
void dLytMapSaveObj_c::setAlpha(u8 alpha) {
|
||||
mLyt.getLayout()->GetRootPane()->SetAlpha(alpha);
|
||||
}
|
||||
|
||||
void dLytMapSaveObj_c::init() {
|
||||
mSelectRequest = false;
|
||||
mDecideRequest = false;
|
||||
mDecideFinished = false;
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].bind(false);
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].setFrame(0.0f);
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_ON_OFF].unbind();
|
||||
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_DECIDE].setFrame(0.0f);
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_LOOP].bind(false);
|
||||
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
}
|
||||
|
||||
static const d2d::LytBrlanMapping sMapSaveObjBrlanMap[] = {
|
||||
{ "mapSaveObj_00_saveObjOnOff.brlan", "G_saveBtn_00"},
|
||||
{"mapSaveObj_00_saveObjDecide.brlan", "G_saveBtn_00"},
|
||||
{ "mapSaveObj_00_saveObjLoop.brlan", "G_saveBtnLoop_00"},
|
||||
};
|
||||
|
||||
void dLytMapSaveObj_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
mLyt.setResAcc(resAcc);
|
||||
mLyt.build("mapSaveObj_00.brlyt", nullptr);
|
||||
for (int i = 0; i < MAP_SAVE_OBJ_NUM_ANIMS; i++) {
|
||||
mAnmGroups[i].init(sMapSaveObjBrlanMap[i].mFile, resAcc, mLyt.getLayout(), sMapSaveObjBrlanMap[i].mName);
|
||||
}
|
||||
|
||||
mLyt.getLayout()->GetRootPane()->SetInfluencedAlpha(true);
|
||||
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_IN].bind(false);
|
||||
mAnmGroups[MAP_SAVE_CAPTION_ANIM_IN].setFrame(0.0f);
|
||||
mLyt.calc();
|
||||
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
}
|
||||
|
||||
void dLytMapSaveObj_c::remove() {
|
||||
for (int i = 0; i < MAP_SAVE_OBJ_NUM_ANIMS; i++) {
|
||||
mAnmGroups[i].remove();
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapSaveObj_c::execute() {
|
||||
mStateMgr.executeState();
|
||||
if (mAnmGroups[MAP_SAVE_OBJ_ANIM_LOOP].isBound()) {
|
||||
mAnmGroups[MAP_SAVE_OBJ_ANIM_LOOP].play();
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapSaveObj_c::draw() {
|
||||
nw4r::lyt::Pane *root = mLyt.getLayout()->GetRootPane();
|
||||
// @bug calc should be in execute...
|
||||
mLyt.calc();
|
||||
root->Draw(mLyt.getDrawInfo());
|
||||
}
|
||||
|
||||
#pragma dont_inline on
|
||||
dLytMapMain_c::dLytMapMain_c()
|
||||
: mStateMgr(*this),
|
||||
mFlowMgr(&mFlow),
|
||||
mFloorBtnMgr(&mGlobal),
|
||||
mFootPrints(&mGlobal),
|
||||
field_0x8C6C(0),
|
||||
field_0x8C92(1),
|
||||
field_0x8C93(0),
|
||||
field_0x8C94(0),
|
||||
field_0x8C98(0),
|
||||
field_0x8CAC(0),
|
||||
field_0x8D38(0.0f, 0.0f),
|
||||
field_0x8D40(1.0f),
|
||||
field_0x8D44(0),
|
||||
@@ -1659,7 +1910,31 @@ dLytMapMain_c::dLytMapMain_c()
|
||||
field_0x8D48(0),
|
||||
field_0x8D4C(0.0f),
|
||||
field_0x8D50(0.0f),
|
||||
field_0x8D68(0) {}
|
||||
field_0x8D58(0),
|
||||
field_0x8D5C(1),
|
||||
field_0x8D60(0),
|
||||
field_0x8D64(0),
|
||||
field_0x8D68(0),
|
||||
field_0x8D6A(0),
|
||||
field_0x8D6B(0),
|
||||
field_0x8D6C(0),
|
||||
field_0x8D70(0),
|
||||
field_0x8DB0(0),
|
||||
mNavEnabled(false),
|
||||
field_0x8DB5(false),
|
||||
field_0x8DB8(0),
|
||||
mIslandNamesOn(false),
|
||||
field_0x8DBD(0),
|
||||
field_0x8DBE(0),
|
||||
field_0x8DBF(0),
|
||||
field_0x8DC0(-1),
|
||||
field_0x8DC4(0) {
|
||||
field_0x8D78 = 0.0f;
|
||||
field_0x8D7C = 0.0f;
|
||||
field_0x8D80 = 0.0f;
|
||||
field_0x8D84 = 0.0f;
|
||||
field_0x8D88 = 0.0f;
|
||||
}
|
||||
#pragma dont_inline reset
|
||||
|
||||
dLytMapMain_c::~dLytMapMain_c() {
|
||||
@@ -1674,6 +1949,252 @@ dLytMapGlobal_c *dLytMapMain_c::getGlobal() {
|
||||
return &mGlobal;
|
||||
}
|
||||
|
||||
dMapSavedData dLytMapMain_c::sSavedMapData = {
|
||||
{
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
},
|
||||
false
|
||||
};
|
||||
|
||||
const dMapSavedData dLytMapMain_c::sDefaultMapData = {
|
||||
{
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
{dLytMapGlobal_c::MAPMODE_STAGE, 1, 1, 0},
|
||||
},
|
||||
false
|
||||
};
|
||||
|
||||
static const char *const sTextboxLabelMapping[][2] = {
|
||||
{ "T_sNameS_00", "MAP_00"},
|
||||
{ "T_sName_00", "MAP_00"},
|
||||
{ "T_pNameS_00", "MAP_01"},
|
||||
{ "T_pName_00", "MAP_01"},
|
||||
{ "T_pNameS_01", "MAP_01"},
|
||||
{ "T_fNameS_00", "MAP_02"},
|
||||
{ "T_fName_00", "MAP_02"},
|
||||
{ "T_fNameS_01", "MAP_02"},
|
||||
{ "T_nFnameS_00", "MAP_03"},
|
||||
{ "T_nFname_00", "MAP_03"},
|
||||
{ "T_nFnameS_01", "MAP_03"},
|
||||
{ "T_lNameS_00", "MAP_04"},
|
||||
{ "T_lName_00", "MAP_04"},
|
||||
{ "T_lNameS_01", "MAP_04"},
|
||||
{ "T_sVnameS_00", "MAP_05"},
|
||||
{ "T_sVname_00", "MAP_05"},
|
||||
{ "T_sVnameS_01", "MAP_05"},
|
||||
{ "T_nVnameS_00", "MAP_06"},
|
||||
{ "T_nVname_00", "MAP_06"},
|
||||
{ "T_nVnameS_01", "MAP_06"},
|
||||
{ "T_dNameS_01", "MAP_08"},
|
||||
{ "T_dName_01", "MAP_08"},
|
||||
{ "T_dNameS_00", "MAP_08"},
|
||||
{ "T_dNameS_02", "MAP_07"},
|
||||
{ "T_dName_02", "MAP_07"},
|
||||
{ "T_dNameS_03", "MAP_07"},
|
||||
{ "T_gNameS_01", "MAP_10"},
|
||||
{ "T_gName_01", "MAP_10"},
|
||||
{ "T_gNameS_04", "MAP_10"},
|
||||
{ "T_gNameS_00", "MAP_09"},
|
||||
{ "T_gName_00", "MAP_09"},
|
||||
{ "T_gNameS_03", "MAP_09"},
|
||||
{ "T_gNameS_02", "MAP_40"},
|
||||
{ "T_gName_02", "MAP_40"},
|
||||
{ "T_gNameS_05", "MAP_40"},
|
||||
{ "T_lastDs_00", "MAP_17"},
|
||||
{ "T_lastD_00", "MAP_17"},
|
||||
{ "T_pampkinNS_00", "MAP_27"},
|
||||
{ "T_pampkinN_00", "MAP_27"},
|
||||
{ "T_teryNS_00", "MAP_28"},
|
||||
{ "T_teryN_00", "MAP_28"},
|
||||
{ "T_tikurinNS_00", "MAP_29"},
|
||||
{ "T_tikurinN_00", "MAP_29"},
|
||||
{ "T_musiNS_00", "MAP_31"},
|
||||
{ "T_musiN_00", "MAP_31"},
|
||||
{ "T_utaNS_00", "MAP_30"},
|
||||
{ "T_utaN_00", "MAP_30"},
|
||||
{ "T_ruretouNS_00", "MAP_26"},
|
||||
{ "T_ruretouN_00", "MAP_26"},
|
||||
{ "T_toForestS_00", "MAP_58"},
|
||||
{ "T_toForest_00", "MAP_58"},
|
||||
{"T_toVolcanoS_00", "MAP_59"},
|
||||
{ "T_toVolcano_00", "MAP_59"},
|
||||
{ "T_toDesertS_00", "MAP_60"},
|
||||
{ "T_toDesert_00", "MAP_60"},
|
||||
{ "T_fD1s_00", "MAP_11"},
|
||||
{ "T_fD1_00", "MAP_11"},
|
||||
{ "T_fD2s_00", "MAP_14"},
|
||||
{ "T_fD2_00", "MAP_14"},
|
||||
{ "T_vD2s_00", "MAP_16"},
|
||||
{ "T_vD2_00", "MAP_16"},
|
||||
{ "T_vD1s_00", "MAP_12"},
|
||||
{ "T_vD1_00", "MAP_12"},
|
||||
{ "T_dD1s_00", "MAP_13"},
|
||||
{ "T_dD1_00", "MAP_13"},
|
||||
{ "T_dD2s_00", "MAP_15"},
|
||||
{ "T_dD2_00", "MAP_15"},
|
||||
{ "T_lastDs_00", "MAP_17"},
|
||||
{ "T_lastD_00", "MAP_17"},
|
||||
};
|
||||
|
||||
static const char *sHyliasRealmMapLabel = "MAP_64";
|
||||
|
||||
void dLytMapMain_c::loadTextboxes() {
|
||||
bool hyliasRealm = dScGame_c::isCurrentStage("F403") || dScGame_c::isCurrentStage("F404");
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(sTextboxLabelMapping); i++) {
|
||||
dTextBox_c *box = mLyt.getTextBox(sTextboxLabelMapping[i][0]);
|
||||
if (hyliasRealm && (i == 2 || i == 3 || i == 4)) {
|
||||
// Replace "Sealed Grounds" with "Hylia's Realm"
|
||||
box->setMessageWithGlobalTextProcessor2(sHyliasRealmMapLabel, nullptr);
|
||||
} else {
|
||||
box->setMessageWithGlobalTextProcessor2(sTextboxLabelMapping[i][1], nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
static const d2d::LytBrlanMapping sMapMainBrlanMap[] = {
|
||||
{ "map_00_in.brlan", "G_inOut_00"},
|
||||
{ "map_00_titleOnOff.brlan", "G_titleOnOff_00"},
|
||||
{ "map_00_nOnOff.brlan", "G_nOnOff_00"},
|
||||
{ "map_00_mapV.brlan", "G_mapV_00"},
|
||||
{ "map_00_worldState.brlan", "G_worldState"},
|
||||
{ "map_00_player2patten.brlan", "G_2Pattern_00"},
|
||||
{ "map_00_rotate.brlan", "G_rotate_00"},
|
||||
{ "map_00_out.brlan", "G_inOut_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_plainC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_forestC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_nForestC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_sVolcanoC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_mineC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_desertC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_lakeC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_glenC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_seaC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_nVolcanoC_00"},
|
||||
{ "map_00_mapDraw.brlan", "G_glenC_01"},
|
||||
{ "map_00_skyLoftUpDown.brlan", "G_skyloftUD_00"},
|
||||
{"map_00_LinkPositionLight.brlan", "G_linkPointL_00"},
|
||||
{ "map_00_mapZinForest.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_zoomWakuIn.brlan", "G_zoomWaku_00"},
|
||||
{ "map_00_zoomWakuOut.brlan", "G_zoomWaku_00"},
|
||||
{ "map_00_mapZoutForest.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZinPlant.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaOutPlant.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaInPlant.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZoutPlant.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZinDesert.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZoutDesert.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZinVolcano.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZoutVolcano.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaOutForest.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaOutDesert.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaOutVolcano.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaInForest.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaInDesert.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaInVolcano.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaInSkyMap.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaOutSkyMap.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaInSkyMap2.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaOutSkyMap2.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaInSkyCorse.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_mapZaOutSkyCorse.brlan", "G_ZoomInOut_00"},
|
||||
{ "map_00_sunRote.brlan", "G_sun_00"},
|
||||
{ "map_00_inNoCam.brlan", "G_inOut_00"},
|
||||
{ "map_00_outNoCam.brlan", "G_inOut_00"},
|
||||
{ "map_00_cloudLoop.brlan", "G_cloudLoop_00"},
|
||||
{ "map_00_lightLoop.brlan", "G_lightLoop_00"},
|
||||
{ "map_00_nushiLoop.brlan", "G_nushiLoop_00"},
|
||||
{ "map_00_type.brlan", "G_type_00"},
|
||||
{ "map_00_kumoPattern.brlan", "G_kumoPattern_00"},
|
||||
{ "map_00_titleLine.brlan", "G_textLine_00"},
|
||||
};
|
||||
|
||||
#define MAP_MAIN_ANIM_IN 0
|
||||
|
||||
static const char *sGroupName = "G_ref_00";
|
||||
|
||||
static const char *sBoundingNames[] = {
|
||||
"B_noroshi_00", "B_houkoul_00", "B_remoCon_00", "B_nunchaku_00", "B_tittle_00", "B_saveIcon_00",
|
||||
"B_saveIcon_01", "B_saveIcon_02", "B_saveIcon_03", "B_saveIcon_04", "B_saveIcon_05", "B_saveIcon_06",
|
||||
"B_saveIcon_07", "B_saveIcon_08", "B_saveIcon_28", "B_saveIcon_10", "B_saveIcon_11", "B_saveIcon_12",
|
||||
"B_saveIcon_13", "B_saveIcon_14", "B_saveIcon_15", "B_saveIcon_16", "B_saveIcon_17", "B_saveIcon_18",
|
||||
"B_saveIcon_19", "B_saveIcon_20", "B_saveIcon_21", "B_saveIcon_22", "B_saveIcon_23", "B_saveIcon_24",
|
||||
"B_saveIcon_25", "B_saveIcon_26", "B_saveIcon_27",
|
||||
};
|
||||
|
||||
void dLytMapMain_c::build() {
|
||||
field_0x8DBF = 0;
|
||||
field_0x8DB0 = 0;
|
||||
if (dScGame_c::isCurrentStage("F102")) {
|
||||
// awesome but unnecessary
|
||||
field_0x8DB0 = 0;
|
||||
}
|
||||
|
||||
dStage_c::GetInstance()->fn_801B3F20();
|
||||
d2d::ResAccIf_c *resAcc = dLytMap_c::getResAcc();
|
||||
mLyt.setResAcc(resAcc);
|
||||
mLyt.build("map_00.brlyt", nullptr);
|
||||
mVec2_c scale = mLyt.getDrawInfo().GetLocationAdjustScale();
|
||||
getGlobal()->setField_0x28(scale);
|
||||
|
||||
// TODO define
|
||||
for (int i = 0; i < 54; i++) {
|
||||
mAnmGroups[i].init(sMapMainBrlanMap[i].mFile, resAcc, mLyt.getLayout(), sMapMainBrlanMap[i].mName);
|
||||
}
|
||||
|
||||
mFloorBtnMgr.build(resAcc);
|
||||
mSubpane.mpLytPane = &mFloorBtnMgr;
|
||||
mSubpaneList.PushBack(&mSubpane);
|
||||
|
||||
d2d::dSubPane::linkMeters(mLyt.getLayout()->GetGroupContainer()->FindGroupByName(sGroupName), &mSubpaneList);
|
||||
mFootPrints.build(resAcc);
|
||||
|
||||
mPinIconAggregate.build(resAcc);
|
||||
mPutIcon.build(resAcc);
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(mSaveObjs); i++) {
|
||||
mSaveObjs[i].build(resAcc);
|
||||
}
|
||||
|
||||
mSaveCaption.build(resAcc);
|
||||
mSavePopup.build(resAcc);
|
||||
mPopupInfo.build(resAcc);
|
||||
|
||||
mAnmGroups[MAP_MAIN_ANIM_IN].bind(false);
|
||||
mAnmGroups[MAP_MAIN_ANIM_IN].setToEnd();
|
||||
mLyt.calc();
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(sBoundingNames); i++) {
|
||||
nw4r::lyt::Bounding *b = mLyt.findBounding(sBoundingNames[i]);
|
||||
b->SetVisible(false);
|
||||
if (i >= 5 && i < 15) {
|
||||
field_0x821C[i - 5] = b;
|
||||
} else if (i >= 15 && i < 21) {
|
||||
field_0x8244[i - 15] = b;
|
||||
} else if (i >= 21 && i < 33) {
|
||||
field_0x825C[i - 21] = b;
|
||||
}
|
||||
|
||||
field_0x832C[i].init(b, 0x02, 2, 0);
|
||||
dCsMgr_c::GetInstance()->registCursorTarget(&field_0x832C[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(sBoundingNames); i++) {
|
||||
field_0x832C[i].resetCachedHitboxes();
|
||||
field_0x832C[i].execute();
|
||||
}
|
||||
|
||||
mpMapBounding = mLyt.findBounding("B_map_00");
|
||||
mpMapBounding->SetScale(mVec2_c(1.0f, 1.0f));
|
||||
}
|
||||
|
||||
void dLytMapMain_c::draw() {}
|
||||
|
||||
void dLytMap_c::build() {
|
||||
@@ -1691,6 +2212,32 @@ void lytMapusesSizedWString() {
|
||||
sString.sprintf(L"%ld", 0);
|
||||
}
|
||||
|
||||
void dLytMapMain_c::saveUnkMapData() {
|
||||
dMapSavedDataEntry &data = sSavedMapData.entries[field_0x8C68];
|
||||
data.field_0x06 = 1;
|
||||
data.mapMode = field_0x8CA4;
|
||||
data.mapUpDirection = field_0x8C90;
|
||||
data.field_0x05 = field_0x8C92;
|
||||
sSavedMapData.islandNamesOn = mIslandNamesOn;
|
||||
}
|
||||
|
||||
void dLytMapMain_c::initUnkMapData() {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
sSavedMapData.entries[i].field_0x06 = sDefaultMapData.entries[i].field_0x06;
|
||||
sSavedMapData.entries[i].mapMode = sDefaultMapData.entries[i].mapMode;
|
||||
sSavedMapData.entries[i].mapUpDirection = sDefaultMapData.entries[i].mapUpDirection;
|
||||
sSavedMapData.entries[i].field_0x05 = sDefaultMapData.entries[i].field_0x05;
|
||||
}
|
||||
sSavedMapData.islandNamesOn = sDefaultMapData.islandNamesOn;
|
||||
}
|
||||
|
||||
void dLytMapMain_c::loadUnkMapData() {
|
||||
field_0x8CA4 = sSavedMapData.entries[field_0x8C68].mapMode;
|
||||
field_0x8C90 = sSavedMapData.entries[field_0x8C68].mapUpDirection;
|
||||
field_0x8C92 = sSavedMapData.entries[field_0x8C68].field_0x05;
|
||||
mIslandNamesOn = sSavedMapData.islandNamesOn;
|
||||
}
|
||||
|
||||
void dLytMapMain_c::initializeState_Invisible() {}
|
||||
void dLytMapMain_c::executeState_Invisible() {}
|
||||
void dLytMapMain_c::finalizeState_Invisible() {}
|
||||
|
||||
@@ -9,8 +9,7 @@ dLytMapGlobal_c::dLytMapGlobal_c()
|
||||
field_0x0C(0.0f, 0.0f),
|
||||
mMapRotationCenter(0.0f, 0.0f, 0.0f),
|
||||
field_0x20(0.0f, 0.0f),
|
||||
field_0x28(0.0f),
|
||||
field_0x2C(0.0f),
|
||||
field_0x28(0.0f, 0.0f),
|
||||
mMapRotation(0),
|
||||
field_0x40(1.0f),
|
||||
field_0x44(1.0f),
|
||||
@@ -40,7 +39,7 @@ void dLytMapGlobal_c::projectOntoMap(
|
||||
|
||||
work.x *= f2 * f1;
|
||||
work.z *= f2 * f1;
|
||||
work.x *= field_0x28;
|
||||
work.x *= field_0x28.x;
|
||||
|
||||
result.x = work.x;
|
||||
result.y = -work.z;
|
||||
@@ -75,7 +74,7 @@ void dLytMapGlobal_c::unprojectFromMap(
|
||||
f32 tmp = 1.0f / f1;
|
||||
mVec2_c diff = position - v1;
|
||||
|
||||
work.x = diff.x * tmp * (1.0f / field_0x28);
|
||||
work.x = diff.x * tmp * (1.0f / field_0x28.x);
|
||||
work.z = -diff.y * tmp;
|
||||
|
||||
work = work + v2;
|
||||
|
||||
Reference in New Issue
Block a user