1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-03 09:09:47 +02:00

rwgame: create texture filename in buffer in one go

This commit is contained in:
Anonymous Maarten 2017-09-12 01:39:24 +02:00 committed by Daniel Evans
parent 32fb5eb409
commit 5edead61d0

View File

@ -20,6 +20,7 @@
#include <boost/algorithm/string/predicate.hpp>
#include <functional>
#include <iomanip>
std::map<GameRenderer::SpecialModel, std::string> kSpecialModels = {
{GameRenderer::ZoneCylinderA, "zonecyla.dff"},
@ -78,9 +79,9 @@ RWGame::RWGame(Logger& log, int argc, char* argv[])
128 * 128);
for (int m = 0; m < MAP_BLOCK_SIZE; ++m) {
std::string num = (m < 10 ? "0" : "");
std::string name = "radar" + num + std::to_string(m);
data.loadTXD(name + ".txd");
std::ostringstream oss;
oss << "radar" << std::setw(2) << std::setfill('0') << m << ".txd";
data.loadTXD(oss.str());
}
StateManager::get().enter<LoadingState>(this, [=]() {