mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 01:38:17 +08:00
[saco] Implement/match the three plate raster helpers; the mov edx, 0x34/lea pair is hand written asm and the trailing return 0 is what keeps the zero path last
This commit is contained in:
1 parent
366fbef654
commit
9b7439cb06
1 file changed
+60
@@ -1768,6 +1768,66 @@ callOriginal:
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
DWORD unnamed_101516CC;
|
||||
|
||||
// .text:100A4470 : caches the d3d texture the plate raster carries at +0x34
|
||||
DWORD FUNC_100A4470()
|
||||
{
|
||||
if(unnamed_101516C8)
|
||||
{
|
||||
_asm mov eax, unnamed_101516C8
|
||||
_asm mov edx, 0x34
|
||||
_asm lea esi, [edx+eax]
|
||||
_asm mov eax, [esi]
|
||||
_asm mov unnamed_101516CC, eax
|
||||
|
||||
return unnamed_101516CC;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
// .text:100A44A0 : drops the cached plate raster
|
||||
void FUNC_100A44A0()
|
||||
{
|
||||
DWORD dwRasterDestroy = 0x7FB060;
|
||||
if(iGtaVersion == GTASA_VERSION_USA10) dwRasterDestroy = 0x7FB020;
|
||||
|
||||
if(unnamed_101516C8)
|
||||
{
|
||||
_asm push unnamed_101516C8
|
||||
_asm mov edx, dwRasterDestroy
|
||||
_asm call edx
|
||||
_asm pop edx
|
||||
}
|
||||
|
||||
unnamed_101516C8 = 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
// .text:100A44E0 : creates the plate raster, unconditionally
|
||||
void FUNC_100A44E0()
|
||||
{
|
||||
if(iGtaVersion == GTASA_VERSION_USA10) unnamed_10113ADC = 0x7FB230;
|
||||
|
||||
_asm push 0x604
|
||||
_asm push 0x20
|
||||
_asm push 0x10
|
||||
_asm push 0x40
|
||||
_asm mov ebx, unnamed_10113ADC
|
||||
_asm call ebx
|
||||
_asm mov unnamed_101516C8, eax
|
||||
_asm pop ebx
|
||||
_asm pop ebx
|
||||
_asm pop ebx
|
||||
_asm pop ebx
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
NUDE CCustomCarPlateMgr__CreatePlateTexture__RwRasterCreate_Hook()
|
||||
{
|
||||
__asm
|
||||
|
||||
Reference in new issue
Block a user