From 8edb4abbcfae71e3c9d12513a23b63c59186f4dc Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sun, 4 Aug 2024 22:34:16 +0800 Subject: [PATCH] [saco] Implement/match `RpLightSetRadius(...)` --- saco/game/rwstuff.cpp | 12 ++++++++++++ saco/game/rwstuff.h | 1 + 2 files changed, 13 insertions(+) diff --git a/saco/game/rwstuff.cpp b/saco/game/rwstuff.cpp index 35d577c..09bf318 100644 --- a/saco/game/rwstuff.cpp +++ b/saco/game/rwstuff.cpp @@ -315,6 +315,18 @@ void RpLightSetColor(RpLight *light, RwRGBAReal *color) _asm pop edx } +void RpLightSetRadius(RpLight *light, float radius) +{ + DWORD dwFunc = 0x751A70; + + _asm push radius + _asm push light + _asm mov edx, dwFunc + _asm call edx + _asm pop edx + _asm pop edx +} + 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 7088786..46c3803 100644 --- a/saco/game/rwstuff.h +++ b/saco/game/rwstuff.h @@ -35,6 +35,7 @@ void RwCameraSetViewWindow(RwCamera *camera, VECTOR2D *viewWindow); RpLight* RpLightCreate(int type); void RpClumpAddLight(RpClump *clump, RpLight *light); void RpLightSetColor(RpLight *light, RwRGBAReal *color); +void RpLightSetRadius(RpLight *light, float radius); void RwCameraSetProjection(RwCamera *camera, int projection); void RwFrameTranslate(RwFrame *frame, VECTOR *v, int combine); void RwFrameRotate(RwFrame* frame, int axis, float angle);