Skip to content

Commit

Permalink
[POOLMMG2]: Update struct
Browse files Browse the repository at this point in the history
Updated struct to the current game version.
  • Loading branch information
FedericoMilesi committed Apr 21, 2024
1 parent 9819e91 commit e3a0555
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions KAIN2/Game/G2/POOLMMG2.C
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "Game/G2/POOLMMG2.H"
#include "Game/MEMPACK.H"

void G2PoolMem_InitPool(void *voidPool, int blockCount, int blockSize)//Matching - 100%
void G2PoolMem_InitPool(void *voidPool, int blockCount, int blockSize) // Matching - 100%
{
((struct _G2PoolMemPool_Type*)voidPool)->blockPool = (struct _G2PoolMem_Type*)MEMPACK_Malloc(blockCount * blockSize, 0x19);
((struct _G2PoolMemPool_Type*)voidPool)->stack = (unsigned short*)MEMPACK_Malloc(blockCount * 4, 0x19);
Expand All @@ -12,7 +12,7 @@ void G2PoolMem_InitPool(void *voidPool, int blockCount, int blockSize)//Matching
G2PoolMem_ResetPool(voidPool);
}

void G2PoolMem_ResetPool(void* voidPool)//Matching - 100%
void G2PoolMem_ResetPool(void* voidPool) // Matching - 100%
{
struct _G2PoolMemPool_Type* pool;
int blockIndex;
Expand All @@ -33,7 +33,7 @@ void G2PoolMem_ResetPool(void* voidPool)//Matching - 100%
}
}

void* G2PoolMem_Allocate(void* voidPool)//Matching - 100%
void* G2PoolMem_Allocate(void* voidPool) // Matching - 100%
{
int blockIndex;

Expand Down
2 changes: 1 addition & 1 deletion KAIN2/Game/G2/POOLMMG2.H
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef POOLMMG2_H
#define POOLMMG2_H

struct _G2PoolMemPool_Type // hashcode: 0x987744BB (dec: -1737014085)
struct _G2PoolMemPool_Type
{
unsigned short blockSize; // size=0, offset=0
unsigned short stackTop; // size=0, offset=2
Expand Down
5 changes: 2 additions & 3 deletions KAIN2/Game/G2/QUATG2.C
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "Game/MATH3D.H"
#include "Game/PSX/COLLIDES.H"


#define EulSafe "\000\001\002\000"
#define EulNext "\001\002\000\001"
#define EulFrmR 1
Expand All @@ -27,7 +26,7 @@ void G2EulerAngles_FromMatrix(struct _G2EulerAngles_Type* euler, struct _G2Matri
long n;
long s;
long f;
long g; // Not exist in sysdump
long g; // not from SYMDUMP

unsigned int o;
o = order;
Expand Down Expand Up @@ -94,4 +93,4 @@ void G2EulerAngles_FromMatrix(struct _G2EulerAngles_Type* euler, struct _G2Matri
euler->z = t;
}
euler->order = (short)order;
}
}
2 changes: 1 addition & 1 deletion KAIN2/Game/G2/TIMERG2.C
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ short G2Timer_GetFrameTime() // Matching - 100%
}

return atime;
}
}

0 comments on commit e3a0555

Please sign in to comment.