From caed517670c4821604733e27a62960737d85e3e0 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 4 Aug 2024 22:37:45 +0800 Subject: [PATCH] [saco] Implement/match `RpClumpDestroy(...)` --- saco/game/rwstuff.cpp | 14 ++++++++++++++ saco/game/rwstuff.h | 1 + 2 files changed, 15 insertions(+) diff --git a/saco/game/rwstuff.cpp b/saco/game/rwstuff.cpp index c84cc57..69dc5ce 100644 --- a/saco/game/rwstuff.cpp +++ b/saco/game/rwstuff.cpp @@ -380,6 +380,20 @@ RpClump * RpClumpClone(RpClump *clump) return pResult; } +int RpClumpDestroy(RpClump *clump) +{ + int bResult = 0; + DWORD dwFunc = (iGtaVersion != GTASA_VERSION_USA10) ? 0x74A360 : 0x74A310; + + _asm push clump + _asm mov eax, dwFunc + _asm call eax + _asm mov bResult, eax + _asm pop eax + + return bResult; +} + void RwCameraSetProjection(RwCamera *camera, int projection) { DWORD dwFunc = (iGtaVersion != GTASA_VERSION_USA10) ? 0x7EE3E0 : 0x7EE3A0; diff --git a/saco/game/rwstuff.h b/saco/game/rwstuff.h index 27b9467..c7ca1bd 100644 --- a/saco/game/rwstuff.h +++ b/saco/game/rwstuff.h @@ -40,6 +40,7 @@ void RpWorldAddLight(RpLight *light); void RpWorldRemoveLight(RpLight *light); void CVisibilityPlugins_SetRenderWareCamera(RwCamera *camera); RpClump * RpClumpClone(RpClump *clump); +int RpClumpDestroy(RpClump *clump); void RwCameraSetProjection(RwCamera *camera, int projection); void RwFrameTranslate(RwFrame *frame, VECTOR *v, int combine); void RwFrameRotate(RwFrame* frame, int axis, float angle);