mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-27 07:10:24 +00:00
CBaddy::StruckGameObject
This commit is contained in:
parent
79fd6d9ec6
commit
902205b9cb
26
baddy.cpp
26
baddy.cpp
@ -154,6 +154,32 @@ int CBaddy::PathCheck(CVector* a2, CVector* a3, CVector* a4, int a5)
|
||||
}
|
||||
|
||||
|
||||
static CBody** const dword_56E990 = (CBody**)0x56E990;
|
||||
|
||||
// @Ok
|
||||
CBody* CBaddy::StruckGameObject(int a2, int a3)
|
||||
{
|
||||
CBody *result;
|
||||
if ( !a2
|
||||
|| (result = Utils_CheckObjectCollision(
|
||||
&this->field_2FC,
|
||||
&this->mPos,
|
||||
globalSuper,
|
||||
this)) == 0 )
|
||||
{
|
||||
if (a3 && (result = Utils_CheckObjectCollision(&this->field_2FC, &this->mPos, *dword_56E990, this)))
|
||||
{
|
||||
print_if_false(result != this, "smoething's wrong in the state of denmark");
|
||||
return result;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void validate_CBaddy(void){
|
||||
VALIDATE_SIZE(CBaddy, 0x324);
|
||||
|
2
baddy.h
2
baddy.h
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include "export.h"
|
||||
#include "ob.h"
|
||||
|
||||
@ -23,6 +22,7 @@ public:
|
||||
EXPORT int RunTimer(int*);
|
||||
EXPORT int PathCheckGuts(CVector*, CVector*, CVector*, int);
|
||||
EXPORT int PathCheck(CVector*, CVector*, CVector*, int);
|
||||
EXPORT CBody* StruckGameObject(int, int);
|
||||
|
||||
unsigned char padBaddyStart[0x14];
|
||||
|
||||
|
@ -144,3 +144,9 @@ int Rnd(int)
|
||||
{
|
||||
return 0x420420;
|
||||
}
|
||||
|
||||
// @TODO
|
||||
CBody* Utils_CheckObjectCollision(CVector*, CVector*, CBody*, CBody*)
|
||||
{
|
||||
return reinterpret_cast<CBody*>(0x13052024);
|
||||
}
|
||||
|
7
utils.h
7
utils.h
@ -1,7 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
#include "export.h"
|
||||
#include "vector.h"
|
||||
#include "ob.h"
|
||||
|
||||
|
||||
EXPORT int Utils_CrapDist(const CVector& a,const CVector& b);
|
||||
@ -10,3 +14,6 @@ EXPORT int Utils_CompareStrings(const char* left, const char* right);
|
||||
EXPORT int Utils_ArcCos(int val);
|
||||
EXPORT int Utils_CopyString(const char*, char*, int);
|
||||
EXPORT int Rnd(int);
|
||||
EXPORT CBody* Utils_CheckObjectCollision(CVector*, CVector*, CBody*, CBody*);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user