mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-26 23:00:30 +00:00
CBlackCat::GetNewCommandBlock
This commit is contained in:
parent
8efa8bd050
commit
a49cd37df5
27
blackcat.cpp
27
blackcat.cpp
@ -32,10 +32,31 @@ void CBlackCat::DoMGSShadow(void)
|
||||
printf("CBlackCat::DoMGSShadow(void)");
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
void CBlackCat::GetNewCommandBlock(u32)
|
||||
// @Ok
|
||||
i32* CBlackCat::GetNewCommandBlock(u32 a1)
|
||||
{
|
||||
printf("CBlackCat::GetNewCommandBlock(u32)");
|
||||
i32* res = static_cast<i32*>(DCMem_New(4 * a1, 0, 1, 0, 1));
|
||||
res[a1 - 1] = 0;
|
||||
|
||||
if (!this->field_350)
|
||||
{
|
||||
this->field_350 = res;
|
||||
}
|
||||
else
|
||||
{
|
||||
i32* it = this->field_350;
|
||||
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;
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
|
@ -16,7 +16,7 @@ public:
|
||||
|
||||
EXPORT void AI(void) OVERRIDE;
|
||||
EXPORT void DoMGSShadow(void);
|
||||
EXPORT void GetNewCommandBlock(u32);
|
||||
EXPORT i32* GetNewCommandBlock(u32);
|
||||
EXPORT void KillCommandBlockByID(i32);
|
||||
EXPORT void SynthesizeAnalogueInput(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user