Match and link CMetroidModelInstance

Former-commit-id: 1f7d9fe70c
This commit is contained in:
Phillip Stephens 2022-11-02 23:54:47 -07:00
parent cfed12793d
commit a0652cea17
3 changed files with 6 additions and 8 deletions

View File

@ -401,7 +401,7 @@ LIBS = [
"objects": [ "objects": [
"WorldFormat/CAreaOctTree_Tests", "WorldFormat/CAreaOctTree_Tests",
["WorldFormat/CCollisionSurface", True], ["WorldFormat/CCollisionSurface", True],
["WorldFormat/CMetroidModelInstance", False], ["WorldFormat/CMetroidModelInstance", True],
"WorldFormat/CAreaBspTree", "WorldFormat/CAreaBspTree",
"WorldFormat/CAreaOctTree", "WorldFormat/CAreaOctTree",
["WorldFormat/CMetroidAreaCollider", False], ["WorldFormat/CMetroidAreaCollider", False],

View File

@ -360,7 +360,7 @@ METROIDPRIME :=\
WORLDFORMAT :=\ WORLDFORMAT :=\
$(BUILD_DIR)/asm/WorldFormat/CAreaOctTree_Tests.o\ $(BUILD_DIR)/asm/WorldFormat/CAreaOctTree_Tests.o\
$(BUILD_DIR)/src/WorldFormat/CCollisionSurface.o\ $(BUILD_DIR)/src/WorldFormat/CCollisionSurface.o\
$(BUILD_DIR)/asm/WorldFormat/CMetroidModelInstance.o\ $(BUILD_DIR)/src/WorldFormat/CMetroidModelInstance.o\
$(BUILD_DIR)/asm/WorldFormat/CAreaBspTree.o\ $(BUILD_DIR)/asm/WorldFormat/CAreaBspTree.o\
$(BUILD_DIR)/asm/WorldFormat/CAreaOctTree.o\ $(BUILD_DIR)/asm/WorldFormat/CAreaOctTree.o\
$(BUILD_DIR)/asm/WorldFormat/CMetroidAreaCollider.o\ $(BUILD_DIR)/asm/WorldFormat/CMetroidAreaCollider.o\

View File

@ -9,12 +9,10 @@ static const CTransform4f& TransformFromData(const void* ptr) {
static CAABox BoundingBoxFromData(const void* ptr) { static CAABox BoundingBoxFromData(const void* ptr) {
float out[6]; float out[6];
const float* tmp = reinterpret_cast< const float* >(ptr); const float* tmp = reinterpret_cast< const float* >(ptr);
out[0] = CBasics::SwapBytes(tmp[0]); for (int i = 0; i < 6; ++i) {
out[1] = CBasics::SwapBytes(tmp[1]); out[i] = CBasics::SwapBytes(tmp[i]);
out[2] = CBasics::SwapBytes(tmp[2]); }
out[3] = CBasics::SwapBytes(tmp[3]);
out[4] = CBasics::SwapBytes(tmp[4]);
out[5] = CBasics::SwapBytes(tmp[5]);
return *reinterpret_cast< const CAABox* >(out); return *reinterpret_cast< const CAABox* >(out);
} }