mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-23 05:19:43 +00:00
CVenom::GetNewCommandBlock
This commit is contained in:
parent
1838532b73
commit
c98c33058f
27
venom.cpp
27
venom.cpp
@ -11,6 +11,33 @@
|
||||
extern u8 gObjFileRegion;
|
||||
extern CBody* EnvironmentalObjectList;
|
||||
|
||||
// @Ok
|
||||
INLINE i32* CVenom::GetNewCommandBlock(u32 a1)
|
||||
{
|
||||
i32* res = static_cast<i32*>(DCMem_New(4 * a1, 0, 1, 0, 1));
|
||||
res[a1 - 1] = 0;
|
||||
|
||||
if (!this->field_35C)
|
||||
{
|
||||
this->field_35C = res;
|
||||
}
|
||||
else
|
||||
{
|
||||
i32* it = this->field_35C;
|
||||
while (1)
|
||||
{
|
||||
if (!it[it[1] - 1])
|
||||
break;
|
||||
|
||||
it = reinterpret_cast<i32*>(it[it[1] - 1]);
|
||||
}
|
||||
|
||||
it[it[1] - 1] = reinterpret_cast<i32>(res);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
// @MEDIUMTODO
|
||||
CVenom::CVenom(int*, int)
|
||||
{
|
||||
|
3
venom.h
3
venom.h
@ -14,8 +14,11 @@ public:
|
||||
EXPORT CVenom(i32*, i32);
|
||||
EXPORT void Shouldnt_DoPhysics_Be_Virtual(void);
|
||||
EXPORT void DoPhysics(void);
|
||||
|
||||
EXPORT i32* KillCommandBlock(i32*);
|
||||
EXPORT void KillAllCommandBlocks(void);
|
||||
EXPORT i32* GetNewCommandBlock(u32);
|
||||
|
||||
EXPORT u8 TugImpulse(CVector *, CVector *, CVector *);
|
||||
EXPORT void PlayNextFootstepSFX(void);
|
||||
EXPORT void GetTargetPosFromNode(CVector *, i32);
|
||||
|
Loading…
Reference in New Issue
Block a user