mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-23 06:57:31 +08:00
[saco] Implement and match SaveCameraRaster(...)
This commit is contained in:
parent
bb943ef2a3
commit
a64a724681
@ -1552,6 +1552,55 @@ void WriteRwRasterToFile(DWORD raster,char *filename)
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
DWORD CamFrameBuffer2=0;
|
||||
DWORD CamZBuffer2=0;
|
||||
|
||||
void SaveCameraRaster(char *filename)
|
||||
{
|
||||
// get the frame buffer from the main RwCamera
|
||||
//_asm mov ebx, 0xC1703C
|
||||
//_asm mov esi, [ebx]
|
||||
//_asm mov ebx, [esi+96]
|
||||
|
||||
_asm mov eax, 0xC402D8
|
||||
_asm mov ebx, [eax]
|
||||
_asm mov CamFrameBuffer, ebx
|
||||
|
||||
_asm mov esi, CamFrameBuffer
|
||||
_asm mov eax, [esi+20]
|
||||
_asm mov Depth, eax
|
||||
_asm mov eax, [esi+16]
|
||||
_asm mov Height, eax
|
||||
_asm mov eax, [esi+12]
|
||||
_asm mov Width, eax
|
||||
|
||||
if(CamFrameBuffer) {
|
||||
WriteRwRasterToFile(CamFrameBuffer,"Raster1.bmp");
|
||||
pChatWindow->AddDebugMessage("Width %u Height: %u Depth: %u",Width,Height,Depth);
|
||||
}
|
||||
|
||||
//_asm mov eax, 0xC7C71C
|
||||
//_asm mov ebx, [eax]
|
||||
//_asm mov CamFrameBuffer, ebx
|
||||
|
||||
if(!CamFrameBuffer2) return;
|
||||
|
||||
_asm mov esi, CamFrameBuffer2
|
||||
_asm mov eax, [esi+20]
|
||||
_asm mov Depth, eax
|
||||
_asm mov eax, [esi+16]
|
||||
_asm mov Height, eax
|
||||
_asm mov eax, [esi+12]
|
||||
_asm mov Width, eax
|
||||
|
||||
if(CamFrameBuffer2) {
|
||||
WriteRwRasterToFile(CamFrameBuffer2,"Raster2.bmp");
|
||||
pChatWindow->AddDebugMessage("Width %u Height: %u Depth: %u",Width,Height,Depth);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
BOOL IsFileOrDirectoryExists(char * szPath)
|
||||
{
|
||||
struct _stat buf;
|
||||
|
@ -30,6 +30,8 @@ BYTE __stdcall FindPlayerNumFromPedPtr(DWORD dwPedPtr);
|
||||
|
||||
void GameResetRadarColors();
|
||||
|
||||
void SaveCameraRaster(char *filename);
|
||||
|
||||
BOOL IsFileOrDirectoryExists(char * szPath);
|
||||
|
||||
DWORD unnamed_100B6100(char *szString, int nMaxLen);
|
||||
|
Loading…
Reference in New Issue
Block a user