Mercurial > mm7
changeset 1063:bcebd491e8fa
some cleaning
author | zipi |
---|---|
date | Fri, 24 May 2013 00:58:19 +0100 |
parents | e23a79658fc5 |
children | 938af16d5b88 |
files | Game.cpp Indoor.cpp |
diffstat | 2 files changed, 7 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/Game.cpp Fri May 24 00:44:51 2013 +0100 +++ b/Game.cpp Fri May 24 00:58:19 2013 +0100 @@ -265,7 +265,7 @@ //Render *v2; // edi@7 //signed int v3; // esi@7 signed int pNewNPCsCount; // ecx@58 - char *pFlags; // eax@59 + NPCData *pNPC; // eax@59 Player *pPlayer; // esi@65 //OtherOverlay *pOtherOverlay; // esi@67 //signed int v8; // edi@67 @@ -442,13 +442,13 @@ pNewNPCsCount = 0; if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) { - pFlags = (char *)&pNPCStats->pNewNPCData[0].uFlags; + pNPC = pNPCStats->pNewNPCData; do { - if ( *((int *)pFlags + 6) ) - *pFlags &= 0x7Fu; + if ( pNPC->field_24 ) + pNPC->uFlags &= 0xFFFFFF7Fu; ++pNewNPCsCount; - pFlags += 76; + ++pNPC; } while ( pNewNPCsCount < (signed int)pNPCStats->uNumNewNPCs ); }
--- a/Indoor.cpp Fri May 24 00:44:51 2013 +0100 +++ b/Indoor.cpp Fri May 24 00:58:19 2013 +0100 @@ -1734,15 +1734,12 @@ //----- (004488F7) -------------------------------------------------------- void IndoorLocation::ToggleLight(signed int sLightID, unsigned int bToggle) { - char *v2; // eax@4 - if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && (sLightID <= pIndoor->uNumLights - 1) && (sLightID >= 0) ) { - v2 = (char *)&pIndoor->pLights[sLightID].uAtributes; if ( bToggle ) - *v2 &= 0xF7u; + pIndoor->pLights[sLightID].uAtributes &= 0xFFFFFFF7u; else - *v2 |= 8u; + pIndoor->pLights[sLightID].uAtributes |= 8u; pParty->uFlags |= 2u; } }