1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 03:12:36 +01: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 <boost/algorithm/string/predicate.hpp>
#include <functional> #include <functional>
#include <iomanip>
std::map<GameRenderer::SpecialModel, std::string> kSpecialModels = { std::map<GameRenderer::SpecialModel, std::string> kSpecialModels = {
{GameRenderer::ZoneCylinderA, "zonecyla.dff"}, {GameRenderer::ZoneCylinderA, "zonecyla.dff"},
@ -78,9 +79,9 @@ RWGame::RWGame(Logger& log, int argc, char* argv[])
128 * 128); 128 * 128);
for (int m = 0; m < MAP_BLOCK_SIZE; ++m) { for (int m = 0; m < MAP_BLOCK_SIZE; ++m) {
std::string num = (m < 10 ? "0" : ""); std::ostringstream oss;
std::string name = "radar" + num + std::to_string(m); oss << "radar" << std::setw(2) << std::setfill('0') << m << ".txd";
data.loadTXD(name + ".txd"); data.loadTXD(oss.str());
} }
StateManager::get().enter<LoadingState>(this, [=]() { StateManager::get().enter<LoadingState>(this, [=]() {