mirror of
https://github.com/zeldaret/ss
synced 2026-06-07 20:01:37 -04:00
Map more
This commit is contained in:
+12
-12
@@ -7818,19 +7818,19 @@ fn_801378E0 = .text:0x801378E0; // type:function size:0x838
|
||||
getStateID__94sStateMgr_c<25dLytMapPinIconAggregate_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80138120; // type:function size:0x10
|
||||
draw__13dLytMapMain_cFv = .text:0x80138130; // type:function size:0x238
|
||||
fn_80138370 = .text:0x80138370; // type:function size:0x138
|
||||
canChangeUpDirection__13dLytMapMain_cCFlUc = .text:0x801384B0; // type:function size:0x5C
|
||||
canChangeUpDirection__13dLytMapMain_cCFlb = .text:0x801384B0; // type:function size:0x5C
|
||||
canZoomIn__13dLytMapMain_cCFl = .text:0x80138510; // type:function size:0x140
|
||||
canZoomOut__13dLytMapMain_cCFl = .text:0x80138650; // type:function size:0x1E0
|
||||
fn_80138830 = .text:0x80138830; // type:function size:0x254
|
||||
canCenterCursor__13dLytMapMain_cCFl = .text:0x80138830; // type:function size:0x254
|
||||
needsNav__13dLytMapMain_cCFl = .text:0x80138A90; // type:function size:0x8C
|
||||
fn_80138B20 = .text:0x80138B20; // type:function size:0x110
|
||||
fn_80138C30 = .text:0x80138C30; // type:function size:0x38
|
||||
fn_80138C70 = .text:0x80138C70; // type:function size:0xA4
|
||||
fn_80138D20 = .text:0x80138D20; // type:function size:0x5C
|
||||
fn_80138D80 = .text:0x80138D80; // type:function size:0xB0
|
||||
fn_80138E30 = .text:0x80138E30; // type:function size:0xD4
|
||||
fn_80138F10 = .text:0x80138F10; // type:function size:0xA0
|
||||
canResetPosition__13dLytMapMain_cCFlUc = .text:0x80138FB0; // type:function size:0xA4
|
||||
isPointingAtMainMap__13dLytMapMain_cCFv = .text:0x80138E30; // type:function size:0xD4
|
||||
canPlaceBeacons__13dLytMapMain_cCFl = .text:0x80138F10; // type:function size:0xA0
|
||||
canResetPosition__13dLytMapMain_cCFlb = .text:0x80138FB0; // type:function size:0xA4
|
||||
fn_80139060 = .text:0x80139060; // type:function size:0x28
|
||||
isOpenMaybe__13dLytMapMain_cCFv = .text:0x80139090; // type:function size:0x478
|
||||
fn_80139510 = .text:0x80139510; // type:function size:0xA8
|
||||
@@ -7844,12 +7844,12 @@ fn_80139EA0__13dLytMapMain_cCFv = .text:0x80139EA0; // type:function size:0x58
|
||||
saveUnkMapData__13dLytMapMain_cFv = .text:0x80139F00; // type:function size:0x44
|
||||
initUnkMapData__13dLytMapMain_cFv = .text:0x80139F50; // type:function size:0xE8
|
||||
loadUnkMapData__13dLytMapMain_cFv = .text:0x8013A040; // type:function size:0x3C
|
||||
fn_8013A080 = .text:0x8013A080; // type:function size:0xE8
|
||||
fn_8013A170 = .text:0x8013A170; // type:function size:0xA84
|
||||
fn_8013AC00 = .text:0x8013AC00; // type:function size:0x4
|
||||
fn_8013AC10 = .text:0x8013AC10; // type:function size:0x138
|
||||
clearButtonMessages__13dLytMapMain_cFv = .text:0x8013A080; // type:function size:0xE8
|
||||
setButtonMessages__13dLytMapMain_cFlblb = .text:0x8013A170; // type:function size:0xA84
|
||||
canCenterCursor1__13dLytMapMain_cCFl = .text:0x8013AC00; // type:function size:0x4
|
||||
setCursorType__13dLytMapMain_cFv = .text:0x8013AC10; // type:function size:0x138
|
||||
fn_8013AD50 = .text:0x8013AD50; // type:function size:0x370
|
||||
fn_8013B0C0 = .text:0x8013B0C0; // type:function size:0x28C
|
||||
fn_8013B0C0__13dLytMapMain_cFv = .text:0x8013B0C0; // type:function size:0x28C
|
||||
fn_8013B350 = .text:0x8013B350; // type:function size:0x10
|
||||
initializeState_Invisible__13dLytMapMain_cFv = .text:0x8013B360; // type:function size:0x4
|
||||
executeState_Invisible__13dLytMapMain_cFv = .text:0x8013B370; // type:function size:0x4
|
||||
@@ -7991,7 +7991,7 @@ finalizeState_EventSaveObjConfirmMsgWindow__13dLytMapMain_cFv = .text:0x80142720
|
||||
initializeState_EventSaveObjDecide__13dLytMapMain_cFv = .text:0x80142730; // type:function size:0x4
|
||||
executeState_EventSaveObjDecide__13dLytMapMain_cFv = .text:0x80142740; // type:function size:0x4
|
||||
finalizeState_EventSaveObjDecide__13dLytMapMain_cFv = .text:0x80142750; // type:function size:0x4
|
||||
fn_80142760 = .text:0x80142760; // type:function size:0x190
|
||||
checkCursorPointedAtMap__13dLytMapMain_cFv = .text:0x80142760; // type:function size:0x190
|
||||
fn_801428F0 = .text:0x801428F0; // type:function size:0xB4
|
||||
fn_801429B0 = .text:0x801429B0; // type:function size:0x1D8
|
||||
fn_80142B90 = .text:0x80142B90; // type:function size:0xEC
|
||||
@@ -8005,7 +8005,7 @@ fn_801431E0 = .text:0x801431E0; // type:function size:0x11C
|
||||
fn_80143300__13dLytMapMain_cFv = .text:0x80143300; // type:function size:0x54
|
||||
fn_80143360 = .text:0x80143360; // type:function size:0x1D4
|
||||
checkScroll__13dLytMapMain_cFv = .text:0x80143540; // type:function size:0x374
|
||||
fn_801438C0 = .text:0x801438C0; // type:function size:0x6C
|
||||
build__9dLytMap_cFv = .text:0x801438C0; // type:function size:0x6C
|
||||
fn_80143930 = .text:0x80143930; // type:function size:0x60
|
||||
fn_80143990 = .text:0x80143990; // type:function size:0x4C
|
||||
fn_801439E0 = .text:0x801439E0; // type:function size:0x4C
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
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_80093360(void *);
|
||||
|
||||
class dCamera_c : public dBase_c {
|
||||
public:
|
||||
@@ -30,6 +31,10 @@ public:
|
||||
return fn_800918E0(field_0xDA0, a1, a2);
|
||||
}
|
||||
|
||||
void doFn_80093360() {
|
||||
fn_80093360(field_0xDA4);
|
||||
}
|
||||
|
||||
void setScreenShakeIntensity(f32 val) {
|
||||
mScreenShakeIntensity = val;
|
||||
}
|
||||
@@ -41,6 +46,8 @@ public:
|
||||
bool isUnderwater() const;
|
||||
f32 getUnderwaterDepth() const;
|
||||
|
||||
void fn_8019E430();
|
||||
|
||||
private:
|
||||
/* 0x068 */ u8 _0x068[0x6C - 0x068];
|
||||
/* 0x06C */ mVec3_c mPositionMaybe;
|
||||
@@ -49,7 +56,7 @@ private:
|
||||
/* 0xD98 */ void *field_0xD98;
|
||||
/* 0xD9C */ u8 _0xD9C[0xDA0 - 0xD9C];
|
||||
/* 0xDA0 */ void *field_0xDA0;
|
||||
/* 0xDA4 */ u8 _0xDA4[0xDA8 - 0xDA4];
|
||||
/* 0xDA4 */ void *field_0xDA4;
|
||||
/* 0xDA8 */ UNKWORD field_0xDA8;
|
||||
/* 0xDAC */ u8 _0xDAC[0xDB0 - 0xDAC];
|
||||
/* 0xDB0 */ f32 mScreenShakeIntensity;
|
||||
|
||||
@@ -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 *);
|
||||
|
||||
+33
-20
@@ -7,9 +7,9 @@
|
||||
#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 "d/lyt/d_lyt_map_markers.h"
|
||||
#include "egg/core/eggColorFader.h"
|
||||
#include "m/m2d.h"
|
||||
#include "m/m_angle.h"
|
||||
@@ -34,13 +34,13 @@ struct dMapSaveObjDefinition {
|
||||
struct dMapSavedDataEntry {
|
||||
/* 0x00 */ s32 mapMode;
|
||||
/* 0x04 */ bool mapUpDirection;
|
||||
/* 0x05 */ u8 field_0x05;
|
||||
/* 0x05 */ bool mapUpDirectionAfterZoomToDetail;
|
||||
/* 0x06 */ u8 field_0x06;
|
||||
};
|
||||
|
||||
struct dMapSavedData {
|
||||
/* 0x00 */ dMapSavedDataEntry entries[6];
|
||||
/* 0x30 */ bool islandNamesOn;
|
||||
/* 0x30 */ bool showIslandNames;
|
||||
};
|
||||
|
||||
struct dMapFootPrintEntry {
|
||||
@@ -347,6 +347,7 @@ private:
|
||||
// Size 0x4C
|
||||
class dLytMapPopupInfo_c {
|
||||
friend class dLytMapMain_c;
|
||||
|
||||
public:
|
||||
dLytMapPopupInfo_c() : mStateMgr(*this, sStateID::null) {}
|
||||
|
||||
@@ -468,7 +469,6 @@ private:
|
||||
/* 0x18E */ bool mDecideFinished;
|
||||
};
|
||||
|
||||
|
||||
/** 2D UI - Map - beacon preview icon following the cursor */
|
||||
class dLytMapPutIcon_c {
|
||||
public:
|
||||
@@ -554,8 +554,12 @@ private:
|
||||
bool needsNav(s32 mapMode) const;
|
||||
bool canZoomOut(s32 mapMode) const;
|
||||
bool canZoomIn(s32 mapMode) const;
|
||||
bool canResetPosition(s32 mapMode, u8) const;
|
||||
bool canChangeUpDirection(s32 mapMode, u8) 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) const;
|
||||
bool isPointingAtMainMap() const;
|
||||
|
||||
f32 fn_80142D90(s32);
|
||||
void fn_80142F00(mVec3_c &, s32 mapMode, u8, const mVec3_c &, const mAng &);
|
||||
@@ -569,8 +573,12 @@ private:
|
||||
void fn_80138D80();
|
||||
bool shouldDrawFootprints() const;
|
||||
|
||||
void zoomOut();
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
|
||||
void clearButtonMessages();
|
||||
void setButtonMessages(s32 currentMapMode, bool currentUpDirection, s32 nextMapMode, bool nextUpDirection);
|
||||
void setCursorType();
|
||||
|
||||
void loadTextboxes();
|
||||
|
||||
@@ -578,6 +586,10 @@ private:
|
||||
void initUnkMapData();
|
||||
void loadUnkMapData();
|
||||
|
||||
void checkCursorPointedAtMap();
|
||||
|
||||
void fn_8013B0C0();
|
||||
|
||||
static dMapSavedData sSavedMapData;
|
||||
static const dMapSavedData sDefaultMapData;
|
||||
|
||||
@@ -605,14 +617,16 @@ private:
|
||||
/* 0x8208 */ dTextBox_c *mpNumberTextBox;
|
||||
/* 0x820C */ dTextBox_c *mpNumberTextBoxS;
|
||||
/* 0x8210 */ nw4r::lyt::Pane *mpNoroshiPane;
|
||||
/* 0x8214 */ nw4r::lyt::Pane *mpScaleFlamePane;
|
||||
/* 0x8214 */ nw4r::lyt::Pane *mpScaleFramePane;
|
||||
/* 0x8218 */ dWindow_c *mpWakuWindow;
|
||||
/* 0x821C */ nw4r::lyt::Bounding *field_0x821C[10];
|
||||
/* 0x8244 */ nw4r::lyt::Bounding *field_0x8244[6];
|
||||
/* 0x825C */ nw4r::lyt::Bounding *field_0x825C[12];
|
||||
/* 0x828C */ mVec3_c field_0x828C[12];
|
||||
/* 0x831C */ UNKWORD field_0x831C;
|
||||
/* 0x8320 */ UNKWORD field_0x8320;
|
||||
|
||||
/* 0x831C */ u8 _0x831C[0x8328 - 0x831C];
|
||||
/* 0x8324 */ u8 _0x8324[0x8328 - 0x8324];
|
||||
|
||||
/* 0x8328 */ d2d::AnmGroup_c *mpOutAnmGroup;
|
||||
|
||||
@@ -622,12 +636,11 @@ private:
|
||||
/* 0x832C */ dCursorHitCheckLyt_c mHitChecks[33];
|
||||
|
||||
/* 0x8854 */ nw4r::lyt::Pane *mpPanes[11];
|
||||
|
||||
/* 0x8880 */ u8 _0x8880[0x88B0 - 0x8880];
|
||||
|
||||
/* 0x8880 */ d2d::AnmGroup_c *field_0x8880[11]; // ???
|
||||
/* 0x88AC */ UNKWORD field_0x88AC;
|
||||
/* 0x88B0 */ nw4r::lyt::Pane *mpUnkPanes1[7];
|
||||
/* 0x88CC */ nw4r::lyt::Pane *mpUnkPanes2[7];
|
||||
|
||||
|
||||
/* 0x88E8 */ nw4r::lyt::Pane *mpPaneBgAll01;
|
||||
/* 0x88EC */ nw4r::lyt::Pane *mpPaneBgAll02;
|
||||
/* 0x88F0 */ nw4r::lyt::Pane *mpPaneAll01;
|
||||
@@ -647,7 +660,7 @@ private:
|
||||
/* 0x8C60 */ s32 mMaxBeaconCount;
|
||||
/* 0x8C64 */ s32 field_0x8C64;
|
||||
/* 0x8C68 */ s32 field_0x8C68;
|
||||
/* 0x8C6C */ UNKWORD field_0x8C6C;
|
||||
/* 0x8C6C */ s32 field_0x8C6C;
|
||||
/* 0x8C70 */ u32 field_0x8C70;
|
||||
|
||||
/* 0x8C74 */ u8 _0x8C74[0x8C88 - 0x8C74];
|
||||
@@ -656,7 +669,7 @@ private:
|
||||
/* 0x8C8C */ f32 field_0x8C8C;
|
||||
/* 0x8C90 */ bool mMapUpDirection;
|
||||
/* 0x8C91 */ bool mNextMapUpDirection;
|
||||
/* 0x8C92 */ u8 field_0x8C92;
|
||||
/* 0x8C92 */ bool mMapUpDirectionAfterZoomToDetail;
|
||||
/* 0x8C93 */ u8 field_0x8C93;
|
||||
/* 0x8C94 */ s32 field_0x8C94;
|
||||
/* 0x8C98 */ UNKWORD field_0x8C98;
|
||||
@@ -678,8 +691,8 @@ private:
|
||||
/* 0x8CB8 */ u8 _0x8CB8[0x8CBC - 0x8CB8];
|
||||
|
||||
/* 0x8CBC */ nw4r::lyt::Bounding *mpMapBounding;
|
||||
/* 0x8CC0 */ bool field_0x8CC0;
|
||||
/* 0x8CC1 */ bool field_0x8CC1;
|
||||
/* 0x8CC0 */ bool mPointerOnMap;
|
||||
/* 0x8CC1 */ bool mPointerCanPlaceBeacon;
|
||||
/* 0x8CC4 */ mVec3_c field_0x8CC4;
|
||||
/* 0x8CD0 */ mVec3_c field_0x8CD0;
|
||||
/* 0x8CDC */ mVec3_c field_0x8CDC;
|
||||
@@ -703,7 +716,7 @@ private:
|
||||
/* 0x8D60 */ s32 field_0x8D60;
|
||||
/* 0x8D64 */ UNKWORD field_0x8D64;
|
||||
/* 0x8D68 */ mAng field_0x8D68;
|
||||
/* 0x8D6A */ u8 field_0x8D6A;
|
||||
/* 0x8D6A */ u8 field_0x8D6A; // set at 0x8009e2d4
|
||||
/* 0x8D6B */ u8 field_0x8D6B;
|
||||
/* 0x8D6C */ UNKWORD field_0x8D6C;
|
||||
/* 0x8D70 */ UNKWORD field_0x8D70;
|
||||
@@ -718,9 +731,9 @@ private:
|
||||
/* 0x8DA0 */ d2d::SubPaneListNode mSubpane;
|
||||
/* 0x8DB0 */ UNKWORD field_0x8DB0;
|
||||
/* 0x8DB4 */ bool mNavEnabled;
|
||||
/* 0x8DB5 */ bool field_0x8DB5;
|
||||
/* 0x8DB5 */ bool mDrawScaleFrame;
|
||||
/* 0x8DB8 */ UNKWORD field_0x8DB8;
|
||||
/* 0x8DBC */ bool mIslandNamesOn;
|
||||
/* 0x8DBC */ bool mShowIslandNames;
|
||||
/* 0x8DBD */ bool field_0x8DBD;
|
||||
/* 0x8DBE */ u8 field_0x8DBE;
|
||||
/* 0x8DBF */ u8 field_0x8DBF;
|
||||
|
||||
@@ -14,9 +14,13 @@ public:
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
@@ -44,6 +48,10 @@ public:
|
||||
field_0x20 = v;
|
||||
}
|
||||
|
||||
const mVec2_c &getField_0x28() const {
|
||||
return field_0x28;
|
||||
}
|
||||
|
||||
void setField_0x28(const mVec2_c &v) {
|
||||
field_0x28 = v;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
+652
-31
@@ -19,6 +19,7 @@
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_lyt_control_game.h"
|
||||
#include "d/lyt/d_lyt_map_global.h"
|
||||
#include "d/lyt/d_lyt_unknowns.h"
|
||||
#include "d/lyt/d_textbox.h"
|
||||
#include "d/lyt/d_window.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
@@ -1903,7 +1904,7 @@ dLytMapMain_c::dLytMapMain_c()
|
||||
mFloorBtnMgr(&mGlobal),
|
||||
mFootPrints(&mGlobal),
|
||||
field_0x8C6C(0),
|
||||
field_0x8C92(1),
|
||||
mMapUpDirectionAfterZoomToDetail(true),
|
||||
field_0x8C93(0),
|
||||
field_0x8C94(0),
|
||||
field_0x8C98(0),
|
||||
@@ -1926,9 +1927,9 @@ dLytMapMain_c::dLytMapMain_c()
|
||||
field_0x8D70(0),
|
||||
field_0x8DB0(0),
|
||||
mNavEnabled(false),
|
||||
field_0x8DB5(false),
|
||||
mDrawScaleFrame(false),
|
||||
field_0x8DB8(0),
|
||||
mIslandNamesOn(false),
|
||||
mShowIslandNames(false),
|
||||
field_0x8DBD(0),
|
||||
field_0x8DBE(0),
|
||||
field_0x8DBF(0),
|
||||
@@ -2164,6 +2165,12 @@ static const char *sBoundingNames[] = {
|
||||
"B_saveIcon_25", "B_saveIcon_26", "B_saveIcon_27",
|
||||
};
|
||||
|
||||
#define MAP_MAIN_NUM_BOUNDINGS_NORMAL 5
|
||||
#define MAP_MAIN_OFFSET_BOUNDINGS_SAVEICON 5
|
||||
#define MAP_MAIN_NUM_BOUNDINGS_SAVEICON 28
|
||||
|
||||
#define MAP_MAIN_NUM_BOUNDINGS 33
|
||||
|
||||
static const char *sPaneNames[] = {
|
||||
"N_pName_00", "N_fName_00", "N_nFname_00", "N_sVname_00", "N_dName_02", "N_dName_00",
|
||||
"N_lName_00", "N_gName_02", "N_gName_01", "N_nVname_00", "N_gName_00",
|
||||
@@ -2227,6 +2234,7 @@ void dLytMapMain_c::build() {
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(sBoundingNames); i++) {
|
||||
nw4r::lyt::Bounding *b = mLyt.findBounding(sBoundingNames[i]);
|
||||
b->SetVisible(false);
|
||||
// TODO - bird statues
|
||||
if (i >= 5 && i < 15) {
|
||||
field_0x821C[i - 5] = b;
|
||||
} else if (i >= 15 && i < 21) {
|
||||
@@ -2262,7 +2270,7 @@ void dLytMapMain_c::build() {
|
||||
field_0x8D38.x *= mLyt.getDrawInfo().GetLocationAdjustScale().x;
|
||||
mpAllPane = mLyt.findPane("N_all_00");
|
||||
mpNoroshiPane = mLyt.findPane("N_noroshi_00");
|
||||
mpScaleFlamePane = mLyt.findPane("N_scaleFlame_00");
|
||||
mpScaleFramePane = mLyt.findPane("N_scaleFlame_00");
|
||||
mpWakuWindow = mLyt.getWindow("W_waku_01");
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(sPaneNames); i++) {
|
||||
@@ -2362,7 +2370,7 @@ void dLytMapMain_c::draw() {
|
||||
mpZoomInOutPane->SetVisible(true);
|
||||
}
|
||||
|
||||
mpScaleFlamePane->SetVisible(field_0x8DB5 ? true : false);
|
||||
mpScaleFramePane->SetVisible(mDrawScaleFrame ? true : false);
|
||||
mLyt.getLayout()->GetRootPane()->Draw(mLyt.getDrawInfo());
|
||||
if ((mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE || mNextMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) &&
|
||||
field_0x8C94 == 10) {
|
||||
@@ -2401,8 +2409,8 @@ void dLytMapMain_c::saveUnkMapData() {
|
||||
data.field_0x06 = 1;
|
||||
data.mapMode = mCurrentMapMode;
|
||||
data.mapUpDirection = mMapUpDirection;
|
||||
data.field_0x05 = field_0x8C92;
|
||||
sSavedMapData.islandNamesOn = mIslandNamesOn;
|
||||
data.mapUpDirectionAfterZoomToDetail = mMapUpDirectionAfterZoomToDetail;
|
||||
sSavedMapData.showIslandNames = mShowIslandNames;
|
||||
}
|
||||
|
||||
void dLytMapMain_c::initUnkMapData() {
|
||||
@@ -2410,16 +2418,277 @@ void dLytMapMain_c::initUnkMapData() {
|
||||
sSavedMapData.entries[i].field_0x06 = sDefaultMapData.entries[i].field_0x06;
|
||||
sSavedMapData.entries[i].mapMode = sDefaultMapData.entries[i].mapMode;
|
||||
sSavedMapData.entries[i].mapUpDirection = sDefaultMapData.entries[i].mapUpDirection;
|
||||
sSavedMapData.entries[i].field_0x05 = sDefaultMapData.entries[i].field_0x05;
|
||||
sSavedMapData.entries[i].mapUpDirectionAfterZoomToDetail =
|
||||
sDefaultMapData.entries[i].mapUpDirectionAfterZoomToDetail;
|
||||
}
|
||||
sSavedMapData.islandNamesOn = sDefaultMapData.islandNamesOn;
|
||||
sSavedMapData.showIslandNames = sDefaultMapData.showIslandNames;
|
||||
}
|
||||
|
||||
void dLytMapMain_c::loadUnkMapData() {
|
||||
mCurrentMapMode = sSavedMapData.entries[field_0x8C68].mapMode;
|
||||
mMapUpDirection = sSavedMapData.entries[field_0x8C68].mapUpDirection;
|
||||
field_0x8C92 = sSavedMapData.entries[field_0x8C68].field_0x05;
|
||||
mIslandNamesOn = sSavedMapData.islandNamesOn;
|
||||
mMapUpDirectionAfterZoomToDetail = sSavedMapData.entries[field_0x8C68].mapUpDirectionAfterZoomToDetail;
|
||||
mShowIslandNames = sSavedMapData.showIslandNames;
|
||||
}
|
||||
|
||||
void dLytMapMain_c::clearButtonMessages() {
|
||||
for (int i = 0; i <= METER_BTN_0x4000; i++) {
|
||||
dLytMeter_c::GetInstance()->clearFlags(i);
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapMain_c::setButtonMessages(
|
||||
s32 currentMapMode, bool currentUpDirection, s32 nextMapMode, bool nextUpDirection
|
||||
) {
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_NONE);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_C, LytDoButtonRelated::ACT_IE_NONE);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_NONE);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_BG, LytDoButtonRelated::ACT_IE_NONE);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_NONE);
|
||||
|
||||
if (canCenterCursor(currentMapMode) || canCenterCursor(nextMapMode)) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_CROSS_DOWN);
|
||||
LytDoButtonRelated::setCrossDown(LytDoButtonRelated::ACT_IE_ETC_CENTER, true);
|
||||
}
|
||||
|
||||
// TODO - some of these parts directly access members instead of using function args...
|
||||
|
||||
// TODO - canCenterCursor1 looks like an inline that somehow failed to get inlined (it's emitted right after this
|
||||
// function...)
|
||||
if (canCenterCursor1(mCurrentMapMode) && canCenterCursor1(mNextMapMode) && canPlaceBeacons(mCurrentMapMode) &&
|
||||
canPlaceBeacons(mNextMapMode)) {
|
||||
if (field_0x8DBD && *mPinIconAggregate.mStateMgr.getStateID() != dLytMapPinIconAggregate_c::StateID_Select) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_C);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_C, LytDoButtonRelated::ACT_IE_ETC_ADD_BEACON);
|
||||
} else if (*mPinIconAggregate.mStateMgr.getStateID() == dLytMapPinIconAggregate_c::StateID_Select) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_C);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_C, LytDoButtonRelated::ACT_IE_ETC_REMOVE_BEACON);
|
||||
} else if (!(*mStateMgr.getStateID() == StateID_In) && !(*mStateMgr.getStateID() == StateID_Out)) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_NUN_STK);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
if (canZoomOut(currentMapMode) && canZoomOut(nextMapMode)) {
|
||||
if ((field_0x8C68 == 0 && currentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) ||
|
||||
(field_0x8C68 == 2 && currentMapMode == dLytMapGlobal_c::MAPMODE_WORLD_SKY) ||
|
||||
(field_0x8C68 == 4 && currentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) ||
|
||||
(field_0x8C68 == 3 && currentMapMode == dLytMapGlobal_c::MAPMODE_WORLD_SKY) ||
|
||||
(field_0x8C68 == 5 && currentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) ||
|
||||
(field_0x8C68 == 1 && currentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE)) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_CROSS_LEFT);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_L, LytDoButtonRelated::ACT_IE_ETC_WORLD_MAP);
|
||||
} else {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_CROSS_LEFT);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_L, LytDoButtonRelated::ACT_IE_ETC_ZOOM_OUT);
|
||||
|
||||
if (currentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_NUN_STK);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_ETC_ZOOM_OUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (canZoomIn(currentMapMode) && canZoomIn(nextMapMode)) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_CROSS_RIGHT);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_R, LytDoButtonRelated::ACT_IE_ETC_ZOOM_IN);
|
||||
|
||||
if (currentMapMode == dLytMapGlobal_c::MAPMODE_STAGE && nextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_NUN_STK);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_ETC_ZOOM_IN);
|
||||
}
|
||||
}
|
||||
|
||||
// Directly accessing members instead of using function args...
|
||||
if (needsNav(mCurrentMapMode) && needsNav(mNextMapMode)) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_NUN_STK);
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x1000);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_ETC_SELECT_FLOOR);
|
||||
|
||||
if (mFloorBtnMgr.hasPointedAtABtnIdx() && mFloorBtnMgr.canDecideFloor()) {
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_ETC_DISPLAY);
|
||||
}
|
||||
}
|
||||
|
||||
if (canChangeUpDirection(currentMapMode, currentUpDirection) &&
|
||||
canChangeUpDirection(nextMapMode, nextUpDirection)) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_Z);
|
||||
|
||||
if (!currentUpDirection) {
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_ETC_ROTATE_MAP);
|
||||
} else {
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_ETC_ROTATE_MAP_2);
|
||||
}
|
||||
}
|
||||
|
||||
switch (field_0x8C68) {
|
||||
case 2: {
|
||||
if (currentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_CROSS_UP);
|
||||
LytDoButtonRelated::setCrossTop(LytDoButtonRelated::ACT_IE_ETC_CURRENT_LOCATION, true);
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_Z);
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x1000);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_ETC_SCROLL);
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x4000);
|
||||
} else if (currentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (canResetPosition(mCurrentMapMode, mMapUpDirection)) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x1000);
|
||||
LytDoButtonRelated::set(
|
||||
LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_ETC_SCROLL
|
||||
);
|
||||
} else {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x1000);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_NONE);
|
||||
}
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x4000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
case 4: {
|
||||
if (currentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_CROSS_UP);
|
||||
LytDoButtonRelated::setCrossTop(LytDoButtonRelated::ACT_IE_ETC_CURRENT_LOCATION, true);
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x1000);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_ETC_SCROLL);
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x4000);
|
||||
} else if (currentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (canResetPosition(mCurrentMapMode, mMapUpDirection)) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_CROSS_UP);
|
||||
LytDoButtonRelated::setCrossTop(LytDoButtonRelated::ACT_IE_ETC_CURRENT_LOCATION, true);
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x1000);
|
||||
LytDoButtonRelated::set(
|
||||
LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_ETC_SCROLL
|
||||
);
|
||||
} else {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x1000);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_NONE);
|
||||
}
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x4000);
|
||||
}
|
||||
|
||||
if (field_0x8C68 == 4 && mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE &&
|
||||
mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_Z);
|
||||
if (mShowIslandNames) {
|
||||
LytDoButtonRelated::set(
|
||||
LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_ETC_HIDE_ISLAND_NAME
|
||||
);
|
||||
} else {
|
||||
LytDoButtonRelated::set(
|
||||
LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_ETC_SHOW_ISLAND_NAME
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
if (currentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_CROSS_UP);
|
||||
LytDoButtonRelated::setCrossTop(LytDoButtonRelated::ACT_IE_ETC_CURRENT_LOCATION, true);
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x1000);
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_ETC_SCROLL);
|
||||
|
||||
if (needsNav(mCurrentMapMode) && needsNav(mNextMapMode) && mFloorBtnMgr.hasPointedAtABtnIdx()) {
|
||||
if (mFloorBtnMgr.canDecideFloor()) {
|
||||
LytDoButtonRelated::set(
|
||||
LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_ETC_DISPLAY
|
||||
);
|
||||
} else {
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
dLytMeter_c::GetInstance()->setFlags(METER_BTN_0x4000);
|
||||
|
||||
} else if (currentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (needsNav(mCurrentMapMode) && needsNav(mNextMapMode) && mFloorBtnMgr.hasPointedAtABtnIdx()) {
|
||||
if (mFloorBtnMgr.canDecideFloor()) {
|
||||
LytDoButtonRelated::set(
|
||||
LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_ETC_DISPLAY
|
||||
);
|
||||
} else {
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_NONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapMain_c::setCursorType() {
|
||||
if (canCenterCursor1(mCurrentMapMode) && canCenterCursor1(mNextMapMode)) {
|
||||
if ((field_0x8C94 == 10 || ((field_0x8C68 == 3 || field_0x8C68 == 1) && mPointerOnMap)) ||
|
||||
(mPointerCanPlaceBeacon && isPointingAtMainMap()) ||
|
||||
(*mPinIconAggregate.mStateMgr.getStateID() == dLytMapPinIconAggregate_c::StateID_Select) ||
|
||||
(needsNav(mCurrentMapMode) && needsNav(mNextMapMode) && mFloorBtnMgr.hasPointedAtABtnIdx())) {
|
||||
dCsGame_c::GetInstance()->pointerDefSet();
|
||||
} else {
|
||||
dCsGame_c::GetInstance()->pointerCatSet();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapMain_c::fn_8013B0C0() {
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
// TODO - FPR Regswaps
|
||||
f32 f1 = field_0x8D40 * global->getField_0x44();
|
||||
f32 f2 = f1 * global->getField_0x28().x;
|
||||
mAng rot = global->getField_0x56();
|
||||
|
||||
for (int i = 0; i <= MAP_MAIN_NUM_BOUNDINGS_NORMAL - 1; i++) {
|
||||
mVec3_c v1;
|
||||
mVec3_c v2;
|
||||
|
||||
f32 v1x = (f32)mHitChecks[i].getBoundingData()->mMinX;
|
||||
f32 v2x = (f32)mHitChecks[i].getBoundingData()->mMaxX;
|
||||
f32 v1z = (f32)mHitChecks[i].getBoundingData()->mMaxY;
|
||||
f32 v2z = (f32)mHitChecks[i].getBoundingData()->mMinY;
|
||||
|
||||
v1.x = v1x / f2;
|
||||
v1.y = 0.0f;
|
||||
v1.z = -v1z / f1;
|
||||
|
||||
v2.x = v2x / f2;
|
||||
v2.y = 0.0f;
|
||||
v2.z = -v2z / f1;
|
||||
|
||||
v1.rotY(rot);
|
||||
v2.rotY(rot);
|
||||
|
||||
// Looks like this is manually unprojecting the UI element
|
||||
// hitbox corners?
|
||||
s16 v = rot.mVal;
|
||||
if (v == 0) {
|
||||
// 0° rotation
|
||||
field_0x8948[i].field_0x00.x = field_0x8CC4.x + v1.x;
|
||||
field_0x8948[i].field_0x00.y = 0.0f;
|
||||
field_0x8948[i].field_0x00.z = field_0x8CC4.z + v1.z;
|
||||
|
||||
field_0x8948[i].field_0x0C.x = field_0x8CC4.x + v2.x;
|
||||
field_0x8948[i].field_0x0C.y = 0.0f;
|
||||
field_0x8948[i].field_0x0C.z = field_0x8CC4.z + v2.z;
|
||||
} else if (v == 0x4000) {
|
||||
// 90° rotation
|
||||
field_0x8948[i].field_0x00.x = field_0x8CC4.x + v1.x;
|
||||
field_0x8948[i].field_0x00.y = 0.0f;
|
||||
field_0x8948[i].field_0x00.z = field_0x8CC4.z + v2.z;
|
||||
|
||||
field_0x8948[i].field_0x0C.x = field_0x8CC4.x + v2.x;
|
||||
field_0x8948[i].field_0x0C.y = 0.0f;
|
||||
field_0x8948[i].field_0x0C.z = field_0x8CC4.z + v1.z;
|
||||
} else if (v == -0x8000) {
|
||||
// 180° rotation
|
||||
field_0x8948[i].field_0x00.x = field_0x8CC4.x + v2.x;
|
||||
field_0x8948[i].field_0x00.y = 0.0f;
|
||||
field_0x8948[i].field_0x00.z = field_0x8CC4.z + v2.z;
|
||||
|
||||
field_0x8948[i].field_0x0C.x = field_0x8CC4.x + v1.x;
|
||||
field_0x8948[i].field_0x0C.y = 0.0f;
|
||||
field_0x8948[i].field_0x0C.z = field_0x8CC4.z + v1.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapMain_c::initializeState_Invisible() {}
|
||||
@@ -2434,6 +2703,238 @@ void dLytMapMain_c::initializeState_In() {}
|
||||
void dLytMapMain_c::executeState_In() {}
|
||||
void dLytMapMain_c::finalizeState_In() {}
|
||||
|
||||
void dLytMapMain_c::zoomIn() {
|
||||
if (field_0x8C68 == 2 || (field_0x8C6C == 1 && (field_0x8C68 == 3 || field_0x8C68 == 1))) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_WORLD) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_AREA);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_WORLD_SKY;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_WORLD_SKY) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_COURSE);
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (dPad::getDownTrigRight() || dPad::getDownTrigA()) {
|
||||
mNextMapUpDirection = mMapUpDirectionAfterZoomToDetail;
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_ZOOM;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_DETAIL);
|
||||
|
||||
if (mPointerOnMap && (field_0x8D5C < 2 || !mFloorBtnMgr.hasPointedAtABtnIdx())) {
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_CsrRot);
|
||||
} else {
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_MapRot);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (field_0x8C68 == 4 || field_0x8C68 == 5) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_WORLD) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_COURSE);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_COURSE);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (dPad::getDownTrigRight() || dPad::getDownTrigA()) {
|
||||
mNextMapUpDirection = mMapUpDirectionAfterZoomToDetail;
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_ZOOM;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_DETAIL);
|
||||
|
||||
if (mPointerOnMap && (field_0x8D5C < 2 || !mFloorBtnMgr.hasPointedAtABtnIdx())) {
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_CsrRot);
|
||||
} else {
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_MapRot);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (field_0x8C68 == 0) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_WORLD) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_AREA);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_PROVINCE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_COURSE);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (dPad::getDownTrigRight() || dPad::getDownTrigA()) {
|
||||
mNextMapUpDirection = mMapUpDirectionAfterZoomToDetail;
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_ZOOM;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_DETAIL);
|
||||
|
||||
if (mPointerOnMap && (field_0x8D5C < 2 || !mFloorBtnMgr.hasPointedAtABtnIdx())) {
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_CsrRot);
|
||||
} else {
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_MapRot);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (field_0x8C68 == 1) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_WORLD) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_AREA);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_PROVINCE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_COURSE);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (dPad::getDownTrigRight() || (!mFloorBtnMgr.hasPointedAtABtnIdx() && dPad::getDownTrigA())) {
|
||||
mNextMapUpDirection = mMapUpDirectionAfterZoomToDetail;
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_ZOOM;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_DETAIL);
|
||||
|
||||
if (mPointerOnMap && (field_0x8D5C < 2 || !mFloorBtnMgr.hasPointedAtABtnIdx())) {
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_CsrRot);
|
||||
} else {
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_MapRot);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (field_0x8C68 == 3) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_WORLD) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_AREA);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_PROVINCE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) {
|
||||
if (dPad::getDownTrigRight()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_COURSE);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapMain_c::zoomOut() {
|
||||
if (field_0x8C68 == 2 || (field_0x8C6C == 1 && (field_0x8C68 == 3 || field_0x8C68 == 1))) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_WORLD_SKY) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_WORLD;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_WORLD);
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_AREA);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_WORLD_SKY;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
if (dPad::getDownTrigLeft() || dPad::getDownTrigA()) {
|
||||
mMapUpDirectionAfterZoomToDetail = mMapUpDirection;
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
mNextMapUpDirection = true;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_COURSE);
|
||||
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_MapRot);
|
||||
}
|
||||
}
|
||||
} else if (field_0x8C68 == 4 || field_0x8C68 == 5) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_WORLD);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_WORLD;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_WORLD;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_WORLD);
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
if (dPad::getDownTrigLeft() || dPad::getDownTrigA()) {
|
||||
mMapUpDirectionAfterZoomToDetail = mMapUpDirection;
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
mNextMapUpDirection = true;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_COURSE);
|
||||
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_MapRot);
|
||||
}
|
||||
}
|
||||
} else if (field_0x8C68 == 0) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_WORLD);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_WORLD;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_PROVINCE;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_AREA);
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
if (dPad::getDownTrigLeft() || dPad::getDownTrigA()) {
|
||||
mMapUpDirectionAfterZoomToDetail = mMapUpDirection;
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
mNextMapUpDirection = true;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_COURSE);
|
||||
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_MapRot);
|
||||
}
|
||||
}
|
||||
} else if (field_0x8C68 == 1) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_WORLD);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_WORLD;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_AREA);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_PROVINCE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
if (dPad::getDownTrigLeft() || (!mFloorBtnMgr.hasPointedAtABtnIdx() && dPad::getDownTrigA())) {
|
||||
mMapUpDirectionAfterZoomToDetail = mMapUpDirection;
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_STAGE;
|
||||
mNextMapUpDirection = true;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_COURSE);
|
||||
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_MapRot);
|
||||
}
|
||||
}
|
||||
} else if (field_0x8C68 == 3) {
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_WORLD);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_WORLD;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
} else if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
if (dPad::getDownTrigLeft()) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMOUT_TO_AREA);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_PROVINCE;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dLytMapMain_c::initializeState_Active() {}
|
||||
void dLytMapMain_c::executeState_Active() {
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
@@ -2444,13 +2945,13 @@ void dLytMapMain_c::executeState_Active() {
|
||||
// TODO figure out and double check numbers
|
||||
if (field_0x8C68 == 4 && mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE &&
|
||||
mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE && dPad::getDownTrigZ()) {
|
||||
if (mIslandNamesOn) {
|
||||
if (mShowIslandNames) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ISLAND_NAME_OFF);
|
||||
} else {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ISLAND_NAME_ON);
|
||||
}
|
||||
mIslandNamesOn = !mIslandNamesOn;
|
||||
mMarkers.setIslandNamesOn(mIslandNamesOn);
|
||||
mShowIslandNames = !mShowIslandNames;
|
||||
mMarkers.setIslandNamesOn(mShowIslandNames);
|
||||
}
|
||||
checkScroll();
|
||||
|
||||
@@ -2474,22 +2975,23 @@ void dLytMapMain_c::executeState_Active() {
|
||||
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE && mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE &&
|
||||
canZoomIn(dLytMapGlobal_c::MAPMODE_STAGE)) {
|
||||
if (field_0x8CC0 && (field_0x8D5C < 2 || !mFloorBtnMgr.hasPointedAtABtnIdx())) {
|
||||
const mVec3_c &pos = global->getPlayerPos();
|
||||
if (mPointerOnMap && (field_0x8D5C < 2 || !mFloorBtnMgr.hasPointedAtABtnIdx())) {
|
||||
// Can zoom in around cursor, use the cursor pos
|
||||
getGlobal()->unprojectFromMap(field_0x8CF4, dCsGame_c::GetInstance()->getCursorIf()->getCursorPos());
|
||||
f32 tmp = fn_80142D90(4);
|
||||
fn_8013FB70(field_0x8CF4, getGlobal()->getField_0x44() / tmp);
|
||||
field_0x8DB5 = true;
|
||||
mDrawScaleFrame = true;
|
||||
} else {
|
||||
// Cannot zoom in around cursor, use the player pos
|
||||
f32 tmp = fn_80142D90(4);
|
||||
f32 val = getGlobal()->getField_0x44() / tmp;
|
||||
fn_8013FB70(getGlobal()->getPlayerPos(), val);
|
||||
field_0x8DB5 = true;
|
||||
mDrawScaleFrame = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (field_0x8DBD && *mPinIconAggregate.mStateMgr.getStateID() != dLytMapPinIconAggregate_c::StateID_Select &&
|
||||
dPad::getDownTrigC() && field_0x8CC1) {
|
||||
dPad::getDownTrigC() && mPointerCanPlaceBeacon) {
|
||||
s32 id = -1;
|
||||
mPinIconAggregate.findNewBeaconId(&id);
|
||||
if (id >= 0) {
|
||||
@@ -2540,7 +3042,7 @@ void dLytMapMain_c::executeState_Active() {
|
||||
}
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_Active() {
|
||||
field_0x8DB5 = false;
|
||||
mDrawScaleFrame = false;
|
||||
}
|
||||
|
||||
void dLytMapMain_c::initializeState_Out() {
|
||||
@@ -2718,7 +3220,7 @@ void dLytMapMain_c::initializeState_ChgDispAreaMode_MapRot() {
|
||||
mMarkers.setIslandNamesOn(false);
|
||||
}
|
||||
if (mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
mMarkers.setIslandNamesOn(mIslandNamesOn);
|
||||
mMarkers.setIslandNamesOn(mShowIslandNames);
|
||||
}
|
||||
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM && mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
@@ -2768,7 +3270,7 @@ void dLytMapMain_c::executeState_ChgDispAreaMode_MapRot() {
|
||||
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM && mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
fn_8013FB70(field_0x8CF4, f4 / field_0x8D50);
|
||||
field_0x8DB5 = true;
|
||||
mDrawScaleFrame = true;
|
||||
}
|
||||
|
||||
// TODO dead code
|
||||
@@ -2779,7 +3281,7 @@ void dLytMapMain_c::executeState_ChgDispAreaMode_MapRot() {
|
||||
if (field_0x8C94 == 3 && field_0x0108 > 0) {
|
||||
field_0x0108--;
|
||||
} else {
|
||||
field_0x8DB5 = false;
|
||||
mDrawScaleFrame = false;
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
mAnmGroups[MAP_MAIN_ANIM_ROTATE].setToEnd();
|
||||
} else {
|
||||
@@ -2787,7 +3289,7 @@ void dLytMapMain_c::executeState_ChgDispAreaMode_MapRot() {
|
||||
}
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_MAIN_ANIM_ROTATE].unbind();
|
||||
field_0x8DB5 = false;
|
||||
mDrawScaleFrame = false;
|
||||
mMapUpDirection = mNextMapUpDirection;
|
||||
global->setMapRotation(field_0x8D46);
|
||||
global->setField_0x44(field_0x8D4C);
|
||||
@@ -2909,21 +3411,101 @@ void dLytMapMain_c::finalizeState_EventSwBankSmall_Step3() {}
|
||||
void dLytMapMain_c::initializeState_EventMapIntro_Step1() {
|
||||
field_0x8CB0 = sHio.field_0x1F;
|
||||
}
|
||||
void dLytMapMain_c::executeState_EventMapIntro_Step1() {}
|
||||
void dLytMapMain_c::executeState_EventMapIntro_Step1() {
|
||||
if (field_0x8D6A) {
|
||||
fn_80140B90();
|
||||
return;
|
||||
}
|
||||
|
||||
if (field_0x8CB0 != 0) {
|
||||
field_0x8CB0--;
|
||||
} else {
|
||||
mStateMgr.changeState(StateID_EventMapIntro_Step2);
|
||||
}
|
||||
EventManager::execute();
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_EventMapIntro_Step1() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_EventMapIntro_Step2() {}
|
||||
void dLytMapMain_c::executeState_EventMapIntro_Step2() {}
|
||||
void dLytMapMain_c::initializeState_EventMapIntro_Step2() {
|
||||
if (field_0x8880[field_0x88AC] != nullptr) {
|
||||
field_0x8880[field_0x88AC]->bind(false);
|
||||
field_0x8880[field_0x88AC]->setFrame(0.0f);
|
||||
mLyt.calc();
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_WORLD_EXTEND);
|
||||
}
|
||||
}
|
||||
void dLytMapMain_c::executeState_EventMapIntro_Step2() {
|
||||
if (field_0x8D6A) {
|
||||
fn_80140B90();
|
||||
return;
|
||||
}
|
||||
|
||||
if (field_0x8880[field_0x88AC] != nullptr) {
|
||||
if (field_0x8880[field_0x88AC]->isEndReached()) {
|
||||
field_0x8880[field_0x88AC]->unbind();
|
||||
mStateMgr.changeState(StateID_EventMapIntro_Step3);
|
||||
} else {
|
||||
field_0x8880[field_0x88AC]->play();
|
||||
}
|
||||
} else {
|
||||
mStateMgr.changeState(StateID_EventMapIntro_Step3);
|
||||
}
|
||||
|
||||
EventManager::execute();
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_EventMapIntro_Step2() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_EventMapIntro_Step3() {}
|
||||
void dLytMapMain_c::executeState_EventMapIntro_Step3() {}
|
||||
void dLytMapMain_c::initializeState_EventMapIntro_Step3() {
|
||||
field_0x8CB0 = 0;
|
||||
}
|
||||
void dLytMapMain_c::executeState_EventMapIntro_Step3() {
|
||||
if (field_0x8D6A) {
|
||||
fn_80140B90();
|
||||
return;
|
||||
}
|
||||
|
||||
if (field_0x8CB0 != 0) {
|
||||
field_0x8CB0--;
|
||||
} else {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ZOOMIN_TO_AREA);
|
||||
mNextMapMode = dLytMapGlobal_c::MAPMODE_PROVINCE;
|
||||
field_0x0108 = sHio.field_0x20;
|
||||
mStateMgr.changeState(StateID_ChgDispAreaMode_WA);
|
||||
}
|
||||
EventManager::execute();
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_EventMapIntro_Step3() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_EventMapIntro_Step4() {}
|
||||
void dLytMapMain_c::executeState_EventMapIntro_Step4() {}
|
||||
void dLytMapMain_c::initializeState_EventMapIntro_Step4() {
|
||||
field_0x8CB0 = sHio.field_0x21;
|
||||
}
|
||||
void dLytMapMain_c::executeState_EventMapIntro_Step4() {
|
||||
if (field_0x8D6A) {
|
||||
fn_80140B90();
|
||||
return;
|
||||
}
|
||||
|
||||
if (field_0x8CB0 != 0) {
|
||||
field_0x8CB0--;
|
||||
} else {
|
||||
field_0x8D6B = 1;
|
||||
}
|
||||
EventManager::execute();
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_EventMapIntro_Step4() {}
|
||||
|
||||
void dLytMapMain_c::fn_80140B90() {
|
||||
mAnmGroups[MAP_MAIN_ANIM_OUT].bind(false);
|
||||
mAnmGroups[MAP_MAIN_ANIM_OUT].setToEnd();
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_MAIN_ANIM_OUT].unbind();
|
||||
dBase_c::s_NextExecuteControlFlags &= ~dBase_c::BASE_PROP_0x10;
|
||||
dBase_c::s_DrawControlFlags &= ~dBase_c::BASE_PROP_0x10;
|
||||
dScGame_c::getCamera(0)->doFn_80093360();
|
||||
dScGame_c::getCamera(0)->fn_8019E430();
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
}
|
||||
|
||||
void dLytMapMain_c::initializeState_EventDungeonMapGet_Step1() {}
|
||||
void dLytMapMain_c::executeState_EventDungeonMapGet_Step1() {}
|
||||
void dLytMapMain_c::finalizeState_EventDungeonMapGet_Step1() {}
|
||||
@@ -3003,3 +3585,42 @@ void dLytMapMain_c::finalizeState_EventSaveObjConfirmMsgWindow() {}
|
||||
void dLytMapMain_c::initializeState_EventSaveObjDecide() {}
|
||||
void dLytMapMain_c::executeState_EventSaveObjDecide() {}
|
||||
void dLytMapMain_c::finalizeState_EventSaveObjDecide() {}
|
||||
|
||||
void dLytMapMain_c::checkCursorPointedAtMap() {
|
||||
const mVec2_c *pos2d;
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
bool pointerOnMap = true;
|
||||
bool canPlaceBeacon = true;
|
||||
|
||||
pos2d = &dCsGame_c::GetInstance()->getCursorIf()->getCursorPos();
|
||||
mVec3_c pos3d(0.0f, 0.0f, 0.0f);
|
||||
global->unprojectFromMap(pos3d, *pos2d, global->getMapRotation());
|
||||
|
||||
f32 tmp = global->getField_0x28().x * 368.0f;
|
||||
f32 nTmp = -tmp;
|
||||
if (pos2d->x > tmp || pos2d->x < nTmp || pos2d->y > 209.0f || pos2d->y < -193.0f) {
|
||||
// Pointer off screen?
|
||||
pointerOnMap = false;
|
||||
canPlaceBeacon = false;
|
||||
}
|
||||
|
||||
if (pointerOnMap && (pos3d.x < field_0x8930.x || pos3d.x > field_0x893C.x || pos3d.z < field_0x8930.z ||
|
||||
pos3d.z > field_0x893C.z)) {
|
||||
// Pointer too close to the edge?
|
||||
canPlaceBeacon = false;
|
||||
}
|
||||
|
||||
if (pointerOnMap) {
|
||||
for (int i = 0; i < MAP_MAIN_NUM_BOUNDINGS_NORMAL; i++) {
|
||||
if (pos3d.x >= field_0x8948[i].field_0x00.x && pos3d.x <= field_0x8948[i].field_0x0C.x &&
|
||||
pos3d.z >= field_0x8948[i].field_0x00.z && pos3d.z <= field_0x8948[i].field_0x0C.z) {
|
||||
// Cannot place beacon when hovering over UI element (remocon, ...)
|
||||
canPlaceBeacon = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mPointerOnMap = pointerOnMap;
|
||||
mPointerCanPlaceBeacon = canPlaceBeacon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user