diff --git a/Minecraft.Client/GameState/StatsCounter.cpp b/Minecraft.Client/GameState/StatsCounter.cpp index 98062d16f..69ac8d6ff 100644 --- a/Minecraft.Client/GameState/StatsCounter.cpp +++ b/Minecraft.Client/GameState/StatsCounter.cpp @@ -150,8 +150,8 @@ void StatsCounter::parse(void* data) StatContainer newVal; //For each stat - vector::iterator end = Stats::all->end(); - for( vector::iterator iter = Stats::all->begin() ; iter != end ; ++iter ) + std::vector::iterator end = Stats::all->end(); + for( std::vector::iterator iter = Stats::all->begin() ; iter != end ; ++iter ) { if( !(*iter)->isAchievement() ) { @@ -230,8 +230,8 @@ void StatsCounter::save(int player, bool force) //For each stat StatsMap::iterator val; - vector::iterator end = Stats::all->end(); - for( vector::iterator iter = Stats::all->begin() ; iter != end ; ++iter ) + std::vector::iterator end = Stats::all->end(); + for( std::vector::iterator iter = Stats::all->begin() ; iter != end ; ++iter ) { //If the stat is in the map write out it's value val = stats.find(*iter); @@ -1283,8 +1283,8 @@ bool StatsCounter::isLargeStat(Stat* stat) void StatsCounter::dumpStatsToTTY() { - vector::iterator statsEnd = Stats::all->end(); - for( vector::iterator statsIter = Stats::all->begin() ; statsIter!=statsEnd ; ++statsIter ) + std::vector::iterator statsEnd = Stats::all->end(); + for( std::vector::iterator statsIter = Stats::all->begin() ; statsIter!=statsEnd ; ++statsIter ) { app.DebugPrintf("%ls\t\t%u\t%u\t%u\t%u\n", (*statsIter)->name.c_str(), diff --git a/Minecraft.Client/Level/MultiPlayerLevel.cpp b/Minecraft.Client/Level/MultiPlayerLevel.cpp index 86e7a5317..02542972d 100644 --- a/Minecraft.Client/Level/MultiPlayerLevel.cpp +++ b/Minecraft.Client/Level/MultiPlayerLevel.cpp @@ -117,7 +117,7 @@ void MultiPlayerLevel::tick() PIXBeginNamedEvent(0,"Connection ticking"); // 4J HEG - Copy the connections vector to prevent crash when moving to Nether - vector connectionsTemp = connections; + std::vector connectionsTemp = connections; for(AUTO_VAR(connection, connectionsTemp.begin()); connection < connectionsTemp.end(); ++connection ) { (*connection)->tick(); @@ -493,7 +493,7 @@ std::shared_ptr MultiPlayerLevel::removeEntity(int id) // 4J Added to remove the entities from the forced list // This gets called when a chunk is unloaded, but we only do half an unload to remove entities slightly differently -void MultiPlayerLevel::removeEntities(vector > *list) +void MultiPlayerLevel::removeEntities(std::vector > *list) { for(AUTO_VAR(it, list->begin()); it < list->end(); ++it) { @@ -809,7 +809,7 @@ void MultiPlayerLevel::removeAllPendingEntityRemovals() //for (int i = 0; i < entities.size(); i++) EnterCriticalSection(&m_entitiesCS); - vector >::iterator it = entities.begin(); + std::vector >::iterator it = entities.begin(); while( it != entities.end() ) { std::shared_ptr e = *it;//entities.at(i); diff --git a/Minecraft.Client/Level/MultiPlayerLevel.h b/Minecraft.Client/Level/MultiPlayerLevel.h index bd84b0c48..84f4d9527 100644 --- a/Minecraft.Client/Level/MultiPlayerLevel.h +++ b/Minecraft.Client/Level/MultiPlayerLevel.h @@ -22,7 +22,7 @@ private: ResetInfo(int x, int y, int z, int tile, int data); }; - vector updatesToReset; // 4J - was linked list but vector seems more appropriate + std::vector updatesToReset; // 4J - was linked list but vector seems more appropriate bool m_bEnableResetChanges; // 4J Added public: void unshareChunkAt(int x, int z); // 4J - added @@ -34,7 +34,7 @@ private: int unshareCheckZ; // 4J - added int compressCheckX; // 4J - added int compressCheckZ; // 4J - added - vector connections; // 4J Stu - Made this a vector as we can have more than one local connection + std::vector connections; // 4J Stu - Made this a vector as we can have more than one local connection MultiPlayerChunkCache *chunkCache; Minecraft *minecraft; @@ -68,7 +68,7 @@ public: void putEntity(int id, std::shared_ptr e); std::shared_ptr getEntity(int id); std::shared_ptr removeEntity(int id); - virtual void removeEntities(vector > *list); // 4J Added override + virtual void removeEntities(std::vector > *list); // 4J Added override virtual bool setDataNoUpdate(int x, int y, int z, int data); virtual bool setTileAndDataNoUpdate(int x, int y, int z, int tile, int data); virtual bool setTileNoUpdate(int x, int y, int z, int tile); diff --git a/Minecraft.Client/Level/ServerLevel.cpp b/Minecraft.Client/Level/ServerLevel.cpp index 7cfa5b743..7952bd87f 100644 --- a/Minecraft.Client/Level/ServerLevel.cpp +++ b/Minecraft.Client/Level/ServerLevel.cpp @@ -277,10 +277,10 @@ void ServerLevel::tick() Biome::MobSpawnerData *ServerLevel::getRandomMobSpawnAt(MobCategory *mobCategory, int x, int y, int z) { - vector *mobList = getChunkSource()->getMobsAt(mobCategory, x, y, z); + std::vector *mobList = getChunkSource()->getMobsAt(mobCategory, x, y, z); if (mobList == NULL || mobList->empty()) return NULL; - return (Biome::MobSpawnerData *) WeighedRandom::getRandomItem(random, (vector *)mobList); + return (Biome::MobSpawnerData *) WeighedRandom::getRandomItem(random, (std::vector *)mobList); } void ServerLevel::updateSleepingPlayerList() @@ -289,7 +289,7 @@ void ServerLevel::updateSleepingPlayerList() m_bAtLeastOnePlayerSleeping = false; AUTO_VAR(itEnd, players.end()); - for (vector >::iterator it = players.begin(); it != itEnd; it++) + for (std::vector >::iterator it = players.begin(); it != itEnd; it++) { if (!(*it)->isSleeping()) { @@ -310,7 +310,7 @@ void ServerLevel::awakenAllPlayers() m_bAtLeastOnePlayerSleeping = false; AUTO_VAR(itEnd, players.end()); - for (vector >::iterator it = players.begin(); it != itEnd; it++) + for (std::vector >::iterator it = players.begin(); it != itEnd; it++) { if ((*it)->isSleeping()) { @@ -335,7 +335,7 @@ bool ServerLevel::allPlayersAreSleeping() { // all players are sleeping, but have they slept long enough? AUTO_VAR(itEnd, players.end()); - for (vector >::iterator it = players.begin(); it != itEnd; it++ ) + for (std::vector >::iterator it = players.begin(); it != itEnd; it++ ) { // System.out.println(player->entityId + ": " + player->getSleepTimer()); if (! (*it)->isSleepingLongEnough()) @@ -625,10 +625,10 @@ bool ServerLevel::tickPendingTicks(bool force) return retval; } -vector *ServerLevel::fetchTicksInChunk(LevelChunk *chunk, bool remove) +std::vector *ServerLevel::fetchTicksInChunk(LevelChunk *chunk, bool remove) { EnterCriticalSection(&m_tickNextTickCS); - vector *results = new vector; + std::vector *results = new std::vector; ChunkPos *pos = chunk->getPos(); int west = pos->x << 4; @@ -693,9 +693,9 @@ ChunkSource *ServerLevel::createChunkSource() return cache; } -vector > *ServerLevel::getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1) +std::vector > *ServerLevel::getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1) { - vector > *result = new vector >; + std::vector > *result = new std::vector >; for (unsigned int i = 0; i < tileEntityList.size(); i++) { std::shared_ptr te = tileEntityList[i]; @@ -750,7 +750,7 @@ void ServerLevel::setInitialSpawn(LevelSettings *levelSettings) isFindingSpawn = true; BiomeSource *biomeSource = dimension->biomeSource; - vector playerSpawnBiomes = biomeSource->getPlayerSpawnBiomes(); + std::vector playerSpawnBiomes = biomeSource->getPlayerSpawnBiomes(); Random random(getSeed()); TilePos *findBiome = biomeSource->findBiome(0, 0, 16 * 16, playerSpawnBiomes, &random); @@ -896,7 +896,7 @@ void ServerLevel::save(bool force, ProgressListener *progressListener, bool bAut { // 4J Stu - This will come in a later change anyway // clean cache - vector *loadedChunkList = cache->getLoadedChunkList(); + std::vector *loadedChunkList = cache->getLoadedChunkList(); for (AUTO_VAR(it, loadedChunkList->begin()); it != loadedChunkList->end(); ++it) { LevelChunk *lc = *it; @@ -952,7 +952,7 @@ void ServerLevel::entityAdded(std::shared_ptr e) { Level::entityAdded(e); entitiesById[e->entityId] = e; - vector > *es = e->getSubEntities(); + std::vector > *es = e->getSubEntities(); if (es != NULL) { //for (int i = 0; i < es.length; i++) @@ -968,7 +968,7 @@ void ServerLevel::entityRemoved(std::shared_ptr e) { Level::entityRemoved(e); entitiesById.erase(e->entityId); - vector > *es = e->getSubEntities(); + std::vector > *es = e->getSubEntities(); if (es != NULL) { //for (int i = 0; i < es.length; i++) @@ -1016,7 +1016,7 @@ std::shared_ptr ServerLevel::explode(std::shared_ptr source, explosion->toBlow.clear(); } - vector > sentTo; + std::vector > sentTo; for(AUTO_VAR(it, players.begin()); it != players.end(); ++it) { std::shared_ptr player = dynamic_pointer_cast(*it); @@ -1144,7 +1144,7 @@ void ServerLevel::setTimeAndAdjustTileTicks(__int64 newTime) __int64 delta = newTime - levelData->getTime(); // 4J - can't directly adjust m_delay in a set as it has a const interator, since changing values in here might change the ordering of the elements in the set. // Instead move to a vector, do the adjustment, put back in the set. - vector temp; + std::vector temp; for(AUTO_VAR(it, tickNextTickList.begin()); it != tickNextTickList.end(); ++it) { temp.push_back(*it); diff --git a/Minecraft.Client/Level/ServerLevel.h b/Minecraft.Client/Level/ServerLevel.h index 93fe297a4..b0beea260 100644 --- a/Minecraft.Client/Level/ServerLevel.h +++ b/Minecraft.Client/Level/ServerLevel.h @@ -21,7 +21,7 @@ private: set tickNextTickList; // 4J Was TreeSet unordered_set tickNextTickSet; // 4J Was HashSet - vector m_queuedSendTileUpdates; // 4J added + std::vector m_queuedSendTileUpdates; // 4J added CRITICAL_SECTION m_csQueueSendTileUpdates; protected: @@ -37,7 +37,7 @@ private: bool m_bAtLeastOnePlayerSleeping; // 4J Added static WeighedTreasureArray RANDOM_BONUS_ITEMS; // 4J - brought forward from 1.3.2 - vector tileEvents[2]; + std::vector tileEvents[2]; int activeTileEventsList; public: static void staticCtor(); @@ -64,7 +64,7 @@ public: void forceAddTileTick(int x, int y, int z, int tileId, int tickDelay); void tickEntities(); bool tickPendingTicks(bool force); - vector *fetchTicksInChunk(LevelChunk *chunk, bool remove); + std::vector *fetchTicksInChunk(LevelChunk *chunk, bool remove); virtual void tick(std::shared_ptr e, bool actual); void forceTick(std::shared_ptr e, bool actual); bool AllPlayersAreSleeping() { return allPlayersSleeping;} // 4J added for a message to other players @@ -72,7 +72,7 @@ public: protected: ChunkSource *createChunkSource(); // 4J - was virtual, but was called from parent ctor public: - vector > *getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1); + std::vector > *getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1); virtual bool mayInteract(std::shared_ptr player, int xt, int yt, int zt, int id); protected: virtual void initializeLevel(LevelSettings *settings); diff --git a/Minecraft.Client/Minecraft.h b/Minecraft.Client/Minecraft.h index 58106a326..dfc3be494 100644 --- a/Minecraft.Client/Minecraft.h +++ b/Minecraft.Client/Minecraft.h @@ -331,8 +331,8 @@ public: Level *animateTickLevel; // 4J added // 4J - When a client requests a texture, it should add it to here while we are waiting for it - vector m_pendingTextureRequests; - vector m_pendingGeometryRequests; // additional skin box geometry + std::vector m_pendingTextureRequests; + std::vector m_pendingGeometryRequests; // additional skin box geometry // 4J Added bool addPendingClientTextureRequest(const std::wstring &textureName); diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index b8e16e2df..0afd07397 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -1440,7 +1440,7 @@ void MinecraftServer::broadcastStopSavingPacket() void MinecraftServer::tick() { - vector toRemove; + std::vector toRemove; for (AUTO_VAR(it, ironTimers.begin()); it != ironTimers.end(); it++ ) { int t = it->second; diff --git a/Minecraft.Client/MinecraftServer.h b/Minecraft.Client/MinecraftServer.h index 944b9775a..9a9ec08c1 100644 --- a/Minecraft.Client/MinecraftServer.h +++ b/Minecraft.Client/MinecraftServer.h @@ -96,9 +96,9 @@ public: std::wstring progressStatus; int progress; private: -// vector tickables = new ArrayList(); // 4J - removed +// std::vector tickables = new ArrayList(); // 4J - removed CommandDispatcher *commandDispatcher; - vector consoleInput; // 4J - was synchronizedList - TODO - investigate + std::vector consoleInput; // 4J - was synchronizedList - TODO - investigate public: bool onlineMode; bool animals; @@ -204,7 +204,7 @@ private: ChunkSource *chunkSource; postProcessRequest(int x, int z, ChunkSource *chunkSource) : x(x), z(z), chunkSource(chunkSource) {} }; - vector m_postProcessRequests; + std::vector m_postProcessRequests; CRITICAL_SECTION m_postProcessCS; public: void addPostProcessRequest(ChunkSource *chunkSource, int x, int z); diff --git a/Minecraft.Client/Network/ClientConnection.cpp b/Minecraft.Client/Network/ClientConnection.cpp index e7e9d3499..21f282c87 100644 --- a/Minecraft.Client/Network/ClientConnection.cpp +++ b/Minecraft.Client/Network/ClientConnection.cpp @@ -609,7 +609,7 @@ void ClientConnection::handleAddEntity(std::shared_ptr packet) e->xRot = 0.0f; } - vector > *subEntities = e->getSubEntities(); + std::vector > *subEntities = e->getSubEntities(); if (subEntities != NULL) { int offs = packet->id - e->entityId; @@ -811,7 +811,7 @@ void ClientConnection::handleAddPlayer(std::shared_ptr packet) level->putEntity(packet->id, player); - vector > *unpackedData = packet->getUnpackedData(); + std::vector > *unpackedData = packet->getUnpackedData(); if (unpackedData != NULL) { player->getEntityData()->assignValues(unpackedData); @@ -2118,7 +2118,7 @@ void ClientConnection::handleAddMob(std::shared_ptr packet) mob->yRotp = packet->yRot; mob->xRotp = packet->xRot; - vector > *subEntities = mob->getSubEntities(); + std::vector > *subEntities = mob->getSubEntities(); if (subEntities != NULL) { int offs = packet->id - mob->entityId; @@ -2140,7 +2140,7 @@ void ClientConnection::handleAddMob(std::shared_ptr packet) mob->zd = packet->zd / 8000.0f; level->putEntity(packet->id, mob); - vector > *unpackedData = packet->getUnpackedData(); + std::vector > *unpackedData = packet->getUnpackedData(); if (unpackedData != NULL) { mob->getEntityData()->assignValues(unpackedData); diff --git a/Minecraft.Client/Network/MultiPlayerChunkCache.cpp b/Minecraft.Client/Network/MultiPlayerChunkCache.cpp index acbef3521..a2d3df880 100644 --- a/Minecraft.Client/Network/MultiPlayerChunkCache.cpp +++ b/Minecraft.Client/Network/MultiPlayerChunkCache.cpp @@ -275,7 +275,7 @@ void MultiPlayerChunkCache::postProcess(ChunkSource *parent, int x, int z) { } -vector *MultiPlayerChunkCache::getMobsAt(MobCategory *mobCategory, int x, int y, int z) +std::vector *MultiPlayerChunkCache::getMobsAt(MobCategory *mobCategory, int x, int y, int z) { return NULL; } diff --git a/Minecraft.Client/Network/MultiPlayerChunkCache.h b/Minecraft.Client/Network/MultiPlayerChunkCache.h index c557cd5d8..e49255b06 100644 --- a/Minecraft.Client/Network/MultiPlayerChunkCache.h +++ b/Minecraft.Client/Network/MultiPlayerChunkCache.h @@ -14,7 +14,7 @@ private: LevelChunk *emptyChunk; LevelChunk *waterChunk; - vector loadedChunkList; + std::vector loadedChunkList; LevelChunk **cache; // 4J - added for multithreaded support @@ -39,7 +39,7 @@ public: virtual bool shouldSave(); virtual void postProcess(ChunkSource *parent, int x, int z); virtual std::wstring gatherStats(); - virtual vector *getMobsAt(MobCategory *mobCategory, int x, int y, int z); + virtual std::vector *getMobsAt(MobCategory *mobCategory, int x, int y, int z); virtual TilePos *findNearestMapFeature(Level *level, const std::wstring &featureName, int x, int y, int z); virtual void dataReceived(int x, int z); // 4J added diff --git a/Minecraft.Client/Network/PlayerChunkMap.cpp b/Minecraft.Client/Network/PlayerChunkMap.cpp index edbe18c88..b4d85d048 100644 --- a/Minecraft.Client/Network/PlayerChunkMap.cpp +++ b/Minecraft.Client/Network/PlayerChunkMap.cpp @@ -183,7 +183,7 @@ void PlayerChunkMap::PlayerChunk::prioritiseTileChanges() void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr packet) { - vector< std::shared_ptr > sentTo; + std::vector< std::shared_ptr > sentTo; for (unsigned int i = 0; i < players.size(); i++) { std::shared_ptr player = players[i]; @@ -330,7 +330,7 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate) if( ys > 256 ) ys = 256; broadcast( std::shared_ptr( new BlockRegionUpdatePacket(xp, yp, zp, xs, ys, zs, level) ) ); - vector > *tes = level->getTileEntitiesInRegion(xp, yp, zp, xp + xs, yp + ys, zp + zs); + std::vector > *tes = level->getTileEntitiesInRegion(xp, yp, zp, xp + xs, yp + ys, zp + zs); for (unsigned int i = 0; i < tes->size(); i++) { broadcast(tes->at(i)); diff --git a/Minecraft.Client/Network/PlayerChunkMap.h b/Minecraft.Client/Network/PlayerChunkMap.h index 2b7f9a767..d9efdb2c6 100644 --- a/Minecraft.Client/Network/PlayerChunkMap.h +++ b/Minecraft.Client/Network/PlayerChunkMap.h @@ -34,7 +34,7 @@ public: friend class PlayerChunkMap; private: PlayerChunkMap *parent; // 4J added - vector > players; + std::vector > players; //int x, z; ChunkPos pos; @@ -63,12 +63,12 @@ public: }; public: - vector > players; + std::vector > players; void flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFound); // 4J added private: std::unordered_map<__int64,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap - vector changedChunks; - vector addRequests; // 4J added + std::vector changedChunks; + std::vector addRequests; // 4J added void tickAddRequests(std::shared_ptr player); // 4J added ServerLevel *level; diff --git a/Minecraft.Client/Network/PlayerConnection.cpp b/Minecraft.Client/Network/PlayerConnection.cpp index f5b40adc9..d16e8da47 100644 --- a/Minecraft.Client/Network/PlayerConnection.cpp +++ b/Minecraft.Client/Network/PlayerConnection.cpp @@ -858,7 +858,7 @@ void PlayerConnection::handleTextureAndGeometry(std::shared_ptr *pvSkinBoxes = app.GetAdditionalSkinBoxes(packet->dwSkinID); + std::vector *pvSkinBoxes = app.GetAdditionalSkinBoxes(packet->dwSkinID); unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(packet->dwSkinID); send( std::shared_ptr( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pvSkinBoxes,uiAnimOverrideBitmask) ) ); @@ -933,7 +933,7 @@ void PlayerConnection::handleTextureAndGeometryReceived(const std::wstring &text { // get the data from the app DWORD dwSkinID = app.getSkinIdFromPath(textureName); - vector *pvSkinBoxes = app.GetAdditionalSkinBoxes(dwSkinID); + std::vector *pvSkinBoxes = app.GetAdditionalSkinBoxes(dwSkinID); unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(dwSkinID); send( std::shared_ptr( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes, pvSkinBoxes, uiAnimOverrideBitmask) ) ); @@ -1146,7 +1146,7 @@ void PlayerConnection::handleContainerClick(std::shared_ptrconnection->send( std::shared_ptr( new ContainerAckPacket(packet->containerId, packet->uid, false) ) ); player->containerMenu->setSynched(player, false); - vector > items; + std::vector > items; for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++) { items.push_back(player->containerMenu->slots->at(i)->getItem()); @@ -1244,7 +1244,7 @@ void PlayerConnection::handleSetCreativeModeSlot(std::shared_ptr > items; + std::vector > items; for (unsigned int i = 0; i < player->inventoryMenu->slots->size(); i++) { items.push_back(player->inventoryMenu->slots->at(i)->getItem()); @@ -1586,7 +1586,7 @@ void PlayerConnection::handleCraftItem(std::shared_ptr packet) { // 4J Stu - Maps need to have their aux value update, so the client should always be assumed to be wrong // This is how the Java works, as the client also incorrectly predicts the auxvalue of the mapItem - vector > items; + std::vector > items; for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++) { items.push_back(player->containerMenu->slots->at(i)->getItem()); diff --git a/Minecraft.Client/Network/PlayerConnection.h b/Minecraft.Client/Network/PlayerConnection.h index 0b8a74dc9..c0e94d37f 100644 --- a/Minecraft.Client/Network/PlayerConnection.h +++ b/Minecraft.Client/Network/PlayerConnection.h @@ -133,7 +133,7 @@ public: private: bool m_bCloseOnTick; - vector m_texturesRequested; + std::vector m_texturesRequested; bool m_bWasKicked; }; diff --git a/Minecraft.Client/Network/PlayerList.cpp b/Minecraft.Client/Network/PlayerList.cpp index 4984930d1..d6a0a0711 100644 --- a/Minecraft.Client/Network/PlayerList.cpp +++ b/Minecraft.Client/Network/PlayerList.cpp @@ -618,7 +618,7 @@ std::shared_ptr PlayerList::respawn(std::shared_ptr if(keepAllPlayerData) { - vector *activeEffects = player->getActiveEffects(); + std::vector *activeEffects = player->getActiveEffects(); for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) { MobEffectInstance *effect = *it; @@ -811,7 +811,7 @@ void PlayerList::toggleDimension(std::shared_ptr player, int targe player->connection->teleport(player->x, player->y, player->z, player->yRot, player->xRot); // 4J Stu - Fix for #64683 - Customer Encountered: TU7: Content: Gameplay: Potion effects are removed after using the Nether Portal - vector *activeEffects = player->getActiveEffects(); + std::vector *activeEffects = player->getActiveEffects(); for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) { MobEffectInstance *effect = *it; @@ -1034,7 +1034,7 @@ void PlayerList::broadcast(std::shared_ptr except, double x, double y, d { // 4J - altered so that we don't send to the same machine more than once. Add the source player to the machines we have "sent" to as it doesn't need to go to that // machine either - vector< std::shared_ptr > sentTo; + std::vector< std::shared_ptr > sentTo; if( except != NULL ) { sentTo.push_back(dynamic_pointer_cast(except)); diff --git a/Minecraft.Client/Network/PlayerList.h b/Minecraft.Client/Network/PlayerList.h index 58ccd3641..495adf16b 100644 --- a/Minecraft.Client/Network/PlayerList.h +++ b/Minecraft.Client/Network/PlayerList.h @@ -22,14 +22,14 @@ private: static const int SEND_PLAYER_INFO_INTERVAL = 20 * 10; // 4J - brought forward from 1.2.3 // public static Logger logger = Logger.getLogger("Minecraft"); public: - vector > players; + std::vector > players; private: MinecraftServer *server; unsigned int maxPlayers; // 4J Added - vector m_bannedXuids; + std::vector m_bannedXuids; deque m_smallIdsToKick; CRITICAL_SECTION m_kickPlayersCS; deque m_smallIdsToClose; @@ -51,7 +51,7 @@ private: int sendAllPlayerInfoIn; // 4J Added to maintain which players in which dimensions can receive all packet types - vector > receiveAllPlayers[3]; + std::vector > receiveAllPlayers[3]; private: std::shared_ptr findAlivePlayerOnSystem(std::shared_ptr currentPlayer); diff --git a/Minecraft.Client/Network/ServerChunkCache.cpp b/Minecraft.Client/Network/ServerChunkCache.cpp index 178dd901e..c4543545c 100644 --- a/Minecraft.Client/Network/ServerChunkCache.cpp +++ b/Minecraft.Client/Network/ServerChunkCache.cpp @@ -74,7 +74,7 @@ bool ServerChunkCache::hasChunk(int x, int z) return true; } -vector *ServerChunkCache::getLoadedChunkList() +std::vector *ServerChunkCache::getLoadedChunkList() { return &m_loadedChunkList; } @@ -608,7 +608,7 @@ bool ServerChunkCache::save(bool force, ProgressListener *progressListener) // Created a roughly sorted list to match the order that the files were created in McRegionChunkStorage::McRegionChunkStorage. // This is to minimise the amount of data that needs to be moved round when creating a new level. - vector sortedChunkList; + std::vector sortedChunkList; for( int i = 0; i < m_loadedChunkList.size(); i++ ) { @@ -693,7 +693,7 @@ bool ServerChunkCache::save(bool force, ProgressListener *progressListener) // Created a roughly sorted list to match the order that the files were created in McRegionChunkStorage::McRegionChunkStorage. // This is to minimise the amount of data that needs to be moved round when creating a new level. - vector sortedChunkList; + std::vector sortedChunkList; for( int i = 0; i < m_loadedChunkList.size(); i++ ) { @@ -902,7 +902,7 @@ std::wstring ServerChunkCache::gatherStats() return L"ServerChunkCache: ";// + _toString(loadedChunks.size()) + L" Drop: " + _toString(toDrop.size()); } -vector *ServerChunkCache::getMobsAt(MobCategory *mobCategory, int x, int y, int z) +std::vector *ServerChunkCache::getMobsAt(MobCategory *mobCategory, int x, int y, int z) { return source->getMobsAt(mobCategory, x, y, z); } diff --git a/Minecraft.Client/Network/ServerChunkCache.h b/Minecraft.Client/Network/ServerChunkCache.h index 46ed35903..331805a1d 100644 --- a/Minecraft.Client/Network/ServerChunkCache.h +++ b/Minecraft.Client/Network/ServerChunkCache.h @@ -21,7 +21,7 @@ public: bool autoCreate; private: LevelChunk **cache; - vector m_loadedChunkList; + std::vector m_loadedChunkList; ServerLevel *level; #ifdef _LARGE_WORLDS @@ -39,7 +39,7 @@ public: ServerChunkCache(ServerLevel *level, ChunkStorage *storage, ChunkSource *source); virtual ~ServerChunkCache(); virtual bool hasChunk(int x, int z); - vector *getLoadedChunkList(); + std::vector *getLoadedChunkList(); void drop(int x, int z); void dropAll(); virtual LevelChunk *create(int x, int z); @@ -82,7 +82,7 @@ public: virtual bool shouldSave(); virtual std::wstring gatherStats(); - virtual vector *getMobsAt(MobCategory *mobCategory, int x, int y, int z); + virtual std::vector *getMobsAt(MobCategory *mobCategory, int x, int y, int z); virtual TilePos *findNearestMapFeature(Level *level, const std::wstring &featureName, int x, int y, int z); private: diff --git a/Minecraft.Client/Network/ServerConnection.cpp b/Minecraft.Client/Network/ServerConnection.cpp index 5a8321865..6b7c2fa01 100644 --- a/Minecraft.Client/Network/ServerConnection.cpp +++ b/Minecraft.Client/Network/ServerConnection.cpp @@ -64,7 +64,7 @@ void ServerConnection::tick() { // MGH - changed this so that the the CS lock doesn't cover the tick (was causing a lockup when 2 players tried to join) EnterCriticalSection(&pending_cs); - vector< std::shared_ptr > tempPending = pending; + std::vector< std::shared_ptr > tempPending = pending; LeaveCriticalSection(&pending_cs); for (unsigned int i = 0; i < tempPending.size(); i++) diff --git a/Minecraft.Client/Network/ServerConnection.h b/Minecraft.Client/Network/ServerConnection.h index 7d95157e8..9243abf1e 100644 --- a/Minecraft.Client/Network/ServerConnection.h +++ b/Minecraft.Client/Network/ServerConnection.h @@ -20,11 +20,11 @@ private: int connectionCounter; private: CRITICAL_SECTION pending_cs; // 4J added - vector< std::shared_ptr > pending; - vector< std::shared_ptr > players; + std::vector< std::shared_ptr > pending; + std::vector< std::shared_ptr > players; // 4J - When the server requests a texture, it should add it to here while we are waiting for it - vector m_pendingTextureRequests; + std::vector m_pendingTextureRequests; public: MinecraftServer *server; diff --git a/Minecraft.Client/Platform/Durango/Durango_App.cpp b/Minecraft.Client/Platform/Durango/Durango_App.cpp index ea8571ca8..f85ff3154 100644 --- a/Minecraft.Client/Platform/Durango/Durango_App.cpp +++ b/Minecraft.Client/Platform/Durango/Durango_App.cpp @@ -559,7 +559,7 @@ int CConsoleMinecraftApp::Callback_TMSPPRetrieveFileList(void *pParam,int iPad, app.DebugPrintf("CConsoleMinecraftApp::Callback_TMSPPRetrieveFileList\n"); if(lpvData!=NULL) { - vector *pvTmsFileDetails=(vector *)lpvData; + std::vector *pvTmsFileDetails=(std::vector *)lpvData; if(pvTmsFileDetails->size()>0) { diff --git a/Minecraft.Client/Platform/Durango/Leaderboards/DurangoLeaderboardManager.cpp b/Minecraft.Client/Platform/Durango/Leaderboards/DurangoLeaderboardManager.cpp index 983efb9d4..8e6b48c41 100644 --- a/Minecraft.Client/Platform/Durango/Leaderboards/DurangoLeaderboardManager.cpp +++ b/Minecraft.Client/Platform/Durango/Leaderboards/DurangoLeaderboardManager.cpp @@ -490,7 +490,7 @@ void DurangoLeaderboardManager::runLeaderboardRequest(WF::IAsyncOperation 0) { - vector xuids = vector(); + std::vector xuids = std::vector(); for(int i = 0; i < lastResult->Rows->Size; i++) { xuids.push_back(PlayerUID(lastResult->Rows->GetAt(i)->XboxUserId->Data())); @@ -585,7 +585,7 @@ void DurangoLeaderboardManager::GetProfilesCallback(LPVOID param, std::vector 0) { - dlm->m_displayNames = vector(); + dlm->m_displayNames = std::vector(); for (int i = 0; i < profiles.size(); i++) { dlm->m_displayNames.push_back(profiles[i]->GameDisplayName->Data()); diff --git a/Minecraft.Client/Platform/Durango/Leaderboards/DurangoStatsDebugger.cpp b/Minecraft.Client/Platform/Durango/Leaderboards/DurangoStatsDebugger.cpp index e69ffaa12..4994133b4 100644 --- a/Minecraft.Client/Platform/Durango/Leaderboards/DurangoStatsDebugger.cpp +++ b/Minecraft.Client/Platform/Durango/Leaderboards/DurangoStatsDebugger.cpp @@ -20,7 +20,7 @@ StatParam::StatParam(const std::wstring &base) { m_base = base; //m_numArgs = numArgs; - m_args = vector(); + m_args = std::vector(); unsigned int count=0; std::wstring::size_type pos =base.find(L"*"); @@ -46,9 +46,9 @@ void StatParam::addArgs(int v1, ...) va_end(argptr); } -vector *StatParam::getStats() +std::vector *StatParam::getStats() { - vector *out = new vector(); + std::vector *out = new std::vector(); static const int MAXSIZE = 256; static const std::wstring SUBSTR = L"*"; @@ -91,13 +91,13 @@ DurangoStatsDebugger::DurangoStatsDebugger() InitializeCriticalSection(&m_retrievedStatsLock); } -vector *DurangoStatsDebugger::getStats() +std::vector *DurangoStatsDebugger::getStats() { - vector *out = new vector(); + std::vector *out = new std::vector(); for (auto it = m_stats.begin(); it!=m_stats.end(); it++) { - vector *sublist = (*it)->getStats(); + std::vector *sublist = (*it)->getStats(); out->insert(out->end(), sublist->begin(), sublist->end()); } @@ -322,7 +322,7 @@ void DurangoStatsDebugger::PrintStats(int iPad) { if (instance == NULL) instance = Initialize(); - vector *tmp = instance->getStats(); + std::vector *tmp = instance->getStats(); instance->m_printQueue.insert(instance->m_printQueue.end(), tmp->begin(), tmp->end()); // app.DebugPrintf("[DEBUG] START\n"); @@ -407,7 +407,7 @@ void DurangoStatsDebugger::retrieveStats(int iPad) // Create Stat retrieval threads until there is no long any stats to start retrieving. while ( !instance->m_printQueue.empty() ) { - vector *printing = new vector(); + std::vector *printing = new std::vector(); if (m_printQueue.size() > R_SIZE) { diff --git a/Minecraft.Client/Platform/Durango/Leaderboards/DurangoStatsDebugger.h b/Minecraft.Client/Platform/Durango/Leaderboards/DurangoStatsDebugger.h index 4c3f5d22b..189cf28bd 100644 --- a/Minecraft.Client/Platform/Durango/Leaderboards/DurangoStatsDebugger.h +++ b/Minecraft.Client/Platform/Durango/Leaderboards/DurangoStatsDebugger.h @@ -14,14 +14,14 @@ private: std::wstring m_base; int m_numArgs; - vector m_args; + std::vector m_args; public: StatParam(const std::wstring &base); void addArgs(int v1, ...); - vector *getStats(); + std::vector *getStats(); }; @@ -65,9 +65,9 @@ protected: DurangoStatsDebugger(); - vector m_stats; + std::vector m_stats; - vector *getStats(); + std::vector *getStats(); public: static DurangoStatsDebugger *Initialize(); @@ -75,7 +75,7 @@ public: static void PrintStats(int iPad); private: - vector m_printQueue; + std::vector m_printQueue; void retrieveStats(int iPad); @@ -88,7 +88,7 @@ private: CRITICAL_SECTION m_retrievedStatsLock; - vector m_retrievedStats; + std::vector m_retrievedStats; void addRetrievedStat(StatResult result); }; \ No newline at end of file diff --git a/Minecraft.Client/Platform/Durango/Network/ChatIntegrationLayer.h b/Minecraft.Client/Platform/Durango/Network/ChatIntegrationLayer.h index 2a852245c..78ad92b9f 100644 --- a/Minecraft.Client/Platform/Durango/Network/ChatIntegrationLayer.h +++ b/Minecraft.Client/Platform/Durango/Network/ChatIntegrationLayer.h @@ -51,7 +51,7 @@ public: void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user ); void EvaluateDevicesForUser(__in Windows::Xbox::System::IUser^ user ); - vector m_addedUsers; + std::vector m_addedUsers; CRITICAL_SECTION m_csAddedUsers; private: diff --git a/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.cpp b/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.cpp index f85448526..42411528a 100644 --- a/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.cpp +++ b/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.cpp @@ -1440,8 +1440,8 @@ MXSM::MultiplayerSessionReference^ DQRNetworkManager::ConvertToMicrosoftXboxServ // this method is able to work out who has been added or removed from the game session, and notify the game of these events. void DQRNetworkManager::UpdateRoomSyncPlayers(RoomSyncData *pNewSyncData) { - vector tempPlayers; - vector newPlayers; + std::vector tempPlayers; + std::vector newPlayers; EnterCriticalSection(&m_csRoomSyncData); @@ -1574,7 +1574,7 @@ bool DQRNetworkManager::AddRoomSyncPlayer(DQRNetworkPlayer *pPlayer, unsigned in void DQRNetworkManager::RemoveRoomSyncPlayersWithSessionAddress(unsigned int sessionAddress) { EnterCriticalSection(&m_csRoomSyncData); - vector removedPlayers; + std::vector removedPlayers; int iWriteIdx = 0; for( int i = 0; i < m_roomSyncData.playerCount; i++ ) { @@ -1605,7 +1605,7 @@ void DQRNetworkManager::RemoveRoomSyncPlayersWithSessionAddress(unsigned int ses // This is called from the host a remove player from the room sync data that is sent out to the clients. void DQRNetworkManager::RemoveRoomSyncPlayer(DQRNetworkPlayer *pPlayer) { - vector removedPlayers; + std::vector removedPlayers; int iWriteIdx = 0; for( int i = 0; i < m_roomSyncData.playerCount; i++ ) { diff --git a/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.h b/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.h index eee2d5a3b..abcb9518f 100644 --- a/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.h +++ b/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager.h @@ -461,7 +461,7 @@ private: int RTSDoWorkThread(); CRITICAL_SECTION m_csVecChatPlayers; - vector m_vecChatPlayersJoined; + std::vector m_vecChatPlayersJoined; public: void HandleNewPartyFoundForPlayer(); void HandlePlayerRemovedFromParty(int playerMask); diff --git a/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager_FriendSessions.cpp b/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager_FriendSessions.cpp index 644bc6c3f..556e1c744 100644 --- a/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager_FriendSessions.cpp +++ b/Minecraft.Client/Platform/Durango/Network/DQRNetworkManager_FriendSessions.cpp @@ -169,10 +169,10 @@ int DQRNetworkManager::GetFriendsThreadProc() // Get party views for each of the user party associations that we have. These seem to be able to (individually) raise errors, so // accumulate results into 2 matched vectors declared below so that we can ignore any broken UserPartyAssociations from now - vector partyViewVector; - vector partyResultsVector; + std::vector partyViewVector; + std::vector partyResultsVector; - vector> taskVector; + std::vector> taskVector; for each(WXM::UserPartyAssociation^ remoteParty in partyResults) { auto asyncOp = WXM::Party::GetPartyViewByPartyIdAsync( primaryUser, remoteParty->PartyId ); @@ -210,8 +210,8 @@ int DQRNetworkManager::GetFriendsThreadProc() } // Filter the party view, and party results vector (partyResultsVector) this is matched to, to remove any that don't have game sessions - or game sessions that aren't this game - vector partyViewVectorFiltered; - vector partyResultsFiltered; + std::vector partyViewVectorFiltered; + std::vector partyResultsFiltered; for( int i = 0; i < partyViewVector.size(); i++ ) { @@ -237,9 +237,9 @@ int DQRNetworkManager::GetFriendsThreadProc() // // and, from the party views, we can now attempt to get game sessions - vector sessionVector; - vector partyViewVectorValid; - vector partyResultsValid; + std::vector sessionVector; + std::vector partyViewVectorValid; + std::vector partyResultsValid; for( int i = 0; i < partyViewVectorFiltered.size(); i++ ) { @@ -284,10 +284,10 @@ int DQRNetworkManager::GetFriendsThreadProc() // a session won't have any XUIDs to resolve, which would make GetUserProfilesAsync unhappy, so we'll only be creating a task // when there are members. Creating new matching arrays for party results and sessions, to match the results (we don't care about the party view anymore) - vector^>> nameResolveTaskVector; - vector^> nameResolveVector; - vector newSessionVector; - vector newPartyVector; + std::vector^>> nameResolveTaskVector; + std::vector^> nameResolveVector; + std::vector newSessionVector; + std::vector newPartyVector; for( int j = 0; j < sessionVector.size(); j++ ) { @@ -383,7 +383,7 @@ int DQRNetworkManager::GetFriendsThreadProc() try { - auto joinTask = when_all(begin(nameResolveTaskVector), end(nameResolveTaskVector) ).then([this, &nameResolveVector](vector^> results) + auto joinTask = when_all(begin(nameResolveTaskVector), end(nameResolveTaskVector) ).then([this, &nameResolveVector](std::vector^> results) { nameResolveVector = results; }) diff --git a/Minecraft.Client/Platform/Durango/Network/PartyController.cpp b/Minecraft.Client/Platform/Durango/Network/PartyController.cpp index 84b54b99d..df7a849b8 100644 --- a/Minecraft.Client/Platform/Durango/Network/PartyController.cpp +++ b/Minecraft.Client/Platform/Durango/Network/PartyController.cpp @@ -781,7 +781,7 @@ void PartyController::OnGameSessionReady( GameSessionReadyEventArgs^ eventArgs ) Microsoft::Xbox::Services::Multiplayer::MultiplayerSessionReference^ sessionRef = m_pDQRNet->ConvertToMicrosoftXboxServicesMultiplayerSessionReference(eventArgs->GameSession); - vector localAdhocAdditions; + std::vector localAdhocAdditions; // Use context from any user at all for this, since this might happen before we are in a game and won't have anything set up in the network manager itself. We are only // using it to read the session so there shouldn't be any requirements to use a particular live context diff --git a/Minecraft.Client/Platform/Durango/Network/PlatformNetworkManagerDurango.cpp b/Minecraft.Client/Platform/Durango/Network/PlatformNetworkManagerDurango.cpp index c2c7a253b..f0f5f0cba 100644 --- a/Minecraft.Client/Platform/Durango/Network/PlatformNetworkManagerDurango.cpp +++ b/Minecraft.Client/Platform/Durango/Network/PlatformNetworkManagerDurango.cpp @@ -790,9 +790,9 @@ void CPlatformNetworkManagerDurango::TickSearch() } } -vector *CPlatformNetworkManagerDurango::GetSessionList(int iPad, int localPlayers, bool partyOnly) +std::vector *CPlatformNetworkManagerDurango::GetSessionList(int iPad, int localPlayers, bool partyOnly) { - vector *filteredList = new vector(); + std::vector *filteredList = new std::vector(); for( int i = 0; i < m_searchResultsCount; i++ ) { GameSessionData *gameSessionData = (GameSessionData *)m_pSearchResults[i].m_extData; diff --git a/Minecraft.Client/Platform/Durango/Network/PlatformNetworkManagerDurango.h b/Minecraft.Client/Platform/Durango/Network/PlatformNetworkManagerDurango.h index 99e60717b..7ee8843f1 100644 --- a/Minecraft.Client/Platform/Durango/Network/PlatformNetworkManagerDurango.h +++ b/Minecraft.Client/Platform/Durango/Network/PlatformNetworkManagerDurango.h @@ -71,7 +71,7 @@ private: HANDLE m_notificationListener; - vector m_machineDQRPrimaryPlayers; // collection of players that we deem to be the main one for that system + std::vector m_machineDQRPrimaryPlayers; // collection of players that we deem to be the main one for that system bool m_bLeavingGame; bool m_bLeaveGameOnTick; @@ -107,7 +107,7 @@ private: PlayerFlags(INetworkPlayer *pNetworkPlayer, unsigned int count); ~PlayerFlags(); }; - vector m_playerFlags; + std::vector m_playerFlags; void SystemFlagAddPlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagRemovePlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagReset(); @@ -124,7 +124,7 @@ public: std::wstring GatherRTTStats(); private: - vector friendsSessions[XUSER_MAX_COUNT]; + std::vector friendsSessions[XUSER_MAX_COUNT]; int m_searchResultsCount; int m_lastSearchStartTime; @@ -139,7 +139,7 @@ private: void TickSearch(); - vectorcurrentNetworkPlayers; + std::vectorcurrentNetworkPlayers; INetworkPlayer *addNetworkPlayer(DQRNetworkPlayer *pDQRPlayer); void removeNetworkPlayer(DQRNetworkPlayer *pDQRPlayer); static INetworkPlayer *getNetworkPlayer(DQRNetworkPlayer *pDQRPlayer); @@ -149,7 +149,7 @@ private: virtual void Notify(int ID, ULONG_PTR Param); public: - virtual vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); + virtual std::vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession); virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam ); virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ); diff --git a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp index 382b702e1..738532f55 100644 --- a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp +++ b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp @@ -988,7 +988,7 @@ Vec3::resetPool(); // g_pd3dDevice->Release(); -vector vRichPresenceStrings; +std::vector vRichPresenceStrings; // convert std::wstring to UTF-8 string std::string wstring_to_utf8 (const std::wstring& str) diff --git a/Minecraft.Client/Platform/Orbis/Orbis_Minecraft.cpp b/Minecraft.Client/Platform/Orbis/Orbis_Minecraft.cpp index f3bf7609d..2254bf321 100644 --- a/Minecraft.Client/Platform/Orbis/Orbis_Minecraft.cpp +++ b/Minecraft.Client/Platform/Orbis/Orbis_Minecraft.cpp @@ -1460,7 +1460,7 @@ int main(int argc, const char *argv[] ) } -vector vRichPresenceStrings; +std::vector vRichPresenceStrings; // convert std::wstring to UTF-8 string std::string std::wstring_to_utf8 (const std::wstring& str) diff --git a/Minecraft.Client/Platform/PS3/PS3Extras/Ps3Stubs.cpp b/Minecraft.Client/Platform/PS3/PS3Extras/Ps3Stubs.cpp index d72d3591a..4d543e156 100644 --- a/Minecraft.Client/Platform/PS3/PS3Extras/Ps3Stubs.cpp +++ b/Minecraft.Client/Platform/PS3/PS3Extras/Ps3Stubs.cpp @@ -26,7 +26,7 @@ static char usrdirPathBDPatch[CELL_GAME_PATH_MAX]; //static char sc_loadPath[] = {"/app_home/"}; //static char sc_loadPath[CELL_GAME_PATH_MAX]; static int iFilesOpen=0; -vector vOpenFileHandles; +std::vector vOpenFileHandles; namespace boost { diff --git a/Minecraft.Client/Platform/PS3/PS3_Minecraft.cpp b/Minecraft.Client/Platform/PS3/PS3_Minecraft.cpp index b7ea3c3b5..f94f5771f 100644 --- a/Minecraft.Client/Platform/PS3/PS3_Minecraft.cpp +++ b/Minecraft.Client/Platform/PS3/PS3_Minecraft.cpp @@ -1362,7 +1362,7 @@ int main() ShutdownManager::MainThreadHandleShutdown(); } -vector vRichPresenceStrings; +std::vector vRichPresenceStrings; uint8_t * AddRichPresenceString(int iID) { uint8_t *strUtf8 = mallocAndCreateUTF8ArrayFromString(iID); diff --git a/Minecraft.Client/Platform/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h b/Minecraft.Client/Platform/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h index 22c3db1bb..a47788d33 100644 --- a/Minecraft.Client/Platform/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h +++ b/Minecraft.Client/Platform/PS3/SPU_Tasks/LevelRenderer_FindNearestChunk/LevelRenderer_FindNearestChunk.h @@ -64,7 +64,7 @@ public: int id; int padding[1]; //public: - // vector > renderableTileEntities; // 4J - removed + // std::vector > renderableTileEntities; // 4J - removed private: void *globalRenderableTileEntities; diff --git a/Minecraft.Client/Platform/PSVita/PSVita_App.cpp b/Minecraft.Client/Platform/PSVita/PSVita_App.cpp index 0bdeee70b..0aa9c704b 100644 --- a/Minecraft.Client/Platform/PSVita/PSVita_App.cpp +++ b/Minecraft.Client/Platform/PSVita/PSVita_App.cpp @@ -1566,7 +1566,7 @@ void CConsoleMinecraftApp::getSaveDataDeleteDialogParam(SceSaveDataDialogParam * ZeroMemory(&listParam, sizeof(SceSaveDataDialogListParam)); { - vector slots; + std::vector slots; for (unsigned int i = 2; i < SCE_APPUTIL_SAVEDATA_SLOT_MAX; i++) { SceAppUtilSaveDataSlotParam slotParam; @@ -1589,7 +1589,7 @@ void CConsoleMinecraftApp::getSaveDataDeleteDialogParam(SceSaveDataDialogParam * int slotIndex = 0; - vector::iterator itr; + std::vector::iterator itr; for (itr = slots.begin(); itr != slots.end(); itr++) { pSavesList[slotIndex] = *itr; diff --git a/Minecraft.Client/Platform/PSVita/PSVita_Minecraft.cpp b/Minecraft.Client/Platform/PSVita/PSVita_Minecraft.cpp index ed9c98f3b..27892b4ca 100644 --- a/Minecraft.Client/Platform/PSVita/PSVita_Minecraft.cpp +++ b/Minecraft.Client/Platform/PSVita/PSVita_Minecraft.cpp @@ -1061,7 +1061,7 @@ int main() ShutdownManager::MainThreadHandleShutdown(); } -vector vRichPresenceStrings; +std::vector vRichPresenceStrings; uint8_t * AddRichPresenceString(int iID) { uint8_t *strUtf8 = mallocAndCreateUTF8ArrayFromString(iID); diff --git a/Minecraft.Client/Platform/Xbox/Audio/SoundEngine.cpp b/Minecraft.Client/Platform/Xbox/Audio/SoundEngine.cpp index 388749a68..34f142a6e 100644 --- a/Minecraft.Client/Platform/Xbox/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Platform/Xbox/Audio/SoundEngine.cpp @@ -25,7 +25,7 @@ IXACT3SoundBank *SoundEngine::m_pSoundBank2 = NULL; CRITICAL_SECTION SoundEngine::m_CS; X3DAUDIO_HANDLE SoundEngine::m_xact3dInstance; -vector SoundEngine::currentSounds; +std::vector SoundEngine::currentSounds; X3DAUDIO_DSP_SETTINGS SoundEngine::m_DSPSettings; X3DAUDIO_EMITTER SoundEngine::m_emitter; X3DAUDIO_LISTENER SoundEngine::m_listeners[4]; diff --git a/Minecraft.Client/Platform/Xbox/Audio/SoundEngine.h b/Minecraft.Client/Platform/Xbox/Audio/SoundEngine.h index fd3a2fdbc..e0f5d6c7a 100644 --- a/Minecraft.Client/Platform/Xbox/Audio/SoundEngine.h +++ b/Minecraft.Client/Platform/Xbox/Audio/SoundEngine.h @@ -54,7 +54,7 @@ class SoundEngine : public ConsoleSoundEngine }; void update3DPosition( soundInfo *pInfo, bool bPlaceEmitterAtListener = false, bool bIsCDMusic = false); - static vectorcurrentSounds; + static std::vectorcurrentSounds; int noMusicDelay; Random *random; diff --git a/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.cpp b/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.cpp index accc543b8..eef26df16 100644 --- a/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.cpp +++ b/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.cpp @@ -1474,9 +1474,9 @@ void CPlatformNetworkManagerXbox::SetSearchResultsReady(int resultCount ) m_searchResultsCount[m_lastSearchPad] = resultCount; } -vector *CPlatformNetworkManagerXbox::GetSessionList(int iPad, int localPlayers, bool partyOnly) +std::vector *CPlatformNetworkManagerXbox::GetSessionList(int iPad, int localPlayers, bool partyOnly) { - vector *filteredList = new vector();; + std::vector *filteredList = new std::vector();; const XSESSION_SEARCHRESULT *pSearchResult; const XNQOSINFO * pxnqi; diff --git a/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.h b/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.h index c7d5038e5..c28e581f2 100644 --- a/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.h +++ b/Minecraft.Client/Platform/Xbox/Network/PlatformNetworkManagerXbox.h @@ -73,7 +73,7 @@ private: HANDLE m_notificationListener; - vector m_machineQNetPrimaryPlayers; // collection of players that we deem to be the main one for that system + std::vector m_machineQNetPrimaryPlayers; // collection of players that we deem to be the main one for that system bool m_bLeavingGame; bool m_bLeaveGameOnTick; @@ -108,7 +108,7 @@ private: PlayerFlags(INetworkPlayer *pNetworkPlayer, unsigned int count); ~PlayerFlags(); }; - vector m_playerFlags; + std::vector m_playerFlags; void SystemFlagAddPlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagRemovePlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagReset(); @@ -125,7 +125,7 @@ public: std::wstring GatherRTTStats(); private: - vector friendsSessions[XUSER_MAX_COUNT]; + std::vector friendsSessions[XUSER_MAX_COUNT]; int m_searchResultsCount[XUSER_MAX_COUNT]; int m_lastSearchStartTime[XUSER_MAX_COUNT]; @@ -152,7 +152,7 @@ private: void SetSearchResultsReady(int resultCount = 0); - vectorcurrentNetworkPlayers; + std::vectorcurrentNetworkPlayers; INetworkPlayer *addNetworkPlayer(IQNetPlayer *pQNetPlayer); void removeNetworkPlayer(IQNetPlayer *pQNetPlayer); static INetworkPlayer *getNetworkPlayer(IQNetPlayer *pQNetPlayer); @@ -162,7 +162,7 @@ private: virtual void Notify(int ID, ULONG_PTR Param); public: - virtual vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); + virtual std::vector *GetSessionList(int iPad, int localPlayers, bool partyOnly); virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession); virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam ); virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ); diff --git a/Minecraft.Client/Player/EntityTracker.cpp b/Minecraft.Client/Player/EntityTracker.cpp index d73ec6f1f..74985052b 100644 --- a/Minecraft.Client/Player/EntityTracker.cpp +++ b/Minecraft.Client/Player/EntityTracker.cpp @@ -115,7 +115,7 @@ void EntityTracker::removePlayer(std::shared_ptr e) void EntityTracker::tick() { - vector > movedPlayers; + std::vector > movedPlayers; for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) { std::shared_ptr te = *it; diff --git a/Minecraft.Client/Player/LocalPlayer.cpp b/Minecraft.Client/Player/LocalPlayer.cpp index aaa84ed61..2a32923d9 100644 --- a/Minecraft.Client/Player/LocalPlayer.cpp +++ b/Minecraft.Client/Player/LocalPlayer.cpp @@ -1609,7 +1609,7 @@ void LocalPlayer::handleCollectItem(std::shared_ptr item) } } -void LocalPlayer::SetPlayerAdditionalModelParts(vectorpAdditionalModelParts) +void LocalPlayer::SetPlayerAdditionalModelParts(std::vectorpAdditionalModelParts) { m_pAdditionalModelParts=pAdditionalModelParts; } diff --git a/Minecraft.Client/Player/LocalPlayer.h b/Minecraft.Client/Player/LocalPlayer.h index a4054c974..e9948b7d9 100644 --- a/Minecraft.Client/Player/LocalPlayer.h +++ b/Minecraft.Client/Player/LocalPlayer.h @@ -190,10 +190,10 @@ public: float getAndResetChangeDimensionTimer(); virtual void handleCollectItem(std::shared_ptr item); - void SetPlayerAdditionalModelParts(vectorpAdditionalModelParts); + void SetPlayerAdditionalModelParts(std::vectorpAdditionalModelParts); private: - vector m_pAdditionalModelParts; + std::vector m_pAdditionalModelParts; }; diff --git a/Minecraft.Client/Player/ServerPlayer.cpp b/Minecraft.Client/Player/ServerPlayer.cpp index a27e9ba6d..35e3e94a4 100644 --- a/Minecraft.Client/Player/ServerPlayer.cpp +++ b/Minecraft.Client/Player/ServerPlayer.cpp @@ -441,7 +441,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks) // Don't send TileEntity data until we have sent the block data if( connection->isLocal() || chunkDataSent) { - vector > *tes = level->getTileEntitiesInRegion(nearest.x * 16, 0, nearest.z * 16, nearest.x * 16 + 16, Level::maxBuildHeight, nearest.z * 16 + 16); + std::vector > *tes = level->getTileEntitiesInRegion(nearest.x * 16, 0, nearest.z * 16, nearest.x * 16 + 16, Level::maxBuildHeight, nearest.z * 16 + 16); for (unsigned int i = 0; i < tes->size(); i++) { // 4J Stu - Added delay param to ensure that these arrive after the BRUPs from above @@ -1010,12 +1010,12 @@ void ServerPlayer::slotChanged(AbstractContainerMenu *container, int slotIndex, void ServerPlayer::refreshContainer(AbstractContainerMenu *menu) { - vector > *items = menu->getItems(); + std::vector > *items = menu->getItems(); refreshContainer(menu, items); delete items; } -void ServerPlayer::refreshContainer(AbstractContainerMenu *container, vector > *items) +void ServerPlayer::refreshContainer(AbstractContainerMenu *container, std::vector > *items) { connection->send( std::shared_ptr( new ContainerSetContentPacket(container->containerId, items) ) ); connection->send( std::shared_ptr( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); diff --git a/Minecraft.Client/Player/ServerPlayer.h b/Minecraft.Client/Player/ServerPlayer.h index 82eb27abc..8abb871f2 100644 --- a/Minecraft.Client/Player/ServerPlayer.h +++ b/Minecraft.Client/Player/ServerPlayer.h @@ -22,7 +22,7 @@ public: ServerPlayerGameMode *gameMode; double lastMoveX, lastMoveZ; list chunksToSend; - vector entitiesToRemove; + std::vector entitiesToRemove; unordered_set seenChunks; int spewTimer; @@ -104,7 +104,7 @@ public: virtual bool openTrading(std::shared_ptr traderTarget); // 4J added bool return virtual void slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr item); void refreshContainer(AbstractContainerMenu *menu); - virtual void refreshContainer(AbstractContainerMenu *container, vector > *items); + virtual void refreshContainer(AbstractContainerMenu *container, std::vector > *items); virtual void setContainerData(AbstractContainerMenu *container, int id, int value); virtual void closeContainer(); void broadcastCarriedItem(); diff --git a/Minecraft.Client/Player/TrackedEntity.cpp b/Minecraft.Client/Player/TrackedEntity.cpp index 7e31186fc..91a63c017 100644 --- a/Minecraft.Client/Player/TrackedEntity.cpp +++ b/Minecraft.Client/Player/TrackedEntity.cpp @@ -48,7 +48,7 @@ TrackedEntity::TrackedEntity(std::shared_ptr e, int range, int updateInt int c0a = 0, c0b = 0, c1a = 0, c1b = 0, c1c = 0, c2a = 0, c2b = 0; -void TrackedEntity::tick(EntityTracker *tracker, vector > *players) +void TrackedEntity::tick(EntityTracker *tracker, std::vector > *players) { moved = false; if (!updatedPlayerVisibility || e->distanceToSqr(xpu, ypu, zpu) > 4 * 4) @@ -308,7 +308,7 @@ void TrackedEntity::broadcast(std::shared_ptr packet) if( Packet::canSendToAnyClient( packet ) ) { // 4J-PB - due to the knockback on a player being hit, we need to send to all players, but limit the network traffic here to players that have not already had it sent to their system - vector< std::shared_ptr > sentTo; + std::vector< std::shared_ptr > sentTo; // 4J - don't send to a player we've already sent this data to that shares the same machine. // EntityMotionPacket used to limit themselves to sending once to each machine @@ -370,7 +370,7 @@ void TrackedEntity::broadcast(std::shared_ptr packet) void TrackedEntity::broadcastAndSend(std::shared_ptr packet) { - vector< std::shared_ptr > sentTo; + std::vector< std::shared_ptr > sentTo; broadcast(packet); std::shared_ptr sp = dynamic_pointer_cast(e); if (sp != NULL && sp->connection) @@ -526,7 +526,7 @@ void TrackedEntity::updatePlayer(EntityTracker *tracker, std::shared_ptr(e) != NULL) { std::shared_ptr mob = dynamic_pointer_cast(e); - vector *activeEffects = mob->getActiveEffects(); + std::vector *activeEffects = mob->getActiveEffects(); for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) { MobEffectInstance *effect = *it; @@ -558,7 +558,7 @@ bool TrackedEntity::canBySeenBy(std::shared_ptr player) // return player->getLevel()->getChunkMap()->isPlayerIn(player, e->xChunk, e->zChunk); } -void TrackedEntity::updatePlayers(EntityTracker *tracker, vector > *players) +void TrackedEntity::updatePlayers(EntityTracker *tracker, std::vector > *players) { for (unsigned int i = 0; i < players->size(); i++) { diff --git a/Minecraft.Client/Player/TrackedEntity.h b/Minecraft.Client/Player/TrackedEntity.h index 46294ce2b..81e69cc5f 100644 --- a/Minecraft.Client/Player/TrackedEntity.h +++ b/Minecraft.Client/Player/TrackedEntity.h @@ -36,7 +36,7 @@ public: TrackedEntity(std::shared_ptr e, int range, int updateInterval, bool trackDelta); - void tick(EntityTracker *tracker, vector > *players); + void tick(EntityTracker *tracker, std::vector > *players); void broadcast(std::shared_ptr packet); void broadcastAndSend(std::shared_ptr packet); void broadcastRemoved(); @@ -56,7 +56,7 @@ private: public: void updatePlayer(EntityTracker *tracker, std::shared_ptr sp); - void updatePlayers(EntityTracker *tracker, vector > *players); + void updatePlayers(EntityTracker *tracker, std::vector > *players); private: void sendEntityData(std::shared_ptr conn); std::shared_ptr getAddEntityPacket(); diff --git a/Minecraft.Client/Player/User.cpp b/Minecraft.Client/Player/User.cpp index 533985dcc..5cdc0162d 100644 --- a/Minecraft.Client/Player/User.cpp +++ b/Minecraft.Client/Player/User.cpp @@ -2,7 +2,7 @@ #include "User.h" #include "../../Minecraft.World/Headers/net.minecraft.world.level.tile.h" -vector User::allowedTiles; +std::vector User::allowedTiles; void User::staticCtor() { diff --git a/Minecraft.Client/Player/User.h b/Minecraft.Client/Player/User.h index 5d87832cb..7ee722eed 100644 --- a/Minecraft.Client/Player/User.h +++ b/Minecraft.Client/Player/User.h @@ -4,7 +4,7 @@ using namespace std; class User { public: - static vector allowedTiles; + static std::vector allowedTiles; static void staticCtor(); std::wstring name; std::wstring sessionId; diff --git a/Minecraft.Client/Rendering/Chunk.cpp b/Minecraft.Client/Rendering/Chunk.cpp index cbbd72c20..7afe1f357 100644 --- a/Minecraft.Client/Rendering/Chunk.cpp +++ b/Minecraft.Client/Rendering/Chunk.cpp @@ -207,7 +207,7 @@ void Chunk::rebuild() // unordered_set > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line // renderableTileEntities.clear(); - vector > renderableTileEntities; // 4J - added + std::vector > renderableTileEntities; // 4J - added int r = 1; @@ -574,12 +574,12 @@ void Chunk::rebuild() // 4J - All these new things added to globalRenderableTileEntities AUTO_VAR(endItRTE, renderableTileEntities.end()); - for( vector >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) + for( std::vector >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) { oldTileEntities.erase(*it); } // 4J - oldTileEntities is now the removed items - vector >::iterator it = globalRenderableTileEntities->begin(); + std::vector >::iterator it = globalRenderableTileEntities->begin(); while( it != globalRenderableTileEntities->end() ) { if( oldTileEntities.find(*it) != oldTileEntities.end() ) @@ -659,7 +659,7 @@ void Chunk::rebuild_SPU() // unordered_set > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line // renderableTileEntities.clear(); - vector > renderableTileEntities; // 4J - added + std::vector > renderableTileEntities; // 4J - added // List newTileEntities = new ArrayList(); // newTileEntities.clear(); @@ -903,12 +903,12 @@ void Chunk::rebuild_SPU() // 4J - All these new things added to globalRenderableTileEntities AUTO_VAR(endItRTE, renderableTileEntities.end()); - for( vector >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) + for( std::vector >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) { oldTileEntities.erase(*it); } // 4J - oldTileEntities is now the removed items - vector >::iterator it = globalRenderableTileEntities->begin(); + std::vector >::iterator it = globalRenderableTileEntities->begin(); while( it != globalRenderableTileEntities->end() ) { if( oldTileEntities.find(*it) != oldTileEntities.end() ) diff --git a/Minecraft.Client/Rendering/Chunk.h b/Minecraft.Client/Rendering/Chunk.h index a80f53484..c3231bb94 100644 --- a/Minecraft.Client/Rendering/Chunk.h +++ b/Minecraft.Client/Rendering/Chunk.h @@ -52,7 +52,7 @@ public: int id; //public: -// vector > renderableTileEntities; // 4J - removed +// std::vector > renderableTileEntities; // 4J - removed private: LevelRenderer::rteMap *globalRenderableTileEntities; diff --git a/Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp index 2cff2584f..eaec4c2d2 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp @@ -198,7 +198,7 @@ void PlayerRenderer::render(std::shared_ptr _mob, double x, double y, do } // 4J-PB - any additional parts to turn on for this player (skin dependent) - vector *pAdditionalModelParts=mob->GetAdditionalModelParts(); + std::vector *pAdditionalModelParts=mob->GetAdditionalModelParts(); //turn them on if(pAdditionalModelParts!=NULL) { diff --git a/Minecraft.Client/Rendering/GameRenderer.cpp b/Minecraft.Client/Rendering/GameRenderer.cpp index 5e8f939d8..a941d48ba 100644 --- a/Minecraft.Client/Rendering/GameRenderer.cpp +++ b/Minecraft.Client/Rendering/GameRenderer.cpp @@ -57,10 +57,10 @@ C4JThread* GameRenderer::m_updateThread; C4JThread::EventArray* GameRenderer::m_updateEvents; bool GameRenderer::nearThingsToDo = false; bool GameRenderer::updateRunning = false; -vector GameRenderer::m_deleteStackByte; -vector GameRenderer::m_deleteStackSparseLightStorage; -vector GameRenderer::m_deleteStackCompressedTileStorage; -vector GameRenderer::m_deleteStackSparseDataStorage; +std::vector GameRenderer::m_deleteStackByte; +std::vector GameRenderer::m_deleteStackSparseLightStorage; +std::vector GameRenderer::m_deleteStackCompressedTileStorage; +std::vector GameRenderer::m_deleteStackSparseDataStorage; #endif CRITICAL_SECTION GameRenderer::m_csDeleteStack; @@ -352,7 +352,7 @@ void GameRenderer::pick(float a) Vec3 *to = from->add(b->x * range, b->y * range, b->z * range); hovered = nullptr; float overlap = 1; - vector > *objects = mc->level->getEntities(mc->cameraTargetPlayer, mc->cameraTargetPlayer->bb->expand(b->x * (range), b->y * (range), b->z * (range))->grow(overlap, overlap, overlap)); + std::vector > *objects = mc->level->getEntities(mc->cameraTargetPlayer, mc->cameraTargetPlayer->bb->expand(b->x * (range), b->y * (range), b->z * (range))->grow(overlap, overlap, overlap)); double nearest = dist; AUTO_VAR(itEnd, objects->end()); diff --git a/Minecraft.Client/Rendering/GameRenderer.h b/Minecraft.Client/Rendering/GameRenderer.h index d575952b6..5026704bb 100644 --- a/Minecraft.Client/Rendering/GameRenderer.h +++ b/Minecraft.Client/Rendering/GameRenderer.h @@ -156,10 +156,10 @@ public: static bool nearThingsToDo; static bool updateRunning; #endif - static vector m_deleteStackByte; - static vector m_deleteStackSparseLightStorage; - static vector m_deleteStackCompressedTileStorage; - static vector m_deleteStackSparseDataStorage; + static std::vector m_deleteStackByte; + static std::vector m_deleteStackSparseLightStorage; + static std::vector m_deleteStackCompressedTileStorage; + static std::vector m_deleteStackSparseDataStorage; static CRITICAL_SECTION m_csDeleteStack; static void AddForDelete(uint8_t *deleteThis); static void AddForDelete(SparseLightStorage *deleteThis); diff --git a/Minecraft.Client/Rendering/LevelRenderer.cpp b/Minecraft.Client/Rendering/LevelRenderer.cpp index d1d119645..d978868cc 100644 --- a/Minecraft.Client/Rendering/LevelRenderer.cpp +++ b/Minecraft.Client/Rendering/LevelRenderer.cpp @@ -442,7 +442,7 @@ void LevelRenderer::allChanged(int playerIndex) } chunks[playerIndex] = ClipChunkArray(xChunks * yChunks * zChunks); - // sortedChunks[playerIndex] = new vector(xChunks * yChunks * zChunks); // 4J - removed - not sorting our chunks anymore + // sortedChunks[playerIndex] = new std::vector(xChunks * yChunks * zChunks); // 4J - removed - not sorting our chunks anymore int id = 0; int count = 0; @@ -520,7 +520,7 @@ void LevelRenderer::renderEntities(Vec3 *cam, Culler *culler, float a) // mc->gameRenderer->turnOnLightLayer(a); // 4J - brought forward from 1.8.2 - vector > entities = level[playerIndex]->getAllEntities(); + std::vector > entities = level[playerIndex]->getAllEntities(); totalEntities = (int)entities.size(); AUTO_VAR(itEndGE, level[playerIndex]->globalEntities.end()); diff --git a/Minecraft.Client/Rendering/LevelRenderer.h b/Minecraft.Client/Rendering/LevelRenderer.h index bdf371752..ab8a1fe40 100644 --- a/Minecraft.Client/Rendering/LevelRenderer.h +++ b/Minecraft.Client/Rendering/LevelRenderer.h @@ -120,18 +120,18 @@ public: void destroyTileProgress(int id, int x, int y, int z, int progress); void registerTextures(IconRegister *iconRegister); - typedef std::unordered_map >, IntKeyHash, IntKeyEq> rteMap; + typedef std::unordered_map >, IntKeyHash, IntKeyEq> rteMap; private: // debug int m_freezeticks; // used to freeze the clouds // 4J - this block of declarations was scattered round the code but have gathered everything into one place - rteMap renderableTileEntities; // 4J - changed - was vector, now hashed by chunk so we can find them + rteMap renderableTileEntities; // 4J - changed - was std::vector, now hashed by chunk so we can find them CRITICAL_SECTION m_csRenderableTileEntities; MultiPlayerLevel *level[4]; // 4J - now one per player Textures *textures; - // vector *sortedChunks[4]; // 4J - removed - not sorting our chunks anymore + // std::vector *sortedChunks[4]; // 4J - removed - not sorting our chunks anymore ClipChunkArray chunks[4]; // 4J - now one per player int lastPlayerCount[4]; // 4J - added int xChunks, yChunks, zChunks; @@ -149,7 +149,7 @@ private: int renderedEntities; int culledEntities; int chunkFixOffs; - vector _renderChunks; + std::vector _renderChunks; int frame; int repeatList; double xOld[4]; // 4J - now one per player @@ -189,7 +189,7 @@ public: ~RecentTile(); }; CRITICAL_SECTION m_csDestroyedTiles; - vector m_destroyedTiles; + std::vector m_destroyedTiles; public: void destroyingTileAt( Level *level, int x, int y, int z ); // For game to let this manager know that a tile is about to be destroyed (must be called before it actually is) void updatedChunkAt( Level * level, int x, int y, int z, int veryNearCount ); // For chunk rebuilding to inform the manager that a chunk (a 16x16x16 tile render chunk) has been updated diff --git a/Minecraft.Client/Rendering/Minimap.cpp b/Minecraft.Client/Rendering/Minimap.cpp index a4da8ca19..cb337cd83 100644 --- a/Minecraft.Client/Rendering/Minimap.cpp +++ b/Minecraft.Client/Rendering/Minimap.cpp @@ -147,12 +147,12 @@ void Minimap::render(std::shared_ptr player, Textures *textures, std::sh AUTO_VAR(itEnd, data->decorations.end()); #ifdef _LARGE_WORLDS - vector m_edgeIcons; + std::vector m_edgeIcons; #endif // 4J-PB - stack the map icons float fIconZ=-0.04f;// 4J - moved to -0.04 (was -0.02) to stop z fighting - for( vector::iterator it = data->decorations.begin(); it != itEnd; it++ ) + for( std::vector::iterator it = data->decorations.begin(); it != itEnd; it++ ) { MapItemSavedData::MapDecoration *dec = *it; diff --git a/Minecraft.Client/Rendering/Models/Model.h b/Minecraft.Client/Rendering/Models/Model.h index 335afb9ca..431ba5cde 100644 --- a/Minecraft.Client/Rendering/Models/Model.h +++ b/Minecraft.Client/Rendering/Models/Model.h @@ -12,7 +12,7 @@ class Model public: float attackTime; bool riding; - vector cubes; + std::vector cubes; bool young; std::unordered_map mappedTexOffs; int texWidth; diff --git a/Minecraft.Client/Rendering/Particles/GuiParticles.h b/Minecraft.Client/Rendering/Particles/GuiParticles.h index 3cbb9871e..73ef7eee4 100644 --- a/Minecraft.Client/Rendering/Particles/GuiParticles.h +++ b/Minecraft.Client/Rendering/Particles/GuiParticles.h @@ -8,7 +8,7 @@ using namespace std; class GuiParticles : public GuiComponent { private: - vector particles; + std::vector particles; Minecraft *mc; public: diff --git a/Minecraft.Client/Textures/Packs/TexturePackRepository.cpp b/Minecraft.Client/Textures/Packs/TexturePackRepository.cpp index 3bae4d69a..0977b4ca2 100644 --- a/Minecraft.Client/Textures/Packs/TexturePackRepository.cpp +++ b/Minecraft.Client/Textures/Packs/TexturePackRepository.cpp @@ -18,7 +18,7 @@ TexturePackRepository::TexturePackRepository(File workingDirectory, Minecraft *m // 4J - added usingWeb = false; selected = NULL; - texturePacks = new vector; + texturePacks = new std::vector; this->minecraft = minecraft; @@ -157,7 +157,7 @@ void TexturePackRepository::updateList() { // 4J Stu - We don't ever want to completely refresh the lists, we keep them up-to-date as we go #if 0 - vector *currentPacks = new vector; + std::vector *currentPacks = new std::vector; currentPacks->push_back(DEFAULT_TEXTURE_PACK); cacheById[DEFAULT_TEXTURE_PACK->getId()] = DEFAULT_TEXTURE_PACK; #ifndef _CONTENT_PACKAGE @@ -195,9 +195,9 @@ void TexturePackRepository::updateList() // 4J - was texturePacks.removeAll(currentPacks); AUTO_VAR(itEnd, currentPacks->end()); - for( vector::iterator it1 = currentPacks->begin(); it1 != itEnd; it1++ ) + for( std::vector::iterator it1 = currentPacks->begin(); it1 != itEnd; it1++ ) { - for( vector::iterator it2 = texturePacks->begin(); it2 != texturePacks->end(); it2++ ) + for( std::vector::iterator it2 = texturePacks->begin(); it2 != texturePacks->end(); it2++ ) { if( *it1 == *it2 ) { @@ -207,7 +207,7 @@ void TexturePackRepository::updateList() } itEnd = texturePacks->end(); - for( vector::iterator it = texturePacks->begin(); it != itEnd; it++ ) + for( std::vector::iterator it = texturePacks->begin(); it != itEnd; it++ ) { TexturePack *pack = *it; pack->unload(minecraft->textures); @@ -234,7 +234,7 @@ std::wstring TexturePackRepository::getIdOrNull(File file) return L""; } -vector TexturePackRepository::getWorkDirContents() +std::vector TexturePackRepository::getWorkDirContents() { app.DebugPrintf("TexturePackRepository::getWorkDirContents is not implemented\n"); #if 0 @@ -244,10 +244,10 @@ vector TexturePackRepository::getWorkDirContents() return Collections.emptyList(); #endif - return vector(); + return std::vector(); } -vector *TexturePackRepository::getAll() +std::vector *TexturePackRepository::getAll() { // 4J - note that original constucted a copy of texturePacks here return texturePacks; @@ -291,9 +291,9 @@ bool TexturePackRepository::canUseWebSkin() return false; } -vector< pair > *TexturePackRepository::getTexturePackIdNames() +std::vector< pair > *TexturePackRepository::getTexturePackIdNames() { - vector< pair > *packList = new vector< pair >(); + std::vector< pair > *packList = new std::vector< pair >(); for(AUTO_VAR(it,texturePacks->begin()); it != texturePacks->end(); ++it) { diff --git a/Minecraft.Client/Textures/Packs/TexturePackRepository.h b/Minecraft.Client/Textures/Packs/TexturePackRepository.h index 99e89852e..a397e39bc 100644 --- a/Minecraft.Client/Textures/Packs/TexturePackRepository.h +++ b/Minecraft.Client/Textures/Packs/TexturePackRepository.h @@ -18,8 +18,8 @@ private: Minecraft *minecraft; File workDir; File multiplayerDir; - vector *texturePacks; - vector m_texturePacksToDelete; + std::vector *texturePacks; + std::vector m_texturePacksToDelete; std::unordered_map cacheById; @@ -49,10 +49,10 @@ public: private: std::wstring getIdOrNull(File file); - vector getWorkDirContents(); + std::vector getWorkDirContents(); public: - vector *getAll(); + std::vector *getAll(); TexturePack *getSelected(); bool shouldPromptForWebSkin(); @@ -60,7 +60,7 @@ public: bool isUsingDefaultSkin() { return selected == DEFAULT_TEXTURE_PACK; } // 4J Added TexturePack *getDefault() { return DEFAULT_TEXTURE_PACK; } // 4J Added - vector< pair > *getTexturePackIdNames(); + std::vector< pair > *getTexturePackIdNames(); bool selectTexturePackById(DWORD id); // 4J Added TexturePack *getTexturePackById(DWORD id); // 4J Added diff --git a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp index 8bf37af90..30fbaefd3 100644 --- a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp +++ b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp @@ -70,7 +70,7 @@ void PreStitchedTextureMap::stitch() } // Collection bucket for multiple frames per texture - std::unordered_map * > textures; // = new HashMap>(); + std::unordered_map * > textures; // = new HashMap>(); Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name); @@ -143,7 +143,7 @@ void PreStitchedTextureMap::stitch() std::wstring filename = path + textureFileName + extension; // TODO: [EB] Put the frames into a proper object, not this inside out hack - vector *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap); + std::vector *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap); if (frames == NULL || frames->empty()) { continue; // Couldn't load a texture, skip it diff --git a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.h b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.h index 763d2cab7..96e9c90ba 100644 --- a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.h +++ b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.h @@ -28,9 +28,9 @@ private: BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); StitchedTexture *missingPosition; Texture *stitchResult; - vector animatedTextures; // = new ArrayList(); + std::vector animatedTextures; // = new ArrayList(); - vector > texturesToAnimate; + std::vector > texturesToAnimate; void loadUVs(); public: diff --git a/Minecraft.Client/Textures/Stitching/StitchSlot.cpp b/Minecraft.Client/Textures/Stitching/StitchSlot.cpp index 15dcc2327..1a30bca3f 100644 --- a/Minecraft.Client/Textures/Stitching/StitchSlot.cpp +++ b/Minecraft.Client/Textures/Stitching/StitchSlot.cpp @@ -52,7 +52,7 @@ bool StitchSlot::add(TextureHolder *textureHolder) // See if we're already divided before, if not, setup subSlots if (subSlots == NULL) { - subSlots = new vector(); + subSlots = new std::vector(); // First slot is for the new texture subSlots->push_back(new StitchSlot(originX, originY, textureWidth, textureHeight)); @@ -132,7 +132,7 @@ bool StitchSlot::add(TextureHolder *textureHolder) return false; } -void StitchSlot::collectAssignments(vector *result) +void StitchSlot::collectAssignments(std::vector *result) { if (textureHolder != NULL) { diff --git a/Minecraft.Client/Textures/Stitching/StitchSlot.h b/Minecraft.Client/Textures/Stitching/StitchSlot.h index 3cedce6b4..0814d5f44 100644 --- a/Minecraft.Client/Textures/Stitching/StitchSlot.h +++ b/Minecraft.Client/Textures/Stitching/StitchSlot.h @@ -11,7 +11,7 @@ private: const int width; const int height; - vector *subSlots; + std::vector *subSlots; TextureHolder *textureHolder; public: @@ -21,7 +21,7 @@ public: int getX(); int getY(); bool add(TextureHolder *textureHolder); - void collectAssignments(vector *result); + void collectAssignments(std::vector *result); //@Override std::wstring toString(); diff --git a/Minecraft.Client/Textures/Stitching/StitchedTexture.cpp b/Minecraft.Client/Textures/Stitching/StitchedTexture.cpp index 3fce9033a..8b10493a2 100644 --- a/Minecraft.Client/Textures/Stitching/StitchedTexture.cpp +++ b/Minecraft.Client/Textures/Stitching/StitchedTexture.cpp @@ -75,7 +75,7 @@ void StitchedTexture::initUVs(float U0, float V0, float U1, float V1) v1 = V1; } -void StitchedTexture::init(Texture *source, vector *frames, int x, int y, int width, int height, bool rotated) +void StitchedTexture::init(Texture *source, std::vector *frames, int x, int y, int width, int height, bool rotated) { this->source = source; this->frames = frames; diff --git a/Minecraft.Client/Textures/Stitching/StitchedTexture.h b/Minecraft.Client/Textures/Stitching/StitchedTexture.h index e1c72e401..a1bdaa8fa 100644 --- a/Minecraft.Client/Textures/Stitching/StitchedTexture.h +++ b/Minecraft.Client/Textures/Stitching/StitchedTexture.h @@ -11,10 +11,10 @@ private: protected: Texture *source; - vector *frames; + std::vector *frames; private: - typedef vector > intPairVector; + typedef std::vector > intPairVector; intPairVector *frameOverride; int flags; @@ -49,7 +49,7 @@ protected: public: void initUVs(float U0, float V0, float U1, float V1); - void init(Texture *source, vector *frames, int x, int y, int width, int height, bool rotated); + void init(Texture *source, std::vector *frames, int x, int y, int width, int height, bool rotated); void replaceWith(StitchedTexture *texture); int getX() const; int getY() const; diff --git a/Minecraft.Client/Textures/Stitching/Stitcher.cpp b/Minecraft.Client/Textures/Stitching/Stitcher.cpp index ede0953e8..6b76bc216 100644 --- a/Minecraft.Client/Textures/Stitching/Stitcher.cpp +++ b/Minecraft.Client/Textures/Stitching/Stitcher.cpp @@ -60,7 +60,7 @@ Texture *Stitcher::constructTexture(bool mipmap) stitchedTexture = TextureManager::getInstance()->createTexture(name, Texture::TM_DYNAMIC, storageX, storageY, Texture::TFMT_RGBA, mipmap); stitchedTexture->fill(stitchedTexture->getRect(), 0xffff0000); - vector *slots = gatherAreas(); + std::vector *slots = gatherAreas(); for (int index = 0; index < slots->size(); index++) { StitchSlot *slot = slots->at(index); @@ -96,9 +96,9 @@ void Stitcher::stitch() } } -vector *Stitcher::gatherAreas() +std::vector *Stitcher::gatherAreas() { - vector *result = new vector(); + std::vector *result = new std::vector(); //for (StitchSlot slot : storage) for(AUTO_VAR(it, storage.begin()); it != storage.end(); ++it) diff --git a/Minecraft.Client/Textures/Stitching/Stitcher.h b/Minecraft.Client/Textures/Stitching/Stitcher.h index 62803955a..806e0d300 100644 --- a/Minecraft.Client/Textures/Stitching/Stitcher.h +++ b/Minecraft.Client/Textures/Stitching/Stitcher.h @@ -17,7 +17,7 @@ public: private: set texturesToBeStitched; // = new HashSet(256); - vector storage; // = new ArrayList(256); + std::vector storage; // = new ArrayList(256); int storageX; int storageY; @@ -41,7 +41,7 @@ public: void addTexture(TextureHolder *textureHolder); Texture *constructTexture(bool mipmap = true); // 4J Added mipmap param void stitch(); - vector *gatherAreas(); + std::vector *gatherAreas(); private: // Based on: http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 diff --git a/Minecraft.Client/Textures/Stitching/TextureMap.cpp b/Minecraft.Client/Textures/Stitching/TextureMap.cpp index a36517f94..3ee9794ff 100644 --- a/Minecraft.Client/Textures/Stitching/TextureMap.cpp +++ b/Minecraft.Client/Textures/Stitching/TextureMap.cpp @@ -58,7 +58,7 @@ void TextureMap::stitch() } // Collection bucket for multiple frames per texture - std::unordered_map * > textures; // = new HashMap>(); + std::unordered_map * > textures; // = new HashMap>(); Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name); @@ -74,9 +74,9 @@ void TextureMap::stitch() TextureHolder *missingHolder = new TextureHolder(missingTex); stitcher->addTexture(missingHolder); - vector *missingVec = new vector(); + std::vector *missingVec = new std::vector(); missingVec->push_back(missingTex); - textures.insert( std::unordered_map * >::value_type( missingHolder, missingVec )); + textures.insert( std::unordered_map * >::value_type( missingHolder, missingVec )); // Extract frames from textures and add them to the stitchers //for (final String name : texturesToRegister.keySet()) @@ -87,7 +87,7 @@ void TextureMap::stitch() std::wstring filename = path + name + extension; // TODO: [EB] Put the frames into a proper object, not this inside out hack - vector *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap); + std::vector *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap); if (frames == NULL || frames->empty()) { @@ -98,7 +98,7 @@ void TextureMap::stitch() stitcher->addTexture(holder); // Store frames - textures.insert( std::unordered_map * >::value_type( holder, frames ) ); + textures.insert( std::unordered_map * >::value_type( holder, frames ) ); } // Stitch! @@ -123,7 +123,7 @@ void TextureMap::stitch() Texture *texture = textureHolder->getTexture(); std::wstring textureName = texture->getName(); - vector *frames = textures.find(textureHolder)->second; + std::vector *frames = textures.find(textureHolder)->second; StitchedTexture *stored = NULL; diff --git a/Minecraft.Client/Textures/Stitching/TextureMap.h b/Minecraft.Client/Textures/Stitching/TextureMap.h index 73c35d1ff..03d1fc306 100644 --- a/Minecraft.Client/Textures/Stitching/TextureMap.h +++ b/Minecraft.Client/Textures/Stitching/TextureMap.h @@ -26,7 +26,7 @@ private: BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); StitchedTexture *missingPosition; Texture *stitchResult; - vector animatedTextures; // = new ArrayList(); + std::vector animatedTextures; // = new ArrayList(); stringStitchedTextureMap texturesToRegister; // = new HashMap(); diff --git a/Minecraft.Client/Textures/TextureManager.cpp b/Minecraft.Client/Textures/TextureManager.cpp index c8f2f3230..b2808e470 100644 --- a/Minecraft.Client/Textures/TextureManager.cpp +++ b/Minecraft.Client/Textures/TextureManager.cpp @@ -80,9 +80,9 @@ Stitcher *TextureManager::createStitcher(const std::wstring &name) return new Stitcher(name, maxTextureSize, maxTextureSize, true); } -vector *TextureManager::createTextures(const std::wstring &filename, bool mipmap) +std::vector *TextureManager::createTextures(const std::wstring &filename, bool mipmap) { - vector *result = new vector(); + std::vector *result = new std::vector(); TexturePack *texturePack = Minecraft::GetInstance()->skins->getSelected(); //try { int mode = Texture::TM_CONTAINER; // Most important -- so it doesn't get uploaded to videoram diff --git a/Minecraft.Client/Textures/TextureManager.h b/Minecraft.Client/Textures/TextureManager.h index c67ea151b..4fb859546 100644 --- a/Minecraft.Client/Textures/TextureManager.h +++ b/Minecraft.Client/Textures/TextureManager.h @@ -29,7 +29,7 @@ public: void registerTexture(Texture *texture); void unregisterTexture(const std::wstring &name, Texture *texture); Stitcher *createStitcher(const std::wstring &name); - vector *createTextures(const std::wstring &filename, bool mipmap); // 4J added mipmap param + std::vector *createTextures(const std::wstring &filename, bool mipmap); // 4J added mipmap param private: std::wstring getTextureNameFromPath(const std::wstring &filename); diff --git a/Minecraft.Client/UI/Font.cpp b/Minecraft.Client/UI/Font.cpp index 3b5e99d21..65c2bf2b6 100644 --- a/Minecraft.Client/UI/Font.cpp +++ b/Minecraft.Client/UI/Font.cpp @@ -362,7 +362,7 @@ void Font::drawWordWrap(const std::wstring &string, int x, int y, int w, int col void Font::drawWordWrapInternal(const std::wstring& string, int x, int y, int w, int col, bool darken, int h) { - vectorlines = stringSplit(string,L'\n'); + std::vectorlines = stringSplit(string,L'\n'); if (lines.size() > 1) { AUTO_VAR(itEnd, lines.end()); @@ -375,7 +375,7 @@ void Font::drawWordWrapInternal(const std::wstring& string, int x, int y, int w, } return; } - vector words = stringSplit(string,L' '); + std::vector words = stringSplit(string,L' '); unsigned int pos = 0; while (pos < words.size()) { @@ -413,7 +413,7 @@ void Font::drawWordWrapInternal(const std::wstring& string, int x, int y, int w, int Font::wordWrapHeight(const std::wstring& string, int w) { - vector lines = stringSplit(string,L'\n'); + std::vector lines = stringSplit(string,L'\n'); if (lines.size() > 1) { int h = 0; @@ -424,7 +424,7 @@ int Font::wordWrapHeight(const std::wstring& string, int w) } return h; } - vector words = stringSplit(string,L' '); + std::vector words = stringSplit(string,L' '); unsigned int pos = 0; int y = 0; while (pos < words.size()) diff --git a/Minecraft.Client/UI/Gui.h b/Minecraft.Client/UI/Gui.h index 3db5c4191..590947f0e 100644 --- a/Minecraft.Client/UI/Gui.h +++ b/Minecraft.Client/UI/Gui.h @@ -12,7 +12,7 @@ private: //static const int MAX_MESSAGE_WIDTH = 320; static const int m_iMaxMessageWidth = 280; static ItemRenderer *itemRenderer; - vector guiMessages[XUSER_MAX_COUNT]; + std::vector guiMessages[XUSER_MAX_COUNT]; Random *random; Minecraft *minecraft; diff --git a/Minecraft.Client/UI/Screen.h b/Minecraft.Client/UI/Screen.h index 324f4ca5c..554671f49 100644 --- a/Minecraft.Client/UI/Screen.h +++ b/Minecraft.Client/UI/Screen.h @@ -13,7 +13,7 @@ public: int width; int height; protected: - vector