# HG changeset patch # User zipi # Date 1369353499 -3600 # Node ID bcebd491e8fa6377cdeebc97ed84252e1a45c275 # Parent e23a79658fc590be7ce57394b5f57d3a50019b9e some cleaning diff -r e23a79658fc5 -r bcebd491e8fa Game.cpp --- 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 ); } diff -r e23a79658fc5 -r bcebd491e8fa Indoor.cpp --- 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; } }