d_cs_base OK

This commit is contained in:
robojumper
2025-07-26 19:27:34 +02:00
parent 58866f517f
commit d8bd55a872
11 changed files with 133 additions and 78 deletions
+35 -35
View File
@@ -10404,8 +10404,8 @@ getFSStickDirectionTrig__7dPadNavFv = .text:0x80194350; // type:function size:0x
getFSStickDirection__7dPadNavFv = .text:0x801944C0; // type:function size:0xB0
stopFSStickNav__7dPadNavFv = .text:0x80194570; // type:function size:0x14
hidePointer__7dPadNavFv = .text:0x80194590; // type:function size:0xC
offUnkCursorRelated__7dPadNavFv = .text:0x801945A0; // type:function size:0xC
onUnkCursorRelated__7dPadNavFv = .text:0x801945B0; // type:function size:0xC
setCursorStickInvisible__7dPadNavFv = .text:0x801945A0; // type:function size:0xC
setCursorStickVisible__7dPadNavFv = .text:0x801945B0; // type:function size:0xC
checkForNavLeftGesture__7dPadNavFv = .text:0x801945C0; // type:function size:0x84
checkForNavRightGesture__7dPadNavFv = .text:0x80194650; // type:function size:0x84
scrollRelated__7dPadNavFv = .text:0x801946E0; // type:function size:0x14
@@ -11237,10 +11237,10 @@ superID__30sFStateVirtualID_c<9dScGame_c>CFv = .text:0x801BC550; // type:functio
isSameName__23sFStateID_c<9dScGame_c>CFPCc = .text:0x801BC630; // type:function size:0x88
dCsBase_c_classInit__Fv = .text:0x801BC6C0; // type:function size:0x30
__ct__9dCsBase_cFv = .text:0x801BC6F0; // type:function size:0x1AC
__dt__30sFState_c<17dLytCursorStick_c>Fv = .text:0x801BC8A0; // type:function size:0x58
__dt__33sFStateFct_c<17dLytCursorStick_c>Fv = .text:0x801BC900; // type:function size:0x6C
__dt__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BC970; // type:function size:0xA0
__dt__56sFStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c>Fv = .text:0x801BCA10; // type:function size:0xA4
__dt__30sFState_c<17dLytCursorStick_c>Fv = .text:0x801BC8A0; // type:function size:0x58 scope:weak
__dt__33sFStateFct_c<17dLytCursorStick_c>Fv = .text:0x801BC900; // type:function size:0x6C scope:weak
__dt__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BC970; // type:function size:0xA0 scope:weak
__dt__56sFStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c>Fv = .text:0x801BCA10; // type:function size:0xA4 scope:weak
__dt__9dCsBase_cFv = .text:0x801BCAC0; // type:function size:0x158
create__9dCsBase_cFv = .text:0x801BCC20; // type:function size:0x104
doDelete__9dCsBase_cFv = .text:0x801BCD30; // type:function size:0x44
@@ -11249,18 +11249,18 @@ draw__9dCsBase_cFv = .text:0x801BCF70; // type:function size:0xB0
setCurrentLyt__9dCsBase_cFi = .text:0x801BD020; // type:function size:0x14
update__9dCsBase_cFv = .text:0x801BD040; // type:function size:0x10
drawDirectly__9dCsBase_cFv = .text:0x801BD050; // type:function size:0xBC
build__33sFStateFct_c<17dLytCursorStick_c>FRC12sStateIDIf_c = .text:0x801BD110; // type:function size:0x60
dispose__33sFStateFct_c<17dLytCursorStick_c>FRP10sStateIf_c = .text:0x801BD170; // type:function size:0xC
initialize__30sFState_c<17dLytCursorStick_c>Fv = .text:0x801BD180; // type:function size:0x1C
execute__30sFState_c<17dLytCursorStick_c>Fv = .text:0x801BD1A0; // type:function size:0x1C
finalize__30sFState_c<17dLytCursorStick_c>Fv = .text:0x801BD1C0; // type:function size:0x1C
initializeState__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BD1E0; // type:function size:0x10
finalizeState__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BD1F0; // type:function size:0x10
refreshState__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BD200; // type:function size:0x10
getState__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801BD210; // type:function size:0x10
getNewStateID__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801BD220; // type:function size:0x10
getStateID__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801BD230; // type:function size:0x10
getOldStateID__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801BD240; // type:function size:0x10
build__33sFStateFct_c<17dLytCursorStick_c>FRC12sStateIDIf_c = .text:0x801BD110; // type:function size:0x60 scope:weak
dispose__33sFStateFct_c<17dLytCursorStick_c>FRP10sStateIf_c = .text:0x801BD170; // type:function size:0xC scope:weak
initialize__30sFState_c<17dLytCursorStick_c>Fv = .text:0x801BD180; // type:function size:0x1C scope:weak
execute__30sFState_c<17dLytCursorStick_c>Fv = .text:0x801BD1A0; // type:function size:0x1C scope:weak
finalize__30sFState_c<17dLytCursorStick_c>Fv = .text:0x801BD1C0; // type:function size:0x1C scope:weak
initializeState__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BD1E0; // type:function size:0x10 scope:weak
finalizeState__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BD1F0; // type:function size:0x10 scope:weak
refreshState__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BD200; // type:function size:0x10 scope:weak
getState__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801BD210; // type:function size:0x10 scope:weak
getNewStateID__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801BD220; // type:function size:0x10 scope:weak
getStateID__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801BD230; // type:function size:0x10 scope:weak
getOldStateID__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801BD240; // type:function size:0x10 scope:weak
dCsGame_c_classInit__Fv = .text:0x801BD250; // type:function size:0x30
__ct__13dCsGame_HIO_cFv = .text:0x801BD280; // type:function size:0x8C
__dt__13dCsGame_HIO_cFv = .text:0x801BD310; // type:function size:0x40
@@ -35535,13 +35535,13 @@ lbl_8052E774 = .data:0x8052E774; // type:object size:0x80
__vt__30sFStateVirtualID_c<9dScGame_c> = .data:0x8052E7F4; // type:object size:0x34
lbl_8052E828 = .data:0x8052E828; // type:object size:0x38
g_profile_C_BASE = .data:0x8052E860; // type:object size:0xC
lbl_8052E86C = .data:0x8052E86C; // type:object size:0x10
lbl_8052E87C = .data:0x8052E87C; // type:object size:0x10
@13263 = .data:0x8052E86C; // type:object size:0xD scope:local data:string
@13264 = .data:0x8052E87C; // type:object size:0xD scope:local data:string
__vt__9dCsBase_c = .data:0x8052E88C; // type:object size:0x4C
__vt__56sFStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c> = .data:0x8052E8D8; // type:object size:0x30
__vt__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8052E908; // type:object size:0x30
__vt__33sFStateFct_c<17dLytCursorStick_c> = .data:0x8052E938; // type:object size:0x14
__vt__30sFState_c<17dLytCursorStick_c> = .data:0x8052E950; // type:object size:0x18
__vt__56sFStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c> = .data:0x8052E8D8; // type:object size:0x30 scope:weak
__vt__86sStateMgr_c<17dLytCursorStick_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8052E908; // type:object size:0x30 scope:weak
__vt__33sFStateFct_c<17dLytCursorStick_c> = .data:0x8052E938; // type:object size:0x14 scope:weak
__vt__30sFState_c<17dLytCursorStick_c> = .data:0x8052E950; // type:object size:0x18 scope:weak
g_profile_C_GAME = .data:0x8052E968; // type:object size:0xC
lbl_8052E974 = .data:0x8052E974; // type:object size:0x10
lbl_8052E984 = .data:0x8052E984; // type:object size:0x10
@@ -39892,7 +39892,7 @@ lbl_80572D08 = .sdata:0x80572D08; // type:object size:0x4 data:4byte
lbl_80572D0C = .sdata:0x80572D0C; // type:object size:0x4 data:4byte
sIsPointerVisible__7dPadNav = .sdata:0x80572D10; // type:object size:0x1 data:byte
sPrevIsPointerVisible__7dPadNav = .sdata:0x80572D11; // type:object size:0x1 data:byte
sUnkCursorRelated__7dPadNav = .sdata:0x80572D12; // type:object size:0x1 data:byte
sIsCursorStickVisible__7dPadNav = .sdata:0x80572D12; // type:object size:0x1 data:byte
lbl_80572D18 = .sdata:0x80572D18; // type:object size:0x8
lbl_80572D20 = .sdata:0x80572D20; // type:object size:0x8
lbl_80572D28 = .sdata:0x80572D28; // type:object size:0x8
@@ -40132,10 +40132,10 @@ lbl_80573414 = .sdata:0x80573414; // type:object size:0x8
lbl_8057341C = .sdata:0x8057341C; // type:object size:0x8
lbl_80573424 = .sdata:0x80573424; // type:object size:0x8
lbl_8057342C = .sdata:0x8057342C; // type:object size:0x4
lbl_80573430 = .sdata:0x80573430; // type:object size:0x8 data:4byte
lbl_80573438 = .sdata:0x80573438; // type:object size:0x4 data:4byte
lbl_8057343C = .sdata:0x8057343C; // type:object size:0x8
lbl_80573444 = .sdata:0x80573444; // type:object size:0x4 data:string
sLytNames = .sdata:0x80573430; // type:object size:0x8 scope:local data:4byte
@13276 = .sdata:0x80573438; // type:object size:0x4 scope:local data:4byte
@13956 = .sdata:0x8057343C; // type:object size:0x7 scope:local data:string
@13957 = .sdata:0x80573444; // type:object size:0x4 scope:local data:string
lbl_80573448 = .sdata:0x80573448; // type:object size:0x8
lbl_80573450 = .sdata:0x80573450; // type:object size:0x4 data:string
lbl_80573454 = .sdata:0x80573454; // type:object size:0x8
@@ -41687,7 +41687,7 @@ sReloaderType__9dScGame_c = .sbss:0x8057579D; // type:object size:0x1 data:byte
sCopyFileBToCurrentAfterRespawn__9dScGame_c = .sbss:0x8057579E; // type:object size:0x1 data:byte
sDoSomethingWithFileAOnTransition__9dScGame_c = .sbss:0x8057579F; // type:object size:0x1 data:byte
sPreventClearingSomeFlag__9dScGame_c = .sbss:0x805757A0; // type:object size:0x1 data:byte
sInstance__9dCsBase_c = .sbss:0x805757A8; // type:object size:0x8 data:4byte
sInstance__9dCsBase_c = .sbss:0x805757A8; // type:object size:0x4 data:4byte
sInstance__9dCsGame_c = .sbss:0x805757B0; // type:object size:0x8 data:4byte
LINK2__7dAcPy_c = .sbss:0x805757B8; // type:object size:0x4 data:4byte
lbl_805757BC = .sbss:0x805757BC; // type:object size:0x1 data:byte
@@ -46740,11 +46740,11 @@ lbl_8057B594 = .sdata2:0x8057B594; // type:object size:0x4 align:4 data:float
lbl_8057B598 = .sdata2:0x8057B598; // type:object size:0x8 align:8 data:double
lbl_8057B5A0 = .sdata2:0x8057B5A0; // type:object size:0x4 align:4 data:float
lbl_8057B5A4 = .sdata2:0x8057B5A4; // type:object size:0x4 align:4 data:float
lbl_8057B5A8 = .sdata2:0x8057B5A8; // type:object size:0x4 align:4 data:float
lbl_8057B5AC = .sdata2:0x8057B5AC; // type:object size:0x4 align:4 data:float
lbl_8057B5B0 = .sdata2:0x8057B5B0; // type:object size:0x4 align:4 data:float
lbl_8057B5B4 = .sdata2:0x8057B5B4; // type:object size:0x4 align:4 data:float
lbl_8057B5B8 = .sdata2:0x8057B5B8; // type:object size:0x4 align:4 data:float
@13846 = .sdata2:0x8057B5A8; // type:object size:0x4 scope:local align:4 data:float
@13897 = .sdata2:0x8057B5AC; // type:object size:0x4 scope:local align:4 data:float
@14041 = .sdata2:0x8057B5B0; // type:object size:0x4 scope:local align:4 data:float
@14042 = .sdata2:0x8057B5B4; // type:object size:0x4 scope:local align:4 data:float
@14043 = .sdata2:0x8057B5B8; // type:object size:0x4 scope:local align:4 data:float
lbl_8057B5C0 = .sdata2:0x8057B5C0; // type:object size:0x4 align:4 data:float
lbl_8057B5C4 = .sdata2:0x8057B5C4; // type:object size:0x4 align:4 data:float
lbl_8057B5C8 = .sdata2:0x8057B5C8; // type:object size:0x4 align:4 data:float
+1 -1
View File
@@ -580,7 +580,7 @@ config.libs = [
Object(NonMatching, "d/tg/d_t_vr_box.cpp"),
Object(Matching, "d/d_sc_title.cpp"),
Object(NonMatching, "d/d_sc_game.cpp"),
Object(NonMatching, "d/d_cs_base.cpp"),
Object(Matching, "d/d_cs_base.cpp"),
Object(NonMatching, "d/d_cs_game.cpp"),
Object(NonMatching, "d/a/d_a_player.cpp"),
Object(NonMatching, "d/a/d_a_item.cpp"),
+4 -5
View File
@@ -8,6 +8,7 @@
#include "d/lyt/d_lyt_cursor_stick.h"
#include "m/m2d.h"
#include "m/m_angle.h"
#include "m/m_vec.h"
class dCsBase_c : public dCs_c {
public:
@@ -49,12 +50,10 @@ private:
/* 0x23C */ d2d::LytBase_c *mpCurrLyt;
/* 0x240 */ dCursorInterface_c mCursorIf;
/* 0x254 */ dLytCursorStick_c mCursorStick;
/* 0x6F0 */ f32 field_0x6F0;
/* 0x6F4 */ f32 field_0x6F4;
/* 0x6F8 */ f32 field_0x6F8;
/* 0x6FC */ f32 field_0x6FC;
/* 0x6F0 */ mVec2_c mCsPosition;
/* 0x6F8 */ mVec2_c mCsVelocity;
/* 0x700 */ mAng field_0x700;
/* 0x702 */ u8 field_0x702;
/* 0x702 */ u8 mAlpha;
/* 0x703 */ u8 field_0x703;
/* 0x704 */ u8 field_0x704;
/* 0x705 */ u8 field_0x705;
+4
View File
@@ -189,6 +189,10 @@ public:
return mMPLSVelocity;
}
const mVec2_c& getDpdPosScreen() const {
return mDpdPosScreen;
}
enum ExState_e {
EX_STATE_WAITING_FOR_CONNECT = 0,
EX_STATE_POST_CONNECT = 1,
+6 -3
View File
@@ -29,7 +29,7 @@ extern bool sIsMplsNavRightGesture;
extern bool sIsPointerVisible;
extern bool sPrevIsPointerVisible;
extern bool sUnkCursorRelated;
extern bool sIsCursorStickVisible;
extern s32 sFSStickDirection;
extern s32 sFSStickNavDirection;
@@ -38,6 +38,9 @@ inline bool isPointerVisible() {
return sIsPointerVisible;
}
inline bool isCursorStickVisible() {
return sIsCursorStickVisible;
}
void init();
void calc();
@@ -50,8 +53,8 @@ s32 getFSStickDirectionTrig();
void stopFSStickNav();
void hidePointer();
void offUnkCursorRelated();
void onUnkCursorRelated();
void setCursorStickInvisible();
void setCursorStickVisible();
// Not sure what this does. Related to Deposit
// and Seeker Stone scrolling
+4
View File
@@ -25,6 +25,10 @@ public:
bool setPriority(u8 priority);
void setTargetPane(nw4r::lyt::Pane *pane);
void setShouldBeOn(bool value) {
mShouldBeOn = value;
}
private:
bool build_();
bool remove_();
+9
View File
@@ -2,6 +2,7 @@
#define M_PAD_H
#include "egg/core/eggController.h"
#include "m/m_vec.h"
namespace mPad {
@@ -48,6 +49,14 @@ inline bool isMplsPtFS(const int i) {
return g_padMg->getDevType(i) == EGG::cDEV_MPLS_PT_FS;
}
inline mVec2_c getDpdRawPos() {
return g_currentCore->getDpdRawPos();
}
inline mVec2_c getDpdRawPos(int i) {
return g_core[i]->getDpdRawPos();
}
// Defined in dPad, referenced in both mPad and dPad
extern "C" void async_info_callback(s32 chan, s32 result);
+4 -4
View File
@@ -254,10 +254,6 @@ public:
p->z = z;
}
s16 ang() const {
return cM::atan2s(x * x, z * z);
}
f32 inprodXZ(const mVec3_c &other) const {
return x * other.x + z * other.z;
}
@@ -315,6 +311,10 @@ public:
mVec2_c operator+(const mVec2_c &v) const {
return mVec2_c(x + v.x, y + v.y);
}
mVec2_c operator-(const mVec2_c &v) const {
return mVec2_c(x - v.x, y - v.y);
}
};
#endif
+56 -17
View File
@@ -1,23 +1,29 @@
#include "d/d_cs_base.h"
#include "common.h"
#include "d/d_gfx.h"
#include "d/d_pad.h"
#include "d/d_pad_nav.h"
#include "d/lyt/d_lyt_cursor_stick.h"
#include "egg/math/eggMath.h"
#include "f/f_base.h"
#include "f/f_profile_name.h"
#include "m/m_pad.h"
#include "m/m_vec.h"
#include "nw4r/math/math_types.h"
#include "s/s_Math.h"
#include "toBeSorted/arc_managers/layout_arc_manager.h"
SPECIAL_BASE_PROFILE(C_BASE, dCsBase_c, fProfile::C_BASE, 0x2C0, 0x06F9);
dCsBase_c *dCsBase_c::sInstance;
dCsBase_c::dCsBase_c()
: mpCurrLyt(nullptr),
field_0x6F0(0.0f),
field_0x6F4(0.0f),
field_0x6F8(0.0f),
field_0x6FC(0.0f),
mCsPosition(0.0f, 0.0f),
mCsVelocity(0.0f, 0.0f),
field_0x700(0),
field_0x702(0),
mAlpha(0),
field_0x703(0),
field_0x704(0),
field_0x705(0) {
@@ -47,13 +53,11 @@ int dCsBase_c::create() {
mCursorIf.setCursorMask(1);
dCsMgr_c::GetInstance()->registCursor(&mCursorIf);
dLytCursorStick_c::build();
field_0x6F0 = 0.0f;
field_0x6F4 = 0.0f;
field_0x6F8 = 0.0f;
field_0x6FC = 0.0f;
mCsPosition.set(0.0f, 0.0f);
mCsVelocity.set(0.0f, 0.0f);
field_0x700 = 0;
field_0x702 = 0;
mAlpha = 0;
field_0x703 = 0;
return SUCCEEDED;
@@ -67,8 +71,43 @@ int dCsBase_c::doDelete() {
}
int dCsBase_c::execute() {
// TODO this needs player / controller / d_pad stuff?
mVec2_c dpdPosScreen = dPad::ex_c::getInstance()->getDpdPosScreen();
u8 oldAlpha = mAlpha;
bool bIsInBounds = false;
if (field_0x705 == 1) {
mVec2_c dpdPos = mPad::getDpdRawPos();
dpdPosScreen.x = dGfx_c::getWidth4x3F() * 0.5f * (1.f + dpdPos.x) + dGfx_c::getWidth4x3LeftF();
dpdPosScreen.y = dGfx_c::getCurrentScreenHeightF() * -0.5f * (1.f + dpdPos.y) + dGfx_c::getCurrentScreenTopF();
if (dPad::ex_c::getInstance()->field_0x22D8 == 0) {
dpdPosScreen.x = EGG::Math<f32>::maxNumber();
dpdPosScreen.y = EGG::Math<f32>::maxNumber();
}
}
if (dGfx_c::getWidth4x3LeftF() <= dpdPosScreen.x && dpdPosScreen.x <= dGfx_c::getWidth4x3RightF()) {
if (dGfx_c::getCurrentScreenBottomF() <= dpdPosScreen.y && dpdPosScreen.y <= dGfx_c::getCurrentScreenTopF()) {
bIsInBounds = true;
}
}
mCsVelocity = dpdPosScreen - mCsPosition;
mCsPosition = dpdPosScreen;
sLib::addCalcAngle(&field_0x700.mVal, mCsVelocity.ang(), 0x10, 2000);
sLib::chaseUC(&mAlpha, bIsInBounds ? 255 : 0, 10);
if (oldAlpha != mAlpha) {
mLyts[0].getLayout()->GetRootPane()->SetAlpha(mAlpha);
mLyts[1].getLayout()->GetRootPane()->SetAlpha(mAlpha);
}
if (dPadNav::isPointerVisible()) {
mCursorStick.setShouldBeOn(false);
} else if (dPadNav::isCursorStickVisible()) {
mCursorStick.setShouldBeOn(true);
}
mCursorStick.execute();
return SUCCEEDED;
}
@@ -77,11 +116,11 @@ int dCsBase_c::draw() {
return SUCCEEDED;
}
if (field_0x703 && dPadNav::isPointerVisible() && field_0x702) {
if (field_0x703 && dPadNav::isPointerVisible() && mAlpha) {
nw4r::lyt::Pane *p = mpCurrLyt->getLayout()->GetRootPane();
nw4r::math::VEC3 pos;
pos.x = field_0x6F0;
pos.y = field_0x6F4;
pos.x = mCsPosition.x;
pos.y = mCsPosition.y;
pos.z = 0.0f;
p->SetTranslate(pos);
mpCurrLyt->calc();
@@ -105,11 +144,11 @@ bool dCsBase_c::drawDirectly() {
return true;
}
if (field_0x703 && dPadNav::isPointerVisible() && field_0x702) {
if (field_0x703 && dPadNav::isPointerVisible() && mAlpha) {
nw4r::lyt::Pane *p = mpCurrLyt->getLayout()->GetRootPane();
nw4r::math::VEC3 pos;
pos.x = field_0x6F0;
pos.y = field_0x6F4;
pos.x = mCsPosition.x;
pos.y = mCsPosition.y;
pos.z = 0.0f;
p->SetTranslate(pos);
mpCurrLyt->calc();
+2 -5
View File
@@ -270,9 +270,7 @@ void beginPad_BR() {
ex.mDpdPos = ex.field_0x5C;
} else {
if (mPad::getCore(0)->getDpdValidFlag() > 0) {
// TODO - ctor regswap
ex.mDpdPos = mPad::getCore(0)->getDpdRawPos();
// ex.mDpdPos.set(v.x, v.y);
ex.mDpdPos = mPad::getDpdRawPos(0);
} else {
ex.mDpdPos.set(-2.f, -2.f);
}
@@ -502,8 +500,7 @@ void ex_c::centerCursor(s32 chan, bool b) {
}
void ex_c::fn_80056790(s32 chan) {
// unused - TODO ctor regswap
mVec2_c dpdRawPos = mPad::getCore(chan)->getDpdRawPos();
mVec2_c dpdRawPos = mPad::getDpdRawPos(chan);
f32 f;
if (dScGame_c::GetInstance() != nullptr && dLytMap_c::GetInstance() != nullptr &&
+8 -8
View File
@@ -12,7 +12,7 @@ static bool sDisableAutoReturnToPointerNav = false;
bool sIsPointerVisible = true;
bool sPrevIsPointerVisible = true;
bool sUnkCursorRelated = true;
bool sIsCursorStickVisible = true;
s32 sFSStickDirection;
s32 sFSStickNavDirection;
@@ -33,7 +33,7 @@ void init() {
sFSStickNavActiveTimer = 0;
sFSStickDirectionStableTimer = 0;
sMPLSNavGestureTimer = 0;
offUnkCursorRelated();
setCursorStickInvisible();
}
void calc() {
@@ -129,10 +129,10 @@ void setNavEnabled(bool navEnabled, bool disableAutoReturnToPointerNav) {
sIsNavEnabled = navEnabled;
sIsPointerVisible = true;
if (navEnabled) {
onUnkCursorRelated();
setCursorStickVisible();
sDisableAutoReturnToPointerNav = disableAutoReturnToPointerNav;
} else {
offUnkCursorRelated();
setCursorStickInvisible();
sDisableAutoReturnToPointerNav = false;
}
}
@@ -197,12 +197,12 @@ void hidePointer() {
sIsPointerVisible = false;
}
void offUnkCursorRelated() {
sUnkCursorRelated = false;
void setCursorStickInvisible() {
sIsCursorStickVisible = false;
}
void onUnkCursorRelated() {
sUnkCursorRelated = true;
void setCursorStickVisible() {
sIsCursorStickVisible = true;
}
void checkForNavLeftGesture() {