refactor: begin unglobbing std::vector

This commit is contained in:
Tropical 2026-03-06 11:58:11 -06:00 committed by JuiceyDev
parent d2e8a0f9f5
commit 5fad08b9fd
286 changed files with 738 additions and 738 deletions

View file

@ -150,8 +150,8 @@ void StatsCounter::parse(void* data)
StatContainer newVal; StatContainer newVal;
//For each stat //For each stat
vector<Stat *>::iterator end = Stats::all->end(); std::vector<Stat *>::iterator end = Stats::all->end();
for( vector<Stat *>::iterator iter = Stats::all->begin() ; iter != end ; ++iter ) for( std::vector<Stat *>::iterator iter = Stats::all->begin() ; iter != end ; ++iter )
{ {
if( !(*iter)->isAchievement() ) if( !(*iter)->isAchievement() )
{ {
@ -230,8 +230,8 @@ void StatsCounter::save(int player, bool force)
//For each stat //For each stat
StatsMap::iterator val; StatsMap::iterator val;
vector<Stat *>::iterator end = Stats::all->end(); std::vector<Stat *>::iterator end = Stats::all->end();
for( vector<Stat *>::iterator iter = Stats::all->begin() ; iter != end ; ++iter ) for( std::vector<Stat *>::iterator iter = Stats::all->begin() ; iter != end ; ++iter )
{ {
//If the stat is in the map write out it's value //If the stat is in the map write out it's value
val = stats.find(*iter); val = stats.find(*iter);
@ -1283,8 +1283,8 @@ bool StatsCounter::isLargeStat(Stat* stat)
void StatsCounter::dumpStatsToTTY() void StatsCounter::dumpStatsToTTY()
{ {
vector<Stat*>::iterator statsEnd = Stats::all->end(); std::vector<Stat*>::iterator statsEnd = Stats::all->end();
for( vector<Stat*>::iterator statsIter = Stats::all->begin() ; statsIter!=statsEnd ; ++statsIter ) for( std::vector<Stat*>::iterator statsIter = Stats::all->begin() ; statsIter!=statsEnd ; ++statsIter )
{ {
app.DebugPrintf("%ls\t\t%u\t%u\t%u\t%u\n", app.DebugPrintf("%ls\t\t%u\t%u\t%u\t%u\n",
(*statsIter)->name.c_str(), (*statsIter)->name.c_str(),

View file

@ -117,7 +117,7 @@ void MultiPlayerLevel::tick()
PIXBeginNamedEvent(0,"Connection ticking"); PIXBeginNamedEvent(0,"Connection ticking");
// 4J HEG - Copy the connections vector to prevent crash when moving to Nether // 4J HEG - Copy the connections vector to prevent crash when moving to Nether
vector<ClientConnection *> connectionsTemp = connections; std::vector<ClientConnection *> connectionsTemp = connections;
for(AUTO_VAR(connection, connectionsTemp.begin()); connection < connectionsTemp.end(); ++connection ) for(AUTO_VAR(connection, connectionsTemp.begin()); connection < connectionsTemp.end(); ++connection )
{ {
(*connection)->tick(); (*connection)->tick();
@ -493,7 +493,7 @@ std::shared_ptr<Entity> MultiPlayerLevel::removeEntity(int id)
// 4J Added to remove the entities from the forced list // 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 // This gets called when a chunk is unloaded, but we only do half an unload to remove entities slightly differently
void MultiPlayerLevel::removeEntities(vector<std::shared_ptr<Entity> > *list) void MultiPlayerLevel::removeEntities(std::vector<std::shared_ptr<Entity> > *list)
{ {
for(AUTO_VAR(it, list->begin()); it < list->end(); ++it) 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++) //for (int i = 0; i < entities.size(); i++)
EnterCriticalSection(&m_entitiesCS); EnterCriticalSection(&m_entitiesCS);
vector<std::shared_ptr<Entity> >::iterator it = entities.begin(); std::vector<std::shared_ptr<Entity> >::iterator it = entities.begin();
while( it != entities.end() ) while( it != entities.end() )
{ {
std::shared_ptr<Entity> e = *it;//entities.at(i); std::shared_ptr<Entity> e = *it;//entities.at(i);

View file

@ -22,7 +22,7 @@ private:
ResetInfo(int x, int y, int z, int tile, int data); ResetInfo(int x, int y, int z, int tile, int data);
}; };
vector<ResetInfo> updatesToReset; // 4J - was linked list but vector seems more appropriate std::vector<ResetInfo> updatesToReset; // 4J - was linked list but vector seems more appropriate
bool m_bEnableResetChanges; // 4J Added bool m_bEnableResetChanges; // 4J Added
public: public:
void unshareChunkAt(int x, int z); // 4J - added void unshareChunkAt(int x, int z); // 4J - added
@ -34,7 +34,7 @@ private:
int unshareCheckZ; // 4J - added int unshareCheckZ; // 4J - added
int compressCheckX; // 4J - added int compressCheckX; // 4J - added
int compressCheckZ; // 4J - added int compressCheckZ; // 4J - added
vector<ClientConnection *> connections; // 4J Stu - Made this a vector as we can have more than one local connection std::vector<ClientConnection *> connections; // 4J Stu - Made this a vector as we can have more than one local connection
MultiPlayerChunkCache *chunkCache; MultiPlayerChunkCache *chunkCache;
Minecraft *minecraft; Minecraft *minecraft;
@ -68,7 +68,7 @@ public:
void putEntity(int id, std::shared_ptr<Entity> e); void putEntity(int id, std::shared_ptr<Entity> e);
std::shared_ptr<Entity> getEntity(int id); std::shared_ptr<Entity> getEntity(int id);
std::shared_ptr<Entity> removeEntity(int id); std::shared_ptr<Entity> removeEntity(int id);
virtual void removeEntities(vector<std::shared_ptr<Entity> > *list); // 4J Added override virtual void removeEntities(std::vector<std::shared_ptr<Entity> > *list); // 4J Added override
virtual bool setDataNoUpdate(int x, int y, int z, int data); 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 setTileAndDataNoUpdate(int x, int y, int z, int tile, int data);
virtual bool setTileNoUpdate(int x, int y, int z, int tile); virtual bool setTileNoUpdate(int x, int y, int z, int tile);

View file

@ -277,10 +277,10 @@ void ServerLevel::tick()
Biome::MobSpawnerData *ServerLevel::getRandomMobSpawnAt(MobCategory *mobCategory, int x, int y, int z) Biome::MobSpawnerData *ServerLevel::getRandomMobSpawnAt(MobCategory *mobCategory, int x, int y, int z)
{ {
vector<Biome::MobSpawnerData *> *mobList = getChunkSource()->getMobsAt(mobCategory, x, y, z); std::vector<Biome::MobSpawnerData *> *mobList = getChunkSource()->getMobsAt(mobCategory, x, y, z);
if (mobList == NULL || mobList->empty()) return NULL; if (mobList == NULL || mobList->empty()) return NULL;
return (Biome::MobSpawnerData *) WeighedRandom::getRandomItem(random, (vector<WeighedRandomItem *> *)mobList); return (Biome::MobSpawnerData *) WeighedRandom::getRandomItem(random, (std::vector<WeighedRandomItem *> *)mobList);
} }
void ServerLevel::updateSleepingPlayerList() void ServerLevel::updateSleepingPlayerList()
@ -289,7 +289,7 @@ void ServerLevel::updateSleepingPlayerList()
m_bAtLeastOnePlayerSleeping = false; m_bAtLeastOnePlayerSleeping = false;
AUTO_VAR(itEnd, players.end()); AUTO_VAR(itEnd, players.end());
for (vector<std::shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++) for (std::vector<std::shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++)
{ {
if (!(*it)->isSleeping()) if (!(*it)->isSleeping())
{ {
@ -310,7 +310,7 @@ void ServerLevel::awakenAllPlayers()
m_bAtLeastOnePlayerSleeping = false; m_bAtLeastOnePlayerSleeping = false;
AUTO_VAR(itEnd, players.end()); AUTO_VAR(itEnd, players.end());
for (vector<std::shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++) for (std::vector<std::shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++)
{ {
if ((*it)->isSleeping()) if ((*it)->isSleeping())
{ {
@ -335,7 +335,7 @@ bool ServerLevel::allPlayersAreSleeping()
{ {
// all players are sleeping, but have they slept long enough? // all players are sleeping, but have they slept long enough?
AUTO_VAR(itEnd, players.end()); AUTO_VAR(itEnd, players.end());
for (vector<std::shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++ ) for (std::vector<std::shared_ptr<Player> >::iterator it = players.begin(); it != itEnd; it++ )
{ {
// System.out.println(player->entityId + ": " + player->getSleepTimer()); // System.out.println(player->entityId + ": " + player->getSleepTimer());
if (! (*it)->isSleepingLongEnough()) if (! (*it)->isSleepingLongEnough())
@ -625,10 +625,10 @@ bool ServerLevel::tickPendingTicks(bool force)
return retval; return retval;
} }
vector<TickNextTickData> *ServerLevel::fetchTicksInChunk(LevelChunk *chunk, bool remove) std::vector<TickNextTickData> *ServerLevel::fetchTicksInChunk(LevelChunk *chunk, bool remove)
{ {
EnterCriticalSection(&m_tickNextTickCS); EnterCriticalSection(&m_tickNextTickCS);
vector<TickNextTickData> *results = new vector<TickNextTickData>; std::vector<TickNextTickData> *results = new std::vector<TickNextTickData>;
ChunkPos *pos = chunk->getPos(); ChunkPos *pos = chunk->getPos();
int west = pos->x << 4; int west = pos->x << 4;
@ -693,9 +693,9 @@ ChunkSource *ServerLevel::createChunkSource()
return cache; return cache;
} }
vector<std::shared_ptr<TileEntity> > *ServerLevel::getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1) std::vector<std::shared_ptr<TileEntity> > *ServerLevel::getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1)
{ {
vector<std::shared_ptr<TileEntity> > *result = new vector<std::shared_ptr<TileEntity> >; std::vector<std::shared_ptr<TileEntity> > *result = new std::vector<std::shared_ptr<TileEntity> >;
for (unsigned int i = 0; i < tileEntityList.size(); i++) for (unsigned int i = 0; i < tileEntityList.size(); i++)
{ {
std::shared_ptr<TileEntity> te = tileEntityList[i]; std::shared_ptr<TileEntity> te = tileEntityList[i];
@ -750,7 +750,7 @@ void ServerLevel::setInitialSpawn(LevelSettings *levelSettings)
isFindingSpawn = true; isFindingSpawn = true;
BiomeSource *biomeSource = dimension->biomeSource; BiomeSource *biomeSource = dimension->biomeSource;
vector<Biome *> playerSpawnBiomes = biomeSource->getPlayerSpawnBiomes(); std::vector<Biome *> playerSpawnBiomes = biomeSource->getPlayerSpawnBiomes();
Random random(getSeed()); Random random(getSeed());
TilePos *findBiome = biomeSource->findBiome(0, 0, 16 * 16, playerSpawnBiomes, &random); 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 // 4J Stu - This will come in a later change anyway
// clean cache // clean cache
vector<LevelChunk *> *loadedChunkList = cache->getLoadedChunkList(); std::vector<LevelChunk *> *loadedChunkList = cache->getLoadedChunkList();
for (AUTO_VAR(it, loadedChunkList->begin()); it != loadedChunkList->end(); ++it) for (AUTO_VAR(it, loadedChunkList->begin()); it != loadedChunkList->end(); ++it)
{ {
LevelChunk *lc = *it; LevelChunk *lc = *it;
@ -952,7 +952,7 @@ void ServerLevel::entityAdded(std::shared_ptr<Entity> e)
{ {
Level::entityAdded(e); Level::entityAdded(e);
entitiesById[e->entityId] = e; entitiesById[e->entityId] = e;
vector<std::shared_ptr<Entity> > *es = e->getSubEntities(); std::vector<std::shared_ptr<Entity> > *es = e->getSubEntities();
if (es != NULL) if (es != NULL)
{ {
//for (int i = 0; i < es.length; i++) //for (int i = 0; i < es.length; i++)
@ -968,7 +968,7 @@ void ServerLevel::entityRemoved(std::shared_ptr<Entity> e)
{ {
Level::entityRemoved(e); Level::entityRemoved(e);
entitiesById.erase(e->entityId); entitiesById.erase(e->entityId);
vector<std::shared_ptr<Entity> > *es = e->getSubEntities(); std::vector<std::shared_ptr<Entity> > *es = e->getSubEntities();
if (es != NULL) if (es != NULL)
{ {
//for (int i = 0; i < es.length; i++) //for (int i = 0; i < es.length; i++)
@ -1016,7 +1016,7 @@ std::shared_ptr<Explosion> ServerLevel::explode(std::shared_ptr<Entity> source,
explosion->toBlow.clear(); explosion->toBlow.clear();
} }
vector<std::shared_ptr<ServerPlayer> > sentTo; std::vector<std::shared_ptr<ServerPlayer> > sentTo;
for(AUTO_VAR(it, players.begin()); it != players.end(); ++it) for(AUTO_VAR(it, players.begin()); it != players.end(); ++it)
{ {
std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(*it); std::shared_ptr<ServerPlayer> player = dynamic_pointer_cast<ServerPlayer>(*it);
@ -1144,7 +1144,7 @@ void ServerLevel::setTimeAndAdjustTileTicks(__int64 newTime)
__int64 delta = newTime - levelData->getTime(); __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. // 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. // Instead move to a vector, do the adjustment, put back in the set.
vector<TickNextTickData> temp; std::vector<TickNextTickData> temp;
for(AUTO_VAR(it, tickNextTickList.begin()); it != tickNextTickList.end(); ++it) for(AUTO_VAR(it, tickNextTickList.begin()); it != tickNextTickList.end(); ++it)
{ {
temp.push_back(*it); temp.push_back(*it);

View file

@ -21,7 +21,7 @@ private:
set<TickNextTickData, TickNextTickDataKeyCompare> tickNextTickList; // 4J Was TreeSet set<TickNextTickData, TickNextTickDataKeyCompare> tickNextTickList; // 4J Was TreeSet
unordered_set<TickNextTickData, TickNextTickDataKeyHash, TickNextTickDataKeyEq> tickNextTickSet; // 4J Was HashSet unordered_set<TickNextTickData, TickNextTickDataKeyHash, TickNextTickDataKeyEq> tickNextTickSet; // 4J Was HashSet
vector<Pos *> m_queuedSendTileUpdates; // 4J added std::vector<Pos *> m_queuedSendTileUpdates; // 4J added
CRITICAL_SECTION m_csQueueSendTileUpdates; CRITICAL_SECTION m_csQueueSendTileUpdates;
protected: protected:
@ -37,7 +37,7 @@ private:
bool m_bAtLeastOnePlayerSleeping; // 4J Added bool m_bAtLeastOnePlayerSleeping; // 4J Added
static WeighedTreasureArray RANDOM_BONUS_ITEMS; // 4J - brought forward from 1.3.2 static WeighedTreasureArray RANDOM_BONUS_ITEMS; // 4J - brought forward from 1.3.2
vector<TileEventData> tileEvents[2]; std::vector<TileEventData> tileEvents[2];
int activeTileEventsList; int activeTileEventsList;
public: public:
static void staticCtor(); static void staticCtor();
@ -64,7 +64,7 @@ public:
void forceAddTileTick(int x, int y, int z, int tileId, int tickDelay); void forceAddTileTick(int x, int y, int z, int tileId, int tickDelay);
void tickEntities(); void tickEntities();
bool tickPendingTicks(bool force); bool tickPendingTicks(bool force);
vector<TickNextTickData> *fetchTicksInChunk(LevelChunk *chunk, bool remove); std::vector<TickNextTickData> *fetchTicksInChunk(LevelChunk *chunk, bool remove);
virtual void tick(std::shared_ptr<Entity> e, bool actual); virtual void tick(std::shared_ptr<Entity> e, bool actual);
void forceTick(std::shared_ptr<Entity> e, bool actual); void forceTick(std::shared_ptr<Entity> e, bool actual);
bool AllPlayersAreSleeping() { return allPlayersSleeping;} // 4J added for a message to other players bool AllPlayersAreSleeping() { return allPlayersSleeping;} // 4J added for a message to other players
@ -72,7 +72,7 @@ public:
protected: protected:
ChunkSource *createChunkSource(); // 4J - was virtual, but was called from parent ctor ChunkSource *createChunkSource(); // 4J - was virtual, but was called from parent ctor
public: public:
vector<std::shared_ptr<TileEntity> > *getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1); std::vector<std::shared_ptr<TileEntity> > *getTileEntitiesInRegion(int x0, int y0, int z0, int x1, int y1, int z1);
virtual bool mayInteract(std::shared_ptr<Player> player, int xt, int yt, int zt, int id); virtual bool mayInteract(std::shared_ptr<Player> player, int xt, int yt, int zt, int id);
protected: protected:
virtual void initializeLevel(LevelSettings *settings); virtual void initializeLevel(LevelSettings *settings);

View file

@ -331,8 +331,8 @@ public:
Level *animateTickLevel; // 4J added Level *animateTickLevel; // 4J added
// 4J - When a client requests a texture, it should add it to here while we are waiting for it // 4J - When a client requests a texture, it should add it to here while we are waiting for it
vector<std::wstring> m_pendingTextureRequests; std::vector<std::wstring> m_pendingTextureRequests;
vector<std::wstring> m_pendingGeometryRequests; // additional skin box geometry std::vector<std::wstring> m_pendingGeometryRequests; // additional skin box geometry
// 4J Added // 4J Added
bool addPendingClientTextureRequest(const std::wstring &textureName); bool addPendingClientTextureRequest(const std::wstring &textureName);

View file

@ -1440,7 +1440,7 @@ void MinecraftServer::broadcastStopSavingPacket()
void MinecraftServer::tick() void MinecraftServer::tick()
{ {
vector<std::wstring> toRemove; std::vector<std::wstring> toRemove;
for (AUTO_VAR(it, ironTimers.begin()); it != ironTimers.end(); it++ ) for (AUTO_VAR(it, ironTimers.begin()); it != ironTimers.end(); it++ )
{ {
int t = it->second; int t = it->second;

View file

@ -96,9 +96,9 @@ public:
std::wstring progressStatus; std::wstring progressStatus;
int progress; int progress;
private: private:
// vector<Tickable *> tickables = new ArrayList<Tickable>(); // 4J - removed // std::vector<Tickable *> tickables = new ArrayList<Tickable>(); // 4J - removed
CommandDispatcher *commandDispatcher; CommandDispatcher *commandDispatcher;
vector<ConsoleInput *> consoleInput; // 4J - was synchronizedList - TODO - investigate std::vector<ConsoleInput *> consoleInput; // 4J - was synchronizedList - TODO - investigate
public: public:
bool onlineMode; bool onlineMode;
bool animals; bool animals;
@ -204,7 +204,7 @@ private:
ChunkSource *chunkSource; ChunkSource *chunkSource;
postProcessRequest(int x, int z, ChunkSource *chunkSource) : x(x), z(z), chunkSource(chunkSource) {} postProcessRequest(int x, int z, ChunkSource *chunkSource) : x(x), z(z), chunkSource(chunkSource) {}
}; };
vector<postProcessRequest> m_postProcessRequests; std::vector<postProcessRequest> m_postProcessRequests;
CRITICAL_SECTION m_postProcessCS; CRITICAL_SECTION m_postProcessCS;
public: public:
void addPostProcessRequest(ChunkSource *chunkSource, int x, int z); void addPostProcessRequest(ChunkSource *chunkSource, int x, int z);

View file

@ -609,7 +609,7 @@ void ClientConnection::handleAddEntity(std::shared_ptr<AddEntityPacket> packet)
e->xRot = 0.0f; e->xRot = 0.0f;
} }
vector<std::shared_ptr<Entity> > *subEntities = e->getSubEntities(); std::vector<std::shared_ptr<Entity> > *subEntities = e->getSubEntities();
if (subEntities != NULL) if (subEntities != NULL)
{ {
int offs = packet->id - e->entityId; int offs = packet->id - e->entityId;
@ -811,7 +811,7 @@ void ClientConnection::handleAddPlayer(std::shared_ptr<AddPlayerPacket> packet)
level->putEntity(packet->id, player); level->putEntity(packet->id, player);
vector<std::shared_ptr<SynchedEntityData::DataItem> > *unpackedData = packet->getUnpackedData(); std::vector<std::shared_ptr<SynchedEntityData::DataItem> > *unpackedData = packet->getUnpackedData();
if (unpackedData != NULL) if (unpackedData != NULL)
{ {
player->getEntityData()->assignValues(unpackedData); player->getEntityData()->assignValues(unpackedData);
@ -2118,7 +2118,7 @@ void ClientConnection::handleAddMob(std::shared_ptr<AddMobPacket> packet)
mob->yRotp = packet->yRot; mob->yRotp = packet->yRot;
mob->xRotp = packet->xRot; mob->xRotp = packet->xRot;
vector<std::shared_ptr<Entity> > *subEntities = mob->getSubEntities(); std::vector<std::shared_ptr<Entity> > *subEntities = mob->getSubEntities();
if (subEntities != NULL) if (subEntities != NULL)
{ {
int offs = packet->id - mob->entityId; int offs = packet->id - mob->entityId;
@ -2140,7 +2140,7 @@ void ClientConnection::handleAddMob(std::shared_ptr<AddMobPacket> packet)
mob->zd = packet->zd / 8000.0f; mob->zd = packet->zd / 8000.0f;
level->putEntity(packet->id, mob); level->putEntity(packet->id, mob);
vector<std::shared_ptr<SynchedEntityData::DataItem> > *unpackedData = packet->getUnpackedData(); std::vector<std::shared_ptr<SynchedEntityData::DataItem> > *unpackedData = packet->getUnpackedData();
if (unpackedData != NULL) if (unpackedData != NULL)
{ {
mob->getEntityData()->assignValues(unpackedData); mob->getEntityData()->assignValues(unpackedData);

View file

@ -275,7 +275,7 @@ void MultiPlayerChunkCache::postProcess(ChunkSource *parent, int x, int z)
{ {
} }
vector<Biome::MobSpawnerData *> *MultiPlayerChunkCache::getMobsAt(MobCategory *mobCategory, int x, int y, int z) std::vector<Biome::MobSpawnerData *> *MultiPlayerChunkCache::getMobsAt(MobCategory *mobCategory, int x, int y, int z)
{ {
return NULL; return NULL;
} }

View file

@ -14,7 +14,7 @@ private:
LevelChunk *emptyChunk; LevelChunk *emptyChunk;
LevelChunk *waterChunk; LevelChunk *waterChunk;
vector<LevelChunk *> loadedChunkList; std::vector<LevelChunk *> loadedChunkList;
LevelChunk **cache; LevelChunk **cache;
// 4J - added for multithreaded support // 4J - added for multithreaded support
@ -39,7 +39,7 @@ public:
virtual bool shouldSave(); virtual bool shouldSave();
virtual void postProcess(ChunkSource *parent, int x, int z); virtual void postProcess(ChunkSource *parent, int x, int z);
virtual std::wstring gatherStats(); virtual std::wstring gatherStats();
virtual vector<Biome::MobSpawnerData *> *getMobsAt(MobCategory *mobCategory, int x, int y, int z); virtual std::vector<Biome::MobSpawnerData *> *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 TilePos *findNearestMapFeature(Level *level, const std::wstring &featureName, int x, int y, int z);
virtual void dataReceived(int x, int z); // 4J added virtual void dataReceived(int x, int z); // 4J added

View file

@ -183,7 +183,7 @@ void PlayerChunkMap::PlayerChunk::prioritiseTileChanges()
void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr<Packet> packet) void PlayerChunkMap::PlayerChunk::broadcast(std::shared_ptr<Packet> packet)
{ {
vector< std::shared_ptr<ServerPlayer> > sentTo; std::vector< std::shared_ptr<ServerPlayer> > sentTo;
for (unsigned int i = 0; i < players.size(); i++) for (unsigned int i = 0; i < players.size(); i++)
{ {
std::shared_ptr<ServerPlayer> player = players[i]; std::shared_ptr<ServerPlayer> player = players[i];
@ -330,7 +330,7 @@ bool PlayerChunkMap::PlayerChunk::broadcastChanges(bool allowRegionUpdate)
if( ys > 256 ) ys = 256; if( ys > 256 ) ys = 256;
broadcast( std::shared_ptr<BlockRegionUpdatePacket>( new BlockRegionUpdatePacket(xp, yp, zp, xs, ys, zs, level) ) ); broadcast( std::shared_ptr<BlockRegionUpdatePacket>( new BlockRegionUpdatePacket(xp, yp, zp, xs, ys, zs, level) ) );
vector<std::shared_ptr<TileEntity> > *tes = level->getTileEntitiesInRegion(xp, yp, zp, xp + xs, yp + ys, zp + zs); std::vector<std::shared_ptr<TileEntity> > *tes = level->getTileEntitiesInRegion(xp, yp, zp, xp + xs, yp + ys, zp + zs);
for (unsigned int i = 0; i < tes->size(); i++) for (unsigned int i = 0; i < tes->size(); i++)
{ {
broadcast(tes->at(i)); broadcast(tes->at(i));

View file

@ -34,7 +34,7 @@ public:
friend class PlayerChunkMap; friend class PlayerChunkMap;
private: private:
PlayerChunkMap *parent; // 4J added PlayerChunkMap *parent; // 4J added
vector<std::shared_ptr<ServerPlayer> > players; std::vector<std::shared_ptr<ServerPlayer> > players;
//int x, z; //int x, z;
ChunkPos pos; ChunkPos pos;
@ -63,12 +63,12 @@ public:
}; };
public: public:
vector<std::shared_ptr<ServerPlayer> > players; std::vector<std::shared_ptr<ServerPlayer> > players;
void flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFound); // 4J added void flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFound); // 4J added
private: private:
std::unordered_map<__int64,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap std::unordered_map<__int64,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap
vector<PlayerChunk *> changedChunks; std::vector<PlayerChunk *> changedChunks;
vector<PlayerChunkAddRequest> addRequests; // 4J added std::vector<PlayerChunkAddRequest> addRequests; // 4J added
void tickAddRequests(std::shared_ptr<ServerPlayer> player); // 4J added void tickAddRequests(std::shared_ptr<ServerPlayer> player); // 4J added
ServerLevel *level; ServerLevel *level;

View file

@ -858,7 +858,7 @@ void PlayerConnection::handleTextureAndGeometry(std::shared_ptr<TextureAndGeomet
else else
{ {
// we don't have the dlc skin, so retrieve the data from the app store // we don't have the dlc skin, so retrieve the data from the app store
vector<SKIN_BOX *> *pvSkinBoxes = app.GetAdditionalSkinBoxes(packet->dwSkinID); std::vector<SKIN_BOX *> *pvSkinBoxes = app.GetAdditionalSkinBoxes(packet->dwSkinID);
unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(packet->dwSkinID); unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(packet->dwSkinID);
send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(packet->textureName,pbData,dwTextureBytes,pvSkinBoxes,uiAnimOverrideBitmask) ) ); send( std::shared_ptr<TextureAndGeometryPacket>( 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 // get the data from the app
DWORD dwSkinID = app.getSkinIdFromPath(textureName); DWORD dwSkinID = app.getSkinIdFromPath(textureName);
vector<SKIN_BOX *> *pvSkinBoxes = app.GetAdditionalSkinBoxes(dwSkinID); std::vector<SKIN_BOX *> *pvSkinBoxes = app.GetAdditionalSkinBoxes(dwSkinID);
unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(dwSkinID); unsigned int uiAnimOverrideBitmask= app.GetAnimOverrideBitmask(dwSkinID);
send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes, pvSkinBoxes, uiAnimOverrideBitmask) ) ); send( std::shared_ptr<TextureAndGeometryPacket>( new TextureAndGeometryPacket(textureName,pbData,dwTextureBytes, pvSkinBoxes, uiAnimOverrideBitmask) ) );
@ -1146,7 +1146,7 @@ void PlayerConnection::handleContainerClick(std::shared_ptr<ContainerClickPacket
player->connection->send( std::shared_ptr<ContainerAckPacket>( new ContainerAckPacket(packet->containerId, packet->uid, false) ) ); player->connection->send( std::shared_ptr<ContainerAckPacket>( new ContainerAckPacket(packet->containerId, packet->uid, false) ) );
player->containerMenu->setSynched(player, false); player->containerMenu->setSynched(player, false);
vector<std::shared_ptr<ItemInstance> > items; std::vector<std::shared_ptr<ItemInstance> > items;
for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++) for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++)
{ {
items.push_back(player->containerMenu->slots->at(i)->getItem()); items.push_back(player->containerMenu->slots->at(i)->getItem());
@ -1244,7 +1244,7 @@ void PlayerConnection::handleSetCreativeModeSlot(std::shared_ptr<SetCreativeMode
{ {
// 4J Stu - Maps need to have their aux value update, so the client should always be assumed to be wrong // 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 // This is how the Java works, as the client also incorrectly predicts the auxvalue of the mapItem
vector<std::shared_ptr<ItemInstance> > items; std::vector<std::shared_ptr<ItemInstance> > items;
for (unsigned int i = 0; i < player->inventoryMenu->slots->size(); i++) for (unsigned int i = 0; i < player->inventoryMenu->slots->size(); i++)
{ {
items.push_back(player->inventoryMenu->slots->at(i)->getItem()); items.push_back(player->inventoryMenu->slots->at(i)->getItem());
@ -1586,7 +1586,7 @@ void PlayerConnection::handleCraftItem(std::shared_ptr<CraftItemPacket> packet)
{ {
// 4J Stu - Maps need to have their aux value update, so the client should always be assumed to be wrong // 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 // This is how the Java works, as the client also incorrectly predicts the auxvalue of the mapItem
vector<std::shared_ptr<ItemInstance> > items; std::vector<std::shared_ptr<ItemInstance> > items;
for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++) for (unsigned int i = 0; i < player->containerMenu->slots->size(); i++)
{ {
items.push_back(player->containerMenu->slots->at(i)->getItem()); items.push_back(player->containerMenu->slots->at(i)->getItem());

View file

@ -133,7 +133,7 @@ public:
private: private:
bool m_bCloseOnTick; bool m_bCloseOnTick;
vector<std::wstring> m_texturesRequested; std::vector<std::wstring> m_texturesRequested;
bool m_bWasKicked; bool m_bWasKicked;
}; };

View file

@ -618,7 +618,7 @@ std::shared_ptr<ServerPlayer> PlayerList::respawn(std::shared_ptr<ServerPlayer>
if(keepAllPlayerData) if(keepAllPlayerData)
{ {
vector<MobEffectInstance *> *activeEffects = player->getActiveEffects(); std::vector<MobEffectInstance *> *activeEffects = player->getActiveEffects();
for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it)
{ {
MobEffectInstance *effect = *it; MobEffectInstance *effect = *it;
@ -811,7 +811,7 @@ void PlayerList::toggleDimension(std::shared_ptr<ServerPlayer> player, int targe
player->connection->teleport(player->x, player->y, player->z, player->yRot, player->xRot); 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 // 4J Stu - Fix for #64683 - Customer Encountered: TU7: Content: Gameplay: Potion effects are removed after using the Nether Portal
vector<MobEffectInstance *> *activeEffects = player->getActiveEffects(); std::vector<MobEffectInstance *> *activeEffects = player->getActiveEffects();
for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it)
{ {
MobEffectInstance *effect = *it; MobEffectInstance *effect = *it;
@ -1034,7 +1034,7 @@ void PlayerList::broadcast(std::shared_ptr<Player> 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 // 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 // machine either
vector< std::shared_ptr<ServerPlayer> > sentTo; std::vector< std::shared_ptr<ServerPlayer> > sentTo;
if( except != NULL ) if( except != NULL )
{ {
sentTo.push_back(dynamic_pointer_cast<ServerPlayer>(except)); sentTo.push_back(dynamic_pointer_cast<ServerPlayer>(except));

View file

@ -22,14 +22,14 @@ private:
static const int SEND_PLAYER_INFO_INTERVAL = 20 * 10; // 4J - brought forward from 1.2.3 static const int SEND_PLAYER_INFO_INTERVAL = 20 * 10; // 4J - brought forward from 1.2.3
// public static Logger logger = Logger.getLogger("Minecraft"); // public static Logger logger = Logger.getLogger("Minecraft");
public: public:
vector<std::shared_ptr<ServerPlayer> > players; std::vector<std::shared_ptr<ServerPlayer> > players;
private: private:
MinecraftServer *server; MinecraftServer *server;
unsigned int maxPlayers; unsigned int maxPlayers;
// 4J Added // 4J Added
vector<PlayerUID> m_bannedXuids; std::vector<PlayerUID> m_bannedXuids;
deque<BYTE> m_smallIdsToKick; deque<BYTE> m_smallIdsToKick;
CRITICAL_SECTION m_kickPlayersCS; CRITICAL_SECTION m_kickPlayersCS;
deque<BYTE> m_smallIdsToClose; deque<BYTE> m_smallIdsToClose;
@ -51,7 +51,7 @@ private:
int sendAllPlayerInfoIn; int sendAllPlayerInfoIn;
// 4J Added to maintain which players in which dimensions can receive all packet types // 4J Added to maintain which players in which dimensions can receive all packet types
vector<std::shared_ptr<ServerPlayer> > receiveAllPlayers[3]; std::vector<std::shared_ptr<ServerPlayer> > receiveAllPlayers[3];
private: private:
std::shared_ptr<ServerPlayer> findAlivePlayerOnSystem(std::shared_ptr<ServerPlayer> currentPlayer); std::shared_ptr<ServerPlayer> findAlivePlayerOnSystem(std::shared_ptr<ServerPlayer> currentPlayer);

View file

@ -74,7 +74,7 @@ bool ServerChunkCache::hasChunk(int x, int z)
return true; return true;
} }
vector<LevelChunk *> *ServerChunkCache::getLoadedChunkList() std::vector<LevelChunk *> *ServerChunkCache::getLoadedChunkList()
{ {
return &m_loadedChunkList; 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. // 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. // This is to minimise the amount of data that needs to be moved round when creating a new level.
vector<LevelChunk *> sortedChunkList; std::vector<LevelChunk *> sortedChunkList;
for( int i = 0; i < m_loadedChunkList.size(); i++ ) 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. // 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. // This is to minimise the amount of data that needs to be moved round when creating a new level.
vector<LevelChunk *> sortedChunkList; std::vector<LevelChunk *> sortedChunkList;
for( int i = 0; i < m_loadedChunkList.size(); i++ ) for( int i = 0; i < m_loadedChunkList.size(); i++ )
{ {
@ -902,7 +902,7 @@ std::wstring ServerChunkCache::gatherStats()
return L"ServerChunkCache: ";// + _toString<int>(loadedChunks.size()) + L" Drop: " + _toString<int>(toDrop.size()); return L"ServerChunkCache: ";// + _toString<int>(loadedChunks.size()) + L" Drop: " + _toString<int>(toDrop.size());
} }
vector<Biome::MobSpawnerData *> *ServerChunkCache::getMobsAt(MobCategory *mobCategory, int x, int y, int z) std::vector<Biome::MobSpawnerData *> *ServerChunkCache::getMobsAt(MobCategory *mobCategory, int x, int y, int z)
{ {
return source->getMobsAt(mobCategory, x, y, z); return source->getMobsAt(mobCategory, x, y, z);
} }

View file

@ -21,7 +21,7 @@ public:
bool autoCreate; bool autoCreate;
private: private:
LevelChunk **cache; LevelChunk **cache;
vector<LevelChunk *> m_loadedChunkList; std::vector<LevelChunk *> m_loadedChunkList;
ServerLevel *level; ServerLevel *level;
#ifdef _LARGE_WORLDS #ifdef _LARGE_WORLDS
@ -39,7 +39,7 @@ public:
ServerChunkCache(ServerLevel *level, ChunkStorage *storage, ChunkSource *source); ServerChunkCache(ServerLevel *level, ChunkStorage *storage, ChunkSource *source);
virtual ~ServerChunkCache(); virtual ~ServerChunkCache();
virtual bool hasChunk(int x, int z); virtual bool hasChunk(int x, int z);
vector<LevelChunk *> *getLoadedChunkList(); std::vector<LevelChunk *> *getLoadedChunkList();
void drop(int x, int z); void drop(int x, int z);
void dropAll(); void dropAll();
virtual LevelChunk *create(int x, int z); virtual LevelChunk *create(int x, int z);
@ -82,7 +82,7 @@ public:
virtual bool shouldSave(); virtual bool shouldSave();
virtual std::wstring gatherStats(); virtual std::wstring gatherStats();
virtual vector<Biome::MobSpawnerData *> *getMobsAt(MobCategory *mobCategory, int x, int y, int z); virtual std::vector<Biome::MobSpawnerData *> *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 TilePos *findNearestMapFeature(Level *level, const std::wstring &featureName, int x, int y, int z);
private: private:

View file

@ -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) // 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); EnterCriticalSection(&pending_cs);
vector< std::shared_ptr<PendingConnection> > tempPending = pending; std::vector< std::shared_ptr<PendingConnection> > tempPending = pending;
LeaveCriticalSection(&pending_cs); LeaveCriticalSection(&pending_cs);
for (unsigned int i = 0; i < tempPending.size(); i++) for (unsigned int i = 0; i < tempPending.size(); i++)

View file

@ -20,11 +20,11 @@ private:
int connectionCounter; int connectionCounter;
private: private:
CRITICAL_SECTION pending_cs; // 4J added CRITICAL_SECTION pending_cs; // 4J added
vector< std::shared_ptr<PendingConnection> > pending; std::vector< std::shared_ptr<PendingConnection> > pending;
vector< std::shared_ptr<PlayerConnection> > players; std::vector< std::shared_ptr<PlayerConnection> > players;
// 4J - When the server requests a texture, it should add it to here while we are waiting for it // 4J - When the server requests a texture, it should add it to here while we are waiting for it
vector<std::wstring> m_pendingTextureRequests; std::vector<std::wstring> m_pendingTextureRequests;
public: public:
MinecraftServer *server; MinecraftServer *server;

View file

@ -559,7 +559,7 @@ int CConsoleMinecraftApp::Callback_TMSPPRetrieveFileList(void *pParam,int iPad,
app.DebugPrintf("CConsoleMinecraftApp::Callback_TMSPPRetrieveFileList\n"); app.DebugPrintf("CConsoleMinecraftApp::Callback_TMSPPRetrieveFileList\n");
if(lpvData!=NULL) if(lpvData!=NULL)
{ {
vector<C4JStorage::PTMSPP_FILE_DETAILS> *pvTmsFileDetails=(vector<C4JStorage::PTMSPP_FILE_DETAILS> *)lpvData; std::vector<C4JStorage::PTMSPP_FILE_DETAILS> *pvTmsFileDetails=(std::vector<C4JStorage::PTMSPP_FILE_DETAILS> *)lpvData;
if(pvTmsFileDetails->size()>0) if(pvTmsFileDetails->size()>0)
{ {

View file

@ -490,7 +490,7 @@ void DurangoLeaderboardManager::runLeaderboardRequest(WF::IAsyncOperation<MXSL::
if(m_readCount > 0) if(m_readCount > 0)
{ {
vector<PlayerUID> xuids = vector<PlayerUID>(); std::vector<PlayerUID> xuids = std::vector<PlayerUID>();
for(int i = 0; i < lastResult->Rows->Size; i++) for(int i = 0; i < lastResult->Rows->Size; i++)
{ {
xuids.push_back(PlayerUID(lastResult->Rows->GetAt(i)->XboxUserId->Data())); xuids.push_back(PlayerUID(lastResult->Rows->GetAt(i)->XboxUserId->Data()));
@ -585,7 +585,7 @@ void DurangoLeaderboardManager::GetProfilesCallback(LPVOID param, std::vector<Mi
if (profiles.size() > 0) if (profiles.size() > 0)
{ {
dlm->m_displayNames = vector<std::wstring>(); dlm->m_displayNames = std::vector<std::wstring>();
for (int i = 0; i < profiles.size(); i++) for (int i = 0; i < profiles.size(); i++)
{ {
dlm->m_displayNames.push_back(profiles[i]->GameDisplayName->Data()); dlm->m_displayNames.push_back(profiles[i]->GameDisplayName->Data());

View file

@ -20,7 +20,7 @@ StatParam::StatParam(const std::wstring &base)
{ {
m_base = base; m_base = base;
//m_numArgs = numArgs; //m_numArgs = numArgs;
m_args = vector<int>(); m_args = std::vector<int>();
unsigned int count=0; unsigned int count=0;
std::wstring::size_type pos =base.find(L"*"); std::wstring::size_type pos =base.find(L"*");
@ -46,9 +46,9 @@ void StatParam::addArgs(int v1, ...)
va_end(argptr); va_end(argptr);
} }
vector<std::wstring> *StatParam::getStats() std::vector<std::wstring> *StatParam::getStats()
{ {
vector<std::wstring> *out = new vector<std::wstring>(); std::vector<std::wstring> *out = new std::vector<std::wstring>();
static const int MAXSIZE = 256; static const int MAXSIZE = 256;
static const std::wstring SUBSTR = L"*"; static const std::wstring SUBSTR = L"*";
@ -91,13 +91,13 @@ DurangoStatsDebugger::DurangoStatsDebugger()
InitializeCriticalSection(&m_retrievedStatsLock); InitializeCriticalSection(&m_retrievedStatsLock);
} }
vector<std::wstring> *DurangoStatsDebugger::getStats() std::vector<std::wstring> *DurangoStatsDebugger::getStats()
{ {
vector<std::wstring> *out = new vector<std::wstring>(); std::vector<std::wstring> *out = new std::vector<std::wstring>();
for (auto it = m_stats.begin(); it!=m_stats.end(); it++) for (auto it = m_stats.begin(); it!=m_stats.end(); it++)
{ {
vector<std::wstring> *sublist = (*it)->getStats(); std::vector<std::wstring> *sublist = (*it)->getStats();
out->insert(out->end(), sublist->begin(), sublist->end()); out->insert(out->end(), sublist->begin(), sublist->end());
} }
@ -322,7 +322,7 @@ void DurangoStatsDebugger::PrintStats(int iPad)
{ {
if (instance == NULL) instance = Initialize(); if (instance == NULL) instance = Initialize();
vector<std::wstring> *tmp = instance->getStats(); std::vector<std::wstring> *tmp = instance->getStats();
instance->m_printQueue.insert(instance->m_printQueue.end(), tmp->begin(), tmp->end()); instance->m_printQueue.insert(instance->m_printQueue.end(), tmp->begin(), tmp->end());
// app.DebugPrintf("[DEBUG] START\n"); // 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. // Create Stat retrieval threads until there is no long any stats to start retrieving.
while ( !instance->m_printQueue.empty() ) while ( !instance->m_printQueue.empty() )
{ {
vector<std::wstring> *printing = new vector<std::wstring>(); std::vector<std::wstring> *printing = new std::vector<std::wstring>();
if (m_printQueue.size() > R_SIZE) if (m_printQueue.size() > R_SIZE)
{ {

View file

@ -14,14 +14,14 @@ private:
std::wstring m_base; std::wstring m_base;
int m_numArgs; int m_numArgs;
vector<int> m_args; std::vector<int> m_args;
public: public:
StatParam(const std::wstring &base); StatParam(const std::wstring &base);
void addArgs(int v1, ...); void addArgs(int v1, ...);
vector<std::wstring> *getStats(); std::vector<std::wstring> *getStats();
}; };
@ -65,9 +65,9 @@ protected:
DurangoStatsDebugger(); DurangoStatsDebugger();
vector<StatParam *> m_stats; std::vector<StatParam *> m_stats;
vector<std::wstring> *getStats(); std::vector<std::wstring> *getStats();
public: public:
static DurangoStatsDebugger *Initialize(); static DurangoStatsDebugger *Initialize();
@ -75,7 +75,7 @@ public:
static void PrintStats(int iPad); static void PrintStats(int iPad);
private: private:
vector<std::wstring> m_printQueue; std::vector<std::wstring> m_printQueue;
void retrieveStats(int iPad); void retrieveStats(int iPad);
@ -88,7 +88,7 @@ private:
CRITICAL_SECTION m_retrievedStatsLock; CRITICAL_SECTION m_retrievedStatsLock;
vector<StatResult> m_retrievedStats; std::vector<StatResult> m_retrievedStats;
void addRetrievedStat(StatResult result); void addRetrievedStat(StatResult result);
}; };

View file

@ -51,7 +51,7 @@ public:
void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user ); void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user );
void EvaluateDevicesForUser(__in Windows::Xbox::System::IUser^ user ); void EvaluateDevicesForUser(__in Windows::Xbox::System::IUser^ user );
vector<AddedUser *> m_addedUsers; std::vector<AddedUser *> m_addedUsers;
CRITICAL_SECTION m_csAddedUsers; CRITICAL_SECTION m_csAddedUsers;
private: private:

View file

@ -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. // 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) void DQRNetworkManager::UpdateRoomSyncPlayers(RoomSyncData *pNewSyncData)
{ {
vector<DQRNetworkPlayer *> tempPlayers; std::vector<DQRNetworkPlayer *> tempPlayers;
vector<DQRNetworkPlayer *> newPlayers; std::vector<DQRNetworkPlayer *> newPlayers;
EnterCriticalSection(&m_csRoomSyncData); EnterCriticalSection(&m_csRoomSyncData);
@ -1574,7 +1574,7 @@ bool DQRNetworkManager::AddRoomSyncPlayer(DQRNetworkPlayer *pPlayer, unsigned in
void DQRNetworkManager::RemoveRoomSyncPlayersWithSessionAddress(unsigned int sessionAddress) void DQRNetworkManager::RemoveRoomSyncPlayersWithSessionAddress(unsigned int sessionAddress)
{ {
EnterCriticalSection(&m_csRoomSyncData); EnterCriticalSection(&m_csRoomSyncData);
vector<DQRNetworkPlayer *> removedPlayers; std::vector<DQRNetworkPlayer *> removedPlayers;
int iWriteIdx = 0; int iWriteIdx = 0;
for( int i = 0; i < m_roomSyncData.playerCount; i++ ) 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. // 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) void DQRNetworkManager::RemoveRoomSyncPlayer(DQRNetworkPlayer *pPlayer)
{ {
vector<DQRNetworkPlayer *> removedPlayers; std::vector<DQRNetworkPlayer *> removedPlayers;
int iWriteIdx = 0; int iWriteIdx = 0;
for( int i = 0; i < m_roomSyncData.playerCount; i++ ) for( int i = 0; i < m_roomSyncData.playerCount; i++ )
{ {

View file

@ -461,7 +461,7 @@ private:
int RTSDoWorkThread(); int RTSDoWorkThread();
CRITICAL_SECTION m_csVecChatPlayers; CRITICAL_SECTION m_csVecChatPlayers;
vector<int> m_vecChatPlayersJoined; std::vector<int> m_vecChatPlayersJoined;
public: public:
void HandleNewPartyFoundForPlayer(); void HandleNewPartyFoundForPlayer();
void HandlePlayerRemovedFromParty(int playerMask); void HandlePlayerRemovedFromParty(int playerMask);

View file

@ -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 // 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 // accumulate results into 2 matched vectors declared below so that we can ignore any broken UserPartyAssociations from now
vector<WXM::PartyView^> partyViewVector; std::vector<WXM::PartyView^> partyViewVector;
vector<WXM::UserPartyAssociation^> partyResultsVector; std::vector<WXM::UserPartyAssociation^> partyResultsVector;
vector<task<void>> taskVector; std::vector<task<void>> taskVector;
for each(WXM::UserPartyAssociation^ remoteParty in partyResults) for each(WXM::UserPartyAssociation^ remoteParty in partyResults)
{ {
auto asyncOp = WXM::Party::GetPartyViewByPartyIdAsync( primaryUser, remoteParty->PartyId ); 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 // 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<WXM::PartyView^> partyViewVectorFiltered; std::vector<WXM::PartyView^> partyViewVectorFiltered;
vector<WXM::UserPartyAssociation^> partyResultsFiltered; std::vector<WXM::UserPartyAssociation^> partyResultsFiltered;
for( int i = 0; i < partyViewVector.size(); i++ ) 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 // and, from the party views, we can now attempt to get game sessions
vector<MXSM::MultiplayerSession^> sessionVector; std::vector<MXSM::MultiplayerSession^> sessionVector;
vector<WXM::PartyView^> partyViewVectorValid; std::vector<WXM::PartyView^> partyViewVectorValid;
vector<WXM::UserPartyAssociation^> partyResultsValid; std::vector<WXM::UserPartyAssociation^> partyResultsValid;
for( int i = 0; i < partyViewVectorFiltered.size(); i++ ) 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 // 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) // 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<task<IVectorView<MXSS::XboxUserProfile^>^>> nameResolveTaskVector; std::vector<task<IVectorView<MXSS::XboxUserProfile^>^>> nameResolveTaskVector;
vector<IVectorView<MXSS::XboxUserProfile^>^> nameResolveVector; std::vector<IVectorView<MXSS::XboxUserProfile^>^> nameResolveVector;
vector<MXSM::MultiplayerSession^> newSessionVector; std::vector<MXSM::MultiplayerSession^> newSessionVector;
vector<WXM::UserPartyAssociation^> newPartyVector; std::vector<WXM::UserPartyAssociation^> newPartyVector;
for( int j = 0; j < sessionVector.size(); j++ ) for( int j = 0; j < sessionVector.size(); j++ )
{ {
@ -383,7 +383,7 @@ int DQRNetworkManager::GetFriendsThreadProc()
try try
{ {
auto joinTask = when_all(begin(nameResolveTaskVector), end(nameResolveTaskVector) ).then([this, &nameResolveVector](vector<IVectorView<MXSS::XboxUserProfile^>^> results) auto joinTask = when_all(begin(nameResolveTaskVector), end(nameResolveTaskVector) ).then([this, &nameResolveVector](std::vector<IVectorView<MXSS::XboxUserProfile^>^> results)
{ {
nameResolveVector = results; nameResolveVector = results;
}) })

View file

@ -781,7 +781,7 @@ void PartyController::OnGameSessionReady( GameSessionReadyEventArgs^ eventArgs )
Microsoft::Xbox::Services::Multiplayer::MultiplayerSessionReference^ sessionRef = Microsoft::Xbox::Services::Multiplayer::MultiplayerSessionReference^ sessionRef =
m_pDQRNet->ConvertToMicrosoftXboxServicesMultiplayerSessionReference(eventArgs->GameSession); m_pDQRNet->ConvertToMicrosoftXboxServicesMultiplayerSessionReference(eventArgs->GameSession);
vector<Platform::String^> localAdhocAdditions; std::vector<Platform::String^> 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 // 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 // using it to read the session so there shouldn't be any requirements to use a particular live context

View file

@ -790,9 +790,9 @@ void CPlatformNetworkManagerDurango::TickSearch()
} }
} }
vector<FriendSessionInfo *> *CPlatformNetworkManagerDurango::GetSessionList(int iPad, int localPlayers, bool partyOnly) std::vector<FriendSessionInfo *> *CPlatformNetworkManagerDurango::GetSessionList(int iPad, int localPlayers, bool partyOnly)
{ {
vector<FriendSessionInfo *> *filteredList = new vector<FriendSessionInfo *>(); std::vector<FriendSessionInfo *> *filteredList = new std::vector<FriendSessionInfo *>();
for( int i = 0; i < m_searchResultsCount; i++ ) for( int i = 0; i < m_searchResultsCount; i++ )
{ {
GameSessionData *gameSessionData = (GameSessionData *)m_pSearchResults[i].m_extData; GameSessionData *gameSessionData = (GameSessionData *)m_pSearchResults[i].m_extData;

View file

@ -71,7 +71,7 @@ private:
HANDLE m_notificationListener; HANDLE m_notificationListener;
vector<DQRNetworkPlayer *> m_machineDQRPrimaryPlayers; // collection of players that we deem to be the main one for that system std::vector<DQRNetworkPlayer *> m_machineDQRPrimaryPlayers; // collection of players that we deem to be the main one for that system
bool m_bLeavingGame; bool m_bLeavingGame;
bool m_bLeaveGameOnTick; bool m_bLeaveGameOnTick;
@ -107,7 +107,7 @@ private:
PlayerFlags(INetworkPlayer *pNetworkPlayer, unsigned int count); PlayerFlags(INetworkPlayer *pNetworkPlayer, unsigned int count);
~PlayerFlags(); ~PlayerFlags();
}; };
vector<PlayerFlags *> m_playerFlags; std::vector<PlayerFlags *> m_playerFlags;
void SystemFlagAddPlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagAddPlayer(INetworkPlayer *pNetworkPlayer);
void SystemFlagRemovePlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagRemovePlayer(INetworkPlayer *pNetworkPlayer);
void SystemFlagReset(); void SystemFlagReset();
@ -124,7 +124,7 @@ public:
std::wstring GatherRTTStats(); std::wstring GatherRTTStats();
private: private:
vector<FriendSessionInfo *> friendsSessions[XUSER_MAX_COUNT]; std::vector<FriendSessionInfo *> friendsSessions[XUSER_MAX_COUNT];
int m_searchResultsCount; int m_searchResultsCount;
int m_lastSearchStartTime; int m_lastSearchStartTime;
@ -139,7 +139,7 @@ private:
void TickSearch(); void TickSearch();
vector<INetworkPlayer *>currentNetworkPlayers; std::vector<INetworkPlayer *>currentNetworkPlayers;
INetworkPlayer *addNetworkPlayer(DQRNetworkPlayer *pDQRPlayer); INetworkPlayer *addNetworkPlayer(DQRNetworkPlayer *pDQRPlayer);
void removeNetworkPlayer(DQRNetworkPlayer *pDQRPlayer); void removeNetworkPlayer(DQRNetworkPlayer *pDQRPlayer);
static INetworkPlayer *getNetworkPlayer(DQRNetworkPlayer *pDQRPlayer); static INetworkPlayer *getNetworkPlayer(DQRNetworkPlayer *pDQRPlayer);
@ -149,7 +149,7 @@ private:
virtual void Notify(int ID, ULONG_PTR Param); virtual void Notify(int ID, ULONG_PTR Param);
public: public:
virtual vector<FriendSessionInfo *> *GetSessionList(int iPad, int localPlayers, bool partyOnly); virtual std::vector<FriendSessionInfo *> *GetSessionList(int iPad, int localPlayers, bool partyOnly);
virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession); virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession);
virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam ); virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam );
virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ); virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam );

View file

@ -988,7 +988,7 @@ Vec3::resetPool();
// g_pd3dDevice->Release(); // g_pd3dDevice->Release();
vector<uint8_t *> vRichPresenceStrings; std::vector<uint8_t *> vRichPresenceStrings;
// convert std::wstring to UTF-8 string // convert std::wstring to UTF-8 string
std::string wstring_to_utf8 (const std::wstring& str) std::string wstring_to_utf8 (const std::wstring& str)

View file

@ -1460,7 +1460,7 @@ int main(int argc, const char *argv[] )
} }
vector<uint8_t *> vRichPresenceStrings; std::vector<uint8_t *> vRichPresenceStrings;
// convert std::wstring to UTF-8 string // convert std::wstring to UTF-8 string
std::string std::wstring_to_utf8 (const std::wstring& str) std::string std::wstring_to_utf8 (const std::wstring& str)

View file

@ -26,7 +26,7 @@ static char usrdirPathBDPatch[CELL_GAME_PATH_MAX];
//static char sc_loadPath[] = {"/app_home/"}; //static char sc_loadPath[] = {"/app_home/"};
//static char sc_loadPath[CELL_GAME_PATH_MAX]; //static char sc_loadPath[CELL_GAME_PATH_MAX];
static int iFilesOpen=0; static int iFilesOpen=0;
vector<int> vOpenFileHandles; std::vector<int> vOpenFileHandles;
namespace boost namespace boost
{ {

View file

@ -1362,7 +1362,7 @@ int main()
ShutdownManager::MainThreadHandleShutdown(); ShutdownManager::MainThreadHandleShutdown();
} }
vector<uint8_t *> vRichPresenceStrings; std::vector<uint8_t *> vRichPresenceStrings;
uint8_t * AddRichPresenceString(int iID) uint8_t * AddRichPresenceString(int iID)
{ {
uint8_t *strUtf8 = mallocAndCreateUTF8ArrayFromString(iID); uint8_t *strUtf8 = mallocAndCreateUTF8ArrayFromString(iID);

View file

@ -64,7 +64,7 @@ public:
int id; int id;
int padding[1]; int padding[1];
//public: //public:
// vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - removed // std::vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - removed
private: private:
void *globalRenderableTileEntities; void *globalRenderableTileEntities;

View file

@ -1566,7 +1566,7 @@ void CConsoleMinecraftApp::getSaveDataDeleteDialogParam(SceSaveDataDialogParam *
ZeroMemory(&listParam, sizeof(SceSaveDataDialogListParam)); ZeroMemory(&listParam, sizeof(SceSaveDataDialogListParam));
{ {
vector<const SceAppUtilSaveDataSlot> slots; std::vector<const SceAppUtilSaveDataSlot> slots;
for (unsigned int i = 2; i < SCE_APPUTIL_SAVEDATA_SLOT_MAX; i++) for (unsigned int i = 2; i < SCE_APPUTIL_SAVEDATA_SLOT_MAX; i++)
{ {
SceAppUtilSaveDataSlotParam slotParam; SceAppUtilSaveDataSlotParam slotParam;
@ -1589,7 +1589,7 @@ void CConsoleMinecraftApp::getSaveDataDeleteDialogParam(SceSaveDataDialogParam *
int slotIndex = 0; int slotIndex = 0;
vector<const SceAppUtilSaveDataSlot>::iterator itr; std::vector<const SceAppUtilSaveDataSlot>::iterator itr;
for (itr = slots.begin(); itr != slots.end(); itr++) for (itr = slots.begin(); itr != slots.end(); itr++)
{ {
pSavesList[slotIndex] = *itr; pSavesList[slotIndex] = *itr;

View file

@ -1061,7 +1061,7 @@ int main()
ShutdownManager::MainThreadHandleShutdown(); ShutdownManager::MainThreadHandleShutdown();
} }
vector<uint8_t *> vRichPresenceStrings; std::vector<uint8_t *> vRichPresenceStrings;
uint8_t * AddRichPresenceString(int iID) uint8_t * AddRichPresenceString(int iID)
{ {
uint8_t *strUtf8 = mallocAndCreateUTF8ArrayFromString(iID); uint8_t *strUtf8 = mallocAndCreateUTF8ArrayFromString(iID);

View file

@ -25,7 +25,7 @@ IXACT3SoundBank *SoundEngine::m_pSoundBank2 = NULL;
CRITICAL_SECTION SoundEngine::m_CS; CRITICAL_SECTION SoundEngine::m_CS;
X3DAUDIO_HANDLE SoundEngine::m_xact3dInstance; X3DAUDIO_HANDLE SoundEngine::m_xact3dInstance;
vector<SoundEngine::soundInfo *> SoundEngine::currentSounds; std::vector<SoundEngine::soundInfo *> SoundEngine::currentSounds;
X3DAUDIO_DSP_SETTINGS SoundEngine::m_DSPSettings; X3DAUDIO_DSP_SETTINGS SoundEngine::m_DSPSettings;
X3DAUDIO_EMITTER SoundEngine::m_emitter; X3DAUDIO_EMITTER SoundEngine::m_emitter;
X3DAUDIO_LISTENER SoundEngine::m_listeners[4]; X3DAUDIO_LISTENER SoundEngine::m_listeners[4];

View file

@ -54,7 +54,7 @@ class SoundEngine : public ConsoleSoundEngine
}; };
void update3DPosition( soundInfo *pInfo, bool bPlaceEmitterAtListener = false, bool bIsCDMusic = false); void update3DPosition( soundInfo *pInfo, bool bPlaceEmitterAtListener = false, bool bIsCDMusic = false);
static vector<soundInfo *>currentSounds; static std::vector<soundInfo *>currentSounds;
int noMusicDelay; int noMusicDelay;
Random *random; Random *random;

View file

@ -1474,9 +1474,9 @@ void CPlatformNetworkManagerXbox::SetSearchResultsReady(int resultCount )
m_searchResultsCount[m_lastSearchPad] = resultCount; m_searchResultsCount[m_lastSearchPad] = resultCount;
} }
vector<FriendSessionInfo *> *CPlatformNetworkManagerXbox::GetSessionList(int iPad, int localPlayers, bool partyOnly) std::vector<FriendSessionInfo *> *CPlatformNetworkManagerXbox::GetSessionList(int iPad, int localPlayers, bool partyOnly)
{ {
vector<FriendSessionInfo *> *filteredList = new vector<FriendSessionInfo *>();; std::vector<FriendSessionInfo *> *filteredList = new std::vector<FriendSessionInfo *>();;
const XSESSION_SEARCHRESULT *pSearchResult; const XSESSION_SEARCHRESULT *pSearchResult;
const XNQOSINFO * pxnqi; const XNQOSINFO * pxnqi;

View file

@ -73,7 +73,7 @@ private:
HANDLE m_notificationListener; HANDLE m_notificationListener;
vector<IQNetPlayer *> m_machineQNetPrimaryPlayers; // collection of players that we deem to be the main one for that system std::vector<IQNetPlayer *> m_machineQNetPrimaryPlayers; // collection of players that we deem to be the main one for that system
bool m_bLeavingGame; bool m_bLeavingGame;
bool m_bLeaveGameOnTick; bool m_bLeaveGameOnTick;
@ -108,7 +108,7 @@ private:
PlayerFlags(INetworkPlayer *pNetworkPlayer, unsigned int count); PlayerFlags(INetworkPlayer *pNetworkPlayer, unsigned int count);
~PlayerFlags(); ~PlayerFlags();
}; };
vector<PlayerFlags *> m_playerFlags; std::vector<PlayerFlags *> m_playerFlags;
void SystemFlagAddPlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagAddPlayer(INetworkPlayer *pNetworkPlayer);
void SystemFlagRemovePlayer(INetworkPlayer *pNetworkPlayer); void SystemFlagRemovePlayer(INetworkPlayer *pNetworkPlayer);
void SystemFlagReset(); void SystemFlagReset();
@ -125,7 +125,7 @@ public:
std::wstring GatherRTTStats(); std::wstring GatherRTTStats();
private: private:
vector<FriendSessionInfo *> friendsSessions[XUSER_MAX_COUNT]; std::vector<FriendSessionInfo *> friendsSessions[XUSER_MAX_COUNT];
int m_searchResultsCount[XUSER_MAX_COUNT]; int m_searchResultsCount[XUSER_MAX_COUNT];
int m_lastSearchStartTime[XUSER_MAX_COUNT]; int m_lastSearchStartTime[XUSER_MAX_COUNT];
@ -152,7 +152,7 @@ private:
void SetSearchResultsReady(int resultCount = 0); void SetSearchResultsReady(int resultCount = 0);
vector<INetworkPlayer *>currentNetworkPlayers; std::vector<INetworkPlayer *>currentNetworkPlayers;
INetworkPlayer *addNetworkPlayer(IQNetPlayer *pQNetPlayer); INetworkPlayer *addNetworkPlayer(IQNetPlayer *pQNetPlayer);
void removeNetworkPlayer(IQNetPlayer *pQNetPlayer); void removeNetworkPlayer(IQNetPlayer *pQNetPlayer);
static INetworkPlayer *getNetworkPlayer(IQNetPlayer *pQNetPlayer); static INetworkPlayer *getNetworkPlayer(IQNetPlayer *pQNetPlayer);
@ -162,7 +162,7 @@ private:
virtual void Notify(int ID, ULONG_PTR Param); virtual void Notify(int ID, ULONG_PTR Param);
public: public:
virtual vector<FriendSessionInfo *> *GetSessionList(int iPad, int localPlayers, bool partyOnly); virtual std::vector<FriendSessionInfo *> *GetSessionList(int iPad, int localPlayers, bool partyOnly);
virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession); virtual bool GetGameSessionInfo(int iPad, SessionID sessionId,FriendSessionInfo *foundSession);
virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam ); virtual void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam );
virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam ); virtual void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam );

View file

@ -115,7 +115,7 @@ void EntityTracker::removePlayer(std::shared_ptr<Entity> e)
void EntityTracker::tick() void EntityTracker::tick()
{ {
vector<std::shared_ptr<ServerPlayer> > movedPlayers; std::vector<std::shared_ptr<ServerPlayer> > movedPlayers;
for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ ) for( AUTO_VAR(it, entities.begin()); it != entities.end(); it++ )
{ {
std::shared_ptr<TrackedEntity> te = *it; std::shared_ptr<TrackedEntity> te = *it;

View file

@ -1609,7 +1609,7 @@ void LocalPlayer::handleCollectItem(std::shared_ptr<ItemInstance> item)
} }
} }
void LocalPlayer::SetPlayerAdditionalModelParts(vector<ModelPart *>pAdditionalModelParts) void LocalPlayer::SetPlayerAdditionalModelParts(std::vector<ModelPart *>pAdditionalModelParts)
{ {
m_pAdditionalModelParts=pAdditionalModelParts; m_pAdditionalModelParts=pAdditionalModelParts;
} }

View file

@ -190,10 +190,10 @@ public:
float getAndResetChangeDimensionTimer(); float getAndResetChangeDimensionTimer();
virtual void handleCollectItem(std::shared_ptr<ItemInstance> item); virtual void handleCollectItem(std::shared_ptr<ItemInstance> item);
void SetPlayerAdditionalModelParts(vector<ModelPart *>pAdditionalModelParts); void SetPlayerAdditionalModelParts(std::vector<ModelPart *>pAdditionalModelParts);
private: private:
vector<ModelPart *> m_pAdditionalModelParts; std::vector<ModelPart *> m_pAdditionalModelParts;
}; };

View file

@ -441,7 +441,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks)
// Don't send TileEntity data until we have sent the block data // Don't send TileEntity data until we have sent the block data
if( connection->isLocal() || chunkDataSent) if( connection->isLocal() || chunkDataSent)
{ {
vector<std::shared_ptr<TileEntity> > *tes = level->getTileEntitiesInRegion(nearest.x * 16, 0, nearest.z * 16, nearest.x * 16 + 16, Level::maxBuildHeight, nearest.z * 16 + 16); std::vector<std::shared_ptr<TileEntity> > *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++) for (unsigned int i = 0; i < tes->size(); i++)
{ {
// 4J Stu - Added delay param to ensure that these arrive after the BRUPs from above // 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) void ServerPlayer::refreshContainer(AbstractContainerMenu *menu)
{ {
vector<std::shared_ptr<ItemInstance> > *items = menu->getItems(); std::vector<std::shared_ptr<ItemInstance> > *items = menu->getItems();
refreshContainer(menu, items); refreshContainer(menu, items);
delete items; delete items;
} }
void ServerPlayer::refreshContainer(AbstractContainerMenu *container, vector<std::shared_ptr<ItemInstance> > *items) void ServerPlayer::refreshContainer(AbstractContainerMenu *container, std::vector<std::shared_ptr<ItemInstance> > *items)
{ {
connection->send( std::shared_ptr<ContainerSetContentPacket>( new ContainerSetContentPacket(container->containerId, items) ) ); connection->send( std::shared_ptr<ContainerSetContentPacket>( new ContainerSetContentPacket(container->containerId, items) ) );
connection->send( std::shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) ); connection->send( std::shared_ptr<ContainerSetSlotPacket>( new ContainerSetSlotPacket(-1, -1, inventory->getCarried()) ) );

View file

@ -22,7 +22,7 @@ public:
ServerPlayerGameMode *gameMode; ServerPlayerGameMode *gameMode;
double lastMoveX, lastMoveZ; double lastMoveX, lastMoveZ;
list<ChunkPos> chunksToSend; list<ChunkPos> chunksToSend;
vector<int> entitiesToRemove; std::vector<int> entitiesToRemove;
unordered_set<ChunkPos, ChunkPosKeyHash, ChunkPosKeyEq> seenChunks; unordered_set<ChunkPos, ChunkPosKeyHash, ChunkPosKeyEq> seenChunks;
int spewTimer; int spewTimer;
@ -104,7 +104,7 @@ public:
virtual bool openTrading(std::shared_ptr<Merchant> traderTarget); // 4J added bool return virtual bool openTrading(std::shared_ptr<Merchant> traderTarget); // 4J added bool return
virtual void slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr<ItemInstance> item); virtual void slotChanged(AbstractContainerMenu *container, int slotIndex, std::shared_ptr<ItemInstance> item);
void refreshContainer(AbstractContainerMenu *menu); void refreshContainer(AbstractContainerMenu *menu);
virtual void refreshContainer(AbstractContainerMenu *container, vector<std::shared_ptr<ItemInstance> > *items); virtual void refreshContainer(AbstractContainerMenu *container, std::vector<std::shared_ptr<ItemInstance> > *items);
virtual void setContainerData(AbstractContainerMenu *container, int id, int value); virtual void setContainerData(AbstractContainerMenu *container, int id, int value);
virtual void closeContainer(); virtual void closeContainer();
void broadcastCarriedItem(); void broadcastCarriedItem();

View file

@ -48,7 +48,7 @@ TrackedEntity::TrackedEntity(std::shared_ptr<Entity> e, int range, int updateInt
int c0a = 0, c0b = 0, c1a = 0, c1b = 0, c1c = 0, c2a = 0, c2b = 0; int c0a = 0, c0b = 0, c1a = 0, c1b = 0, c1c = 0, c2a = 0, c2b = 0;
void TrackedEntity::tick(EntityTracker *tracker, vector<std::shared_ptr<Player> > *players) void TrackedEntity::tick(EntityTracker *tracker, std::vector<std::shared_ptr<Player> > *players)
{ {
moved = false; moved = false;
if (!updatedPlayerVisibility || e->distanceToSqr(xpu, ypu, zpu) > 4 * 4) if (!updatedPlayerVisibility || e->distanceToSqr(xpu, ypu, zpu) > 4 * 4)
@ -308,7 +308,7 @@ void TrackedEntity::broadcast(std::shared_ptr<Packet> packet)
if( Packet::canSendToAnyClient( 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 // 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<ServerPlayer> > sentTo; std::vector< std::shared_ptr<ServerPlayer> > sentTo;
// 4J - don't send to a player we've already sent this data to that shares the same machine. // 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 // EntityMotionPacket used to limit themselves to sending once to each machine
@ -370,7 +370,7 @@ void TrackedEntity::broadcast(std::shared_ptr<Packet> packet)
void TrackedEntity::broadcastAndSend(std::shared_ptr<Packet> packet) void TrackedEntity::broadcastAndSend(std::shared_ptr<Packet> packet)
{ {
vector< std::shared_ptr<ServerPlayer> > sentTo; std::vector< std::shared_ptr<ServerPlayer> > sentTo;
broadcast(packet); broadcast(packet);
std::shared_ptr<ServerPlayer> sp = dynamic_pointer_cast<ServerPlayer>(e); std::shared_ptr<ServerPlayer> sp = dynamic_pointer_cast<ServerPlayer>(e);
if (sp != NULL && sp->connection) if (sp != NULL && sp->connection)
@ -526,7 +526,7 @@ void TrackedEntity::updatePlayer(EntityTracker *tracker, std::shared_ptr<ServerP
if (dynamic_pointer_cast<Mob>(e) != NULL) if (dynamic_pointer_cast<Mob>(e) != NULL)
{ {
std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(e); std::shared_ptr<Mob> mob = dynamic_pointer_cast<Mob>(e);
vector<MobEffectInstance *> *activeEffects = mob->getActiveEffects(); std::vector<MobEffectInstance *> *activeEffects = mob->getActiveEffects();
for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it) for(AUTO_VAR(it, activeEffects->begin()); it != activeEffects->end(); ++it)
{ {
MobEffectInstance *effect = *it; MobEffectInstance *effect = *it;
@ -558,7 +558,7 @@ bool TrackedEntity::canBySeenBy(std::shared_ptr<ServerPlayer> player)
// return player->getLevel()->getChunkMap()->isPlayerIn(player, e->xChunk, e->zChunk); // return player->getLevel()->getChunkMap()->isPlayerIn(player, e->xChunk, e->zChunk);
} }
void TrackedEntity::updatePlayers(EntityTracker *tracker, vector<std::shared_ptr<Player> > *players) void TrackedEntity::updatePlayers(EntityTracker *tracker, std::vector<std::shared_ptr<Player> > *players)
{ {
for (unsigned int i = 0; i < players->size(); i++) for (unsigned int i = 0; i < players->size(); i++)
{ {

View file

@ -36,7 +36,7 @@ public:
TrackedEntity(std::shared_ptr<Entity> e, int range, int updateInterval, bool trackDelta); TrackedEntity(std::shared_ptr<Entity> e, int range, int updateInterval, bool trackDelta);
void tick(EntityTracker *tracker, vector<std::shared_ptr<Player> > *players); void tick(EntityTracker *tracker, std::vector<std::shared_ptr<Player> > *players);
void broadcast(std::shared_ptr<Packet> packet); void broadcast(std::shared_ptr<Packet> packet);
void broadcastAndSend(std::shared_ptr<Packet> packet); void broadcastAndSend(std::shared_ptr<Packet> packet);
void broadcastRemoved(); void broadcastRemoved();
@ -56,7 +56,7 @@ private:
public: public:
void updatePlayer(EntityTracker *tracker, std::shared_ptr<ServerPlayer> sp); void updatePlayer(EntityTracker *tracker, std::shared_ptr<ServerPlayer> sp);
void updatePlayers(EntityTracker *tracker, vector<std::shared_ptr<Player> > *players); void updatePlayers(EntityTracker *tracker, std::vector<std::shared_ptr<Player> > *players);
private: private:
void sendEntityData(std::shared_ptr<PlayerConnection> conn); void sendEntityData(std::shared_ptr<PlayerConnection> conn);
std::shared_ptr<Packet> getAddEntityPacket(); std::shared_ptr<Packet> getAddEntityPacket();

View file

@ -2,7 +2,7 @@
#include "User.h" #include "User.h"
#include "../../Minecraft.World/Headers/net.minecraft.world.level.tile.h" #include "../../Minecraft.World/Headers/net.minecraft.world.level.tile.h"
vector<Tile *> User::allowedTiles; std::vector<Tile *> User::allowedTiles;
void User::staticCtor() void User::staticCtor()
{ {

View file

@ -4,7 +4,7 @@ using namespace std;
class User class User
{ {
public: public:
static vector<Tile *> allowedTiles; static std::vector<Tile *> allowedTiles;
static void staticCtor(); static void staticCtor();
std::wstring name; std::wstring name;
std::wstring sessionId; std::wstring sessionId;

View file

@ -207,7 +207,7 @@ void Chunk::rebuild()
// unordered_set<std::shared_ptr<TileEntity> > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line // unordered_set<std::shared_ptr<TileEntity> > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line
// renderableTileEntities.clear(); // renderableTileEntities.clear();
vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - added std::vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - added
int r = 1; int r = 1;
@ -574,12 +574,12 @@ void Chunk::rebuild()
// 4J - All these new things added to globalRenderableTileEntities // 4J - All these new things added to globalRenderableTileEntities
AUTO_VAR(endItRTE, renderableTileEntities.end()); AUTO_VAR(endItRTE, renderableTileEntities.end());
for( vector<std::shared_ptr<TileEntity> >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) for( std::vector<std::shared_ptr<TileEntity> >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ )
{ {
oldTileEntities.erase(*it); oldTileEntities.erase(*it);
} }
// 4J - oldTileEntities is now the removed items // 4J - oldTileEntities is now the removed items
vector<std::shared_ptr<TileEntity> >::iterator it = globalRenderableTileEntities->begin(); std::vector<std::shared_ptr<TileEntity> >::iterator it = globalRenderableTileEntities->begin();
while( it != globalRenderableTileEntities->end() ) while( it != globalRenderableTileEntities->end() )
{ {
if( oldTileEntities.find(*it) != oldTileEntities.end() ) if( oldTileEntities.find(*it) != oldTileEntities.end() )
@ -659,7 +659,7 @@ void Chunk::rebuild_SPU()
// unordered_set<std::shared_ptr<TileEntity> > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line // unordered_set<std::shared_ptr<TileEntity> > oldTileEntities(renderableTileEntities.begin(),renderableTileEntities.end()); // 4J removed this & next line
// renderableTileEntities.clear(); // renderableTileEntities.clear();
vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - added std::vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - added
// List<TileEntity> newTileEntities = new ArrayList<TileEntity>(); // List<TileEntity> newTileEntities = new ArrayList<TileEntity>();
// newTileEntities.clear(); // newTileEntities.clear();
@ -903,12 +903,12 @@ void Chunk::rebuild_SPU()
// 4J - All these new things added to globalRenderableTileEntities // 4J - All these new things added to globalRenderableTileEntities
AUTO_VAR(endItRTE, renderableTileEntities.end()); AUTO_VAR(endItRTE, renderableTileEntities.end());
for( vector<std::shared_ptr<TileEntity> >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ ) for( std::vector<std::shared_ptr<TileEntity> >::iterator it = renderableTileEntities.begin(); it != endItRTE; it++ )
{ {
oldTileEntities.erase(*it); oldTileEntities.erase(*it);
} }
// 4J - oldTileEntities is now the removed items // 4J - oldTileEntities is now the removed items
vector<std::shared_ptr<TileEntity> >::iterator it = globalRenderableTileEntities->begin(); std::vector<std::shared_ptr<TileEntity> >::iterator it = globalRenderableTileEntities->begin();
while( it != globalRenderableTileEntities->end() ) while( it != globalRenderableTileEntities->end() )
{ {
if( oldTileEntities.find(*it) != oldTileEntities.end() ) if( oldTileEntities.find(*it) != oldTileEntities.end() )

View file

@ -52,7 +52,7 @@ public:
int id; int id;
//public: //public:
// vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - removed // std::vector<std::shared_ptr<TileEntity> > renderableTileEntities; // 4J - removed
private: private:
LevelRenderer::rteMap *globalRenderableTileEntities; LevelRenderer::rteMap *globalRenderableTileEntities;

View file

@ -198,7 +198,7 @@ void PlayerRenderer::render(std::shared_ptr<Entity> _mob, double x, double y, do
} }
// 4J-PB - any additional parts to turn on for this player (skin dependent) // 4J-PB - any additional parts to turn on for this player (skin dependent)
vector<ModelPart *> *pAdditionalModelParts=mob->GetAdditionalModelParts(); std::vector<ModelPart *> *pAdditionalModelParts=mob->GetAdditionalModelParts();
//turn them on //turn them on
if(pAdditionalModelParts!=NULL) if(pAdditionalModelParts!=NULL)
{ {

View file

@ -57,10 +57,10 @@ C4JThread* GameRenderer::m_updateThread;
C4JThread::EventArray* GameRenderer::m_updateEvents; C4JThread::EventArray* GameRenderer::m_updateEvents;
bool GameRenderer::nearThingsToDo = false; bool GameRenderer::nearThingsToDo = false;
bool GameRenderer::updateRunning = false; bool GameRenderer::updateRunning = false;
vector<uint8_t *> GameRenderer::m_deleteStackByte; std::vector<uint8_t *> GameRenderer::m_deleteStackByte;
vector<SparseLightStorage *> GameRenderer::m_deleteStackSparseLightStorage; std::vector<SparseLightStorage *> GameRenderer::m_deleteStackSparseLightStorage;
vector<CompressedTileStorage *> GameRenderer::m_deleteStackCompressedTileStorage; std::vector<CompressedTileStorage *> GameRenderer::m_deleteStackCompressedTileStorage;
vector<SparseDataStorage *> GameRenderer::m_deleteStackSparseDataStorage; std::vector<SparseDataStorage *> GameRenderer::m_deleteStackSparseDataStorage;
#endif #endif
CRITICAL_SECTION GameRenderer::m_csDeleteStack; 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); Vec3 *to = from->add(b->x * range, b->y * range, b->z * range);
hovered = nullptr; hovered = nullptr;
float overlap = 1; float overlap = 1;
vector<std::shared_ptr<Entity> > *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<std::shared_ptr<Entity> > *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; double nearest = dist;
AUTO_VAR(itEnd, objects->end()); AUTO_VAR(itEnd, objects->end());

View file

@ -156,10 +156,10 @@ public:
static bool nearThingsToDo; static bool nearThingsToDo;
static bool updateRunning; static bool updateRunning;
#endif #endif
static vector<uint8_t *> m_deleteStackByte; static std::vector<uint8_t *> m_deleteStackByte;
static vector<SparseLightStorage *> m_deleteStackSparseLightStorage; static std::vector<SparseLightStorage *> m_deleteStackSparseLightStorage;
static vector<CompressedTileStorage *> m_deleteStackCompressedTileStorage; static std::vector<CompressedTileStorage *> m_deleteStackCompressedTileStorage;
static vector<SparseDataStorage *> m_deleteStackSparseDataStorage; static std::vector<SparseDataStorage *> m_deleteStackSparseDataStorage;
static CRITICAL_SECTION m_csDeleteStack; static CRITICAL_SECTION m_csDeleteStack;
static void AddForDelete(uint8_t *deleteThis); static void AddForDelete(uint8_t *deleteThis);
static void AddForDelete(SparseLightStorage *deleteThis); static void AddForDelete(SparseLightStorage *deleteThis);

View file

@ -442,7 +442,7 @@ void LevelRenderer::allChanged(int playerIndex)
} }
chunks[playerIndex] = ClipChunkArray(xChunks * yChunks * zChunks); chunks[playerIndex] = ClipChunkArray(xChunks * yChunks * zChunks);
// sortedChunks[playerIndex] = new vector<Chunk *>(xChunks * yChunks * zChunks); // 4J - removed - not sorting our chunks anymore // sortedChunks[playerIndex] = new std::vector<Chunk *>(xChunks * yChunks * zChunks); // 4J - removed - not sorting our chunks anymore
int id = 0; int id = 0;
int count = 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 // mc->gameRenderer->turnOnLightLayer(a); // 4J - brought forward from 1.8.2
vector<std::shared_ptr<Entity> > entities = level[playerIndex]->getAllEntities(); std::vector<std::shared_ptr<Entity> > entities = level[playerIndex]->getAllEntities();
totalEntities = (int)entities.size(); totalEntities = (int)entities.size();
AUTO_VAR(itEndGE, level[playerIndex]->globalEntities.end()); AUTO_VAR(itEndGE, level[playerIndex]->globalEntities.end());

View file

@ -120,18 +120,18 @@ public:
void destroyTileProgress(int id, int x, int y, int z, int progress); void destroyTileProgress(int id, int x, int y, int z, int progress);
void registerTextures(IconRegister *iconRegister); void registerTextures(IconRegister *iconRegister);
typedef std::unordered_map<int, vector<std::shared_ptr<TileEntity> >, IntKeyHash, IntKeyEq> rteMap; typedef std::unordered_map<int, std::vector<std::shared_ptr<TileEntity> >, IntKeyHash, IntKeyEq> rteMap;
private: private:
// debug // debug
int m_freezeticks; // used to freeze the clouds 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 // 4J - this block of declarations was scattered round the code but have gathered everything into one place
rteMap renderableTileEntities; // 4J - changed - was vector<std::shared_ptr<TileEntity>, now hashed by chunk so we can find them rteMap renderableTileEntities; // 4J - changed - was std::vector<std::shared_ptr<TileEntity>, now hashed by chunk so we can find them
CRITICAL_SECTION m_csRenderableTileEntities; CRITICAL_SECTION m_csRenderableTileEntities;
MultiPlayerLevel *level[4]; // 4J - now one per player MultiPlayerLevel *level[4]; // 4J - now one per player
Textures *textures; Textures *textures;
// vector<Chunk *> *sortedChunks[4]; // 4J - removed - not sorting our chunks anymore // std::vector<Chunk *> *sortedChunks[4]; // 4J - removed - not sorting our chunks anymore
ClipChunkArray chunks[4]; // 4J - now one per player ClipChunkArray chunks[4]; // 4J - now one per player
int lastPlayerCount[4]; // 4J - added int lastPlayerCount[4]; // 4J - added
int xChunks, yChunks, zChunks; int xChunks, yChunks, zChunks;
@ -149,7 +149,7 @@ private:
int renderedEntities; int renderedEntities;
int culledEntities; int culledEntities;
int chunkFixOffs; int chunkFixOffs;
vector<Chunk *> _renderChunks; std::vector<Chunk *> _renderChunks;
int frame; int frame;
int repeatList; int repeatList;
double xOld[4]; // 4J - now one per player double xOld[4]; // 4J - now one per player
@ -189,7 +189,7 @@ public:
~RecentTile(); ~RecentTile();
}; };
CRITICAL_SECTION m_csDestroyedTiles; CRITICAL_SECTION m_csDestroyedTiles;
vector<RecentTile *> m_destroyedTiles; std::vector<RecentTile *> m_destroyedTiles;
public: 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 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 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

View file

@ -147,12 +147,12 @@ void Minimap::render(std::shared_ptr<Player> player, Textures *textures, std::sh
AUTO_VAR(itEnd, data->decorations.end()); AUTO_VAR(itEnd, data->decorations.end());
#ifdef _LARGE_WORLDS #ifdef _LARGE_WORLDS
vector<MapItemSavedData::MapDecoration *> m_edgeIcons; std::vector<MapItemSavedData::MapDecoration *> m_edgeIcons;
#endif #endif
// 4J-PB - stack the map icons // 4J-PB - stack the map icons
float fIconZ=-0.04f;// 4J - moved to -0.04 (was -0.02) to stop z fighting float fIconZ=-0.04f;// 4J - moved to -0.04 (was -0.02) to stop z fighting
for( vector<MapItemSavedData::MapDecoration *>::iterator it = data->decorations.begin(); it != itEnd; it++ ) for( std::vector<MapItemSavedData::MapDecoration *>::iterator it = data->decorations.begin(); it != itEnd; it++ )
{ {
MapItemSavedData::MapDecoration *dec = *it; MapItemSavedData::MapDecoration *dec = *it;

View file

@ -12,7 +12,7 @@ class Model
public: public:
float attackTime; float attackTime;
bool riding; bool riding;
vector<ModelPart *> cubes; std::vector<ModelPart *> cubes;
bool young; bool young;
std::unordered_map<std::wstring, TexOffs * > mappedTexOffs; std::unordered_map<std::wstring, TexOffs * > mappedTexOffs;
int texWidth; int texWidth;

View file

@ -8,7 +8,7 @@ using namespace std;
class GuiParticles : public GuiComponent class GuiParticles : public GuiComponent
{ {
private: private:
vector<GuiParticle *> particles; std::vector<GuiParticle *> particles;
Minecraft *mc; Minecraft *mc;
public: public:

View file

@ -18,7 +18,7 @@ TexturePackRepository::TexturePackRepository(File workingDirectory, Minecraft *m
// 4J - added // 4J - added
usingWeb = false; usingWeb = false;
selected = NULL; selected = NULL;
texturePacks = new vector<TexturePack *>; texturePacks = new std::vector<TexturePack *>;
this->minecraft = minecraft; 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 // 4J Stu - We don't ever want to completely refresh the lists, we keep them up-to-date as we go
#if 0 #if 0
vector<TexturePack *> *currentPacks = new vector<TexturePack *>; std::vector<TexturePack *> *currentPacks = new std::vector<TexturePack *>;
currentPacks->push_back(DEFAULT_TEXTURE_PACK); currentPacks->push_back(DEFAULT_TEXTURE_PACK);
cacheById[DEFAULT_TEXTURE_PACK->getId()] = DEFAULT_TEXTURE_PACK; cacheById[DEFAULT_TEXTURE_PACK->getId()] = DEFAULT_TEXTURE_PACK;
#ifndef _CONTENT_PACKAGE #ifndef _CONTENT_PACKAGE
@ -195,9 +195,9 @@ void TexturePackRepository::updateList()
// 4J - was texturePacks.removeAll(currentPacks); // 4J - was texturePacks.removeAll(currentPacks);
AUTO_VAR(itEnd, currentPacks->end()); AUTO_VAR(itEnd, currentPacks->end());
for( vector<TexturePack *>::iterator it1 = currentPacks->begin(); it1 != itEnd; it1++ ) for( std::vector<TexturePack *>::iterator it1 = currentPacks->begin(); it1 != itEnd; it1++ )
{ {
for( vector<TexturePack *>::iterator it2 = texturePacks->begin(); it2 != texturePacks->end(); it2++ ) for( std::vector<TexturePack *>::iterator it2 = texturePacks->begin(); it2 != texturePacks->end(); it2++ )
{ {
if( *it1 == *it2 ) if( *it1 == *it2 )
{ {
@ -207,7 +207,7 @@ void TexturePackRepository::updateList()
} }
itEnd = texturePacks->end(); itEnd = texturePacks->end();
for( vector<TexturePack *>::iterator it = texturePacks->begin(); it != itEnd; it++ ) for( std::vector<TexturePack *>::iterator it = texturePacks->begin(); it != itEnd; it++ )
{ {
TexturePack *pack = *it; TexturePack *pack = *it;
pack->unload(minecraft->textures); pack->unload(minecraft->textures);
@ -234,7 +234,7 @@ std::wstring TexturePackRepository::getIdOrNull(File file)
return L""; return L"";
} }
vector<File> TexturePackRepository::getWorkDirContents() std::vector<File> TexturePackRepository::getWorkDirContents()
{ {
app.DebugPrintf("TexturePackRepository::getWorkDirContents is not implemented\n"); app.DebugPrintf("TexturePackRepository::getWorkDirContents is not implemented\n");
#if 0 #if 0
@ -244,10 +244,10 @@ vector<File> TexturePackRepository::getWorkDirContents()
return Collections.emptyList(); return Collections.emptyList();
#endif #endif
return vector<File>(); return std::vector<File>();
} }
vector<TexturePack *> *TexturePackRepository::getAll() std::vector<TexturePack *> *TexturePackRepository::getAll()
{ {
// 4J - note that original constucted a copy of texturePacks here // 4J - note that original constucted a copy of texturePacks here
return texturePacks; return texturePacks;
@ -291,9 +291,9 @@ bool TexturePackRepository::canUseWebSkin()
return false; return false;
} }
vector< pair<DWORD,std::wstring> > *TexturePackRepository::getTexturePackIdNames() std::vector< pair<DWORD,std::wstring> > *TexturePackRepository::getTexturePackIdNames()
{ {
vector< pair<DWORD,std::wstring> > *packList = new vector< pair<DWORD,std::wstring> >(); std::vector< pair<DWORD,std::wstring> > *packList = new std::vector< pair<DWORD,std::wstring> >();
for(AUTO_VAR(it,texturePacks->begin()); it != texturePacks->end(); ++it) for(AUTO_VAR(it,texturePacks->begin()); it != texturePacks->end(); ++it)
{ {

View file

@ -18,8 +18,8 @@ private:
Minecraft *minecraft; Minecraft *minecraft;
File workDir; File workDir;
File multiplayerDir; File multiplayerDir;
vector<TexturePack *> *texturePacks; std::vector<TexturePack *> *texturePacks;
vector<TexturePack *> m_texturePacksToDelete; std::vector<TexturePack *> m_texturePacksToDelete;
std::unordered_map<DWORD, TexturePack *> cacheById; std::unordered_map<DWORD, TexturePack *> cacheById;
@ -49,10 +49,10 @@ public:
private: private:
std::wstring getIdOrNull(File file); std::wstring getIdOrNull(File file);
vector<File> getWorkDirContents(); std::vector<File> getWorkDirContents();
public: public:
vector<TexturePack *> *getAll(); std::vector<TexturePack *> *getAll();
TexturePack *getSelected(); TexturePack *getSelected();
bool shouldPromptForWebSkin(); bool shouldPromptForWebSkin();
@ -60,7 +60,7 @@ public:
bool isUsingDefaultSkin() { return selected == DEFAULT_TEXTURE_PACK; } // 4J Added bool isUsingDefaultSkin() { return selected == DEFAULT_TEXTURE_PACK; } // 4J Added
TexturePack *getDefault() { return DEFAULT_TEXTURE_PACK; } // 4J Added TexturePack *getDefault() { return DEFAULT_TEXTURE_PACK; } // 4J Added
vector< pair<DWORD,std::wstring> > *getTexturePackIdNames(); std::vector< pair<DWORD,std::wstring> > *getTexturePackIdNames();
bool selectTexturePackById(DWORD id); // 4J Added bool selectTexturePackById(DWORD id); // 4J Added
TexturePack *getTexturePackById(DWORD id); // 4J Added TexturePack *getTexturePackById(DWORD id); // 4J Added

View file

@ -70,7 +70,7 @@ void PreStitchedTextureMap::stitch()
} }
// Collection bucket for multiple frames per texture // Collection bucket for multiple frames per texture
std::unordered_map<TextureHolder *, vector<Texture *> * > textures; // = new HashMap<TextureHolder, List<Texture>>(); std::unordered_map<TextureHolder *, std::vector<Texture *> * > textures; // = new HashMap<TextureHolder, List<Texture>>();
Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name); Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name);
@ -143,7 +143,7 @@ void PreStitchedTextureMap::stitch()
std::wstring filename = path + textureFileName + extension; std::wstring filename = path + textureFileName + extension;
// TODO: [EB] Put the frames into a proper object, not this inside out hack // TODO: [EB] Put the frames into a proper object, not this inside out hack
vector<Texture *> *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap); std::vector<Texture *> *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap);
if (frames == NULL || frames->empty()) if (frames == NULL || frames->empty())
{ {
continue; // Couldn't load a texture, skip it continue; // Couldn't load a texture, skip it

View file

@ -28,9 +28,9 @@ private:
BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);
StitchedTexture *missingPosition; StitchedTexture *missingPosition;
Texture *stitchResult; Texture *stitchResult;
vector<StitchedTexture *> animatedTextures; // = new ArrayList<StitchedTexture>(); std::vector<StitchedTexture *> animatedTextures; // = new ArrayList<StitchedTexture>();
vector<pair<std::wstring, std::wstring> > texturesToAnimate; std::vector<pair<std::wstring, std::wstring> > texturesToAnimate;
void loadUVs(); void loadUVs();
public: public:

View file

@ -52,7 +52,7 @@ bool StitchSlot::add(TextureHolder *textureHolder)
// See if we're already divided before, if not, setup subSlots // See if we're already divided before, if not, setup subSlots
if (subSlots == NULL) if (subSlots == NULL)
{ {
subSlots = new vector<StitchSlot *>(); subSlots = new std::vector<StitchSlot *>();
// First slot is for the new texture // First slot is for the new texture
subSlots->push_back(new StitchSlot(originX, originY, textureWidth, textureHeight)); subSlots->push_back(new StitchSlot(originX, originY, textureWidth, textureHeight));
@ -132,7 +132,7 @@ bool StitchSlot::add(TextureHolder *textureHolder)
return false; return false;
} }
void StitchSlot::collectAssignments(vector<StitchSlot *> *result) void StitchSlot::collectAssignments(std::vector<StitchSlot *> *result)
{ {
if (textureHolder != NULL) if (textureHolder != NULL)
{ {

View file

@ -11,7 +11,7 @@ private:
const int width; const int width;
const int height; const int height;
vector<StitchSlot *> *subSlots; std::vector<StitchSlot *> *subSlots;
TextureHolder *textureHolder; TextureHolder *textureHolder;
public: public:
@ -21,7 +21,7 @@ public:
int getX(); int getX();
int getY(); int getY();
bool add(TextureHolder *textureHolder); bool add(TextureHolder *textureHolder);
void collectAssignments(vector<StitchSlot *> *result); void collectAssignments(std::vector<StitchSlot *> *result);
//@Override //@Override
std::wstring toString(); std::wstring toString();

View file

@ -75,7 +75,7 @@ void StitchedTexture::initUVs(float U0, float V0, float U1, float V1)
v1 = V1; v1 = V1;
} }
void StitchedTexture::init(Texture *source, vector<Texture *> *frames, int x, int y, int width, int height, bool rotated) void StitchedTexture::init(Texture *source, std::vector<Texture *> *frames, int x, int y, int width, int height, bool rotated)
{ {
this->source = source; this->source = source;
this->frames = frames; this->frames = frames;

View file

@ -11,10 +11,10 @@ private:
protected: protected:
Texture *source; Texture *source;
vector<Texture *> *frames; std::vector<Texture *> *frames;
private: private:
typedef vector<pair<int, int> > intPairVector; typedef std::vector<pair<int, int> > intPairVector;
intPairVector *frameOverride; intPairVector *frameOverride;
int flags; int flags;
@ -49,7 +49,7 @@ protected:
public: public:
void initUVs(float U0, float V0, float U1, float V1); void initUVs(float U0, float V0, float U1, float V1);
void init(Texture *source, vector<Texture *> *frames, int x, int y, int width, int height, bool rotated); void init(Texture *source, std::vector<Texture *> *frames, int x, int y, int width, int height, bool rotated);
void replaceWith(StitchedTexture *texture); void replaceWith(StitchedTexture *texture);
int getX() const; int getX() const;
int getY() const; int getY() const;

View file

@ -60,7 +60,7 @@ Texture *Stitcher::constructTexture(bool mipmap)
stitchedTexture = TextureManager::getInstance()->createTexture(name, Texture::TM_DYNAMIC, storageX, storageY, Texture::TFMT_RGBA, mipmap); stitchedTexture = TextureManager::getInstance()->createTexture(name, Texture::TM_DYNAMIC, storageX, storageY, Texture::TFMT_RGBA, mipmap);
stitchedTexture->fill(stitchedTexture->getRect(), 0xffff0000); stitchedTexture->fill(stitchedTexture->getRect(), 0xffff0000);
vector<StitchSlot *> *slots = gatherAreas(); std::vector<StitchSlot *> *slots = gatherAreas();
for (int index = 0; index < slots->size(); index++) for (int index = 0; index < slots->size(); index++)
{ {
StitchSlot *slot = slots->at(index); StitchSlot *slot = slots->at(index);
@ -96,9 +96,9 @@ void Stitcher::stitch()
} }
} }
vector<StitchSlot *> *Stitcher::gatherAreas() std::vector<StitchSlot *> *Stitcher::gatherAreas()
{ {
vector<StitchSlot *> *result = new vector<StitchSlot *>(); std::vector<StitchSlot *> *result = new std::vector<StitchSlot *>();
//for (StitchSlot slot : storage) //for (StitchSlot slot : storage)
for(AUTO_VAR(it, storage.begin()); it != storage.end(); ++it) for(AUTO_VAR(it, storage.begin()); it != storage.end(); ++it)

View file

@ -17,7 +17,7 @@ public:
private: private:
set<TextureHolder *, TextureHolderLessThan> texturesToBeStitched; // = new HashSet<TextureHolder>(256); set<TextureHolder *, TextureHolderLessThan> texturesToBeStitched; // = new HashSet<TextureHolder>(256);
vector<StitchSlot *> storage; // = new ArrayList<StitchSlot>(256); std::vector<StitchSlot *> storage; // = new ArrayList<StitchSlot>(256);
int storageX; int storageX;
int storageY; int storageY;
@ -41,7 +41,7 @@ public:
void addTexture(TextureHolder *textureHolder); void addTexture(TextureHolder *textureHolder);
Texture *constructTexture(bool mipmap = true); // 4J Added mipmap param Texture *constructTexture(bool mipmap = true); // 4J Added mipmap param
void stitch(); void stitch();
vector<StitchSlot *> *gatherAreas(); std::vector<StitchSlot *> *gatherAreas();
private: private:
// Based on: http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 // Based on: http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2

View file

@ -58,7 +58,7 @@ void TextureMap::stitch()
} }
// Collection bucket for multiple frames per texture // Collection bucket for multiple frames per texture
std::unordered_map<TextureHolder *, vector<Texture *> * > textures; // = new HashMap<TextureHolder, List<Texture>>(); std::unordered_map<TextureHolder *, std::vector<Texture *> * > textures; // = new HashMap<TextureHolder, List<Texture>>();
Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name); Stitcher *stitcher = TextureManager::getInstance()->createStitcher(name);
@ -74,9 +74,9 @@ void TextureMap::stitch()
TextureHolder *missingHolder = new TextureHolder(missingTex); TextureHolder *missingHolder = new TextureHolder(missingTex);
stitcher->addTexture(missingHolder); stitcher->addTexture(missingHolder);
vector<Texture *> *missingVec = new vector<Texture *>(); std::vector<Texture *> *missingVec = new std::vector<Texture *>();
missingVec->push_back(missingTex); missingVec->push_back(missingTex);
textures.insert( std::unordered_map<TextureHolder *, vector<Texture *> * >::value_type( missingHolder, missingVec )); textures.insert( std::unordered_map<TextureHolder *, std::vector<Texture *> * >::value_type( missingHolder, missingVec ));
// Extract frames from textures and add them to the stitchers // Extract frames from textures and add them to the stitchers
//for (final String name : texturesToRegister.keySet()) //for (final String name : texturesToRegister.keySet())
@ -87,7 +87,7 @@ void TextureMap::stitch()
std::wstring filename = path + name + extension; std::wstring filename = path + name + extension;
// TODO: [EB] Put the frames into a proper object, not this inside out hack // TODO: [EB] Put the frames into a proper object, not this inside out hack
vector<Texture *> *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap); std::vector<Texture *> *frames = TextureManager::getInstance()->createTextures(filename, m_mipMap);
if (frames == NULL || frames->empty()) if (frames == NULL || frames->empty())
{ {
@ -98,7 +98,7 @@ void TextureMap::stitch()
stitcher->addTexture(holder); stitcher->addTexture(holder);
// Store frames // Store frames
textures.insert( std::unordered_map<TextureHolder *, vector<Texture *> * >::value_type( holder, frames ) ); textures.insert( std::unordered_map<TextureHolder *, std::vector<Texture *> * >::value_type( holder, frames ) );
} }
// Stitch! // Stitch!
@ -123,7 +123,7 @@ void TextureMap::stitch()
Texture *texture = textureHolder->getTexture(); Texture *texture = textureHolder->getTexture();
std::wstring textureName = texture->getName(); std::wstring textureName = texture->getName();
vector<Texture *> *frames = textures.find(textureHolder)->second; std::vector<Texture *> *frames = textures.find(textureHolder)->second;
StitchedTexture *stored = NULL; StitchedTexture *stored = NULL;

View file

@ -26,7 +26,7 @@ private:
BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); BufferedImage *missingTexture; // = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);
StitchedTexture *missingPosition; StitchedTexture *missingPosition;
Texture *stitchResult; Texture *stitchResult;
vector<StitchedTexture *> animatedTextures; // = new ArrayList<StitchedTexture>(); std::vector<StitchedTexture *> animatedTextures; // = new ArrayList<StitchedTexture>();
stringStitchedTextureMap texturesToRegister; // = new HashMap<String, StitchedTexture>(); stringStitchedTextureMap texturesToRegister; // = new HashMap<String, StitchedTexture>();

View file

@ -80,9 +80,9 @@ Stitcher *TextureManager::createStitcher(const std::wstring &name)
return new Stitcher(name, maxTextureSize, maxTextureSize, true); return new Stitcher(name, maxTextureSize, maxTextureSize, true);
} }
vector<Texture *> *TextureManager::createTextures(const std::wstring &filename, bool mipmap) std::vector<Texture *> *TextureManager::createTextures(const std::wstring &filename, bool mipmap)
{ {
vector<Texture *> *result = new vector<Texture *>(); std::vector<Texture *> *result = new std::vector<Texture *>();
TexturePack *texturePack = Minecraft::GetInstance()->skins->getSelected(); TexturePack *texturePack = Minecraft::GetInstance()->skins->getSelected();
//try { //try {
int mode = Texture::TM_CONTAINER; // Most important -- so it doesn't get uploaded to videoram int mode = Texture::TM_CONTAINER; // Most important -- so it doesn't get uploaded to videoram

View file

@ -29,7 +29,7 @@ public:
void registerTexture(Texture *texture); void registerTexture(Texture *texture);
void unregisterTexture(const std::wstring &name, Texture *texture); void unregisterTexture(const std::wstring &name, Texture *texture);
Stitcher *createStitcher(const std::wstring &name); Stitcher *createStitcher(const std::wstring &name);
vector<Texture *> *createTextures(const std::wstring &filename, bool mipmap); // 4J added mipmap param std::vector<Texture *> *createTextures(const std::wstring &filename, bool mipmap); // 4J added mipmap param
private: private:
std::wstring getTextureNameFromPath(const std::wstring &filename); std::wstring getTextureNameFromPath(const std::wstring &filename);

View file

@ -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) void Font::drawWordWrapInternal(const std::wstring& string, int x, int y, int w, int col, bool darken, int h)
{ {
vector<std::wstring>lines = stringSplit(string,L'\n'); std::vector<std::wstring>lines = stringSplit(string,L'\n');
if (lines.size() > 1) if (lines.size() > 1)
{ {
AUTO_VAR(itEnd, lines.end()); AUTO_VAR(itEnd, lines.end());
@ -375,7 +375,7 @@ void Font::drawWordWrapInternal(const std::wstring& string, int x, int y, int w,
} }
return; return;
} }
vector<std::wstring> words = stringSplit(string,L' '); std::vector<std::wstring> words = stringSplit(string,L' ');
unsigned int pos = 0; unsigned int pos = 0;
while (pos < words.size()) 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) int Font::wordWrapHeight(const std::wstring& string, int w)
{ {
vector<std::wstring> lines = stringSplit(string,L'\n'); std::vector<std::wstring> lines = stringSplit(string,L'\n');
if (lines.size() > 1) if (lines.size() > 1)
{ {
int h = 0; int h = 0;
@ -424,7 +424,7 @@ int Font::wordWrapHeight(const std::wstring& string, int w)
} }
return h; return h;
} }
vector<std::wstring> words = stringSplit(string,L' '); std::vector<std::wstring> words = stringSplit(string,L' ');
unsigned int pos = 0; unsigned int pos = 0;
int y = 0; int y = 0;
while (pos < words.size()) while (pos < words.size())

View file

@ -12,7 +12,7 @@ private:
//static const int MAX_MESSAGE_WIDTH = 320; //static const int MAX_MESSAGE_WIDTH = 320;
static const int m_iMaxMessageWidth = 280; static const int m_iMaxMessageWidth = 280;
static ItemRenderer *itemRenderer; static ItemRenderer *itemRenderer;
vector<GuiMessage> guiMessages[XUSER_MAX_COUNT]; std::vector<GuiMessage> guiMessages[XUSER_MAX_COUNT];
Random *random; Random *random;
Minecraft *minecraft; Minecraft *minecraft;

View file

@ -13,7 +13,7 @@ public:
int width; int width;
int height; int height;
protected: protected:
vector<Button *> buttons; std::vector<Button *> buttons;
public: public:
bool passEvents; bool passEvents;
protected: protected:

View file

@ -52,7 +52,7 @@ void JoinMultiplayerScreen::buttonClicked(Button *button)
minecraft->options->lastMpIp = replaceAll(ip,L":", L"_"); minecraft->options->lastMpIp = replaceAll(ip,L":", L"_");
minecraft->options->save(); minecraft->options->save();
vector<std::wstring> parts = stringSplit(ip,L'L'); std::vector<std::wstring> parts = stringSplit(ip,L'L');
if (ip[0]==L'[') if (ip[0]==L'[')
{ {
int pos = (int)ip.find(L"]"); int pos = (int)ip.find(L"]");

View file

@ -29,7 +29,7 @@ protected:
private: private:
bool done; bool done;
int selectedWorld; int selectedWorld;
vector<LevelSummary *> *levelList; std::vector<LevelSummary *> *levelList;
WorldSelectionList *worldSelectionList; WorldSelectionList *worldSelectionList;
std::wstring worldLang; std::wstring worldLang;
std::wstring conversionLang; std::wstring conversionLang;

View file

@ -418,7 +418,7 @@ void StatsScreen::StatisticsList::sortByColumn(int column)
StatsScreen::ItemStatisticsList::ItemStatisticsList(StatsScreen *ss) : StatsScreen::StatisticsList(ss) StatsScreen::ItemStatisticsList::ItemStatisticsList(StatsScreen *ss) : StatsScreen::StatisticsList(ss)
{ {
//4J Gordon: Removed, not used anyway //4J Gordon: Removed, not used anyway
/*for(vector<ItemStat *>::iterator it = Stats::itemStats->begin(); it != Stats::itemStats->end(); it++ ) /*for(std::vector<ItemStat *>::iterator it = Stats::itemStats->begin(); it != Stats::itemStats->end(); it++ )
{ {
ItemStat *stat = *it; ItemStat *stat = *it;
@ -545,7 +545,7 @@ std::wstring StatsScreen::ItemStatisticsList::getHeaderDescriptionId(int column)
StatsScreen::BlockStatisticsList::BlockStatisticsList(StatsScreen *ss) : StatisticsList(ss) StatsScreen::BlockStatisticsList::BlockStatisticsList(StatsScreen *ss) : StatisticsList(ss)
{ {
//4J Gordon: Removed, not used anyway //4J Gordon: Removed, not used anyway
/*for(vector<ItemStat *>::iterator it = Stats::blockStats->begin(); it != Stats::blockStats->end(); it++ ) /*for(std::vector<ItemStat *>::iterator it = Stats::blockStats->begin(); it != Stats::blockStats->end(); it++ )
{ {
ItemStat *stat = *it; ItemStat *stat = *it;

View file

@ -78,7 +78,7 @@ private:
StatsScreen *parent; StatsScreen *parent;
protected: protected:
int headerPressed; int headerPressed;
vector<ItemStat *> statItemList; std::vector<ItemStat *> statItemList;
// Comparator<ItemStat> itemStatSorter; // Comparator<ItemStat> itemStatSorter;
int sortColumn; int sortColumn;

View file

@ -22,7 +22,7 @@ TitleScreen::TitleScreen()
splash = L"missingno"; splash = L"missingno";
// try { // 4J - removed try/catch // try { // 4J - removed try/catch
vector<std::wstring> splashes; std::vector<std::wstring> splashes;
/* /*
BufferedReader *br = new BufferedReader(new InputStreamReader(InputStream::getResourceAsStream(L"res\\title\\splashes.txt"))); //, Charset.forName("UTF-8") BufferedReader *br = new BufferedReader(new InputStreamReader(InputStream::getResourceAsStream(L"res\\title\\splashes.txt"))); //, Charset.forName("UTF-8")

View file

@ -81,7 +81,7 @@ void ScrolledSelectionList::renderDecorations(int mouseX, int mouseY)
return -1; return -1;
} }
void ScrolledSelectionList::init(vector<Button *> *buttons, int upButtonId, int downButtonId) void ScrolledSelectionList::init(std::vector<Button *> *buttons, int upButtonId, int downButtonId)
{ {
this->upId = upButtonId; this->upId = upButtonId;
this->downId = downButtonId; this->downId = downButtonId;

View file

@ -51,7 +51,7 @@ protected:
void renderDecorations(int mouseX, int mouseY); void renderDecorations(int mouseX, int mouseY);
public: public:
int getItemAtPosition(int x, int y); int getItemAtPosition(int x, int y);
void init(vector<Button *> *buttons, int upButtonId, int downButtonId); void init(std::vector<Button *> *buttons, int upButtonId, int downButtonId);
private: private:
void capYPosition(); void capYPosition();
public: public:

View file

@ -74,9 +74,9 @@ ArchiveFile::~ArchiveFile()
delete m_cachedData; delete m_cachedData;
} }
vector<std::wstring> *ArchiveFile::getFileList() std::vector<std::wstring> *ArchiveFile::getFileList()
{ {
vector<std::wstring> *out = new vector<std::wstring>(); std::vector<std::wstring> *out = new std::vector<std::wstring>();
for ( AUTO_VAR(it, m_index.begin()); for ( AUTO_VAR(it, m_index.begin());
it != m_index.end(); it != m_index.end();

View file

@ -31,7 +31,7 @@ public:
ArchiveFile(File file); ArchiveFile(File file);
~ArchiveFile(); ~ArchiveFile();
vector<std::wstring> *getFileList(); std::vector<std::wstring> *getFileList();
bool hasFile(const std::wstring &filename); bool hasFile(const std::wstring &filename);
int getFileSize(const std::wstring &filename); int getFileSize(const std::wstring &filename);
byteArray getFile(const std::wstring &filename); byteArray getFile(const std::wstring &filename);

View file

@ -5,7 +5,7 @@
#include "../../Minecraft.World/IO/Streams/FloatBuffer.h" #include "../../Minecraft.World/IO/Streams/FloatBuffer.h"
std::unordered_map<int,int> MemoryTracker::GL_LIST_IDS; std::unordered_map<int,int> MemoryTracker::GL_LIST_IDS;
vector<int> MemoryTracker::TEXTURE_IDS; std::vector<int> MemoryTracker::TEXTURE_IDS;
int MemoryTracker::genLists(int count) int MemoryTracker::genLists(int count)
{ {

View file

@ -13,7 +13,7 @@ class MemoryTracker
{ {
private: private:
static std::unordered_map<int,int> GL_LIST_IDS; static std::unordered_map<int,int> GL_LIST_IDS;
static vector<int> TEXTURE_IDS; static std::vector<int> TEXTURE_IDS;
public: public:
static int genLists(int count); static int genLists(int count);

View file

@ -17,16 +17,16 @@ StringTable::StringTable(PBYTE pbData, DWORD dwSize)
int versionNumber = dis.readInt(); int versionNumber = dis.readInt();
int languagesCount = dis.readInt(); int languagesCount = dis.readInt();
vector< pair<std::wstring, int> > langSizeMap; std::vector< pair<std::wstring, int> > langSizeMap;
for(int i = 0; i < languagesCount; ++i) for(int i = 0; i < languagesCount; ++i)
{ {
std::wstring langId = dis.readUTF(); std::wstring langId = dis.readUTF();
int langSize = dis.readInt(); int langSize = dis.readInt();
langSizeMap.push_back( vector< pair<std::wstring, int> >::value_type(langId, langSize)); langSizeMap.push_back( std::vector< pair<std::wstring, int> >::value_type(langId, langSize));
} }
vector<std::wstring> locales; std::vector<std::wstring> locales;
app.getLocale(locales); app.getLocale(locales);
bool foundLang = false; bool foundLang = false;

View file

@ -16,7 +16,7 @@ private:
bool isStatic; bool isStatic;
std::unordered_map<std::wstring, std::wstring> m_stringsMap; std::unordered_map<std::wstring, std::wstring> m_stringsMap;
vector<std::wstring> m_stringsVec; std::vector<std::wstring> m_stringsVec;
byteArray src; byteArray src;

View file

@ -7,7 +7,7 @@ class WstringLookup
private: private:
UINT numIDs; UINT numIDs;
std::unordered_map<std::wstring, UINT> str2int; std::unordered_map<std::wstring, UINT> str2int;
vector<std::wstring> int2str; std::vector<std::wstring> int2str;
public: public:
WstringLookup(); WstringLookup();

View file

@ -4,8 +4,8 @@ class Sensing
{ {
private: private:
Mob *mob; Mob *mob;
vector<weak_ptr<Entity> > seen; std::vector<weak_ptr<Entity> > seen;
vector<weak_ptr<Entity> > unseen; std::vector<weak_ptr<Entity> > unseen;
public: public:
Sensing(Mob *mob); Sensing(Mob *mob);

View file

@ -40,7 +40,7 @@ bool AvoidPlayerGoal::canUse()
} }
else else
{ {
vector<std::shared_ptr<Entity> > *entities = mob->level->getEntitiesOfClass(avoidType, mob->bb->grow(maxDist, 3, maxDist)); std::vector<std::shared_ptr<Entity> > *entities = mob->level->getEntitiesOfClass(avoidType, mob->bb->grow(maxDist, 3, maxDist));
if (entities->empty()) if (entities->empty())
{ {
delete entities; delete entities;

View file

@ -49,7 +49,7 @@ void BreedGoal::tick()
std::shared_ptr<Animal> BreedGoal::getFreePartner() std::shared_ptr<Animal> BreedGoal::getFreePartner()
{ {
float r = 8; float r = 8;
vector<std::shared_ptr<Entity> > *others = level->getEntitiesOfClass(typeid(*animal), animal->bb->grow(r, r, r)); std::vector<std::shared_ptr<Entity> > *others = level->getEntitiesOfClass(typeid(*animal), animal->bb->grow(r, r, r));
for(AUTO_VAR(it, others->begin()); it != others->end(); ++it) for(AUTO_VAR(it, others->begin()); it != others->end(); ++it)
{ {
std::shared_ptr<Animal> p = dynamic_pointer_cast<Animal>(*it); std::shared_ptr<Animal> p = dynamic_pointer_cast<Animal>(*it);

View file

@ -18,7 +18,7 @@ bool FollowParentGoal::canUse()
{ {
if (animal->getAge() >= 0) return false; if (animal->getAge() >= 0) return false;
vector<std::shared_ptr<Entity> > *parents = animal->level->getEntitiesOfClass(typeid(*animal), animal->bb->grow(8, 4, 8)); std::vector<std::shared_ptr<Entity> > *parents = animal->level->getEntitiesOfClass(typeid(*animal), animal->bb->grow(8, 4, 8));
std::shared_ptr<Animal> closest = nullptr; std::shared_ptr<Animal> closest = nullptr;
double closestDistSqr = Double::MAX_VALUE; double closestDistSqr = Double::MAX_VALUE;

View file

@ -32,7 +32,7 @@ void GoalSelector::addGoal(int prio, Goal *goal, bool canDeletePointer /*= true*
void GoalSelector::tick() void GoalSelector::tick()
{ {
vector<InternalGoal *> toStart; std::vector<InternalGoal *> toStart;
if(tickCount++ % newGoalRate == 0) if(tickCount++ % newGoalRate == 0)
{ {
@ -97,7 +97,7 @@ void GoalSelector::tick()
} }
} }
vector<GoalSelector::InternalGoal *> *GoalSelector::getRunningGoals() std::vector<GoalSelector::InternalGoal *> *GoalSelector::getRunningGoals()
{ {
return &usingGoals; return &usingGoals;
} }

View file

@ -18,8 +18,8 @@ private:
}; };
private: private:
vector<InternalGoal *> goals; std::vector<InternalGoal *> goals;
vector<InternalGoal *> usingGoals; std::vector<InternalGoal *> usingGoals;
int tickCount; int tickCount;
int newGoalRate; int newGoalRate;
@ -30,7 +30,7 @@ public:
// 4J Added canDelete param // 4J Added canDelete param
void addGoal(int prio, Goal *goal, bool canDeletePointer = true); void addGoal(int prio, Goal *goal, bool canDeletePointer = true);
void tick(); void tick();
vector<InternalGoal *> *getRunningGoals(); std::vector<InternalGoal *> *getRunningGoals();
private: private:
bool canContinueToUse(InternalGoal *ig); bool canContinueToUse(InternalGoal *ig);

View file

@ -22,7 +22,7 @@ void HurtByTargetGoal::start()
if (alertSameType) if (alertSameType)
{ {
vector<std::shared_ptr<Entity> > *nearby = mob->level->getEntitiesOfClass(typeid(*mob), AABB::newTemp(mob->x, mob->y, mob->z, mob->x + 1, mob->y + 1, mob->z + 1)->grow(within, 4, within)); std::vector<std::shared_ptr<Entity> > *nearby = mob->level->getEntitiesOfClass(typeid(*mob), AABB::newTemp(mob->x, mob->y, mob->z, mob->x + 1, mob->y + 1, mob->z + 1)->grow(within, 4, within));
for(AUTO_VAR(it, nearby->begin()); it != nearby->end(); ++it) for(AUTO_VAR(it, nearby->begin()); it != nearby->end(); ++it)
{ {
std::shared_ptr<Mob> other = dynamic_pointer_cast<Mob>(*it); std::shared_ptr<Mob> other = dynamic_pointer_cast<Mob>(*it);

Some files were not shown because too many files have changed in this diff Show more