mirror of
https://github.com/zeldaret/ss
synced 2026-06-25 01:32:01 -04:00
Merge pull request #257 from robojumper/d_lyt_map_more
some more map things
This commit is contained in:
@@ -541,7 +541,11 @@ toBeSorted/bigboss_model_math_stuff.cpp:
|
||||
.sbss start:0x80575410 end:0x80575418
|
||||
|
||||
toBeSorted/actor_event_flow_manager_related.cpp:
|
||||
.text start:0x800C3900 end:0x800C447C align:16
|
||||
.text start:0x800C3900 end:0x800C3AEC align:16
|
||||
|
||||
toBeSorted/d_flow_mgr.cpp:
|
||||
.text start:0x800C3AF0 end:0x800C447C align:16
|
||||
.data start:0x80511B18 end:0x80511B30
|
||||
|
||||
d/d_lyt_base.cpp:
|
||||
.text start:0x800C4480 end:0x800C4690 align:16
|
||||
@@ -909,12 +913,16 @@ d/lyt/d_lyt_auto_explain.cpp:
|
||||
.sdata2 start:0x80579F10 end:0x80579F28
|
||||
.bss start:0x805AF2F0 end:0x805AF3F0
|
||||
|
||||
d/lyt/d_lyt_map_global.cpp:
|
||||
.text start:0x8012D190 end:0x8012D4A8 align:16
|
||||
.sbss start:0x805754A0 end:0x805754A8
|
||||
.sdata2 start:0x80579F28 end:0x80579F30
|
||||
|
||||
d/lyt/d_lyt_map_capture.cpp:
|
||||
.text start:0x8012D190 end:0x8012DC28 align:16
|
||||
.text start:0x8012D4B0 end:0x8012DC28 align:16
|
||||
.ctors start:0x804DB768 end:0x804DB76C
|
||||
.data start:0x8051EA08 end:0x8051EAE0
|
||||
.sbss start:0x805754A0 end:0x805754A8
|
||||
.sdata2 start:0x80579F28 end:0x80579F40
|
||||
.sdata2 start:0x80579F30 end:0x80579F40
|
||||
.bss start:0x805AF3F0 end:0x805AF470
|
||||
|
||||
d/lyt/d_lyt_map.cpp:
|
||||
@@ -1223,11 +1231,13 @@ d/a/d_a_door_base.cpp:
|
||||
.data start:0x80528F20 end:0x80528FB0
|
||||
.sbss start:0x80575668 end:0x80575670
|
||||
|
||||
d/lyt/d_lyt_map_popup.cpp:
|
||||
d/lyt/d_lyt_map_markers.cpp:
|
||||
.text start:0x801792D0 end:0x80189F9C align:16
|
||||
.rodata start:0x804E9AD0 end:0x804E9CB0
|
||||
.data start:0x80528FB0 end:0x8052A880
|
||||
.sdata start:0x80572BB0 end:0x80572D08
|
||||
.sbss start:0x80575670 end:0x80575678
|
||||
.sdata2 start:0x8057AC78 end:0x8057ACF0
|
||||
|
||||
d/d_pouch.cpp:
|
||||
.text start:0x80189FA0 end:0x8018B4A4 align:16
|
||||
|
||||
+380
-366
File diff suppressed because it is too large
Load Diff
+6
-4
@@ -488,6 +488,7 @@ config.libs = [
|
||||
Object(Matching, "d/flag/flag_managers.cpp"),
|
||||
Object(NonMatching, "toBeSorted/bigboss_model_math_stuff.cpp"),
|
||||
Object(NonMatching, "toBeSorted/actor_event_flow_manager_related.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_flow_mgr.cpp"),
|
||||
Object(NonMatching, "d/d_lyt_base.cpp"),
|
||||
Object(NonMatching, "toBeSorted/unk_npc_path_stuff_1.cpp"),
|
||||
Object(NonMatching, "toBeSorted/unk_npc_path_stuff_2.cpp"),
|
||||
@@ -524,9 +525,9 @@ config.libs = [
|
||||
Object(NonMatching, "d/lyt/msg_window/d_lyt_msg_window.cpp"),
|
||||
Object(NonMatching, "d/lyt/msg_window/d_lyt_msg_window_select_btn.cpp"),
|
||||
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_common.cpp"),
|
||||
Object(NonMatching, "d/lyt/msg_window/d_lyt_msg_window_talk.cpp"),
|
||||
Object(NonMatching, "d/lyt/msg_window/d_lyt_msg_window_link.cpp"),
|
||||
Object(NonMatching, "d/lyt/msg_window/d_lyt_msg_window_get.cpp"),
|
||||
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_talk.cpp"),
|
||||
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_link.cpp"),
|
||||
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_get.cpp"),
|
||||
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_sword.cpp"),
|
||||
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_wood.cpp"),
|
||||
Object(Matching, "d/lyt/msg_window/d_lyt_msg_window_stone.cpp"),
|
||||
@@ -534,6 +535,7 @@ config.libs = [
|
||||
Object(NonMatching, "d/lyt/msg_window/d_lyt_simple_window.cpp"),
|
||||
Object(Matching, "d/lyt/d_lyt_auto_caption.cpp"),
|
||||
Object(Matching, "d/lyt/d_lyt_auto_explain.cpp"),
|
||||
Object(Matching, "d/lyt/d_lyt_map_global.cpp"),
|
||||
Object(NonMatching, "d/lyt/d_lyt_map_capture.cpp"),
|
||||
Object(NonMatching, "d/lyt/d_lyt_map.cpp"),
|
||||
Object(Matching, "d/lyt/d_lyt_note.cpp"),
|
||||
@@ -576,7 +578,7 @@ config.libs = [
|
||||
Object(Matching, "d/lyt/d_screen_fader.cpp"),
|
||||
Object(NonMatching, "d/a/d_a_bird_base.cpp"),
|
||||
Object(NonMatching, "d/a/d_a_door_base.cpp"),
|
||||
Object(NonMatching, "d/lyt/d_lyt_map_popup.cpp"),
|
||||
Object(NonMatching, "d/lyt/d_lyt_map_markers.cpp"),
|
||||
Object(NonMatching, "d/d_pouch.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_beacon.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_underground.cpp"),
|
||||
|
||||
@@ -79,6 +79,7 @@ public:
|
||||
static bool isRupee(ITEM_ID item);
|
||||
static bool isKeyPiece(ITEM_ID item);
|
||||
static bool isTreasure(ITEM_ID item);
|
||||
bool isTriforce() const;
|
||||
|
||||
static bool getItemGetEventName(u16 item, const char **outName);
|
||||
static void itemGetEventStart(dAcBase_c *);
|
||||
|
||||
@@ -17,6 +17,16 @@ public:
|
||||
STATE_FUNC_DECLARE(dAcOSave_c, LightShaft);
|
||||
STATE_FUNC_DECLARE(dAcOSave_c, Escape);
|
||||
|
||||
bool checkStatueFlag() const;
|
||||
u32 getStatueType() const;
|
||||
u32 getStatueNameId() const;
|
||||
|
||||
enum StatueType {
|
||||
TYPE_NORMAL = 0,
|
||||
TYPE_OVERWORLD = 1,
|
||||
TYPE_DUNGEON = 2,
|
||||
};
|
||||
|
||||
private:
|
||||
/* 0x??? */ STATE_MGR_DECLARE(dAcOSave_c);
|
||||
};
|
||||
|
||||
@@ -64,6 +64,14 @@ public:
|
||||
STATE_FUNC_DECLARE(dAcTbox_c, Wait);
|
||||
STATE_FUNC_DECLARE(dAcTbox_c, GoddessWait);
|
||||
|
||||
u8 getVariant() const {
|
||||
return mVariant;
|
||||
}
|
||||
|
||||
bool hasBeenOpened() const {
|
||||
return mHasBeenOpened;
|
||||
}
|
||||
|
||||
private:
|
||||
static f32 getSomeRate();
|
||||
bool initBgW(dBgW &bg, const char *arcName, const char *fileName);
|
||||
|
||||
@@ -193,9 +193,9 @@ struct STIF {
|
||||
/* 0x08 */ f32 defaultCullingDistance;
|
||||
/* 0x0C */ u16 flagIndex;
|
||||
/* 0x0E */ u8 areaType;
|
||||
/* 0x0F */ u8 field_0x0F;
|
||||
/* 0x0F */ u8 area;
|
||||
/* 0x10 */ u8 field_0x10;
|
||||
/* 0x11 */ u8 field_0x11;
|
||||
/* 0x11 */ u8 roomType;
|
||||
/* 0x12 */ s8 mapNameId;
|
||||
/* 0x13 */ u8 field_0x13;
|
||||
};
|
||||
|
||||
+27
-1
@@ -1,12 +1,16 @@
|
||||
#ifndef D_CAMERA_H
|
||||
#define D_CAMERA_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "m/m_vec.h"
|
||||
|
||||
extern "C" bool fn_80081FE0(void *, const char *);
|
||||
extern "C" bool fn_800918E0(void *, s32, s16);
|
||||
extern "C" void fn_80080960(void *, s32, s32, s8, s32);
|
||||
extern "C" void fn_80093340(void *);
|
||||
extern "C" void fn_80093360(void *);
|
||||
extern "C" void fn_80093380(void *);
|
||||
|
||||
class dCamera_c : public dBase_c {
|
||||
public:
|
||||
@@ -29,13 +33,33 @@ public:
|
||||
return fn_800918E0(field_0xDA0, a1, a2);
|
||||
}
|
||||
|
||||
void doFn_80093340() {
|
||||
fn_80093340(field_0xDA4);
|
||||
}
|
||||
|
||||
void doFn_80093360() {
|
||||
fn_80093360(field_0xDA4);
|
||||
}
|
||||
|
||||
void doFn_80093380() {
|
||||
fn_80093380(field_0xDA4);
|
||||
}
|
||||
|
||||
void setScreenShakeIntensity(f32 val) {
|
||||
mScreenShakeIntensity = val;
|
||||
}
|
||||
|
||||
UNKWORD getField_0xDA8() const {
|
||||
return field_0xDA8;
|
||||
}
|
||||
|
||||
bool isUnderwater() const;
|
||||
f32 getUnderwaterDepth() const;
|
||||
|
||||
void fn_8019E430();
|
||||
void fn_8019E410();
|
||||
mAng fn_8019E3B0() const;
|
||||
|
||||
private:
|
||||
/* 0x068 */ u8 _0x068[0x6C - 0x068];
|
||||
/* 0x06C */ mVec3_c mPositionMaybe;
|
||||
@@ -44,7 +68,9 @@ private:
|
||||
/* 0xD98 */ void *field_0xD98;
|
||||
/* 0xD9C */ u8 _0xD9C[0xDA0 - 0xD9C];
|
||||
/* 0xDA0 */ void *field_0xDA0;
|
||||
/* 0xDA4 */ u8 _0xDA4[0xDB0 - 0xDA4];
|
||||
/* 0xDA4 */ void *field_0xDA4;
|
||||
/* 0xDA8 */ UNKWORD field_0xDA8;
|
||||
/* 0xDAC */ u8 _0xDAC[0xDB0 - 0xDAC];
|
||||
/* 0xDB0 */ f32 mScreenShakeIntensity;
|
||||
};
|
||||
|
||||
|
||||
@@ -75,6 +75,10 @@ public:
|
||||
mpResAcc = resAcc;
|
||||
}
|
||||
|
||||
void setPriorityDraw(u8 priority) {
|
||||
mLyt.setPriority(priority);
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x0C */ m2d::ResAccIf_c *mpResAcc;
|
||||
/* 0x10 */ d2d::LytBase_c mLyt;
|
||||
@@ -96,6 +100,10 @@ public:
|
||||
mpResAcc = resAcc;
|
||||
}
|
||||
|
||||
void setPriorityDraw(u8 priority) {
|
||||
mLyt.setPriority(priority);
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x0C */ m2d::ResAccIf_c *mpResAcc;
|
||||
/* 0x10 */ d2d::LytBase_c mLyt;
|
||||
@@ -344,6 +352,10 @@ public:
|
||||
mpResAcc = resAcc;
|
||||
}
|
||||
|
||||
void setPriorityDraw(u8 priority) {
|
||||
mLyt.setPriority(priority);
|
||||
}
|
||||
|
||||
void changeState(const sFStateID_c<lytItemCursor_c> &newState);
|
||||
|
||||
void pachinkoSetCharging(bool charging, f32 progress);
|
||||
@@ -356,6 +368,7 @@ public:
|
||||
void bowAimStart();
|
||||
void bowReady();
|
||||
|
||||
|
||||
private:
|
||||
STATE_FUNC_DECLARE(lytItemCursor_c, Invisible);
|
||||
STATE_FUNC_DECLARE(lytItemCursor_c, Bow);
|
||||
@@ -431,6 +444,20 @@ public:
|
||||
mNextCursorActive = false;
|
||||
}
|
||||
|
||||
dCursorHitCheck_c *getCursorHit() const {
|
||||
return mCursorIf.getHit();
|
||||
}
|
||||
|
||||
dCursorInterfaceGame_c *getCursorIf() {
|
||||
return &mCursorIf;
|
||||
}
|
||||
|
||||
void setPriorityDraw(u8 priority) {
|
||||
mLyt1.setPriorityDraw(priority);
|
||||
mLyt2.setPriorityDraw(priority);
|
||||
mCursor.setPriorityDraw(priority);
|
||||
}
|
||||
|
||||
private:
|
||||
static dCsGame_c *sInstance;
|
||||
bool isForcedHidden() const;
|
||||
|
||||
@@ -95,6 +95,10 @@ public:
|
||||
mHasCalculatedBoundingData = false;
|
||||
}
|
||||
|
||||
const dCsCheckLyt_BoundingData *getBoundingData() const {
|
||||
return mpBoundingData;
|
||||
}
|
||||
|
||||
private:
|
||||
void countBoundings(nw4r::lyt::Pane *);
|
||||
void gatherBoundings(dCsCheckLyt_BoundingData **pEnd, nw4r::lyt::Pane *);
|
||||
|
||||
@@ -86,9 +86,9 @@ protected:
|
||||
EVENT_SET_TEMPFLAG = 28,
|
||||
EVENT_UNSET_TEMPFLAG = 29,
|
||||
|
||||
EVENT_LIGHT_PILLAR_30 = 30,
|
||||
EVENT_START_MAP_EVENT = 30,
|
||||
|
||||
EVENT_LIGHT_PILLAR_34 = 34,
|
||||
EVENT_END_MAP_EVENT = 34,
|
||||
|
||||
EVENT_SET_STORYFLAG_217 = 37,
|
||||
EVENT_DEMO_METER_ITEM_SELECT = 38,
|
||||
@@ -227,10 +227,6 @@ public:
|
||||
void init();
|
||||
void reset();
|
||||
|
||||
bool getField_0x328() const {
|
||||
return field_0x328;
|
||||
}
|
||||
|
||||
bool getField_0x329() const {
|
||||
return field_0x329;
|
||||
}
|
||||
@@ -243,8 +239,12 @@ public:
|
||||
field_0x2FC = val;
|
||||
}
|
||||
|
||||
void setField_0x328(u8 val) {
|
||||
field_0x328 = val;
|
||||
bool getInMapEvent() const {
|
||||
return mInMapEvent;
|
||||
}
|
||||
|
||||
void setInMapEvent(bool val) {
|
||||
mInMapEvent = val;
|
||||
}
|
||||
|
||||
s32 getField_0x32C() const {
|
||||
@@ -362,7 +362,7 @@ private:
|
||||
|
||||
/* 0x300 */ u32 field_0x300[10];
|
||||
|
||||
/* 0x328 */ bool field_0x328;
|
||||
/* 0x328 */ bool mInMapEvent;
|
||||
/* 0x329 */ bool field_0x329;
|
||||
/* 0x32A */ bool field_0x32A;
|
||||
|
||||
|
||||
@@ -641,10 +641,12 @@ public:
|
||||
static bool isOutOfStamina();
|
||||
static f32 getStamina();
|
||||
|
||||
static s32 getCurrentTunicType();
|
||||
static s32 getCurrentSwordType();
|
||||
static const char *getSwordName(s32);
|
||||
static s32 getCurrentlyEquippedShieldType();
|
||||
|
||||
|
||||
static const mColor &getEarringsColor();
|
||||
|
||||
static mVec3_c sPos1;
|
||||
|
||||
@@ -135,7 +135,8 @@ public:
|
||||
|
||||
void triggerExit(s32 room, u16 exitIndex, s32 forcedNight = 2, s32 forcedTrial = 2);
|
||||
void triggerEntrance(
|
||||
const char *stageName, u8 roomid, u8 layer, u8 entrance, int forcedNight = SpawnInfo::RETAIN_TOD, int forcedTrial = SpawnInfo::RETAIN_TRIAL, u8 transitionType = dFader_c::FADER_BLACK,
|
||||
const char *stageName, u8 roomid, u8 layer, u8 entrance, int forcedNight = SpawnInfo::RETAIN_TOD,
|
||||
int forcedTrial = SpawnInfo::RETAIN_TRIAL, u8 transitionType = dFader_c::FADER_BLACK,
|
||||
u16 transitionFadeFrames = 15, s8 field0x28 = -1
|
||||
);
|
||||
// void triggerEntrance(const char *stageName, u8 room, );
|
||||
@@ -213,6 +214,10 @@ public:
|
||||
return mScreen1.fn_801BBEC0();
|
||||
}
|
||||
|
||||
void setTargetingScreenPrio(u8 prio) {
|
||||
mScreen1.setPriority(prio);
|
||||
}
|
||||
|
||||
static bool sCopyFileBToCurrentAfterRespawn;
|
||||
static bool sDoSomethingWithFileAOnTransition;
|
||||
static bool sPreventClearingSomeFlag;
|
||||
|
||||
+26
-2
@@ -67,18 +67,36 @@ public:
|
||||
/* 0x1E9 */ u8 field_0x1E9;
|
||||
/* 0x1EA */ s8 field_0x1EA;
|
||||
/* 0x1EB */ u8 field_0x1EB;
|
||||
/* 0x1EC */ u8 field_0x1EC;
|
||||
/* 0x1EC */ s8 field_0x1EC;
|
||||
/* 0x1ED */ u8 field_0x1ED;
|
||||
/* 0x1EE */ u8 field_0x1EE;
|
||||
/* 0x1EF */ u8 field_0x1EF;
|
||||
/* 0x1F0 */ u8 field_0x1F0;
|
||||
|
||||
public:
|
||||
s8 getField_0x1EC() const {
|
||||
return field_0x1EC;
|
||||
}
|
||||
|
||||
u8 getField_0x1EE() const {
|
||||
return field_0x1EE;
|
||||
}
|
||||
|
||||
void setField_0x1E8(u8 v) {
|
||||
field_0x1E8 = v;
|
||||
}
|
||||
|
||||
void setField_0x1EF(u8 v) {
|
||||
field_0x1EF = v;
|
||||
}
|
||||
|
||||
void init(MapRelated *);
|
||||
void fn_801b4900();
|
||||
void fn_801B4B80(u32 mapParams, const mVec3_c ¢er, const mVec3_c &size);
|
||||
void fn_801B4C70(const mVec3_c &);
|
||||
void fn_801B50C0(s32);
|
||||
const mVec3_c &fn_801B4CB0() const;
|
||||
s32 fn_801B4F10(s32 roomid, const mVec3_c &position) const;
|
||||
};
|
||||
|
||||
// OBJ NAME: STAGE
|
||||
@@ -128,6 +146,10 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
MapRelated *getMapRelated() {
|
||||
return &mMapRelated;
|
||||
}
|
||||
|
||||
bool isFadedOut() const {
|
||||
return mFader.isStatus(mFaderBase_c::FADED_OUT);
|
||||
}
|
||||
@@ -141,6 +163,8 @@ public:
|
||||
}
|
||||
|
||||
bool fn_801B3EE0();
|
||||
void fn_801B3F20();
|
||||
void fn_801B3F30();
|
||||
|
||||
private:
|
||||
dRoom_c *createRoom(int roomid, bool flag0x40);
|
||||
@@ -154,7 +178,7 @@ private:
|
||||
/* 0x0068 */ sFPhase<dStage_c> mPhase;
|
||||
/* 0x007C */ dRoomTable_c rooms;
|
||||
/* 0x017C */ dFader_c mFader;
|
||||
/* 0x01A0 */ MapRelated mapRelated;
|
||||
/* 0x01A0 */ MapRelated mMapRelated;
|
||||
/* 0x0394 */ u8 _0x394[0x39C - 0x394];
|
||||
/* 0x039C */ u32 loaded_entities[2047];
|
||||
/* 0x2398 */ s8 curr_room_id;
|
||||
|
||||
+36
-8
@@ -59,17 +59,45 @@ public:
|
||||
bool isAreaTypeOverworldOrSkyloft() const;
|
||||
s32 getSTIFunk1() const;
|
||||
|
||||
s32 getSTIFbyte4() const;
|
||||
bool isSTIFbyte4_2or3or4() const;
|
||||
bool isSTIFbyte4_5or6() const;
|
||||
bool isSTIFbyte4_7or8or9or10or11() const;
|
||||
bool isSTIFbyte4_1() const {
|
||||
return getSTIFbyte4() == 1;
|
||||
// Individually revealed areas on the main world map
|
||||
enum StifArea_e {
|
||||
STIF_AREA_SKY = 0,
|
||||
// also applies to isle of songs, goddess statue
|
||||
STIF_AREA_SEALED_GROUNDS = 1,
|
||||
STIF_AREA_FARON_WOODS = 2,
|
||||
STIF_AREA_DEEP_WOODS = 3,
|
||||
STIF_AREA_LAKE_FLORIA = 4,
|
||||
STIF_AREA_VOLCANO_SOUTH = 5,
|
||||
STIF_AREA_VOLCANO_NORTH = 6,
|
||||
STIF_AREA_LANAYRU_MINE = 7,
|
||||
STIF_AREA_LANAYRU_DESERT = 8,
|
||||
STIF_AREA_LANAYRU_CAVES = 9,
|
||||
STIF_AREA_LANAYRU_SAND_SEA = 10,
|
||||
STIF_AREA_LANAYRU_GORGE = 11,
|
||||
};
|
||||
|
||||
// room is a not great name since this is really stage-wide...
|
||||
enum StifRoomType_e {
|
||||
STIF_ROOMTYPE_FIELD = 0,
|
||||
STIF_ROOMTYPE_DUNGEON = 1,
|
||||
STIF_ROOMTYPE_SKYLOFT = 2,
|
||||
STIF_ROOMTYPE_BOSS_HOUSE = 3,
|
||||
STIF_ROOMTYPE_SKYFIELD = 4,
|
||||
};
|
||||
|
||||
s32 getSTIFArea() const;
|
||||
bool isSTIFAreaFaron() const;
|
||||
bool isSTIFAreaEldin() const;
|
||||
bool isSTIFAreaLanayru() const;
|
||||
bool isSTIFAreaSealedGrounds() const {
|
||||
return getSTIFArea() == STIF_AREA_SEALED_GROUNDS;
|
||||
}
|
||||
bool isSTIFbyte4_0() const {
|
||||
return getSTIFbyte4() == 0;
|
||||
bool isSTIFAreaSky() const {
|
||||
return getSTIFArea() == STIF_AREA_SKY;
|
||||
}
|
||||
|
||||
s32 getSTIFRoomType() const;
|
||||
|
||||
s32 getAreaType() const;
|
||||
s32 getMapNameId() const;
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ enum StoryFlags_e {
|
||||
* 3 / Water Dragon's Lair layer 3 / Behind The Temple layer 7)] Story Flag #16 (0x0010) - JP 805ACD5B 0x02 / US
|
||||
* 805A9ADB 0x02
|
||||
*/
|
||||
STORYFLAG_16,
|
||||
STORYFLAG_WATER_DRAGON_SOTH_PART,
|
||||
|
||||
/** [Triforce Completed]
|
||||
* Story Flag #17 (0x0011) - JP 805ACD5B 0x04 / US 805A9ADB 0x04
|
||||
@@ -247,17 +247,17 @@ enum StoryFlags_e {
|
||||
/** [Faron light pillar]
|
||||
* Story Flag #46 (0x002E) - JP 805ACD67 0x80 / US 805A9AE7 0x80
|
||||
*/
|
||||
STORYFLAG_46,
|
||||
STORYFLAG_FARON_PILLAR_OPENED,
|
||||
|
||||
/** [Eldin light pillar]
|
||||
* Story Flag #47 (0x002F) - JP 805ACD66 0x01 / US 805A9AE6 0x01
|
||||
*/
|
||||
STORYFLAG_47,
|
||||
STORYFLAG_ELDIN_PILLAR_OPENED,
|
||||
|
||||
/** [Lanayru light pillar (Eldin Volcano, Digging Mitts Cave, FS Entrance, Volcano Summit Waterfall layer 2 /
|
||||
* Lanayru Mines layer 1 / Temple of Time layer 1)] Story Flag #48 (0x0030) - JP 805ACD66 0x02 / US 805A9AE6 0x02
|
||||
*/
|
||||
STORYFLAG_48,
|
||||
STORYFLAG_LANAYRU_PILLAR_OPENED,
|
||||
|
||||
/** [Talk to Headmaster to learn about Windmills]
|
||||
* Story Flag #49 (0x0031) - JP 805ACD66 0x04 / US 805A9AE6 0x04
|
||||
@@ -452,17 +452,17 @@ enum StoryFlags_e {
|
||||
/** [Faron Woods introductory cutscene (Behind The Temple layer 2)]
|
||||
* Story Flag #87 (0x0057) - JP 805ACD6C 0x02 / US 805A9AEC 0x02
|
||||
*/
|
||||
STORYFLAG_87,
|
||||
STORYFLAG_FARON_WOODS_DISCOVERED,
|
||||
|
||||
/** [Lake Floria Introductory Cutscene]
|
||||
* Story Flag #88 (0x0058) - JP 805ACD6C 0x04 / US 805A9AEC 0x04
|
||||
*/
|
||||
STORYFLAG_88,
|
||||
STORYFLAG_LAKE_FLORIA_DISCOVERED,
|
||||
|
||||
/** [Skyview Introductory cutscene]
|
||||
* Story Flag #89 (0x0059) - JP 805ACD6C 0x08 / US 805A9AEC 0x08
|
||||
*/
|
||||
STORYFLAG_89,
|
||||
STORYFLAG_SKYVIEW_DISCOVERED,
|
||||
|
||||
/** [Sets after the Robot upgrades your Beetle]
|
||||
* Story Flag #90 (0x005A) - JP 805ACD6F 0x80 / US 805A9AEF 0x80
|
||||
@@ -472,12 +472,12 @@ enum StoryFlags_e {
|
||||
/** [Deep Woods Introductory cutscene]
|
||||
* Story Flag #91 (0x005B) - JP 805ACD71 0x01 / US 805A9AF1 0x01
|
||||
*/
|
||||
STORYFLAG_91,
|
||||
STORYFLAG_DEEP_WOODS_DISCOVERED,
|
||||
|
||||
/** [Lanayru Desert Introductory Cutscene]
|
||||
* Story Flag #92 (0x005C) - JP 805ACD71 0x02 / US 805A9AF1 0x02
|
||||
*/
|
||||
STORYFLAG_92,
|
||||
STORYFLAG_LANAYRU_DESERT_DISCOVERED,
|
||||
|
||||
/** [Faron's Trial Gate Fi Singing Cutscene]
|
||||
* Story Flag #93 (0x005D) - JP 805ACD71 0x04 / US 805A9AF1 0x04
|
||||
@@ -667,7 +667,7 @@ enum StoryFlags_e {
|
||||
/** [Meeting Impa cutscene]
|
||||
* Story Flag #130 (0x0082) - JP 805ACD64 0x01 / US 805A9AE4 0x01
|
||||
*/
|
||||
STORYFLAG_130,
|
||||
STORYFLAG_IMPA_MET,
|
||||
|
||||
/** [Imp 1 defeated (Skyloft layers 4&5)]
|
||||
* Story Flag #131 (0x0083) - JP 805ACD64 0x02 / US 805A9AE4 0x02
|
||||
@@ -703,7 +703,7 @@ enum StoryFlags_e {
|
||||
* Screen) (Faron Woods, Deep Woods, Inside Great Tree layer 1)] Story Flag #137 (0x0089) - JP 805ACD64 0x80 / US
|
||||
* 805A9AE4 0x80
|
||||
*/
|
||||
STORYFLAG_137,
|
||||
STORYFLAG_FARON_DISCOVERED,
|
||||
|
||||
/** [Cutscene near sealed temple entrance first time in sealed grounds (Sealed Temple layer 1)]
|
||||
* Story Flag #138 (0x008A) - JP 805ACD67 0x01 / US 805A9AE7 0x01
|
||||
@@ -793,17 +793,17 @@ enum StoryFlags_e {
|
||||
/** [Ancient Cistern Introductory Cutscene (lilypad outside AC appears) (Outside AC layer 2)]
|
||||
* Story Flag #155 (0x009B) - JP 805ACD60 0x02 / US 805A9AE0 0x02
|
||||
*/
|
||||
STORYFLAG_155,
|
||||
STORYFLAG_ANCIENT_CISTERN_DISCOVERED,
|
||||
|
||||
/** [Sandship Introductory Cutscene]
|
||||
* Story Flag #156 (0x009C) - JP 805ACD60 0x04 / US 805A9AE0 0x04
|
||||
*/
|
||||
STORYFLAG_156,
|
||||
STORYFLAG_SANDSHIP_DISCOVERED,
|
||||
|
||||
/** [Ancient Harbour Introductory Cutscene]
|
||||
* Story Flag #157 (0x009D) - JP 805ACD60 0x08 / US 805A9AE0 0x08
|
||||
*/
|
||||
STORYFLAG_157,
|
||||
STORYFLAG_ANCIENT_HARBOR_DISCOVERED,
|
||||
|
||||
/** [First Time in Sand Sea]
|
||||
* Story Flag #158 (0x009E) - JP 805ACD60 0x10 / US 805A9AE0 0x10
|
||||
@@ -813,7 +813,7 @@ enum StoryFlags_e {
|
||||
/** [Sky Keep Introductory Cutscene]
|
||||
* Story Flag #159 (0x009F) - JP 805ACD60 0x20 / US 805A9AE0 0x20
|
||||
*/
|
||||
STORYFLAG_159,
|
||||
STORYFLAG_SKY_KEEP_DISCOVERED,
|
||||
|
||||
/** [Mogma Mitts restricted by Bokoblin Base]
|
||||
* Story Flag #160 (0x00A0) - JP 805ACD60 0x80 / US 805A9AE0 0x80
|
||||
@@ -883,7 +883,7 @@ enum StoryFlags_e {
|
||||
/** [Fire Sanctuary Introductory Cutscene]
|
||||
* Story Flag #173 (0x00AD) - JP 805ACD62 0x10 / US 805A9AE2 0x10
|
||||
*/
|
||||
STORYFLAG_173,
|
||||
STORYFLAG_FIRE_SANCTUARY_DISCOVERED,
|
||||
|
||||
/** []
|
||||
* Story Flag #174 (0x00AE) - JP 805ACD62 0x20 / US 805A9AE2 0x20
|
||||
@@ -928,12 +928,12 @@ enum StoryFlags_e {
|
||||
/** [Eldin Volcano Introductory Cutscene (Eldin Layer 1 only) (if set it activates Statue select screen on entering
|
||||
* Eldin Pillar)] Story Flag #182 (0x00B6) - JP 805ACD66 0x20 / US 805A9AE6 0x20
|
||||
*/
|
||||
STORYFLAG_182,
|
||||
STORYFLAG_ELDIN_DISCOVERED,
|
||||
|
||||
/** [Earth Temple Introductory Cutscene]
|
||||
* Story Flag #183 (0x00B7) - JP 805ACD66 0x40 / US 805A9AE6 0x40
|
||||
*/
|
||||
STORYFLAG_183,
|
||||
STORYFLAG_EARTH_TEMPLE_DISCOVERED,
|
||||
|
||||
/** [Impa Cutscene at Bridge in Eldin]
|
||||
* Story Flag #184 (0x00B8) - JP 805ACD66 0x80 / US 805A9AE6 0x80
|
||||
@@ -968,7 +968,7 @@ enum StoryFlags_e {
|
||||
/** [Lanayru Mines Introductory Cutscene (Lanayru Desert layer 1)]
|
||||
* Story Flag #190 (0x00BE) - JP 805ACD6D 0x80 / US 805A9AED 0x80
|
||||
*/
|
||||
STORYFLAG_190,
|
||||
STORYFLAG_LANAYRU_DISCOVERED,
|
||||
|
||||
/** [(not implemented yet -- 7F62)]
|
||||
* Story Flag #191 (0x00BF) - JP from 805ACE57 0x40 to 805ACE56 0x01 / US from 805A9BD7 0x40 to 805A9BD6 0x01
|
||||
@@ -1075,7 +1075,7 @@ enum StoryFlags_e {
|
||||
/** [LMF Introductory Cutscene (The loading zone to LMF now exists AND the opened Lanayru Gate of Time now appears
|
||||
* in the Harp Cutscene)] Story Flag #211 (0x00D3) - JP 805ACD70 0x80 / US 805A9AF0 0x80
|
||||
*/
|
||||
STORYFLAG_211,
|
||||
STORYFLAG_LMF_DISCOVERED,
|
||||
|
||||
/** []
|
||||
* Story Flag #212 (0x00D4) - JP 805ACD73 0x01 / US 805A9AF3 0x01
|
||||
@@ -1155,7 +1155,7 @@ enum StoryFlags_e {
|
||||
/** [First Goddess Cube (Unlocks ability to skyward strike Goddess Cubes)]
|
||||
* Story Flag #227 (0x00E3) - JP 805ACD72 0x20 / US 805A9AF2 0x20
|
||||
*/
|
||||
STORYFLAG_227,
|
||||
STORYFLAG_FIRST_GODDESS_CUBE,
|
||||
|
||||
/** [Goddess Cube near Skyview Entrance]
|
||||
* Story Flag #228 (0x00E4) - JP 805ACD72 0x40 / US 805A9AF2 0x40
|
||||
@@ -1425,7 +1425,7 @@ enum StoryFlags_e {
|
||||
/** [Land on Fun Fun Island for first time (name on map appears)]
|
||||
* Story Flag #281 (0x0119) - JP 805ACD7B 0x08 / US 805A9AFB 0x08
|
||||
*/
|
||||
STORYFLAG_281,
|
||||
STORYFLAG_FUN_FUN_ISLAND_DISCOVERED,
|
||||
|
||||
/** [Land on Lumpy Pumpkin Island for first time (name on map appears)]
|
||||
* Story Flag #282 (0x011A) - JP 805ACD7B 0x10 / US 805A9AFB 0x10
|
||||
@@ -1435,7 +1435,7 @@ enum StoryFlags_e {
|
||||
/** [Talk to Beedle on his island for first time (name on map appears)]
|
||||
* Story Flag #283 (0x011B) - JP 805ACD7B 0x20 / US 805A9AFB 0x20
|
||||
*/
|
||||
STORYFLAG_283,
|
||||
STORYFLAG_BEEDLE_ISLAND_DISCOVERED,
|
||||
|
||||
/** [Land on Bamboo Island for first time (name on map appears)]
|
||||
* Story Flag #284 (0x011C) - JP 805ACD7B 0x40 / US 805A9AFB 0x40
|
||||
@@ -1450,7 +1450,7 @@ enum StoryFlags_e {
|
||||
/** [Talk to Strich at Bug Heaven for first time (name on map appears)]
|
||||
* Story Flag #286 (0x011E) - JP 805ACD7A 0x01 / US 805A9AFA 0x01
|
||||
*/
|
||||
STORYFLAG_286,
|
||||
STORYFLAG_BUG_HAVEN_DISCOVERED,
|
||||
|
||||
/** []
|
||||
* Story Flag #287 (0x011F) - JP 805ACD7A 0x02 / US 805A9AFA 0x02
|
||||
@@ -1460,7 +1460,7 @@ enum StoryFlags_e {
|
||||
/** [Bilocyte fight triggered]
|
||||
* Story Flag #288 (0x0120) - JP 805ACD7A 0x04 / US 805A9AFA 0x04
|
||||
*/
|
||||
STORYFLAG_288,
|
||||
STORYFLAG_BILOCYCTE_FIGHT_TRIGGERED,
|
||||
|
||||
/** [Owlan's wooden shield]
|
||||
* Story Flag #289 (0x0121) - JP 805ACD7A 0x08 / US 805A9AFA 0x08
|
||||
@@ -1917,7 +1917,7 @@ enum StoryFlags_e {
|
||||
/** [Thunderhead entered for first time]
|
||||
* Story Flag #379 (0x017B) - JP 805ACD85 0x02 / US 805A9B05 0x02
|
||||
*/
|
||||
STORYFLAG_379,
|
||||
STORYFLAG_THUNDERHEAD_ENTERED,
|
||||
|
||||
/** [Parrow gives his Crystal Sidequest (to find Orielle)]
|
||||
* Story Flag #380 (0x017C) - JP 805ACD8A 0x40 / US 805A9B0A 0x40
|
||||
@@ -2327,7 +2327,7 @@ enum StoryFlags_e {
|
||||
/** [Panning Camera Cutscene in Lanayru Caves showing crawlspace to Lanayru Gorge]
|
||||
* Story Flag #461 (0x01CD) - JP 805ACD8C 0x20 / US 805A9B0C 0x20
|
||||
*/
|
||||
STORYFLAG_461,
|
||||
STORYFLAG_LANAYRU_CAVES_DISCOVERED,
|
||||
|
||||
/** [Set when Thunder Dragon teaches SotH part]
|
||||
* Story Flag #462 (0x01CE) - JP 805ACD8C 0x40 / US 805A9B0C 0x40
|
||||
@@ -2442,7 +2442,7 @@ enum StoryFlags_e {
|
||||
/** [Goddess Statue falling onto the Sealed Grounds Cutscene]
|
||||
* Story Flag #484 (0x01E4) - JP 805ACD90 0x04 / US 805A9B10 0x04
|
||||
*/
|
||||
STORYFLAG_484,
|
||||
STORYFLAG_GODDESS_STATUE_FALLEN,
|
||||
|
||||
/** [Groose goes back to the Groosenator after defeating Imp 3]
|
||||
* Story Flag #485 (0x01E5) - JP 805ACD90 0x08 / US 805A9B10 0x08
|
||||
@@ -2652,12 +2652,12 @@ enum StoryFlags_e {
|
||||
/** [Lanayru Gorge Introductory Cutscene]
|
||||
* Story Flag #526 (0x020E) - JP 805ACD94 0x08 / US 805A9B14 0x08
|
||||
*/
|
||||
STORYFLAG_526,
|
||||
STORYFLAG_LANAYRU_GORGE_DISCOVERED,
|
||||
|
||||
/** [Flooded Faron Woods Introductory Cutscene]
|
||||
* Story Flag #527 (0x020F) - JP 805ACD94 0x10 / US 805A9B14 0x10
|
||||
*/
|
||||
STORYFLAG_527,
|
||||
STORYFLAG_FLOODED_FARON_WOODS_DISCOVERED,
|
||||
|
||||
/** [Finishing a Silent Realm for the First time]
|
||||
* Story Flag #528 (0x0210) - JP 805ACD94 0x20 / US 805A9B14 0x20
|
||||
@@ -2833,7 +2833,7 @@ enum StoryFlags_e {
|
||||
/** [Volcano Summit Introductory Cutscene]
|
||||
* Story Flag #562 (0x0232) - JP 805ACD99 0x08 / US 805A9B19 0x08
|
||||
*/
|
||||
STORYFLAG_562,
|
||||
STORYFLAG_VOLCANO_SUMMIT_DISCOVERED,
|
||||
|
||||
/** [(not implemented yet -- 74B3)]
|
||||
* Story Flag #563 (0x0233) - JP from 805ACE40 0x08 to 805ACE40 0x40 / US from 805A9BC0 0x08 to 805A9BC0 0x40
|
||||
@@ -3568,7 +3568,7 @@ enum StoryFlags_e {
|
||||
/** [Enter Beedle's Shop for first time]
|
||||
* Story Flag #709 (0x02C5) - JP 805ACDA2 0x80 / US 805A9B22 0x80
|
||||
*/
|
||||
STORYFLAG_709,
|
||||
STORYFLAG_BEEDLE_SHOP_ENTERED,
|
||||
|
||||
/** [Sets after Treasure dowsing]
|
||||
* Story Flag #710 (0x02C6) - JP 805ACDA5 0x01 / US 805A9B25 0x01
|
||||
|
||||
+8
-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;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -252,6 +252,10 @@ struct AnmGroupBase_c {
|
||||
return mpFrameCtrl->getRate();
|
||||
}
|
||||
|
||||
inline bool isBound() const {
|
||||
return (mFlags & ANMGROUP_FLAG_BOUND) != 0;
|
||||
}
|
||||
|
||||
inline bool isEnabled() const {
|
||||
return (mFlags & ANMGROUP_FLAG_ENABLE) != 0;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_LYT_CONTROL_GAME_H
|
||||
|
||||
#include "d/d_base.h"
|
||||
#include "d/lyt/d_lyt_map.h"
|
||||
#include "s/s_State.hpp"
|
||||
|
||||
class dLytControlGame_c : public dBase_c {
|
||||
@@ -18,6 +19,10 @@ public:
|
||||
void fn_802CCD40(bool);
|
||||
void fn_802D04F0();
|
||||
|
||||
const dMapFootPrintsQueue_c *getFootprintsQueue() const {
|
||||
return mFootprintsMgr.getQueue();
|
||||
}
|
||||
|
||||
static dLytControlGame_c *getInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
@@ -70,7 +75,11 @@ public:
|
||||
|
||||
private:
|
||||
/* 0x00068 */ UI_STATE_MGR_DECLARE(dLytControlGame_c);
|
||||
/* 0x000A4 */ u8 _0x000A4[0x15C2C - 0x000A4];
|
||||
/* 0x000A4 */ u8 _0x000A4[0x15850 - 0x000A4];
|
||||
|
||||
/* 0x15850 */ dMapFootPrintsMgr_c mFootprintsMgr;
|
||||
|
||||
/* 0x15C24 */ u8 _0x15C24[0x15C2C - 0x15C24];
|
||||
|
||||
/* 0x15C2C */ s32 mCurrentPauseDisp;
|
||||
/* 0x15C30 */ s32 mPauseDisp00Tab;
|
||||
|
||||
+623
-98
@@ -3,13 +3,135 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_cursor_hit_check.h"
|
||||
#include "d/d_message.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_lyt_map_capture.h"
|
||||
#include "d/lyt/d_lyt_map_global.h"
|
||||
#include "d/lyt/d_lyt_map_markers.h"
|
||||
#include "d/lyt/d_textbox.h"
|
||||
#include "d/lyt/d_window.h"
|
||||
#include "egg/core/eggColorFader.h"
|
||||
#include "egg/core/eggFader.h"
|
||||
#include "m/m2d.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/lyt/lyt_bounding.h"
|
||||
#include "nw4r/lyt/lyt_group.h"
|
||||
#include "nw4r/lyt/lyt_pane.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "toBeSorted/d_flow_mgr.h"
|
||||
|
||||
// TODO - this file uses a lot of `friend` classes because the necessary
|
||||
// inlines might mess up weak function order. Let's get the order right
|
||||
// first before introducing more problems...
|
||||
|
||||
class dAcTbox_c;
|
||||
|
||||
/** Bird Statue Definition (StatueSelectDestination) */
|
||||
struct dMapSaveObjDefinition {
|
||||
/* 0x00 */ const char *stageName;
|
||||
/* 0x04 */ u8 room;
|
||||
/* 0x05 */ u8 layer;
|
||||
/* 0x06 */ u8 entrance;
|
||||
/* 0x08 */ s32 type;
|
||||
/* 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 */ bool mapUpDirection;
|
||||
/* 0x05 */ bool mapUpDirectionAfterZoomToDetail;
|
||||
/* 0x06 */ bool isValid;
|
||||
};
|
||||
|
||||
struct dMapSavedData {
|
||||
/* 0x00 */ dMapSavedDataEntry entries[/* dLytMapMain_c::ROOMTYPE_MAX */ 6];
|
||||
/* 0x30 */ bool showIslandNames;
|
||||
};
|
||||
|
||||
struct dMapFootPrintEntry {
|
||||
/* 0x00 */ dMapFootPrintEntry *pPrev;
|
||||
/* 0x04 */ dMapFootPrintEntry *pNext;
|
||||
/* 0x08 */ mVec3_c position;
|
||||
/* 0x14 */ mAng rotation;
|
||||
};
|
||||
|
||||
/** Generic footprints queue */
|
||||
class dMapFootPrintsQueue_c {
|
||||
public:
|
||||
void init();
|
||||
void addStep(const mVec3_c &pos, const mAng &rot);
|
||||
dMapFootPrintEntry *getFirst() const;
|
||||
dMapFootPrintEntry *getNext(const dMapFootPrintEntry *it) const;
|
||||
|
||||
bool isEmpty() const {
|
||||
return mCount == 0;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x000 */ dMapFootPrintEntry mEntries[40];
|
||||
/* 0x3C0 */ dMapFootPrintEntry *mpFirst;
|
||||
/* 0x3C4 */ dMapFootPrintEntry *mpLast;
|
||||
/* 0x3C8 */ u32 mCount;
|
||||
};
|
||||
|
||||
/** Records Link's footsteps */
|
||||
class dMapFootPrintsMgr_c {
|
||||
public:
|
||||
dMapFootPrintsMgr_c() {
|
||||
mQueue.init();
|
||||
}
|
||||
virtual ~dMapFootPrintsMgr_c() {}
|
||||
|
||||
void execute();
|
||||
|
||||
const dMapFootPrintsQueue_c *getQueue() const {
|
||||
return &mQueue;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x004 */ dMapFootPrintsQueue_c mQueue;
|
||||
/* 0x3D0 */ f32 mMinStepDistanceSq;
|
||||
};
|
||||
|
||||
/** 2D UI - Map - Link footprint markers */
|
||||
class dLytMapFootPrints_c {
|
||||
public:
|
||||
dLytMapFootPrints_c(dLytMapGlobal_c *global);
|
||||
virtual ~dLytMapFootPrints_c() {}
|
||||
|
||||
bool build(d2d::ResAccIf_c *resAcc);
|
||||
bool remove();
|
||||
bool execute();
|
||||
void draw();
|
||||
|
||||
void setVisible(bool visible) {
|
||||
mVisible = visible;
|
||||
}
|
||||
|
||||
void setField_0x198(f32 f) {
|
||||
field_0x198 = f;
|
||||
}
|
||||
|
||||
void setField_0x19C(f32 f) {
|
||||
field_0x19C = f;
|
||||
}
|
||||
|
||||
private:
|
||||
dLytMapGlobal_c *getGlobal() const;
|
||||
|
||||
/* 0x004 */ dLytMapGlobal_c *mpGlobal;
|
||||
/* 0x008 */ d2d::dLytSub mLyt;
|
||||
/* 0x09C */ nw4r::lyt::Pane *mpPane;
|
||||
/* 0x0A0 */ f32 field_0xA0;
|
||||
/* 0x0A4 */ mVec2_c mFootprintPositions[30];
|
||||
/* 0x194 */ u16 mMaxNumSteps;
|
||||
/* 0x196 */ u16 mCurrentNumSteps;
|
||||
/* 0x198 */ f32 field_0x198;
|
||||
/* 0x19C */ f32 field_0x19C;
|
||||
/* 0x1A0 */ bool mVisible;
|
||||
};
|
||||
|
||||
struct LytMap0x80520B5C {
|
||||
LytMap0x80520B5C() : field_0x04(false), field_0x05(false) {}
|
||||
@@ -19,14 +141,44 @@ struct LytMap0x80520B5C {
|
||||
bool field_0x05;
|
||||
};
|
||||
|
||||
struct LytMapFourAnimGroups {
|
||||
/* 0x00 */ d2d::AnmGroup_c mGroup1;
|
||||
/* 0x40 */ d2d::AnmGroup_c mGroup2;
|
||||
/* 0x80 */ d2d::AnmGroup_c mGroup3;
|
||||
/* 0xC0 */ d2d::AnmGroup_c mGroup4;
|
||||
|
||||
/** 2D UI - Map - beacon preview icon following the cursor */
|
||||
class dLytMapPutIcon_c {
|
||||
public:
|
||||
dLytMapPutIcon_c() : mVisible(false), field_0x98(0.0f, 0.0f) {}
|
||||
virtual ~dLytMapPutIcon_c() {}
|
||||
|
||||
void build(d2d::ResAccIf_c *resAcc);
|
||||
void remove();
|
||||
void execute();
|
||||
void draw();
|
||||
|
||||
void setPosition(const mVec2_c &pos);
|
||||
void setScale(f32 scale);
|
||||
|
||||
void setVisible(bool visible) {
|
||||
mVisible = visible;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x04 */ d2d::LytBase_c mLyt;
|
||||
/* 0x94 */ bool mVisible;
|
||||
/* 0x98 */ mVec2_c field_0x98;
|
||||
};
|
||||
|
||||
// Size 0x1E0
|
||||
struct dLytMapFloorBtnAnmGroups {
|
||||
/* 0x00 */ d2d::AnmGroup_c mLoop;
|
||||
/* 0x40 */ d2d::AnmGroup_c mOnOff;
|
||||
/* 0x80 */ d2d::AnmGroup_c mDecide;
|
||||
/* 0xC0 */ d2d::AnmGroup_c mOnOffLight;
|
||||
};
|
||||
|
||||
struct dLytMapBoundingWorldBounds {
|
||||
/* 0x00 */ mVec3_c min;
|
||||
/* 0x0C */ mVec3_c max;
|
||||
};
|
||||
|
||||
/** 2D UI - Map - a placed down beacon */
|
||||
class dLytMapPinIcon_c {
|
||||
public:
|
||||
friend class dLytMapPinIconAggregate_c;
|
||||
@@ -35,12 +187,12 @@ public:
|
||||
: mStateMgr(*this, sStateID::null),
|
||||
mpBounding(nullptr),
|
||||
field_0x1BC(0),
|
||||
field_0x1C0(0.0f, 0.0f, 0.0f),
|
||||
field_0x1CC(0),
|
||||
mPosition(0.0f, 0.0f, 0.0f),
|
||||
mIsSet(false),
|
||||
field_0x1D0(nullptr),
|
||||
field_0x1D4(0),
|
||||
mIndex(0),
|
||||
field_0x1DC(0) {}
|
||||
mLoopFrame(0) {}
|
||||
virtual ~dLytMapPinIcon_c();
|
||||
|
||||
bool build(d2d::ResAccIf_c *resAcc);
|
||||
@@ -48,7 +200,10 @@ public:
|
||||
bool draw();
|
||||
bool execute();
|
||||
|
||||
void fn_8012EC30();
|
||||
void updatePosition();
|
||||
void checkPointedAt();
|
||||
void setPosition(const mVec3_c &pos);
|
||||
void setScale(f32 scale);
|
||||
|
||||
bool isSelect() const {
|
||||
return *mStateMgr.getStateID() == dLytMapPinIcon_c::StateID_ToSelect ||
|
||||
@@ -66,58 +221,78 @@ public:
|
||||
STATE_FUNC_DECLARE(dLytMapPinIcon_c, Remove);
|
||||
|
||||
private:
|
||||
void removeBeacon();
|
||||
|
||||
dLytMapGlobal_c *getGlobal() const;
|
||||
|
||||
/* 0x004 */ UI_STATE_MGR_DECLARE(dLytMapPinIcon_c);
|
||||
/* 0x040 */ d2d::LytBase_c mLyt;
|
||||
/* 0x0D0 */ d2d::AnmGroup_c mAnmGroups[3];
|
||||
/* 0x190 */ dCursorHitCheckLyt_c mCsHitCheck;
|
||||
/* 0x1B8 */ nw4r::lyt::Bounding *mpBounding;
|
||||
/* 0x1BC */ UNKWORD field_0x1BC;
|
||||
/* 0x1C0 */ mVec3_c field_0x1C0;
|
||||
/* 0x1CC */ u8 field_0x1CC;
|
||||
/* 0x1C0 */ mVec3_c mPosition;
|
||||
/* 0x1CC */ bool mIsSet;
|
||||
/* 0x1D0 */ LytMap0x80520B5C *field_0x1D0;
|
||||
/* 0x1D4 */ UNKWORD field_0x1D4;
|
||||
/* 0x1D8 */ s32 mIndex;
|
||||
/* 0x1DC */ UNKWORD field_0x1DC;
|
||||
/* 0x1DC */ UNKWORD mLoopFrame;
|
||||
};
|
||||
|
||||
class dLytMapPinIconAggregate_c {
|
||||
friend class dLytMapMain_c;
|
||||
|
||||
public:
|
||||
dLytMapPinIconAggregate_c() : mStateMgr(*this, sStateID::null) {
|
||||
field_0x9A0 = nullptr;
|
||||
field_0x9A4 = 0;
|
||||
field_0x9A8 = 0;
|
||||
mLoopFrame = 0;
|
||||
mLoopFrameMax = 0;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
mPins[i].mIndex = i;
|
||||
}
|
||||
}
|
||||
virtual ~dLytMapPinIconAggregate_c() {}
|
||||
|
||||
bool build(d2d::ResAccIf_c *resAcc);
|
||||
bool remove();
|
||||
bool execute();
|
||||
bool draw();
|
||||
|
||||
void setScale(f32 scale);
|
||||
void updatePosition();
|
||||
void setUnk(LytMap0x80520B5C *unk);
|
||||
bool setPosition(s32 index, const mVec3_c &position);
|
||||
void unsetAll();
|
||||
u32 getNumSetPins() const;
|
||||
|
||||
STATE_FUNC_DECLARE(dLytMapPinIconAggregate_c, Wait);
|
||||
STATE_FUNC_DECLARE(dLytMapPinIconAggregate_c, Select);
|
||||
STATE_FUNC_DECLARE(dLytMapPinIconAggregate_c, Remove);
|
||||
|
||||
private:
|
||||
bool findNewBeaconId(s32 *pOutId);
|
||||
|
||||
/* 0x004 */ UI_STATE_MGR_DECLARE(dLytMapPinIconAggregate_c);
|
||||
/* 0x040 */ dLytMapPinIcon_c mPins[5];
|
||||
|
||||
/* 0x9A0 */ LytMap0x80520B5C *field_0x9A0;
|
||||
/* 0x9A4 */ UNKWORD field_0x9A4;
|
||||
/* 0x9A8 */ UNKWORD field_0x9A8;
|
||||
/* 0x9A4 */ s32 mLoopFrame;
|
||||
/* 0x9A8 */ s32 mLoopFrameMax;
|
||||
};
|
||||
|
||||
// Size 0x50
|
||||
class dLytMapFloorBtn_c {
|
||||
friend class dLytMapFloorBtnMgr_c;
|
||||
|
||||
public:
|
||||
dLytMapFloorBtn_c()
|
||||
: mStateMgr(*this, sStateID::null),
|
||||
field_0x3C(0),
|
||||
field_0x40(0),
|
||||
mpOwnerLyt(nullptr),
|
||||
mpAnmGroups(nullptr),
|
||||
field_0x44(0),
|
||||
field_0x48(0),
|
||||
field_0x4C(0),
|
||||
field_0x4D(0) {}
|
||||
mpBounding(nullptr),
|
||||
mSelected(false),
|
||||
mDecided(false) {}
|
||||
~dLytMapFloorBtn_c() {}
|
||||
|
||||
STATE_FUNC_DECLARE(dLytMapFloorBtn_c, Wait);
|
||||
@@ -130,26 +305,37 @@ public:
|
||||
STATE_FUNC_DECLARE(dLytMapFloorBtn_c, SelectInDecide);
|
||||
STATE_FUNC_DECLARE(dLytMapFloorBtn_c, DecideToSelectInDecide);
|
||||
|
||||
void init();
|
||||
void execute();
|
||||
|
||||
bool build(d2d::ResAccIf_c *resAcc);
|
||||
|
||||
void directlyDecide();
|
||||
void directlyUndecide();
|
||||
|
||||
private:
|
||||
/* 0x00 */ UI_STATE_MGR_DECLARE(dLytMapFloorBtn_c);
|
||||
/* 0x3C */ UNKWORD field_0x3C;
|
||||
/* 0x40 */ UNKWORD field_0x40;
|
||||
/* 0x3C */ d2d::LytBase_c *mpOwnerLyt;
|
||||
/* 0x40 */ dLytMapFloorBtnAnmGroups *mpAnmGroups;
|
||||
/* 0x44 */ UNKWORD field_0x44;
|
||||
/* 0x48 */ UNKWORD field_0x48;
|
||||
/* 0x4C */ u8 field_0x4C;
|
||||
/* 0x4D */ u8 field_0x4D;
|
||||
/* 0x48 */ nw4r::lyt::Bounding *mpBounding;
|
||||
/* 0x4C */ bool mSelected;
|
||||
/* 0x4D */ bool mDecided;
|
||||
};
|
||||
|
||||
class dLytMapFloorBtnMgr_c : public d2d::dSubPane {
|
||||
friend class dLytMapMain_c;
|
||||
|
||||
public:
|
||||
dLytMapFloorBtnMgr_c(void *arg) : field_0x008(arg), field_0x51C(nullptr), mStateMgr(*this, sStateID::null) {
|
||||
field_0x700 = 1;
|
||||
field_0x704 = 0;
|
||||
field_0x708 = 0;
|
||||
dLytMapFloorBtnMgr_c(dLytMapGlobal_c *global)
|
||||
: mpGlobal(global), mpPane(nullptr), mStateMgr(*this, sStateID::null) {
|
||||
mNumFloors = 1;
|
||||
mBaseFloorOffset = 0;
|
||||
mSelectedBtnIdx = 0;
|
||||
field_0x70C = 4;
|
||||
field_0x710 = 0;
|
||||
field_0x711 = 0;
|
||||
field_0x712 = 0;
|
||||
mPointerVisible = false;
|
||||
mPrevPointerVisible = false;
|
||||
mForceNoNav = false;
|
||||
}
|
||||
virtual ~dLytMapFloorBtnMgr_c();
|
||||
|
||||
@@ -169,26 +355,77 @@ public:
|
||||
STATE_FUNC_DECLARE(dLytMapFloorBtnMgr_c, Invisible);
|
||||
STATE_FUNC_DECLARE(dLytMapFloorBtnMgr_c, Wait);
|
||||
|
||||
void init(s32 numFloors, s32 baseFloorOffset, s32 selectedFloor);
|
||||
|
||||
bool canDecideFloor() const;
|
||||
void decideSelectedFloor();
|
||||
s32 getCurrentFloor() const;
|
||||
s32 getPointedAtBtnIdx() const;
|
||||
|
||||
bool hasPointedAtABtnIdx() const {
|
||||
return getPointedAtBtnIdx() >= 0;
|
||||
}
|
||||
|
||||
void resetFloor(s32 newFloorBtn);
|
||||
bool isUsingPointerNav() const;
|
||||
|
||||
void setForceNoNav(bool b) {
|
||||
mForceNoNav = b;
|
||||
}
|
||||
|
||||
void checkPointedAtBtn();
|
||||
|
||||
private:
|
||||
/* 0x008 */ void *field_0x008;
|
||||
/* 0x008 */ dLytMapGlobal_c *mpGlobal;
|
||||
/* 0x00C */ UI_STATE_MGR_DECLARE(dLytMapFloorBtnMgr_c);
|
||||
/* 0x048 */ d2d::dLytSub mLyt;
|
||||
/* 0x0DC */ d2d::AnmGroup_c mAnmGroups[1];
|
||||
/* 0x11C */ LytMapFourAnimGroups mMoreGroups[4];
|
||||
/* 0x51C */ void *field_0x51C;
|
||||
/* 0x11C */ dLytMapFloorBtnAnmGroups mBtnGroups[4];
|
||||
/* 0x51C */ nw4r::lyt::Pane *mpPane;
|
||||
/* 0x520 */ dCursorHitCheckLyt_c mCsHitChecks[4];
|
||||
/* 0x5C0 */ dLytMapFloorBtn_c mFloorBtns[4];
|
||||
/* 0x700 */ UNKWORD field_0x700;
|
||||
/* 0x704 */ UNKWORD field_0x704;
|
||||
/* 0x708 */ UNKWORD field_0x708;
|
||||
/* 0x700 */ s32 mNumFloors;
|
||||
/* 0x704 */ s32 mBaseFloorOffset;
|
||||
/* 0x708 */ s32 mSelectedBtnIdx;
|
||||
/* 0x70C */ UNKWORD field_0x70C;
|
||||
/* 0x710 */ u8 field_0x710;
|
||||
/* 0x711 */ u8 field_0x711;
|
||||
/* 0x712 */ u8 field_0x712;
|
||||
/* 0x710 */ bool mPointerVisible;
|
||||
/* 0x711 */ bool mPrevPointerVisible;
|
||||
/* 0x712 */ bool mForceNoNav;
|
||||
};
|
||||
|
||||
// Made up name
|
||||
class dLytMapFader_c : public m2d::Base_c {
|
||||
public:
|
||||
dLytMapFader_c();
|
||||
virtual ~dLytMapFader_c();
|
||||
/* vt 0x0C */ virtual void draw() override;
|
||||
|
||||
void calc();
|
||||
|
||||
bool isVisible() const {
|
||||
return mIsVisible;
|
||||
}
|
||||
|
||||
void setVisible(bool v) {
|
||||
mIsVisible = v;
|
||||
}
|
||||
|
||||
void fadeOut() {
|
||||
mFader.setStatus(EGG::Fader::STATUS_PREPARE_OUT);
|
||||
mFader.setFrame(15);
|
||||
mFader.fadeOut();
|
||||
}
|
||||
|
||||
public:
|
||||
/* 0x10 */ EGG::ColorFader mFader;
|
||||
/* 0x34 */ u8 _0x34[0x38 - 0x34];
|
||||
/* 0x38 */ bool mIsVisible;
|
||||
};
|
||||
|
||||
// Size 0x4C
|
||||
class dLytMapPopupInfo_c {
|
||||
friend class dLytMapMain_c;
|
||||
|
||||
public:
|
||||
dLytMapPopupInfo_c() : mStateMgr(*this, sStateID::null) {}
|
||||
|
||||
@@ -198,6 +435,11 @@ public:
|
||||
STATE_FUNC_DECLARE(dLytMapPopupInfo_c, WaitInvalid);
|
||||
STATE_FUNC_DECLARE(dLytMapPopupInfo_c, Out);
|
||||
|
||||
void build(d2d::ResAccIf_c *resAcc);
|
||||
void remove();
|
||||
void execute();
|
||||
void draw();
|
||||
|
||||
private:
|
||||
/* 0x000 */ UI_STATE_MGR_DECLARE(dLytMapPopupInfo_c);
|
||||
/* 0x03C */ d2d::LytBase_c mLyt;
|
||||
@@ -206,32 +448,59 @@ private:
|
||||
|
||||
// Size 0x4C
|
||||
class dLytMapSavePopupAction_c {
|
||||
friend class dLytMapSavePopup_c;
|
||||
|
||||
public:
|
||||
dLytMapSavePopupAction_c() : mStateMgr(*this, sStateID::null), field_0x44(0.0f), field_0x48(0) {}
|
||||
dLytMapSavePopupAction_c() : mStateMgr(*this, sStateID::null), mInOutFrame(0.0f), mInRequest(false) {}
|
||||
|
||||
STATE_FUNC_DECLARE(dLytMapSavePopupAction_c, Invisible);
|
||||
STATE_FUNC_DECLARE(dLytMapSavePopupAction_c, In);
|
||||
STATE_FUNC_DECLARE(dLytMapSavePopupAction_c, Wait);
|
||||
STATE_FUNC_DECLARE(dLytMapSavePopupAction_c, Out);
|
||||
|
||||
void execute();
|
||||
void init(d2d::AnmGroup_c *pGroups);
|
||||
void hide();
|
||||
|
||||
private:
|
||||
/* 0x00 */ UI_STATE_MGR_DECLARE(dLytMapSavePopupAction_c);
|
||||
/* 0x44 */ f32 field_0x44;
|
||||
/* 0x48 */ u8 field_0x48;
|
||||
/* 0x3C */ d2d::AnmGroup_c *mpAnmGroupInOut;
|
||||
/* 0x40 */ d2d::AnmGroup_c *mpAnmGroupInput;
|
||||
/* 0x44 */ f32 mInOutFrame;
|
||||
/* 0x48 */ bool mInRequest;
|
||||
};
|
||||
|
||||
// Assumed name
|
||||
class dLytMapSavePopup_c {
|
||||
public:
|
||||
dLytMapSavePopup_c() {}
|
||||
dLytMapSavePopup_c() : mStatueNum(0), mpStatueBoundings(nullptr), mCurrentlyInStatue(-1) {}
|
||||
|
||||
void build(d2d::ResAccIf_c *resAcc);
|
||||
void remove();
|
||||
void execute();
|
||||
void draw();
|
||||
|
||||
void set(nw4r::lyt::Bounding **pStatueBoundings, s32 count);
|
||||
void hide(s32 statueIdx);
|
||||
|
||||
void setCurrentStatue(s32 idx) {
|
||||
mCurrentlyInStatue = idx;
|
||||
}
|
||||
|
||||
private:
|
||||
f32 setStatueLabel(const char *label);
|
||||
|
||||
/* 0x000 */ d2d::LytBase_c mLyt;
|
||||
/* 0x090 */ d2d::AnmGroup_c mAnmGroups[2];
|
||||
/* 0x110 */ dLytMapSavePopupAction_c mActions[12];
|
||||
/* 0x4A0 */ s32 mStatueNum;
|
||||
/* 0x4A4 */ nw4r::lyt::Bounding **mpStatueBoundings;
|
||||
/* 0x4A8 */ s32 mCurrentlyInStatue;
|
||||
};
|
||||
|
||||
class dLytMapSaveCaption_c {
|
||||
friend class dLytMapMain_c;
|
||||
|
||||
public:
|
||||
dLytMapSaveCaption_c() : mStateMgr(*this, sStateID::null) {}
|
||||
|
||||
@@ -240,6 +509,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;
|
||||
@@ -248,8 +525,12 @@ private:
|
||||
|
||||
// Size 0x190
|
||||
class dLytMapSaveObj_c {
|
||||
friend class dLytMapMain_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) {}
|
||||
~dLytMapSaveObj_c() {}
|
||||
|
||||
STATE_FUNC_DECLARE(dLytMapSaveObj_c, Wait);
|
||||
STATE_FUNC_DECLARE(dLytMapSaveObj_c, ToSelect);
|
||||
@@ -257,13 +538,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;
|
||||
};
|
||||
|
||||
class dLytMapMain_c : public m2d::Base_c {
|
||||
@@ -276,11 +566,19 @@ public:
|
||||
virtual void dLytMapMain_vt0x10();
|
||||
|
||||
void build();
|
||||
void remove();
|
||||
void execute();
|
||||
|
||||
bool isNotInvisible() const;
|
||||
bool isOpenMaybe() const;
|
||||
bool fn_80139EA0() const;
|
||||
void lightPillarRelated(s32, s32, s32);
|
||||
bool checkClose() const;
|
||||
|
||||
bool isOpen() const;
|
||||
bool canOpen() const;
|
||||
bool isVisible() const;
|
||||
void queueMapEvent(s32 mapEvent, s32 surfaceProvince, s32 c);
|
||||
void startMapEvent(s32 mapEvent, s32 surfaceProvince, s32 c);
|
||||
bool isVisibleNoIntro() const;
|
||||
|
||||
const dMapSaveObjDefinition *getSaveObjDefinition(s32 province, s32 statueIdx) const;
|
||||
|
||||
STATE_FUNC_DECLARE(dLytMapMain_c, Invisible);
|
||||
STATE_FUNC_DECLARE(dLytMapMain_c, RenderingWait);
|
||||
@@ -323,61 +621,275 @@ public:
|
||||
STATE_FUNC_DECLARE(dLytMapMain_c, EventSaveObjConfirmMsgWindow);
|
||||
STATE_FUNC_DECLARE(dLytMapMain_c, EventSaveObjDecide);
|
||||
|
||||
enum MapEvent_e {
|
||||
MAP_EVENT_NONE = 0,
|
||||
MAP_EVENT_1 = 1,
|
||||
// ???
|
||||
MAP_EVENT_SW_BANK_SMALL = 2,
|
||||
MAP_EVENT_MAP_INTRO = 3,
|
||||
MAP_EVENT_DUNGEON_MAP_GET = 4,
|
||||
MAP_EVENT_FIELD_MAP_CHANGE_5 = 5,
|
||||
MAP_EVENT_FOREST_MAP_CHANGE = 6,
|
||||
MAP_EVENT_SIGNAL_ADD = 7,
|
||||
MAP_EVENT_FIELD_MAP_CHANGE_8 = 8,
|
||||
MAP_EVENT_GODDESS_CUBE = 9,
|
||||
/** arg1 = surface province */
|
||||
MAP_EVENT_SAVE_OBJ = 10,
|
||||
MAP_EVENT_11 = 11,
|
||||
};
|
||||
|
||||
private:
|
||||
// TODO - need to come up with better names for all of these enums and concepts
|
||||
|
||||
enum SurfaceProvince_e {
|
||||
SURFACE_PROVINCE_FARON = 0,
|
||||
SURFACE_PROVINCE_ELDIN = 1,
|
||||
SURFACE_PROVINCE_LANAYRU = 2,
|
||||
};
|
||||
|
||||
enum AreaGroup_e {
|
||||
AREAGROUP_SKY = 1,
|
||||
AREAGROUP_FARON = 2,
|
||||
AREAGROUP_ELDIN = 3,
|
||||
AREAGROUP_LANAYRU = 4,
|
||||
AREAGROUP_SEALED_GROUNDS = 5,
|
||||
AREAGROUP_MAX = 6,
|
||||
};
|
||||
|
||||
enum RoomType_e {
|
||||
ROOMTYPE_FIELD = 0,
|
||||
ROOMTYPE_DUNGEON = 1,
|
||||
ROOMTYPE_SKYLOFT = 2,
|
||||
ROOMTYPE_BOSS_HOUSE = 3,
|
||||
ROOMTYPE_SKYFIELD = 4,
|
||||
ROOMTYPE_SKYFIELD_INTERIOR = 5,
|
||||
ROOMTYPE_MAX = 6,
|
||||
};
|
||||
|
||||
dLytMapGlobal_c *getGlobal();
|
||||
void checkScroll();
|
||||
bool needsNav(s32 mapMode) const;
|
||||
bool canZoomOut(s32 mapMode) const;
|
||||
bool canZoomIn(s32 mapMode) const;
|
||||
bool canResetPosition(s32 mapMode, bool) const;
|
||||
bool canChangeUpDirection(s32 mapMode, bool) const;
|
||||
bool canCenterCursor(s32 mapMode) const;
|
||||
bool canCenterCursor1(s32 mapMode) const;
|
||||
bool canPlaceBeacons(s32 mapMode);
|
||||
bool canChangeFloor(s32 mapMode) const;
|
||||
bool isPointingAtMainMap() const;
|
||||
|
||||
void loadStageProperties();
|
||||
s32 getAreaGroup(s32 stifArea) const;
|
||||
s32 getRoomType() const;
|
||||
|
||||
s32 getSelectedSaveObjIdx() const;
|
||||
|
||||
f32 fn_80142D90(s32);
|
||||
void fn_80142F00(mVec3_c &, s32 mapMode, bool, const mVec3_c &, const mAng &);
|
||||
void fn_8013FB70(const mVec3_c &, f32);
|
||||
bool fn_80141530() const;
|
||||
bool fn_80142D10(s32, bool, mAng &);
|
||||
void fn_80143060(mVec3_c &, const mVec3_c &, const mVec3_c &, const mAng &);
|
||||
void forceOut();
|
||||
void fn_80143300();
|
||||
void fn_80143120(s32);
|
||||
void fn_801431E0();
|
||||
void fn_8013AD50();
|
||||
void fn_80143360();
|
||||
void fn_80142C80(s32);
|
||||
bool isMapIntroDone() const;
|
||||
bool shouldDrawFootprints() const;
|
||||
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
|
||||
void clearButtonMessages();
|
||||
void setButtonMessages(s32 currentMapMode, bool currentUpDirection, s32 nextMapMode, bool nextUpDirection);
|
||||
void setCursorType();
|
||||
|
||||
void setupFlags();
|
||||
void setupStage();
|
||||
void setupEvent(s32 event, s32 arg1, s32 arg2);
|
||||
void close();
|
||||
|
||||
void loadTextboxes();
|
||||
|
||||
void saveMapState();
|
||||
void initMapState();
|
||||
void loadMapState();
|
||||
|
||||
void checkCursorPointedAtMap();
|
||||
|
||||
void calculateBoundingWorldHitboxes();
|
||||
|
||||
dAcTbox_c *findGoddessChestForStoryflag(s32 flag) const;
|
||||
bool checkStoryflag(s32 flag) const;
|
||||
void displaySaveObjs();
|
||||
bool isPaneVisible(nw4r::lyt::Pane *pane) const;
|
||||
void setSaveObjsVisible(bool visible);
|
||||
void setSaveObjPanePtrs();
|
||||
void initSaveObjs();
|
||||
|
||||
u8 getRoomAlpha(s32 roomid) const;
|
||||
|
||||
static dMapSavedData sSavedMapData;
|
||||
static const dMapSavedData sDefaultMapData;
|
||||
|
||||
bool isMapEventEq0Or1Or7Or9Or11() const {
|
||||
return mMapEvent == MAP_EVENT_NONE || mMapEvent == MAP_EVENT_1 || mMapEvent == MAP_EVENT_SIGNAL_ADD ||
|
||||
mMapEvent == MAP_EVENT_GODDESS_CUBE || mMapEvent == MAP_EVENT_11;
|
||||
}
|
||||
|
||||
bool isMapEventEq1Or7Or8Or9Or11() const {
|
||||
return mMapEvent == MAP_EVENT_1 || mMapEvent == MAP_EVENT_SIGNAL_ADD ||
|
||||
mMapEvent == MAP_EVENT_FIELD_MAP_CHANGE_8 || mMapEvent == MAP_EVENT_GODDESS_CUBE ||
|
||||
mMapEvent == MAP_EVENT_11;
|
||||
}
|
||||
|
||||
/* 0x0010 */ UI_STATE_MGR_DECLARE(dLytMapMain_c);
|
||||
/* 0x004C */ u8 field_0x004C[0x00A4 - 0x004C];
|
||||
/* 0x00A4 */ u8 field_0x00A4[0x010C - 0x00A4];
|
||||
/* 0x004C */ dFlowMgrBase_c mFlowMgr;
|
||||
/* 0x00A4 */ dFlow_c mFlow;
|
||||
/* 0x0108 */ UNKWORD field_0x0108;
|
||||
/* 0x010C */ d2d::LytBase_c mLyt;
|
||||
/* 0x019C */ d2d::AnmGroup_c mAnmGroups[54];
|
||||
/* 0x0F1C */ LytMap0x80520B5C field_0xF1C;
|
||||
/* 0x0F24 */ dLytMapCapture_c mMapCapture;
|
||||
/* 0x0FA0 */ dLytMapFloorBtnMgr_c mFloorBtnMgr;
|
||||
/* 0x16B4 */ dLytMapPinIconAggregate_c mPinIconAggregate;
|
||||
|
||||
/* 0x2060 */ dLytMapMarkers_c mMarkers;
|
||||
/* 0x64C0 */ dLytMapFootPrints_c mFootPrints;
|
||||
/* 0x6664 */ dLytMapPutIcon_c mPutIcon;
|
||||
/* 0x6704 */ dLytMapSaveObj_c mSaveObjs[12];
|
||||
/* 0x79C4 */ dLytMapSaveCaption_c mSaveCaption;
|
||||
/* 0x0000 */ dLytMapSavePopup_c mSavePopup;
|
||||
/* 0x7BD0 */ dLytMapSavePopup_c mSavePopup;
|
||||
/* 0x807C */ dLytMapPopupInfo_c mPopupInfo;
|
||||
/* 0x8208 */ dTextBox_c *mpNumberTextBox;
|
||||
/* 0x820C */ dTextBox_c *mpNumberTextBoxS;
|
||||
/* 0x8210 */ nw4r::lyt::Pane *mpNoroshiPane;
|
||||
/* 0x8214 */ nw4r::lyt::Pane *mpScaleFramePane;
|
||||
/* 0x8218 */ dWindow_c *mpWakuWindow;
|
||||
/* 0x821C */ nw4r::lyt::Bounding *mpSaveObjBoundingsFaron[10];
|
||||
/* 0x8244 */ nw4r::lyt::Bounding *mpSaveObjBoundingsEldin[6];
|
||||
/* 0x825C */ nw4r::lyt::Bounding *mpSaveObjBoundingsLanayru[12];
|
||||
/* 0x828C */ mVec3_c field_0x828C[12];
|
||||
/* 0x832C */ dCursorHitCheckLyt_c field_0x832C[33];
|
||||
/* 0x831C */ nw4r::lyt::Bounding **mpCurrentSaveObjBoundings;
|
||||
/* 0x8320 */ u32 mNumSaveObjs;
|
||||
|
||||
/* 0x8324 */ u8 _0x8324[0x8328 - 0x8324];
|
||||
|
||||
/* 0x8328 */ d2d::AnmGroup_c *mpInOutAnmGroup;
|
||||
|
||||
// TODO - it appears the map abuses these hit check things
|
||||
// to calculate Lyt bounding boxes, and it stores the
|
||||
// results in 0x8948...
|
||||
/* 0x832C */ dCursorHitCheckLyt_c mHitChecks[33];
|
||||
|
||||
/* 0x8854 */ nw4r::lyt::Pane *mpPanes[11];
|
||||
/* 0x8880 */ d2d::AnmGroup_c *field_0x8880[11]; // ???
|
||||
/* 0x88AC */ UNKWORD field_0x88AC;
|
||||
/* 0x88B0 */ nw4r::lyt::Pane *mpDungeonPanes[7];
|
||||
/* 0x88CC */ nw4r::lyt::Pane *mpDungeonPics[7];
|
||||
|
||||
/* 0x88E8 */ nw4r::lyt::Pane *mpPaneBgAll01;
|
||||
/* 0x88EC */ nw4r::lyt::Pane *mpPaneBgAll02;
|
||||
/* 0x88F0 */ nw4r::lyt::Pane *mpPaneAll01;
|
||||
/* 0x88F4 */ nw4r::lyt::Pane *mpPaneAll02;
|
||||
/* 0x88F8 */ nw4r::lyt::Pane *mpPaneRotate00;
|
||||
/* 0x88FC */ nw4r::lyt::Pane *mpPaneRotate01;
|
||||
/* 0x8900 */ nw4r::lyt::Pane *mpAllPane;
|
||||
/* 0x8904 */ mVec3_c field_0x8904;
|
||||
/* 0x8910 */ mVec3_c field_0x8910;
|
||||
/* 0x891C */ mVec3_c field_0x891C;
|
||||
|
||||
/* 0x8928 */ u8 _0x8928[0x8930 - 0x8928];
|
||||
|
||||
/* 0x8928 */ mVec2_c field_0x8928;
|
||||
/* 0x8930 */ mVec3_c field_0x8930;
|
||||
/* 0x893C */ mVec3_c field_0x893C;
|
||||
|
||||
/* 0x8948 */ u8 idkfixmelater[0x4BC0];
|
||||
/* 0x8C94 */ s32 field_0x8C94;
|
||||
/* 0x8948 */ dLytMapBoundingWorldBounds mBoundingWorldBounds[33];
|
||||
|
||||
// ...
|
||||
/* 0x8C60 */ s32 mMaxBeaconCount;
|
||||
/* 0x8C64 */ s32 field_0x8C64;
|
||||
/* 0x8C68 */ s32 mRoomType;
|
||||
/* 0x8C6C */ s32 mAreaGroup;
|
||||
/* 0x8C70 */ u32 field_0x8C70;
|
||||
|
||||
/* 0x8C74 */ u8 _0x8C74[0x8C7C - 0x8C74];
|
||||
/* 0x8C7C */ f32 field_0x8C7C;
|
||||
/* 0x8C80 */ f32 field_0x8C80;
|
||||
|
||||
/* 0x8C84 */ u8 field_0x8C84;
|
||||
|
||||
/* 0x8C88 */ f32 field_0x8C88;
|
||||
/* 0x8C8C */ f32 field_0x8C8C;
|
||||
/* 0x8C90 */ bool mMapUpDirection;
|
||||
/* 0x8C91 */ bool mNextMapUpDirection;
|
||||
/* 0x8C92 */ bool mMapUpDirectionAfterZoomToDetail;
|
||||
/* 0x8C93 */ u8 field_0x8C93;
|
||||
/* 0x8C94 */ s32 mMapEvent;
|
||||
/* 0x8C98 */ s32 mNextMapEvent;
|
||||
/* 0x8C9C */ s32 mMapEventArg1;
|
||||
/* 0x8CA0 */ s32 mMapEventArg2;
|
||||
|
||||
/* 0x8CA4 */ s32 mCurrentMapMode;
|
||||
/* 0x8CA8 */ s32 mNextMapMode;
|
||||
|
||||
/* 0x8CAC */ u8 field_0x8CAC;
|
||||
/* 0x8CAD */ bool mDoCameraTransition;
|
||||
/* 0x8CAE */ bool field_0x8CAE;
|
||||
|
||||
/* 0x8CB0 */ u32 mEventTimer;
|
||||
/* 0x8CB4 */ UNKWORD field_0x8CB4;
|
||||
/* 0x8CB8 */ u32 field_0x8CB8;
|
||||
/* 0x8CBC */ nw4r::lyt::Bounding *mpMapBounding;
|
||||
/* 0x8CC0 */ bool mPointerOnMap;
|
||||
/* 0x8CC1 */ bool mPointerCanPlaceBeacon;
|
||||
/* 0x8CC4 */ mVec3_c field_0x8CC4;
|
||||
/* 0x8CD0 */ mVec3_c field_0x8CD0;
|
||||
/* 0x8CDC */ mVec3_c field_0x8CDC;
|
||||
/* 0x8CE8 */ mVec3_c field_0x8CE8;
|
||||
/* 0x8CF4 */ mVec3_c field_0x8CF4;
|
||||
/* 0x8D00 */ mVec3_c field_0x8D00;
|
||||
/* 0x8D0C */ mVec3_c field_0x8D0C;
|
||||
/* 0x8D00 */ mVec3_c mMapScroll;
|
||||
/* 0x8D0C */ mVec3_c mPlayerPos;
|
||||
/* 0x8D18 */ mVec3_c field_0x8D18;
|
||||
/* 0x8D24 */ mVec3_c field_0x8D24;
|
||||
|
||||
/* 0x8DC8 */ UNKWORD field_0x8DC8;
|
||||
};
|
||||
|
||||
// Made up name
|
||||
class dLytMapFader_c : public m2d::Base_c {
|
||||
public:
|
||||
dLytMapFader_c();
|
||||
virtual ~dLytMapFader_c();
|
||||
/* vt 0x0C */ virtual void draw() override;
|
||||
|
||||
void calc();
|
||||
|
||||
private:
|
||||
/* 0x10 */ EGG::ColorFader mFader;
|
||||
/* 0x8D24 */ mVec3_c mGoddessChestWorldPosition;
|
||||
/* 0x8D30 */ mVec2_c field_0x8D30;
|
||||
/* 0x8D38 */ mVec2_c field_0x8D38;
|
||||
/* 0x8D40 */ f32 field_0x8D40;
|
||||
/* 0x8D44 */ mAng field_0x8D44;
|
||||
/* 0x8D46 */ mAng field_0x8D46;
|
||||
/* 0x8D48 */ mAng field_0x8D48;
|
||||
/* 0x8D4C */ f32 field_0x8D4C;
|
||||
/* 0x8D50 */ f32 field_0x8D50;
|
||||
/* 0x8D54 */ s32 mNumTitleLines;
|
||||
/* 0x8D58 */ s32 mCurrentFloor;
|
||||
/* 0x8D5C */ UNKWORD mNumFloors;
|
||||
/* 0x8D60 */ s32 mBaseFloorOffset;
|
||||
/* 0x8D64 */ s32 field_0x8D64;
|
||||
/* 0x8D68 */ mAng field_0x8D68;
|
||||
/* 0x8D6A */ bool mEventCanceled; // set at 0x8009e2d4
|
||||
/* 0x8D6B */ bool mEventDone;
|
||||
/* 0x8D6C */ nw4r::lyt::Pane *mpRegionPane1;
|
||||
/* 0x8D70 */ nw4r::lyt::Pane *mpRegionPane2;
|
||||
/* 0x8D74 */ nw4r::lyt::Pane *mpZoomInOutPane;
|
||||
/* 0x8D78 */ f32 field_0x8D78;
|
||||
/* 0x8D7C */ f32 field_0x8D7C;
|
||||
/* 0x8D80 */ f32 field_0x8D80;
|
||||
/* 0x8D84 */ f32 field_0x8D84;
|
||||
/* 0x8D88 */ f32 field_0x8D88;
|
||||
/* 0x8D8C */ nw4r::lyt::Group *mpPriorityGroups[2];
|
||||
/* 0x8D94 */ d2d::SubPaneList mSubpaneList;
|
||||
/* 0x8DA0 */ d2d::SubPaneListNode mSubpane;
|
||||
/* 0x8DB0 */ UNKWORD field_0x8DB0;
|
||||
/* 0x8DB4 */ bool mNavEnabled;
|
||||
/* 0x8DB5 */ bool mDrawScaleFrame;
|
||||
/* 0x8DB8 */ s32 mDisplayedBeaconCount;
|
||||
/* 0x8DBC */ bool mShowIslandNames;
|
||||
/* 0x8DBD */ bool field_0x8DBD;
|
||||
/* 0x8DBE */ u8 mMapChangeAlpha;
|
||||
/* 0x8DBF */ bool mIsVisible;
|
||||
/* 0x8DC0 */ UNKWORD field_0x8DC0;
|
||||
/* 0x8DC4 */ UNKWORD field_0x8DC4;
|
||||
/* 0x8DC8 */ dLytMapGlobal_c mGlobal;
|
||||
};
|
||||
|
||||
// Size 0x91FC, inline ctor at 802ccd88
|
||||
@@ -398,36 +910,49 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
bool isNotInvisible() const {
|
||||
return mMapMain.isNotInvisible();
|
||||
bool isVisible() const {
|
||||
return mMapMain.isVisible();
|
||||
}
|
||||
|
||||
bool isOpenMaybe() const {
|
||||
return mMapMain.isOpenMaybe();
|
||||
bool isOpen() const {
|
||||
return mMapMain.isOpen();
|
||||
}
|
||||
|
||||
bool getFn_80139EA0() const {
|
||||
return mMapMain.fn_80139EA0();
|
||||
bool isVisibleNoIntro() const {
|
||||
return mMapMain.isVisibleNoIntro();
|
||||
}
|
||||
|
||||
void build();
|
||||
bool build();
|
||||
bool remove();
|
||||
bool execute();
|
||||
bool draw();
|
||||
|
||||
bool isSomeMapFieldEq2Or4Or5Or6() const {
|
||||
return mMapMain.field_0x8C94 == 2 || mMapMain.field_0x8C94 == 4 || mMapMain.field_0x8C94 == 5 ||
|
||||
mMapMain.field_0x8C94 == 6;
|
||||
bool isMapEventEq2Or4Or5Or6() const {
|
||||
return mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_SW_BANK_SMALL ||
|
||||
mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_DUNGEON_MAP_GET ||
|
||||
mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_FIELD_MAP_CHANGE_5 ||
|
||||
mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_FOREST_MAP_CHANGE;
|
||||
}
|
||||
|
||||
bool isSomeMapFieldEq10() const {
|
||||
return mMapMain.field_0x8C94 == 10;
|
||||
bool isMapEventSaveObj() const {
|
||||
return mMapMain.mMapEvent == dLytMapMain_c::MAP_EVENT_SAVE_OBJ;
|
||||
}
|
||||
|
||||
void lightPillarRelated(s32 p1, s32 p2, s32 p3) {
|
||||
mMapMain.lightPillarRelated(p1, p2, p3);
|
||||
void queueMapEvent(s32 mapEvent, s32 arg1, s32 arg2) {
|
||||
mMapMain.queueMapEvent(mapEvent, arg1, arg2);
|
||||
}
|
||||
|
||||
const dMapSaveObjDefinition *getSaveObjDefinition(s32 statueIdx) const {
|
||||
return mMapMain.getSaveObjDefinition(mMapMain.mMapEventArg1, statueIdx);
|
||||
}
|
||||
|
||||
void fadeOut();
|
||||
|
||||
private:
|
||||
/* 0x0004 */ d2d::ResAccIf_c mResAcc;
|
||||
/* 0x0374 */ dLytMapMain_c mMapMain;
|
||||
/* 0x91A4 */ u8 _0x91A4[0x91C0 - 0x91A4];
|
||||
/* 0x91C0 */ dLytMapFader_c mMapFader;
|
||||
|
||||
static dLytMap_c *sInstance;
|
||||
};
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
#define D_LYT_MAP_CAPTURE_H
|
||||
|
||||
#include "common.h"
|
||||
#include "nw4r/lyt/lyt_picture.h"
|
||||
#include "s/s_State.hpp"
|
||||
#include "s/s_StateID.hpp"
|
||||
|
||||
class dLytMapCapture_c {
|
||||
public:
|
||||
dLytMapCapture_c() :mStateMgr(*this, sStateID::null) {
|
||||
field_0x040 = 0;
|
||||
dLytMapCapture_c() :mStateMgr(*this, sStateID::null), mpPicture(nullptr) {
|
||||
field_0x070 = 0.0f;
|
||||
field_0x074 = 0.0f;
|
||||
field_0x078 = 0;
|
||||
field_0x079 = 0;
|
||||
mRenderRequest = false;
|
||||
mIsBusyRendering = false;
|
||||
field_0x06C = 0.0f;
|
||||
field_0x068 = 0.0f;
|
||||
field_0x064 = 0.0f;
|
||||
@@ -23,16 +23,30 @@ public:
|
||||
STATE_FUNC_DECLARE(dLytMapCapture_c, RenderingWait);
|
||||
STATE_FUNC_DECLARE(dLytMapCapture_c, RenderingWaitStep2);
|
||||
|
||||
void renderRequest() {
|
||||
mRenderRequest = true;
|
||||
}
|
||||
|
||||
void setPicture(nw4r::lyt::Picture *pic) {
|
||||
mpPicture = pic;
|
||||
}
|
||||
|
||||
void execute();
|
||||
bool isBusyRendering() const;
|
||||
|
||||
private:
|
||||
void fn_8012D6F0();
|
||||
|
||||
/* 0x004 */ UI_STATE_MGR_DECLARE(dLytMapCapture_c);
|
||||
/* 0x040*/ UNKWORD field_0x040;
|
||||
/* 0x040 */ nw4r::lyt::Picture *mpPicture;
|
||||
/* 0x044 */ u8 _0x040[0x064 - 0x044];
|
||||
/* 0x064 */ f32 field_0x064;
|
||||
/* 0x068 */ f32 field_0x068;
|
||||
/* 0x06C */ f32 field_0x06C;
|
||||
/* 0x070 */ f32 field_0x070;
|
||||
/* 0x074 */ f32 field_0x074;
|
||||
/* 0x078 */ u8 field_0x078;
|
||||
/* 0x079 */ u8 field_0x079;
|
||||
/* 0x078 */ bool mRenderRequest;
|
||||
/* 0x079 */ bool mIsBusyRendering;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
#ifndef D_LYT_MAP_GLOBAL_H
|
||||
#define D_LYT_MAP_GLOBAL_H
|
||||
|
||||
#include "common.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_vec.h"
|
||||
|
||||
class dLytMapGlobal_c {
|
||||
public:
|
||||
dLytMapGlobal_c();
|
||||
~dLytMapGlobal_c() {
|
||||
sInstance = nullptr;
|
||||
}
|
||||
|
||||
enum MapMode_e {
|
||||
MAPMODE_WORLD = 0,
|
||||
// aka area
|
||||
MAPMODE_PROVINCE = 1,
|
||||
// aka area
|
||||
MAPMODE_WORLD_SKY = 2,
|
||||
// aka course
|
||||
MAPMODE_STAGE = 3,
|
||||
// aka detail
|
||||
MAPMODE_ZOOM = 4,
|
||||
};
|
||||
|
||||
static dLytMapGlobal_c *GetInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
const mVec3_c &getMapScroll() const {
|
||||
return mMapScroll;
|
||||
}
|
||||
|
||||
void setMapScroll(const mVec3_c &v) {
|
||||
mMapScroll = v;
|
||||
}
|
||||
|
||||
void setField_0x0C(const mVec2_c &v) {
|
||||
field_0x0C = v;
|
||||
}
|
||||
|
||||
const mVec2_c &getField_0x20() const {
|
||||
return field_0x20;
|
||||
}
|
||||
|
||||
void setField_0x20(const mVec2_c &v) {
|
||||
field_0x20 = v;
|
||||
}
|
||||
|
||||
const mVec2_c &getField_0x28() const {
|
||||
return field_0x28;
|
||||
}
|
||||
|
||||
void setField_0x28(const mVec2_c &v) {
|
||||
field_0x28 = v;
|
||||
}
|
||||
|
||||
void setMapRotationCenter(const mVec3_c &v) {
|
||||
mMapRotationCenter = v;
|
||||
}
|
||||
|
||||
const mVec3_c &getMapRotationCenter() const {
|
||||
return mMapRotationCenter;
|
||||
}
|
||||
|
||||
const mAng &getMapRotation() const {
|
||||
return mMapRotation;
|
||||
}
|
||||
|
||||
void setMapRotation(const mAng &rot) {
|
||||
mMapRotation = rot;
|
||||
}
|
||||
|
||||
const mVec3_c &getPlayerPos() const {
|
||||
return mPlayerPosition;
|
||||
}
|
||||
|
||||
u8 getField_0x55() const {
|
||||
return field_0x55;
|
||||
}
|
||||
|
||||
void setField_0x55(u8 v) {
|
||||
field_0x55 = v;
|
||||
}
|
||||
|
||||
const mAng &getField_0x56() const {
|
||||
return field_0x56;
|
||||
}
|
||||
|
||||
u8 getAlpha() const {
|
||||
return mAlpha;
|
||||
}
|
||||
|
||||
void setAlpha(u8 alpha) {
|
||||
mAlpha = alpha;
|
||||
}
|
||||
|
||||
s32 getCurrentMapMode() const {
|
||||
return mCurrentMapMode;
|
||||
}
|
||||
|
||||
void setCurrentMapMode(s32 mode) {
|
||||
mCurrentMapMode = mode;
|
||||
}
|
||||
|
||||
s32 getNextMapMode() const {
|
||||
return mNextMapMode;
|
||||
}
|
||||
|
||||
void setNextMapMode(s32 mode) {
|
||||
mNextMapMode = mode;
|
||||
}
|
||||
|
||||
f32 getZoomFrame() const {
|
||||
return mZoomFrame;
|
||||
}
|
||||
|
||||
void setZoomFrame(f32 v) {
|
||||
mZoomFrame = v;
|
||||
}
|
||||
|
||||
void setField_0x58(f32 v) {
|
||||
field_0x58 = v;
|
||||
}
|
||||
|
||||
f32 getField_0x58() const {
|
||||
return field_0x58;
|
||||
}
|
||||
|
||||
f32 getField_0x44() const {
|
||||
return field_0x44;
|
||||
}
|
||||
|
||||
void setField_0x44(f32 v) {
|
||||
field_0x44 = v;
|
||||
}
|
||||
|
||||
s32 getFloor() const {
|
||||
return mFloor;
|
||||
}
|
||||
|
||||
void setFloor(s32 floor) {
|
||||
mFloor = floor;
|
||||
}
|
||||
|
||||
u8 getField_0x4C() const {
|
||||
return field_0x4C;
|
||||
}
|
||||
|
||||
void setField_0x4C(u8 v) {
|
||||
field_0x4C = v;
|
||||
}
|
||||
|
||||
u8 getField_0x4D() const {
|
||||
return field_0x4D;
|
||||
}
|
||||
|
||||
void setField_0x4D(u8 v) {
|
||||
field_0x4D = v;
|
||||
}
|
||||
|
||||
u8 getField_0x4F() const {
|
||||
return field_0x4F;
|
||||
}
|
||||
|
||||
void setField_0x4F(u8 v) {
|
||||
field_0x4F = v;
|
||||
}
|
||||
|
||||
s32 getMapEvent() const {
|
||||
return mMapEvent;
|
||||
}
|
||||
|
||||
void setMapEvent(s32 v) {
|
||||
mMapEvent = v;
|
||||
}
|
||||
|
||||
u8 getField_0x54() const {
|
||||
return field_0x54;
|
||||
}
|
||||
|
||||
void projectOntoMap(mVec2_c &result, const mVec3_c &position) const;
|
||||
void unprojectFromMap(mVec3_c &result, const mVec2_c &position) const;
|
||||
void unprojectFromMap(mVec3_c &result, const mVec2_c &position, const mAng &rot) const;
|
||||
void unprojectFromMap(mVec3_c &result, const mVec2_c &position, const mVec3_c &v2, const mAng &rot) const;
|
||||
|
||||
private:
|
||||
static dLytMapGlobal_c *sInstance;
|
||||
|
||||
void projectOntoMap(
|
||||
mVec2_c &result, const mVec3_c &position, const mVec3_c &mapScroll, const mVec3_c &mapRotationCenter,
|
||||
const mAng &rot, f32 f1, f32 f2
|
||||
) const;
|
||||
|
||||
void unprojectFromMap(
|
||||
mVec3_c &result, const mVec2_c &position, const mVec2_c &v1, const mVec3_c &mapScroll,
|
||||
const mVec3_c &mapRotationCenter, const mAng &rot, f32 f1, f32 f2
|
||||
) const;
|
||||
|
||||
/* 0x00 */ mVec3_c mMapScroll;
|
||||
/* 0x0C */ mVec2_c field_0x0C;
|
||||
/* 0x14 */ mVec3_c mMapRotationCenter;
|
||||
/* 0x20 */ mVec2_c field_0x20;
|
||||
/* 0x28 */ mVec2_c field_0x28;
|
||||
/* 0x30 */ mVec3_c mPlayerPosition;
|
||||
/* 0x3C */ mAng mMapRotation;
|
||||
/* 0x40 */ f32 field_0x40;
|
||||
/* 0x44 */ f32 field_0x44;
|
||||
/* 0x48 */ s32 mFloor;
|
||||
/* 0x4C */ u8 field_0x4C;
|
||||
/* 0x4D */ u8 field_0x4D;
|
||||
/* 0x4E */ u8 mAlpha;
|
||||
/* 0x4F */ u8 field_0x4F;
|
||||
/* 0x50 */ s32 mMapEvent;
|
||||
/* 0x54 */ u8 field_0x54;
|
||||
/* 0x55 */ u8 field_0x55;
|
||||
/* 0x56 */ mAng field_0x56;
|
||||
/* 0x58 */ f32 field_0x58;
|
||||
/* 0x5C */ s32 mCurrentMapMode;
|
||||
/* 0x60 */ s32 mNextMapMode;
|
||||
/* 0x64 */ f32 mZoomFrame; ///< 0.0f when zoomed out, 1.0f when zoomed in
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,520 @@
|
||||
#ifndef D_LYT_MAP_MARKERS_H
|
||||
#define D_LYT_MAP_MARKERS_H
|
||||
|
||||
#include "d/d_cursor_hit_check.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_textbox.h"
|
||||
#include "d/lyt/d_window.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/lyt/lyt_bounding.h"
|
||||
#include "nw4r/lyt/lyt_pane.h"
|
||||
#include "sized_string.h"
|
||||
|
||||
class dAcBase_c;
|
||||
class dAcTbox_c;
|
||||
class dAcPy_c;
|
||||
class dTgMapMark_c;
|
||||
|
||||
// Size: 0x1C
|
||||
struct dLytMapPopupState {
|
||||
public:
|
||||
dLytMapPopupState() : textPos(0.0f, 0.0f) {}
|
||||
~dLytMapPopupState() {}
|
||||
|
||||
/* 0x00 */ f32 inAnimFrame;
|
||||
/* 0x04 */ mVec2_c textPos;
|
||||
/* 0x0C */ mVec2_c boundingPos;
|
||||
/* 0x14 */ bool visible;
|
||||
/* 0x15 */ u8 objId;
|
||||
/* 0x18 */ const char *labelPrefix;
|
||||
};
|
||||
|
||||
/**
|
||||
* Since a map has a dynamic number of actors, the layout
|
||||
* doesn't actually contain multiple panes for each icon -
|
||||
* instead it contains one copy per icon, and then the custom
|
||||
* draw function simply reads a bunch of draw commands to position
|
||||
* and draw the panes, potentially using a pane multiple times.
|
||||
*
|
||||
* Size: 0xC
|
||||
*/
|
||||
struct dLytMapIcon01DrawCommand {
|
||||
public:
|
||||
dLytMapIcon01DrawCommand() {}
|
||||
~dLytMapIcon01DrawCommand() {}
|
||||
|
||||
/* 0x00 */ mVec2_c position;
|
||||
/* 0x08 */ mAng rotation;
|
||||
/* 0x0A */ u8 paneIdx;
|
||||
/* 0x0B */ u8 passIdx;
|
||||
};
|
||||
|
||||
// Size: 0x20
|
||||
struct dLytMapPopupConfig {
|
||||
public:
|
||||
dLytMapPopupConfig() : textPos(0.0f, 0.0f) {}
|
||||
~dLytMapPopupConfig() {}
|
||||
|
||||
/* 0x00 */ s32 cmdIdx;
|
||||
/* 0x04 */ nw4r::lyt::Bounding *bounding;
|
||||
/* 0x08 */ mVec2_c textPos;
|
||||
/* 0x10 */ mVec2_c boundingPos;
|
||||
/* 0x18 */ bool pointedAt;
|
||||
/* 0x19 */ u8 objId;
|
||||
/* 0x1C */ const char *labelPrefix;
|
||||
};
|
||||
|
||||
/**
|
||||
* Copy of dLytMapIcon01DrawCommand
|
||||
*
|
||||
* Size: 0xC
|
||||
*/
|
||||
struct dLytMapIcon00DrawCommand {
|
||||
public:
|
||||
dLytMapIcon00DrawCommand() {}
|
||||
~dLytMapIcon00DrawCommand() {}
|
||||
|
||||
/* 0x00 */ mVec2_c position;
|
||||
/* 0x08 */ mAng rotation;
|
||||
/* 0x0A */ u8 paneIdx;
|
||||
/* 0x0B */ u8 passIdx;
|
||||
};
|
||||
|
||||
/**
|
||||
* Since map icons are completely virtual, we need to separately
|
||||
* track animation state if there are special in/out animations.
|
||||
*
|
||||
* Size: 0x10
|
||||
*/
|
||||
struct dLytMapIconAnimState {
|
||||
public:
|
||||
// no ctor/dtor
|
||||
|
||||
/* 0x00 */ s32 cmdIndex;
|
||||
/* 0x04 */ f32 frame;
|
||||
/* 0x08 */ bool animIn;
|
||||
/* 0x09 */ bool animOut;
|
||||
/* 0x0A */ bool visible;
|
||||
/* 0x0B */ bool prevVisible;
|
||||
/* 0x0C */ bool render;
|
||||
};
|
||||
|
||||
/** 2D UI - Map - Popup text that appears when pointing at certain points of interest */
|
||||
class dLytMapPopup_c {
|
||||
public:
|
||||
dLytMapPopup_c()
|
||||
: mLabel("MAP_00"),
|
||||
mModeCheckResult(MODE_MAX),
|
||||
field_0x178(0),
|
||||
mMaxScale(0.0f),
|
||||
field_0x180(0),
|
||||
field_0x184(0) {}
|
||||
virtual ~dLytMapPopup_c() {}
|
||||
|
||||
bool build(d2d::ResAccIf_c *resAcc);
|
||||
bool remove();
|
||||
bool execute();
|
||||
void draw();
|
||||
|
||||
void setLabel(const char *label);
|
||||
void realizeText();
|
||||
void setInout(f32 value);
|
||||
f32 getTextRenderWidth() const;
|
||||
|
||||
f32 getInAnimDuration() const {
|
||||
return mAnm[1].getLastFrame();
|
||||
}
|
||||
|
||||
void setPosition(const mVec2_c &pos) {
|
||||
mPosition = pos;
|
||||
}
|
||||
|
||||
private:
|
||||
enum ModeCheck_e {
|
||||
MODE_TRANSITION_TO_ZOOM = 2,
|
||||
MODE_TRANSITION_TO_STAGE = 3,
|
||||
MODE_STABLE_STAGE = 4,
|
||||
MODE_STABLE_ZOOM = 5,
|
||||
MODE_MAX = 6,
|
||||
};
|
||||
|
||||
void setInitialState();
|
||||
|
||||
void checkMapMode();
|
||||
void updateScale();
|
||||
|
||||
/* 0x004 */ d2d::LytBase_c mLyt;
|
||||
/* 0x094 */ d2d::AnmGroup_c mAnm[2];
|
||||
/* 0x114 */ SizedString<0x40> mLabel;
|
||||
/* 0x154 */ nw4r::lyt::Pane *mpPanes[2];
|
||||
/* 0x15C */ dTextBox_c *mpTextboxes[2];
|
||||
/* 0x164 */ dWindow_c *mpWindow[1];
|
||||
/* 0x168 */ dTextBox_c *mpSizeBox[1];
|
||||
/* 0x16C */ s32 mModeCheckResult;
|
||||
/* 0x170 */ mVec2_c mPosition;
|
||||
/* 0x178 */ u8 field_0x178;
|
||||
/* 0x17C */ f32 mMaxScale;
|
||||
/* 0x180 */ UNKWORD field_0x180;
|
||||
/* 0x184 */ UNKWORD field_0x184;
|
||||
};
|
||||
|
||||
/** 2D UI - Map - Text holding area names (on the world/province view, or exits on the stage view) */
|
||||
class dLytMapPlace_c {
|
||||
public:
|
||||
dLytMapPlace_c()
|
||||
: mLabel("MAP_02"), mModeCheckResult(MODE_MAX), field_0x1C0(0.0f), field_0x1C4(0.0f), mMaxScale(0.0f) {}
|
||||
virtual ~dLytMapPlace_c() {}
|
||||
|
||||
bool build(d2d::ResAccIf_c *resAcc);
|
||||
bool remove();
|
||||
bool execute();
|
||||
void draw();
|
||||
|
||||
void setLabel(const char *label);
|
||||
void setInout(f32 value);
|
||||
void setColor(u32 value);
|
||||
|
||||
void realize();
|
||||
|
||||
private:
|
||||
enum ModeCheck_e {
|
||||
MODE_TRANSITION_TO_ZOOM = 2,
|
||||
MODE_TRANSITION_TO_STAGE = 3,
|
||||
MODE_STABLE_STAGE = 4,
|
||||
MODE_STABLE_ZOOM = 5,
|
||||
MODE_MAX = 6,
|
||||
};
|
||||
|
||||
void realizeText();
|
||||
void setInitialState();
|
||||
void updateScale();
|
||||
void realizeTextSize();
|
||||
void realizeBgSize();
|
||||
|
||||
/* 0x004 */ d2d::LytBase_c mLyt;
|
||||
/* 0x094 */ d2d::AnmGroup_c mAnm[3];
|
||||
/* 0x154 */ SizedString<0x40> mLabel;
|
||||
/* 0x194 */ nw4r::lyt::Pane *mpPanes[2];
|
||||
/* 0x19C */ nw4r::lyt::Pane *mpBgPanes[3];
|
||||
/* 0x1A8 */ dTextBox_c *mpTextboxes[3];
|
||||
/* 0x1B4 */ dWindow_c *mpWindow[1];
|
||||
/* 0x1B8 */ dTextBox_c *mpSizeBox[1];
|
||||
/* 0x1BC */ s32 mModeCheckResult;
|
||||
/* 0x1C0 */ f32 field_0x1C0;
|
||||
/* 0x1C4 */ f32 field_0x1C4;
|
||||
/* 0x1C8 */ mVec2_c field_0x1C8;
|
||||
/* 0x1D0 */ u8 _0x1D0[0x1D8 - 0x1D0];
|
||||
/* 0x1D8 */ f32 mMaxScale;
|
||||
};
|
||||
|
||||
class dLytMapIcon01_c : public m2d::Base_c {
|
||||
friend class dLytMapMarkers_c;
|
||||
|
||||
public:
|
||||
dLytMapIcon01_c()
|
||||
: field_0x000D(0),
|
||||
mShowIslandNames(false),
|
||||
mModeCheckResult(MODE_MAX),
|
||||
field_0x0C70(0),
|
||||
field_0x0C83(0),
|
||||
field_0x0C84(0),
|
||||
field_0x1838(0.0f),
|
||||
field_0x183C(0.0f),
|
||||
field_0x1840(0.0f),
|
||||
field_0x1844(false),
|
||||
field_0x1845(0),
|
||||
field_0x1848(0),
|
||||
field_0x184C(false),
|
||||
field_0x184D(false) {}
|
||||
virtual void draw() override;
|
||||
virtual bool build(d2d::ResAccIf_c *resAcc);
|
||||
virtual bool remove();
|
||||
virtual bool execute();
|
||||
virtual void resetDrawCommands();
|
||||
|
||||
private:
|
||||
enum ModeCheck_e {
|
||||
MODE_TRANSITION_TO_ZOOM = 2,
|
||||
MODE_TRANSITION_TO_STAGE = 3,
|
||||
MODE_STABLE_STAGE = 4,
|
||||
MODE_STABLE_ZOOM = 5,
|
||||
MODE_MAX = 6,
|
||||
};
|
||||
|
||||
void setupActorDrawCommands();
|
||||
void setupStageDrawCommands();
|
||||
void setupLinkDrawCommand();
|
||||
void setupLinkDrawCommand1(dAcPy_c *ac);
|
||||
void setupLinkDrawCommand2();
|
||||
void setupCloudBigDrawCommand();
|
||||
void setupTriforceDrawCommands();
|
||||
|
||||
void sortPanes();
|
||||
|
||||
void setupTboxDrawCommand(dAcBase_c *actor);
|
||||
void setupTboxDrawCommandGoddessClosed(dAcTbox_c *box);
|
||||
void setupTboxDrawCommandOpen(dAcTbox_c *box);
|
||||
void setupTboxDrawCommandClosed(dAcTbox_c *box);
|
||||
void setupNpcKenseiDrawCommand(dAcBase_c *actor);
|
||||
void setupObjShutterDrawCommand(dAcBase_c *actor);
|
||||
void setupObjDoorDrawCommand(dAcBase_c *actor);
|
||||
void setupObjSaveDrawCommand(dAcBase_c *actor);
|
||||
void setupObjLightLineDrawCommand(dAcBase_c *actor);
|
||||
void setupNpcBNusiDrawCommand(dAcBase_c *actor);
|
||||
void setupObjTerryShopDrawCommand(dAcBase_c *actor);
|
||||
void setupObjRoAtTargetDrawCommand(dAcBase_c *actor);
|
||||
void setupObjD3DummyDrawCommand(dAcBase_c *actor);
|
||||
void setupObjSealedDoorDrawCommand(dAcBase_c *actor);
|
||||
void setupObjHarpHintDrawCommand(dAcBase_c *actor);
|
||||
void setupNpcBeeDrawCommand(dAcBase_c *actor);
|
||||
|
||||
void setupTgMapMarkDrawCommand(dAcBase_c *actor);
|
||||
void setupTgMapMarkDrawCommand1(dTgMapMark_c *actor);
|
||||
void setupTgMapMarkDrawCommand2(dTgMapMark_c *actor);
|
||||
void setupTgMapInstDrawCommand(dAcBase_c *actor);
|
||||
void setupTgForceGetFlagDrawCommand(dAcBase_c *actor);
|
||||
void setupTgInsectDrawCommand(dAcBase_c *actor);
|
||||
|
||||
void setLinkTunic(s32 type);
|
||||
void setGoddessStatue(u32 present);
|
||||
void setTerry(bool present);
|
||||
void setAreaLight(u32 color, nw4r::lyt::Pane *pane);
|
||||
void setCloud(u32 alpha, nw4r::lyt::Pane *pane);
|
||||
void setSaveObj(u32 color, nw4r::lyt::Pane *pane);
|
||||
|
||||
void drawWithAnimIn(u32 paneIdx, nw4r::lyt::Pane *pane, f32 frame);
|
||||
void drawWithAnimOut(u32 paneIdx, nw4r::lyt::Pane *pane, f32 frame);
|
||||
void drawFullyIn(u32 paneIdx, nw4r::lyt::Pane *pane);
|
||||
|
||||
void fn_80181C40();
|
||||
|
||||
void fn_80181880(nw4r::lyt::Pane *, nw4r::lyt::Pane *, mVec2_c &) const;
|
||||
|
||||
void checkMapMode();
|
||||
void loadFlags();
|
||||
void updateScale();
|
||||
|
||||
void recordAnimVisState();
|
||||
void transitionAnims();
|
||||
void checkBoundingPointing();
|
||||
bool isPointingAtBounding(nw4r::lyt::Pane *pane) const;
|
||||
|
||||
/* 0x000D */ u8 field_0x000D;
|
||||
/* 0x000E */ bool mShowIslandNames;
|
||||
/* 0x0010 */ nw4r::lyt::Bounding *mpBoundings[59];
|
||||
/* 0x00FC */ nw4r::lyt::Pane *mpSpecialPanes[27];
|
||||
/* 0x0168 */ nw4r::lyt::Pane *mpSpecialPictures[27];
|
||||
/* 0x01D4 */ nw4r::lyt::Pane *mpTerryOnOffPane;
|
||||
/* 0x01D8 */ d2d::ResAccIf_c *mpResAcc;
|
||||
/* 0x01DC */ d2d::LytBase_c mLyt;
|
||||
/* 0x026C */ d2d::AnmGroup_c mAnm[18];
|
||||
/* 0x06EC */ nw4r::lyt::Pane *mpPanes[42];
|
||||
/* 0x0794 */ dCursorHitCheckLyt_c mCsHitCheck;
|
||||
/* 0x07BC */ dLytMapIcon01DrawCommand mCommands[100];
|
||||
/* 0x0C6C */ s32 mModeCheckResult;
|
||||
/* 0x0C70 */ s32 field_0x0C70;
|
||||
/* 0x0C74 */ bool mFunFunIslandDiscovered;
|
||||
/* 0x0C75 */ bool mLumpyPumkpinDiscovered;
|
||||
/* 0x0C76 */ bool mBeedleIslandDiscovered;
|
||||
/* 0x0C77 */ bool mBambooIslandDiscovered;
|
||||
/* 0x0C78 */ bool mIsleOfSongsDiscovered;
|
||||
/* 0x0C79 */ bool mBugHavenDiscovered;
|
||||
/* 0x0C7A */ bool mBilocyteFightTriggered;
|
||||
/* 0x0C7B */ bool mFaronPillarOpened;
|
||||
/* 0x0C7C */ bool mFaronDiscovered;
|
||||
/* 0x0C7D */ bool mEldinPillarOpened;
|
||||
/* 0x0C7E */ bool mEldinDiscovered;
|
||||
/* 0x0C7F */ bool mLanayruPillarOpened;
|
||||
/* 0x0C80 */ bool mLanaryuDiscovered;
|
||||
/* 0x0C81 */ bool mThunderheadEntered;
|
||||
/* 0x0C82 */ bool mBeedleShopEntered;
|
||||
/* 0x0C83 */ u8 field_0x0C83;
|
||||
/* 0x0C84 */ u8 field_0x0C84;
|
||||
/* 0x0C85 */ u8 field_0x0C85[100];
|
||||
/* 0x0CE9 */ u8 mPassIdxes[35];
|
||||
/* 0x0D0C */ s32 mCurrentFloor;
|
||||
/* 0x0D10 */ s32 mLastFloor;
|
||||
/* 0x0D14 */ u8 mNumCommandsPerPass[35];
|
||||
/* 0x0D37 */ u8 mNumCommands;
|
||||
|
||||
/* 0x0D38 */ u8 _0x0D38[0x0D3A - 0x0D38];
|
||||
|
||||
/* 0x0D3A */ mAng field_0x0D3A;
|
||||
|
||||
/* 0x0D3C */ u8 _0x0D3C[0x0D40 - 0x0D3C];
|
||||
|
||||
/* 0x0D40 */ mVec2_c field_0x0D40;
|
||||
/* 0x0D48 */ u8 field_0x0D48;
|
||||
/* 0x0D49 */ u8 field_0x0D49;
|
||||
/* 0x0D4A */ u8 field_0x0D4A;
|
||||
/* 0x0D4B */ u8 field_0x0D4B[100]; // ???
|
||||
|
||||
/* 0x0DAF */ u8 _0x0DAF[0x0E13 - 0x0DAF];
|
||||
|
||||
/* 0x0E13 */ u8 field_0x0E13;
|
||||
/* 0x0E14 */ dLytMapPopupConfig mPopupConfigs[56];
|
||||
/* 0x1514 */ dLytMapIconAnimState mIconAnims[50];
|
||||
/* 0x1834 */ s32 mNumAnims;
|
||||
/* 0x1838 */ f32 field_0x1838;
|
||||
/* 0x183C */ f32 field_0x183C;
|
||||
/* 0x1840 */ f32 field_0x1840;
|
||||
/* 0x1844 */ bool field_0x1844;
|
||||
/* 0x1845 */ u8 field_0x1845;
|
||||
|
||||
/* 0x1848 */ UNKWORD field_0x1848;
|
||||
|
||||
/* 0x184C */ bool field_0x184C;
|
||||
/* 0x184D */ bool field_0x184D;
|
||||
};
|
||||
|
||||
class dLytMapIcon00_c : public m2d::Base_c {
|
||||
public:
|
||||
dLytMapIcon00_c()
|
||||
: mModeCheckResult(MODE_MAX),
|
||||
field_0x0E4C(0),
|
||||
field_0x0E59(0),
|
||||
field_0x0E5A(0),
|
||||
field_0x13A6(0),
|
||||
field_0x13A7(0),
|
||||
field_0x1CD0(0.0f, 0.0f, 0.0f),
|
||||
field_0x1CDC(0),
|
||||
field_0x1CDD(0),
|
||||
field_0x1CDE(0),
|
||||
field_0x1CE0(0),
|
||||
field_0x1CE4(0),
|
||||
field_0x1CE5(0),
|
||||
field_0x1CE6(0),
|
||||
field_0x1CE7(0) {}
|
||||
|
||||
virtual void draw() override;
|
||||
virtual bool build(d2d::ResAccIf_c *resAcc);
|
||||
virtual bool remove();
|
||||
virtual bool execute();
|
||||
virtual void resetDrawCommands();
|
||||
|
||||
private:
|
||||
enum ModeCheck_e {
|
||||
MODE_TRANSITION_TO_ZOOM = 2,
|
||||
MODE_TRANSITION_TO_STAGE = 3,
|
||||
MODE_STABLE_STAGE = 4,
|
||||
MODE_STABLE_ZOOM = 5,
|
||||
MODE_MAX = 6,
|
||||
};
|
||||
|
||||
void fn_80189750();
|
||||
|
||||
/* 0x0010 */ u8 _0x0010[0x0104 - 0x0010];
|
||||
|
||||
/* 0x0104 */ d2d::LytBase_c mLyt;
|
||||
/* 0x0194 */ d2d::AnmGroup_c mAnm[29];
|
||||
|
||||
/* 0x08D4 */ u8 _0x08D4[0x0970 - 0x08D4];
|
||||
|
||||
/* 0x0970 */ dCursorHitCheckLyt_c mCsHitCheck;
|
||||
/* 0x0998 */ dLytMapIcon00DrawCommand mCommands[100];
|
||||
/* 0x0E48 */ s32 mModeCheckResult;
|
||||
/* 0x0E4C */ UNKWORD field_0x0E4C;
|
||||
/* 0x0E50 */ u8 field_0x0E50;
|
||||
/* 0x0E51 */ u8 field_0x0E51;
|
||||
/* 0x0E52 */ u8 field_0x0E52;
|
||||
/* 0x0E53 */ u8 field_0x0E53;
|
||||
/* 0x0E54 */ u8 field_0x0E54;
|
||||
/* 0x0E55 */ u8 field_0x0E55;
|
||||
/* 0x0E56 */ u8 field_0x0E56;
|
||||
/* 0x0E57 */ u8 field_0x0E57;
|
||||
/* 0x0E58 */ u8 field_0x0E58;
|
||||
/* 0x0E59 */ u8 field_0x0E59;
|
||||
/* 0x0E59 */ u8 field_0x0E5A;
|
||||
/* 0x0E5B */ u8 field_0x0E5B[100];
|
||||
|
||||
/* 0x0EC0 */ u8 _0x0EC0[0x0EE4 - 0x0EC0];
|
||||
|
||||
/* 0x0EE4 */ s32 mNumCommands;
|
||||
/* 0x0EE8 */ s32 field_0x0EE8;
|
||||
/* 0x0EEC */ u8 field_0x0EEC[36];
|
||||
|
||||
/* 0x0F10 */ u8 _0x0F10[0x0F20 - 0x0F10];
|
||||
|
||||
/* 0x0F20 */ u8 field_0x0F20[100];
|
||||
|
||||
/* 0x0F84 */ mVec3_c field_0x0F84[77];
|
||||
|
||||
/* 0x1320 */ u8 _0x1320[0x1331 - 0x1320];
|
||||
|
||||
/* 0x1331 */ u8 mNumCommandsPerPass[17];
|
||||
/* 0x1342 */ u8 field_0x1342[100];
|
||||
/* 0x13A6 */ u8 field_0x13A6;
|
||||
/* 0x13A6 */ u8 field_0x13A7;
|
||||
/* 0x13A8 */ u8 field_0x13A8[100];
|
||||
/* 0x140C */ u8 field_0x140C;
|
||||
/* 0x1410 */ dLytMapPopupConfig mPopupConfigs[30];
|
||||
/* 0x17D0 */ dLytMapPlace_c mPlace;
|
||||
/* 0x19B8 */ dLytMapIconAnimState mIconAnims[50];
|
||||
/* 0x1CCC */ s32 mNumAnims;
|
||||
/* 0x1CD0 */ mVec3_c field_0x1CD0;
|
||||
/* 0x1CDC */ u8 field_0x1CDC;
|
||||
/* 0x1CDD */ u8 field_0x1CDD;
|
||||
/* 0x1CDE */ u8 field_0x1CDE;
|
||||
/* 0x1CE0 */ UNKWORD field_0x1CE0;
|
||||
/* 0x1CE4 */ u8 field_0x1CE4;
|
||||
/* 0x1CE5 */ u8 field_0x1CE5;
|
||||
/* 0x1CE6 */ u8 field_0x1CE6;
|
||||
/* 0x1CE7 */ u8 field_0x1CE7;
|
||||
};
|
||||
|
||||
class dLytMapMarkers_c : public m2d::Base_c {
|
||||
public:
|
||||
dLytMapMarkers_c()
|
||||
: mShowIslandNames(false), field_0x0702(0), field_0x0703(0), field_0x0704(0.0f), mNumPopups(0) {}
|
||||
virtual ~dLytMapMarkers_c() {}
|
||||
virtual void draw() override;
|
||||
virtual bool build(d2d::ResAccIf_c *resAcc);
|
||||
virtual bool remove();
|
||||
virtual bool execute();
|
||||
|
||||
void setIslandNamesOn(bool on);
|
||||
void drawPopups();
|
||||
|
||||
void setField_0x6F4(const mVec2_c &v) {
|
||||
field_0x06F4 = v;
|
||||
}
|
||||
|
||||
void setField_0x0702(u8 v) {
|
||||
field_0x0702 = v;
|
||||
}
|
||||
|
||||
void setField_0x0703(u8 v) {
|
||||
field_0x0703 = v;
|
||||
}
|
||||
|
||||
f32 getField_0x0704() const {
|
||||
return field_0x0704;
|
||||
}
|
||||
|
||||
void setLinkRot(const mAng3_c &rot) {
|
||||
mLinkRot = rot;
|
||||
}
|
||||
|
||||
private:
|
||||
void resetPopups();
|
||||
void loadPopups();
|
||||
|
||||
/* 0x0010 */ d2d::ResAccIf_c mResAcc00;
|
||||
/* 0x0380 */ d2d::ResAccIf_c mResAcc01;
|
||||
|
||||
/* 0x06F0 */ bool mShowIslandNames;
|
||||
/* 0x06F4 */ mVec2_c field_0x06F4;
|
||||
/* 0x06FC */ mAng3_c mLinkRot;
|
||||
/* 0x0702 */ u8 field_0x0702;
|
||||
/* 0x0702 */ u8 field_0x0703;
|
||||
/* 0x0704 */ f32 field_0x0704;
|
||||
/* 0x0708 */ dLytMapPopup_c mMapPopup;
|
||||
/* 0x0890 */ s32 mNumPopups;
|
||||
/* 0x0894 */ dLytMapPopupState mPopups[60];
|
||||
/* 0x0F24 */ const dLytMapPopupConfig *mpPopupConfigs;
|
||||
/* 0x0F28 */ dLytMapIcon01_c mIcon01;
|
||||
/* 0x2778 */ dLytMapIcon00_c mIcon00;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
|
||||
f32 GetLineWidth(f32 *pOutSpacing) const;
|
||||
f32 GetLinesHeight() const;
|
||||
f32 GetUnkWidthRatio() const;
|
||||
f32 getLineDrawWidth() const;
|
||||
|
||||
void setLytBase(d2d::LytBase_c *lytBase) {
|
||||
mpLytBase = lytBase;
|
||||
|
||||
@@ -60,6 +60,8 @@ enum MeterFlag_e {
|
||||
METER_BTN_Z = 0x800,
|
||||
METER_BTN_0x1000 = 0x1000,
|
||||
|
||||
METER_BTN_0x4000 = 0x4000,
|
||||
|
||||
METER_BTN_CROSS = METER_BTN_CROSS_UP | METER_BTN_CROSS_DOWN | METER_BTN_CROSS_LEFT | METER_BTN_CROSS_RIGHT,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ public:
|
||||
return mEndFrame;
|
||||
}
|
||||
|
||||
// There's at least 1 file where the obvious way of writing
|
||||
// There are at least 2 files where the obvious way of writing
|
||||
// it seems to require accessing some members directly, without
|
||||
// inlines. I want to discourage direct access though, so
|
||||
// putting the ability behind an explicit define. We don't
|
||||
|
||||
@@ -17,6 +17,10 @@ struct mAng {
|
||||
return *this;
|
||||
}
|
||||
|
||||
void setF(const f32 &f) {
|
||||
mVal = f;
|
||||
}
|
||||
|
||||
static mAng atan2s(f32 a, f32 b) {
|
||||
return mAng(cM::atan2s(a, b));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#ifndef NW4R_LYT_TYPES_H
|
||||
#define NW4R_LYT_TYPES_H
|
||||
|
||||
#include "nw4r/math.h" // IWYU pragma: export
|
||||
#include "nw4r/ut/ut_LinkList.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
|
||||
#include "nw4r/math.h" // IWYU pragma: export
|
||||
|
||||
#include "rvl/GX.h" // IWYU pragma: export
|
||||
|
||||
namespace nw4r {
|
||||
@@ -31,8 +33,10 @@ inline bool TestBit(T bits, int index) {
|
||||
}
|
||||
template <typename T>
|
||||
inline void SetBit(T *bits, int pos, bool val) {
|
||||
T mask = ~T(1 << pos);
|
||||
*bits = T((*bits & mask)) | (val << pos);
|
||||
T mask = 1 << pos;
|
||||
|
||||
*bits &= ~mask;
|
||||
*bits |= val ? mask : 0;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef D_BEACON_H
|
||||
#define D_BEACON_H
|
||||
|
||||
#include "m/m_vec.h"
|
||||
|
||||
u32 getMaxBeaconCount();
|
||||
|
||||
/**
|
||||
* When passed a position, sets the beacon with the given index to the position.
|
||||
* When position is nullptr, removes the beacon.
|
||||
*/
|
||||
void setBeaconPosition(const mVec3_c *position, u32 beaconIndex);
|
||||
|
||||
/**
|
||||
* Sets a beacon position similar to `setBeaconPosition`, but corrects the ground level
|
||||
*/
|
||||
void setBeaconPositionChecked(const mVec3_c *position, u32 beaconIndex);
|
||||
|
||||
/** Checks whether the current stage is ineligible for beacon placement */
|
||||
bool doesStageForbidBeaconPlacement();
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef D_FLOW_MGR_H
|
||||
#define D_FLOW_MGR_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_message.h"
|
||||
#include "sized_string.h"
|
||||
|
||||
class dFlowMgrBase_c {
|
||||
public:
|
||||
dFlowMgrBase_c(dFlow_c *flow);
|
||||
virtual ~dFlowMgrBase_c() {}
|
||||
|
||||
void triggerEntryPoint(s32 labelPart1, s32 labelPart2, u8 p4, u8 p5);
|
||||
bool checkFinished();
|
||||
|
||||
private:
|
||||
/* 0x04 */ dFlow_c *mpFlow;
|
||||
/* 0x08 */ u8 _0x08[0x14 - 0x08];
|
||||
/* 0x14 */ SizedString<0x40> field_0x14;
|
||||
/* 0x54 */ u8 field_0x54;
|
||||
};
|
||||
|
||||
class dFlowMgr_c : public dFlowMgrBase_c {
|
||||
public:
|
||||
dFlowMgr_c();
|
||||
|
||||
private:
|
||||
/* 0x58 */ dFlow_c mFlow;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,6 +19,8 @@ public:
|
||||
static bool canSkipCurrentEvent();
|
||||
static dAcBase_c *getMainActorInEvent();
|
||||
|
||||
static void execute();
|
||||
|
||||
static EventManager *sInstance;
|
||||
|
||||
static bool isInEvent() {
|
||||
|
||||
@@ -32,15 +32,15 @@ inline bool EventManagerIsInMap() {
|
||||
}
|
||||
|
||||
inline bool EventManagerIsMapOpen() {
|
||||
return EventManagerIsInMap() && dLytMap_c::GetInstance()->isOpenMaybe();
|
||||
return EventManagerIsInMap() && dLytMap_c::GetInstance()->isOpen();
|
||||
}
|
||||
|
||||
inline bool EventManagerIsMapOpenAndMessage() {
|
||||
return EventManagerIsMapOpen() && !dMessage_c::getInstance()->getField_0x328();
|
||||
inline bool EventManagerIsMapOpenNormal() {
|
||||
return EventManagerIsMapOpen() && !dMessage_c::getInstance()->getInMapEvent();
|
||||
}
|
||||
|
||||
inline bool EventManagerIsMapOpenAnd0x9008Eq10() {
|
||||
return EventManagerIsMapOpen() && dLytMap_c::GetInstance()->isSomeMapFieldEq10();
|
||||
inline bool EventManagerIsMapEventSaveObj() {
|
||||
return EventManagerIsMapOpen() && dLytMap_c::GetInstance()->isMapEventSaveObj();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#ifndef MISC_ACTOR_H
|
||||
#define MISC_ACTOR_H
|
||||
|
||||
// TODO - this header might be unnecessary; a lot of functions in
|
||||
// the split corresponding to this header clearly are REL functions
|
||||
// that were moved to the DOL because they need to be called from the DOL.
|
||||
// So ideally all of these declarations were moved to REL class definitions...
|
||||
|
||||
bool checkIsInSkykeepPuzzle();
|
||||
void restoreSkykeepPuzzleFromGlobal();
|
||||
|
||||
|
||||
+2
-2
@@ -257,7 +257,7 @@ bool dCsGame_c::shouldDraw() const {
|
||||
bool dCsGame_c::isForcedHidden() const {
|
||||
return (
|
||||
EventManagerNotDrawControl0x80() && EventManagerNotSkyKeepPuzzle() && EventManagerNotInShop() &&
|
||||
EventManagerNotInDeposit() && !EventManagerIsMapOpenAndMessage() && !EventManagerIsMapOpenAnd0x9008Eq10()
|
||||
EventManagerNotInDeposit() && !EventManagerIsMapOpenNormal() && !EventManagerIsMapEventSaveObj()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ mVec2_c &dCursorInterfaceGame_c::getCursorPos() {
|
||||
f32 f3 = sHio.field_0x10 + 4.0f;
|
||||
f32 f4 = sHio.field_0x0C + -15.0f;
|
||||
|
||||
if (dLytMap_c::GetInstance() != nullptr && dLytMap_c::GetInstance()->isOpenMaybe()) {
|
||||
if (dLytMap_c::GetInstance() != nullptr && dLytMap_c::GetInstance()->isOpen()) {
|
||||
if (pos.x < -f0 + f4) {
|
||||
pos.x = -f0 + f4;
|
||||
}
|
||||
|
||||
+22
-20
@@ -417,35 +417,37 @@ bool dFlow_c::handleEventInternal(const MsbFlowInfo *element) {
|
||||
dStageMgr_c::GetInstance()->getFlagIndex();
|
||||
SceneflagManager::sInstance->unsetTempflag_i(0x3F, (params1n2 >> 16) & 0xFFFF);
|
||||
break;
|
||||
case EVENT_LIGHT_PILLAR_30: {
|
||||
case EVENT_START_MAP_EVENT: {
|
||||
s8 p4 = (params1n2 >> 24) & 0xFF;
|
||||
s8 p1 = params1n2 & 0xFF;
|
||||
s8 p3 = (params1n2 >> 16) & 0xFF;
|
||||
s8 p2 = (params1n2 >> 8) & 0xFF;
|
||||
s32 val = 1;
|
||||
s8 arg1 = (params1n2 >> 16) & 0xFF;
|
||||
s8 arg2 = (params1n2 >> 8) & 0xFF;
|
||||
s32 mapEvent = 1;
|
||||
switch (p1) {
|
||||
case 1: val = 4; break;
|
||||
case 2: val = 3; break;
|
||||
case 3: val = 5; break;
|
||||
case 5: val = 7; break;
|
||||
case 6: val = 8; break;
|
||||
case 7: val = 9; break;
|
||||
case 1: mapEvent = dLytMapMain_c::MAP_EVENT_DUNGEON_MAP_GET; break;
|
||||
case 2: mapEvent = dLytMapMain_c::MAP_EVENT_MAP_INTRO; break;
|
||||
case 3: mapEvent = dLytMapMain_c::MAP_EVENT_FIELD_MAP_CHANGE_5; break;
|
||||
case 5: mapEvent = dLytMapMain_c::MAP_EVENT_SIGNAL_ADD; break;
|
||||
case 6: mapEvent = dLytMapMain_c::MAP_EVENT_FIELD_MAP_CHANGE_8; break;
|
||||
case 7: mapEvent = dLytMapMain_c::MAP_EVENT_GODDESS_CUBE; break;
|
||||
}
|
||||
dMessage_c::getInstance()->setField_0x32C(val);
|
||||
dMessage_c::getInstance()->setField_0x32C(mapEvent);
|
||||
dMessage_c::getInstance()->setField_0x329(true);
|
||||
if (dMessage_c::getInstance()->getField_0x328() == 0) {
|
||||
dMessage_c::getInstance()->setField_0x328(1);
|
||||
if (dMessage_c::getInstance()->getInMapEvent() == false) {
|
||||
dMessage_c::getInstance()->setInMapEvent(true);
|
||||
dMessage_c::getInstance()->clearLightPillarRelatedArgs();
|
||||
if (dLytControlGame_c::getInstance()->isStateNormalOrNotInEvent()) {
|
||||
dLytControlGame_c::getInstance()->somehowRelatedToEnteringLightPillars(val, p3, p2);
|
||||
dLytControlGame_c::getInstance()->somehowRelatedToEnteringLightPillars(
|
||||
mapEvent, arg1, arg2
|
||||
);
|
||||
}
|
||||
} else {
|
||||
dLytMap_c::GetInstance()->lightPillarRelated(val, p3, p2);
|
||||
dLytMap_c::GetInstance()->queueMapEvent(mapEvent, arg1, arg2);
|
||||
}
|
||||
dMessage_c::getInstance()->storeLightPillarRelatedArg(p4);
|
||||
break;
|
||||
}
|
||||
case EVENT_LIGHT_PILLAR_34: {
|
||||
case EVENT_END_MAP_EVENT: {
|
||||
// TODO what do these modes do?
|
||||
if (params1n2 == 1) {
|
||||
if (!dLytControlGame_c::getInstance()->isNotInStateMap()) {
|
||||
@@ -463,7 +465,7 @@ bool dFlow_c::handleEventInternal(const MsbFlowInfo *element) {
|
||||
dMessage_c::getInstance()->setField_0x32A(1);
|
||||
}
|
||||
}
|
||||
dMessage_c::getInstance()->setField_0x328(0);
|
||||
dMessage_c::getInstance()->setInMapEvent(false);
|
||||
break;
|
||||
}
|
||||
case EVENT_SET_STORYFLAG_217:
|
||||
@@ -710,7 +712,7 @@ bool dFlow_c::handleMessage() {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(STORYFLAG_BOSS_RUSH_ACTIVE)) {
|
||||
// "When you require my analysis..."
|
||||
v = 200;
|
||||
} else if (dStageMgr_c::GetInstance()->getSTIFbyte4() == 0) {
|
||||
} else if (dStageMgr_c::GetInstance()->getSTIFArea() == dStageMgr_c::STIF_AREA_SKY) {
|
||||
// Sky rumor
|
||||
v = cM::rndInt(30);
|
||||
} else {
|
||||
@@ -1127,7 +1129,7 @@ bool dFlow_c::advanceUntil(s32 searchType, s32 searchParam3, s32 *pOutParams1n2)
|
||||
case EVENT_LOAD_FI_FLOW:
|
||||
case EVENT_COUNTER_THRESHOLD:
|
||||
case 27: keepGoing = handleEvent(); continue;
|
||||
case EVENT_LIGHT_PILLAR_34:
|
||||
case EVENT_END_MAP_EVENT:
|
||||
if (element->params1n2 == 2) {
|
||||
keepGoing = false;
|
||||
continue;
|
||||
@@ -1762,7 +1764,7 @@ void dMessage_c::executeMinigame() {
|
||||
void dMessage_c::init() {
|
||||
clearLightPillarRelatedArgs();
|
||||
// Probably inlines
|
||||
field_0x328 = 0;
|
||||
mInMapEvent = false;
|
||||
field_0x329 = 0;
|
||||
field_0x32A = 0;
|
||||
sInstance->setField_0x32C(12);
|
||||
|
||||
+1
-1
@@ -498,7 +498,7 @@ void ex_c::fn_80056790(s32 chan) {
|
||||
|
||||
f32 f;
|
||||
if (dScGame_c::GetInstance() != nullptr && dLytMap_c::GetInstance() != nullptr &&
|
||||
!dLytMap_c::GetInstance()->isNotInvisible()) {
|
||||
!dLytMap_c::GetInstance()->isVisible()) {
|
||||
f = dScGame_c::GetInstance()->targetingScreenFn_801BBEC0();
|
||||
} else {
|
||||
f = 1.0f;
|
||||
|
||||
+4
-4
@@ -70,7 +70,7 @@ int dStage_c::create() {
|
||||
pcam++;
|
||||
}
|
||||
|
||||
if (mapRelated.field_0x1EB == 0) {
|
||||
if (mMapRelated.field_0x1EB == 0) {
|
||||
mVec3_c min, max;
|
||||
for (s32 i = 0; i < MAX_ROOM_NUMBER - 1; i++) {
|
||||
dRoom_c *room = getRoom(i);
|
||||
@@ -89,11 +89,11 @@ int dStage_c::create() {
|
||||
max.y += 6000.0f;
|
||||
mVec3_c size = max - min;
|
||||
mVec3_c center = mVec3_c(min.x + size.x * 0.5f, min.y, min.z + size.z * 0.5f);
|
||||
mapRelated.fn_801B4B80(0, center, size);
|
||||
mMapRelated.fn_801B4B80(0, center, size);
|
||||
mVec3_c v = mVec3_c(10000.0f, 10000.0f, 100000.0f);
|
||||
mapRelated.fn_801B4C70(v);
|
||||
mMapRelated.fn_801B4C70(v);
|
||||
}
|
||||
mapRelated.fn_801B50C0(0);
|
||||
mMapRelated.fn_801B50C0(0);
|
||||
fn_80028A80();
|
||||
|
||||
return SUCCEEDED;
|
||||
|
||||
@@ -135,15 +135,15 @@ void dLytAreaCaptionParts_c::executeState_Wait() {
|
||||
if (field_0x54C) {
|
||||
field_0x54C = false;
|
||||
s32 typeFrame = 0;
|
||||
if (dStageMgr_c::GetInstance()->isSTIFbyte4_2or3or4()) {
|
||||
if (dStageMgr_c::GetInstance()->isSTIFAreaFaron()) {
|
||||
typeFrame = 1;
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFbyte4_5or6()) {
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFAreaEldin()) {
|
||||
typeFrame = 2;
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFbyte4_7or8or9or10or11()) {
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFAreaLanayru()) {
|
||||
typeFrame = 3;
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFbyte4_1()) {
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFAreaSealedGrounds()) {
|
||||
typeFrame = 4;
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFbyte4_0()) {
|
||||
} else if (dStageMgr_c::GetInstance()->isSTIFAreaSky()) {
|
||||
typeFrame = 5;
|
||||
}
|
||||
|
||||
|
||||
+5300
-135
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
#include "d/lyt/d_lyt_map_capture.h"
|
||||
#include "common.h"
|
||||
#include "d/d_stage.h"
|
||||
|
||||
STATE_DEFINE(dLytMapCapture_c, RenderingWait);
|
||||
STATE_DEFINE(dLytMapCapture_c, RenderingWaitStep2);
|
||||
|
||||
void dLytMapCapture_c::initializeState_RenderingWait() {}
|
||||
void dLytMapCapture_c::executeState_RenderingWait() {
|
||||
if (mRenderRequest && !mIsBusyRendering) {
|
||||
fn_8012D6F0();
|
||||
mRenderRequest = false;
|
||||
mIsBusyRendering = true;
|
||||
mStateMgr.changeState(StateID_RenderingWaitStep2);
|
||||
}
|
||||
}
|
||||
void dLytMapCapture_c::finalizeState_RenderingWait() {}
|
||||
|
||||
void dLytMapCapture_c::initializeState_RenderingWaitStep2() {}
|
||||
void dLytMapCapture_c::executeState_RenderingWaitStep2() {
|
||||
if (mIsBusyRendering && dStage_c::GetInstance() != nullptr && !dStage_c::GetInstance()->getMapRelated()->getField_0x1EE()) {
|
||||
mIsBusyRendering = false;
|
||||
if (mRenderRequest) {
|
||||
fn_8012D6F0();
|
||||
mRenderRequest = false;
|
||||
mIsBusyRendering = true;
|
||||
} else {
|
||||
mStateMgr.changeState(StateID_RenderingWait);
|
||||
}
|
||||
}
|
||||
}
|
||||
void dLytMapCapture_c::finalizeState_RenderingWaitStep2() {}
|
||||
@@ -0,0 +1,87 @@
|
||||
#include "d/lyt/d_lyt_map_global.h"
|
||||
|
||||
#include "m/m_vec.h"
|
||||
|
||||
dLytMapGlobal_c *dLytMapGlobal_c::sInstance;
|
||||
|
||||
dLytMapGlobal_c::dLytMapGlobal_c()
|
||||
: mMapScroll(0.0f, 0.0f, 0.0f),
|
||||
field_0x0C(0.0f, 0.0f),
|
||||
mMapRotationCenter(0.0f, 0.0f, 0.0f),
|
||||
field_0x20(0.0f, 0.0f),
|
||||
field_0x28(0.0f, 0.0f),
|
||||
mMapRotation(0),
|
||||
field_0x40(1.0f),
|
||||
field_0x44(1.0f),
|
||||
mFloor(0),
|
||||
field_0x4C(0),
|
||||
field_0x4D(0),
|
||||
mAlpha(0),
|
||||
field_0x4F(0),
|
||||
mMapEvent(0) {
|
||||
sInstance = this;
|
||||
}
|
||||
|
||||
void dLytMapGlobal_c::projectOntoMap(
|
||||
mVec2_c &result, const mVec3_c &position, const mVec3_c &mapScroll, const mVec3_c &mapRotationCenter, const mAng &rot,
|
||||
f32 f1, f32 f2
|
||||
) const {
|
||||
// Initializing like this fixes regswaps, even if it's not needed...
|
||||
mVec3_c work(0.0f, 0.0f, 0.0f);
|
||||
|
||||
work.x = position.x - mapRotationCenter.x;
|
||||
work.z = position.z - mapRotationCenter.z;
|
||||
work.y = 0.0f;
|
||||
work.rotY(-rot);
|
||||
|
||||
work.x += mapRotationCenter.x - mapScroll.x;
|
||||
work.z += mapRotationCenter.z - mapScroll.z;
|
||||
|
||||
work.x *= f2 * f1;
|
||||
work.z *= f2 * f1;
|
||||
work.x *= field_0x28.x;
|
||||
|
||||
result.x = work.x;
|
||||
result.y = -work.z;
|
||||
}
|
||||
|
||||
void dLytMapGlobal_c::projectOntoMap(mVec2_c &result, const mVec3_c &position) const {
|
||||
projectOntoMap(result, position, mMapScroll, mMapRotationCenter, mMapRotation, field_0x44, field_0x40);
|
||||
}
|
||||
|
||||
void dLytMapGlobal_c::unprojectFromMap(mVec3_c &result, const mVec2_c &position) const {
|
||||
unprojectFromMap(
|
||||
result, position, field_0x20, mMapScroll, mMapRotationCenter, mMapRotation, field_0x44, field_0x40
|
||||
);
|
||||
}
|
||||
|
||||
void dLytMapGlobal_c::unprojectFromMap(mVec3_c &result, const mVec2_c &position, const mAng &rot) const {
|
||||
unprojectFromMap(result, position, field_0x20, mMapScroll, mMapRotationCenter, rot, field_0x44, field_0x40);
|
||||
}
|
||||
|
||||
void dLytMapGlobal_c::unprojectFromMap(mVec3_c &result, const mVec2_c &position, const mVec3_c &v2, const mAng &rot)
|
||||
const {
|
||||
unprojectFromMap(result, position, field_0x20, v2, mMapRotationCenter, rot, field_0x44, field_0x40);
|
||||
}
|
||||
|
||||
void dLytMapGlobal_c::unprojectFromMap(
|
||||
mVec3_c &result, const mVec2_c &position, const mVec2_c &v1, const mVec3_c &mapScroll, const mVec3_c &mapRotationCenter,
|
||||
const mAng &rot, f32 f1, f32 f2
|
||||
) const {
|
||||
mVec3_c work(0.0f, 0.0f, 0.0f);
|
||||
|
||||
f1 *= f2;
|
||||
f32 tmp = 1.0f / f1;
|
||||
mVec2_c diff = position - v1;
|
||||
|
||||
work.x = diff.x * tmp * (1.0f / field_0x28.x);
|
||||
work.z = -diff.y * tmp;
|
||||
|
||||
work = work + mapScroll;
|
||||
|
||||
work = work - mapRotationCenter;
|
||||
work.rotY(rot);
|
||||
work += mapRotationCenter;
|
||||
|
||||
result = work;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -439,7 +439,7 @@ f32 dTextBox_c::GetLinesHeight() const {
|
||||
return totalHeight;
|
||||
}
|
||||
|
||||
f32 dTextBox_c::GetUnkWidthRatio() const {
|
||||
f32 dTextBox_c::getLineDrawWidth() const {
|
||||
return GetLineWidth(nullptr) / dGfx_c::get16x9to4x3WidthScaleF();
|
||||
}
|
||||
|
||||
|
||||
@@ -996,7 +996,7 @@ bool dLytMeterMain_c::remove() {
|
||||
void dLytMeterMain_c::fn_800D5290() {
|
||||
dLytMeter_c *meter = dLytMeter_c::GetInstance();
|
||||
|
||||
if (dLytMap_c::GetInstance() != nullptr && !dLytMap_c::GetInstance()->isSomeMapFieldEq2Or4Or5Or6()) {
|
||||
if (dLytMap_c::GetInstance() != nullptr && !dLytMap_c::GetInstance()->isMapEventEq2Or4Or5Or6()) {
|
||||
meter->setFlags(METER_BTN_PLUS);
|
||||
}
|
||||
|
||||
@@ -1008,7 +1008,7 @@ void dLytMeterMain_c::fn_800D5290() {
|
||||
}
|
||||
|
||||
bool dLytMeterMain_c::fn_800D5350() {
|
||||
if (mBasicPosition == POSITION_MAP && dMessage_c::getInstance()->getField_0x328()) {
|
||||
if (mBasicPosition == POSITION_MAP && dMessage_c::getInstance()->getInMapEvent()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1093,7 +1093,7 @@ bool dLytMeterMain_c::fn_800D56B0() {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (dLytMap_c::GetInstance() != nullptr && !dLytMap_c::GetInstance()->getFn_80139EA0()) {
|
||||
if (dLytMap_c::GetInstance() != nullptr && !dLytMap_c::GetInstance()->isVisibleNoIntro()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -551,7 +551,7 @@ void dLytMsgWindow_c::finalizeState_WaitKeySelectQuestion() {}
|
||||
|
||||
void dLytMsgWindow_c::initializeState_MapOpen() {}
|
||||
void dLytMsgWindow_c::executeState_MapOpen() {
|
||||
if ((dLytMap_c::GetInstance() != nullptr && dLytMap_c::GetInstance()->isOpenMaybe()) ||
|
||||
if ((dLytMap_c::GetInstance() != nullptr && dLytMap_c::GetInstance()->isOpen()) ||
|
||||
!dLytControlGame_c::getInstance()->isInSomeMapState()) {
|
||||
dMessage_c::getInstance()->setField_0x329(0);
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
|
||||
@@ -176,18 +176,9 @@ bool dLytMsgWindowGet_c::execute() {
|
||||
}
|
||||
|
||||
void dLytMsgWindowGet_c::draw() {
|
||||
// NONMATCHING
|
||||
// The instruction patterns here are the same that EGG::StateGX::Scoped
|
||||
// generates, but there's no RAII to be found here. What's the missing
|
||||
// link that makes the compiler generate these?
|
||||
// When you fix this, fix other instances of this problem
|
||||
// by searching for 91657b77
|
||||
bool bVis[5] = {
|
||||
mpPanes[0]->IsVisible(),
|
||||
mpPanes[1]->IsVisible(),
|
||||
mpPanes[2]->IsVisible(),
|
||||
mpPanes[3]->IsVisible(),
|
||||
mpPanes[4]->IsVisible(),
|
||||
bool bVis[5];
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
bVis[i] = mpPanes[i]->IsVisible();
|
||||
};
|
||||
|
||||
mpPanes[0]->SetVisible(bVis[0]);
|
||||
@@ -207,11 +198,9 @@ void dLytMsgWindowGet_c::draw() {
|
||||
|
||||
mLyt.draw();
|
||||
|
||||
mpPanes[0]->SetVisible(bVis[0]);
|
||||
mpPanes[1]->SetVisible(bVis[1]);
|
||||
mpPanes[2]->SetVisible(bVis[2]);
|
||||
mpPanes[3]->SetVisible(bVis[3]);
|
||||
mpPanes[4]->SetVisible(bVis[4]);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
mpPanes[i]->SetVisible(bVis[i]);
|
||||
};
|
||||
}
|
||||
|
||||
void dLytMsgWindowGet_c::open(dAcObjBase_c *obj, u32 param) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "d/lyt/msg_window/d_lyt_msg_window_link.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_tag_processor.h"
|
||||
#include "d/d_lyt_hio.h"
|
||||
#include "d/d_tag_processor.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_textbox.h"
|
||||
#include "d/lyt/msg_window/d_lyt_msg_window_common.h"
|
||||
@@ -17,10 +17,10 @@ STATE_DEFINE(dLytMsgWindowLink_c, Visible);
|
||||
STATE_DEFINE(dLytMsgWindowLink_c, Out);
|
||||
|
||||
static const d2d::LytBrlanMapping brlanMap[] = {
|
||||
{ "linkWindow_00_in.brlan", "G_inOut_00"},
|
||||
{ "linkWindow_00_out.brlan", "G_inOut_00"},
|
||||
{"linkWindow_00_position.brlan", "G_position_00"},
|
||||
{"linkWindow_00_loop.brlan", "G_loop_00"},
|
||||
{ "linkWindow_00_in.brlan", "G_inOut_00"},
|
||||
{ "linkWindow_00_out.brlan", "G_inOut_00"},
|
||||
{"linkWindow_00_position.brlan", "G_position_00"},
|
||||
{ "linkWindow_00_loop.brlan", "G_loop_00"},
|
||||
};
|
||||
|
||||
#define LINK_ANIM_IN 0
|
||||
@@ -98,7 +98,7 @@ bool dLytMsgWindowLink_c::build(d2d::ResAccIf_c *resAcc1, d2d::ResAccIf_c *resAc
|
||||
mParam = 0;
|
||||
|
||||
mOffset.x = mOffset.y = 0.0f;
|
||||
|
||||
|
||||
mWaitDelay = 0;
|
||||
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
@@ -239,16 +239,9 @@ bool dLytMsgWindowLink_c::execute() {
|
||||
}
|
||||
|
||||
void dLytMsgWindowLink_c::draw() {
|
||||
// NONMATCHING
|
||||
// The instruction patterns here are the same that EGG::StateGX::Scoped
|
||||
// generates, but there's no RAII to be found here. What's the missing
|
||||
// link that makes the compiler generate these?
|
||||
// When you fix this, fix other instances of this problem
|
||||
// by searching for 91657b77
|
||||
bool bVis[3] = {
|
||||
mpPanes[0]->IsVisible(),
|
||||
mpPanes[1]->IsVisible(),
|
||||
mpPanes[2]->IsVisible(),
|
||||
bool bVis[3];
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
bVis[i] = mpPanes[i]->IsVisible();
|
||||
};
|
||||
|
||||
mpPanes[0]->SetVisible(bVis[0]);
|
||||
@@ -266,9 +259,9 @@ void dLytMsgWindowLink_c::draw() {
|
||||
|
||||
mLyt.draw();
|
||||
|
||||
mpPanes[0]->SetVisible(bVis[0]);
|
||||
mpPanes[1]->SetVisible(bVis[1]);
|
||||
mpPanes[2]->SetVisible(bVis[2]);
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
mpPanes[i]->SetVisible(bVis[i]);
|
||||
};
|
||||
}
|
||||
|
||||
void dLytMsgWindowLink_c::open(dAcObjBase_c *obj, u32 param) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "d/lyt/msg_window/d_lyt_msg_window_talk.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_tag_processor.h"
|
||||
#include "d/d_lyt_hio.h"
|
||||
#include "d/d_tag_processor.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_textbox.h"
|
||||
#include "d/lyt/msg_window/d_lyt_msg_window_common.h"
|
||||
@@ -239,16 +239,9 @@ bool dLytMsgWindowTalk_c::execute() {
|
||||
}
|
||||
|
||||
void dLytMsgWindowTalk_c::draw() {
|
||||
// NONMATCHING
|
||||
// The instruction patterns here are the same that EGG::StateGX::Scoped
|
||||
// generates, but there's no RAII to be found here. What's the missing
|
||||
// link that makes the compiler generate these?
|
||||
// When you fix this, fix other instances of this problem
|
||||
// by searching for 91657b77
|
||||
bool bVis[3] = {
|
||||
mpPanes[0]->IsVisible(),
|
||||
mpPanes[1]->IsVisible(),
|
||||
mpPanes[2]->IsVisible(),
|
||||
bool bVis[3];
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
bVis[i] = mpPanes[i]->IsVisible();
|
||||
};
|
||||
|
||||
mpPanes[0]->SetVisible(bVis[0]);
|
||||
@@ -264,9 +257,9 @@ void dLytMsgWindowTalk_c::draw() {
|
||||
|
||||
mLyt.draw();
|
||||
|
||||
mpPanes[0]->SetVisible(bVis[0]);
|
||||
mpPanes[1]->SetVisible(bVis[1]);
|
||||
mpPanes[2]->SetVisible(bVis[2]);
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
mpPanes[i]->SetVisible(bVis[i]);
|
||||
};
|
||||
}
|
||||
|
||||
void dLytMsgWindowTalk_c::open(dAcObjBase_c *obj, u32 param) {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#include "toBeSorted/d_flow_mgr.h"
|
||||
|
||||
dFlowMgrBase_c::dFlowMgrBase_c(dFlow_c *flow): mpFlow(flow) {}
|
||||
|
||||
dFlowMgr_c::dFlowMgr_c() : dFlowMgrBase_c(&mFlow) {}
|
||||
@@ -404,7 +404,8 @@ void FiContext::prepareFiCallOptions() {
|
||||
}
|
||||
|
||||
mFiButtonOptions[0] = KEN8_Advice;
|
||||
if (dStageMgr_c::GetInstance()->getSTIFbyte4() == 0 && !isInAnySkyKeepRoom() && !isInLeviasFightMaybe()) {
|
||||
if (dStageMgr_c::GetInstance()->getSTIFArea() == dStageMgr_c::STIF_AREA_SKY && !isInAnySkyKeepRoom() &&
|
||||
!isInLeviasFightMaybe()) {
|
||||
// In the Sky, show play time
|
||||
mFiButtonOptions[1] = KEN8_PlayTime;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user