CChopperMissile::GetFinalTargetNode

This commit is contained in:
krystalgamer 2024-07-23 16:54:54 +02:00
parent 3003a8f70c
commit d5c0920060
2 changed files with 16 additions and 5 deletions

View File

@ -9,12 +9,23 @@ extern CBaddy* ControlBaddyList;
extern SFlatBitVelocity FlatBitVelocities[];
extern i32 DifficultyLevel;
extern i16 **gTrigNodes;
// @TODO
i32 CChopperMissile::GetFinalTargetNode(i32)
// @Ok
// @Test
INLINE i32 CChopperMissile::GetFinalTargetNode(i32 a2)
{
printf("i32 CChopperMissile::GetFinalTargetNode(i32)");
return 0x23072024;
for (u16 *LinksPointer = Trig_GetLinksPointer(a2);
LinksPointer;
LinksPointer = Trig_GetLinksPointer(LinksPointer[1]))
{
i32 v9 = LinksPointer[1];
if (*gTrigNodes[v9] != 1002)
return v9;
}
return 0;
}
// @TODO

2
trig.h
View File

@ -43,7 +43,7 @@ struct PendingListEntry
EXPORT int Trig_GetLevelId(void);
EXPORT u16* Trig_GetPosition(CVector*, int);
EXPORT u16* Trig_GetLinksPointer(int);
EXPORT u16* Trig_GetLinksPointer(i32);
EXPORT void Trig_SendPulse(u16*);
EXPORT void Trig_SendPulseToNode(int);
EXPORT void Trig_SendSignalToLinks(u16*);