mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-01 09:23:08 -04:00
Merge branch 'zeldaret:main' into d_menu
This commit is contained in:
+54
-36
@@ -4,39 +4,57 @@
|
||||
#include "dolphin/types.h"
|
||||
#include "SSystem/SComponent/c_angle.h"
|
||||
|
||||
// Array indexes, do not change values
|
||||
enum dCamStyleParam_e {
|
||||
dCamStyleParam_UNK0 = 0,
|
||||
dCamStyleParam_UNK1 = 1,
|
||||
dCamStyleParam_UNK2 = 2,
|
||||
dCamStyleParam_UNK3 = 3,
|
||||
dCamStyleParam_UNK4 = 4,
|
||||
dCamStyleParam_CENTER_HEIGHT_BASE = 5,
|
||||
dCamStyleParam_CENTER_HEIGHT_UPPER = 6,
|
||||
dCamStyleParam_CENTER_HEIGHT_LOWER = 7,
|
||||
dCamStyleParam_LOCKON_CENTER_HEIGHT_MIN = 8,
|
||||
dCamStyleParam_LOCKON_CENTER_HEIGHT_MAX = 9,
|
||||
dCamStyleParam_UNK10 = 10,
|
||||
dCamStyleParam_UNK11 = 11,
|
||||
dCamStyleParam_UNK12 = 12,
|
||||
dCamStyleParam_UNK13 = 13,
|
||||
dCamStyleParam_UNK14 = 14,
|
||||
dCamStyleParam_UNK15 = 15,
|
||||
dCamStyleParam_UNK16 = 16,
|
||||
dCamStyleParam_UNK17 = 17,
|
||||
dCamStyleParam_LOCKON_LATITUDE_MIN = 18,
|
||||
dCamStyleParam_LOCKON_LATITUDE_MAX = 19,
|
||||
dCamStyleParam_UNK20 = 20,
|
||||
dCamStyleParam_UNK21 = 21,
|
||||
dCamStyleParam_UNK22 = 22,
|
||||
dCamStyleParam_LOCKON_LONGITUDE_MIN = 23,
|
||||
dCamStyleParam_LOCKON_LONGITUDE_MAX = 24,
|
||||
dCamStyleParam_FOVY_BASE = 25,
|
||||
dCamStyleParam_FOVY_UPPER = 26,
|
||||
dCamStyleParam_FOVY_LOWER = 27,
|
||||
dCamStyleParam_LOCKON_FOVY_MIN = 28,
|
||||
dCamStyleParam_LOCKON_FOVY_MAX = 29,
|
||||
};
|
||||
|
||||
enum dCamParamFlag_e {
|
||||
dCamParam_UNK001 = 0x001,
|
||||
dCamParam_UNK002 = 0x002,
|
||||
dCamParam_UNK004 = 0x004,
|
||||
dCamParam_UNK010 = 0x010,
|
||||
dCamParam_UNK020 = 0x020,
|
||||
dCamParam_UNK040 = 0x040,
|
||||
dCamParam_UNK080 = 0x080,
|
||||
dCamParam_UNK100 = 0x100,
|
||||
dCamParam_UNK200 = 0x200,
|
||||
dCamParam_UNK400 = 0x400,
|
||||
};
|
||||
|
||||
struct dCamera__Style {
|
||||
/* 0x00 */ u32 m00;
|
||||
/* 0x04 */ int engineIdx;
|
||||
/* 0x08 */ u32 m08;
|
||||
/* 0x0C */ u32 m0C;
|
||||
/* 0x10 */ u32 m10;
|
||||
/* 0x14 */ u32 m14;
|
||||
/* 0x18 */ u32 m18;
|
||||
/* 0x1C */ f32 centerHeightBase;
|
||||
/* 0x20 */ f32 centerHeightUpper;
|
||||
/* 0x24 */ f32 centerHeightLower;
|
||||
/* 0x28 */ f32 lockonCenterHeightMin;
|
||||
/* 0x2C */ f32 lockonCenterHeightMax;
|
||||
/* 0x30 */ u32 m30;
|
||||
/* 0x34 */ u32 m34;
|
||||
/* 0x38 */ u32 m38;
|
||||
/* 0x3C */ f32 m3C;
|
||||
/* 0x40 */ f32 m40;
|
||||
/* 0x44 */ u32 m44;
|
||||
/* 0x48 */ u32 m48;
|
||||
/* 0x4C */ u32 m4C;
|
||||
/* 0x50 */ f32 lockonLatitudeMin;
|
||||
/* 0x54 */ f32 lockonLatitudeMax;
|
||||
/* 0x58 */ u32 m58;
|
||||
/* 0x5C */ u32 m5C;
|
||||
/* 0x60 */ u32 m60;
|
||||
/* 0x64 */ f32 lockonLongitudeMin;
|
||||
/* 0x68 */ f32 lockonLongitudeMax;
|
||||
/* 0x6C */ f32 fovyBase;
|
||||
/* 0x70 */ f32 fovyUpper;
|
||||
/* 0x74 */ f32 fovyLower;
|
||||
/* 0x78 */ f32 lockonFovyMin;
|
||||
/* 0x7C */ f32 lockonFovyMax;
|
||||
/* 0x08 */ f32 styleParam[30];
|
||||
/* 0x80 */ u16 flag;
|
||||
}; // Size: 0x84
|
||||
|
||||
@@ -190,30 +208,30 @@ public:
|
||||
|
||||
class dCamParam_c {
|
||||
public:
|
||||
/* 0x0 */ dCamera__Style* mpStyle;
|
||||
/* 0x0 */ const dCamera__Style* mpStyle;
|
||||
/* 0x4 */ s32 mStyleIdx;
|
||||
|
||||
static dCamera__Style styles[];
|
||||
static const dCamera__Style styles[];
|
||||
static const s32 style_num;
|
||||
|
||||
public:
|
||||
dCamParam_c(s32);
|
||||
virtual ~dCamParam_c();
|
||||
|
||||
void Flag(s32, u16) {}
|
||||
void Val(s32, int) {}
|
||||
u16 Flag(s32 styleIdx, u16 mask) { return mask & styles[styleIdx].flag; }
|
||||
f32 Val(s32 styleIdx, int paramIdx) { return styles[styleIdx].styleParam[paramIdx]; }
|
||||
BOOL Change(s32);
|
||||
s32 SearchStyle(u32);
|
||||
f32 ratiof(f32, f32, f32, f32);
|
||||
BOOL DefaultRadius(f32*);
|
||||
void RadiusRatio(f32);
|
||||
f32 RadiusRatio(f32);
|
||||
f32 CenterHeight(f32);
|
||||
f32 Fovy(f32);
|
||||
s16 LockonLongitude(f32);
|
||||
s16 LockonLatitude(f32);
|
||||
f32 LockonFovy(f32);
|
||||
f32 LockonCenterHeight(f32);
|
||||
int Algorythmn(s32 i_style) { return mpStyle[i_style].engineIdx; }
|
||||
int Algorythmn(s32 i_style) { return styles[i_style].engineIdx; }
|
||||
int Algorythmn() { return mpStyle->engineIdx; }
|
||||
bool CheckFlag(u16 flag) { return mpStyle->flag & flag; }
|
||||
};
|
||||
|
||||
+94
-65
@@ -33,7 +33,7 @@ struct dCamera__Type {
|
||||
struct dCamera_event_data {
|
||||
/* 0x000 */ u8 field_0x00;
|
||||
/* 0x001 */ u8 field_0x01[0x04 - 0x01];
|
||||
/* 0x004 */ int field_0x04;
|
||||
/* 0x004 */ int mStaffIdx;
|
||||
/* 0x008 */ int field_0x08;
|
||||
/* 0x00C */ int field_0x0c;
|
||||
/* 0x010 */ u8 field_0x10;
|
||||
@@ -43,7 +43,7 @@ struct dCamera_event_data {
|
||||
/* 0x01C */ int field_0x1c;
|
||||
/* 0x020 */ int field_0x20;
|
||||
/* 0x024 */ int field_0x24;
|
||||
/* 0x028 */ u8 field_0x28[0x2C - 0x28];
|
||||
/* 0x028 */ int field_0x28;
|
||||
/* 0x02C */ dCamera__EventParam mEventParams[8];
|
||||
/* 0x0EC */ dStage_Event_dt_c* field_0xec;
|
||||
/* 0x0F0 */ d2DBSplinePath mSpline2DPath;
|
||||
@@ -159,13 +159,12 @@ public:
|
||||
/* 0x0A2 */ u8 m0A2[0x0A4 - 0x0A2];
|
||||
struct {
|
||||
struct {
|
||||
/* 0x00 */ cXyz m00;
|
||||
/* 0x0C */ int m0C;
|
||||
/* 0x10 */ int m10;
|
||||
/* 0x14 */ int m14;
|
||||
/* 0x18 */ int m18;
|
||||
/* 0x1C */ int m1C;
|
||||
} field_0x00;
|
||||
/* 0x00 */ cXyz mCenter;
|
||||
/* 0x0C */ cXyz mEye;
|
||||
/* 0x18 */ f32 mFovY;
|
||||
/* 0x1C */ cSAngle mBank;
|
||||
/* 0x1E */ s16 m1E;
|
||||
} m00;
|
||||
}
|
||||
/* 0x0A4 */ m0A4[2];
|
||||
/* 0x0E4 */ int mStageMapToolCameraIdx;
|
||||
@@ -176,13 +175,13 @@ public:
|
||||
/* 0x101 */ u8 m101;
|
||||
/* 0x102 */ u8 m102;
|
||||
/* 0x103 */ u8 m103[0x108 - 0x103];
|
||||
/* 0x108 */ int m108;
|
||||
/* 0x108 */ u32 m108;
|
||||
/* 0x10C */ int m10C;
|
||||
/* 0x110 */ u8 m110;
|
||||
/* 0x111 */ u8 m111[0x114 - 0x111];
|
||||
/* 0x114 */ int m114;
|
||||
/* 0x118 */ int m118;
|
||||
/* 0x11C */ int m11C;
|
||||
/* 0x118 */ u32 m118;
|
||||
/* 0x11C */ u32 m11C;
|
||||
/* 0x120 */ int mCameraInfoIdx;
|
||||
/* 0x124 */ int mPadId;
|
||||
/* 0x128 */ fopAc_ac_c* mpPlayerActor;
|
||||
@@ -235,12 +234,13 @@ public:
|
||||
/* 0x1B0 */ dCamForcusLine mForcusLine;
|
||||
/* 0x220 */ dCamera_DMC_system mDMCSystem;
|
||||
/* 0x226 */ u8 m226[0x228 - 0x226];
|
||||
/* 0x228 */ dCamera_monitoring_things mMonitoringThings;
|
||||
/* 0x228 */ dCamera_monitoring_things mMonitor;
|
||||
/* 0x248 */ int m248[3];
|
||||
/* 0x254 */ int m254;
|
||||
/* 0x258 */ int m258;
|
||||
/* 0x25C */ BG mBG;
|
||||
/* 0x314 */ int m314;
|
||||
/* 0x314 */ u8 m314;
|
||||
/* 0x315 */ u8 m315[0x318 -0x315];
|
||||
/* 0x318 */ f32 m318;
|
||||
/* 0x31C */ u8 m31C;
|
||||
/* 0x31D */ u8 m31D;
|
||||
@@ -257,18 +257,44 @@ public:
|
||||
/* 0x35C */ int mRoomMapToolCameraIdx;
|
||||
/* 0x360 */ u8 m360;
|
||||
/* 0x361 */ u8 m361[0x364 - 0x361];
|
||||
/* 0x364 */ u32 m364;
|
||||
/* 0x364 */ int m364;
|
||||
/* 0x368 */ f32 m368;
|
||||
/* 0x36C */ u8 m36C[0x394 - 0x36C];
|
||||
/* 0x394 */ f32 mEvFovy;
|
||||
/* 0x398 */ f32 mEvBank;
|
||||
/* 0x39C */ fopAc_ac_c* mpEvRelActor;
|
||||
/* 0x3A0 */ char mEvRelUseMask[4];
|
||||
/* 0x3A4 */ int mEvTimer;
|
||||
/* 0x3A8 */ u8 m3A8;
|
||||
/* 0x3A9 */ u8 m3A9[0x3AC - 0x3A9];
|
||||
/* 0x3AC */ cXyz mEvBasePos;
|
||||
/* 0x3B8 */ u8 m3B8[0x3F8 - 0x3B8];
|
||||
/* 0x36C */ cXyz m36C;
|
||||
/* 0x378 */ int m378;
|
||||
/* 0x37C */ u8 m37C; // `CalcSubjectAngle` suggests this should be u8 but `followCamera` suggests it should be int
|
||||
/* 0x37D */ u8 m37D; // The fact that this a referenced in `CalcSubjectAngle` suggests m37C can't be an int?
|
||||
/* 0x37E */ s16 m37E;
|
||||
/* 0x380 */ int m380;
|
||||
/* 0x384 */ f32 m384;
|
||||
/* 0x388 */ f32 m388; // `CalcSubjectAngle` suggests this should be a float but `followCamera` suggests it should be int
|
||||
/* 0x38C */ f32 m38C; // Similar issue for 38C
|
||||
/* 0x390 */ s16 m390;
|
||||
/* 0x392 */ s16 m392;
|
||||
/* 0x394 */ f32 m394;
|
||||
/* 0x398 */ f32 m398;
|
||||
/* 0x39C */ f32 m39C;
|
||||
/* 0x3A0 */ f32 m3A0;
|
||||
/* 0x3A4 */ f32 m3A4;
|
||||
/* 0x3A8 */ f32 m3A8;
|
||||
/* 0x3AC */ f32 m3AC;
|
||||
/* 0x3B0 */ f32 m3B0;
|
||||
/* 0x3B4 */ int m3B4;
|
||||
/* 0x3B8 */ cSAngle m3B8; // `CalcSubjectAngle` thinks this is a cSAngle but `followCamera` thinks its a float (could also be cSGlobe since m3BA is a cSAngle and m3BC is a float)
|
||||
/* 0x3BA */ cSAngle m3BA;
|
||||
/* 0x3BC */ f32 m3BC;
|
||||
/* 0x3C0 */ cXyz m3C0;
|
||||
/* 0x3CC */ cXyz m3CC;
|
||||
/* 0x3D8 */ u8 m3D8;
|
||||
/* 0x3D9 */ u8 m3D9;
|
||||
/* 0x3DA */ u8 m3DA;
|
||||
/* 0x3DB */ u8 m3DB;
|
||||
/* 0x3DC */ f32 m3DC;
|
||||
/* 0x3E0 */ f32 m3E0;
|
||||
/* 0x3E4 */ f32 m3E4;
|
||||
/* 0x3E8 */ f32 m3E8;
|
||||
/* 0x3EC */ f32 m3EC;
|
||||
/* 0x3F0 */ f32 m3F0;
|
||||
/* 0x3F4 */ u8 m3F4[0x3F8 - 0x3F4];
|
||||
/* 0x3F8 */ dCamera_event_data mEventData;
|
||||
/* 0x50C */ u32 mEventFlags;
|
||||
/* 0x510 */ int mCurStyle;
|
||||
@@ -285,19 +311,22 @@ public:
|
||||
/* 0x538 */ f32 m538;
|
||||
/* 0x53C */ f32 m53C;
|
||||
/* 0x540 */ f32 m540;
|
||||
/* 0x544 */ u8 m544[0x550 - 0x544];
|
||||
/* 0x544 */ u8 m544[4];
|
||||
/* 0x548 */ u8 m548[4];
|
||||
/* 0x54C */ u8 m54C[0x550 - 0x54C];
|
||||
/* 0x550 */ int m550;
|
||||
/* 0x554 */ int m554;
|
||||
/* 0x558 */ u8 m558[0x568 - 0x558];
|
||||
/* 0x558 */ u8 m558[0x55C - 0x558];
|
||||
/* 0x55C */ cXyz m55C;
|
||||
/* 0x568 */ cXyz mCenterShake;
|
||||
/* 0x574 */ cXyz mEyeShake;
|
||||
/* 0x580 */ f32 mFovYShake;
|
||||
/* 0x584 */ cSAngle m584;
|
||||
/* 0x584 */ cSAngle mBankShake;
|
||||
/* 0x586 */ u8 m586[0x588 - 0x586];
|
||||
/* 0x588 */ int m588;
|
||||
/* 0x58C */ int m58C;
|
||||
/* 0x590 */ int mBlureTimer;
|
||||
/* 0x594 */ csXyz m594;
|
||||
/* 0x594 */ csXyz mBlureRotation;
|
||||
/* 0x59A */ s16 m59A;
|
||||
/* 0x59C */ int mBlurePositionType;
|
||||
/* 0x5A0 */ cXyz mBlurePosition;
|
||||
@@ -338,7 +367,7 @@ public:
|
||||
/* 0x789 */ u8 m789;
|
||||
/* 0x78A */ u8 m78A;
|
||||
/* 0x78B */ u8 m78B;
|
||||
/* 0x78C */ u8 m78C[0x800 - 0x78C];;
|
||||
/* 0x78C */ u8 m78C[0x800 - 0x78C];
|
||||
|
||||
public:
|
||||
dCamera_c(camera_class*);
|
||||
@@ -398,7 +427,7 @@ public:
|
||||
int defaultTriming();
|
||||
void setView(f32, f32, f32, f32);
|
||||
cSAngle forwardCheckAngle();
|
||||
void bumpCheck(u32);
|
||||
bool bumpCheck(u32);
|
||||
f32 getWaterSurfaceHeight(cXyz*);
|
||||
void checkSpecialArea();
|
||||
void checkGroundInfo();
|
||||
@@ -410,7 +439,7 @@ public:
|
||||
fopAc_ac_c* getMsgCmdSpeaker();
|
||||
int getMsgCmdCut();
|
||||
bool talktoCamera(s32);
|
||||
void CalcSubjectAngle(s16*, s16*);
|
||||
bool CalcSubjectAngle(s16*, s16*);
|
||||
bool subjectCamera(s32);
|
||||
bool towerCamera(s32);
|
||||
bool crawlCamera(s32);
|
||||
@@ -437,8 +466,8 @@ public:
|
||||
bool Chtyp(s32);
|
||||
s16 U2();
|
||||
//void U2(s16 i_val) { mAngleY = cSAngle(i_val); }
|
||||
void shakeCamera();
|
||||
void StartShake(s32, u8*, s32, cXyz);
|
||||
f32 shakeCamera();
|
||||
int StartShake(s32, u8*, s32, cXyz);
|
||||
bool StopShake();
|
||||
void ResetBlure(int);
|
||||
void SetBlureAlpha(f32);
|
||||
@@ -456,7 +485,7 @@ public:
|
||||
bool ScopeViewMsgModeOff();
|
||||
|
||||
f32 Fovy() { return mFovY + mFovYShake; }
|
||||
cSAngle Bank() { return mBank + m584; }
|
||||
cSAngle Bank() { return mBank + mBankShake; }
|
||||
cXyz Up() { return mUp; }
|
||||
cXyz Center() { return mCenter + mCenterShake; }
|
||||
cXyz Eye() { return mEye + mEyeShake; }
|
||||
@@ -469,40 +498,40 @@ public:
|
||||
void getEvIntData(int*, char*, int);
|
||||
void getEvFloatData(f32*, char*, f32);
|
||||
void getEvXyzData(cXyz*, char*, cXyz);
|
||||
void getEvStringData(char*, char*, char*);
|
||||
bool getEvStringData(char*, char*, char*);
|
||||
void getEvStringPntData(char*, char*);
|
||||
void getEvActor(char*);
|
||||
void getEvActor(char*, char*);
|
||||
void pauseEvCamera();
|
||||
void fixedFrameEvCamera();
|
||||
void stokerEvCamera();
|
||||
void rollingEvCamera();
|
||||
void fixedPositionEvCamera();
|
||||
void uniformTransEvCamera();
|
||||
void uniformBrakeEvCamera();
|
||||
void uniformAcceleEvCamera();
|
||||
void watchActorEvCamera();
|
||||
void restorePosEvCamera();
|
||||
void talktoEvCamera();
|
||||
void maptoolIdEvCamera();
|
||||
void styleEvCamera();
|
||||
void gameOverEvCamera();
|
||||
void tactEvCamera();
|
||||
void windDirectionEvCamera();
|
||||
void turnToActorEvCamera();
|
||||
void tornadoWarpEvCamera();
|
||||
void saveEvCamera();
|
||||
void loadEvCamera();
|
||||
void useItem0EvCamera();
|
||||
void useItem1EvCamera();
|
||||
void getItemEvCamera();
|
||||
void possessedEvCamera();
|
||||
void fixedFramesEvCamera();
|
||||
void bSplineEvCamera();
|
||||
void twoActor0EvCamera();
|
||||
bool pauseEvCamera();
|
||||
bool fixedFrameEvCamera();
|
||||
bool stokerEvCamera();
|
||||
bool rollingEvCamera();
|
||||
bool fixedPositionEvCamera();
|
||||
bool uniformTransEvCamera();
|
||||
bool uniformBrakeEvCamera();
|
||||
bool uniformAcceleEvCamera();
|
||||
bool watchActorEvCamera();
|
||||
bool restorePosEvCamera();
|
||||
bool talktoEvCamera();
|
||||
bool maptoolIdEvCamera();
|
||||
bool styleEvCamera();
|
||||
bool gameOverEvCamera();
|
||||
bool tactEvCamera();
|
||||
bool windDirectionEvCamera();
|
||||
bool turnToActorEvCamera();
|
||||
bool tornadoWarpEvCamera();
|
||||
bool saveEvCamera();
|
||||
bool loadEvCamera();
|
||||
bool useItem0EvCamera();
|
||||
bool useItem1EvCamera();
|
||||
bool getItemEvCamera();
|
||||
bool possessedEvCamera();
|
||||
bool fixedFramesEvCamera();
|
||||
bool bSplineEvCamera();
|
||||
bool twoActor0EvCamera();
|
||||
|
||||
bool chkFlag(u32 flag) { return (mEventFlags & flag) ? true : false; }
|
||||
void setFlag(u32 flag) { mEventFlags |= flag; }
|
||||
BOOL setFlag(u32 flag) { return mEventFlags |= flag; }
|
||||
void clrFlag(u32 flag) { mEventFlags &= ~flag; }
|
||||
void CStickUse() { clrFlag(0x800000); }
|
||||
void CStickUseless() { setFlag(0x800000); }
|
||||
@@ -514,7 +543,7 @@ public:
|
||||
|
||||
static engine_fn engine_tbl[];
|
||||
static const int type_num;
|
||||
static dCamera__Type types[];
|
||||
static const dCamera__Type types[];
|
||||
static const int mvBGType_num;
|
||||
static const char* mvBGTypes[];
|
||||
};
|
||||
|
||||
@@ -38,6 +38,7 @@ class J2DOrthoGraph;
|
||||
enum daPy__PlayerStatus0 {
|
||||
daPyStts0_UNK1_e = 0x00000001,
|
||||
daPyStts0_UNK2_e = 0x00000002,
|
||||
daPyStts0_UNK4_e = 0x00000004,
|
||||
daPyStts0_UNK10_e = 0x00000010,
|
||||
daPyStts0_UNK20_e = 0x00000020,
|
||||
daPyStts0_UNK40_e = 0x00000040,
|
||||
@@ -97,6 +98,18 @@ enum daPy__PlayerStatus1 {
|
||||
daPyStts1_UNK20000_e = 0x00020000,
|
||||
daPyStts1_UNK40000_e = 0x00040000,
|
||||
daPyStts1_UNK80000_e = 0x00080000,
|
||||
daPyStts1_UNK100000_e = 0x00100000,
|
||||
daPyStts1_UNK200000_e = 0x00200000,
|
||||
daPyStts1_UNK400000_e = 0x00400000,
|
||||
daPyStts1_UNK800000_e = 0x00800000,
|
||||
daPyStts1_UNK1000000_e = 0x01000000,
|
||||
daPyStts1_UNK2000000_e = 0x02000000,
|
||||
daPyStts1_UNK4000000_e = 0x04000000,
|
||||
daPyStts1_UNK8000000_e = 0x08000000,
|
||||
daPyStts1_UNK10000000_e = 0x10000000,
|
||||
daPyStts1_UNK20000000_e = 0x20000000,
|
||||
daPyStts1_UNK40000000_e = 0x40000000,
|
||||
daPyStts1_UNK80000000_e = 0x80000000,
|
||||
};
|
||||
|
||||
class __d_timer_info_c {
|
||||
|
||||
+16
-22
@@ -16,18 +16,30 @@ typedef f32 (*MtxP)[4];
|
||||
typedef f32 (*Mtx3P)[3];
|
||||
typedef const f32 (*CMtxP)[4]; // Change name later?
|
||||
|
||||
void C_MTXIdentity(Mtx m);
|
||||
void PSMTXIdentity(Mtx m);
|
||||
void C_MTXCopy(const Mtx src, Mtx dst);
|
||||
void PSMTXCopy(const Mtx src, Mtx dst);
|
||||
void C_MTXConcat(const Mtx a, const Mtx b, Mtx ab);
|
||||
void PSMTXConcat(const Mtx a, const Mtx b, Mtx ab);
|
||||
u32 C_MTXInverse(const Mtx src, Mtx inv);
|
||||
u32 PSMTXInverse(const Mtx src, Mtx inv);
|
||||
void C_MTXRotRad(Mtx m, u8 axis, f32 rad);
|
||||
void PSMTXRotRad(Mtx m, u8 axis, f32 rad);
|
||||
void C_MTXRotTrig(Mtx m, u8 axis, f32 sin, f32 cos);
|
||||
void PSMTXRotTrig(Mtx m, u8 axis, f32 sin, f32 cos);
|
||||
f64 __PSMTXRotAxisRadInternal(f64 param_1, f64 param_2, int param_3, int param_4);
|
||||
void C_MTXRotAxisRad(Mtx m, const Vec* axis, f32 rad);
|
||||
void __PSMTXRotAxisRadInternal(Mtx m, const Vec* axis, f32 sT, f32 cT);
|
||||
void PSMTXRotAxisRad(Mtx m, const Vec* axis, f32 rad);
|
||||
void C_MTXTrans(Mtx m, f32 x, f32 y, f32 z);
|
||||
void PSMTXTrans(Mtx m, f32 x, f32 y, f32 z);
|
||||
void C_MTXTransApply(const Mtx src, Mtx dst, f32 x, f32 y, f32 z);
|
||||
void PSMTXTransApply(const Mtx src, Mtx dst, f32 x, f32 y, f32 z);
|
||||
void C_MTXScale(Mtx m, f32 x, f32 y, f32 z);
|
||||
void PSMTXScale(Mtx m, f32 x, f32 y, f32 z);
|
||||
void C_MTXScaleApply(const Mtx src, Mtx dst, f32 x, f32 y, f32 z);
|
||||
void PSMTXScaleApply(const Mtx src, Mtx dst, f32 x, f32 y, f32 z);
|
||||
void C_MTXQuat(Mtx m, const Quaternion* q);
|
||||
void PSMTXQuat(Mtx m, const Quaternion* q);
|
||||
|
||||
void C_MTXLookAt(Mtx m, const Vec* camPos, const Vec* camUp, const Vec* target);
|
||||
@@ -36,15 +48,12 @@ void C_MTXLightPerspective(Mtx m, f32 fovY, f32 aspect, f32 scale_s, f32 scale_t
|
||||
void C_MTXLightOrtho(Mtx m, f32 top, f32 bottom, f32 left, f32 right, f32 scale_s, f32 scale_t,
|
||||
f32 trans_s, f32 trans_t);
|
||||
|
||||
void C_MTXRotAxisRad(Mtx m, const Vec* axis, f32 rad);
|
||||
|
||||
#define MTXDegToRad(deg) ((deg) * 0.01745329252f)
|
||||
#define MTXRadToDeg(rad) ((rad) * 57.29577951f)
|
||||
|
||||
/* When compiling in debug mode, use C implementations */
|
||||
#ifdef DEBUG
|
||||
// TODO: Add debug rom C implementations
|
||||
/* #define MTXIdentity C_MTXIdentity
|
||||
#if defined(DEBUG) || !defined(__MWERKS__)
|
||||
#define MTXIdentity C_MTXIdentity
|
||||
#define MTXCopy C_MTXCopy
|
||||
#define MTXConcat C_MTXConcat
|
||||
#define MTXInverse C_MTXInverse
|
||||
@@ -55,22 +64,7 @@ void C_MTXRotAxisRad(Mtx m, const Vec* axis, f32 rad);
|
||||
#define MTXTransApply C_MTXTransApply
|
||||
#define MTXScale C_MTXScale
|
||||
#define MTXScaleApply C_MTXScaleApply
|
||||
#define MTXQuat C_MTXQuat */
|
||||
|
||||
// Temporary until the C implementations are done
|
||||
#define MTXIdentity PSMTXIdentity
|
||||
#define MTXCopy PSMTXCopy
|
||||
#define MTXConcat PSMTXConcat
|
||||
#define MTXInverse PSMTXInverse
|
||||
#define MTXRotRad PSMTXRotRad
|
||||
#define MTXRotTrig PSMTXRotTrig
|
||||
#define MTXRotAxisRad PSMTXRotAxisRad
|
||||
#define MTXTrans PSMTXTrans
|
||||
#define MTXTransApply PSMTXTransApply
|
||||
#define MTXScale PSMTXScale
|
||||
#define MTXScaleApply PSMTXScaleApply
|
||||
#define MTXQuat PSMTXQuat
|
||||
|
||||
#define MTXQuat C_MTXQuat
|
||||
#else
|
||||
#define MTXIdentity PSMTXIdentity
|
||||
#define MTXCopy PSMTXCopy
|
||||
|
||||
@@ -7,25 +7,21 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void C_MTXMultVec(const Mtx m, const Vec* src, Vec* dst);
|
||||
void PSMTXMultVec(const Mtx m, const Vec* src, Vec* dst);
|
||||
void PSMTXMultVecSR(const Mtx m, const Vec* src, Vec* dst);
|
||||
void C_MTXMultVecArray(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
|
||||
void PSMTXMultVecArray(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
|
||||
void C_MTXMultVecSR(const Mtx m, const Vec* src, Vec* dst);
|
||||
void PSMTXMultVecSR(const Mtx m, const Vec* src, Vec* dst);
|
||||
void C_MTXMultVecArraySR(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
|
||||
void PSMTXMultVecArraySR(const Mtx m, const Vec* srcBase, Vec* dstBase, u32 count);
|
||||
|
||||
/* When compiling in debug mode, use C implementations */
|
||||
#ifdef DEBUG
|
||||
// TODO: Add debug rom C implementations
|
||||
/* #define MTXMultVec C_MTXMultVec
|
||||
#if defined(DEBUG) || !defined(__MWERKS__)
|
||||
#define MTXMultVec C_MTXMultVec
|
||||
#define MTXMultVecSR C_MTXMultVecSR
|
||||
#define MTXMultVecArray C_MTXMultVecArray
|
||||
#define MTXMultVecArraySR C_MTXMultVecArraySR */
|
||||
|
||||
// Temporary until the C implementations are done
|
||||
#define MTXMultVec PSMTXMultVec
|
||||
#define MTXMultVecSR PSMTXMultVecSR
|
||||
#define MTXMultVecArray PSMTXMultVecArray
|
||||
#define MTXMultVecArraySR PSMTXMultVecArraySR
|
||||
|
||||
#define MTXMultVecArraySR C_MTXMultVecArraySR
|
||||
#else
|
||||
#define MTXMultVec PSMTXMultVec
|
||||
#define MTXMultVecSR PSMTXMultVecSR
|
||||
|
||||
@@ -11,18 +11,14 @@ typedef struct Quaternion {
|
||||
f32 x, y, z, w;
|
||||
} Quaternion;
|
||||
|
||||
void C_QUATMultiply(const Quaternion* a, const Quaternion* b, Quaternion* ab);
|
||||
void PSQUATMultiply(const Quaternion* a, const Quaternion* b, Quaternion* ab);
|
||||
void C_QUATRotAxisRad(Quaternion* q, const Vec* axis, f32 rad);
|
||||
void C_QUATSlerp(const Quaternion* p, const Quaternion* q, Quaternion* r, f32 t);
|
||||
|
||||
/* When compiling in debug mode, use C implementations */
|
||||
#ifdef DEBUG
|
||||
// TODO: Add debug rom C implementations
|
||||
/* #define QUATMultiply C_QUATMultiply */
|
||||
|
||||
// Temporary until the C implementations are done
|
||||
#define QUATMultiply PSQUATMultiply
|
||||
|
||||
#if defined(DEBUG) || !defined(__MWERKS__)
|
||||
#define QUATMultiply C_QUATMultiply
|
||||
#else
|
||||
#define QUATMultiply PSQUATMultiply
|
||||
#endif
|
||||
|
||||
+11
-17
@@ -19,36 +19,30 @@ typedef struct SVec {
|
||||
s16 x, y, z;
|
||||
} SVec;
|
||||
|
||||
void C_VECAdd(const Vec* a, const Vec* b, Vec* ab);
|
||||
void PSVECAdd(const Vec* a, const Vec* b, Vec* ab);
|
||||
void C_VECSubtract(const Vec* a, const Vec* b, Vec* a_b);
|
||||
void PSVECSubtract(const Vec* a, const Vec* b, Vec* a_b);
|
||||
void C_VECScale(const Vec* src, Vec* dst, f32 scale);
|
||||
void PSVECScale(const Vec* src, Vec* dst, f32 scale);
|
||||
void C_VECNormalize(const Vec* src, Vec* unit);
|
||||
void PSVECNormalize(const Vec* src, Vec* unit);
|
||||
f32 C_VECSquareMag(const Vec* v);
|
||||
f32 PSVECSquareMag(const Vec* v);
|
||||
f32 C_VECMag(const Vec* v);
|
||||
f32 PSVECMag(const Vec* v);
|
||||
f32 C_VECDotProduct(const Vec* a, const Vec* b);
|
||||
f32 PSVECDotProduct(const Vec* a, const Vec* b);
|
||||
void C_VECCrossProduct(const Vec* a, const Vec* b, Vec* axb);
|
||||
void PSVECCrossProduct(const Vec* a, const Vec* b, Vec* axb);
|
||||
f32 C_VECSquareDistance(const Vec* a, const Vec* b);
|
||||
f32 PSVECSquareDistance(const Vec* a, const Vec* b);
|
||||
f32 C_VECDistance(const Vec* a, const Vec* b);
|
||||
f32 PSVECDistance(const Vec* a, const Vec* b);
|
||||
|
||||
void C_VECHalfAngle(const Vec* a, const Vec* b, Vec* half);
|
||||
void C_VECReflect(const Vec* src, const Vec* normal, Vec* dst);
|
||||
|
||||
inline void C_VECAdd(register const Vec* a, register const Vec* b, register Vec* ab) {
|
||||
ab->x = a->x + b->x;
|
||||
ab->y = a->y + b->y;
|
||||
ab->z = a->z + b->z;
|
||||
}
|
||||
|
||||
inline void C_VECSubtract(register const Vec* a, register const Vec* b, register Vec* ab) {
|
||||
ab->x = a->x - b->x;
|
||||
ab->y = a->y - b->y;
|
||||
ab->z = a->z - b->z;
|
||||
}
|
||||
|
||||
inline f32 C_VECSquareMag(const Vec* v) {
|
||||
return v->x * v->x + v->y * v->y + v->z * v->z;
|
||||
}
|
||||
|
||||
inline BOOL checkScaleOne(Vec v) {
|
||||
if (v.x == 1.0f && v.y == 1.0f && v.z == 1.0f) {
|
||||
return TRUE;
|
||||
@@ -58,7 +52,7 @@ inline BOOL checkScaleOne(Vec v) {
|
||||
}
|
||||
|
||||
/* When compiling in debug mode, use C implementations */
|
||||
#if 0
|
||||
#if defined(DEBUG) || !defined(__MWERKS__)
|
||||
#define VECAdd C_VECAdd
|
||||
#define VECSubtract C_VECSubtract
|
||||
#define VECScale C_VECScale
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
static void getFrameBufferMemory() {}
|
||||
static void getFrameBufferSize() {}
|
||||
static void setBlureMtx(const Mtx) {}
|
||||
static void setBlureRate(u8) {}
|
||||
static void setBlureRate(u8 blurRate) { mBlureRate = blurRate; }
|
||||
|
||||
static GXTexObj mFrameBufferTexObj;
|
||||
static GXTexObj mZbufferTexObj;
|
||||
|
||||
Reference in New Issue
Block a user