Normalized string comparision functions usage between different functions

This commit is contained in:
Silent 2018-04-12 23:56:25 +02:00
parent ece6078cc9
commit 1c41d135b5
No known key found for this signature in database
GPG key ID: AE53149BB0C45AF1

View file

@ -372,10 +372,10 @@ RpAtomic* RenderBigVehicleActomic(RpAtomic* pAtomic, float)
{ {
const char* pNodeName = GetFrameNodeName(RpAtomicGetFrame(pAtomic)); const char* pNodeName = GetFrameNodeName(RpAtomicGetFrame(pAtomic));
if ( _strnicmp(pNodeName, "moving_prop", 11) == 0 ) if ( _stricmp(pNodeName, "moving_prop") == 0 )
return MovingPropellerRender(pAtomic); return MovingPropellerRender(pAtomic);
if ( _strnicmp(pNodeName, "static_prop", 11) == 0 ) if ( _stricmp(pNodeName, "static_prop") == 0 )
return StaticPropellerRender(pAtomic); return StaticPropellerRender(pAtomic);
return AtomicDefaultRenderCallBack(pAtomic); return AtomicDefaultRenderCallBack(pAtomic);
@ -1655,18 +1655,16 @@ 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 strncmp call _stricmp
add esp, 10h add esp, 0Ch
test eax, eax test eax, eax
jz PlaneAtomicRendererSetup_Alpha jz PlaneAtomicRendererSetup_Alpha
push 11
push offset aMovingProp push offset aMovingProp
push [esp+12+8] push [esp+12+4]
call strncmp call _stricmp
add esp, 0Ch add esp, 8
test eax, eax test eax, eax
jnz PlaneAtomicRendererSetup_NoAlpha jnz PlaneAtomicRendererSetup_NoAlpha
@ -1700,27 +1698,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 strncmp call _stricmp
add esp, 0Ch add esp, 8
test eax, eax test eax, eax
jz HunterTest_RegularAlpha jz HunterTest_RegularAlpha
push 13
push offset aStaticRotor2 push offset aStaticRotor2
push ebp push ebp
call strncmp call _stricmp
add esp, 0Ch add esp, 8
test eax, eax test eax, eax
jz HunterTest_StaticRotor2AlphaSet jz HunterTest_StaticRotor2AlphaSet
push 12
push offset aStaticRotor push offset aStaticRotor
push ebp push ebp
call strncmp call _stricmp
add esp, 0Ch add esp, 8
test eax, eax test eax, eax
jz HunterTest_StaticRotorAlphaSet jz HunterTest_StaticRotorAlphaSet
@ -1733,11 +1728,10 @@ void __declspec(naked) HunterTest()
HunterTest_DoorTest: HunterTest_DoorTest:
cmp nCachedCRC, 0x45D0B41C cmp nCachedCRC, 0x45D0B41C
jnz HunterTest_RegularAlpha jnz HunterTest_RegularAlpha
push 10
push offset aDoorDummy push offset aDoorDummy
push ebp push ebp
call strncmp call _stricmp
add esp, 0Ch add esp, 8
test eax, eax test eax, eax
jnz HunterTest_RegularAlpha jnz HunterTest_RegularAlpha
push RenderVehicleHiDetailAlphaCB_HunterDoor push RenderVehicleHiDetailAlphaCB_HunterDoor