Merge branch 'patch' into dev

This commit is contained in:
Silent 2018-12-04 20:43:30 +01:00
commit 7f7769ea22
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
2 changed files with 25 additions and 15 deletions

View File

@ -50,7 +50,7 @@ void CVehicleModelInfo::FindEditableMaterialList()
{
if ( const char* texName = RwTextureGetName(texture) )
{
if ( _stricmp(texName, "vehiclegrunge256") == 0 )
if ( strcmp(texName, "vehiclegrunge256") == 0 )
{
editableMaterials.push_back( material );
}
@ -107,11 +107,11 @@ void CCustomCarPlateMgr::PollPlates( RpClump* clump, PlateMaterialsData* materia
{
if ( const char* texName = RwTextureGetName(texture) )
{
if ( _stricmp( texName, "carplate" ) == 0 )
if ( strcmp( texName, "carplate" ) == 0 )
{
carplates.push_back( material );
}
else if ( _stricmp( texName, "carpback" ) == 0 )
else if ( strcmp( texName, "carpback" ) == 0 )
{
carpbacks.push_back( material );
}

View File

@ -371,10 +371,10 @@ RpAtomic* RenderBigVehicleActomic(RpAtomic* pAtomic, float)
{
const char* pNodeName = GetFrameNodeName(RpAtomicGetFrame(pAtomic));
if ( _stricmp(pNodeName, "moving_prop") == 0 )
if ( strncmp(pNodeName, "moving_prop", 11) == 0 )
return MovingPropellerRender(pAtomic);
if ( _stricmp(pNodeName, "static_prop") == 0 )
if ( strncmp(pNodeName, "static_prop", 11) == 0 )
return StaticPropellerRender(pAtomic);
return AtomicDefaultRenderCallBack(pAtomic);
@ -1686,16 +1686,18 @@ void __declspec(naked) PlaneAtomicRendererSetup()
call GetFrameNodeName
//push eax
mov [esp+8+8], eax
push 11
push offset aStaticProp
push eax
call _stricmp
add esp, 0Ch
call strncmp
add esp, 10h
test eax, eax
jz PlaneAtomicRendererSetup_Alpha
push 11
push offset aMovingProp
push [esp+12+4]
call _stricmp
add esp, 8
push [esp+12+8]
call strncmp
add esp, 0Ch
test eax, eax
jnz PlaneAtomicRendererSetup_NoAlpha
@ -1718,6 +1720,13 @@ static void* RenderVehicleHiDetailAlphaCB = AddressByVersion<void*>(0x733F80, 0x
static void* RenderHeliRotorAlphaCB = AddressByVersion<void*>(0x7340B0, 0x7348E0, 0x76E110);
static void* RenderHeliTailRotorAlphaCB = AddressByVersion<void*>(0x734170, 0x7349A0, 0x76E1E0);
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()
{
static const char aDoorDummy[] = "door_lf_ok";
@ -1729,23 +1738,24 @@ void __declspec(naked) HunterTest()
setnz al
movzx di, al
push 10
push offset aWindscreen
push ebp
call _stricmp
add esp, 8
call strncmp
add esp, 0Ch
test eax, eax
jz HunterTest_RegularAlpha
push offset aStaticRotor2
push ebp
call _stricmp
call strcmp_wrap
add esp, 8
test eax, eax
jz HunterTest_StaticRotor2AlphaSet
push offset aStaticRotor
push ebp
call _stricmp
call strcmp_wrap
add esp, 8
test eax, eax
jz HunterTest_StaticRotorAlphaSet
@ -1761,7 +1771,7 @@ HunterTest_DoorTest:
jnz HunterTest_RegularAlpha
push offset aDoorDummy
push ebp
call _stricmp
call strcmp_wrap
add esp, 8
test eax, eax
jnz HunterTest_RegularAlpha