summaryrefslogtreecommitdiffstats
path: root/src/graphics
diff options
context:
space:
mode:
authorKrzysztof Dermont <erihel@gmail.com>2014-06-22 16:29:26 +0200
committerKrzysztof Dermont <erihel@gmail.com>2014-06-22 16:29:26 +0200
commit0556b5dfbcf8e3fe26ec4c773367d2f77e2c0ec9 (patch)
tree06a63d18fa954de31ff4b69303510caf5b5fadb0 /src/graphics
parent754154341dba420e5bfc3190c81deb2859d751ba (diff)
downloadcolobot-0556b5dfbcf8e3fe26ec4c773367d2f77e2c0ec9.tar.gz
colobot-0556b5dfbcf8e3fe26ec4c773367d2f77e2c0ec9.tar.bz2
colobot-0556b5dfbcf8e3fe26ec4c773367d2f77e2c0ec9.zip
Added Exist() to resource manager, updated model
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/engine/modelfile.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/graphics/engine/modelfile.cpp b/src/graphics/engine/modelfile.cpp
index 99496aa..0e3cbf8 100644
--- a/src/graphics/engine/modelfile.cpp
+++ b/src/graphics/engine/modelfile.cpp
@@ -22,6 +22,8 @@
#include "common/logger.h"
#include "common/stringutils.h"
+#include "common/resources/inputstream.h"
+
#include "graphics/engine/engine.h"
#include "math/geometry.h"
@@ -432,8 +434,8 @@ bool CModelFile::ReadModel(const std::string& fileName)
{
m_triangles.clear();
- std::ifstream stream;
- stream.open(fileName.c_str(), std::ios_base::in | std::ios_base::binary);
+ CInputStream stream;
+ stream.open(fileName.c_str());
if (!stream.good())
{
GetLogger()->Error("Could not open file '%s'\n", fileName.c_str());
@@ -823,8 +825,8 @@ struct NewModelTriangle1
bool CModelFile::ReadTextModel(const std::string& fileName)
{
- std::ifstream stream;
- stream.open(fileName.c_str(), std::ios_base::in);
+ CInputStream stream;
+ stream.open(fileName.c_str());
if (!stream.good())
{
GetLogger()->Error("Could not open file '%s'\n", fileName.c_str());
@@ -1020,8 +1022,8 @@ bool CModelFile::WriteTextModel(std::ostream& stream)
bool CModelFile::ReadBinaryModel(const std::string& fileName)
{
- std::ifstream stream;
- stream.open(fileName.c_str(), std::ios_base::in | std::ios_base::binary);
+ CInputStream stream;
+ stream.open(fileName.c_str());
if (!stream.good())
{
GetLogger()->Error("Could not open file '%s'\n", fileName.c_str());