Mercurial > mm7
diff Party.cpp @ 1861:a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
author | Grumpy7 |
---|---|
date | Mon, 14 Oct 2013 06:32:30 +0200 |
parents | 785be3f53d9b |
children | 351b4ff10ac1 |
line wrap: on
line diff
--- a/Party.cpp Mon Oct 14 03:22:34 2013 +0200 +++ b/Party.cpp Mon Oct 14 06:32:30 2013 +0200 @@ -99,10 +99,10 @@ uNumDeaths = 0; uNumPrisonTerms = 0; uNumBountiesCollected = 0; - memset(monster_for_hunting_killed, 5, sizeof(__int16)); - memset(monster_id_for_hunting, 5, sizeof(__int16)); + memset(monster_for_hunting_killed.data(), 5, sizeof(__int16)); + memset(monster_id_for_hunting.data(), 5, sizeof(__int16)); memset(_quest_bits, 64, sizeof(__int8)); - memset(pArcomageWins, 16, sizeof(__int8)); + memset(pArcomageWins.data(), 16, sizeof(__int8)); uNumArenaPageWins = 0; uNumArenaSquireWins = 0; uNumArenaKnightWins = 0; @@ -293,7 +293,7 @@ pHireling1Name[0] = 0; pHireling2Name[0] = 0; this->hirelingScrollPosition = 0; - memset(pHirelings, 0, 2 * sizeof(*pHirelings)); + memset(pHirelings.data(), 0, 2 * sizeof(NPCData)); strcpy(this->pPlayers[0].pName, pGlobalTXT_LocalizationStrings[509]); //Zoltan this->pPlayers[0].uPrevFace = 17; @@ -492,7 +492,7 @@ bTurnBasedModeOn = false; uActiveCharacter = 1; - ::pPlayers.ZerothIndex() = pPlayers; + ::pPlayers.ZerothIndex() = &pPlayers[0]; for (uint i = 0; i < 4; ++i) ::pPlayers[i + 1] = &pPlayers[i]; @@ -554,7 +554,7 @@ uFlags = 0; memset(_autonote_bits, 0, 26); memset(_quest_bits, 0, 64); - memset(pIsArtifactFound, 0, 29); + memset(pIsArtifactFound.data(), 0, 29); _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_RED_POTION_ACTIVE, 1); _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_SEASHELL_ACTIVE, 1); _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_LONGBOW_ACTIVE, 1); @@ -562,7 +562,7 @@ _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_LUTE_ACTIVE, 1); _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_HAT_ACTIVE, 1); - memset(PartyTimes._shop_ban_times,0,53*sizeof(__int64)); + memset(PartyTimes._shop_ban_times.data(),0,53*sizeof(__int64)); memcpy(pNPCStats->pNewNPCData, pNPCStats->pNPCData, 0x94BCu); memcpy(pNPCStats->pGroups_copy, pNPCStats->pGroups, 0x66u);