mirror of
https://github.com/zeldaret/ss
synced 2026-05-24 07:10:53 -04:00
Somewhat ok
This commit is contained in:
+26
-26
@@ -11275,7 +11275,7 @@ __dt__43sFStateFct_c<Q29dCsGame_c15lytItemCursor_c>Fv = .text:0x801BD9C0; // typ
|
||||
__dt__96sStateMgr_c<Q29dCsGame_c15lytItemCursor_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BDA30; // type:function size:0xA0
|
||||
__dt__66sFStateMgr_c<Q29dCsGame_c15lytItemCursor_c,20sStateMethodUsr_FI_c>Fv = .text:0x801BDAD0; // type:function size:0xA4
|
||||
__dt__Q23d2d9AnmGroupsFv = .text:0x801BDB80; // type:function size:0x40
|
||||
__dt__18dCsGameAnmGroups_cFv = .text:0x801BDBC0; // type:function size:0x6C
|
||||
__dt__Q39dCsGame_c15lytItemCursor_c18dCsGameAnmGroups_cFv = .text:0x801BDBC0; // type:function size:0x6C
|
||||
__dt__53sFState_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c>Fv = .text:0x801BDC30; // type:function size:0x58
|
||||
__dt__56sFStateFct_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c>Fv = .text:0x801BDC90; // type:function size:0x6C
|
||||
__dt__109sStateMgr_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801BDD00; // type:function size:0xA0
|
||||
@@ -11311,14 +11311,14 @@ setPosition__17dCsGameLytBase1_cFRC7mVec2_c = .text:0x801BF500; // type:function
|
||||
draw__9dCsGame_cFv = .text:0x801BF520; // type:function size:0xBC
|
||||
fn_801BF5E0__9dCsGame_cCFv = .text:0x801BF5E0; // type:function size:0x44
|
||||
isForcedHidden__9dCsGame_cCFv = .text:0x801BF630; // type:function size:0x288
|
||||
setNextCursorType__9dCsGame_cFQ39dCsGame_c15lytItemCursor_c12CursorType_e = .text:0x801BF8C0; // type:function size:0x10
|
||||
setNextCursorType__9dCsGame_cFQ29dCsGame_c12CursorType_e = .text:0x801BF8C0; // type:function size:0x10
|
||||
setCursorTypeNoneMaybe__9dCsGame_cFv = .text:0x801BF8D0; // type:function size:0x8
|
||||
setCursorTypePointer__9dCsGame_cFv = .text:0x801BF8E0; // type:function size:0x18
|
||||
fn_801BF900 = .text:0x801BF900; // type:function size:0x8
|
||||
fn_801BF910 = .text:0x801BF910; // type:function size:0x58
|
||||
CsGame__startDrawBow = .text:0x801BF970; // type:function size:0x58
|
||||
CsGame__startBowAim = .text:0x801BF9D0; // type:function size:0x38
|
||||
CsGame__startBowReady = .text:0x801BFA10; // type:function size:0x38
|
||||
bowStartDrawOrCharge__9dCsGame_cFff = .text:0x801BF970; // type:function size:0x58
|
||||
bowAimStart__9dCsGame_cFv = .text:0x801BF9D0; // type:function size:0x38
|
||||
bowReady__9dCsGame_cFv = .text:0x801BFA10; // type:function size:0x38
|
||||
fn_801BFA50 = .text:0x801BFA50; // type:function size:0x68
|
||||
fn_801BFAC0 = .text:0x801BFAC0; // type:function size:0x8
|
||||
fn_801BFAD0 = .text:0x801BFAD0; // type:function size:0x54
|
||||
@@ -11361,9 +11361,9 @@ executeState_PlayerCam__Q29dCsGame_c15lytItemCursor_cFv = .text:0x801C0110; // t
|
||||
finalizeState_PlayerCam__Q29dCsGame_c15lytItemCursor_cFv = .text:0x801C0150; // type:function size:0x4
|
||||
changeState__Q29dCsGame_c15lytItemCursor_cFRC42sFStateID_c<Q29dCsGame_c15lytItemCursor_c> = .text:0x801C0160; // type:function size:0x10
|
||||
changeState__96sStateMgr_c<Q29dCsGame_c15lytItemCursor_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x801C0170; // type:function size:0x10
|
||||
CsGame__lytItemCursor__startBowDrawOrChargeState = .text:0x801C0180; // type:function size:0x8
|
||||
CsGame__lytItemCursor__startBowAim = .text:0x801C0190; // type:function size:0x8
|
||||
CsGame__lytItemCursor__startBowReady = .text:0x801C01A0; // type:function size:0x8
|
||||
bowStartDrawOrCharge__Q29dCsGame_c15lytItemCursor_cFff = .text:0x801C0180; // type:function size:0x8
|
||||
bowAimStart__Q29dCsGame_c15lytItemCursor_cFv = .text:0x801C0190; // type:function size:0x8
|
||||
bowReady__Q29dCsGame_c15lytItemCursor_cFv = .text:0x801C01A0; // type:function size:0x8
|
||||
fn_801C01B0 = .text:0x801C01B0; // type:function size:0x8
|
||||
fn_801C01C0 = .text:0x801C01C0; // type:function size:0x8
|
||||
fn_801C01D0 = .text:0x801C01D0; // type:function size:0x8
|
||||
@@ -11393,8 +11393,8 @@ initializeState_ToNotFind__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_cFv = .t
|
||||
executeState_ToNotFind__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_cFv = .text:0x801C0930; // type:function size:0x98
|
||||
finalizeState_ToNotFind__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_cFv = .text:0x801C09D0; // type:function size:0x4
|
||||
enter__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_cFv = .text:0x801C09E0; // type:function size:0x108
|
||||
fn_801C0AF0 = .text:0x801C0AF0; // type:function size:0x74
|
||||
fn_801C0B70 = .text:0x801C0B70; // type:function size:0x8
|
||||
setParams__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_cFRC4mAngff = .text:0x801C0AF0; // type:function size:0x74
|
||||
setUnkWord__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_cFi = .text:0x801C0B70; // type:function size:0x8
|
||||
moveEffectsIn__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_cFv = .text:0x801C0B80; // type:function size:0x24
|
||||
moveEffectsOut__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_cFv = .text:0x801C0BB0; // type:function size:0x1C
|
||||
updateEffects__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_cFv = .text:0x801C0BD0; // type:function size:0x140
|
||||
@@ -11427,10 +11427,10 @@ enter__Q39dCsGame_c15lytItemCursor_c11lytBowCsr_cFv = .text:0x801C1670; // type:
|
||||
init__Q39dCsGame_c15lytItemCursor_c11lytBowCsr_cFv = .text:0x801C1870; // type:function size:0x170
|
||||
execute__Q39dCsGame_c15lytItemCursor_c11lytBowCsr_cFv = .text:0x801C19E0; // type:function size:0x170
|
||||
executeState__109sStateMgr_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801C1B50; // type:function size:0x10
|
||||
CsGame__lytItemCursor__lytBowCsr__startDrawOrCharge = .text:0x801C1B60; // type:function size:0xB0
|
||||
startDrawOrCharge__Q39dCsGame_c15lytItemCursor_c11lytBowCsr_cFff = .text:0x801C1B60; // type:function size:0xB0
|
||||
getStateID__109sStateMgr_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x801C1C10; // type:function size:0x10
|
||||
CsGame__lytItemCursor__lytBowCsr__startAimStart = .text:0x801C1C20; // type:function size:0x84
|
||||
fn_801C1CB0 = .text:0x801C1CB0; // type:function size:0x84
|
||||
aimStart__Q39dCsGame_c15lytItemCursor_c11lytBowCsr_cFv = .text:0x801C1C20; // type:function size:0x84
|
||||
ready__Q39dCsGame_c15lytItemCursor_c11lytBowCsr_cFv = .text:0x801C1CB0; // type:function size:0x84
|
||||
initializeState_Invisible__Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_cFv = .text:0x801C1D40; // type:function size:0x4
|
||||
executeState_Invisible__Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_cFv = .text:0x801C1D50; // type:function size:0x4
|
||||
finalizeState_Invisible__Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_cFv = .text:0x801C1D60; // type:function size:0x4
|
||||
@@ -35853,38 +35853,38 @@ lbl_8052EE10 = .data:0x8052EE10; // type:object size:0xD data:string
|
||||
lbl_8052EE20 = .data:0x8052EE20; // type:object size:0xA data:string
|
||||
lbl_8052EE2C = .data:0x8052EE2C; // type:object size:0xA data:string
|
||||
lbl_8052EE38 = .data:0x8052EE38; // type:object size:0xA data:string
|
||||
lbl_8052EE44 = .data:0x8052EE44; // type:object size:0xC
|
||||
__vt__13dCsGame_HIO_c = .data:0x8052EE44; // type:object size:0xC
|
||||
__vt__9dCsGame_c = .data:0x8052EE50; // type:object size:0x4C
|
||||
__vt__Q29dCsGame_c15lytItemCursor_c = .data:0x8052EE9C; // type:object size:0x2C
|
||||
__vt__18dCsGameAnmGroups_c = .data:0x8052EEC8; // type:object size:0x10
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c18dCsGameAnmGroups_c = .data:0x8052EEC8; // type:object size:0xC
|
||||
__vt__66sFStateMgr_c<Q29dCsGame_c15lytItemCursor_c,20sStateMethodUsr_FI_c> = .data:0x8052EED8; // type:object size:0x30
|
||||
__vt__96sStateMgr_c<Q29dCsGame_c15lytItemCursor_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8052EF08; // type:object size:0x30
|
||||
__vt__43sFStateFct_c<Q29dCsGame_c15lytItemCursor_c> = .data:0x8052EF38; // type:object size:0x18
|
||||
__vt__43sFStateFct_c<Q29dCsGame_c15lytItemCursor_c> = .data:0x8052EF38; // type:object size:0x14
|
||||
__vt__40sFState_c<Q29dCsGame_c15lytItemCursor_c> = .data:0x8052EF50; // type:object size:0x18
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c14lytVacuumCsr_c = .data:0x8052EF68; // type:object size:0x10
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c14lytVacuumCsr_c = .data:0x8052EF68; // type:object size:0xC
|
||||
__vt__82sFStateMgr_c<Q39dCsGame_c15lytItemCursor_c14lytVacuumCsr_c,20sStateMethodUsr_FI_c> = .data:0x8052EF78; // type:object size:0x30
|
||||
__vt__112sStateMgr_c<Q39dCsGame_c15lytItemCursor_c14lytVacuumCsr_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8052EFA8; // type:object size:0x30
|
||||
__vt__59sFStateFct_c<Q39dCsGame_c15lytItemCursor_c14lytVacuumCsr_c> = .data:0x8052EFD8; // type:object size:0x18
|
||||
__vt__59sFStateFct_c<Q39dCsGame_c15lytItemCursor_c14lytVacuumCsr_c> = .data:0x8052EFD8; // type:object size:0x14
|
||||
__vt__56sFState_c<Q39dCsGame_c15lytItemCursor_c14lytVacuumCsr_c> = .data:0x8052EFF0; // type:object size:0x18
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c16lytCrawShotCsr_c = .data:0x8052F008; // type:object size:0x10
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c16lytCrawShotCsr_c = .data:0x8052F008; // type:object size:0xC
|
||||
__vt__84sFStateMgr_c<Q39dCsGame_c15lytItemCursor_c16lytCrawShotCsr_c,20sStateMethodUsr_FI_c> = .data:0x8052F018; // type:object size:0x30
|
||||
__vt__114sStateMgr_c<Q39dCsGame_c15lytItemCursor_c16lytCrawShotCsr_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8052F048; // type:object size:0x30
|
||||
__vt__61sFStateFct_c<Q39dCsGame_c15lytItemCursor_c16lytCrawShotCsr_c> = .data:0x8052F078; // type:object size:0x18
|
||||
__vt__61sFStateFct_c<Q39dCsGame_c15lytItemCursor_c16lytCrawShotCsr_c> = .data:0x8052F078; // type:object size:0x14
|
||||
__vt__58sFState_c<Q39dCsGame_c15lytItemCursor_c16lytCrawShotCsr_c> = .data:0x8052F090; // type:object size:0x18
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_c = .data:0x8052F0A8; // type:object size:0x10
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_c = .data:0x8052F0A8; // type:object size:0xC
|
||||
__vt__84sFStateMgr_c<Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_c,20sStateMethodUsr_FI_c> = .data:0x8052F0B8; // type:object size:0x30
|
||||
__vt__114sStateMgr_c<Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8052F0E8; // type:object size:0x30
|
||||
__vt__61sFStateFct_c<Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_c> = .data:0x8052F118; // type:object size:0x18
|
||||
__vt__61sFStateFct_c<Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_c> = .data:0x8052F118; // type:object size:0x14
|
||||
__vt__58sFState_c<Q39dCsGame_c15lytItemCursor_c16lytPachinkoCsr_c> = .data:0x8052F130; // type:object size:0x18
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_c = .data:0x8052F148; // type:object size:0x10
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_c = .data:0x8052F148; // type:object size:0xC
|
||||
__vt__83sFStateMgr_c<Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_c,20sStateMethodUsr_FI_c> = .data:0x8052F158; // type:object size:0x30
|
||||
__vt__113sStateMgr_c<Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8052F188; // type:object size:0x30
|
||||
__vt__60sFStateFct_c<Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_c> = .data:0x8052F1B8; // type:object size:0x18
|
||||
__vt__60sFStateFct_c<Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_c> = .data:0x8052F1B8; // type:object size:0x14
|
||||
__vt__57sFState_c<Q39dCsGame_c15lytItemCursor_c15lytDowsingCsr_c> = .data:0x8052F1D0; // type:object size:0x18
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c = .data:0x8052F1E8; // type:object size:0x10
|
||||
__vt__Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c = .data:0x8052F1E8; // type:object size:0xC
|
||||
__vt__79sFStateMgr_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c,20sStateMethodUsr_FI_c> = .data:0x8052F1F8; // type:object size:0x30
|
||||
__vt__109sStateMgr_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8052F228; // type:object size:0x30
|
||||
__vt__56sFStateFct_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c> = .data:0x8052F258; // type:object size:0x18
|
||||
__vt__56sFStateFct_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c> = .data:0x8052F258; // type:object size:0x14
|
||||
__vt__53sFState_c<Q39dCsGame_c15lytItemCursor_c11lytBowCsr_c> = .data:0x8052F270; // type:object size:0x18
|
||||
__vt__13dCsGameLyt2_c = .data:0x8052F288; // type:object size:0x2C
|
||||
__vt__13dCsGameLyt1_c = .data:0x8052F2B4; // type:object size:0x2C
|
||||
|
||||
+102
-101
@@ -14,36 +14,19 @@
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/d_emitter_callbacks.h"
|
||||
|
||||
struct dCsGame_HIO_c {
|
||||
dCsGame_HIO_c();
|
||||
virtual ~dCsGame_HIO_c() {}
|
||||
|
||||
/* 0x04 */ f32 field_0x04;
|
||||
/* 0x08 */ f32 field_0x08;
|
||||
/* 0x0C */ f32 field_0x0C;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x18 */ f32 field_0x18;
|
||||
/* 0x1C */ f32 field_0x1C;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
/* 0x24 */ f32 field_0x24;
|
||||
/* 0x28 */ f32 field_0x28;
|
||||
/* 0x2C */ f32 field_0x2C;
|
||||
/* 0x30 */ s32 field_0x30;
|
||||
/* 0x34 */ f32 field_0x34;
|
||||
/* 0x38 */ f32 field_0x38;
|
||||
/* 0x3C */ f32 field_0x3C;
|
||||
/* 0x40 */ u8 field_0x40;
|
||||
/* 0x41 */ u8 field_0x41;
|
||||
/* 0x42 */ u8 field_0x42;
|
||||
};
|
||||
|
||||
class EffectRelated : public dEmitterCallback_c {
|
||||
/** A variant of the cursor position getter for dCsGame_c */
|
||||
class dCursorInterfaceGame_c : public dCursorInterface_c {
|
||||
public:
|
||||
EffectRelated(u32 x = 0x28, f32 y = 3.5f);
|
||||
virtual ~EffectRelated() {}
|
||||
dCursorInterfaceGame_c() {}
|
||||
virtual ~dCursorInterfaceGame_c() {}
|
||||
virtual mVec2_c &getCursorPos();
|
||||
|
||||
private:
|
||||
/* 0x14 */ mVec2_c field_0x14;
|
||||
};
|
||||
|
||||
// TODO - these could also be in the dCsGame_c namespace
|
||||
// TODO - rename these
|
||||
class dCsGameLytBase1_c {
|
||||
public:
|
||||
virtual ~dCsGameLytBase1_c() {}
|
||||
@@ -118,27 +101,23 @@ private:
|
||||
/* 0x10 */ d2d::LytBase_c mLyt;
|
||||
};
|
||||
|
||||
template <int N>
|
||||
class Tmp {
|
||||
public:
|
||||
d2d::AnmGroup_c mAnmGroups[N];
|
||||
};
|
||||
|
||||
class dCsGameAnmGroups_c {
|
||||
public:
|
||||
dCsGameAnmGroups_c() {}
|
||||
virtual ~dCsGameAnmGroups_c() {}
|
||||
|
||||
d2d::AnmGroup_c &operator[](int idx) {
|
||||
return tmp.mAnmGroups[idx];
|
||||
}
|
||||
|
||||
Tmp<0x17> tmp;
|
||||
};
|
||||
|
||||
/// @brief Game cursor.
|
||||
class dCsGame_c : public dCs_c {
|
||||
public:
|
||||
enum CursorType_e {
|
||||
CS_NONE = 0,
|
||||
/** Default pointer */
|
||||
CS_POINTER_DEF = 1,
|
||||
/** Grab pointer */
|
||||
CS_POINTER_CAT = 2,
|
||||
CS_BOW = 6,
|
||||
CS_DOWSING = 7,
|
||||
CS_VACUUM = 8,
|
||||
CS_PACHINKO = 9,
|
||||
CS_HOOKSHOT = 10,
|
||||
CS_PLAYERCAM = 14,
|
||||
};
|
||||
|
||||
dCsGame_c();
|
||||
virtual ~dCsGame_c();
|
||||
|
||||
@@ -158,35 +137,26 @@ public:
|
||||
friend class dCsGame_c;
|
||||
|
||||
public:
|
||||
enum CursorType_e {
|
||||
CS_NONE = 0,
|
||||
/** Default pointer */
|
||||
CS_POINTER_DEF = 1,
|
||||
/** Grab pointer */
|
||||
CS_POINTER_CAT = 2,
|
||||
CS_BOW = 6,
|
||||
CS_DOWSING = 7,
|
||||
CS_VACUUM = 8,
|
||||
CS_PACHINKO = 9,
|
||||
CS_HOOKSHOT = 10,
|
||||
CS_PLAYERCAM = 14,
|
||||
};
|
||||
|
||||
/// @brief Bow cursor.
|
||||
class lytBowCsr_c {
|
||||
public:
|
||||
lytBowCsr_c(dCsGameAnmGroups_c &g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g.tmp.mAnmGroups, 0x17), mpLyt(lyt), mStateMgr(*this, sStateID::null) {}
|
||||
lytBowCsr_c(d2d::AnmGroups g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g), mpLyt(lyt), mStateMgr(*this, sStateID::null), field_0x50(0.0f), field_0x54(0.0f) {}
|
||||
virtual ~lytBowCsr_c() {}
|
||||
|
||||
void init();
|
||||
|
||||
void enter();
|
||||
inline void select() {
|
||||
// TODO this function might be breaking vtable order
|
||||
mStateMgr.changeState(StateID_Select);
|
||||
}
|
||||
void execute();
|
||||
|
||||
void startDrawOrCharge(f32 f1, f32 f2);
|
||||
void aimStart();
|
||||
void ready();
|
||||
|
||||
private:
|
||||
STATE_FUNC_DECLARE(lytBowCsr_c, Invisible);
|
||||
STATE_FUNC_DECLARE(lytBowCsr_c, Select);
|
||||
@@ -201,14 +171,24 @@ public:
|
||||
/* 0x4C */ d2d::LytBase_c *mpLyt;
|
||||
/* 0x50 */ f32 field_0x50;
|
||||
/* 0x54 */ f32 field_0x54;
|
||||
/* 0x58 */ u8 field_0x58[0x68 - 0x58]; // idk
|
||||
/* 0x58 */ nw4r::lyt::Pane *mpPanesArrowRing[4];
|
||||
};
|
||||
|
||||
/// @brief Dowsing cursor.
|
||||
class lytDowsingCsr_c {
|
||||
public:
|
||||
lytDowsingCsr_c(dCsGameAnmGroups_c &g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g.tmp.mAnmGroups, 0x17), mpLyt(lyt), mStateMgr(*this, sStateID::null) {}
|
||||
lytDowsingCsr_c(d2d::AnmGroups g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g),
|
||||
mpLyt(lyt),
|
||||
mStateMgr(*this, sStateID::null),
|
||||
mpRingAllPane(nullptr),
|
||||
mpDowsingPane(nullptr),
|
||||
field_0xC0(0.0f),
|
||||
field_0xC4(0),
|
||||
mRotZ(0),
|
||||
field_0xCC(0.0f),
|
||||
field_0xD0(0.0f),
|
||||
mAlpha(0) {}
|
||||
virtual ~lytDowsingCsr_c() {}
|
||||
|
||||
void init();
|
||||
@@ -216,6 +196,9 @@ public:
|
||||
void enter();
|
||||
void execute();
|
||||
|
||||
void setParams(const mAng& rot, f32 v1, f32 v2);
|
||||
void setUnkWord(UNKWORD v);
|
||||
|
||||
void moveEffectsIn();
|
||||
void moveEffectsOut();
|
||||
void updateEffects();
|
||||
@@ -235,7 +218,7 @@ public:
|
||||
/* 0xB8 */ nw4r::lyt::Pane *mpRingAllPane;
|
||||
/* 0xBC */ nw4r::lyt::Pane *mpDowsingPane;
|
||||
/* 0xC0 */ f32 field_0xC0;
|
||||
/* 0xC4 */ u8 field_0xC4[0xC8 - 0xC4];
|
||||
/* 0xC4 */ UNKWORD field_0xC4;
|
||||
/* 0xC8 */ mAng mRotZ;
|
||||
/* 0xCC */ f32 field_0xCC;
|
||||
/* 0xD0 */ f32 field_0xD0;
|
||||
@@ -245,8 +228,8 @@ public:
|
||||
/// @brief Slingshot cursor.
|
||||
class lytPachinkoCsr_c {
|
||||
public:
|
||||
lytPachinkoCsr_c(dCsGameAnmGroups_c &g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g.tmp.mAnmGroups, 0x17),
|
||||
lytPachinkoCsr_c(d2d::AnmGroups g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g),
|
||||
mpLyt(lyt),
|
||||
mStateMgr(*this, sStateID::null),
|
||||
mIsCharging(false),
|
||||
@@ -280,8 +263,8 @@ public:
|
||||
/// @brief Clawshots cursor.
|
||||
class lytCrawShotCsr_c {
|
||||
public:
|
||||
lytCrawShotCsr_c(dCsGameAnmGroups_c &g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g.tmp.mAnmGroups, 0x17), mpLyt(lyt), mStateMgr(*this, sStateID::null) {}
|
||||
lytCrawShotCsr_c(d2d::AnmGroups g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g), mpLyt(lyt), mStateMgr(*this, sStateID::null), mLocked(false) {}
|
||||
virtual ~lytCrawShotCsr_c() {}
|
||||
|
||||
void init();
|
||||
@@ -311,8 +294,8 @@ public:
|
||||
/// @brief Gust Bellows cursor.
|
||||
class lytVacuumCsr_c {
|
||||
public:
|
||||
lytVacuumCsr_c(dCsGameAnmGroups_c &g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g.tmp.mAnmGroups, 0x17), mpLyt(lyt), mStateMgr(*this, sStateID::null), mLocked(false) {}
|
||||
lytVacuumCsr_c(d2d::AnmGroups g, d2d::LytBase_c *lyt)
|
||||
: mAnm(g), mpLyt(lyt), mStateMgr(*this, sStateID::null), mLocked(false) {}
|
||||
virtual ~lytVacuumCsr_c() {}
|
||||
|
||||
void init();
|
||||
@@ -342,11 +325,11 @@ public:
|
||||
lytItemCursor_c()
|
||||
: mStateMgr(*this, sStateID::null),
|
||||
mAnm(mAnmGroups.tmp.mAnmGroups, 0x17),
|
||||
mBow(mAnmGroups, &mLyt),
|
||||
mDowsing(mAnmGroups, &mLyt),
|
||||
mPachinko(mAnmGroups, &mLyt),
|
||||
mCrawShot(mAnmGroups, &mLyt),
|
||||
mVacuum(mAnmGroups, &mLyt) {}
|
||||
mBow(mAnm, &mLyt),
|
||||
mDowsing(mAnm, &mLyt),
|
||||
mPachinko(mAnm, &mLyt),
|
||||
mCrawShot(mAnm, &mLyt),
|
||||
mVacuum(mAnm, &mLyt) {}
|
||||
virtual ~lytItemCursor_c() {}
|
||||
virtual bool init() override;
|
||||
virtual bool remove() override;
|
||||
@@ -361,24 +344,12 @@ public:
|
||||
mpResAcc = resAcc;
|
||||
}
|
||||
|
||||
bool isCursorActive() const {
|
||||
return mCursorActive;
|
||||
}
|
||||
void setField0x9A0(u8 val) {
|
||||
mCursorActive = val;
|
||||
}
|
||||
|
||||
// TODO - maybe a system for overriding cursor type
|
||||
void setNextCursorType(CursorType_e cs) {
|
||||
mNextCursor = true;
|
||||
mNextCursorType = cs;
|
||||
}
|
||||
void offNextCursor() {
|
||||
mNextCursor = false;
|
||||
}
|
||||
|
||||
void changeState(const sFStateID_c<lytItemCursor_c> &newState);
|
||||
|
||||
void bowStartDrawOrCharge(f32 f1, f32 f2);
|
||||
void bowAimStart();
|
||||
void bowReady();
|
||||
|
||||
private:
|
||||
STATE_FUNC_DECLARE(lytItemCursor_c, Invisible);
|
||||
STATE_FUNC_DECLARE(lytItemCursor_c, Bow);
|
||||
@@ -390,6 +361,24 @@ public:
|
||||
|
||||
/* 0x00C */ UI_STATE_MGR_DECLARE(lytItemCursor_c);
|
||||
|
||||
template <int N>
|
||||
class Tmp {
|
||||
public:
|
||||
d2d::AnmGroup_c mAnmGroups[N];
|
||||
};
|
||||
|
||||
class dCsGameAnmGroups_c {
|
||||
public:
|
||||
dCsGameAnmGroups_c() {}
|
||||
virtual ~dCsGameAnmGroups_c() {}
|
||||
|
||||
d2d::AnmGroup_c &operator[](int idx) {
|
||||
return tmp.mAnmGroups[idx];
|
||||
}
|
||||
|
||||
Tmp<0x17> tmp;
|
||||
};
|
||||
|
||||
/* 0x048 */ EffectsStruct mEffects;
|
||||
/* 0x07C */ dEmitterCallbackCursorTrail_c mTrailCb;
|
||||
/* 0x0B0 */ mVec3_c mPositionThisFrame;
|
||||
@@ -406,21 +395,27 @@ public:
|
||||
/* 0x994 */ u8 field_0x994[0x99C - 0x994]; // seemingly not used
|
||||
/* 0x99C */ bool mDrawCursorTrailThisFrame;
|
||||
/* 0x99D */ u8 field_0x99D[0x9A0 - 0x99D]; // Havent seen this range be set
|
||||
/* 0x9A0 */ bool mCursorActive;
|
||||
/* 0x9A1 */ bool field_0x9A1; // Compares to mCursorActive to change state
|
||||
/* 0x9A2 */ bool field_0x9A2; // A way of signalling Lyt non-normal state.
|
||||
/* 0x9A4 */ CursorType_e mActiveCursorType;
|
||||
/* 0x9A8 */ bool mNextCursor;
|
||||
/* 0x9AC */ CursorType_e mNextCursorType;
|
||||
};
|
||||
|
||||
void setNextCursorType(lytItemCursor_c::CursorType_e);
|
||||
void setNextCursorType(CursorType_e);
|
||||
void setCursorTypeNoneMaybe();
|
||||
void setCursorTypePointer();
|
||||
|
||||
void bowStartDrawOrCharge(f32 f1, f32 f2);
|
||||
void bowAimStart();
|
||||
void bowReady();
|
||||
|
||||
void setCursorTypePlayerCam();
|
||||
|
||||
bool isCursorActive() const {
|
||||
return mCursorActive;
|
||||
}
|
||||
void setField0x9A0(u8 val) {
|
||||
mCursorActive = val;
|
||||
}
|
||||
|
||||
void offNextCursor() {
|
||||
mCursor.offNextCursor();
|
||||
mNextCursorActive = false;
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -430,10 +425,16 @@ private:
|
||||
/* 0x068 */ m2d::ResAccIf_c mCursorResAcc;
|
||||
/* 0x11C */ m2d::ResAccIf_c mMain2DResAcc;
|
||||
/* 0x1D0 */ dCursorInterfaceGame_c mCursorIf;
|
||||
/* 0x1EC */ lytItemCursor_c::CursorType_e mCursorType;
|
||||
/* 0x1EC */ CursorType_e mCursorType;
|
||||
/* 0x1F0 */ dCsGameLyt1_c mLyt1;
|
||||
/* 0x290 */ dCsGameLyt2_c mLyt2;
|
||||
/* 0x330 */ lytItemCursor_c mCursor;
|
||||
/* 0x9A0 */ bool mCursorActive;
|
||||
/* 0x9A1 */ bool field_0x9A1; // Compares to mCursorActive to change state
|
||||
/* 0x9A2 */ bool field_0x9A2; // A way of signalling Lyt non-normal state.
|
||||
/* 0x9A4 */ CursorType_e mActiveCursorType;
|
||||
/* 0x9A8 */ bool mNextCursorActive;
|
||||
/* 0x9AC */ CursorType_e mNextCursorType;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -130,17 +130,6 @@ private:
|
||||
/* 0x10 */ dCursorHitCheck_c *mpHit;
|
||||
};
|
||||
|
||||
/** A variant of the cursor position getter for dCsGame_c */
|
||||
class dCursorInterfaceGame_c : public dCursorInterface_c {
|
||||
public:
|
||||
dCursorInterfaceGame_c() {}
|
||||
virtual ~dCursorInterfaceGame_c() {}
|
||||
virtual mVec2_c &getCursorPos();
|
||||
|
||||
private:
|
||||
/* 0x14 */ mVec2_c field_0x14;
|
||||
};
|
||||
|
||||
/**
|
||||
* The cursor manager. Cursors and hit targets are registered here,
|
||||
* and this manager will track the target of each pointer.
|
||||
|
||||
+249
-52
@@ -12,11 +12,39 @@
|
||||
#include "f/f_base.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/lyt/lyt_pane.h"
|
||||
#include "s/s_StateInterfaces.hpp"
|
||||
#include "toBeSorted/arc_managers/layout_arc_manager.h"
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
|
||||
SPECIAL_BASE_PROFILE(C_GAME, dCsGame_c, fProfile::C_GAME, 0x2BF, 0x06F9);
|
||||
|
||||
struct dCsGame_HIO_c {
|
||||
dCsGame_HIO_c();
|
||||
virtual ~dCsGame_HIO_c() {}
|
||||
|
||||
/* 0x04 */ f32 field_0x04;
|
||||
/* 0x08 */ f32 field_0x08;
|
||||
/* 0x0C */ f32 field_0x0C;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x18 */ f32 field_0x18;
|
||||
/* 0x1C */ f32 field_0x1C;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
/* 0x24 */ f32 field_0x24;
|
||||
/* 0x28 */ f32 field_0x28;
|
||||
/* 0x2C */ f32 field_0x2C;
|
||||
/* 0x30 */ s32 field_0x30;
|
||||
/* 0x34 */ f32 field_0x34;
|
||||
/* 0x38 */ f32 field_0x38;
|
||||
/* 0x3C */ f32 field_0x3C;
|
||||
/* 0x40 */ u8 field_0x40;
|
||||
/* 0x41 */ u8 field_0x41;
|
||||
/* 0x42 */ u8 field_0x42;
|
||||
|
||||
static const f32 sFloat1;
|
||||
static const f32 sFloat2;
|
||||
};
|
||||
|
||||
static dCsGame_HIO_c sHio;
|
||||
|
||||
dCsGame_HIO_c::dCsGame_HIO_c() {
|
||||
@@ -26,8 +54,8 @@ dCsGame_HIO_c::dCsGame_HIO_c() {
|
||||
field_0x10 = 0.0f;
|
||||
field_0x14 = 3.0f;
|
||||
field_0x20 = 10.0f;
|
||||
field_0x24 = 1.0f;
|
||||
field_0x28 = 6.0f;
|
||||
field_0x24 = sFloat1;
|
||||
field_0x28 = sFloat2;
|
||||
field_0x18 = 1.3f;
|
||||
field_0x1C = 0.5f;
|
||||
field_0x42 = 0;
|
||||
@@ -40,6 +68,8 @@ dCsGame_HIO_c::dCsGame_HIO_c() {
|
||||
field_0x40 = 5;
|
||||
}
|
||||
|
||||
dCsGame_c *dCsGame_c::sInstance;
|
||||
|
||||
STATE_DEFINE(dCsGame_c::lytItemCursor_c, Invisible);
|
||||
STATE_DEFINE(dCsGame_c::lytItemCursor_c, Bow);
|
||||
STATE_DEFINE(dCsGame_c::lytItemCursor_c, Dowsing);
|
||||
@@ -80,7 +110,14 @@ STATE_DEFINE(dCsGame_c::lytItemCursor_c::lytVacuumCsr_c, ToLock);
|
||||
STATE_DEFINE(dCsGame_c::lytItemCursor_c::lytVacuumCsr_c, Lock);
|
||||
STATE_DEFINE(dCsGame_c::lytItemCursor_c::lytVacuumCsr_c, ToNormal);
|
||||
|
||||
dCsGame_c::dCsGame_c() : mCursorType(lytItemCursor_c::CS_NONE) {
|
||||
dCsGame_c::dCsGame_c()
|
||||
: mCursorType(CS_NONE),
|
||||
mCursorActive(false),
|
||||
field_0x9A1(false),
|
||||
field_0x9A2(false),
|
||||
mActiveCursorType(mCursorType),
|
||||
mNextCursorActive(false),
|
||||
mNextCursorType(mCursorType) {
|
||||
sInstance = this;
|
||||
}
|
||||
|
||||
@@ -101,10 +138,10 @@ int dCsGame_c::create() {
|
||||
mCursor.setResAcc(&mMain2DResAcc);
|
||||
mCursor.init();
|
||||
|
||||
setNextCursorType(lytItemCursor_c::CS_NONE);
|
||||
mCursorType = lytItemCursor_c::CS_NONE;
|
||||
setNextCursorType(CS_NONE);
|
||||
mCursorType = CS_NONE;
|
||||
|
||||
mCursor.setField0x9A0(0);
|
||||
mCursorActive = false;
|
||||
mCursorIf.setCursorMask(2);
|
||||
dCsMgr_c::GetInstance()->registCursor(&mCursorIf);
|
||||
dCsBase_c::GetInstance()->setVisible(false);
|
||||
@@ -124,102 +161,118 @@ int dCsGame_c::doDelete() {
|
||||
#pragma push
|
||||
#pragma pool_data off
|
||||
int dCsGame_c::execute() {
|
||||
mCursorType = mCursor.mNextCursorType;
|
||||
mCursor.mCursorActive = mCursor.mNextCursor;
|
||||
if (mCursor.isCursorActive() && mCursorType == lytItemCursor_c::CS_DOWSING) {
|
||||
mCursorType = mNextCursorType;
|
||||
mCursorActive = mNextCursorActive;
|
||||
if (isCursorActive() && mCursorType == CS_DOWSING) {
|
||||
mCursor.mDowsing.moveEffectsIn();
|
||||
} else {
|
||||
mCursor.mDowsing.moveEffectsOut();
|
||||
}
|
||||
|
||||
bool active = mCursor.isCursorActive();
|
||||
bool active = isCursorActive();
|
||||
if (!active) {
|
||||
if (!mCursor.field_0x9A2) {
|
||||
mCursor.field_0x9A1 = active;
|
||||
if (!field_0x9A2) {
|
||||
field_0x9A1 = active;
|
||||
}
|
||||
mCursor.field_0x9A2 = false;
|
||||
field_0x9A2 = false;
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
if (active != mCursor.field_0x9A1 || mCursorType != mCursor.mActiveCursorType) {
|
||||
if (active != field_0x9A1 || mCursorType != mActiveCursorType) {
|
||||
switch (mCursorType) {
|
||||
case lytItemCursor_c::CS_BOW: mCursor.changeState(lytItemCursor_c::StateID_Bow); break;
|
||||
case lytItemCursor_c::CS_DOWSING: mCursor.changeState(lytItemCursor_c::StateID_Dowsing); break;
|
||||
case lytItemCursor_c::CS_VACUUM: mCursor.changeState(lytItemCursor_c::StateID_Vacuum); break;
|
||||
case lytItemCursor_c::CS_PACHINKO: mCursor.changeState(lytItemCursor_c::StateID_Pachinko); break;
|
||||
case lytItemCursor_c::CS_HOOKSHOT: mCursor.changeState(lytItemCursor_c::StateID_HookShot); break;
|
||||
case lytItemCursor_c::CS_PLAYERCAM: mCursor.changeState(lytItemCursor_c::StateID_PlayerCam); break;
|
||||
default: break;
|
||||
case CS_BOW: mCursor.changeState(lytItemCursor_c::StateID_Bow); break;
|
||||
case CS_DOWSING: mCursor.changeState(lytItemCursor_c::StateID_Dowsing); break;
|
||||
case CS_VACUUM: mCursor.changeState(lytItemCursor_c::StateID_Vacuum); break;
|
||||
case CS_PACHINKO: mCursor.changeState(lytItemCursor_c::StateID_Pachinko); break;
|
||||
case CS_HOOKSHOT: mCursor.changeState(lytItemCursor_c::StateID_HookShot); break;
|
||||
case CS_PLAYERCAM: mCursor.changeState(lytItemCursor_c::StateID_PlayerCam); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (!mCursor.field_0x9A2) {
|
||||
mCursor.mActiveCursorType = mCursorType;
|
||||
mCursor.field_0x9A1 = mCursor.mCursorActive;
|
||||
if (!field_0x9A2) {
|
||||
mActiveCursorType = mCursorType;
|
||||
field_0x9A1 = mCursorActive;
|
||||
}
|
||||
}
|
||||
|
||||
const mVec2_c &cursorPosition = mCursorIf.getCursorPos();
|
||||
|
||||
switch (mCursorType) {
|
||||
case lytItemCursor_c::CS_POINTER_CAT: {
|
||||
case CS_POINTER_CAT: {
|
||||
mLyt2.setPosition(mVec2_c(cursorPosition.x, cursorPosition.y + 10.0f));
|
||||
mLyt2.execute();
|
||||
break;
|
||||
}
|
||||
case lytItemCursor_c::CS_POINTER_DEF: {
|
||||
case CS_POINTER_DEF: {
|
||||
mLyt1.setPosition(cursorPosition);
|
||||
mLyt1.execute();
|
||||
break;
|
||||
}
|
||||
case lytItemCursor_c::CS_BOW:
|
||||
case lytItemCursor_c::CS_DOWSING:
|
||||
case lytItemCursor_c::CS_VACUUM:
|
||||
case lytItemCursor_c::CS_PACHINKO:
|
||||
case lytItemCursor_c::CS_PLAYERCAM:
|
||||
case lytItemCursor_c::CS_HOOKSHOT: {
|
||||
case CS_BOW:
|
||||
case CS_DOWSING:
|
||||
case CS_VACUUM:
|
||||
case CS_PACHINKO:
|
||||
case CS_PLAYERCAM:
|
||||
case CS_HOOKSHOT: {
|
||||
mCursor.setPosition(cursorPosition);
|
||||
mCursor.execute();
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
mCursor.mNextCursor = false;
|
||||
mCursor.field_0x9A2 = false;
|
||||
mNextCursorActive = false;
|
||||
field_0x9A2 = false;
|
||||
|
||||
return SUCCEEDED;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
int dCsGame_c::draw() {
|
||||
if (!mCursor.isCursorActive() || isForcedHidden()) {
|
||||
if (!isCursorActive() || isForcedHidden()) {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
switch (mCursorType) {
|
||||
case lytItemCursor_c::CS_POINTER_CAT: mLyt2.draw(); break;
|
||||
case lytItemCursor_c::CS_POINTER_DEF: mLyt1.draw(); break;
|
||||
case lytItemCursor_c::CS_BOW:
|
||||
case lytItemCursor_c::CS_DOWSING:
|
||||
case lytItemCursor_c::CS_VACUUM:
|
||||
case lytItemCursor_c::CS_PACHINKO:
|
||||
case lytItemCursor_c::CS_PLAYERCAM:
|
||||
case lytItemCursor_c::CS_HOOKSHOT: mCursor.draw(); break;
|
||||
default: break;
|
||||
case CS_POINTER_CAT: mLyt2.draw(); break;
|
||||
case CS_POINTER_DEF: mLyt1.draw(); break;
|
||||
case CS_BOW:
|
||||
case CS_DOWSING:
|
||||
case CS_VACUUM:
|
||||
case CS_PACHINKO:
|
||||
case CS_PLAYERCAM:
|
||||
case CS_HOOKSHOT: mCursor.draw(); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
bool dCsGame_c::fn_801BF5E0() const {
|
||||
return mCursor.isCursorActive() & !isForcedHidden();
|
||||
return isCursorActive() & !isForcedHidden();
|
||||
}
|
||||
|
||||
void dCsGame_c::setNextCursorType(lytItemCursor_c::CursorType_e cs) {
|
||||
mCursor.setNextCursorType(cs);
|
||||
void dCsGame_c::setNextCursorType(CursorType_e cs) {
|
||||
mNextCursorActive = true;
|
||||
mNextCursorType = cs;
|
||||
}
|
||||
|
||||
void dCsGame_c::bowStartDrawOrCharge(f32 f1, f32 f2) {
|
||||
setNextCursorType(CS_BOW);
|
||||
mCursor.bowStartDrawOrCharge(f1, f2);
|
||||
}
|
||||
|
||||
void dCsGame_c::bowAimStart() {
|
||||
setNextCursorType(CS_BOW);
|
||||
mCursor.bowAimStart();
|
||||
}
|
||||
|
||||
void dCsGame_c::bowReady() {
|
||||
setNextCursorType(CS_BOW);
|
||||
mCursor.bowReady();
|
||||
}
|
||||
|
||||
void dCsGame_c::setCursorTypePlayerCam() {
|
||||
setNextCursorType(lytItemCursor_c::CS_PLAYERCAM);
|
||||
setNextCursorType(CS_PLAYERCAM);
|
||||
}
|
||||
|
||||
mVec2_c &dCursorInterfaceGame_c::getCursorPos() {
|
||||
@@ -389,10 +442,26 @@ void dCsGame_c::lytItemCursor_c::executeState_PlayerCam() {
|
||||
}
|
||||
void dCsGame_c::lytItemCursor_c::finalizeState_PlayerCam() {}
|
||||
|
||||
// TODO - why are these here?
|
||||
const f32 dCsGame_HIO_c::sFloat1 = 1.0f;
|
||||
const f32 dCsGame_HIO_c::sFloat2 = 6.0f;
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::changeState(const sFStateID_c<lytItemCursor_c> &newState) {
|
||||
mStateMgr.changeState(newState);
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::bowStartDrawOrCharge(f32 f1, f32 f2) {
|
||||
mBow.startDrawOrCharge(f1, f2);
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::bowAimStart() {
|
||||
mBow.aimStart();
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::bowReady() {
|
||||
mBow.ready();
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::loadResAcc() {
|
||||
mLyt.setResAcc(mpResAcc);
|
||||
}
|
||||
@@ -434,12 +503,14 @@ bool dCsGame_c::lytItemCursor_c::init() {
|
||||
mLyt.calc();
|
||||
mAnm.init(mAnmGroups.tmp.mAnmGroups, lytItemCursorMap, 0x17, mpResAcc, mLyt.getLayout());
|
||||
|
||||
// TODO - nonmatching
|
||||
for (int i = 0; i < 0x17; i++) {
|
||||
d2d::AnmGroup_c &grp = mAnmGroups[i];
|
||||
grp.bind(false);
|
||||
grp.setAnimEnable(false);
|
||||
mAnmGroups[i].bind(false);
|
||||
mAnmGroups[i].setAnimEnable(false);
|
||||
}
|
||||
|
||||
// TODO - why are these temps so weird?
|
||||
|
||||
mAnmGroups.tmp.mAnmGroups[MAIN_ANIM_CURSOR].setAnimEnable(true);
|
||||
d2d::AnmGroup_c &mainLoop = mAnmGroups.tmp.mAnmGroups[MAIN_ANIM_LOOP];
|
||||
mainLoop.setFrame(0.0f);
|
||||
@@ -581,6 +652,26 @@ void dCsGame_c::lytItemCursor_c::lytDowsingCsr_c::enter() {
|
||||
mAnm[MAIN_ANIM_DOWSE_LOOP_1].setAnimEnable(true);
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytDowsingCsr_c::setParams(const mAng& rot, f32 v1, f32 v2) {
|
||||
field_0xC0 = v1;
|
||||
if (field_0xC0 <= 0.999f) {
|
||||
mRotZ = rot;
|
||||
}
|
||||
|
||||
f32 f2 = (sHio.field_0x18 - sHio.field_0x1C) * 0.05f;
|
||||
if (v2 < (field_0xCC - f2)) {
|
||||
field_0xD0 = (field_0xCC - v2);
|
||||
} else if (v2 > (field_0xCC + f2)) {
|
||||
field_0xD0 = (field_0xCC - v2);
|
||||
}
|
||||
|
||||
field_0xCC = v2;
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytDowsingCsr_c::setUnkWord(UNKWORD v) {
|
||||
field_0xC4 = v;
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytDowsingCsr_c::moveEffectsIn() {
|
||||
if (mAlpha < sHio.field_0x40) {
|
||||
mAlpha++;
|
||||
@@ -728,7 +819,11 @@ void dCsGame_c::lytItemCursor_c::lytBowCsr_c::initializeState_Draw() {
|
||||
mAnm[MAIN_ANIM_ARROW_LOOP].setAnimEnable(false);
|
||||
}
|
||||
void dCsGame_c::lytItemCursor_c::lytBowCsr_c::executeState_Draw() {
|
||||
// TODO ???
|
||||
if (!mpPanesArrowRing[0]->IsVisible()) {
|
||||
mpPanesArrowRing[0]->SetVisible(true);
|
||||
mpPanesArrowRing[1]->SetVisible(true);
|
||||
}
|
||||
|
||||
mAnm[MAIN_ANIM_ARROW_CURSOR].setAnimEnable(true);
|
||||
f32 t = field_0x50;
|
||||
if (t < 0.0001f) {
|
||||
@@ -771,6 +866,108 @@ void dCsGame_c::lytItemCursor_c::lytBowCsr_c::executeState_Charge() {
|
||||
}
|
||||
void dCsGame_c::lytItemCursor_c::lytBowCsr_c::finalizeState_Charge() {}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytBowCsr_c::enter() {
|
||||
mAnm[MAIN_ANIM_CURSOR].setFrame(2.0f);
|
||||
mAnm[MAIN_ANIM_LOOP].setAnimEnable(false);
|
||||
mAnm[MAIN_ANIM_ARROW_LOOP].setAnimEnable(false);
|
||||
|
||||
mAnm[MAIN_ANIM_ARROW_PEAK].setAnimEnable(true);
|
||||
mAnm[MAIN_ANIM_ARROW_PEAK].setFrame(0.0f);
|
||||
mpLyt->calc();
|
||||
mAnm[MAIN_ANIM_ARROW_PEAK].setAnimEnable(false);
|
||||
|
||||
mAnm[MAIN_ANIM_ARROW_EFFECT].setFrame(0.0f);
|
||||
mAnm[MAIN_ANIM_ARROW_EFFECT].setAnimEnable(true);
|
||||
mAnm[MAIN_ANIM_ARROW_KEEP].setAnimEnable(true);
|
||||
mAnm[MAIN_ANIM_ARROW_KEEP].setFrame(0.0f);
|
||||
mpLyt->calc();
|
||||
mAnm[MAIN_ANIM_ARROW_KEEP].setAnimEnable(false);
|
||||
mAnm[MAIN_ANIM_ARROW_EFFECT].setAnimEnable(false);
|
||||
|
||||
mAnm[MAIN_ANIM_ARROW_CURSOR].setAnimEnable(true);
|
||||
mAnm[MAIN_ANIM_ARROW_CURSOR].setFrame(0.0f);
|
||||
mpLyt->calc();
|
||||
mAnm[MAIN_ANIM_ARROW_CURSOR].setAnimEnable(false);
|
||||
|
||||
mAnm[MAIN_ANIM_ARROW_ON].setAnimEnable(true);
|
||||
mAnm[MAIN_ANIM_ARROW_ON].setFrame(0.0f);
|
||||
mpLyt->calc();
|
||||
mAnm[MAIN_ANIM_ARROW_ON].setAnimEnable(false);
|
||||
|
||||
mAnm[MAIN_ANIM_LOOP].setAnimEnable(true);
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytBowCsr_c::init() {
|
||||
mpPanesArrowRing[0] = mpLyt->findPane("N_arrowRing_00");
|
||||
mpPanesArrowRing[1] = mpLyt->findPane("N_arrowRingS_00");
|
||||
mpPanesArrowRing[2] = mpLyt->findPane("N_arrowRing_01");
|
||||
mpPanesArrowRing[3] = mpLyt->findPane("N_arrowRingS_02");
|
||||
mAnm[MAIN_ANIM_ARROW_CURSOR].setFrame(0.0f);
|
||||
mAnm[MAIN_ANIM_ARROW_CURSOR].setAnimEnable(true);
|
||||
mAnm[MAIN_ANIM_ARROW_ON].setFrame(0.0f);
|
||||
mAnm[MAIN_ANIM_ARROW_ON].setAnimEnable(true);
|
||||
mAnm[MAIN_ANIM_ARROW_EFFECT].setFrame(0.0f);
|
||||
mAnm[MAIN_ANIM_ARROW_EFFECT].setAnimEnable(false);
|
||||
mAnm[MAIN_ANIM_ARROW_KEEP].setFrame(0.0f);
|
||||
mAnm[MAIN_ANIM_ARROW_KEEP].setAnimEnable(false);
|
||||
mAnm[MAIN_ANIM_ARROW_PEAK].setFrame(0.0f);
|
||||
mAnm[MAIN_ANIM_ARROW_PEAK].setAnimEnable(false);
|
||||
|
||||
mStateMgr.changeState(StateID_Select);
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytBowCsr_c::execute() {
|
||||
mAnm[MAIN_ANIM_CURSOR].setFrame(2.0f);
|
||||
mAnm[MAIN_ANIM_LOOP].setAnimEnable(false);
|
||||
mStateMgr.executeState();
|
||||
|
||||
if (mAnm[MAIN_ANIM_ARROW_KEEP].isEnabled()) {
|
||||
mAnm[MAIN_ANIM_ARROW_KEEP].setFrame(field_0x54 * mAnm[MAIN_ANIM_ARROW_KEEP].getLastFrame());
|
||||
}
|
||||
|
||||
if (mAnm[MAIN_ANIM_ARROW_EFFECT].isEnabled()) {
|
||||
mAnm[MAIN_ANIM_ARROW_EFFECT].play();
|
||||
if (mAnm[MAIN_ANIM_ARROW_EFFECT].isEndReached()) {
|
||||
mAnm[MAIN_ANIM_ARROW_EFFECT].setAnimEnable(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (mAnm[MAIN_ANIM_ARROW_PEAK].isEnabled()) {
|
||||
mAnm[MAIN_ANIM_ARROW_PEAK].play();
|
||||
}
|
||||
|
||||
if (mAnm[MAIN_ANIM_LOOP].isEnabled()) {
|
||||
mAnm[MAIN_ANIM_LOOP].play();
|
||||
}
|
||||
|
||||
if (mAnm[MAIN_ANIM_ARROW_LOOP].isEnabled()) {
|
||||
mAnm[MAIN_ANIM_ARROW_LOOP].play();
|
||||
}
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytBowCsr_c::startDrawOrCharge(f32 f1, f32 f2) {
|
||||
field_0x50 = f1;
|
||||
field_0x54 = f2;
|
||||
const sStateIDIf_c *currentStateId = mStateMgr.getStateID();
|
||||
if (*currentStateId != StateID_Draw && *currentStateId != StateID_Charge) {
|
||||
mStateMgr.changeState(StateID_Draw);
|
||||
}
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytBowCsr_c::aimStart() {
|
||||
if (*mStateMgr.getStateID() != StateID_AimStart) {
|
||||
enter();
|
||||
mStateMgr.changeState(StateID_AimStart);
|
||||
}
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytBowCsr_c::ready() {
|
||||
if (*mStateMgr.getStateID() != StateID_Ready) {
|
||||
enter();
|
||||
mStateMgr.changeState(StateID_Ready);
|
||||
}
|
||||
}
|
||||
|
||||
void dCsGame_c::lytItemCursor_c::lytPachinkoCsr_c::initializeState_Invisible() {}
|
||||
void dCsGame_c::lytItemCursor_c::lytPachinkoCsr_c::executeState_Invisible() {}
|
||||
void dCsGame_c::lytItemCursor_c::lytPachinkoCsr_c::finalizeState_Invisible() {}
|
||||
|
||||
Reference in New Issue
Block a user