mirror of https://github.com/PrimeDecomp/prime.git
Match and link CCollidableCollisionSurface
This commit is contained in:
parent
d977d443ee
commit
394cbea9c3
|
@ -3,8 +3,8 @@
|
|||
.section .sdata
|
||||
.balign 8
|
||||
|
||||
.global lbl_805A86F0
|
||||
lbl_805A86F0:
|
||||
.global sTableIndex__27CCollidableCollisionSurface
|
||||
sTableIndex__27CCollidableCollisionSurface:
|
||||
# ROM: 0x3F6090
|
||||
.4byte 0xFFFFFFFF
|
||||
.4byte 0
|
||||
|
@ -23,7 +23,7 @@ GetType__27CCollidableCollisionSurfaceFv:
|
|||
|
||||
.global SetStaticTableIndex__27CCollidableCollisionSurfaceFUi
|
||||
SetStaticTableIndex__27CCollidableCollisionSurfaceFUi:
|
||||
/* 802CE0B0 002CB010 90 6D 9B 30 */ stw r3, lbl_805A86F0@sda21(r13)
|
||||
/* 802CE0B0 002CB010 90 6D 9B 30 */ stw r3, sTableIndex__27CCollidableCollisionSurface@sda21(r13)
|
||||
/* 802CE0B4 002CB014 4E 80 00 20 */ blr
|
||||
|
||||
.section .rodata
|
||||
|
@ -33,4 +33,3 @@ lbl_803D6A00:
|
|||
# ROM: 0x3D3A00
|
||||
.asciz "CCollidableCollisionSurface"
|
||||
.4byte 0
|
||||
|
||||
|
|
|
@ -448,7 +448,7 @@ LIBS = [
|
|||
"host": True,
|
||||
"objects": [
|
||||
"Collision/CCollidableAABox",
|
||||
"Collision/CCollidableCollisionSurface",
|
||||
["Collision/CCollidableCollisionSurface", True],
|
||||
["Collision/CCollisionInfo", True],
|
||||
"Collision/InternalColliders",
|
||||
"Collision/CCollisionPrimitive",
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#ifndef _CCOLLIDABLECOLLISIONSURFACE
|
||||
#define _CCOLLIDABLECOLLISIONSURFACE
|
||||
|
||||
|
||||
#include "Collision/CCollisionPrimitive.hpp"
|
||||
|
||||
class CCollidableCollisionSurface {
|
||||
static int sTableIndex;
|
||||
|
||||
public:
|
||||
static CCollisionPrimitive::Type GetType();
|
||||
static void SetStaticTableIndex(uint index);
|
||||
};
|
||||
|
||||
#endif // _CCOLLIDABLECOLLISIONSURFACE
|
|
@ -12,8 +12,21 @@
|
|||
class CRayCastResult;
|
||||
class CInternalRayCastStructure;
|
||||
|
||||
typedef void(*PrimitiveSetter)(uint);
|
||||
|
||||
class CCollisionPrimitive {
|
||||
public:
|
||||
class Type {
|
||||
public:
|
||||
Type(PrimitiveSetter setter, const char* info) : mSetter(setter), mInfo(info) {}
|
||||
|
||||
PrimitiveSetter GetSetter() const { return mSetter; }
|
||||
const char* GetInfo() const { return mInfo; }
|
||||
private:
|
||||
PrimitiveSetter mSetter;
|
||||
const char* mInfo;
|
||||
};
|
||||
|
||||
CCollisionPrimitive(const CMaterialList& list);
|
||||
|
||||
virtual uint GetTableIndex() const = 0;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#include "Collision/CCollidableCollisionSurface.hpp"
|
||||
|
||||
int CCollidableCollisionSurface::sTableIndex = -1;
|
||||
|
||||
void CCollidableCollisionSurface::SetStaticTableIndex(uint index) {
|
||||
sTableIndex = index;
|
||||
}
|
||||
|
||||
CCollisionPrimitive::Type CCollidableCollisionSurface::GetType() {
|
||||
return CCollisionPrimitive::Type(SetStaticTableIndex, "CCollidableCollisionSurface");
|
||||
}
|
Loading…
Reference in New Issue