mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-24 05:49:48 +00:00
FindBaddyOfType
This commit is contained in:
parent
46d2c3a345
commit
90cd6664cf
23
baddy.cpp
23
baddy.cpp
@ -758,6 +758,29 @@ void CBaddy::Baddy_SendSignal(void)
|
||||
Trig_SendSignalToLinks(ptr);
|
||||
}
|
||||
|
||||
static CBaddy* gBaddylist;
|
||||
|
||||
// @Ok
|
||||
CBaddy* FindBaddyOfType(int type)
|
||||
{
|
||||
CBaddy *current = gBaddylist;
|
||||
|
||||
if (current)
|
||||
{
|
||||
while (current)
|
||||
{
|
||||
if (current->field_38 == type)
|
||||
{
|
||||
return current;
|
||||
}
|
||||
|
||||
current = reinterpret_cast<CBaddy*>(current->field_20);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void validate_CBaddy(void){
|
||||
VALIDATE_SIZE(CBaddy, 0x324);
|
||||
|
||||
|
8
baddy.h
8
baddy.h
@ -1,4 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef BADDY_H
|
||||
#define BADDY_H
|
||||
|
||||
#include "export.h"
|
||||
#include "ob.h"
|
||||
|
||||
@ -172,6 +176,10 @@ public:
|
||||
__int16 field_32E;
|
||||
};
|
||||
|
||||
EXPORT CBaddy* FindBaddyOfType(int);
|
||||
|
||||
void validate_CBaddy(void);
|
||||
void validate_CScriptOnlyBaddy(void);
|
||||
void validate_SStateFlags(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user