comparison mm7_2.cpp @ 1104:5d5c78088274

strcmpi to stricmp conversion
author Grumpy7
date Mon, 27 May 2013 21:37:14 +0200
parents a19cdcaa36fe
children 39eaa6b00141
comparison
equal deleted inserted replaced
1103:db395ce89ede 1104:5d5c78088274
3482 strcpy(v2->pTextures[v2->sNumTextures].pTextureName, Str1); 3482 strcpy(v2->pTextures[v2->sNumTextures].pTextureName, Str1);
3483 v2->pTextures[v2->sNumTextures].uAnimTime = atoi(Str); 3483 v2->pTextures[v2->sNumTextures].uAnimTime = atoi(Str);
3484 v9 = 2; 3484 v9 = 2;
3485 for ( v2->pTextures[v2->sNumTextures].uFlags = 0; v9 < v21; ++v9 ) 3485 for ( v2->pTextures[v2->sNumTextures].uFlags = 0; v9 < v21; ++v9 )
3486 { 3486 {
3487 if ( !_strcmpi((&Str1)[4 * v9], "New") ) 3487 if ( !_stricmp((&Str1)[4 * v9], "New") )
3488 { 3488 {
3489 v10 = (int)&v2->pTextures[v2->sNumTextures].uFlags; 3489 v10 = (int)&v2->pTextures[v2->sNumTextures].uFlags;
3490 *(char *)v10 |= 2u; 3490 *(char *)v10 |= 2u;
3491 } 3491 }
3492 } 3492 }
5734 strcpy(&Dest, v42.pProperties[10]); 5734 strcpy(&Dest, v42.pProperties[10]);
5735 memcpy(&v41, frame_table_txt_parser(&Dest, &v37), sizeof(v41)); 5735 memcpy(&v41, frame_table_txt_parser(&Dest, &v37), sizeof(v41));
5736 for ( j = 0; j < v41.uPropCount; ++j ) 5736 for ( j = 0; j < v41.uPropCount; ++j )
5737 { 5737 {
5738 v27 = v41.pProperties[j]; 5738 v27 = v41.pProperties[j];
5739 if ( _strcmpi(v41.pProperties[j], "NBM") ) 5739 if ( _stricmp(v41.pProperties[j], "NBM") )
5740 { 5740 {
5741 if ( _strcmpi(v27, "Invisible") ) 5741 if ( _stricmp(v27, "Invisible") )
5742 { 5742 {
5743 if ( _strcmpi(v27, "FS") ) 5743 if ( _stricmp(v27, "FS") )
5744 { 5744 {
5745 if ( _strcmpi(v27, "FM") ) 5745 if ( _stricmp(v27, "FM") )
5746 { 5746 {
5747 if ( _strcmpi(v27, "FF") ) 5747 if ( _stricmp(v27, "FF") )
5748 { 5748 {
5749 if ( _strcmpi(v27, "Marker") ) 5749 if ( _stricmp(v27, "Marker") )
5750 { 5750 {
5751 if ( _strcmpi(v27, "LoopSlow") ) 5751 if ( _stricmp(v27, "LoopSlow") )
5752 { 5752 {
5753 if ( _strcmpi(v27, "EmitFire") ) 5753 if ( _stricmp(v27, "EmitFire") )
5754 { 5754 {
5755 if ( _strcmpi(v27, "Dawn") ) 5755 if ( _stricmp(v27, "Dawn") )
5756 { 5756 {
5757 if ( !_strcmpi(v27, "Dusk") ) 5757 if ( !_stricmp(v27, "Dusk") )
5758 HIBYTE(v2->pDecorations[v2->uNumDecorations].uFlags) |= 2u; 5758 HIBYTE(v2->pDecorations[v2->uNumDecorations].uFlags) |= 2u;
5759 } 5759 }
5760 else 5760 else
5761 { 5761 {
5762 HIBYTE(v2->pDecorations[v2->uNumDecorations].uFlags) |= 1u; 5762 HIBYTE(v2->pDecorations[v2->uNumDecorations].uFlags) |= 1u;
5964 { 5964 {
5965 for ( Argsb = 0; Argsb < v44.uPropCount; ++Argsb ) 5965 for ( Argsb = 0; Argsb < v44.uPropCount; ++Argsb )
5966 { 5966 {
5967 v21 = Argsb; 5967 v21 = Argsb;
5968 v22 = v44.pProperties[Argsb]; 5968 v22 = v44.pProperties[Argsb];
5969 if ( !_strcmpi(v44.pProperties[Argsb], "NoDraw") ) 5969 if ( !_stricmp(v44.pProperties[Argsb], "NoDraw") )
5970 { 5970 {
5971 v23 = (int)&v2->pObjects[v2->uNumObjects].uFlags; 5971 v23 = (int)&v2->pObjects[v2->uNumObjects].uFlags;
5972 *(char *)v23 |= 1u; 5972 *(char *)v23 |= 1u;
5973 } 5973 }
5974 if ( !_strcmpi(v22, "Lifetime") ) 5974 if ( !_stricmp(v22, "Lifetime") )
5975 { 5975 {
5976 v24 = (int)&v2->pObjects[v2->uNumObjects].uFlags; 5976 v24 = (int)&v2->pObjects[v2->uNumObjects].uFlags;
5977 *(char *)v24 |= 4u; 5977 *(char *)v24 |= 4u;
5978 } 5978 }
5979 if ( !_strcmpi(v22, "FTLifetime") ) 5979 if ( !_stricmp(v22, "FTLifetime") )
5980 { 5980 {
5981 v25 = (int)&v2->pObjects[v2->uNumObjects]; 5981 v25 = (int)&v2->pObjects[v2->uNumObjects];
5982 *(short *)(v25 + 42) = 8 * pSpriteFrameTable->pSpriteSFrames[*(short *)(v25 + 40)].uAnimLength; 5982 *(short *)(v25 + 42) = 8 * pSpriteFrameTable->pSpriteSFrames[*(short *)(v25 + 40)].uAnimLength;
5983 v26 = (int)&v2->pObjects[v2->uNumObjects].uFlags; 5983 v26 = (int)&v2->pObjects[v2->uNumObjects].uFlags;
5984 *(char *)v26 |= 8u; 5984 *(char *)v26 |= 8u;
5985 v27 = (int)&v2->pObjects[v2->uNumObjects].uFlags; 5985 v27 = (int)&v2->pObjects[v2->uNumObjects].uFlags;
5986 *(char *)v27 |= 4u; 5986 *(char *)v27 |= 4u;
5987 } 5987 }
5988 if ( !_strcmpi(v22, "NoPickup") ) 5988 if ( !_stricmp(v22, "NoPickup") )
5989 { 5989 {
5990 v28 = (int)&v2->pObjects[v2->uNumObjects].uFlags; 5990 v28 = (int)&v2->pObjects[v2->uNumObjects].uFlags;
5991 *(char *)v28 |= 0x10u; 5991 *(char *)v28 |= 0x10u;
5992 } 5992 }
5993 if ( !_strcmpi(v22, "NoGravity") ) 5993 if ( !_stricmp(v22, "NoGravity") )
5994 { 5994 {
5995 v29 = (int)&v2->pObjects[v2->uNumObjects].uFlags; 5995 v29 = (int)&v2->pObjects[v2->uNumObjects].uFlags;
5996 *(char *)v29 |= 0x20u; 5996 *(char *)v29 |= 0x20u;
5997 } 5997 }
5998 if ( !_strcmpi(v22, "FlagOnIntercept") ) 5998 if ( !_stricmp(v22, "FlagOnIntercept") )
5999 { 5999 {
6000 v30 = (int)&v2->pObjects[v2->uNumObjects].uFlags; 6000 v30 = (int)&v2->pObjects[v2->uNumObjects].uFlags;
6001 *(char *)v30 |= 0x40u; 6001 *(char *)v30 |= 0x40u;
6002 } 6002 }
6003 if ( !_strcmpi(v22, "Bounce") ) 6003 if ( !_stricmp(v22, "Bounce") )
6004 { 6004 {
6005 v31 = (int)&v2->pObjects[v2->uNumObjects].uFlags; 6005 v31 = (int)&v2->pObjects[v2->uNumObjects].uFlags;
6006 *(char *)v31 |= 0x80u; 6006 *(char *)v31 |= 0x80u;
6007 } 6007 }
6008 v32 = v45.pProperties[v21]; 6008 v32 = v45.pProperties[v21];
6009 if ( !_strcmpi(v45.pProperties[v21], "Fire") ) 6009 if ( !_stricmp(v45.pProperties[v21], "Fire") )
6010 HIBYTE(v2->pObjects[v2->uNumObjects].uFlags) |= 2u; 6010 HIBYTE(v2->pObjects[v2->uNumObjects].uFlags) |= 2u;
6011 if ( !_strcmpi(v32, "Lines") ) 6011 if ( !_stricmp(v32, "Lines") )
6012 HIBYTE(v2->pObjects[v2->uNumObjects].uFlags) |= 4u; 6012 HIBYTE(v2->pObjects[v2->uNumObjects].uFlags) |= 4u;
6013 if ( !_strcmpi(v44.pProperties[v21], "bits") ) 6013 if ( !_stricmp(v44.pProperties[v21], "bits") )
6014 { 6014 {
6015 v33 = v44.pProperties[v21 + 1]; 6015 v33 = v44.pProperties[v21 + 1];
6016 v34 = (int)&v2->pObjects[v2->uNumObjects].uFlags; 6016 v34 = (int)&v2->pObjects[v2->uNumObjects].uFlags;
6017 *(char *)(v34 + 1) |= 1u; 6017 *(char *)(v34 + 1) |= 1u;
6018 v35 = atoi(v33); 6018 v35 = atoi(v33);
7965 // 6BE3A0: using guessed type float flt_6BE3A0; 7965 // 6BE3A0: using guessed type float flt_6BE3A0;
7966 7966
7967 //----- (00464839) -------------------------------------------------------- 7967 //----- (00464839) --------------------------------------------------------
7968 char __cdecl Is_out15odm_underwater() 7968 char __cdecl Is_out15odm_underwater()
7969 { 7969 {
7970 return _strcmpi(pCurrentMapName, "out15.odm") == 0; 7970 return _stricmp(pCurrentMapName, "out15.odm") == 0;
7971 } 7971 }
7972 7972
7973 //----- (00464851) -------------------------------------------------------- 7973 //----- (00464851) --------------------------------------------------------
7974 void __cdecl SetUnderwaterFog() 7974 void __cdecl SetUnderwaterFog()
7975 { 7975 {
8009 8009
8010 v5 = pMapStats->GetMapInfo(pCurrentMapName); 8010 v5 = pMapStats->GetMapInfo(pCurrentMapName);
8011 bUnderwater = 0; 8011 bUnderwater = 0;
8012 uLevelMapStatsID = v5; 8012 uLevelMapStatsID = v5;
8013 pGame->uFlags2 &= 0xFFFFFFF7u; 8013 pGame->uFlags2 &= 0xFFFFFFF7u;
8014 if ( !_strcmpi(pCurrentMapName, "out15.odm") ) 8014 if ( !_stricmp(pCurrentMapName, "out15.odm") )
8015 { 8015 {
8016 bUnderwater = 1; 8016 bUnderwater = 1;
8017 pGame->uFlags2 |= 8u; 8017 pGame->uFlags2 |= 8u;
8018 } 8018 }
8019 pParty->floor_face_pid = 0; 8019 pParty->floor_face_pid = 0;
8020 if ( _strcmpi(Str1, "blv") ) 8020 if ( _stricmp(Str1, "blv") )
8021 PrepareToLoadODM(v9, 0); 8021 PrepareToLoadODM(v9, 0);
8022 else 8022 else
8023 PrepareToLoadBLV(v9); 8023 PrepareToLoadBLV(v9);
8024 pAudioPlayer->SetMapEAX(); 8024 pAudioPlayer->SetMapEAX();
8025 sub_461103(); 8025 sub_461103();
8026 if ( !_strcmpi(pCurrentMapName, "d11.blv") || !_strcmpi(pCurrentMapName, "d10.blv") ) 8026 if ( !_stricmp(pCurrentMapName, "d11.blv") || !_stricmp(pCurrentMapName, "d10.blv") )
8027 { 8027 {
8028 //spawning grounds & good analogue - no loot & exp from monsters 8028 //spawning grounds & good analogue - no loot & exp from monsters
8029 8029
8030 for (uint i = 0; i < uNumActors; ++i) 8030 for (uint i = 0; i < uNumActors; ++i)
8031 { 8031 {