mirror of
https://github.com/zeldaret/ss
synced 2026-05-28 00:15:59 -04:00
more map
This commit is contained in:
+12
-12
@@ -3555,7 +3555,7 @@ fn_8009DFE0 = .text:0x8009DFE0; // type:function size:0x54
|
||||
fn_8009E040 = .text:0x8009E040; // type:function size:0x54
|
||||
fn_8009E0A0 = .text:0x8009E0A0; // type:function size:0x6C
|
||||
fn_8009E110 = .text:0x8009E110; // type:function size:0x14
|
||||
mainEventManagerUpdate = .text:0x8009E130; // type:function size:0x9A4
|
||||
execute__12EventManagerFv = .text:0x8009E130; // type:function size:0x9A4
|
||||
fn_8009EAE0 = .text:0x8009EAE0; // type:function size:0x4
|
||||
fn_8009EAF0 = .text:0x8009EAF0; // type:function size:0xC
|
||||
fn_8009EB00 = .text:0x8009EB00; // type:function size:0xC
|
||||
@@ -7493,7 +7493,7 @@ fn_8012D670 = .text:0x8012D670; // type:function size:0x5C
|
||||
fn_8012D6D0 = .text:0x8012D6D0; // type:function size:0x20
|
||||
fn_8012D6F0 = .text:0x8012D6F0; // type:function size:0xE4
|
||||
fn_8012D7E0 = .text:0x8012D7E0; // type:function size:0x10
|
||||
fn_8012D7F0 = .text:0x8012D7F0; // type:function size:0x8
|
||||
isBusyRendering__16dLytMapCapture_cCFv = .text:0x8012D7F0; // type:function size:0x8
|
||||
fn_8012D800 = .text:0x8012D800; // type:function size:0xEC
|
||||
finalizeState__31sFStateID_c<16dLytMapCapture_c>CFR16dLytMapCapture_c = .text:0x8012D8F0; // type:function size:0x30
|
||||
executeState__31sFStateID_c<16dLytMapCapture_c>CFR16dLytMapCapture_c = .text:0x8012D920; // type:function size:0x30
|
||||
@@ -7864,7 +7864,7 @@ finalizeState_In__13dLytMapMain_cFv = .text:0x8013C670; // type:function size:0x
|
||||
fn_8013C6B0 = .text:0x8013C6B0; // type:function size:0xA8
|
||||
fn_8013C760 = .text:0x8013C760; // type:function size:0x100
|
||||
fn_8013C860 = .text:0x8013C860; // type:function size:0x1C
|
||||
fn_8013C880 = .text:0x8013C880; // type:function size:0x64
|
||||
shouldDrawFootprints__13dLytMapMain_cCFv = .text:0x8013C880; // type:function size:0x64
|
||||
zoomIn__13dLytMapMain_cFv = .text:0x8013C8F0; // type:function size:0x644
|
||||
zoomOut__13dLytMapMain_cFv = .text:0x8013CF40; // type:function size:0x54C
|
||||
initializeState_Active__13dLytMapMain_cFv = .text:0x8013D490; // type:function size:0x4
|
||||
@@ -7888,7 +7888,7 @@ finalizeState_ChgDispAreaMode_Map__13dLytMapMain_cFv = .text:0x8013F2A0; // type
|
||||
initializeState_ChgDispAreaMode_WA__13dLytMapMain_cFv = .text:0x8013F2B0; // type:function size:0x594
|
||||
executeState_ChgDispAreaMode_WA__13dLytMapMain_cFv = .text:0x8013F850; // type:function size:0x2CC
|
||||
finalizeState_ChgDispAreaMode_WA__13dLytMapMain_cFv = .text:0x8013FB20; // type:function size:0x50
|
||||
fn_8013FB70 = .text:0x8013FB70; // type:function size:0xC0
|
||||
fn_8013FB70__13dLytMapMain_cFRC7mVec3_cf = .text:0x8013FB70; // type:function size:0xC0
|
||||
initializeState_ChgDispAreaMode_CsrRot__13dLytMapMain_cFv = .text:0x8013FC30; // type:function size:0x3C0
|
||||
executeState_ChgDispAreaMode_CsrRot__13dLytMapMain_cFv = .text:0x8013FFF0; // type:function size:0x388
|
||||
finalizeState_ChgDispAreaMode_CsrRot__13dLytMapMain_cFv = .text:0x80140380; // type:function size:0x4
|
||||
@@ -7921,7 +7921,7 @@ finalizeState_EventMapIntro_Step3__13dLytMapMain_cFv = .text:0x80140B10; // type
|
||||
initializeState_EventMapIntro_Step4__13dLytMapMain_cFv = .text:0x80140B20; // type:function size:0x18
|
||||
executeState_EventMapIntro_Step4__13dLytMapMain_cFv = .text:0x80140B40; // type:function size:0x38
|
||||
finalizeState_EventMapIntro_Step4__13dLytMapMain_cFv = .text:0x80140B80; // type:function size:0x4
|
||||
fn_80140B90 = .text:0x80140B90; // type:function size:0xBC
|
||||
fn_80140B90__13dLytMapMain_cFv = .text:0x80140B90; // type:function size:0xBC
|
||||
initializeState_EventDungeonMapGet_Step1__13dLytMapMain_cFv = .text:0x80140C50; // type:function size:0x18
|
||||
executeState_EventDungeonMapGet_Step1__13dLytMapMain_cFv = .text:0x80140C70; // type:function size:0x34
|
||||
fn_80140CA4 = .text:0x80140CA4; // type:function size:0x4
|
||||
@@ -7966,7 +7966,7 @@ initializeState_EventSignalAdd_Step3__13dLytMapMain_cFv = .text:0x801414C0; // t
|
||||
executeState_EventSignalAdd_Step3__13dLytMapMain_cFv = .text:0x801414E0; // type:function size:0x34
|
||||
fn_80141514 = .text:0x80141514; // type:function size:0x4
|
||||
finalizeState_EventSignalAdd_Step3__13dLytMapMain_cFv = .text:0x80141520; // type:function size:0x4
|
||||
fn_80141530 = .text:0x80141530; // type:function size:0x48
|
||||
fn_80141530__13dLytMapMain_cCFv = .text:0x80141530; // type:function size:0x48
|
||||
findGoddessChestWithStoryflag = .text:0x80141580; // type:function size:0x94
|
||||
initializeState_EventGoddessCube_Step1__13dLytMapMain_cFv = .text:0x80141620; // type:function size:0x10
|
||||
executeState_EventGoddessCube_Step1__13dLytMapMain_cFv = .text:0x80141630; // type:function size:0x44
|
||||
@@ -7998,13 +7998,13 @@ fn_801428F0 = .text:0x801428F0; // type:function size:0xB4
|
||||
fn_801429B0 = .text:0x801429B0; // type:function size:0x1D8
|
||||
fn_80142B90 = .text:0x80142B90; // type:function size:0xEC
|
||||
fn_80142C80 = .text:0x80142C80; // type:function size:0x8C
|
||||
fn_80142D10 = .text:0x80142D10; // type:function size:0x80
|
||||
fn_80142D90 = .text:0x80142D90; // type:function size:0x170
|
||||
fn_80142F00 = .text:0x80142F00; // type:function size:0x158
|
||||
fn_80143060 = .text:0x80143060; // type:function size:0xBC
|
||||
fn_80142D10__13dLytMapMain_cFlbR4mAng = .text:0x80142D10; // type:function size:0x80
|
||||
fn_80142D90__13dLytMapMain_cFl = .text:0x80142D90; // type:function size:0x170
|
||||
fn_80142F00__13dLytMapMain_cFR7mVec3_clUcRC7mVec3_cRC4mAng = .text:0x80142F00; // type:function size:0x158
|
||||
fn_80143060__13dLytMapMain_cFR7mVec3_cRC7mVec3_cRC7mVec3_cRC4mAng = .text:0x80143060; // type:function size:0xBC
|
||||
fn_80143120 = .text:0x80143120; // type:function size:0xC0
|
||||
fn_801431E0 = .text:0x801431E0; // type:function size:0x11C
|
||||
fn_80143300 = .text:0x80143300; // type:function size:0x54
|
||||
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
|
||||
@@ -10975,7 +10975,7 @@ fadeOut__8dStage_cFlUs = .text:0x801B3DB0; // type:function size:0xA8
|
||||
forceFadeOut__8dStage_cFv = .text:0x801B3E60; // type:function size:0x40
|
||||
forceFadeIn__8dStage_cFv = .text:0x801B3EA0; // type:function size:0x40
|
||||
fn_801B3EE0__8dStage_cFv = .text:0x801B3EE0; // type:function size:0x3C
|
||||
fn_801B3F20 = .text:0x801B3F20; // type:function size:0x8
|
||||
fn_801B3F20__8dStage_cFv = .text:0x801B3F20; // type:function size:0x8
|
||||
fn_801B3F30 = .text:0x801B3F30; // type:function size:0x8
|
||||
drawMap__8dStage_cFP6mMtx_ci = .text:0x801B3F40; // type:function size:0x90
|
||||
RoomManager__getRMPLForRoom = .text:0x801B3FD0; // type:function size:0x34
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef D_CAMERA_H
|
||||
#define D_CAMERA_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "m/m_vec.h"
|
||||
|
||||
@@ -33,6 +34,10 @@ public:
|
||||
mScreenShakeIntensity = val;
|
||||
}
|
||||
|
||||
UNKWORD getField_0xDA8() const {
|
||||
return field_0xDA8;
|
||||
}
|
||||
|
||||
bool isUnderwater() const;
|
||||
f32 getUnderwaterDepth() const;
|
||||
|
||||
@@ -44,7 +49,9 @@ private:
|
||||
/* 0xD98 */ void *field_0xD98;
|
||||
/* 0xD9C */ u8 _0xD9C[0xDA0 - 0xD9C];
|
||||
/* 0xDA0 */ void *field_0xDA0;
|
||||
/* 0xDA4 */ u8 _0xDA4[0xDB0 - 0xDA4];
|
||||
/* 0xDA4 */ u8 _0xDA4[0xDA8 - 0xDA4];
|
||||
/* 0xDA8 */ UNKWORD field_0xDA8;
|
||||
/* 0xDAC */ u8 _0xDAC[0xDB0 - 0xDAC];
|
||||
/* 0xDB0 */ f32 mScreenShakeIntensity;
|
||||
};
|
||||
|
||||
|
||||
+59
-21
@@ -7,11 +7,14 @@
|
||||
#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_textbox.h"
|
||||
#include "d/lyt/d_window.h"
|
||||
#include "egg/core/eggColorFader.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"
|
||||
@@ -29,7 +32,7 @@ struct dMapSaveObjDefinition {
|
||||
/** Something for making sure re-opening the map opens it in a similar state as when it was last closed */
|
||||
struct dMapSavedDataEntry {
|
||||
/* 0x00 */ s32 mapMode;
|
||||
/* 0x04 */ u8 mapUpDirection;
|
||||
/* 0x04 */ bool mapUpDirection;
|
||||
/* 0x05 */ u8 field_0x05;
|
||||
/* 0x06 */ u8 field_0x06;
|
||||
};
|
||||
@@ -342,6 +345,7 @@ private:
|
||||
|
||||
// Size 0x4C
|
||||
class dLytMapPopupInfo_c {
|
||||
friend class dLytMapMain_c;
|
||||
public:
|
||||
dLytMapPopupInfo_c() : mStateMgr(*this, sStateID::null) {}
|
||||
|
||||
@@ -464,12 +468,15 @@ private:
|
||||
};
|
||||
|
||||
// TODO, name made up
|
||||
class dLytMapDecoration_c {
|
||||
class dLytMapDecoration_c : public m2d::Base_c {
|
||||
public:
|
||||
dLytMapDecoration_c() {}
|
||||
virtual ~dLytMapDecoration_c() {}
|
||||
virtual void draw() override;
|
||||
virtual void build(d2d::ResAccIf_c *resAcc);
|
||||
|
||||
void setIslandNamesOn(bool on);
|
||||
void fn_80189B90();
|
||||
};
|
||||
|
||||
/** 2D UI - Map - beacon preview icon following the cursor */
|
||||
@@ -563,6 +570,14 @@ private:
|
||||
f32 fn_80142D90(s32);
|
||||
void fn_80142F00(mVec3_c &, s32 mapMode, u8, 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 fn_80140B90();
|
||||
void fn_80143300();
|
||||
void fn_80143120(s32);
|
||||
void fn_80138D80();
|
||||
bool shouldDrawFootprints() const;
|
||||
|
||||
void zoomOut();
|
||||
void zoomIn();
|
||||
@@ -576,10 +591,14 @@ private:
|
||||
static dMapSavedData sSavedMapData;
|
||||
static const dMapSavedData sDefaultMapData;
|
||||
|
||||
bool isSomeFieldEq0Or1Or7Or9Or11() const {
|
||||
return field_0x8C94 == 0 || field_0x8C94 == 1 || field_0x8C94 == 7 || field_0x8C94 == 9 || field_0x8C94 == 11;
|
||||
}
|
||||
|
||||
/* 0x0010 */ UI_STATE_MGR_DECLARE(dLytMapMain_c);
|
||||
/* 0x004C */ dFlowMgrBase_c mFlowMgr;
|
||||
/* 0x00A4 */ dFlow_c mFlow;
|
||||
/* 0x0108 */ u8 _0x0108[0x010C - 0x0108];
|
||||
/* 0x0108 */ UNKWORD field_0x0108;
|
||||
/* 0x010C */ d2d::LytBase_c mLyt;
|
||||
/* 0x019C */ d2d::AnmGroup_c mAnmGroups[54];
|
||||
/* 0x0F1C */ LytMap0x80520B5C field_0xF1C;
|
||||
@@ -589,7 +608,7 @@ private:
|
||||
|
||||
/* 0x2060 */ dLytMapDecoration_c field_0x2060;
|
||||
|
||||
/* 0x2064 */ u8 _0x2064[0x64C0 - 0x2064];
|
||||
/* 0x2070 */ u8 _0x2070[0x64C0 - 0x2070];
|
||||
|
||||
/* 0x64C0 */ dLytMapFootPrints_c mFootPrints;
|
||||
|
||||
@@ -598,23 +617,39 @@ private:
|
||||
/* 0x79C4 */ dLytMapSaveCaption_c mSaveCaption;
|
||||
/* 0x7BD0 */ dLytMapSavePopup_c mSavePopup;
|
||||
/* 0x807C */ dLytMapPopupInfo_c mPopupInfo;
|
||||
|
||||
/* 0x8208 */ u8 _0x8208[0x821C - 0x8208];
|
||||
|
||||
/* 0x8208 */ dTextBox_c *mpNumberTextBox;
|
||||
/* 0x820C */ dTextBox_c *mpNumberTextBoxS;
|
||||
/* 0x8210 */ nw4r::lyt::Pane *mpNoroshiPane;
|
||||
/* 0x8214 */ nw4r::lyt::Pane *mpScaleFlamePane;
|
||||
/* 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 */ u8 _0x831C[0x832C - 0x831C];
|
||||
/* 0x831C */ u8 _0x831C[0x8328 - 0x831C];
|
||||
|
||||
/* 0x8328 */ d2d::AnmGroup_c *mpOutAnmGroup;
|
||||
|
||||
// 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 field_0x832C[33];
|
||||
/* 0x832C */ dCursorHitCheckLyt_c mHitChecks[33];
|
||||
|
||||
/* 0x8854 */ u8 _0x8854[0x8904 - 0x8854];
|
||||
/* 0x8854 */ nw4r::lyt::Pane *mpPanes[11];
|
||||
|
||||
/* 0x8880 */ u8 _0x8880[0x88B0 - 0x8880];
|
||||
|
||||
/* 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;
|
||||
/* 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;
|
||||
@@ -627,13 +662,15 @@ private:
|
||||
/* 0x8C60 */ s32 mMaxBeaconCount;
|
||||
/* 0x8C64 */ s32 field_0x8C64;
|
||||
/* 0x8C68 */ s32 field_0x8C68;
|
||||
|
||||
/* 0x8C6C */ UNKWORD field_0x8C6C;
|
||||
/* 0x8C70 */ u32 field_0x8C70;
|
||||
|
||||
/* 0x8C70 */ u8 _0x8C70[0x8C90 - 0x8C70];
|
||||
/* 0x8C74 */ u8 _0x8C74[0x8C88 - 0x8C74];
|
||||
|
||||
/* 0x8C90 */ u8 field_0x8C90;
|
||||
/* 0x8C91 */ u8 field_0x8C91;
|
||||
/* 0x8C88 */ f32 field_0x8C88;
|
||||
/* 0x8C8C */ f32 field_0x8C8C;
|
||||
/* 0x8C90 */ bool mMapUpDirection;
|
||||
/* 0x8C91 */ bool mNextMapUpDirection;
|
||||
/* 0x8C92 */ u8 field_0x8C92;
|
||||
/* 0x8C93 */ u8 field_0x8C93;
|
||||
/* 0x8C94 */ s32 field_0x8C94;
|
||||
@@ -642,12 +679,13 @@ private:
|
||||
|
||||
/* 0x8CA0 */ u8 _0x8CA0[0x8CA4 - 0x8CA0];
|
||||
|
||||
/* 0x8CA4 */ s32 field_0x8CA4;
|
||||
/* 0x8CA8 */ s32 field_0x8CA8;
|
||||
/* 0x8CA4 */ s32 mCurrentMapMode;
|
||||
/* 0x8CA8 */ s32 mNextMapMode;
|
||||
|
||||
/* 0x8CAC */ u8 field_0x8CAC;
|
||||
/* 0x8CAD */ u8 field_0x8CAD;
|
||||
|
||||
/* 0x8CAD */ u8 _0x8CAC[0x8CBC - 0x8CAD];
|
||||
/* 0x8CAE */ u8 _0x8CAE[0x8CBC - 0x8CAE];
|
||||
|
||||
/* 0x8CBC */ nw4r::lyt::Bounding *mpMapBounding;
|
||||
/* 0x8CC0 */ bool field_0x8CC0;
|
||||
@@ -657,8 +695,8 @@ private:
|
||||
/* 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;
|
||||
/* 0x8D30 */ mVec2_c field_0x8D30;
|
||||
@@ -679,13 +717,13 @@ private:
|
||||
/* 0x8D6B */ u8 field_0x8D6B;
|
||||
/* 0x8D6C */ UNKWORD field_0x8D6C;
|
||||
/* 0x8D70 */ UNKWORD field_0x8D70;
|
||||
/* 0x8D74 */ u8 _0x8D74[0x8D78 - 0x8D74];
|
||||
/* 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 */ u8 _0x8D8C[0x8D94 - 0x8D8C];
|
||||
/* 0x8D8C */ nw4r::lyt::Group *mpPriorityGroups[2];
|
||||
/* 0x8D94 */ d2d::SubPaneList mSubpaneList;
|
||||
/* 0x8DA0 */ d2d::SubPaneListNode mSubpane;
|
||||
/* 0x8DB0 */ UNKWORD field_0x8DB0;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
#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;
|
||||
mRenderRequest = false;
|
||||
@@ -23,11 +23,21 @@ 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;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@@ -24,22 +24,46 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
const mVec3_c &getField_0x00() const {
|
||||
return field_0x00;
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -64,10 +88,22 @@ public:
|
||||
return mZoomFrame;
|
||||
}
|
||||
|
||||
void setZoomFrame(f32 v) {
|
||||
mZoomFrame = v;
|
||||
}
|
||||
|
||||
void setField_0x58(f32 v) {
|
||||
field_0x58 = v;
|
||||
}
|
||||
|
||||
f32 getField_0x44() const {
|
||||
return field_0x44;
|
||||
}
|
||||
|
||||
void setField_0x44(f32 v) {
|
||||
field_0x44 = v;
|
||||
}
|
||||
|
||||
s32 getFloor() const {
|
||||
return mFloor;
|
||||
}
|
||||
@@ -85,16 +121,16 @@ private:
|
||||
static dLytMapGlobal_c *sInstance;
|
||||
|
||||
void projectOntoMap(
|
||||
mVec2_c &result, const mVec3_c &position, const mVec3_c &v1, const mVec3_c &mapRotationCenter, const mAng &rot,
|
||||
f32 f1, f32 f2
|
||||
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 &v2,
|
||||
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 field_0x00;
|
||||
/* 0x00 */ mVec3_c mMapScroll;
|
||||
/* 0x0C */ mVec2_c field_0x0C;
|
||||
/* 0x14 */ mVec3_c mMapRotationCenter;
|
||||
/* 0x20 */ mVec2_c field_0x20;
|
||||
@@ -111,7 +147,7 @@ private:
|
||||
/* 0x50 */ UNKWORD field_0x50;
|
||||
/* 0x54 */ u8 _0x54[0x56 - 0x54];
|
||||
/* 0x56 */ mAng field_0x56;
|
||||
/* 0x58 */ u8 _0x58[0x5C - 0x58];
|
||||
/* 0x58 */ f32 field_0x58;
|
||||
/* 0x5C */ s32 mCurrentMapMode;
|
||||
/* 0x60 */ s32 mNextMapMode;
|
||||
/* 0x64 */ f32 mZoomFrame; ///< 0.0f when zoomed out, 1.0f when zoomed in
|
||||
|
||||
+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
|
||||
|
||||
@@ -19,6 +19,8 @@ public:
|
||||
static bool canSkipCurrentEvent();
|
||||
static dAcBase_c *getMainActorInEvent();
|
||||
|
||||
static void execute();
|
||||
|
||||
static EventManager *sInstance;
|
||||
|
||||
static bool isInEvent() {
|
||||
|
||||
+502
-44
@@ -1,7 +1,10 @@
|
||||
#define NEED_DIRECT_FRAMECTRL_ACCESS
|
||||
#include "d/lyt/d_lyt_map.h"
|
||||
|
||||
#include "c/c_lib.h"
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/d_base.h"
|
||||
#include "d/d_cs_base.h"
|
||||
#include "d/d_cs_game.h"
|
||||
#include "d/d_cursor_hit_check.h"
|
||||
@@ -18,6 +21,7 @@
|
||||
#include "d/lyt/d_lyt_map_global.h"
|
||||
#include "d/lyt/d_textbox.h"
|
||||
#include "d/lyt/d_window.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/lyt/msg_window/d_lyt_msg_window.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "egg/core/eggColorFader.h"
|
||||
@@ -31,6 +35,7 @@
|
||||
#include "sized_string.h"
|
||||
#include "toBeSorted/arc_managers/layout_arc_manager.h"
|
||||
#include "toBeSorted/d_beacon.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
|
||||
struct dLytMap_HIO_c {
|
||||
dLytMap_HIO_c();
|
||||
@@ -1938,9 +1943,9 @@ dLytMapMain_c::dLytMapMain_c()
|
||||
#pragma dont_inline reset
|
||||
|
||||
dLytMapMain_c::~dLytMapMain_c() {
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(field_0x832C); i++) {
|
||||
if (dCsMgr_c::GetInstance()->isRegist(&field_0x832C[i])) {
|
||||
dCsMgr_c::GetInstance()->unregistCursorTarget(&field_0x832C[i]);
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(mHitChecks); i++) {
|
||||
if (dCsMgr_c::GetInstance()->isRegist(&mHitChecks[i])) {
|
||||
dCsMgr_c::GetInstance()->unregistCursorTarget(&mHitChecks[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2117,6 +2122,36 @@ static const d2d::LytBrlanMapping sMapMainBrlanMap[] = {
|
||||
};
|
||||
|
||||
#define MAP_MAIN_ANIM_IN 0
|
||||
#define MAP_MAIN_ANIM_TITLE_ON_OFF 1
|
||||
#define MAP_MAIN_ANIM_N_ON_OFF 2
|
||||
#define MAP_MAIN_ANIM_MAP_V 3
|
||||
#define MAP_MAIN_ANIM_WORLD_STATE 4
|
||||
#define MAP_MAIN_ANIM_PLAYER_2_PATTERN 5
|
||||
#define MAP_MAIN_ANIM_ROTATE 6
|
||||
#define MAP_MAIN_ANIM_OUT 7
|
||||
#define MAP_MAIN_ANIM_DRAW_PLAIN 8
|
||||
#define MAP_MAIN_ANIM_DRAW_FOREST 9
|
||||
#define MAP_MAIN_ANIM_DRAW_N_FOREST 10
|
||||
#define MAP_MAIN_ANIM_DRAW_S_VOLCANO 11
|
||||
#define MAP_MAIN_ANIM_DRAW_MINE 12
|
||||
#define MAP_MAIN_ANIM_DRAW_DESERT 13
|
||||
#define MAP_MAIN_ANIM_DRAW_LAKE 14
|
||||
#define MAP_MAIN_ANIM_DRAW_GLEN_00 15
|
||||
#define MAP_MAIN_ANIM_DRAW_SEA 16
|
||||
#define MAP_MAIN_ANIM_DRAW_N_VOLCANO 17
|
||||
#define MAP_MAIN_ANIM_DRAW_GLEN_01 18
|
||||
#define MAP_MAIN_ANIM_SKYLOFT_UP_DOWN 19
|
||||
#define MAP_MAIN_ANIM_LINK_POSITION_LIGHT 20
|
||||
|
||||
#define MAP_MAIN_ANIM_SUN_ROTE 45
|
||||
#define MAP_MAIN_ANIM_IN_NO_CAM 46
|
||||
#define MAP_MAIN_ANIM_OUT_NO_CAM 47
|
||||
#define MAP_MAIN_ANIM_CLOUD_LOOK 48
|
||||
#define MAP_MAIN_ANIM_LIGHT_LOOP 49
|
||||
#define MAP_MAIN_ANIM_NUSHI_LOOP 50
|
||||
#define MAP_MAIN_ANIM_TYPE 51
|
||||
#define MAP_MAIN_ANIM_KUMO_PATTERN 52
|
||||
#define MAP_MAIN_ANIM_TITE_LINE 53
|
||||
|
||||
static const char *sGroupName = "G_ref_00";
|
||||
|
||||
@@ -2129,6 +2164,24 @@ static const char *sBoundingNames[] = {
|
||||
"B_saveIcon_25", "B_saveIcon_26", "B_saveIcon_27",
|
||||
};
|
||||
|
||||
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",
|
||||
};
|
||||
|
||||
static const char *sPaneNamesUnk1[] = {
|
||||
"N_fD1_00", "N_vD1_00", "N_dD1_00", "N_fD2_00", "N_dD2_00", "N_vD2_00", "N_lastD_00",
|
||||
};
|
||||
|
||||
static const char *sPaneNamesUnk2[] = {
|
||||
"P_fD1_00", "P_vD1_00", "P_dD1_00", "P_fD2_00", "P_dD2_00", "P_vD2_00", "P_lastD_00",
|
||||
};
|
||||
|
||||
static const char *sPriorityGroupNames[] = {
|
||||
"G_priority_00",
|
||||
"G_priority_02",
|
||||
};
|
||||
|
||||
void dLytMapMain_c::build() {
|
||||
field_0x8DBF = 0;
|
||||
field_0x8DB0 = 0;
|
||||
@@ -2141,8 +2194,7 @@ void dLytMapMain_c::build() {
|
||||
d2d::ResAccIf_c *resAcc = dLytMap_c::getResAcc();
|
||||
mLyt.setResAcc(resAcc);
|
||||
mLyt.build("map_00.brlyt", nullptr);
|
||||
mVec2_c scale = mLyt.getDrawInfo().GetLocationAdjustScale();
|
||||
getGlobal()->setField_0x28(scale);
|
||||
getGlobal()->setField_0x28(mLyt.getDrawInfo().GetLocationAdjustScale());
|
||||
|
||||
// TODO define
|
||||
for (int i = 0; i < 54; i++) {
|
||||
@@ -2155,6 +2207,7 @@ void dLytMapMain_c::build() {
|
||||
|
||||
d2d::dSubPane::linkMeters(mLyt.getLayout()->GetGroupContainer()->FindGroupByName(sGroupName), &mSubpaneList);
|
||||
mFootPrints.build(resAcc);
|
||||
field_0x2060.build(resAcc);
|
||||
|
||||
mPinIconAggregate.build(resAcc);
|
||||
mPutIcon.build(resAcc);
|
||||
@@ -2182,20 +2235,149 @@ void dLytMapMain_c::build() {
|
||||
field_0x825C[i - 21] = b;
|
||||
}
|
||||
|
||||
field_0x832C[i].init(b, 0x02, 2, 0);
|
||||
dCsMgr_c::GetInstance()->registCursorTarget(&field_0x832C[i]);
|
||||
mHitChecks[i].init(b, 0x02, 2, 0);
|
||||
dCsMgr_c::GetInstance()->registCursorTarget(&mHitChecks[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(sBoundingNames); i++) {
|
||||
field_0x832C[i].resetCachedHitboxes();
|
||||
field_0x832C[i].execute();
|
||||
mHitChecks[i].resetCachedHitboxes();
|
||||
mHitChecks[i].execute();
|
||||
}
|
||||
|
||||
mpMapBounding = mLyt.findBounding("B_map_00");
|
||||
mpMapBounding->SetScale(mVec2_c(1.0f, 1.0f));
|
||||
nw4r::lyt::Size t(1.0f, 1.0f);
|
||||
mpMapBounding->SetSize(t);
|
||||
mVec3_c boundingPos = mpMapBounding->GetTranslate();
|
||||
mVec2_c boundingPos2 = mVec2_c(boundingPos.x, boundingPos.y);
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
global->setField_0x20(boundingPos2);
|
||||
|
||||
mMapCapture.setPicture(mLyt.findPicture("P_map_00"));
|
||||
nw4r::lyt::Pane *limitBounding = mLyt.findPane("B_limit_00");
|
||||
const nw4r::lyt::Size &sz = limitBounding->GetSize();
|
||||
field_0x8D30.x = sz.width - 1.0f;
|
||||
field_0x8D30.y = sz.height - 1.0f;
|
||||
field_0x8D38.x = sz.width;
|
||||
field_0x8D38.y = sz.height;
|
||||
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");
|
||||
mpWakuWindow = mLyt.getWindow("W_waku_01");
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(sPaneNames); i++) {
|
||||
if (sPaneNames[i] != nullptr) {
|
||||
mpPanes[i] = mLyt.findPane(sPaneNames[i]);
|
||||
} else {
|
||||
mpPanes[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(sPaneNamesUnk1); i++) {
|
||||
if (sPaneNamesUnk1[i] != nullptr) {
|
||||
mpUnkPanes1[i] = mLyt.findPane(sPaneNamesUnk1[i]);
|
||||
} else {
|
||||
mpUnkPanes1[i] = nullptr;
|
||||
}
|
||||
|
||||
if (sPaneNamesUnk2[i] != nullptr) {
|
||||
mpUnkPanes2[i] = mLyt.findPane(sPaneNamesUnk2[i]);
|
||||
} else {
|
||||
mpUnkPanes2[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
mpNumberTextBox = mLyt.getTextBox("T_number_00");
|
||||
mpNumberTextBoxS = mLyt.getTextBox("T_numberS_00");
|
||||
mpZoomInOutPane = mLyt.findPane("N_zoomInOut_00");
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(sPriorityGroupNames); i++) {
|
||||
mpPriorityGroups[i] = mLyt.findGroupByName(sPriorityGroupNames[i]);
|
||||
}
|
||||
|
||||
// TODO
|
||||
((mVec2_c*)(_0x2070 + 0x6E4))->set(boundingPos2.x, boundingPos2.y);
|
||||
|
||||
mPinIconAggregate.setUnk(&field_0xF1C);
|
||||
|
||||
mpPaneBgAll01 = mLyt.findPane("N_mapBgAll_01");
|
||||
mpPaneBgAll02 = mLyt.findPane("N_mapBgAll_02");
|
||||
mpPaneAll01 = mLyt.findPane("N_mapAll_01");
|
||||
mpPaneAll02 = mLyt.findPane("N_mapAll_02");
|
||||
field_0x8928.x = mpPaneBgAll01->GetGlobalMtx()._03;
|
||||
field_0x8928.y = mpPaneBgAll01->GetGlobalMtx()._13;
|
||||
mpPaneRotate00 = mLyt.findPane("N_rotateP_00");
|
||||
mpPaneRotate01 = mLyt.findPane("N_rotateP_01");
|
||||
|
||||
nw4r::lyt::Pane *bgAll = mLyt.findPane("N_mapBgAll_00");
|
||||
|
||||
mVec2_c v1(bgAll->GetGlobalMtx()._03, bgAll->GetGlobalMtx()._13);
|
||||
mVec2_c tmp = v1 - global->getField_0x20();
|
||||
global->setField_0x0C(tmp);
|
||||
|
||||
field_0x8C88 = mAnmGroups[MAP_MAIN_ANIM_IN].getFrameCtrl()->mEndFrame - 1.0f;
|
||||
mAnmGroups[MAP_MAIN_ANIM_IN].unbind();
|
||||
|
||||
mAnmGroups[MAP_MAIN_ANIM_OUT].bind(false);
|
||||
field_0x8C8C = mAnmGroups[MAP_MAIN_ANIM_OUT].getLastFrame();
|
||||
mAnmGroups[MAP_MAIN_ANIM_OUT].unbind();
|
||||
field_0x8CAC = 0;
|
||||
field_0x8DB8 = getMaxBeaconCount();
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
getGlobal()->setFloor(0);
|
||||
mNavEnabled = false;
|
||||
field_0x8D58 = 0;
|
||||
field_0x8D5C = 1;
|
||||
field_0x8D60 = 0;
|
||||
field_0x8D64 = 0;
|
||||
fn_80143300();
|
||||
}
|
||||
|
||||
void dLytMapMain_c::draw() {}
|
||||
void dLytMapMain_c::draw() {
|
||||
if (!field_0x8DBF) {
|
||||
return;
|
||||
}
|
||||
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
fn_80143120(1);
|
||||
mLyt.draw();
|
||||
if (shouldDrawFootprints() && field_0x8D58 == global->getFloor()) {
|
||||
mFootPrints.draw();
|
||||
}
|
||||
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE || mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM || mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE || mNextMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
field_0x2060.draw();
|
||||
}
|
||||
|
||||
if (field_0x8C68 != 3 && field_0x8C68 != 5 && field_0x8C94 != 2) {
|
||||
mPinIconAggregate.draw();
|
||||
}
|
||||
|
||||
fn_80143120(0);
|
||||
|
||||
if ((mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE || mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) && (mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE || mNextMapMode == dLytMapGlobal_c::MAPMODE_ZOOM)) {
|
||||
mpZoomInOutPane->SetVisible(false);
|
||||
} else {
|
||||
mpZoomInOutPane->SetVisible(true);
|
||||
}
|
||||
|
||||
mpScaleFlamePane->SetVisible(field_0x8DB5 ? true : false);
|
||||
mLyt.getLayout()->GetRootPane()->Draw(mLyt.getDrawInfo());
|
||||
if ((mCurrentMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE || mNextMapMode == dLytMapGlobal_c::MAPMODE_PROVINCE) && field_0x8C94 == 10) {
|
||||
fn_80138D80();
|
||||
}
|
||||
fn_80143120(-2);
|
||||
field_0x2060.fn_80189B90();
|
||||
mPutIcon.draw();
|
||||
if (field_0x8C94 == 10) {
|
||||
mPopupInfo.draw();
|
||||
}
|
||||
|
||||
if (*mStateMgr.getStateID() == StateID_EventSaveObjSelect) {
|
||||
mSavePopup.draw();
|
||||
}
|
||||
mSaveCaption.draw();
|
||||
}
|
||||
|
||||
void dLytMap_c::build() {
|
||||
d2d::setLytAllocator();
|
||||
@@ -2215,8 +2397,8 @@ void lytMapusesSizedWString() {
|
||||
void dLytMapMain_c::saveUnkMapData() {
|
||||
dMapSavedDataEntry &data = sSavedMapData.entries[field_0x8C68];
|
||||
data.field_0x06 = 1;
|
||||
data.mapMode = field_0x8CA4;
|
||||
data.mapUpDirection = field_0x8C90;
|
||||
data.mapMode = mCurrentMapMode;
|
||||
data.mapUpDirection = mMapUpDirection;
|
||||
data.field_0x05 = field_0x8C92;
|
||||
sSavedMapData.islandNamesOn = mIslandNamesOn;
|
||||
}
|
||||
@@ -2232,8 +2414,8 @@ void dLytMapMain_c::initUnkMapData() {
|
||||
}
|
||||
|
||||
void dLytMapMain_c::loadUnkMapData() {
|
||||
field_0x8CA4 = sSavedMapData.entries[field_0x8C68].mapMode;
|
||||
field_0x8C90 = sSavedMapData.entries[field_0x8C68].mapUpDirection;
|
||||
mCurrentMapMode = sSavedMapData.entries[field_0x8C68].mapMode;
|
||||
mMapUpDirection = sSavedMapData.entries[field_0x8C68].mapUpDirection;
|
||||
field_0x8C92 = sSavedMapData.entries[field_0x8C68].field_0x05;
|
||||
mIslandNamesOn = sSavedMapData.islandNamesOn;
|
||||
}
|
||||
@@ -2258,8 +2440,8 @@ void dLytMapMain_c::executeState_Active() {
|
||||
}
|
||||
|
||||
// TODO figure out and double check numbers
|
||||
if (field_0x8C68 == 4 && field_0x8CA4 == dLytMapGlobal_c::MAPMODE_STAGE &&
|
||||
field_0x8CA8 == dLytMapGlobal_c::MAPMODE_STAGE && dPad::getDownTrigZ()) {
|
||||
if (field_0x8C68 == 4 && mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE &&
|
||||
mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE && dPad::getDownTrigZ()) {
|
||||
if (mIslandNamesOn) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_ISLAND_NAME_OFF);
|
||||
} else {
|
||||
@@ -2270,7 +2452,7 @@ void dLytMapMain_c::executeState_Active() {
|
||||
}
|
||||
checkScroll();
|
||||
|
||||
if (needsNav(field_0x8CA4) && needsNav(field_0x8CA8)) {
|
||||
if (needsNav(mCurrentMapMode) && needsNav(mNextMapMode)) {
|
||||
if (!mNavEnabled) {
|
||||
dPadNav::setNavEnabled(true, false);
|
||||
mNavEnabled = true;
|
||||
@@ -2288,7 +2470,7 @@ void dLytMapMain_c::executeState_Active() {
|
||||
}
|
||||
}
|
||||
|
||||
if (field_0x8CA4 == dLytMapGlobal_c::MAPMODE_STAGE && field_0x8CA8 == dLytMapGlobal_c::MAPMODE_STAGE &&
|
||||
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();
|
||||
@@ -2316,18 +2498,20 @@ void dLytMapMain_c::executeState_Active() {
|
||||
setBeaconPositionChecked(&pos3d, id);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_BEACON_SET);
|
||||
}
|
||||
} else if ((dPad::getDownTrigLeft() && canZoomOut(field_0x8CA4)) ||
|
||||
(dPad::getDownTrigA() && field_0x8CA4 == dLytMapGlobal_c::MAPMODE_ZOOM && canZoomOut(field_0x8CA4))) {
|
||||
} else if ((dPad::getDownTrigLeft() && canZoomOut(mCurrentMapMode)) ||
|
||||
(dPad::getDownTrigA() && mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM && canZoomOut(mCurrentMapMode)
|
||||
)) {
|
||||
zoomOut();
|
||||
} else if ((dPad::getDownTrigRight() && canZoomIn(field_0x8CA4)) ||
|
||||
(dPad::getDownTrigA() && field_0x8CA4 == dLytMapGlobal_c::MAPMODE_STAGE && canZoomIn(field_0x8CA4))) {
|
||||
} else if ((dPad::getDownTrigRight() && canZoomIn(mCurrentMapMode)) ||
|
||||
(dPad::getDownTrigA() && mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE && canZoomIn(mCurrentMapMode)
|
||||
)) {
|
||||
zoomIn();
|
||||
} else if ((field_0x8C68 == dLytMapGlobal_c::MAPMODE_WORLD || field_0x8C68 == dLytMapGlobal_c::MAPMODE_PROVINCE ||
|
||||
field_0x8C68 == dLytMapGlobal_c::MAPMODE_WORLD_SKY || field_0x8C68 == dLytMapGlobal_c::MAPMODE_ZOOM) &&
|
||||
canResetPosition(field_0x8CA4, field_0x8C90) && dPad::getDownTrigUp()) {
|
||||
canResetPosition(mCurrentMapMode, mMapUpDirection) && dPad::getDownTrigUp()) {
|
||||
mVec3_c pos;
|
||||
fn_80142F00(pos, field_0x8CA4, field_0x8C90, global->getMapRotationCenter(), global->getField_0x56());
|
||||
f32 distSq = global->getField_0x00().squareDistanceToXZ(pos);
|
||||
fn_80142F00(pos, mCurrentMapMode, mMapUpDirection, global->getMapRotationCenter(), global->getField_0x56());
|
||||
f32 distSq = global->getMapScroll().squareDistanceToXZ(pos);
|
||||
if (field_0x8D58 != global->getFloor()) {
|
||||
mFloorBtnMgr.resetFloor(-(field_0x8D58 - field_0x8D60));
|
||||
global->setFloor(field_0x8D58);
|
||||
@@ -2337,42 +2521,297 @@ void dLytMapMain_c::executeState_Active() {
|
||||
} else {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_RESET_NOT_MOVE);
|
||||
}
|
||||
} else if (canChangeUpDirection(field_0x8CA4, field_0x8C90) && dPad::getDownTrigZ()) {
|
||||
} else if (canChangeUpDirection(mCurrentMapMode, mMapUpDirection) && dPad::getDownTrigZ()) {
|
||||
mStateMgr.changeState(StateID_ChgMapUpDirection);
|
||||
}
|
||||
|
||||
if ((field_0x8CA4 == dLytMapGlobal_c::MAPMODE_STAGE && field_0x8CA8 == dLytMapGlobal_c::MAPMODE_STAGE) ||
|
||||
(field_0x8CA4 == dLytMapGlobal_c::MAPMODE_ZOOM && field_0x8CA8 == dLytMapGlobal_c::MAPMODE_ZOOM)) {
|
||||
if ((mCurrentMapMode == dLytMapGlobal_c::MAPMODE_STAGE && mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) ||
|
||||
(mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM && mNextMapMode == dLytMapGlobal_c::MAPMODE_ZOOM)) {
|
||||
field_0xF1C.field_0x05 = true;
|
||||
}
|
||||
|
||||
mPinIconAggregate.execute();
|
||||
|
||||
for (int idx = 0; idx < (int)ARRAY_LENGTH(field_0x832C); idx++) {
|
||||
field_0x832C[idx].resetCachedHitboxes();
|
||||
field_0x832C[idx].execute();
|
||||
for (int idx = 0; idx < (int)ARRAY_LENGTH(mHitChecks); idx++) {
|
||||
mHitChecks[idx].resetCachedHitboxes();
|
||||
mHitChecks[idx].execute();
|
||||
}
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_Active() {}
|
||||
void dLytMapMain_c::finalizeState_Active() {
|
||||
field_0x8DB5 = false;
|
||||
}
|
||||
|
||||
void dLytMapMain_c::initializeState_Out() {}
|
||||
void dLytMapMain_c::executeState_Out() {}
|
||||
void dLytMapMain_c::initializeState_Out() {
|
||||
if (field_0x8C94 == 10) {
|
||||
mPopupInfo.mStateMgr.changeState(StateID_Out);
|
||||
}
|
||||
dLytMeter_c::GetInstance()->setMeterField_0x13750(0);
|
||||
if (field_0x8CAD || field_0x8C94 == 3) {
|
||||
mpOutAnmGroup = &mAnmGroups[MAP_MAIN_ANIM_OUT];
|
||||
} else {
|
||||
mpOutAnmGroup = &mAnmGroups[MAP_MAIN_ANIM_OUT_NO_CAM];
|
||||
}
|
||||
|
||||
mpOutAnmGroup->bind(false);
|
||||
mpOutAnmGroup->setFrame(0.0f);
|
||||
field_0x8C8C = mpOutAnmGroup->getLastFrame();
|
||||
|
||||
if (fn_80141530()) {
|
||||
dBase_c::s_NextExecuteControlFlags &= ~dBase_c::BASE_PROP_0x10;
|
||||
}
|
||||
|
||||
dPadNav::setNavEnabled(false, false);
|
||||
}
|
||||
void dLytMapMain_c::executeState_Out() {
|
||||
if (mpOutAnmGroup->isEndReached()) {
|
||||
bool specialMode = isSomeFieldEq0Or1Or7Or9Or11();
|
||||
// Kind of a weird way to write `specialMode || ... != 3 `
|
||||
if ((specialMode && dScGame_c::getCamera(0)->getField_0xDA8() != 3) || !specialMode) {
|
||||
dBase_c::s_NextExecuteControlFlags &= ~dBase_c::BASE_PROP_0x10;
|
||||
mLyt.calc();
|
||||
mpOutAnmGroup->unbind();
|
||||
field_0x8DBF = 0;
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
}
|
||||
}
|
||||
|
||||
if (mpOutAnmGroup->isBound()) {
|
||||
mpOutAnmGroup->play();
|
||||
}
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_Out() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_FloorChange() {}
|
||||
void dLytMapMain_c::executeState_FloorChange() {}
|
||||
void dLytMapMain_c::initializeState_FloorChange() {
|
||||
mMapCapture.renderRequest();
|
||||
}
|
||||
void dLytMapMain_c::executeState_FloorChange() {
|
||||
if (!mMapCapture.isBusyRendering()) {
|
||||
mStateMgr.changeState(StateID_Active);
|
||||
dPadNav::stopFSStickNav();
|
||||
}
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_FloorChange() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_ChgMapUpDirection() {}
|
||||
void dLytMapMain_c::executeState_ChgMapUpDirection() {}
|
||||
void dLytMapMain_c::initializeState_ChgMapUpDirection() {
|
||||
mNextMapUpDirection = !mMapUpDirection;
|
||||
field_0x8D44 = getGlobal()->getMapRotation();
|
||||
|
||||
if (field_0x8C94 == 3) {
|
||||
field_0x8D46 = dAcPy_c::GetLink()->mRotation.y + mAng(0x8000);
|
||||
mNextMapUpDirection = false;
|
||||
} else {
|
||||
fn_80142D10(mCurrentMapMode, mNextMapUpDirection, field_0x8D46);
|
||||
}
|
||||
(void)getGlobal();
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
mPlayerPos = global->getPlayerPos();
|
||||
mVec2_c v(0.0f, 0.0f);
|
||||
global->unprojectFromMap(mMapScroll, v, field_0x8D44);
|
||||
global->setMapRotationCenter(mPlayerPos);
|
||||
const mVec3_c ¢er = global->getMapRotationCenter();
|
||||
fn_80143060(mPlayerPos, mPlayerPos, center, field_0x8D46);
|
||||
fn_80143060(mMapScroll, mMapScroll, center, field_0x8D44);
|
||||
global->setMapScroll(mMapScroll);
|
||||
field_0x8C70 = 0;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_CHANGE_DIRECT);
|
||||
}
|
||||
void dLytMapMain_c::executeState_ChgMapUpDirection() {
|
||||
if (field_0x8C94 == 3 && field_0x8D6A) {
|
||||
fn_80140B90();
|
||||
} else {
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
f32 factor = cLib::easeOut((f32)field_0x8C70 / sHio.field_0x1B, 2.0f);
|
||||
|
||||
// Lerps
|
||||
|
||||
// TODO stack and reg swaps
|
||||
global->setMapRotation(factor * mAng(field_0x8D46 - field_0x8D44) + field_0x8D44);
|
||||
|
||||
mVec3_c actualPos = (mPlayerPos - mMapScroll) * factor + mMapScroll;
|
||||
global->setMapScroll(actualPos);
|
||||
|
||||
if (field_0x8C70 >= sHio.field_0x1B) {
|
||||
mLyt.calc();
|
||||
mMapUpDirection = mNextMapUpDirection;
|
||||
if (field_0x8C94 == 3) {
|
||||
mStateMgr.changeState(StateID_EventMapIntro_Step4);
|
||||
} else {
|
||||
mStateMgr.changeState(StateID_Active);
|
||||
}
|
||||
} else {
|
||||
field_0x8C70++;
|
||||
}
|
||||
|
||||
if (field_0x8C94 == 3) {
|
||||
EventManager::execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_ChgMapUpDirection() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_ChgDispAreaMode_MapRot() {}
|
||||
void dLytMapMain_c::executeState_ChgDispAreaMode_MapRot() {}
|
||||
void dLytMapMain_c::initializeState_ChgDispAreaMode_MapRot() {
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
mMapScroll = global->getMapScroll();
|
||||
field_0x8D50 = global->getField_0x44();
|
||||
field_0x8D44 = global->getMapRotation();
|
||||
|
||||
field_0x8D4C = fn_80142D90(mNextMapMode);
|
||||
if (field_0x8C94 == 3) {
|
||||
field_0x8D46 = dAcPy_c::GetLink()->mRotation.y + mAng(0x8000);
|
||||
mNextMapUpDirection = false;
|
||||
} else {
|
||||
mNextMapUpDirection = fn_80142D10(mNextMapMode, mNextMapUpDirection, field_0x8D46);
|
||||
}
|
||||
|
||||
fn_80142F00(mPlayerPos, mNextMapMode, mNextMapUpDirection, global->getMapRotationCenter(), global->getField_0x56());
|
||||
field_0x8C70 = 0;
|
||||
|
||||
if (mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
global->setZoomFrame(1.0f);
|
||||
global->setField_0x58(field_0x8D50 / field_0x8D4C);
|
||||
} else {
|
||||
global->setZoomFrame(0.0f);
|
||||
global->setField_0x58(1.0f);
|
||||
}
|
||||
|
||||
if (mNextMapMode == dLytMapGlobal_c::MAPMODE_ZOOM && !mNextMapUpDirection) {
|
||||
mVec2_c v(0.0f, 0.0f);
|
||||
global->unprojectFromMap(mMapScroll, v, field_0x8D44);
|
||||
mVec3_c v2 = mPlayerPos;
|
||||
global->setMapRotationCenter(v2);
|
||||
dLytMapGlobal_c *global2 = getGlobal();
|
||||
const mVec3_c ¢er = global2->getMapRotationCenter();
|
||||
fn_80143060(mPlayerPos, v2, center, field_0x8D46);
|
||||
mVec3_c v3 = mMapScroll;
|
||||
fn_80143060(mMapScroll, v3, center, field_0x8D44);
|
||||
mVec3_c v4 = mMapScroll;
|
||||
global2->setMapScroll(v4);
|
||||
} else {
|
||||
mVec2_c v(0.0f, 0.0f);
|
||||
global->unprojectFromMap(mMapScroll, v, field_0x8D44);
|
||||
if (mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
mPlayerPos = field_0x8CC4;
|
||||
} else {
|
||||
mPlayerPos = global->getPlayerPos();
|
||||
}
|
||||
|
||||
global->setMapRotationCenter(mMapScroll);
|
||||
mVec3_c v2 = mPlayerPos;
|
||||
dLytMapGlobal_c *global2 = getGlobal();
|
||||
const mVec3_c ¢er = global2->getMapRotationCenter();
|
||||
fn_80143060(mPlayerPos, v2, center, field_0x8D46);
|
||||
mVec3_c v3 = mMapScroll;
|
||||
fn_80143060(mMapScroll, v3, center, field_0x8D44);
|
||||
mVec3_c v4 = mMapScroll;
|
||||
global2->setMapScroll(v4);
|
||||
}
|
||||
|
||||
mAnmGroups[MAP_MAIN_ANIM_ROTATE].bind(false);
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
mAnmGroups[MAP_MAIN_ANIM_ROTATE].setFrame(0.0f);
|
||||
} else {
|
||||
mAnmGroups[MAP_MAIN_ANIM_ROTATE].setToEnd();
|
||||
}
|
||||
if (mNextMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
field_0x2060.setIslandNamesOn(false);
|
||||
}
|
||||
if (mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
field_0x2060.setIslandNamesOn(mIslandNamesOn);
|
||||
}
|
||||
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM && mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
mVec2_c v(global->getField_0x20().x, global->getField_0x20().y);
|
||||
global->unprojectFromMap(field_0x8CF4, v);
|
||||
}
|
||||
}
|
||||
void dLytMapMain_c::executeState_ChgDispAreaMode_MapRot() {
|
||||
if (field_0x8C94 == 3 && field_0x8D6A) {
|
||||
fn_80140B90();
|
||||
} else {
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
f32 f1 = (f32)field_0x8C70 / sHio.field_0x1B;
|
||||
f32 factor = cLib::easeInOut(f1, 2.0f);
|
||||
|
||||
f32 f2, f3;
|
||||
if (mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
f32 ratio = field_0x8D50 / field_0x8D4C;
|
||||
f1 = 1.0f - f1;
|
||||
f2 = ratio + (1.0f - ratio) * factor;
|
||||
f3 = 1.0f - factor;
|
||||
} else {
|
||||
f32 ratio = field_0x8D4C / field_0x8D50;
|
||||
f2 = ratio + (1.0f - ratio) * (1.0f - factor);
|
||||
f3 = factor;
|
||||
}
|
||||
global->setZoomFrame(f1);
|
||||
global->setField_0x58(f2);
|
||||
|
||||
// TODO - there is tons of dead code here
|
||||
|
||||
// Lerps
|
||||
f32 f4 = field_0x8D50 + factor * (field_0x8D4C - field_0x8D50);
|
||||
global->setField_0x44(f4);
|
||||
|
||||
// TODO stack and reg swaps
|
||||
global->setMapRotation(factor * mAng(field_0x8D46 - field_0x8D44) + field_0x8D44);
|
||||
|
||||
mVec3_c actualPos;
|
||||
if (mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
actualPos = (mPlayerPos - mMapScroll) * (1.0f - factor) * (1.0f / (f4 / field_0x8D50)) + mMapScroll;
|
||||
} else {
|
||||
actualPos = (mPlayerPos - mMapScroll) * (1.0f - factor) * (1.0f / (f4 / field_0x8D50)) + mMapScroll;
|
||||
}
|
||||
|
||||
global->setMapScroll(actualPos);
|
||||
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM && mNextMapMode == dLytMapGlobal_c::MAPMODE_STAGE) {
|
||||
fn_8013FB70(field_0x8CF4, f4 / field_0x8D50);
|
||||
field_0x8DB5 = true;
|
||||
}
|
||||
|
||||
// TODO dead code
|
||||
f32 length = mAnmGroups[MAP_MAIN_ANIM_ROTATE].getLastFrame();
|
||||
mAnmGroups[MAP_MAIN_ANIM_ROTATE].setFrame(length - f3 * length);
|
||||
|
||||
if (field_0x8C70 >= sHio.field_0x1C) {
|
||||
if (field_0x8C94 == 3 && field_0x0108 > 0) {
|
||||
field_0x0108--;
|
||||
} else {
|
||||
field_0x8DB5 = false;
|
||||
if (mCurrentMapMode == dLytMapGlobal_c::MAPMODE_ZOOM) {
|
||||
mAnmGroups[MAP_MAIN_ANIM_ROTATE].setToEnd();
|
||||
} else {
|
||||
mAnmGroups[MAP_MAIN_ANIM_ROTATE].setFrame(0.0f);
|
||||
}
|
||||
mLyt.calc();
|
||||
mAnmGroups[MAP_MAIN_ANIM_ROTATE].unbind();
|
||||
field_0x8DB5 = false;
|
||||
mMapUpDirection = mNextMapUpDirection;
|
||||
global->setMapRotation(field_0x8D46);
|
||||
global->setField_0x44(field_0x8D4C);
|
||||
global->setMapScroll(mPlayerPos);
|
||||
|
||||
if (field_0x8C94 == 3) {
|
||||
mStateMgr.changeState(StateID_EventMapIntro_Step4);
|
||||
} else {
|
||||
mStateMgr.changeState(StateID_Active);
|
||||
mCurrentMapMode = mNextMapMode;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
field_0x8C70++;
|
||||
}
|
||||
if (field_0x8C94 == 3) {
|
||||
EventManager::execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_ChgDispAreaMode_MapRot() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_ChgDispAreaMode_Map() {}
|
||||
void dLytMapMain_c::executeState_ChgDispAreaMode_Map() {}
|
||||
void dLytMapMain_c::executeState_ChgDispAreaMode_Map() {
|
||||
// Won't attempt this until the dead code in executeState_ChgDispAreaMode_MapRot is solved
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_ChgDispAreaMode_Map() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_ChgDispAreaMode_WA() {}
|
||||
@@ -2383,8 +2822,27 @@ void dLytMapMain_c::initializeState_ChgDispAreaMode_CsrRot() {}
|
||||
void dLytMapMain_c::executeState_ChgDispAreaMode_CsrRot() {}
|
||||
void dLytMapMain_c::finalizeState_ChgDispAreaMode_CsrRot() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_ResetPos() {}
|
||||
void dLytMapMain_c::executeState_ResetPos() {}
|
||||
void dLytMapMain_c::initializeState_ResetPos() {
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
field_0x8C70 = 0;
|
||||
mMapScroll = global->getMapScroll();
|
||||
fn_80142F00(mPlayerPos, mCurrentMapMode, mMapUpDirection, global->getMapRotationCenter(), global->getField_0x56());
|
||||
field_0x8C70 = 0;
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_RESET_START);
|
||||
}
|
||||
void dLytMapMain_c::executeState_ResetPos() {
|
||||
dLytMapGlobal_c *global = getGlobal();
|
||||
f32 factor = cLib::easeOut((f32)field_0x8C70 / sHio.field_0x1A, 2.0f);
|
||||
mVec3_c pos = (mPlayerPos - mMapScroll) * factor + mMapScroll;
|
||||
global->setMapScroll(pos);
|
||||
dSndSmallEffectMgr_c::GetInstance()->holdSound(SE_S_MAP_RESET_LV);
|
||||
if (field_0x8C70 >= sHio.field_0x1A) {
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_RESET_END);
|
||||
mStateMgr.changeState(StateID_Active);
|
||||
} else {
|
||||
field_0x8C70++;
|
||||
}
|
||||
}
|
||||
void dLytMapMain_c::finalizeState_ResetPos() {}
|
||||
|
||||
void dLytMapMain_c::initializeState_ResetPosWithFloorChange() {}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
dLytMapGlobal_c *dLytMapGlobal_c::sInstance;
|
||||
|
||||
dLytMapGlobal_c::dLytMapGlobal_c()
|
||||
: field_0x00(0.0f, 0.0f, 0.0f),
|
||||
: 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),
|
||||
@@ -23,7 +23,7 @@ dLytMapGlobal_c::dLytMapGlobal_c()
|
||||
}
|
||||
|
||||
void dLytMapGlobal_c::projectOntoMap(
|
||||
mVec2_c &result, const mVec3_c &position, const mVec3_c &v1, const mVec3_c &mapRotationCenter, const mAng &rot,
|
||||
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...
|
||||
@@ -34,8 +34,8 @@ void dLytMapGlobal_c::projectOntoMap(
|
||||
work.y = 0.0f;
|
||||
work.rotY(-rot);
|
||||
|
||||
work.x += mapRotationCenter.x - v1.x;
|
||||
work.z += mapRotationCenter.z - v1.z;
|
||||
work.x += mapRotationCenter.x - mapScroll.x;
|
||||
work.z += mapRotationCenter.z - mapScroll.z;
|
||||
|
||||
work.x *= f2 * f1;
|
||||
work.z *= f2 * f1;
|
||||
@@ -46,17 +46,17 @@ void dLytMapGlobal_c::projectOntoMap(
|
||||
}
|
||||
|
||||
void dLytMapGlobal_c::projectOntoMap(mVec2_c &result, const mVec3_c &position) const {
|
||||
projectOntoMap(result, position, field_0x00, mMapRotationCenter, mMapRotation, field_0x44, field_0x40);
|
||||
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, field_0x00, mMapRotationCenter, mMapRotation, field_0x44, field_0x40
|
||||
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, field_0x00, mMapRotationCenter, rot, field_0x44, field_0x40);
|
||||
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)
|
||||
@@ -65,7 +65,7 @@ void dLytMapGlobal_c::unprojectFromMap(mVec3_c &result, const mVec2_c &position,
|
||||
}
|
||||
|
||||
void dLytMapGlobal_c::unprojectFromMap(
|
||||
mVec3_c &result, const mVec2_c &position, const mVec2_c &v1, const mVec3_c &v2, const mVec3_c &mapRotationCenter,
|
||||
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);
|
||||
@@ -77,7 +77,7 @@ void dLytMapGlobal_c::unprojectFromMap(
|
||||
work.x = diff.x * tmp * (1.0f / field_0x28.x);
|
||||
work.z = -diff.y * tmp;
|
||||
|
||||
work = work + v2;
|
||||
work = work + mapScroll;
|
||||
|
||||
work = work - mapRotationCenter;
|
||||
work.rotY(rot);
|
||||
|
||||
Reference in New Issue
Block a user