mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-07 20:01:27 -04:00
Demo matches (#767)
This commit is contained in:
@@ -53,12 +53,12 @@ public:
|
||||
VECScale(pOut, pOut, 0.5f);
|
||||
}
|
||||
void ClearForMinMax() {
|
||||
mMin.z = 1000000000.0f;
|
||||
mMin.y = 1000000000.0f;
|
||||
mMin.x = 1000000000.0f;
|
||||
mMax.z = -1000000000.0f;
|
||||
mMax.y = -1000000000.0f;
|
||||
mMax.x = -1000000000.0f;
|
||||
mMin.z = G_CM3D_F_INF;
|
||||
mMin.y = G_CM3D_F_INF;
|
||||
mMin.x = G_CM3D_F_INF;
|
||||
mMax.z = -G_CM3D_F_INF;
|
||||
mMax.y = -G_CM3D_F_INF;
|
||||
mMax.x = -G_CM3D_F_INF;
|
||||
}
|
||||
void ClearForMinMaxY() {
|
||||
mMin.y = G_CM3D_F_INF;
|
||||
|
||||
@@ -21,9 +21,14 @@ public:
|
||||
|
||||
cM3dGSph() {}
|
||||
virtual ~cM3dGSph() {}
|
||||
void SetC(const cXyz&);
|
||||
void SetC(f32, f32, f32) {}
|
||||
void SetR(f32);
|
||||
#if VERSION == VERSION_DEMO
|
||||
void SetC(const cXyz& p) { mCenter = p; }
|
||||
void SetR(f32 r) { mRadius = r; }
|
||||
#else
|
||||
void SetC(const cXyz& p);
|
||||
void SetR(f32 r);
|
||||
#endif
|
||||
void SetC(f32, f32, f32) {} // TODO
|
||||
void Set(const cM3dGSphS & src) {
|
||||
SetC(src.mCenter);
|
||||
SetR(src.mRadius);
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
#define D_A_BOSS_ITEM_H
|
||||
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
class bossitem_class : public fopAc_ac_c {
|
||||
/* 0x290 */ u8 m290[0x298 - 0x290];
|
||||
};
|
||||
|
||||
namespace daBossItem_prm {
|
||||
inline int getStage(bossitem_class* actor) { return fopAcM_GetParam(actor) & 0xFF; }
|
||||
}
|
||||
|
||||
#endif /* D_A_BOSS_ITEM_H */
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
ACTION_ENDING = -1,
|
||||
};
|
||||
|
||||
void getAttentionBasePos() {}
|
||||
cXyz& getAttentionBasePos() { return mAttPos; }
|
||||
void setAction(ActionFunc func, void* arg) {
|
||||
if (mCurrActionFunc != func) {
|
||||
if (mCurrActionFunc) {
|
||||
|
||||
@@ -177,8 +177,8 @@ public:
|
||||
/* 0x418 */ mDoExt_btkAnm field_0x418;
|
||||
/* 0x42C */ f32 field_0x42C;
|
||||
/* 0x430 */ JPABaseEmitter* field_0x430;
|
||||
/* 0x434 */ dBgS_ObjAcch field_0x434;
|
||||
/* 0x5F8 */ dBgS_AcchCir field_0x5F8;
|
||||
/* 0x434 */ dBgS_ObjAcch mAcch;
|
||||
/* 0x5F8 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x638 */ dCcD_Stts field_0x638;
|
||||
/* 0x674 */ dCcD_Stts field_0x674;
|
||||
/* 0x6B0 */ dCcD_Cyl field_0x6B0;
|
||||
|
||||
@@ -37,11 +37,15 @@ public:
|
||||
class daObjYgush00_HIO_c : public JORReflexible {
|
||||
public:
|
||||
daObjYgush00_HIO_c();
|
||||
virtual ~daObjYgush00_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext* ctx);
|
||||
|
||||
public:
|
||||
/* 0x04 */ s8 mNo;
|
||||
/* 0x05 */ s8 m05;
|
||||
/* 0x06 */ s8 m06;
|
||||
/* 0x07 */ s8 m07;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_YGUSH00_H */
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
#include "d/d_bg_w.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#if VERSION == VERSION_DEMO
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
#endif
|
||||
|
||||
class daObjHfuck1_c : public fopAc_ac_c {
|
||||
public:
|
||||
@@ -26,4 +29,18 @@ public:
|
||||
/* 0x40C */ fopAc_ac_c * mpHookshotActor;
|
||||
};
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
class daObjHfuck1_HIO_c : public JORReflexible {
|
||||
public:
|
||||
daObjHfuck1_HIO_c();
|
||||
virtual ~daObjHfuck1_HIO_c() {}
|
||||
|
||||
/* 0x04 */ s8 mNo;
|
||||
f32 field_0x08;
|
||||
f32 field_0x0C;
|
||||
f32 field_0x10;
|
||||
f32 field_0x14;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* D_A_OBJ_HFUCK1_H */
|
||||
|
||||
@@ -51,31 +51,56 @@ public:
|
||||
bool chk_stop() { return mbIsActive == false; }
|
||||
|
||||
void delete_s() {
|
||||
#if VERSION == VERSION_DEMO
|
||||
if(mpEmitter != NULL){
|
||||
mSplashCb.remove();
|
||||
mpEmitter = NULL;
|
||||
mbIsActive = false;
|
||||
}
|
||||
#else
|
||||
if(mSplashCb.getEmitter() != NULL){
|
||||
mSplashCb.remove();
|
||||
mbIsActive = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void play_particle() {
|
||||
#if VERSION == VERSION_DEMO
|
||||
if(mpEmitter != NULL){
|
||||
mpEmitter->playCreateParticle();
|
||||
mbIsActive = true;
|
||||
}
|
||||
#else
|
||||
JPABaseEmitter* pSplashEmitter = mSplashCb.getEmitter();
|
||||
if(pSplashEmitter != NULL){
|
||||
pSplashEmitter->playCreateParticle();
|
||||
mbIsActive = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void stop_particle() {
|
||||
#if VERSION == VERSION_DEMO
|
||||
if(mpEmitter != NULL){
|
||||
mpEmitter->stopCreateParticle();
|
||||
mbIsActive = false;
|
||||
}
|
||||
#else
|
||||
JPABaseEmitter* pSplashEmitter = mSplashCb.getEmitter();
|
||||
if(pSplashEmitter != NULL){
|
||||
pSplashEmitter->stopCreateParticle();
|
||||
mbIsActive = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void create_s(u16, cXyz*, float, float, csXyz*);
|
||||
|
||||
public:
|
||||
#if VERSION == VERSION_DEMO
|
||||
/* 0x00 */ JPABaseEmitter* mpEmitter;
|
||||
#endif
|
||||
/* 0x00 */ dPa_followEcallBack mSplashCb;
|
||||
/* 0x14 */ cXyz mBasePos;
|
||||
/* 0x20 */ cXyz mPos;
|
||||
@@ -138,8 +163,10 @@ public:
|
||||
bool _draw();
|
||||
|
||||
public:
|
||||
#if VERSION > VERSION_DEMO
|
||||
static const dCcD_SrcCyl M_cyl_data;
|
||||
static const dCcD_SrcSph M_sph_data;
|
||||
#endif
|
||||
static const char M_arcname[4];
|
||||
enum State_t {State_OPEN = 0, State_SWITCHING = 1, State_CLOSED = 2};
|
||||
|
||||
@@ -149,20 +176,22 @@ public:
|
||||
/* 0x2C4 */ dCcD_Stts mCylStts;
|
||||
/* 0x300 */ dCcD_Cyl mCyl;
|
||||
/* 0x430 */ bool mHitboxActive;
|
||||
#if VERSION > VERSION_DEMO
|
||||
/* 0x434 */ dCcD_Stts mSphStts;
|
||||
/* 0x470 */ dCcD_Sph mSph;
|
||||
#endif
|
||||
/* 0x59C */ daObjHhaYgush_c mYgush;
|
||||
/* 0x6A0 */ daObjHhaPart_c mPartA[2];
|
||||
/* 0x738 */ daObjHhaSplash_c mSplashA[2];
|
||||
/* 0x7A0 */ cXyz mPosOffset;
|
||||
/* 0x7AC */ u32 mSwitchNo;
|
||||
/* 0x7B0 */ u8 mIsMiddle;
|
||||
/* 0x7B2 */ short mPartTimer;
|
||||
/* 0x7B4 */ float mWtrScale;
|
||||
/* 0x7B8 */ float mWtrScaleMin;
|
||||
/* 0x7B2 */ s16 mPartTimer;
|
||||
/* 0x7B4 */ f32 mWtrScale;
|
||||
/* 0x7B8 */ f32 mWtrScaleMin;
|
||||
/* 0x7BC */ u16 mWtrTimer;
|
||||
/* 0X7BE */ u8 mWtrState;
|
||||
/* 0x7C0 */ short mEventIdx;
|
||||
/* 0x7C0 */ s16 mEventIdx;
|
||||
/* 0x7C2 */ u8 mState;
|
||||
/* 0x7C3 */ bool mWaterSound;
|
||||
};
|
||||
|
||||
@@ -550,12 +550,14 @@ public:
|
||||
inline void setHeapLockFlag(u8 flag) { mHeapLockFlag = flag; }
|
||||
inline void offHeapLockFlag() { mHeapLockFlag = 0; }
|
||||
|
||||
// These inlines aren't present in WW JP debug maps, but are present in TP debug.
|
||||
#if VERSION > VERSION_DEMO
|
||||
// These inlines aren't present in WW demo debug maps, but are present in TP debug.
|
||||
inline u8 getNowVibration() { return mNowVibration; }
|
||||
inline void setNowVibration(u8 vibration) { mNowVibration = vibration; }
|
||||
#endif
|
||||
|
||||
#if VERSION > VERSION_JPN
|
||||
// Inline name is fake (not present in JP debug maps), but was guessed based on the similar
|
||||
// Inline name is fake (not present in demo debug maps), but was guessed based on the similar
|
||||
// dSv_player_config_c::getPalLanguage() const inline in TP debug.
|
||||
inline u8 getPalLanguage() { return mPalLanguage; }
|
||||
inline void setPalLanguage(u8 lang) { mPalLanguage = lang; }
|
||||
@@ -810,7 +812,9 @@ public:
|
||||
/* 0x4960 */ u8 mPictureFormat;
|
||||
/* 0x4961 */ u8 field_0x4961;
|
||||
/* 0x4962 */ u8 mHeapLockFlag;
|
||||
#if VERSION > VERSION_DEMO
|
||||
/* 0x4963 */ u8 mNowVibration;
|
||||
#endif
|
||||
#if VERSION > VERSION_JPN
|
||||
/* 0x4964 */ u8 mPalLanguage;
|
||||
#endif
|
||||
@@ -1446,10 +1450,12 @@ inline void dComIfGs_setOptVibration(u8 vib) {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getConfig().setVibration(vib);
|
||||
}
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
/* Not present in debug maps, imitates TP version */
|
||||
inline u8 dComIfGs_checkOptVibration() {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getConfig().checkVibration();
|
||||
}
|
||||
#endif
|
||||
|
||||
inline BOOL dComIfGs_isTbox(int i_no) {
|
||||
return g_dComIfG_gameInfo.save.getMemory().getBit().isTbox(i_no);
|
||||
@@ -1604,6 +1610,14 @@ inline BOOL dComIfGs_isItem(int bitNo, int roomNo) {
|
||||
return g_dComIfG_gameInfo.save.isItem(bitNo, roomNo);
|
||||
}
|
||||
|
||||
inline void dComIfGs_onVisitedRoom(int i_no) {
|
||||
g_dComIfG_gameInfo.save.getMemory().getBit().onVisitedRoom(i_no);
|
||||
}
|
||||
|
||||
inline bool dComIfGs_isVisitedRoom(int i_no) {
|
||||
return g_dComIfG_gameInfo.save.getMemory().getBit().isVisitedRoom(i_no);
|
||||
}
|
||||
|
||||
inline void dComIfGs_clearRoomSwitch(int i_zoneNo) {
|
||||
g_dComIfG_gameInfo.save.getZone(i_zoneNo).getZoneBit().clearRoomSwitch();
|
||||
}
|
||||
@@ -2797,6 +2811,7 @@ inline void dComIfGp_offHeapLockFlag() {
|
||||
g_dComIfG_gameInfo.play.offHeapLockFlag();
|
||||
}
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
// Inline name from TP debug.
|
||||
inline u8 dComIfGp_getNowVibration() {
|
||||
return g_dComIfG_gameInfo.play.getNowVibration();
|
||||
@@ -2806,6 +2821,7 @@ inline u8 dComIfGp_getNowVibration() {
|
||||
inline void dComIfGp_setNowVibration(u8 vibration) {
|
||||
g_dComIfG_gameInfo.play.setNowVibration(vibration);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if VERSION > VERSION_JPN
|
||||
// Inline name is official because while it's not present in the JPN debug maps, it is present in
|
||||
@@ -3589,6 +3605,14 @@ inline int dComIfG_syncStageRes(const char* name) {
|
||||
return g_dComIfG_gameInfo.mResControl.syncStageRes(name);
|
||||
}
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
// A number of actors used dComIfG_deleteObjectRes in actor delete functions, but these were changed
|
||||
// to dComIfG_resDelete for the retail version.
|
||||
#define dComIfG_resDeleteDemo(i_phase, i_resName) dComIfG_deleteObjectRes(i_resName)
|
||||
#else
|
||||
#define dComIfG_resDeleteDemo(i_phase, i_resName) dComIfG_resDelete(i_phase, i_resName);
|
||||
#endif
|
||||
|
||||
inline int dComIfG_deleteObjectRes(const char* res) {
|
||||
return g_dComIfG_gameInfo.mResControl.deleteObjectRes(res);
|
||||
}
|
||||
|
||||
@@ -277,10 +277,12 @@ public:
|
||||
/* 0xB88 */ GXColorS10 mBgAddColDif;
|
||||
/* 0xB90 */ GXColorS10 mBg1AddColAmb;
|
||||
/* 0xB98 */ GXColorS10 mBg1AddColDif;
|
||||
#if VERSION > VERSION_DEMO
|
||||
/* 0xBA0 */ GXColorS10 mBg2AddColAmb;
|
||||
/* 0xBA8 */ GXColorS10 mBg2AddColDif;
|
||||
/* 0xBB0 */ GXColorS10 mBg3AddColAmb;
|
||||
/* 0xBB8 */ GXColorS10 mBg3AddColDif;
|
||||
#endif
|
||||
/* 0xBC0 */ GXColorS10 mAddColFog;
|
||||
/* 0xBC8 */ GXColorS10 mVrboxAddColSky0;
|
||||
/* 0xBD0 */ GXColorS10 mVrboxAddColKasumi;
|
||||
@@ -356,7 +358,9 @@ public:
|
||||
|
||||
extern dScnKy_env_light_c g_env_light;
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
STATIC_ASSERT(sizeof(dScnKy_env_light_c) == 0xC9C);
|
||||
#endif
|
||||
|
||||
inline dScnKy_env_light_c& dKy_getEnvlight() {
|
||||
return g_env_light;
|
||||
|
||||
@@ -90,7 +90,6 @@ private:
|
||||
/* 0x14 */ s8 field_0x14;
|
||||
/* 0x15 */ u8 mWindOff;
|
||||
/* 0x16 */ GXColor mColor;
|
||||
/* 0x1A */ u8 field_0x1A[0x1C - 0x1A];
|
||||
/* 0x1C */ dKy_tevstr_c* mTevstr;
|
||||
}; // Size: 0x20
|
||||
|
||||
|
||||
@@ -459,7 +459,9 @@ STATIC_ASSERT(sizeof(dSv_player_info_c) == 0x5C);
|
||||
class dSv_player_config_c {
|
||||
public:
|
||||
void init();
|
||||
#if VERSION > VERSION_DEMO
|
||||
s32 checkVibration();
|
||||
#endif
|
||||
|
||||
u8 getRuby() { return mRuby; }
|
||||
void setRuby(u8 ruby) { mRuby = ruby; }
|
||||
|
||||
+1
-1
@@ -895,7 +895,7 @@ public:
|
||||
static int getZoneNo(int i_roomNo) { return mStatus[i_roomNo].mZoneNo; }
|
||||
static void setZoneCount(int i_roomNo, int count) { mStatus[i_roomNo].mZoneCount = count; }
|
||||
|
||||
static s8 getStayNo() { return mStayNo; }
|
||||
static int getStayNo() { return mStayNo; }
|
||||
static s8 getMemoryBlockID(int i_roomNo) { return mStatus[i_roomNo].mMemBlockID; }
|
||||
static void onStatusDraw(int i_roomNo) { mStatus[i_roomNo].mDraw = true; }
|
||||
static void setProcID(fpc_ProcID id) { mProcID = id; }
|
||||
|
||||
@@ -58,8 +58,13 @@ public:
|
||||
/* 0x80 */ /* vtable */
|
||||
|
||||
public:
|
||||
#if VERSION == VERSION_DEMO
|
||||
dVibration_c() { setDefault(); }
|
||||
virtual ~dVibration_c() { Kill(); }
|
||||
#else
|
||||
dVibration_c();
|
||||
virtual ~dVibration_c();
|
||||
#endif
|
||||
|
||||
int Run();
|
||||
bool StartShock(int, int, cXyz);
|
||||
|
||||
@@ -412,10 +412,15 @@ inline BOOL fopAcM_isItemForIb(int itemBitNo, u8 itemNo, s8 roomNo) {
|
||||
}
|
||||
|
||||
inline void dComIfGs_onSaveSwitch(int i_stageNo, int i_no);
|
||||
inline void dComIfGs_onVisitedRoom(int i_no);
|
||||
inline void fopAcM_onItemForIb(int itemBitNo, u8 itemNo, s8 roomNo) {
|
||||
if (itemNo == dItem_BLUE_JELLY_e) {
|
||||
#if VERSION == VERSION_DEMO
|
||||
dComIfGs_onVisitedRoom(itemBitNo);
|
||||
#else
|
||||
// Blue Chu Jelly uses itemBitNo as if it was a switch in stageNo 0xE.
|
||||
dComIfGs_onSaveSwitch(dSv_save_c::STAGE_BLUE_CHU_JELLY, itemBitNo);
|
||||
#endif
|
||||
} else {
|
||||
dComIfGs_onItem(itemBitNo, roomNo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user