Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/GM8E01_00/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ MetroidPrime/Enemies/CThardus.cpp:
.sbss start:0x805A9078 end:0x805A9080
.sdata2 start:0x805AC9E8 end:0x805ACAA0

MetroidPrime/CActorParticles.cpp:
MetroidPrime/CActorModelParticles.cpp:
.text start:0x801E38A4 end:0x801E7558
.rodata start:0x803D1E98 end:0x803D1F20
.sdata start:0x805A7DE8 end:0x805A7DF8
Expand Down
236 changes: 119 additions & 117 deletions config/GM8E01_00/symbols.txt

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions config/GM8E01_01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6349,9 +6349,9 @@ GetNextConnectedWater__12CScriptWaterFR13CStateManager = .text:0x801009E8; // ty
AcceptScriptMsg__12CScriptWaterF20EScriptObjectMessage9TUniqueIdR13CStateManager = .text:0x80100ADC; // type:function size:0x2B0 scope:global
__dt__12CScriptWaterFv = .text:0x80100D8C; // type:function size:0x1FC scope:global
__dt__14CFluidPlaneCPUFv = .text:0x80100F88; // type:function size:0x140 scope:global
clear__Q24rstl78reserved_vector<Q24rstl50optional_object<31TLockedToken<15CGenDescription>>,3>Fv = .text:0x801010C8; // type:function size:0xA0 scope:global
__dt__Q24rstl78reserved_vector<Q24rstl50optional_object<31TLockedToken<15CGenDescription>>,3>Fv = .text:0x801010C8; // type:function size:0xA0 scope:global
__ct__12CScriptWaterFR13CStateManager9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC9CVector3fRC6CAABoxRC11CDamageInfoRC9CVector3fUibbUiUiUiUiUiUiUiRC9CVector3fffbQ211CFluidPlane10EFluidTypebfRC14CFluidUVMotionffffffffRC6CColorRC6CColorUiUiUiUiUiiiiifUiffffffffRC6CColorUifffUiUibiiPCUi = .text:0x80101168; // type:function size:0xD20 scope:global
fn_80101E0C = .text:0x80101E88; // type:function size:0x7C scope:global
do_erase__Q24rstl60list<Q24rstl18pair<9TUniqueId,b>,Q24rstl17rmemory_allocator>FPQ34rstl60list<Q24rstl18pair<9TUniqueId,b>,Q24rstl17rmemory_allocator>4node = .text:0x80101E88; // type:function size:0x7C scope:global
fn_80101E88 = .text:0x80101F04; // type:function size:0x78 scope:global
GetCollisionResponseType__7CWeaponCFRC9CVector3fRC9CVector3fRC11CWeaponModei = .text:0x80101F7C; // type:function size:0x8 scope:global
Render__7CWeaponCFRC13CStateManager = .text:0x80101F84; // type:function size:0x4 scope:global
Expand Down Expand Up @@ -7074,17 +7074,17 @@ Shutdown__14CBSLieOnGroundFR15CBodyController = .text:0x80136950; // type:functi
UpdateBody__14CBSLieOnGroundFfR15CBodyControllerR13CStateManager = .text:0x80136978; // type:function size:0x20 scope:global
Start__14CBSLieOnGroundFR15CBodyControllerR13CStateManager = .text:0x80136998; // type:function size:0x1C0 scope:global
__ct__14CBSLieOnGroundFRC6CActor = .text:0x80136B58; // type:function size:0x74 scope:global
__dt__28CBSRestrictedFlyerLocomotionFv = .text:0x80136BCC; // type:function size:0xDC scope:global
__dt__20CBSFloaterLocomotionFv = .text:0x80136BCC; // type:function size:0xDC scope:global
IsMoving__23CBSRestrictedLocomotionCFv = .text:0x80136CA8; // type:function size:0x8 scope:global
GetLocomotionSpeed__23CBSRestrictedLocomotionCFQ23pas15ELocomotionTypeQ23pas15ELocomotionAnim = .text:0x80136CB0; // type:function size:0x8 scope:global
CanShoot__13CBSLocomotionCFv = .text:0x80136CB8; // type:function size:0x8 scope:global
IsPitchable__13CBSLocomotionCFv = .text:0x80136CC0; // type:function size:0x8 scope:global
ApplyLocomotionPhysics__28CBSRestrictedFlyerLocomotionFfR15CBodyController = .text:0x80136CC8; // type:function size:0xBC scope:global
__ct__28CBSRestrictedFlyerLocomotionFR6CActor = .text:0x80136D84; // type:function size:0x3C scope:global
ApplyLocomotionPhysics__20CBSFloaterLocomotionFfR15CBodyController = .text:0x80136CC8; // type:function size:0xBC scope:global
__ct__20CBSFloaterLocomotionFR6CActor = .text:0x80136D84; // type:function size:0x3C scope:global
__dt__23CBSRestrictedLocomotionFv = .text:0x80136DC0; // type:function size:0xCC scope:global
UpdateLocomotionAnimation__21CBSNewFlyerLocomotionFffR15CBodyControllerb = .text:0x80136E8C; // type:function size:0x1C8 scope:global
ApplyLocomotionPhysics__21CBSNewFlyerLocomotionFfR15CBodyController = .text:0x80137054; // type:function size:0x68 scope:global
__ct__21CBSNewFlyerLocomotionFR6CActor = .text:0x801370BC; // type:function size:0x3C scope:global
UpdateLocomotionAnimation__25CBSAiMovedFlyerLocomotionFffR15CBodyControllerb = .text:0x80136E8C; // type:function size:0x1C8 scope:global
ApplyLocomotionPhysics__25CBSAiMovedFlyerLocomotionFfR15CBodyController = .text:0x80137054; // type:function size:0x68 scope:global
__ct__25CBSAiMovedFlyerLocomotionFR6CActor = .text:0x801370BC; // type:function size:0x3C scope:global
__dt__18CBSBiPedLocomotionFv = .text:0x801370F8; // type:function size:0x100 scope:global
ApplyLocomotionPhysics__23CBSWallWalkerLocomotionFfR15CBodyController = .text:0x801371F8; // type:function size:0x224 scope:global
__ct__23CBSWallWalkerLocomotionFR6CActor = .text:0x8013741C; // type:function size:0x3C scope:global
Expand Down Expand Up @@ -7112,7 +7112,7 @@ Shutdown__13CBSLocomotionFR15CBodyController = .text:0x80138B64; // type:functio
UpdateBody__13CBSLocomotionFfR15CBodyControllerR13CStateManager = .text:0x80138B8C; // type:function size:0xAC scope:global
Start__13CBSLocomotionFR15CBodyControllerR13CStateManager = .text:0x80138C38; // type:function size:0x74 scope:global
__ct__13CBSLocomotionFv = .text:0x80138CAC; // type:function size:0x24 scope:global
__dt__21CBSNewFlyerLocomotion = .text:0x80138CD0; // type:function size:0x60 scope:global
__dt__25CBSAiMovedFlyerLocomotion = .text:0x80138CD0; // type:function size:0x60 scope:global
IsMoving__18CBSBiPedLocomotionCFv = .text:0x80138D30; // type:function size:0x14 scope:global
__dt__23CBSWallWalkerLocomotion = .text:0x80138D44; // type:function size:0x60 scope:global
__dt__18CBSFlyerLocomotion = .text:0x80138DA4; // type:function size:0x60 scope:global
Expand Down Expand Up @@ -7442,7 +7442,7 @@ __sinit_CPuddleToadGamma_cpp = .text:0x8014D058; // type:function size:0x20 scop
AcceptScriptMsg__18CScriptDistanceFogF20EScriptObjectMessage9TUniqueIdR13CStateManager = .text:0x8014D078; // type:function size:0x1C4 scope:global
Accept__18CScriptDistanceFogFR8IVisitor = .text:0x8014D23C; // type:function size:0x38 scope:global
__dt__18CScriptDistanceFogFv = .text:0x8014D274; // type:function size:0x60 scope:global
__ct__18CScriptDistanceFogF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfo11ERglFogModeRC6CColorRC9CVector2ffRC9CVector2fbbffff = .text:0x8014D2D4; // type:function size:0x16C scope:global
__ct__18CScriptDistanceFogF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfo11ERglFogModeRC6CColorRC9CVector2ff9CVector2fbbffff = .text:0x8014D2D4; // type:function size:0x16C scope:global
__dt__19CBSProjectileAttackFv = .text:0x8014D440; // type:function size:0x5C scope:global
CanShoot__19CBSProjectileAttackCFv = .text:0x8014D49C; // type:function size:0x8 scope:global
GetBodyStateTransition__19CBSProjectileAttackFfR15CBodyController = .text:0x8014D4A4; // type:function size:0xEC scope:global
Expand Down Expand Up @@ -7944,7 +7944,7 @@ Think__18CScriptBallTriggerFfR13CStateManager = .text:0x8017662C; // type:functi
InhabitantExited__18CScriptBallTriggerFR6CActorR13CStateManager = .text:0x801768B4; // type:function size:0x58 scope:global
InhabitantAdded__18CScriptBallTriggerFR6CActorR13CStateManager = .text:0x8017690C; // type:function size:0x3C scope:global
__dt__18CScriptBallTriggerFv = .text:0x80176948; // type:function size:0x60 scope:global
__ct__18CScriptBallTriggerF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC9CVector3fRC9CVector3fbfffRC9CVector3fb = .text:0x801769A8; // type:function size:0x1AC scope:global
__ct__18CScriptBallTriggerF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC9CVector3fRC9CVector3fbfff9CVector3fb = .text:0x801769A8; // type:function size:0x1AC scope:global
calculate_ball_aabox__Fv = .text:0x80176B54; // type:function size:0x54 scope:local
__dt__17CPlasmaProjectileFv = .text:0x80176BA8; // type:function size:0x1EC scope:global
__dt__15CBeamProjectileFv = .text:0x80176D94; // type:function size:0x11C scope:global
Expand Down Expand Up @@ -10663,7 +10663,7 @@ GetCollisionResponseType__11CAtomicBetaCFRC9CVector3fRC9CVector3fRC11CWeaponMode
Touch__11CAtomicBetaFR6CActorR13CStateManager = .text:0x80250BD8; // type:function size:0xE0 scope:global
GetDamageVulnerability__11CAtomicBetaCFv = .text:0x80250CB8; // type:function size:0x58 scope:global
fn_80250C94 = .text:0x80250D10; // type:function size:0x3C scope:global
fn_80250CD0 = .text:0x80250D4C; // type:function size:0x4C scope:global
DestroyEmitter__11CAtomicBetaFR10CSfxHandle = .text:0x80250D4C; // type:function size:0x4C scope:global
fn_80250D1C = .text:0x80250D98; // type:function size:0x90 scope:global
Think__11CAtomicBetaFfR13CStateManager = .text:0x80250E28; // type:function size:0x464 scope:global
fn_80251210 = .text:0x8025128C; // type:function size:0xC8 scope:global
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ def MatchingFor(*versions):
"MetroidPrime/ScriptObjects/CScriptPlayerStateChange.cpp",
),
Object(NonMatching, "MetroidPrime/Enemies/CThardus.cpp"),
Object(NonMatching, "MetroidPrime/CActorParticles.cpp"),
Object(NonMatching, "MetroidPrime/CActorModelParticles.cpp"),
Object(NonMatching, "MetroidPrime/Enemies/CWallCrawlerSwarm.cpp"),
Object(
MatchingFor("GM8E01_00", "GM8E01_01"),
Expand Down
1 change: 1 addition & 0 deletions include/Collision/CRayCastResult.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CRayCastResult {
const CVector3f& GetPoint() const { return x4_point; }
const CPlane& GetPlane() const { return x10_plane; }
bool IsValid() const { return x20_valid != kI_Invalid; }
bool GetValid() const { return x20_valid; }
// TODO: figure out what's going on here
bool IsInvalid() const { return x20_valid == kI_Invalid; }
const CMaterialList& GetMaterial() const { return x28_material; }
Expand Down
3 changes: 3 additions & 0 deletions include/GuiSys/CGuiFrame.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ class CGuiWidget;
class CGuiCamera;
class CGuiLight;
class CGuiHeadWidget;
class CGuiWidgetDrawParms;
class CGuiFrame {
public:
void Update(float dt);
void Draw(const CGuiWidgetDrawParms& parms) const;
CGuiWidget* FindWidget(const char* name) const;
CGuiWidget* FindWidget(const rstl::string& name) const;

Expand Down
1 change: 1 addition & 0 deletions include/GuiSys/CGuiObject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class CGuiObject {
CVector3f GetLocalPosition() const;
const CTransform4f& GetWorldTransform() const { return x34_worldXF; }
void SetLocalPosition(const CVector3f& pos);
CTransform4f& LocalTransform() { return x4_localXF; }
void SetLocalTransform(const CTransform4f& xf);
void SetO2WTransform(const CTransform4f& xf);

Expand Down
4 changes: 4 additions & 0 deletions include/GuiSys/CGuiTextSupport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ class CGuiTextSupport {
const CColor& outlineCol, const CColor& geomCol, int extX, int extY,
CSimplePool* store, int /*CGuiWidget::EGuiModelDrawFlags*/ drawFlags);

void SetText(const rstl::wstring&, bool clearRenderBuffer = false);
void SetText(const rstl::string&, bool multipage = false);
void SetWordWrap(bool wordWrap);
void ClearRenderBuffer();
void SetImageBaseline(bool baseline);
bool SetTypeWriteEffectOptions(bool enable, float fadeTime, float rate);
void SetOutlineColor(const CColor& col);
void SetFontColor(const CColor& col);
Expand Down
2 changes: 2 additions & 0 deletions include/GuiSys/CGuiWidget.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class CGuiWidget : public CGuiObject {
virtual void OnActivate();
short GetWorkerId() const { return xb4_workerId; }

void SetDepthTest(bool depthTest) { xb6_31_depthTest = depthTest; }
void SetIsVisible(bool visible);
void SetIsActive(bool active);
void SetColor(const CColor& color);
Expand All @@ -71,6 +72,7 @@ class CGuiWidget : public CGuiObject {

static CGuiWidgetParms ReadWidgetHeader(CGuiFrame* frame, CInputStream& in);

const CTransform4f& GetTransform() const { return x74_transform; }
CGuiFrame* GetFrame() { return xb0_frame; }

static CGuiWidget* Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp);
Expand Down
1 change: 1 addition & 0 deletions include/GuiSys/CGuiWidgetDrawParms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class CGuiWidgetDrawParms {

public:
CGuiWidgetDrawParms(float alpha) : mAlpha(alpha), mCameraOffset(0.f, 0.f, 0.f) {}
CGuiWidgetDrawParms(float alpha, const CVector3f& offset) : mAlpha(alpha), mCameraOffset(offset) {}
float GetAlpha() const { return mAlpha; }
const CVector3f& GetCameraOffset() const { return mCameraOffset; }
static CGuiWidgetDrawParms Default() { return sDefaultDrawParms; }
Expand Down
10 changes: 10 additions & 0 deletions include/Kyoto/Basics/CCast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,28 @@ inline ushort FtoUS(register float in) {
return *ptr;
}

inline float StoF(register const short& in) {
register float r;
asm {
psq_l r, 0(in), 1, OS_FASTCAST_S16
}
return r;
}

#else
inline uchar ToUint8(float in) { return static_cast< uchar >(in); }
inline char ToInt8(float in) { return static_cast< char >(in); }
inline float ToReal32(uchar in) { return static_cast< float >(in); }
inline short FtoS(float in) { return static_cast< short >(in); }
inline ushort FtoUS(float in) { return static_cast< ushort >(in); }
inline float StoF(const short& in) { return static_cast< float >(in); }
#endif

inline uchar ToUint8(int c) { return static_cast< uchar >(c); }
inline int FtoL(float in) { return static_cast< int >(in); }
inline float LtoF(int in) { return static_cast< float >(in); }
inline float ToReal32(int in) { return static_cast< float >(in); }
inline float ToReal32(double in) { return static_cast< float >(in); }
inline int ToInt32(float in) { return static_cast< int >(in); }
inline unsigned short ToUint16(short in) { return static_cast< unsigned short >(in); }
inline char ToChar(int c) { return ToUint8(c); }
Expand Down
7 changes: 5 additions & 2 deletions include/Kyoto/CToken.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CObjectReference;

class CToken {
public:
CToken() {}
CToken() : x0_objRef(NULL), x4_lockHeld_init(0) {}
CToken(CObjectReference* ref);
CToken(IObj* obj); // : x0_objRef(new CObjectReference(obj)), x4_lockHeld(false) {}
CToken(const CToken& other);
Expand All @@ -31,7 +31,10 @@ class CToken {

private:
CObjectReference* x0_objRef;
bool x4_lockHeld;
union {
bool x4_lockHeld;
int x4_lockHeld_init;
};
};

#endif // _CTOKEN
3 changes: 2 additions & 1 deletion include/Kyoto/Graphics/CGraphics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ enum ERglFogMode {

kRFM_PerspLin = GX_FOG_PERSP_LIN,
kRFM_PerspExp = GX_FOG_PERSP_EXP,
kRFM_PerspExp2 = GX_FOG_ORTHO_EXP2,
kRFM_PerspExp2 = GX_FOG_PERSP_EXP2,
kRFM_PerspRevExp = GX_FOG_PERSP_REVEXP,
kRFM_PerspRevExp2 = GX_FOG_PERSP_REVEXP2,

Expand Down Expand Up @@ -277,6 +277,7 @@ class CGraphics {
static void EnableLight(ERglLight light);
static void LoadLight(ERglLight light, const CLight& info);
static void SetLightState(uchar lights);
static uchar GetLightMask() { return mLightActive; }
static void SetViewMatrix();
static void SetScissor(int left, int bottom, int width, int height);
static void SetLineWidth(float w, ERglTexOffset offs);
Expand Down
10 changes: 10 additions & 0 deletions include/Kyoto/Math/CMath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,14 @@ template < typename T >
const T& CMath::Clamp(const T& min, const T& val, const T& max) {
return min > val ? min : max < val ? max : val;
}

template < typename T >
const T& CMath::Min(const T& a, const T& b) {
return a < b ? a : b;
}

template < typename T >
const T& CMath::Max(const T& a, const T& b) {
return a > b ? a : b;
}
#endif // _CMATH
15 changes: 15 additions & 0 deletions include/Kyoto/Math/CMatrix3f.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,22 @@ class CMatrix3f {
float Get21() const { return m21; }
float Get22() const { return m22; }

inline CVector3f GetColumn(EDimX dim) const { return CVector3f(m00, m10, m20); }
inline CVector3f GetColumn(EDimY dim) const { return CVector3f(m01, m11, m21); }
inline CVector3f GetColumn(EDimZ dim) const { return CVector3f(m02, m12, m22); }

inline CVector3f GetColumn(int idx) const {
switch (idx) {
case 0:
return CVector3f(m00, m10, m20);
case 1:
return CVector3f(m01, m11, m21);
case 2:
return CVector3f(m02, m12, m22);
default:
return CVector3f::Zero();
}
}

static CMatrix3f FromTransform(const CTransform4f& xf);

Expand Down
8 changes: 7 additions & 1 deletion include/Kyoto/Math/CQuaternion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ class CQuaternion {
static CQuaternion LookAt(const CUnitVector3f&, const CUnitVector3f&, const CRelAngle&);
// normalize_angle__Ff
// IsValidQuaternion__11CQuaternionCFf
static CQuaternion Slerp(const CQuaternion& a, const CQuaternion& b, float t);
static CQuaternion SlerpLocal(const CQuaternion& from, const CQuaternion& to, float t);
// AngleFrom__11CQuaternionCFRC11CQuaternion
// BuildEquivalent__11CQuaternionCFv
CQuaternion BuildEquivalent() const;
// BuildNormalized__11CQuaternionCFv
static CQuaternion AxisAngle(const CUnitVector3f&, const CRelAngle&);
CVector3f Transform(const CVector3f&) const;
Expand Down Expand Up @@ -68,12 +69,17 @@ class CQuaternion {
return (a.GetW() * b.GetW()) + (a.GetX() * b.GetX()) + (a.GetY() * b.GetY()) + (a.GetZ() * b.GetZ());
}

// TODO: fake
float GetW() const { return w; }
float GetX() const { return imaginary.GetX(); }
float GetY() const { return imaginary.GetY(); }
float GetZ() const { return imaginary.GetZ(); }
const CVector3f& GetImaginary() const { return imaginary; }

// Real
float GetScalar() const { return w; }
const CVector3f& GetVector() const { return imaginary; }

private:
float w;
CVector3f imaginary;
Expand Down
2 changes: 1 addition & 1 deletion include/Kyoto/Math/CRelAngle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CRelAngle {
return *this;
}

// __lt__9CRelAngleCFRC9CRelAngle
bool operator<(const CRelAngle& rhs) const { return x0_angle < rhs.x0_angle; }

static CRelAngle FromDegrees(float deg) { return CRelAngle(deg * (M_PIF / 180.f)); }
static CRelAngle FromRadians(float rad) { return CRelAngle(rad); }
Expand Down
2 changes: 1 addition & 1 deletion include/Kyoto/Math/CVector2f.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CVector2f {

public:
CVector2f(float x, float y);
CVector2f(CInputStream& in) : mX(in.ReadFloat()), mY(in.ReadFloat()) {}
CVector2f(CInputStream& in) : mX(in.Get< float >()), mY(in.Get< float >()) {}

float GetX() const { return mX; }
float GetY() const { return mY; }
Expand Down
9 changes: 8 additions & 1 deletion include/Kyoto/Math/CVector2i.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@ class CVector2i {
int& operator[](int idx) { return *(&mX + idx); }
const int& operator[](int idx) const { return *(&mX + idx); }

static CVector2i Lerp(const CVector2i& a, const CVector2i& b, float v) {
float inv = 1.f - v;
int x = static_cast< int >(a.GetX() * inv + b.GetX() * v);
int y = static_cast< int >(a.GetY() * inv + b.GetY() * v);
return CVector2i(x, y);
}

private:
int mX;
int mY;
};

CVector2i operator+(const CVector2i& lhs, const CVector2i& rhs);
CVector2i operator+(const CVector2i& lhs, const CVector2i& rhs);
CVector2i operator-(const CVector2i& lhs, const CVector2i& rhs);
bool operator==(const CVector2i& lhs, const CVector2i& rhs);
CVector2i operator*(const CVector2i& lhs, int rhs);
CVector2i operator/(const CVector2i& lhs, int rhs);
Expand Down
16 changes: 7 additions & 9 deletions include/Kyoto/Math/CVector3f.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,13 @@ inline CVector3f operator+(const CVector3f& lhs, const CVector3f& rhs) {
return CVector3f(x, y, z);
}

// TODO real?
inline CVector3f operator*(const CVector3f& lhs, const CVector3f& rhs) {
float x = lhs.GetX() * rhs.GetX();
float y = lhs.GetY() * rhs.GetY();
float z = lhs.GetZ() * rhs.GetZ();
return CVector3f(x, y, z);
}


// Doesn't show up in map; use CVector3f::ByElementMultiply instead
// inline CVector3f operator*(const CVector3f& lhs, const CVector3f& rhs) {
// float x = lhs.GetX() * rhs.GetX();
// float y = lhs.GetY() * rhs.GetY();
// float z = lhs.GetZ() * rhs.GetZ();
// return CVector3f(x, y, z);
// }

inline CVector3f operator*(const CVector3f& vec, const float f) {
float x = vec.GetX() * f;
Expand Down
2 changes: 2 additions & 0 deletions include/MetaRender/CCubeRenderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ class CCubeRenderer : public IRenderer, public IWeaponRenderer, public TOneStati
void SetRequestRGBA6(bool req) { x318_26_requestRGBA6 = req; }
CTexture* GetRealReflection();
const CPlane& GetViewPlane() const { return xb0_viewPlane; }
const CTexture& GetZeroTexture() const { return xe4_blackTex; }
static CCubeRenderer* That() { return sRenderer; }

private:
CResFactory& x8_factory;
Expand Down
Loading
Loading