From 9f8f1ab7f784576e2a0f39ab05ba73a273b1a28c Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 2 Oct 2022 20:09:01 -0700 Subject: [PATCH] Split, match and link CVector3i --- asm/Kyoto/Math/CVector3f.s | 8 -------- configure.py | 4 ++++ include/Kyoto/Math/CVector3i.hpp | 14 ++++++++++++++ obj_files.mk | 1 + src/Kyoto/Math/CVector3i.cpp | 4 ++++ 5 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 include/Kyoto/Math/CVector3i.hpp create mode 100644 src/Kyoto/Math/CVector3i.cpp diff --git a/asm/Kyoto/Math/CVector3f.s b/asm/Kyoto/Math/CVector3f.s index 11ed36ec..fc6ff532 100644 --- a/asm/Kyoto/Math/CVector3f.s +++ b/asm/Kyoto/Math/CVector3f.s @@ -484,13 +484,6 @@ __sinit_CVector3f_cpp: /* 80314C40 00311BA0 D0 43 00 08 */ stfs f2, 8(r3) /* 80314C44 00311BA4 4E 80 00 20 */ blr -.global __ct__9CVector3iFiii -__ct__9CVector3iFiii: -/* 80314C48 00311BA8 90 83 00 00 */ stw r4, 0(r3) -/* 80314C4C 00311BAC 90 A3 00 04 */ stw r5, 4(r3) -/* 80314C50 00311BB0 90 C3 00 08 */ stw r6, 8(r3) -/* 80314C54 00311BB4 4E 80 00 20 */ blr - .section .sdata2, "a" .balign 8 .global lbl_805AE630 @@ -518,4 +511,3 @@ lbl_805AE640: # ROM: 0x3FAEE0 .4byte 0x10FD87B5 .4byte 0 - diff --git a/configure.py b/configure.py index d4a88bc8..e631ce2a 100755 --- a/configure.py +++ b/configure.py @@ -31,6 +31,9 @@ COMPLETE_OBJECTS = [ "Kyoto/Basics/CSWDataDolphin", "Kyoto/Audio/CSfxHandle", "Kyoto/Graphics/CGX", + "Kyoto/Particles/CWarp", + "Kyoto/Math/CPlane", + "Kyoto/Math/CVector3i", "Kyoto/CRandom16", "Kyoto/CCrc32", "Kyoto/Alloc/CCircularBuffer", @@ -680,6 +683,7 @@ LIBS = [ "Kyoto/Math/CVector2i", "Kyoto/Math/CVector3d", "Kyoto/Math/CVector3f", + "Kyoto/Math/CVector3i", "Kyoto/Math/RMathUtils", "Kyoto/CCrc32", "Kyoto/Alloc/CCircularBuffer", diff --git a/include/Kyoto/Math/CVector3i.hpp b/include/Kyoto/Math/CVector3i.hpp new file mode 100644 index 00000000..960dfad9 --- /dev/null +++ b/include/Kyoto/Math/CVector3i.hpp @@ -0,0 +1,14 @@ +#ifndef __CVECTOR3I_HPP__ +#define __CVECTOR3I_HPP__ + +class CVector3i { +public: + CVector3i(int x, int y, int z); + +private: + int mX; + int mY; + int mZ; +}; + +#endif // __CVECTOR3I_HPP__ diff --git a/obj_files.mk b/obj_files.mk index 0a7a873e..a5101358 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -524,6 +524,7 @@ KYOTO_1 :=\ $(BUILD_DIR)/asm/Kyoto/Math/CVector2i.o\ $(BUILD_DIR)/asm/Kyoto/Math/CVector3d.o\ $(BUILD_DIR)/asm/Kyoto/Math/CVector3f.o\ + $(BUILD_DIR)/src/Kyoto/Math/CVector3i.o\ $(BUILD_DIR)/asm/Kyoto/Math/RMathUtils.o\ $(BUILD_DIR)/src/Kyoto/CCrc32.o\ $(BUILD_DIR)/src/Kyoto/Alloc/CCircularBuffer.o\ diff --git a/src/Kyoto/Math/CVector3i.cpp b/src/Kyoto/Math/CVector3i.cpp new file mode 100644 index 00000000..1aeb984b --- /dev/null +++ b/src/Kyoto/Math/CVector3i.cpp @@ -0,0 +1,4 @@ +#include "Kyoto/Math/CVector3i.hpp" + +CVector3i::CVector3i(int x, int y, int z) +: mX(x), mY(y), mZ(z) {}