summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2013-05-12 14:55:41 +0200
committerkrzys-h <krzys_h@interia.pl>2013-05-12 14:55:41 +0200
commit04f747b00b95ebbd32457eae8a397695dc6981af (patch)
tree7562002a77ad50c637a6e90cca3956972917460e /src/app
parent06cf93f466871eb9f6d6d93feaeaef14f58573af (diff)
downloadcolobot-04f747b00b95ebbd32457eae8a397695dc6981af.tar.gz
colobot-04f747b00b95ebbd32457eae8a397695dc6981af.tar.bz2
colobot-04f747b00b95ebbd32457eae8a397695dc6981af.zip
Added simple texturepack support (#208)
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.cpp17
-rw-r--r--src/app/app.h3
2 files changed, 18 insertions, 2 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 190f667..87b9e39 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -149,6 +149,8 @@ CApplication::CApplication()
m_language = LANGUAGE_ENV;
+ m_texPack = "";
+
m_lowCPU = true;
for (int i = 0; i < DIR_MAX; ++i)
@@ -219,7 +221,8 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[])
OPT_LOGLEVEL,
OPT_LANGUAGE,
OPT_LANGDIR,
- OPT_VBO
+ OPT_VBO,
+ OPT_TEXPACK
};
option options[] =
@@ -230,7 +233,8 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[])
{ "loglevel", required_argument, nullptr, OPT_LOGLEVEL },
{ "language", required_argument, nullptr, OPT_LANGUAGE },
{ "langdir", required_argument, nullptr, OPT_LANGDIR },
- { "vbo", required_argument, nullptr, OPT_VBO }
+ { "vbo", required_argument, nullptr, OPT_VBO },
+ { "texpack", required_argument, nullptr, OPT_TEXPACK }
};
opterr = 0;
@@ -267,6 +271,7 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[])
GetLogger()->Message(" -language lang set language (one of: en, de, fr, pl)\n");
GetLogger()->Message(" -langdir path set custom language directory path\n");
GetLogger()->Message(" -vbo mode set OpenGL VBO mode (one of: auto, enable, disable)\n");
+ GetLogger()->Message(" -texpack name set texture pack\n");
return PARSE_ARGS_HELP;
}
case OPT_DEBUG:
@@ -330,6 +335,12 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[])
break;
}
+ case OPT_TEXPACK:
+ {
+ m_texPack = optarg;
+ GetLogger()->Info("Using texturepack: '%s'\n", m_texPack.c_str());
+ break;
+ }
default:
assert(false); // should never get here
}
@@ -484,6 +495,8 @@ bool CApplication::Create()
m_engine->SetDevice(m_device);
+ m_engine->SetTexturePack(m_texPack);
+
if (! m_engine->Create() )
{
m_errorMessage = std::string("Error in CEngine::Init()\n") + standardInfoMessage;
diff --git a/src/app/app.h b/src/app/app.h
index 07f1b90..073ac97 100644
--- a/src/app/app.h
+++ b/src/app/app.h
@@ -467,6 +467,9 @@ protected:
//! Application language
Language m_language;
+ //! Texture pack
+ std::string m_texPack;
+
//! Low cpu mode
bool m_lowCPU;
};