mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-03 01:54:02 -04:00
Merge pull request #520 from LagoLunatic/player
d_a_npc_kamome 100%, no match
This commit is contained in:
@@ -186,7 +186,8 @@ public:
|
||||
/* 0x0058 */ f32 field_0x0058;
|
||||
/* 0x005C */ f32 field_0x005c;
|
||||
/* 0x0060 */ u8 mbLandingDemoStarted;
|
||||
/* 0x0061 */ u8 field_0x0061[0x0063 - 0x0061];
|
||||
/* 0x0061 */ u8 field_0x0061[0x0062 - 0x0061];
|
||||
/* 0x0062 */ u8 field_0x0062;
|
||||
/* 0x0063 */ u8 field_0x0063;
|
||||
/* 0x0064 */ u8 field_0x0064[0x0066 - 0x0064];
|
||||
/* 0x0066 */ u8 field_0x0066;
|
||||
|
||||
@@ -69,15 +69,17 @@ struct TVec3<f32> {
|
||||
f32 y;
|
||||
f32 z;
|
||||
|
||||
// inline TVec3(const Vec& i_vec) {
|
||||
// setTVec3f(&i_vec.x, &x);
|
||||
// }
|
||||
inline TVec3(const Vec& i_vec) {
|
||||
setTVec3f(&i_vec.x, &x);
|
||||
}
|
||||
|
||||
// inline TVec3(const TVec3<f32>& i_vec) {
|
||||
// setTVec3f(&i_vec.x, &x);
|
||||
// }
|
||||
inline TVec3(const TVec3<f32>& i_vec) {
|
||||
setTVec3f(&i_vec.x, &x);
|
||||
}
|
||||
|
||||
// TVec3() {}
|
||||
TVec3() {}
|
||||
|
||||
TVec3(f32 x, f32 y, f32 z) { set(x, y, z); }
|
||||
|
||||
operator Vec*() { return (Vec*)&x; }
|
||||
operator const Vec*() const { return (Vec*)&x; }
|
||||
|
||||
@@ -32,6 +32,8 @@ public:
|
||||
void SetCross(const cXyz& pos) { mLin.SetEnd(pos); }
|
||||
cXyz& i_GetCross() { return mLin.GetEnd(); }
|
||||
cM3dGLin* GetLinP() { return &mLin; }
|
||||
void OnBackFlag() { mBackFlag = true; }
|
||||
void OffBackFlag() { mBackFlag = false; }
|
||||
bool ChkBackFlag() const { return mBackFlag; }
|
||||
bool ChkFrontFlag() const { return mFrontFlag; }
|
||||
bool GetPreWallChk() const { return mPreWallChk; }
|
||||
|
||||
@@ -22,7 +22,9 @@ public:
|
||||
mpBgW = NULL;
|
||||
mActorId = -1;
|
||||
}
|
||||
void SetPolyInfo(const cBgS_PolyInfo&);
|
||||
void SetPolyInfo(const cBgS_PolyInfo& other) {
|
||||
*this = other;
|
||||
}
|
||||
void SetActorInfo(int, void*, unsigned int);
|
||||
bool ChkSafe(const void*, unsigned int) const;
|
||||
void SetPolyIndex(int);
|
||||
|
||||
@@ -329,7 +329,11 @@ public:
|
||||
void Init(int, int, void*, unsigned int);
|
||||
virtual void Ct();
|
||||
void PlusCcMove(f32, f32, f32);
|
||||
void ClrCcMove();
|
||||
void ClrCcMove() {
|
||||
mXyz.z = 0.0f;
|
||||
mXyz.y = 0.0f;
|
||||
mXyz.x = 0.0f;
|
||||
}
|
||||
void PlusDmg(int);
|
||||
f32 GetWeightF() const;
|
||||
virtual void ClrAt() {}
|
||||
|
||||
@@ -93,7 +93,7 @@ T cLib_getRndValue(T min, T range) {
|
||||
|
||||
template <typename T>
|
||||
T cLib_calcTimer(T* value) {
|
||||
if ((s32)*value != 0) {
|
||||
if (*value != (u16)0) {
|
||||
*value = *value - 1;
|
||||
}
|
||||
return *value;
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
#ifndef D_A_NPC_KAMOME_H
|
||||
#define D_A_NPC_KAMOME_H
|
||||
|
||||
#include "d/actor/d_a_player_npc.h"
|
||||
#include "d/d_bg_s_lin_chk.h"
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
|
||||
class JORMContext;
|
||||
class daNpc_kam_c;
|
||||
|
||||
class daNpc_kam_HIO1_c {
|
||||
public:
|
||||
daNpc_kam_HIO1_c();
|
||||
virtual ~daNpc_kam_HIO1_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
public:
|
||||
/* 0x04 */ f32 mSpeedF;
|
||||
/* 0x08 */ f32 mUnused08;
|
||||
/* 0x0C */ f32 mFlappingSpeedF;
|
||||
/* 0x10 */ f32 mAccelF;
|
||||
/* 0x14 */ s16 mGlidingAngVelY;
|
||||
/* 0x16 */ s16 mGlidingAngVelX;
|
||||
/* 0x18 */ s16 mMaxAngleZ;
|
||||
/* 0x1A */ s16 mFlappingAngVelY;
|
||||
/* 0x1C */ s16 mFlappingAngVelX;
|
||||
/* 0x1E */ s16 mAngVelStepScale;
|
||||
/* 0x20 */ s16 mAngVelMaxStep;
|
||||
/* 0x22 */ s16 mAngVelMinStep;
|
||||
/* 0x24 */ s16 mFlapDuration;
|
||||
/* 0x26 */ s16 mFlapExhaustedDuration;
|
||||
/* 0x28 */ s16 mFlapEnergyDuration;
|
||||
/* 0x2A */ u8 field_2A[0x2C - 0x2A];
|
||||
}; // Size: 0x2C
|
||||
|
||||
class daNpc_kam_HIO_c : public JORReflexible {
|
||||
public:
|
||||
struct hio_prm_c {
|
||||
// Note: Offsets are relative to daNpc_kam_HIO_c instead of hio_prm_c for convenience.
|
||||
/* 0x08 */ f32 m08;
|
||||
/* 0x0C */ f32 m0C;
|
||||
/* 0x10 */ f32 m10;
|
||||
/* 0x14 */ f32 m14;
|
||||
/* 0x18 */ f32 m18;
|
||||
/* 0x1C */ s16 m1C;
|
||||
/* 0x1E */ u8 m1E;
|
||||
}; // Size: 0x18
|
||||
|
||||
daNpc_kam_HIO_c();
|
||||
virtual ~daNpc_kam_HIO_c() {}
|
||||
|
||||
public:
|
||||
/* 0x04 */ s8 mChildID;
|
||||
/* 0x08 */ hio_prm_c prm;
|
||||
/* 0x20 */ daNpc_kam_c* mpActor;
|
||||
/* 0x24 */ daNpc_kam_HIO1_c mHio1;
|
||||
}; // Size: 0x50
|
||||
|
||||
class daNpc_kam_c : public daPy_npc_c {
|
||||
public:
|
||||
enum ActionStatus {
|
||||
ACTION_STARTING = 0,
|
||||
ACTION_ONGOING_1 = 1,
|
||||
ACTION_ONGOING_2 = 2,
|
||||
ACTION_ONGOING_3 = 3,
|
||||
ACTION_ENDING = -1,
|
||||
};
|
||||
|
||||
enum Animation {
|
||||
ANM_WAIT1 = 0,
|
||||
ANM_WAIT2 = 1,
|
||||
ANM_SING = 2,
|
||||
};
|
||||
|
||||
typedef int (daNpc_kam_c::*ActionFunc)(void*);
|
||||
typedef void (daNpc_kam_c::*EventActionInitFunc)(int evtStaffId);
|
||||
typedef BOOL (daNpc_kam_c::*EventActionFunc)(int evtStaffId);
|
||||
|
||||
void offLineHit() { cLib_offBit(mHitFlags, 0x07UL); }
|
||||
void onFrontLineHit() { cLib_onBit(mHitFlags, 0x01UL); }
|
||||
u32 isFrontLineHit() { return cLib_checkBit(mHitFlags, 0x01UL); }
|
||||
void onLeftLineHit() { cLib_onBit(mHitFlags, 0x02UL); }
|
||||
u32 isLeftLineHit() { return cLib_checkBit(mHitFlags, 0x02UL); }
|
||||
void onRightLineHit() { cLib_onBit(mHitFlags, 0x04UL); }
|
||||
u32 isRightLineHit() { return cLib_checkBit(mHitFlags, 0x04UL); }
|
||||
void onWaterHit() { cLib_onBit(mHitFlags, 0x08UL); }
|
||||
void offWaterHit() { cLib_offBit(mHitFlags, 0x08UL); }
|
||||
u32 isWaterHit() { return cLib_checkBit(mHitFlags, 0x08UL); }
|
||||
void onNoBgCheck() { cLib_onBit(mHitFlags, 0x10UL); }
|
||||
void offNoBgCheck() { cLib_offBit(mHitFlags, 0x10UL); }
|
||||
u32 isNoBgCheck() { return cLib_checkBit(mHitFlags, 0x10UL); }
|
||||
|
||||
void onHyoiKamome() { m_hyoi_kamome = true; }
|
||||
void offHyoiKamome() { m_hyoi_kamome = false; }
|
||||
|
||||
s16 XyCheckCB(int);
|
||||
int callDemoStartCheck();
|
||||
s16 XyEventCB(int);
|
||||
~daNpc_kam_c();
|
||||
void setAttention(bool, int);
|
||||
void setBaseMtx();
|
||||
BOOL createHeap();
|
||||
s32 create();
|
||||
daNpc_kam_c() {}
|
||||
BOOL init();
|
||||
BOOL setAction(ActionFunc*, ActionFunc, void*);
|
||||
void npcAction(void*);
|
||||
void setNpcAction(ActionFunc, void*);
|
||||
void playerAction(void*);
|
||||
void setPlayerAction(ActionFunc, void*);
|
||||
BOOL returnLinkCheck();
|
||||
BOOL changeAreaCheck();
|
||||
BOOL areaOutCheck();
|
||||
BOOL getStickAngY(s16*, s16*);
|
||||
s16 getAngleX();
|
||||
int wallHitCheck();
|
||||
BOOL npcTurnCheck(s16*);
|
||||
int waitNpcAction(void*);
|
||||
BOOL keyProc();
|
||||
int waitPlayerAction(void*);
|
||||
BOOL damagePlayerAction(void*);
|
||||
void eventOrder();
|
||||
void checkOrder();
|
||||
BOOL checkCommandTalk();
|
||||
void returnLinkPlayer();
|
||||
BOOL eventProc();
|
||||
void eventEnd();
|
||||
BOOL actionDefault(int);
|
||||
void initialWaitEvent(int);
|
||||
BOOL actionWaitEvent(int);
|
||||
void initialChangeEvent(int);
|
||||
void initialDescendEvent(int);
|
||||
BOOL actionDescendEvent(int);
|
||||
void initialAreaOutTurn(int);
|
||||
BOOL actionAreaOutTurn(int);
|
||||
void setAnm(int);
|
||||
void setCollision();
|
||||
void setLineBgCheck();
|
||||
void animationPlay();
|
||||
BOOL execute();
|
||||
BOOL draw();
|
||||
f32 getGroundY() { return mAcch.GetGroundH(); }
|
||||
MtxP getLeftHandMatrix() { return mCullMtx; }
|
||||
MtxP getRightHandMatrix() { return mCullMtx; }
|
||||
f32 getBaseAnimeFrameRate() { return 1.0f; }
|
||||
f32 getBaseAnimeFrame() { return 0.0f; }
|
||||
void restartPoint(s16) {}
|
||||
|
||||
static bool m_hyoi_kamome;
|
||||
|
||||
public:
|
||||
/* 0x4EC */ request_of_phase_process_class mPhs;
|
||||
/* 0x4F4 */ mDoExt_McaMorf* mpMorf;
|
||||
/* 0x4F8 */ dBgS_ObjAcch mAcch;
|
||||
/* 0x6BC */ dBgS_AcchCir mAcchCirs[2];
|
||||
/* 0x73C */ dBgS_LinChk mLinChk;
|
||||
/* 0x7A8 */ dCcD_Stts mStts;
|
||||
/* 0x7E4 */ dCcD_Sph mAtSph;
|
||||
/* 0x910 */ dCcD_Sph mTgSph;
|
||||
/* 0xA3C */ dCcD_Cps mCps;
|
||||
/* 0xB74 */ cXyz mDescendStartPos;
|
||||
/* 0xB80 */ cXyz mDescendStartPosUnangled;
|
||||
/* 0xB8C */ csXyz mDescendStartAngle;
|
||||
/* 0xB92 */ u8 mB92[0xBA0 - 0xB92];
|
||||
/* 0xBA0 */ cBgS_PolyInfo mPolyInfo;
|
||||
/* 0xBB0 */ ActionFunc mCurrNpcActionFunc;
|
||||
/* 0xBBC */ ActionFunc mCurrPlayerActionFunc;
|
||||
/* 0xBC8 */ u32 mShadowId;
|
||||
/* 0xBCC */ u32 mHitFlags;
|
||||
/* 0xBD0 */ u8 mBD0[0xBD4 - 0xBD0];
|
||||
/* 0xBD4 */ int mAnmIdx;
|
||||
/* 0xBD8 */ f32 mMaxY;
|
||||
/* 0xBDC */ f32 mMinY;
|
||||
/* 0xBE0 */ f32 mPrevMorfFrame;
|
||||
/* 0xBE4 */ f32 mTargetSpeedF;
|
||||
/* 0xBE8 */ f32 mAccelF;
|
||||
/* 0xBEC */ s16 mTargetAngleX;
|
||||
/* 0xBEE */ s16 mLockAngleXTimer;
|
||||
/* 0xBF0 */ s16 mAngVelY;
|
||||
/* 0xBF2 */ s16 mAngVelX;
|
||||
/* 0xBF4 */ s16 mTargetAngVelY;
|
||||
/* 0xBF6 */ s16 mTargetAngVelX;
|
||||
/* 0xBF8 */ s16 m_jnt_body;
|
||||
/* 0xBFA */ s16 mFlapTimer;
|
||||
/* 0xBFC */ s16 mFlapExhaustedTimer;
|
||||
/* 0xBFE */ s16 mFlapEnergyTimer;
|
||||
/* 0xC00 */ s8 mAnmTblIdx;
|
||||
/* 0xC01 */ s8 mReachedAnimEnd;
|
||||
/* 0xC02 */ s8 mEventState;
|
||||
/* 0xC03 */ s8 mCurrEventIdxIdx;
|
||||
/* 0xC04 */ u8 mC04[0xC05 - 0xC04];
|
||||
/* 0xC05 */ s8 mActionStatus;
|
||||
/* 0xC06 */ u8 mUnusedC06;
|
||||
/* 0xC07 */ u8 mC07[0xC08 - 0xC07];
|
||||
/* 0xC08 */ s16 mC08;
|
||||
/* 0xC08 */ s16 mC0A;
|
||||
/* 0xC08 */ s16 mC0C;
|
||||
/* 0xC08 */ s16 mUnusedC0E;
|
||||
/* 0xC10 */ u8 mC10[0xC14 - 0xC10];
|
||||
/* 0xC14 */ f32 mUnusedC14;
|
||||
/* 0xC18 */ u8 mC18[0xC1C - 0xC18];
|
||||
/* 0xC1C */ s16 mWaitTimer;
|
||||
/* 0xC1E */ s16 mAreaOutTimer;
|
||||
/* 0xC20 */ s16 mEventIdxs[3];
|
||||
/* 0xC26 */ u8 field_C26[0xC28 - 0xC26];
|
||||
};
|
||||
|
||||
#endif /* D_A_NPC_KAMOME_H */
|
||||
@@ -161,47 +161,48 @@ public:
|
||||
|
||||
virtual MtxP getLeftHandMatrix() = 0;
|
||||
virtual MtxP getRightHandMatrix() = 0;
|
||||
virtual void getGroundY() = 0;
|
||||
virtual void getTactMusic() const;
|
||||
virtual void getTactTimerCancel() const;
|
||||
virtual BOOL checkPlayerGuard() const;
|
||||
virtual void getGrabMissActor();
|
||||
virtual u32 checkPlayerFly() const;
|
||||
virtual void checkFrontRoll() const;
|
||||
virtual void checkBottleSwing() const;
|
||||
virtual void checkCutCharge() const;
|
||||
virtual void getBokoFlamePos(cXyz*);
|
||||
virtual void checkTactWait() const;
|
||||
virtual void setTactZev(unsigned int, int, char*);
|
||||
virtual void onDekuSpReturnFlg(u8);
|
||||
virtual void checkComboCutTurn() const;
|
||||
virtual f32 getGroundY() = 0;
|
||||
virtual int getTactMusic() const { return -1; }
|
||||
virtual int getTactTimerCancel() const { return 0; }
|
||||
virtual BOOL checkPlayerGuard() const { return FALSE; }
|
||||
virtual fopAc_ac_c* getGrabMissActor() { return NULL; }
|
||||
virtual BOOL checkPlayerFly() const { return FALSE; }
|
||||
virtual BOOL checkFrontRoll() const { return FALSE; }
|
||||
virtual BOOL checkBottleSwing() const { return FALSE; }
|
||||
virtual BOOL checkCutCharge() const { return FALSE; }
|
||||
virtual BOOL getBokoFlamePos(cXyz*) { return FALSE; }
|
||||
virtual BOOL checkTactWait() const { return FALSE; }
|
||||
virtual void setTactZev(unsigned int, int, char*) {}
|
||||
virtual void onDekuSpReturnFlg(u8) {}
|
||||
virtual bool checkComboCutTurn() const { return false; }
|
||||
virtual f32 getBaseAnimeFrameRate() = 0;
|
||||
virtual void getBaseAnimeFrame() = 0;
|
||||
virtual void getItemID() const;
|
||||
virtual void getThrowBoomerangID() const;
|
||||
virtual u32 getGrabActorID() const;
|
||||
virtual void checkGrabBarrel();
|
||||
virtual void checkPlayerNoDraw();
|
||||
virtual void checkRopeTag();
|
||||
virtual void checkRopeReadyAnime() const;
|
||||
virtual void voiceStart(u32);
|
||||
virtual void setOutPower(f32, s16, int);
|
||||
virtual void onFrollCrashFlg(u32);
|
||||
virtual void getModelJointMtx(u16);
|
||||
virtual void getOldSpeedY();
|
||||
virtual void setHookshotCarryOffset(unsigned int, const cXyz*);
|
||||
virtual void setPlayerPosAndAngle(cXyz*, s16);
|
||||
virtual void setPlayerPosAndAngle(cXyz*, csXyz*);
|
||||
virtual void setPlayerPosAndAngle(MtxP);
|
||||
virtual void setThrowDamage(cXyz*, s16, f32, f32, int);
|
||||
virtual void changeTextureAnime(u16, u16, int);
|
||||
virtual void cancelChangeTextureAnime();
|
||||
virtual f32 getBaseAnimeFrame() = 0;
|
||||
virtual u32 getItemID() const { return -1; }
|
||||
virtual u32 getThrowBoomerangID() const { return -1; }
|
||||
virtual u32 getGrabActorID() const { return -1; }
|
||||
virtual BOOL checkGrabBarrel() { return FALSE; }
|
||||
virtual BOOL checkPlayerNoDraw() { return FALSE; }
|
||||
virtual BOOL checkRopeTag() { return FALSE; }
|
||||
virtual BOOL checkRopeReadyAnime() const { return FALSE; }
|
||||
virtual void voiceStart(u32) {}
|
||||
virtual void setOutPower(f32, s16, int) {}
|
||||
virtual void onFrollCrashFlg(u32) {}
|
||||
virtual MtxP getModelJointMtx(u16) { return NULL; }
|
||||
virtual f32 getOldSpeedY() { return 0.0f; }
|
||||
virtual BOOL setHookshotCarryOffset(unsigned int, const cXyz*) { return FALSE; }
|
||||
virtual void setPlayerPosAndAngle(cXyz*, s16) {}
|
||||
virtual void setPlayerPosAndAngle(cXyz*, csXyz*) {}
|
||||
virtual void setPlayerPosAndAngle(MtxP) {}
|
||||
virtual BOOL setThrowDamage(cXyz*, s16, f32, f32, int) { return FALSE; }
|
||||
virtual void changeTextureAnime(u16, u16, int) {}
|
||||
virtual void cancelChangeTextureAnime() {}
|
||||
|
||||
void getSwordTopPos() const;
|
||||
void getLeftHandPos() const;
|
||||
void getRopeJumpLand() const;
|
||||
void checkRopeForceEnd() const;
|
||||
cXyz getHeadTopPos() const { return mHeadTopPos; }
|
||||
cXyz* getHeadTopPosP() { return &mHeadTopPos; }
|
||||
void changePlayer(fopAc_ac_c*);
|
||||
void objWindHitCheck(dCcD_Cyl*);
|
||||
void setDoButtonQuake();
|
||||
|
||||
@@ -1004,39 +1004,39 @@ public:
|
||||
|
||||
virtual MtxP getLeftHandMatrix();
|
||||
virtual MtxP getRightHandMatrix();
|
||||
virtual void getGroundY();
|
||||
virtual void getTactMusic() const;
|
||||
virtual void getTactTimerCancel() const;
|
||||
virtual f32 getGroundY();
|
||||
virtual int getTactMusic() const;
|
||||
virtual int getTactTimerCancel() const;
|
||||
virtual BOOL checkPlayerGuard() const;
|
||||
virtual void getGrabMissActor();
|
||||
virtual u32 checkPlayerFly() const;
|
||||
virtual void checkFrontRoll() const;
|
||||
virtual void checkBottleSwing() const;
|
||||
virtual void checkCutCharge() const;
|
||||
virtual void getBokoFlamePos(cXyz*);
|
||||
virtual void checkTactWait() const;
|
||||
virtual fopAc_ac_c* getGrabMissActor();
|
||||
virtual BOOL checkPlayerFly() const;
|
||||
virtual BOOL checkFrontRoll() const;
|
||||
virtual BOOL checkBottleSwing() const;
|
||||
virtual BOOL checkCutCharge() const;
|
||||
virtual BOOL getBokoFlamePos(cXyz*);
|
||||
virtual BOOL checkTactWait() const;
|
||||
virtual void setTactZev(unsigned int, int, char*);
|
||||
virtual void onDekuSpReturnFlg(u8);
|
||||
virtual void checkComboCutTurn() const;
|
||||
virtual bool checkComboCutTurn() const;
|
||||
virtual f32 getBaseAnimeFrameRate();
|
||||
virtual void getBaseAnimeFrame();
|
||||
virtual void getItemID() const;
|
||||
virtual void getThrowBoomerangID() const;
|
||||
virtual f32 getBaseAnimeFrame();
|
||||
virtual u32 getItemID() const;
|
||||
virtual u32 getThrowBoomerangID() const;
|
||||
virtual u32 getGrabActorID() const;
|
||||
virtual void checkGrabBarrel();
|
||||
virtual void checkPlayerNoDraw();
|
||||
virtual void checkRopeTag();
|
||||
virtual void checkRopeReadyAnime() const;
|
||||
virtual BOOL checkGrabBarrel();
|
||||
virtual BOOL checkPlayerNoDraw();
|
||||
virtual BOOL checkRopeTag();
|
||||
virtual BOOL checkRopeReadyAnime() const;
|
||||
virtual void voiceStart(u32);
|
||||
virtual void setOutPower(f32, s16, int);
|
||||
virtual void onFrollCrashFlg(u32);
|
||||
virtual void getModelJointMtx(u16);
|
||||
virtual void getOldSpeedY();
|
||||
virtual void setHookshotCarryOffset(unsigned int, const cXyz*);
|
||||
virtual MtxP getModelJointMtx(u16);
|
||||
virtual f32 getOldSpeedY();
|
||||
virtual BOOL setHookshotCarryOffset(unsigned int, const cXyz*);
|
||||
virtual void setPlayerPosAndAngle(cXyz*, s16);
|
||||
virtual void setPlayerPosAndAngle(cXyz*, csXyz*);
|
||||
virtual void setPlayerPosAndAngle(float (*)[4]);
|
||||
virtual void setThrowDamage(cXyz*, s16, f32, f32, int);
|
||||
virtual BOOL setThrowDamage(cXyz*, s16, f32, f32, int);
|
||||
virtual void changeTextureAnime(u16, u16, int);
|
||||
virtual void cancelChangeTextureAnime();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
class daPy_npc_c : public daPy_py_c {
|
||||
public:
|
||||
/* 0x320 */ dBgS_Acch mAcch;
|
||||
/* 0x320 */ dBgS_ObjAcch mAcch;
|
||||
/* 0x4E4 */ u32 m4E4;
|
||||
/* 0x4E8 */ u8 m4E8;
|
||||
/* 0x4E9 */ u8 mDamageFogTimer;
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
void executeDamageFog() { cLib_calcTimer(&mDamageFogTimer); }
|
||||
|
||||
virtual void restartPoint(s16) {}
|
||||
virtual void isTagCheckOK() {}
|
||||
virtual BOOL isTagCheckOK() { return TRUE; }
|
||||
virtual void setMessageAnimation(u8) {}
|
||||
|
||||
int check_initialRoom();
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
cXyz* GetPos() { return pm_pos; }
|
||||
cXyz* GetOldPos() { return pm_old_pos; }
|
||||
f32 GetGroundH() { return m_ground_h; }
|
||||
f32 GetRoofHeight() { return m_roof_height; }
|
||||
f32 GetRoofHeight() { return m_roof_crr_height; }
|
||||
f32 GetSeaHeight() { return m_sea_height; }
|
||||
void SetLin() { m_lin.SetStartEnd(*pm_old_pos, *pm_pos); }
|
||||
bool ChkGroundFind() { return m_flags & GROUND_FIND; }
|
||||
@@ -160,7 +160,9 @@ public:
|
||||
bool ChkMoveBGOnly() const { return m_flags & MOVE_BG_ONLY; }
|
||||
void SetWallHit() { m_flags |= WALL_HIT; }
|
||||
void ClrWallNone() { m_flags &= ~WALL_NONE; }
|
||||
void OnSeaCheckOn() { m_flags |= SEA_CHECK;}
|
||||
bool ChkSeaCheckOn() { return m_flags & SEA_CHECK;}
|
||||
void OnSeaWaterHeight() { m_flags |= SEA_WATER_HEIGHT;}
|
||||
bool ChkSeaWaterHeight() { return m_flags & SEA_WATER_HEIGHT;}
|
||||
bool ChkSeaIn() { return m_flags & SEA_IN;}
|
||||
cM3dGCyl* GetWallBmdCylP() { return &m_wall_cyl; }
|
||||
@@ -189,8 +191,8 @@ public:
|
||||
/* 0x0B4 */ f32 field_0xb4;
|
||||
/* 0x0B8 */ f32 field_0xb8;
|
||||
/* 0x0BC */ f32 m_roof_y;
|
||||
/* 0x0C0 */ f32 m_roof_height;
|
||||
/* 0x0C4 */ f32 m_roof_crr_height;
|
||||
/* 0x0C0 */ f32 m_roof_crr_height;
|
||||
/* 0x0C4 */ f32 m_roof_height;
|
||||
/* 0x0C8 */ f32 field_0xc8;
|
||||
/* 0x0CC */ cBgS_PolyInfo* pm_out_poly_info;
|
||||
/* 0x0D0 */ f32 m_sea_height;
|
||||
|
||||
+56
-23
@@ -375,6 +375,10 @@ public:
|
||||
bool checkPlayerStatus(int param_0, int i, u32 flag) { return flag & mPlayerStatus[param_0][i]; }
|
||||
|
||||
u8 getSelectItem(int idx) { return mEquippedItems[idx]; }
|
||||
|
||||
void setAStatus(u8 status) { mCurrButtonBAction = status; }
|
||||
void setDoStatus(u8 status) { mCurrButtonAAction = status; }
|
||||
void setRStatusForce(u8 status) { field_0x4930 = status; }
|
||||
|
||||
void setCurrentGrafPort(J2DOrthoGraph* i_graf) { mCurrentGrafPort = i_graf; }
|
||||
void setCurrentWindow(dDlst_window_c* i_window) { mCurrentWindow = i_window; }
|
||||
@@ -666,6 +670,10 @@ inline u8 dComIfGs_getBait(int i_idx) {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getBagItem().getBait(i_idx);
|
||||
}
|
||||
|
||||
inline void dComIfGs_setBaitItemEmpty() {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getBagItem().setBaitItemEmpty();
|
||||
}
|
||||
|
||||
inline u8 dComIfGs_getReserve(int i_idx) {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getBagItem().getReserve(i_idx);
|
||||
}
|
||||
@@ -1409,8 +1417,12 @@ inline daPy_py_c* daPy_getPlayerActorClass() {
|
||||
return (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
}
|
||||
|
||||
inline fopAc_ac_c* dComIfGp_getLinkPlayer() {
|
||||
return g_dComIfG_gameInfo.play.getPlayerPtr(0);
|
||||
}
|
||||
|
||||
inline daPy_lk_c* daPy_getPlayerLinkActorClass() {
|
||||
return (daPy_lk_c*)g_dComIfG_gameInfo.play.getPlayerPtr(0);
|
||||
return (daPy_lk_c*)dComIfGp_getLinkPlayer();
|
||||
}
|
||||
|
||||
inline s8 dComIfGp_getPlayerCameraID(int idx) {
|
||||
@@ -1483,6 +1495,18 @@ inline u8 dComIfGp_getMiniGameType() {
|
||||
return g_dComIfG_gameInfo.play.mMiniGameType;
|
||||
}
|
||||
|
||||
inline void dComIfGp_setAStatus(u8 status) {
|
||||
g_dComIfG_gameInfo.play.setAStatus(status);
|
||||
}
|
||||
|
||||
inline void dComIfGp_setDoStatus(u8 status) {
|
||||
g_dComIfG_gameInfo.play.setDoStatus(status);
|
||||
}
|
||||
|
||||
inline void dComIfGp_setRStatusForce(u8 status) {
|
||||
g_dComIfG_gameInfo.play.setRStatusForce(status);
|
||||
}
|
||||
|
||||
inline dDlst_window_c * dComIfGp_getWindow(int idx) { return &g_dComIfG_gameInfo.play.mDlstWindow[idx]; }
|
||||
|
||||
inline dADM_CharTbl* dComIfGp_CharTbl() {
|
||||
@@ -1580,72 +1604,72 @@ inline void dComIfGp_event_setCullRate(f32 ratio) {
|
||||
g_dComIfG_gameInfo.play.getEvent().setCullRate(ratio);
|
||||
}
|
||||
|
||||
inline dEvent_manager_c& dComIfGp_getEventManager() {
|
||||
return g_dComIfG_gameInfo.play.getEvtManager();
|
||||
inline dEvent_manager_c* dComIfGp_getPEvtManager() {
|
||||
return &g_dComIfG_gameInfo.play.getEvtManager();
|
||||
}
|
||||
|
||||
inline s16 dComIfGp_evmng_getEventPrio(s16 eventIdx) {
|
||||
return dComIfGp_getEventManager().getEventPrio(eventIdx);
|
||||
return dComIfGp_getPEvtManager()->getEventPrio(eventIdx);
|
||||
}
|
||||
|
||||
inline s16 dComIfGp_evmng_getEventIdx(const char* pName, u8 evNo) {
|
||||
return dComIfGp_getEventManager().getEventIdx(pName, evNo);
|
||||
return dComIfGp_getPEvtManager()->getEventIdx(pName, evNo);
|
||||
}
|
||||
|
||||
inline int dComIfGp_evmng_getMyStaffId(const char* pName, fopAc_ac_c* pActor, s32 param_3) {
|
||||
return dComIfGp_getEventManager().getMyStaffId(pName, pActor, param_3);
|
||||
return dComIfGp_getPEvtManager()->getMyStaffId(pName, pActor, param_3);
|
||||
}
|
||||
|
||||
inline int dComIfGp_evmng_getMyActIdx(int staffIdx, const char* const* pActions, int actionCount, int force, int param_5) {
|
||||
return dComIfGp_getEventManager().getMyActIdx(staffIdx, pActions, actionCount, force, param_5);
|
||||
return dComIfGp_getPEvtManager()->getMyActIdx(staffIdx, pActions, actionCount, force, param_5);
|
||||
}
|
||||
|
||||
inline f32* dComIfGp_evmng_getMyFloatP(int staffIdx, const char* name) {
|
||||
return reinterpret_cast<f32*>(dComIfGp_getEventManager().getMySubstanceP(staffIdx, name, 0)); //type 0 is float
|
||||
return reinterpret_cast<f32*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, 0)); //type 0 is float
|
||||
}
|
||||
|
||||
inline Vec* dComIfGp_evmng_getMyXyzP(int staffIdx, const char* name) {
|
||||
return reinterpret_cast<Vec*>(dComIfGp_getEventManager().getMySubstanceP(staffIdx, name, 1)); //type 1 is vec3f
|
||||
return reinterpret_cast<Vec*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, 1)); //type 1 is vec3f
|
||||
}
|
||||
|
||||
inline u32* dComIfGp_evmng_getMyIntegerP(int staffIdx, const char* name) {
|
||||
return reinterpret_cast<u32*>(dComIfGp_getEventManager().getMySubstanceP(staffIdx, name, 3)); //type 3 is int
|
||||
return reinterpret_cast<u32*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, 3)); //type 3 is int
|
||||
}
|
||||
|
||||
inline char* dComIfGp_evmng_getMyStringP(int staffIdx, const char* name) {
|
||||
return reinterpret_cast<char*>(dComIfGp_getEventManager().getMySubstanceP(staffIdx, name, 4)); //type 4 is string
|
||||
return reinterpret_cast<char*>(dComIfGp_getPEvtManager()->getMySubstanceP(staffIdx, name, 4)); //type 4 is string
|
||||
}
|
||||
|
||||
inline BOOL dComIfGp_evmng_startCheck(s16 eventID) {
|
||||
return dComIfGp_getEventManager().startCheck(eventID);
|
||||
return dComIfGp_getPEvtManager()->startCheck(eventID);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGp_evmng_startCheck(const char* pName) {
|
||||
return dComIfGp_getEventManager().startCheckOld(pName);
|
||||
return dComIfGp_getPEvtManager()->startCheckOld(pName);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGp_evmng_endCheck(const char* pName) {
|
||||
return dComIfGp_getEventManager().endCheckOld(pName);
|
||||
return dComIfGp_getPEvtManager()->endCheckOld(pName);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGp_evmng_endCheck(s16 eventID) {
|
||||
return dComIfGp_getEventManager().endCheck(eventID);
|
||||
return dComIfGp_getPEvtManager()->endCheck(eventID);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGp_evmng_ChkPresentEnd() {
|
||||
return dComIfGp_getEventManager().ChkPresentEnd();
|
||||
return dComIfGp_getPEvtManager()->ChkPresentEnd();
|
||||
}
|
||||
|
||||
inline void dComIfGp_evmng_CancelPresent() {
|
||||
return dComIfGp_getEventManager().CancelPresent();
|
||||
return dComIfGp_getPEvtManager()->CancelPresent();
|
||||
}
|
||||
|
||||
inline BOOL dComIfGp_evmng_getIsAddvance(s32 staffIdx) {
|
||||
return dComIfGp_getEventManager().getIsAddvance(staffIdx);
|
||||
return dComIfGp_getPEvtManager()->getIsAddvance(staffIdx);
|
||||
}
|
||||
|
||||
inline void dComIfGp_evmng_cutEnd(int staffIdx) {
|
||||
return dComIfGp_getEventManager().cutEnd(staffIdx);
|
||||
return dComIfGp_getPEvtManager()->cutEnd(staffIdx);
|
||||
}
|
||||
|
||||
inline void dComIfGp_evmng_execute() {
|
||||
@@ -1653,15 +1677,15 @@ inline void dComIfGp_evmng_execute() {
|
||||
}
|
||||
|
||||
inline void dComIfGp_evmng_create() {
|
||||
g_dComIfG_gameInfo.play.getEvtManager().create();
|
||||
dComIfGp_getPEvtManager()->create();
|
||||
}
|
||||
|
||||
inline void dComIfGp_evmng_remove() {
|
||||
g_dComIfG_gameInfo.play.getEvtManager().remove();
|
||||
dComIfGp_getPEvtManager()->remove();
|
||||
}
|
||||
|
||||
inline void dComIfGp_evmng_setGoal(cXyz* pos) {
|
||||
g_dComIfG_gameInfo.play.getEvtManager().setGoal(pos);
|
||||
dComIfGp_getPEvtManager()->setGoal(pos);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1991,7 +2015,16 @@ inline JPABaseEmitter* dComIfGp_particle_set2DmenuFore(u16 particleID, const cXy
|
||||
pPrmColor, pEnvColor, pScale2D);
|
||||
}
|
||||
|
||||
inline void dComIfGp_particle_setStripes(u16 particleID, cXyz* pos, csXyz* angle, cXyz* scale, u8 param_4, u16 param_5) {
|
||||
inline JPABaseEmitter* dComIfGp_particle_setSingleRipple(u16 particleID, const cXyz* pos,
|
||||
const csXyz* angle = NULL,
|
||||
const cXyz* scale = NULL,
|
||||
u8 alpha = 0xFF) {
|
||||
dPa_control_c* pParticle = g_dComIfG_gameInfo.play.getParticle();
|
||||
return pParticle->setSingleRipple(particleID, pos, angle, scale, alpha);
|
||||
}
|
||||
|
||||
inline void dComIfGp_particle_setStripes(u16 particleID, const cXyz* pos, const csXyz* angle,
|
||||
const cXyz* scale, u8 param_4, u16 param_5) {
|
||||
dPa_control_c* pParticle = g_dComIfG_gameInfo.play.getParticle();
|
||||
pParticle->setNormalStripes(particleID, pos, angle, scale, param_4, param_5);
|
||||
}
|
||||
|
||||
+2
-2
@@ -204,12 +204,12 @@ public:
|
||||
|
||||
bool dNpc_setAnmIDRes(mDoExt_McaMorf* pMorf, int loopMode, float morf, float speed, int animResId, int soundResId, const char* arcName);
|
||||
bool dNpc_setAnmFNDirect(mDoExt_McaMorf* pMorf, int loopMode, f32 morf, f32 speed, char* animFilename, char* soundFilename, const char* arcName);
|
||||
bool dNpc_setAnm(mDoExt_McaMorf* pMorf, int loopMode, f32 morf, f32 speed, int animFileidx, int soundFileIdx, const char* arcName);
|
||||
bool dNpc_setAnm(mDoExt_McaMorf* pMorf, int loopMode, f32 morf, f32 speed, int animFileIdx, int soundFileIdx, const char* arcName);
|
||||
void dNpc_setShadowModel(J3DModel*, J3DModelData*, J3DModel*);
|
||||
cXyz dNpc_playerEyePos(f32);
|
||||
void dNpc_calc_DisXZ_AngY(cXyz, cXyz, float*, short*);
|
||||
bool dNpc_chkArasoi();
|
||||
BOOL dNpc_chkLetterPassed();
|
||||
bool dNpc_setAnm_2(mDoExt_McaMorf* pMorf, int loopMode, f32 morf, f32 speed, int animFileidx, int soundFileIdx, const char* arcName);
|
||||
bool dNpc_setAnm_2(mDoExt_McaMorf* pMorf, int loopMode, f32 morf, f32 speed, int animFileIdx, int soundFileIdx, const char* arcName);
|
||||
|
||||
#endif /* D_NPC_H */
|
||||
|
||||
+21
-15
@@ -376,15 +376,15 @@ public:
|
||||
return set(0, particleID, pos, angle, scale, alpha, pCallBack, setupInfo, pPrmColor, pEnvColor, pScale2D);
|
||||
}
|
||||
JPABaseEmitter* setNormalP1(u16 particleID, const cXyz* pos, const csXyz* angle,
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
return set(1, particleID, pos, angle, scale, alpha, pCallBack, setupInfo, pPrmColor, pEnvColor, pScale2D);
|
||||
}
|
||||
JPABaseEmitter* setToon(u16 particleID, const cXyz* pos, const csXyz* angle,
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
return set(2, particleID, pos, angle, scale, alpha, pCallBack, setupInfo, pPrmColor, pEnvColor, pScale2D);
|
||||
}
|
||||
JPABaseEmitter* setToonP1(u16 particleID, const cXyz* pos, const csXyz* angle,
|
||||
@@ -394,15 +394,15 @@ public:
|
||||
return set(3, particleID, pos, angle, scale, alpha, pCallBack, setupInfo, pPrmColor, pEnvColor, pScale2D);
|
||||
}
|
||||
JPABaseEmitter* setProjection(u16 particleID, const cXyz* pos, const csXyz* angle,
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
return set(4, particleID, pos, angle, scale, alpha, pCallBack, setupInfo, pPrmColor, pEnvColor, pScale2D);
|
||||
}
|
||||
JPABaseEmitter* setShipTail(u16 particleID, const cXyz* pos, const csXyz* angle,
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
return set(5, particleID, pos, angle, scale, alpha, pCallBack, setupInfo, pPrmColor, pEnvColor, pScale2D);
|
||||
}
|
||||
JPABaseEmitter* set2Dfore(u16 particleID, const cXyz* pos, const csXyz* angle,
|
||||
@@ -418,15 +418,21 @@ public:
|
||||
return set(8, particleID, pos, angle, scale, alpha, pCallBack, setupInfo, pPrmColor, pEnvColor, pScale2D);
|
||||
}
|
||||
JPABaseEmitter* set2DmenuFore(u16 particleID, const cXyz* pos, const csXyz* angle,
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
const cXyz* scale, u8 alpha, dPa_levelEcallBack* pCallBack,
|
||||
s8 setupInfo, const GXColor* pPrmColor, const GXColor* pEnvColor,
|
||||
const cXyz* pScale2D) {
|
||||
return set(9, particleID, pos, angle, scale, alpha, pCallBack, setupInfo, pPrmColor, pEnvColor, pScale2D);
|
||||
}
|
||||
JPABaseEmitter* setSingleRipple(u16 particleID, const cXyz* pos, const csXyz* angle,
|
||||
const cXyz* scale, u8 alpha) {
|
||||
return set(5, particleID, pos, angle, scale, alpha, &mSingleRippleEcallBack, -1, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
void drawModelParticle() { mModelCtrl->draw(); }
|
||||
JKRHeap * getHeap() { return mpHeap; }
|
||||
|
||||
static dPa_rippleEcallBack mSingleRippleEcallBack;
|
||||
|
||||
/* 0x0000 */ JKRHeap* mpHeap;
|
||||
/* 0x0004 */ JPAResourceManager* mpCommonResMgr;
|
||||
|
||||
+1
-1
@@ -851,7 +851,7 @@ public:
|
||||
}
|
||||
|
||||
void offStatusFlag(int i_roomNo, u8 flag) {
|
||||
return cLib_offBit(mStatus[i_roomNo].mFlags, flag);
|
||||
cLib_offBit(mStatus[i_roomNo].mFlags, flag);
|
||||
}
|
||||
|
||||
void onStatusFlag(int i_roomNo, u8 flag) { return cLib_onBit(mStatus[i_roomNo].mFlags, flag); }
|
||||
|
||||
@@ -135,6 +135,10 @@ inline void fopAcM_OffStatus(fopAc_ac_c* pActor, u32 flag) {
|
||||
pActor->mStatus &= ~flag;
|
||||
}
|
||||
|
||||
inline void fopAcM_SetStatusMap(fopAc_ac_c* pActor, u32 flag) {
|
||||
pActor->mStatus = (pActor->mStatus & ~0x3F) | fopAcStts_SHOWMAP_e | flag;
|
||||
}
|
||||
|
||||
inline fopAc_ac_c* fopAcM_Search(fopAcIt_JudgeFunc func, void* param) {
|
||||
return (fopAc_ac_c*)fopAcIt_Judge(func, param);
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ public:
|
||||
void entry();
|
||||
void entryDL();
|
||||
void entryDL(J3DMaterialTable*);
|
||||
void play(Vec *, u32, s8);
|
||||
bool play(Vec *, u32, s8);
|
||||
void stopZelAnime();
|
||||
|
||||
J3DModel* getModel() { return mpModel; }
|
||||
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
*/
|
||||
static void XYZrotM(csXyz const& xyz);
|
||||
|
||||
static void ZXYrotS(csXyz const& xyz);
|
||||
static void ZXYrotS(csXyz const& xyz) { ZXYrotS(xyz.x, xyz.y, xyz.z); }
|
||||
|
||||
/**
|
||||
* Rotates the `now` matrix by the given csXyz in the order Z, X, Y
|
||||
|
||||
Reference in New Issue
Block a user