mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
Partial revert "Normalized string comparision functions usage between different functions"
This reverts commit 1c41d135b5
.
This commit is contained in:
parent
f5d23d58f2
commit
f9a507b029
2 changed files with 25 additions and 15 deletions
|
@ -50,7 +50,7 @@ void CVehicleModelInfo::FindEditableMaterialList()
|
||||||
{
|
{
|
||||||
if ( const char* texName = RwTextureGetName(texture) )
|
if ( const char* texName = RwTextureGetName(texture) )
|
||||||
{
|
{
|
||||||
if ( _stricmp(texName, "vehiclegrunge256") == 0 )
|
if ( strcmp(texName, "vehiclegrunge256") == 0 )
|
||||||
{
|
{
|
||||||
editableMaterials.push_back( material );
|
editableMaterials.push_back( material );
|
||||||
}
|
}
|
||||||
|
@ -107,11 +107,11 @@ void CCustomCarPlateMgr::PollPlates( RpClump* clump, PlateMaterialsData* materia
|
||||||
{
|
{
|
||||||
if ( const char* texName = RwTextureGetName(texture) )
|
if ( const char* texName = RwTextureGetName(texture) )
|
||||||
{
|
{
|
||||||
if ( _stricmp( texName, "carplate" ) == 0 )
|
if ( strcmp( texName, "carplate" ) == 0 )
|
||||||
{
|
{
|
||||||
carplates.push_back( material );
|
carplates.push_back( material );
|
||||||
}
|
}
|
||||||
else if ( _stricmp( texName, "carpback" ) == 0 )
|
else if ( strcmp( texName, "carpback" ) == 0 )
|
||||||
{
|
{
|
||||||
carpbacks.push_back( material );
|
carpbacks.push_back( material );
|
||||||
}
|
}
|
||||||
|
|
|
@ -372,10 +372,10 @@ RpAtomic* RenderBigVehicleActomic(RpAtomic* pAtomic, float)
|
||||||
{
|
{
|
||||||
const char* pNodeName = GetFrameNodeName(RpAtomicGetFrame(pAtomic));
|
const char* pNodeName = GetFrameNodeName(RpAtomicGetFrame(pAtomic));
|
||||||
|
|
||||||
if ( _stricmp(pNodeName, "moving_prop") == 0 )
|
if ( strncmp(pNodeName, "moving_prop", 11) == 0 )
|
||||||
return MovingPropellerRender(pAtomic);
|
return MovingPropellerRender(pAtomic);
|
||||||
|
|
||||||
if ( _stricmp(pNodeName, "static_prop") == 0 )
|
if ( strncmp(pNodeName, "static_prop", 11) == 0 )
|
||||||
return StaticPropellerRender(pAtomic);
|
return StaticPropellerRender(pAtomic);
|
||||||
|
|
||||||
return AtomicDefaultRenderCallBack(pAtomic);
|
return AtomicDefaultRenderCallBack(pAtomic);
|
||||||
|
@ -1670,16 +1670,18 @@ void __declspec(naked) PlaneAtomicRendererSetup()
|
||||||
call GetFrameNodeName
|
call GetFrameNodeName
|
||||||
//push eax
|
//push eax
|
||||||
mov [esp+8+8], eax
|
mov [esp+8+8], eax
|
||||||
|
push 11
|
||||||
push offset aStaticProp
|
push offset aStaticProp
|
||||||
push eax
|
push eax
|
||||||
call _stricmp
|
call strncmp
|
||||||
add esp, 0Ch
|
add esp, 10h
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz PlaneAtomicRendererSetup_Alpha
|
jz PlaneAtomicRendererSetup_Alpha
|
||||||
|
push 11
|
||||||
push offset aMovingProp
|
push offset aMovingProp
|
||||||
push [esp+12+4]
|
push [esp+12+8]
|
||||||
call _stricmp
|
call strncmp
|
||||||
add esp, 8
|
add esp, 0Ch
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz PlaneAtomicRendererSetup_NoAlpha
|
jnz PlaneAtomicRendererSetup_NoAlpha
|
||||||
|
|
||||||
|
@ -1702,6 +1704,13 @@ static void* RenderVehicleHiDetailAlphaCB = AddressByVersion<void*>(0x733F80, 0x
|
||||||
static void* RenderHeliRotorAlphaCB = AddressByVersion<void*>(0x7340B0, 0x7348E0, 0x76E110);
|
static void* RenderHeliRotorAlphaCB = AddressByVersion<void*>(0x7340B0, 0x7348E0, 0x76E110);
|
||||||
static void* RenderHeliTailRotorAlphaCB = AddressByVersion<void*>(0x734170, 0x7349A0, 0x76E1E0);
|
static void* RenderHeliTailRotorAlphaCB = AddressByVersion<void*>(0x734170, 0x7349A0, 0x76E1E0);
|
||||||
static void* HunterTest_JumpBack = AddressByVersion<void*>(0x4C7914, 0x4C7994, 0x4D2203);
|
static void* HunterTest_JumpBack = AddressByVersion<void*>(0x4C7914, 0x4C7994, 0x4D2203);
|
||||||
|
|
||||||
|
// strcmp can't be invoked from inline assembly block?
|
||||||
|
static int strcmp_wrap(const char *s1, const char *s2)
|
||||||
|
{
|
||||||
|
return strcmp( s1, s2 );
|
||||||
|
}
|
||||||
|
|
||||||
void __declspec(naked) HunterTest()
|
void __declspec(naked) HunterTest()
|
||||||
{
|
{
|
||||||
static const char aDoorDummy[] = "door_lf_ok";
|
static const char aDoorDummy[] = "door_lf_ok";
|
||||||
|
@ -1713,23 +1722,24 @@ void __declspec(naked) HunterTest()
|
||||||
setnz al
|
setnz al
|
||||||
movzx di, al
|
movzx di, al
|
||||||
|
|
||||||
|
push 10
|
||||||
push offset aWindscreen
|
push offset aWindscreen
|
||||||
push ebp
|
push ebp
|
||||||
call _stricmp
|
call strncmp
|
||||||
add esp, 8
|
add esp, 0Ch
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz HunterTest_RegularAlpha
|
jz HunterTest_RegularAlpha
|
||||||
|
|
||||||
push offset aStaticRotor2
|
push offset aStaticRotor2
|
||||||
push ebp
|
push ebp
|
||||||
call _stricmp
|
call strcmp_wrap
|
||||||
add esp, 8
|
add esp, 8
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz HunterTest_StaticRotor2AlphaSet
|
jz HunterTest_StaticRotor2AlphaSet
|
||||||
|
|
||||||
push offset aStaticRotor
|
push offset aStaticRotor
|
||||||
push ebp
|
push ebp
|
||||||
call _stricmp
|
call strcmp_wrap
|
||||||
add esp, 8
|
add esp, 8
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz HunterTest_StaticRotorAlphaSet
|
jz HunterTest_StaticRotorAlphaSet
|
||||||
|
@ -1745,7 +1755,7 @@ HunterTest_DoorTest:
|
||||||
jnz HunterTest_RegularAlpha
|
jnz HunterTest_RegularAlpha
|
||||||
push offset aDoorDummy
|
push offset aDoorDummy
|
||||||
push ebp
|
push ebp
|
||||||
call _stricmp
|
call strcmp_wrap
|
||||||
add esp, 8
|
add esp, 8
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnz HunterTest_RegularAlpha
|
jnz HunterTest_RegularAlpha
|
||||||
|
|
Loading…
Reference in a new issue