Match and link CPhsyicsActor

Former-commit-id: 70a1e449bd
This commit is contained in:
Phillip Stephens 2022-10-01 23:06:32 -07:00
parent d0589c4e10
commit 6b23e11db8
7 changed files with 57 additions and 5 deletions

View File

@ -2,8 +2,8 @@
.section .text, "ax"
.global sub_802d63e0
sub_802d63e0:
.global AllocFromArena__10COsContextFUi
AllocFromArena__10COsContextFUi:
/* 802D63E0 002D3340 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 802D63E4 002D3344 7C 08 02 A6 */ mflr r0
/* 802D63E8 002D3348 90 01 00 14 */ stw r0, 0x14(r1)
@ -258,4 +258,3 @@ lbl_805AE28C:
lbl_805AE28E:
# ROM: 0x3FAB2E
.2byte 0x00000400

View File

@ -7292,7 +7292,7 @@ sub_80008584:
/* 800085B4 00005514 48 37 AA 59 */ bl OSSetSaveRegion
/* 800085B8 00005518 7F E3 FB 78 */ mr r3, r31
/* 800085BC 0000551C 38 80 00 80 */ li r4, 0x80
/* 800085C0 00005520 48 2C DE 21 */ bl sub_802d63e0
/* 800085C0 00005520 48 2C DE 21 */ bl AllocFromArena__10COsContextFUi
/* 800085C4 00005524 90 6D A0 90 */ stw r3, lbl_805A8C50@sda21(r13)
/* 800085C8 00005528 7F C3 F3 78 */ mr r3, r30
/* 800085CC 0000552C 80 01 00 24 */ lwz r0, 0x24(r1)

View File

@ -21,6 +21,7 @@ COMPLETE_OBJECTS = [
"MetroidPrime/CEntity",
"MetroidPrime/TCastTo",
"MetroidPrime/UserNames",
"MetroidPrime/CPhysicsState",
"MetroidPrime/CMemoryDrawEnum",
"MetroidPrime/HUD/CHUDMemoParms",
"MetroidPrime/ScriptObjects/CScriptDebugCameraWaypoint",

View File

@ -0,0 +1,9 @@
#ifndef __CAXISANGLE_HPP__
#define __CAXISANGLE_HPP__
#include "Kyoto/Math/CVector3f.hpp"
class CAxisAngle : public CVector3f {
public:
};
#endif // __CAXISANGLE_HPP__

View File

@ -0,0 +1,27 @@
#ifndef __CPHYSICSSTATE_HPP__
#define __CPHYSICSSTATE_HPP__
#include "Kyoto/Math/CAxisAngle.hpp"
#include "Kyoto/Math/CQuaternion.hpp"
#include "Kyoto/Math/CVector3f.hpp"
class CPhysicsState {
public:
CPhysicsState(const CVector3f& trasnlation, const CQuaternion& orientation,
const CVector3f& constantForce, const CAxisAngle& angularMomentum,
const CVector3f& momentum, const CVector3f& force, const CVector3f& impulse,
const CAxisAngle& torque, const CAxisAngle& angularImpulse);
private:
CVector3f x0_translation;
CQuaternion xc_orientation;
CVector3f x1c_constantForce;
CAxisAngle x28_angularMomentum;
CVector3f x34_momentum;
CVector3f x40_force;
CVector3f x4c_impulse;
CAxisAngle x58_torque;
CAxisAngle x64_angularImpulse;
};
#endif // __CHPYSICSSTATE_HPP__

View File

@ -133,7 +133,7 @@ METROIDPRIME :=\
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CBloodFlower.o\
$(BUILD_DIR)/asm/MetroidPrime/TGameTypes.o\
$(BUILD_DIR)/asm/MetroidPrime/CPhysicsActor.o\
$(BUILD_DIR)/asm/MetroidPrime/CPhysicsState.o\
$(BUILD_DIR)/src/MetroidPrime/CPhysicsState.o\
$(BUILD_DIR)/asm/MetroidPrime/CRipple.o\
$(BUILD_DIR)/asm/MetroidPrime/CFluidUVMotion.o\
$(BUILD_DIR)/asm/MetroidPrime/CRippleManager.o\

View File

@ -0,0 +1,16 @@
#include "MetroidPrime/CPhysicsState.hpp"
CPhysicsState::CPhysicsState(const CVector3f& translation, const CQuaternion& orientation,
const CVector3f& constantForce, const CAxisAngle& angularMomentum,
const CVector3f& momentum, const CVector3f& force,
const CVector3f& impulse, const CAxisAngle& torque,
const CAxisAngle& angularImpulse)
: x0_translation(translation)
, xc_orientation(orientation)
, x1c_constantForce(constantForce)
, x28_angularMomentum(angularMomentum)
, x34_momentum(momentum)
, x40_force(force)
, x4c_impulse(impulse)
, x58_torque(torque)
, x64_angularImpulse(angularImpulse) {}