mirror of https://github.com/PrimeDecomp/prime.git
Start matching CFire, weird regswaps in constructor, rmemory_allocator constructors
Former-commit-id: 9ae9e52ed7
This commit is contained in:
parent
187bc0b98c
commit
28bfac18ed
|
@ -250,7 +250,7 @@ Explode__23CMetroidPrimeProjectileFRC9CVector3fRC9CVector3f29EWeaponCollisionRes
|
||||||
/* 802A0650 0029D5B0 93 41 00 1C */ stw r26, 0x1c(r1)
|
/* 802A0650 0029D5B0 93 41 00 1C */ stw r26, 0x1c(r1)
|
||||||
/* 802A0654 0029D5B4 93 81 00 40 */ stw r28, 0x40(r1)
|
/* 802A0654 0029D5B4 93 81 00 40 */ stw r28, 0x40(r1)
|
||||||
/* 802A0658 0029D5B8 93 61 00 20 */ stw r27, 0x20(r1)
|
/* 802A0658 0029D5B8 93 61 00 20 */ stw r27, 0x20(r1)
|
||||||
/* 802A065C 0029D5BC 4B FB CB 81 */ bl __ct__5CFire
|
/* 802A065C 0029D5BC 4B FB CB 81 */ bl "__ct__5CFireF25TToken<15CGenDescription>9TUniqueId7TAreaIdb9TUniqueIdRC12CTransform4fRC11CDamageInfoRC6CAABoxRC9CVector3fbUibbbffff"
|
||||||
/* 802A0660 0029D5C0 7C 64 1B 78 */ mr r4, r3
|
/* 802A0660 0029D5C0 7C 64 1B 78 */ mr r4, r3
|
||||||
lbl_802A0664:
|
lbl_802A0664:
|
||||||
/* 802A0664 0029D5C4 28 04 00 00 */ cmplwi r4, 0
|
/* 802A0664 0029D5C4 28 04 00 00 */ cmplwi r4, 0
|
||||||
|
|
|
@ -619,7 +619,7 @@ Death__7CPufferFRC9CVector3fR13CStateManager:
|
||||||
/* 8025C5B0 00259510 54 00 D7 FE */ rlwinm r0, r0, 0x1a, 0x1f, 0x1f
|
/* 8025C5B0 00259510 54 00 D7 FE */ rlwinm r0, r0, 0x1a, 0x1f, 0x1f
|
||||||
/* 8025C5B4 00259514 90 01 00 20 */ stw r0, 0x20(r1)
|
/* 8025C5B4 00259514 90 01 00 20 */ stw r0, 0x20(r1)
|
||||||
/* 8025C5B8 00259518 C0 5E 05 B8 */ lfs f2, 0x5b8(r30)
|
/* 8025C5B8 00259518 C0 5E 05 B8 */ lfs f2, 0x5b8(r30)
|
||||||
/* 8025C5BC 0025951C 48 00 0C 21 */ bl __ct__5CFire
|
/* 8025C5BC 0025951C 48 00 0C 21 */ bl "__ct__5CFireF25TToken<15CGenDescription>9TUniqueId7TAreaIdb9TUniqueIdRC12CTransform4fRC11CDamageInfoRC6CAABoxRC9CVector3fbUibbbffff"
|
||||||
/* 8025C5C0 00259520 7C 64 1B 78 */ mr r4, r3
|
/* 8025C5C0 00259520 7C 64 1B 78 */ mr r4, r3
|
||||||
lbl_8025C5C4:
|
lbl_8025C5C4:
|
||||||
/* 8025C5C4 00259524 7F E3 FB 78 */ mr r3, r31
|
/* 8025C5C4 00259524 7F E3 FB 78 */ mr r3, r31
|
||||||
|
|
|
@ -458,8 +458,8 @@ lbl_8025D1C0:
|
||||||
/* 8025D1D4 0025A134 38 21 00 10 */ addi r1, r1, 0x10
|
/* 8025D1D4 0025A134 38 21 00 10 */ addi r1, r1, 0x10
|
||||||
/* 8025D1D8 0025A138 4E 80 00 20 */ blr
|
/* 8025D1D8 0025A138 4E 80 00 20 */ blr
|
||||||
|
|
||||||
.global __ct__5CFire
|
.global "__ct__5CFireF25TToken<15CGenDescription>9TUniqueId7TAreaIdb9TUniqueIdRC12CTransform4fRC11CDamageInfoRC6CAABoxRC9CVector3fbUibbbffff"
|
||||||
__ct__5CFire:
|
"__ct__5CFireF25TToken<15CGenDescription>9TUniqueId7TAreaIdb9TUniqueIdRC12CTransform4fRC11CDamageInfoRC6CAABoxRC9CVector3fbUibbbffff":
|
||||||
/* 8025D1DC 0025A13C 94 21 FE 50 */ stwu r1, -0x1b0(r1)
|
/* 8025D1DC 0025A13C 94 21 FE 50 */ stwu r1, -0x1b0(r1)
|
||||||
/* 8025D1E0 0025A140 7C 08 02 A6 */ mflr r0
|
/* 8025D1E0 0025A140 7C 08 02 A6 */ mflr r0
|
||||||
/* 8025D1E4 0025A144 90 01 01 B4 */ stw r0, 0x1b4(r1)
|
/* 8025D1E4 0025A144 90 01 01 B4 */ stw r0, 0x1b4(r1)
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
#ifndef __CFIRE_HPP__
|
||||||
|
#define __CFIRE_HPP__
|
||||||
|
|
||||||
|
#include "MetroidPrime/CActor.hpp"
|
||||||
|
|
||||||
|
#include "MetroidPrime/CDamageInfo.hpp"
|
||||||
|
|
||||||
|
#include "Kyoto/Particles/CElementGen.hpp"
|
||||||
|
#include "Kyoto/Particles/CGenDescription.hpp"
|
||||||
|
#include "Kyoto/TToken.hpp"
|
||||||
|
|
||||||
|
class CFire : public CActor {
|
||||||
|
public:
|
||||||
|
CFire(TToken< CGenDescription > effect, TUniqueId uid, TAreaId area, bool active, TUniqueId owner,
|
||||||
|
const CTransform4f& xf, const CDamageInfo& dInfo, const CAABox& aabox, const CVector3f& vec,
|
||||||
|
bool b1, CAssetId visorEffect, bool b2, bool b3, bool b4, float f1, float f2, float f3,
|
||||||
|
float f4);
|
||||||
|
|
||||||
|
~CFire();
|
||||||
|
|
||||||
|
private:
|
||||||
|
rstl::single_ptr< CElementGen > xe8_;
|
||||||
|
TUniqueId xec_owner;
|
||||||
|
CDamageInfo xf0_damageInfo1;
|
||||||
|
CDamageInfo x10c_damageInfo2;
|
||||||
|
rstl::optional_object< CAABox > x128_;
|
||||||
|
float x144_;
|
||||||
|
bool x148_24_ : 1;
|
||||||
|
bool x148_25_ : 1;
|
||||||
|
bool x148_26_ : 1;
|
||||||
|
bool x148_27_ : 1;
|
||||||
|
bool x148_28_ : 1;
|
||||||
|
bool x148_29_ : 1;
|
||||||
|
float x14c_;
|
||||||
|
CAssetId x150_;
|
||||||
|
float x154_;
|
||||||
|
float x158_;
|
||||||
|
float x15c_;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __CFIRE_HPP__
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
namespace rstl {
|
namespace rstl {
|
||||||
struct rmemory_allocator {
|
struct rmemory_allocator {
|
||||||
|
rmemory_allocator() {}
|
||||||
|
rmemory_allocator(const rmemory_allocator&) {}
|
||||||
template < typename T >
|
template < typename T >
|
||||||
static void allocate(T*& out, int count) {
|
static void allocate(T*& out, int count) {
|
||||||
int size = count * sizeof(T);
|
int size = count * sizeof(T);
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
// ++x4_cow->x4_refCount;
|
// ++x4_cow->x4_refCount;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
basic_string(const _CharTp* data, int size, const Alloc&);
|
basic_string(const _CharTp* data, int size, const Alloc& = rmemory_allocator());
|
||||||
// {
|
// {
|
||||||
// if (size <= 0 && !data)
|
// if (size <= 0 && !data)
|
||||||
// {
|
// {
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#include "MetroidPrime/ScriptObjects/CFire.hpp"
|
||||||
|
#include "MetroidPrime/CActorParameters.hpp"
|
||||||
|
|
||||||
|
static inline CMaterialList MakeMaterialList() {
|
||||||
|
return CMaterialList(kMT_Projectile);
|
||||||
|
}
|
||||||
|
|
||||||
|
CFire::CFire(TToken< CGenDescription > effect, TUniqueId uid, TAreaId area, bool active,
|
||||||
|
TUniqueId owner, const CTransform4f& xf, const CDamageInfo& dInfo, const CAABox& aabox,
|
||||||
|
const CVector3f& vec, bool b1, CAssetId visorEffect, bool b2, bool b3, bool b4,
|
||||||
|
float f1, float f2, float f3, float f4)
|
||||||
|
: CActor(uid, active, rstl::string("Fire", -1), CEntityInfo(area, NullConnectionList), xf,
|
||||||
|
CModelData::CModelDataNull(), MakeMaterialList(), CActorParameters::None(),
|
||||||
|
kInvalidUniqueId)
|
||||||
|
, xe8_(new CElementGen(effect))
|
||||||
|
, xec_owner(owner)
|
||||||
|
, xf0_damageInfo1(dInfo)
|
||||||
|
, x10c_damageInfo2(dInfo)
|
||||||
|
, x128_(aabox)
|
||||||
|
, x144_(f1)
|
||||||
|
, x148_24_(b2)
|
||||||
|
, x148_25_(b3)
|
||||||
|
, x148_26_(b4)
|
||||||
|
, x148_27_(b2 && b3 && b4)
|
||||||
|
, x148_28_(false)
|
||||||
|
, x148_29_(b1)
|
||||||
|
, x14c_(f2)
|
||||||
|
, x150_(visorEffect)
|
||||||
|
, x154_(f3)
|
||||||
|
, x158_(f4)
|
||||||
|
, x15c_(0.f) {
|
||||||
|
xe8_->SetGlobalScale(vec);
|
||||||
|
xe8_->SetTranslation(xf.GetTranslation());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CFire::~CFire() {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue