mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-23 05:19:43 +00:00
CSuperDocOck::GetNewCommandBlock
This commit is contained in:
parent
c98c33058f
commit
cf8230ee3e
27
superock.cpp
27
superock.cpp
@ -12,6 +12,33 @@
|
||||
extern CBaddy* BaddyList;
|
||||
extern CPlayer* MechList;
|
||||
|
||||
// @Ok
|
||||
INLINE i32* CSuperDocOck::GetNewCommandBlock(u32 a1)
|
||||
{
|
||||
i32* res = static_cast<i32*>(DCMem_New(4 * a1, 0, 1, 0, 1));
|
||||
res[a1 - 1] = 0;
|
||||
|
||||
if (!this->field_348)
|
||||
{
|
||||
this->field_348 = res;
|
||||
}
|
||||
else
|
||||
{
|
||||
i32* it = this->field_348;
|
||||
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;
|
||||
}
|
||||
|
||||
// @Ok
|
||||
i32 CSuperDocOck::Hit(SHitInfo* a2)
|
||||
{
|
||||
|
@ -16,7 +16,8 @@ public:
|
||||
EXPORT void DoPhysics(void);
|
||||
EXPORT void RenderClaws(void);
|
||||
EXPORT void KillAllCommandBlocks(void);
|
||||
EXPORT int* KillCommandBlock(int*);
|
||||
EXPORT i32* KillCommandBlock(i32*);
|
||||
EXPORT i32* GetNewCommandBlock(u32);
|
||||
|
||||
EXPORT void PlaySingleAnim(u32, i32, i32);
|
||||
EXPORT void Initialise(void);
|
||||
|
Loading…
Reference in New Issue
Block a user