[saco] Implement/match FUNC_100B5D20; it swaps the offscreen rasters into the scene camera around three GTA calls

This commit is contained in:
ricardoofnl
2026-09-04 22:27:36 +07:00
parent 315ae05989
commit 7cf34084ce
2 changed files with 44 additions and 0 deletions
+43
View File
@@ -1173,6 +1173,49 @@ void CreateCameraRaster()
_asm add esp, 16
}
//----------------------------------------------------
DWORD CamFrameBufferSave;
DWORD CamZBufferSave;
DWORD *pRwSceneCamera = (DWORD *)0xC1703C;
void FUNC_100B5D20()
{
DWORD dwCamera;
_asm pushad
CreateCameraRaster();
dwCamera = *pRwSceneCamera;
*(DWORD *)0xC9BCC0 = dwCamera;
_asm mov ebx, dwCamera
_asm mov edx, [ebx+0x60]
_asm mov CamFrameBufferSave, edx
_asm mov edx, [ebx+0x64]
_asm mov CamZBufferSave, edx
_asm mov edx, CamFrameBuffer2
_asm mov [ebx+0x60], edx
_asm mov edx, CamZBuffer2
_asm mov [ebx+0x64], edx
_asm mov edx, 0x734650
_asm call edx
_asm mov edx, 0x53DF40
_asm call edx
_asm mov edx, 0x732F30
_asm call edx
_asm mov ebx, dwCamera
_asm mov edx, CamFrameBufferSave
_asm mov [ebx+0x60], edx
_asm mov edx, CamZBufferSave
_asm mov [ebx+0x64], edx
_asm popad
}
//----------------------------------------------------
+1
View File
@@ -108,6 +108,7 @@ int FUNC_100B41F0(void *pData); // .text:100B41F0
int __stdcall FUNC_100B4240(DWORD *pdwIn, DWORD dwParam); // .text:100B4240
void __stdcall FUNC_100B42B0(DWORD *pdwEntity); // .text:100B42B0
DWORD __stdcall FUNC_100B4430(int a1, int a2); // .text:100B4430
void FUNC_100B5D20(); // .text:100B5D20
void FUNC_100B5210(int a1, void *a2); // .text:100B5210, __cdecl: the caller's
// stack cleanup is folded into the next call's argument setup