From e3a05554d1c1e32c86cbcd215dbec933d1098e06 Mon Sep 17 00:00:00 2001 From: Federico Date: Sun, 21 Apr 2024 00:48:46 -0300 Subject: [PATCH] [POOLMMG2]: Update struct Updated struct to the current game version. --- KAIN2/Game/G2/POOLMMG2.C | 6 +++--- KAIN2/Game/G2/POOLMMG2.H | 2 +- KAIN2/Game/G2/QUATG2.C | 5 ++--- KAIN2/Game/G2/TIMERG2.C | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/KAIN2/Game/G2/POOLMMG2.C b/KAIN2/Game/G2/POOLMMG2.C index cab666250..c317c10c5 100644 --- a/KAIN2/Game/G2/POOLMMG2.C +++ b/KAIN2/Game/G2/POOLMMG2.C @@ -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); @@ -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; @@ -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; diff --git a/KAIN2/Game/G2/POOLMMG2.H b/KAIN2/Game/G2/POOLMMG2.H index b757ea9cf..ba4ee34da 100644 --- a/KAIN2/Game/G2/POOLMMG2.H +++ b/KAIN2/Game/G2/POOLMMG2.H @@ -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 diff --git a/KAIN2/Game/G2/QUATG2.C b/KAIN2/Game/G2/QUATG2.C index c2cd57c0c..e2f7d20a7 100644 --- a/KAIN2/Game/G2/QUATG2.C +++ b/KAIN2/Game/G2/QUATG2.C @@ -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 @@ -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; @@ -94,4 +93,4 @@ void G2EulerAngles_FromMatrix(struct _G2EulerAngles_Type* euler, struct _G2Matri euler->z = t; } euler->order = (short)order; -} \ No newline at end of file +} diff --git a/KAIN2/Game/G2/TIMERG2.C b/KAIN2/Game/G2/TIMERG2.C index 0fe634a42..f9efa4756 100644 --- a/KAIN2/Game/G2/TIMERG2.C +++ b/KAIN2/Game/G2/TIMERG2.C @@ -20,4 +20,4 @@ short G2Timer_GetFrameTime() // Matching - 100% } return atime; -} \ No newline at end of file +}