mirror of https://github.com/PrimeDecomp/prime.git
parent
f8688e02e3
commit
171da931cc
|
@ -33,6 +33,7 @@ COMPLETE_OBJECTS = [
|
|||
"Kyoto/Graphics/CGX",
|
||||
"Kyoto/Particles/CWarp",
|
||||
"Kyoto/Math/CPlane",
|
||||
"Kyoto/Math/CVector2i",
|
||||
"Kyoto/Math/CVector3d",
|
||||
"Kyoto/Math/CVector3i",
|
||||
"Kyoto/CRandom16",
|
||||
|
|
|
@ -7,9 +7,16 @@ class CVector2i {
|
|||
public:
|
||||
CVector2i(int, int);
|
||||
|
||||
int GetX() const { return mX; }
|
||||
int GetY() const { return mY; }
|
||||
private:
|
||||
int x;
|
||||
int y;
|
||||
int mX;
|
||||
int mY;
|
||||
};
|
||||
|
||||
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);
|
||||
#endif
|
||||
|
|
|
@ -521,7 +521,7 @@ KYOTO_1 :=\
|
|||
$(BUILD_DIR)/asm/Kyoto/Math/CTransform4f.o\
|
||||
$(BUILD_DIR)/asm/Kyoto/Math/CUnitVector3f.o\
|
||||
$(BUILD_DIR)/asm/Kyoto/Math/CVector2f.o\
|
||||
$(BUILD_DIR)/asm/Kyoto/Math/CVector2i.o\
|
||||
$(BUILD_DIR)/src/Kyoto/Math/CVector2i.o\
|
||||
$(BUILD_DIR)/src/Kyoto/Math/CVector3d.o\
|
||||
$(BUILD_DIR)/asm/Kyoto/Math/CVector3f.o\
|
||||
$(BUILD_DIR)/src/Kyoto/Math/CVector3i.o\
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#include "Kyoto/Math/CVector2i.hpp"
|
||||
|
||||
CVector2i::CVector2i(int x, int y) : mX(x), mY(y) {}
|
||||
|
||||
CVector2i operator+(const CVector2i& lhs, const CVector2i& rhs) {
|
||||
return CVector2i(lhs.GetX() + rhs.GetX(), lhs.GetY() + rhs.GetY());
|
||||
}
|
||||
|
||||
CVector2i operator-(const CVector2i& lhs, const CVector2i& rhs) {
|
||||
return CVector2i(lhs.GetX() - rhs.GetX(), lhs.GetY() - rhs.GetY());
|
||||
}
|
||||
|
||||
bool operator==(const CVector2i& lhs, const CVector2i& rhs) {
|
||||
return lhs.GetX() == rhs.GetX() && lhs.GetY() == rhs.GetY();
|
||||
}
|
||||
|
||||
CVector2i operator*(const CVector2i& lhs, int rhs) {
|
||||
return CVector2i(lhs.GetX() * rhs, lhs.GetY() * rhs);
|
||||
}
|
||||
|
||||
CVector2i operator/(const CVector2i& lhs, int rhs) {
|
||||
return CVector2i(lhs.GetX() / rhs, lhs.GetY() / rhs);
|
||||
}
|
Loading…
Reference in New Issue