[saco] Implement/match RwCameraClear(...)

This commit is contained in:
RD42 2024-08-04 22:28:46 +08:00
parent 10c7f31034
commit 919199284d
2 changed files with 16 additions and 0 deletions

View File

@ -128,6 +128,20 @@ void RpWorldAddCamera(RwCamera *camera)
_asm pop edx
}
void RwCameraClear(RwCamera *camera, RwRGBA *color, int clearMode)
{
DWORD dwFunc = (iGtaVersion != GTASA_VERSION_USA10) ? 0x7EE380 : 0x7EE340;
_asm push clearMode
_asm push color
_asm push camera
_asm mov edx, dwFunc
_asm call edx
_asm pop edx
_asm pop edx
_asm pop edx
}
void RwObjectHasFrameSetFrame(RwCamera *camera, RwFrame *frame)
{
DWORD dwFunc = (iGtaVersion != GTASA_VERSION_USA10) ? 0x804F30 : 0x804EF0l;

View File

@ -8,6 +8,7 @@ struct RwCamera { char _gap0; };
struct RpLight { char _gap0; };
struct RwRGBAReal { float r, g, b, a; };
struct RpAtomic { char _gap0; };
struct RwRGBA { char _gap0; };
RwRaster* RwRasterCreate(int width, int height, int depth, int flags);
RwTexture* RwTextureCreate(RwRaster *raster);
@ -19,6 +20,7 @@ RwCamera* RwCameraCreate();
void RwRasterDestroy(RwRaster *raster);
void CShadowCamera_Create(int iRasterSize);
void RpWorldAddCamera(RwCamera *camera);
void RwCameraClear(RwCamera *camera, RwRGBA *color, int clearMode);
void RwObjectHasFrameSetFrame(RwCamera *camera, RwFrame *frame);
void SetCameraFrameAndZBuffer(RwCamera *camera, RwRaster *frameBuffer, RwRaster *zBuffer);
void RwCameraSetClipPlane(RwCamera *camera, float farClip, float nearClip);