SLinkInfo and CJonah::GraspWaypoint

This commit is contained in:
krystalgamer 2024-05-22 16:49:57 +02:00
parent eb8c32fc5b
commit 31426533d7
7 changed files with 40 additions and 1 deletions

View File

@ -832,6 +832,7 @@ void validate_CBaddy(void){
VALIDATE(CBaddy, field_2F0, 0x2F0);
VALIDATE(CBaddy, field_2F4, 0x2F4);
VALIDATE(CBaddy, field_2F8, 0x2F8);
VALIDATE(CBaddy, field_2FC, 0x2FC);

View File

@ -147,8 +147,8 @@ public:
int field_2F0;
int field_2F4;
int field_2F8;
unsigned char shitterPad[0x4];
CVector field_2FC;
int field_308;
unsigned char padAfter308[0x314 - 0x308 - 4];

View File

@ -96,6 +96,13 @@ void Jonah_CreateJonah(const unsigned int *stack, unsigned int *result)
}
}
// @Ok
void CJonah::GraspWaypoint(SLinkInfo* a2)
{
this->field_2F8 = a2->field_0;
this->field_1F4 = a2->field_8;
}
void validate_CJonah(void){
VALIDATE_SIZE(CJonah, 0x380);

View File

@ -1,12 +1,19 @@
#pragma once
#ifndef JONAH_H
#define JONAH_H
#include "export.h"
#include "baddy.h"
#include "trig.h"
class CJonah : public CBaddy {
public:
EXPORT CJonah(void);
EXPORT CJonah(int*, int);
EXPORT void GraspWaypoint(SLinkInfo* a2);
unsigned char padStartJonah[0x28];
int field_34C;
int field_350;
@ -16,3 +23,5 @@ public:
void validate_CJonah(void);
EXPORT void Jonah_CreateJonah(const unsigned int *stack, unsigned int *result);
#endif

View File

@ -44,6 +44,7 @@
#include "spidey.h"
#include "message.h"
#include "bullet.h"
#include "trig.h"
template<bool b>
@ -215,6 +216,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
validate_CMenu();
validate_SEntry();
validate_CBullet();
validate_SLinkInfo();
puts("[*] Validation done!");

View File

@ -1,4 +1,6 @@
#include "trig.h"
#include "validate.h"
// @TODO
int Trig_GetLevelId(void)
@ -19,3 +21,12 @@ void* Trig_GetLinksPointer(int)
// @TODO
void Trig_SendPulse(unsigned __int16*)
{}
void validate_SLinkInfo(void)
{
VALIDATE_SIZE(SLinkInfo, 0xC);
VALIDATE(SLinkInfo, field_0, 0x0);
VALIDATE(SLinkInfo, field_4, 0x4);
VALIDATE(SLinkInfo, field_8, 0x8);
}

9
trig.h
View File

@ -6,9 +6,18 @@
#include "export.h"
#include "vector.h"
struct SLinkInfo
{
int field_0;
int field_4;
int field_8;
};
EXPORT int Trig_GetLevelId(void);
EXPORT void Trig_GetPosition(CVector*, int);
EXPORT void* Trig_GetLinksPointer(int);
EXPORT void Trig_SendPulse(unsigned __int16*);
void validate_SLinkInfo(void);
#endif