summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-12-26 20:58:02 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2012-12-26 20:58:02 +0100
commit5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4 (patch)
treeb742447d1b3262c1541e9c0fe037ad35be467dff /src/tools
parentf9f15a2f3f80f968a64e76141b1e6fa5e28c7232 (diff)
downloadcolobot-5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4.tar.gz
colobot-5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4.tar.bz2
colobot-5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4.zip
Engine optimization - rewritten model management
- new class CModelManager - rewritten engine object structure in CEngine - created shared model data instead of separate objects per each model instance - minor refactoring
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/CMakeLists.txt1
-rw-r--r--src/tools/convert_model.cpp21
2 files changed, 4 insertions, 18 deletions
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index f6c6112..3653357 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -1,5 +1,4 @@
set(CONVERT_MODEL_SOURCES
-../common/iman.cpp
../common/logger.cpp
../common/stringutils.cpp
../graphics/engine/modelfile.cpp
diff --git a/src/tools/convert_model.cpp b/src/tools/convert_model.cpp
index a33d7d0..3eecfb1 100644
--- a/src/tools/convert_model.cpp
+++ b/src/tools/convert_model.cpp
@@ -1,4 +1,3 @@
-#include "common/iman.h"
#include "common/logger.h"
#include "graphics/engine/modelfile.h"
@@ -8,11 +7,10 @@
bool EndsWith(std::string const &fullString, std::string const &ending)
{
- if (fullString.length() >= ending.length()) {
+ if (fullString.length() >= ending.length())
return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));
- } else {
+ else
return false;
- }
}
@@ -20,7 +18,6 @@ struct Args
{
bool usage;
bool dumpInfo;
- bool mirror;
std::string inputFile;
std::string outputFile;
std::string inputFormat;
@@ -30,7 +27,6 @@ struct Args
{
usage = false;
dumpInfo = false;
- mirror = false;
}
};
@@ -43,8 +39,7 @@ void PrintUsage(const std::string& program)
std::cerr << "Usage:" << std::endl;
std::cerr << std::endl;
std::cerr << " Convert files:" << std::endl;
- std::cerr << " " << program << " -i input_file -if input_format -o output_file -of output_format [-m]" << std::endl;
- std::cerr << " -m => mirror" << std::endl;
+ std::cerr << " " << program << " -i input_file -if input_format -o output_file -of output_format" << std::endl;
std::cerr << std::endl;
std::cerr << " Dump info:" << std::endl;
std::cerr << " " << program << " -d -i input_file -if input_format" << std::endl;
@@ -117,10 +112,6 @@ bool ParseArgs(int argc, char *argv[])
{
ARGS.dumpInfo = true;
}
- else if (arg == "-m")
- {
- ARGS.mirror = true;
- }
else
{
return false;
@@ -165,8 +156,7 @@ int main(int argc, char *argv[])
if (ARGS.usage)
return 0;
- CInstanceManager iMan;
- Gfx::CModelFile model(&iMan);
+ Gfx::CModelFile model;
bool ok = true;
@@ -255,9 +245,6 @@ int main(int argc, char *argv[])
return 0;
}
- if (ARGS.mirror)
- model.Mirror();
-
if (ARGS.outputFormat == "old")
{
ok = model.WriteModel(ARGS.outputFile);