CBaddy::TugWeb and skeleton for Mem_RecoverPointer

This commit is contained in:
krystalgamer 2024-03-07 19:56:11 +01:00
parent 6ebf122928
commit b19f771462
7 changed files with 37 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#include "baddy.h"
#include "validate.h"
#include "utils.h"
#include "mem.h"
int CBaddy::DistanceToPlayer(int a2){
@ -32,6 +33,20 @@ int CBaddy::TrapWeb(void){
return 0;
}
//Revisit
int CBaddy::TugWeb(void){
if(!(this->field_2A8 & 0x10000)){
if (this->field_E2 > 0){
return 1;
}
}
Mem_RecoverPointer((SHandle*)&this->field_10C);
return 0;
}
void validate_CBaddy(void){
VALIDATE(CBaddy, field_204, 0x204);
VALIDATE(CBaddy, field_208, 0x208);

View File

@ -9,6 +9,7 @@ class CBaddy : public CSuper {
public:
EXPORT int DistanceToPlayer(int a2);
EXPORT int TrapWeb(void);
EXPORT int TugWeb(void);
unsigned char pad[0x69+4];

View File

@ -4,3 +4,7 @@
void* DCMem_New(size_t size, int unk1, int unk2, int unk3, int unk4) {
return NULL;
}
void* Mem_RecoverPointer(SHandle*){
return NULL;
}

9
mem.h
View File

@ -1 +1,8 @@
void* DCMem_New(size_t size, int unk1, int unk2, int unk3, int unk4);
#pragma once
#include "export.h"
struct SHandle{};
EXPORT void* DCMem_New(size_t size, int unk1, int unk2, int unk3, int unk4);
EXPORT void* Mem_RecoverPointer(SHandle*);

1
ob.cpp
View File

@ -255,6 +255,7 @@ void validate_CSuper(void){
*/
VALIDATE(CSuper, field_10C, 0x10C);
VALIDATE(CSuper, SNbrFaces, 0x11C);
VALIDATE(CSuper, alsoOutlineRelated, 0x120);
VALIDATE(CSuper, outlineR, 0x124);

5
ob.h
View File

@ -80,7 +80,10 @@ public:
EXPORT void CycleAnim(int a2, char a3);
EXPORT void ApplyPose(__int16 *a2);
unsigned char padB[0x28];
unsigned char padBBB[0x18];
int field_10C;
unsigned char padB[0x10-4];
int SNbrFaces;
int alsoOutlineRelated;
unsigned char outlineR;

View File

@ -172,6 +172,10 @@ SOURCE=.\m3d.h
# End Source File
# Begin Source File
SOURCE=.\mem.h
# End Source File
# Begin Source File
SOURCE=.\ob.h
# End Source File
# Begin Source File