From 0c4148e8a416c9aa6305a9a094b330977a4c167a Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Fri, 4 Sep 2026 22:27:02 +0700 Subject: [PATCH] [saco] Add `FUNC_100B4BC0`; a 0x59C730 thunk with the same three-pop cleanup as `FUNC_100B4C00` --- saco/game/util.cpp | 25 +++++++++++++++++++++++++ saco/game/util.h | 1 + 2 files changed, 26 insertions(+) diff --git a/saco/game/util.cpp b/saco/game/util.cpp index 2218232..fb049fb 100644 --- a/saco/game/util.cpp +++ b/saco/game/util.cpp @@ -213,6 +213,7 @@ int FUNC_100B3D00() return ((GAME_POOL_HOLDER *)0xC8800C)->CountUsedSlots(); } + //----------------------------------------------------------- void ReplaceBuildingModel(ENTITY_TYPE *pEntity, int iModelID) @@ -261,6 +262,10 @@ BOOL __stdcall IsValidPedModel(int iModel) return FALSE; } + + + + //----------------------------------------------------------- int GetInvalidModelInfoCount() @@ -579,6 +584,8 @@ DWORD __stdcall CRC32FromUpcaseString(char *szString) +//----------------------------------------------------------- + bool FUNC_100B4B50(VECTOR *vecPos) { if( vecPos->X < 20000.0f && vecPos->X > -20000.0f && @@ -592,6 +599,20 @@ bool FUNC_100B4B50(VECTOR *vecPos) //----------------------------------------------------------- +int FUNC_100B4BC0(int a1, int a2, int a3) +{ + _asm push a3 + _asm push a2 + _asm push a1 + _asm mov edx, 0x59C730 + _asm call edx + _asm pop edx + _asm pop edx + _asm pop edx +} + +//----------------------------------------------------------- + int FUNC_100B4BE0(int a1, int a2, int a3) { _asm push a3 @@ -753,6 +774,8 @@ void _VectorNormalise(VECTOR *vec) _asm call edx } + + //---------------------------------------------------- float GetNormalisation(VECTOR *vec) @@ -760,6 +783,7 @@ float GetNormalisation(VECTOR *vec) return ((vec->X * vec->X) + (vec->Y * vec->Y) + (vec->Z * vec->Z)); } + //---------------------------------------------------- float DegToRad(float fDegrees) @@ -972,6 +996,7 @@ void CreateCameraRaster() _asm add esp, 16 } + //---------------------------------------------------- void ResetLocalPad(int unk1, int unk2) diff --git a/saco/game/util.h b/saco/game/util.h index dc273c1..a677e27 100644 --- a/saco/game/util.h +++ b/saco/game/util.h @@ -98,6 +98,7 @@ DWORD * GetNextTaskFromTask(DWORD *task); int GetTaskTypeFromTask(DWORD *task); const char* GetTaskNameFromTask(DWORD *task); +int FUNC_100B4BC0(int a1, int a2, int a3); // .text:100B4BC0 void FUNC_100B5210(int a1, void *a2); // .text:100B5210, __cdecl: the caller's // stack cleanup is folded into the next call's argument setup