From 994816a1f77a3b16b17c44357d858156806cfe6b Mon Sep 17 00:00:00 2001 From: Pawel Kolodziejski Date: Sun, 10 May 2009 16:43:41 +0000 Subject: [PATCH] remove rest std:: and some cleanup --- engine/actor.cpp | 2 +- engine/actor.h | 4 +- engine/colormap.h | 13 +++---- engine/costume.cpp | 36 +++++++++--------- engine/costume.h | 2 +- engine/engine.h | 8 ++-- engine/imuse/imuse_sndmgr.cpp | 4 +- engine/keyframe.cpp | 10 ++--- engine/lipsync.cpp | 4 +- engine/lua.cpp | 35 ++++++----------- engine/model.cpp | 12 +++--- engine/resource.cpp | 72 ++++++++++++++++------------------- engine/resource.h | 8 ++-- engine/savegame.h | 6 --- engine/vector3d.h | 2 +- 15 files changed, 92 insertions(+), 126 deletions(-) diff --git a/engine/actor.cpp b/engine/actor.cpp index 456f2abc59f..e21b06b54b1 100644 --- a/engine/actor.cpp +++ b/engine/actor.cpp @@ -504,7 +504,7 @@ void Actor::update() { // have the actor turn all the way to the destination yaw. // Without this some actors will lock the interface on changing // scenes, this affects the Bone Wagon in particular. - if (turnAmt == 0 || turnAmt >= std::abs(dyaw)) { + if (turnAmt == 0 || turnAmt >= abs(dyaw)) { setYaw(_destYaw); _turning = false; } diff --git a/engine/actor.h b/engine/actor.h index 12852bc1921..463d0a95df0 100644 --- a/engine/actor.h +++ b/engine/actor.h @@ -158,8 +158,8 @@ public: void setHead( int joint1, int joint2, int joint3, float maxRoll, float maxPitch, float maxYaw); private: - std::string _name; - std::string _setName; // The actual current set + Common::String _name; + Common::String _setName; // The actual current set Color _talkColor; Vector3d _pos; float _pitch, _yaw, _roll; diff --git a/engine/colormap.h b/engine/colormap.h index 29ddbe6ab83..cef10d451ce 100644 --- a/engine/colormap.h +++ b/engine/colormap.h @@ -26,18 +26,17 @@ #ifndef COLORMAP_H #define COLORMAP_H -#include "engine/resource.h" +#include "common/endian.h" -#include +#include "engine/resource.h" class CMap : public Resource { public: // Load a colormap from the given data. - CMap(const char *filename, const char *data, int len) : - Resource(filename) { - if (len < 4 || std::memcmp(data, "CMP ", 4) != 0) - error("Invalid magic loading colormap"); - std::memcpy(_colors, data + 64, sizeof(_colors)); + CMap(const char *filename, const char *data, int len) : Resource(filename) { + if (len < 4 || READ_BE_UINT32(data) != MKID_BE('CMP ')) + error("Invalid magic loading colormap"); + memcpy(_colors, data + 64, sizeof(_colors)); } // The color data, in RGB format diff --git a/engine/costume.cpp b/engine/costume.cpp index 9b0db17ce9d..5cd6fd31f67 100644 --- a/engine/costume.cpp +++ b/engine/costume.cpp @@ -100,7 +100,7 @@ public: void setKey(int val); private: - std::string _filename; + Common::String _filename; }; class ColormapComponent : public Costume::Component { @@ -125,7 +125,7 @@ public: void draw(); protected: - std::string _filename; + Common::String _filename; ResPtr _obj; Model::HierNode *_hier; Matrix4 _matrix; @@ -164,7 +164,7 @@ public: Model::HierNode *node() { return _node; } private: - std::string _name; + Common::String _name; int _num; Model::HierNode *_node; Matrix4 _matrix; @@ -206,14 +206,14 @@ void BitmapComponent::setKey(int val) { ModelComponent::ModelComponent(Costume::Component *parent, int parentID, const char *filename, Costume::Component *prevComponent, tag32 tag) : Costume::Component(parent, parentID, tag), _filename(filename), _obj(NULL), _hier(NULL) { - const char *comma = std::strchr(filename, ','); + const char *comma = strchr(filename, ','); // Can be called with a comma and a numeric parameter afterward, but // the use for this parameter is currently unknown // Example: At the "scrimshaw parlor" in Rubacava the object // "manny_cafe.3do,1" is requested if (comma) { - _filename = std::string(filename, comma); + _filename = Common::String(filename, comma); warning("Comma in model components not supported: %s", filename); } else { _filename = filename; @@ -375,7 +375,7 @@ public: private: ResPtr _mat; - std::string _filename; + Common::String _filename; int _num; }; @@ -412,11 +412,11 @@ private: KeyframeComponent::KeyframeComponent(Costume::Component *parent, int parentID, const char *filename, tag32 tag) : Costume::Component(parent, parentID, tag), _priority1(1), _priority2(5), _hier(NULL), _active(false) { - const char *comma = std::strchr(filename, ','); + const char *comma = strchr(filename, ','); if (comma) { - std::string realName(filename, comma); + Common::String realName(filename, comma); _keyf = g_resourceloader->loadKeyframe(realName.c_str()); - std::sscanf(comma + 1, "%d,%d", &_priority1, &_priority2); + sscanf(comma + 1, "%d,%d", &_priority1, &_priority2); } else _keyf = g_resourceloader->loadKeyframe(filename); } @@ -492,7 +492,7 @@ void KeyframeComponent::init() { MeshComponent::MeshComponent(Costume::Component *parent, int parentID, const char *name, tag32 tag) : Costume::Component(parent, parentID, tag), _name(name), _node(NULL) { - if (std::sscanf(name, "mesh %d", &_num) < 1) + if (sscanf(name, "mesh %d", &_num) < 1) error("Couldn't parse mesh name %s", name); } @@ -561,7 +561,7 @@ public: ~LuaVarComponent() { } private: - std::string _name; + Common::String _name; }; LuaVarComponent::LuaVarComponent(Costume::Component *parent, int parentID, const char *name, tag32 tag) : @@ -584,14 +584,14 @@ public: } private: - std::string _soundName; + Common::String _soundName; }; SoundComponent::SoundComponent(Costume::Component *parent, int parentID, const char *filename, tag32 tag) : Costume::Component(parent, parentID, tag) { - const char *comma = std::strchr(filename, ','); + const char *comma = strchr(filename, ','); if (comma) { - _soundName = std::string(filename, comma); + _soundName = Common::String(filename, comma); } else { _soundName = filename; } @@ -644,7 +644,7 @@ Costume::Costume(const char *filename, const char *data, int len, Costume *prevC // Force characters to upper case for (int j = 0; j < 4; j++) t[j] = toupper(t[j]); - std::memcpy(&tags[which], t, sizeof(tag32)); + memcpy(&tags[which], t, sizeof(tag32)); } ts.expectString("section components"); @@ -655,7 +655,7 @@ Costume::Costume(const char *filename, const char *data, int len, Costume *prevC const char *line = ts.currentLine(); Component *prevComponent = NULL; - if (std::sscanf(line, " %d %d %d %d %n", &id, &tagID, &hash, &parentID, &namePos) < 4) + if (sscanf(line, " %d %d %d %d %n", &id, &tagID, &hash, &parentID, &namePos) < 4) error("Bad component specification line: `%s'", line); ts.nextLine(); @@ -699,7 +699,7 @@ Costume::Costume(const char *filename, const char *data, int len, Costume *prevC ts.scanString(" %d %d %d %32s", 4, &id, &length, &tracks, name); _chores[id]._length = length; _chores[id]._numTracks = tracks; - std::memcpy(_chores[id]._name, name, 32); + memcpy(_chores[id]._name, name, 32); if(debugLevel == DEBUG_ALL || debugLevel == DEBUG_CHORES) printf("Loaded chore: %s\n", name); } @@ -908,7 +908,7 @@ Costume::Component *Costume::loadComponent (tag32 tag, Costume::Component *paren return NULL;// new SpriteComponent(parent, parentID, name); char t[4]; - std::memcpy(t, &tag, sizeof(tag32)); + memcpy(t, &tag, sizeof(tag32)); error("loadComponent: Unknown tag '%c%c%c%c', name '%s'", t[0], t[1], t[2], t[3], name); return NULL; } diff --git a/engine/costume.h b/engine/costume.h index e25f7d8230f..fb65db49859 100644 --- a/engine/costume.h +++ b/engine/costume.h @@ -93,7 +93,7 @@ public: private: Component *loadComponent(tag32 tag, Component *parent, int parentID, const char *name, Component *prevComponent); - std::string _fname; + Common::String _fname; int _numComponents; Component **_components; diff --git a/engine/engine.h b/engine/engine.h index 7ea9eb7adef..1de29cf834c 100644 --- a/engine/engine.h +++ b/engine/engine.h @@ -91,7 +91,7 @@ public: const char *sceneName() const { return _currScene->name(); } // Scene registration - typedef std::list SceneListType; + typedef Common::List SceneListType; SceneListType::const_iterator scenesBegin() const { return _scenes.begin(); } @@ -111,7 +111,7 @@ public: } // Actor registration - typedef std::list ActorListType; + typedef Common::List ActorListType; ActorListType::const_iterator actorsBegin() const { return _actors.begin(); } @@ -124,7 +124,7 @@ public: Actor *selectedActor() { return _selectedActor; } // Text Object Registration - typedef std::list TextListType; + typedef Common::List TextListType; TextListType::const_iterator textsBegin() const { return _textObjects.begin(); } @@ -144,7 +144,7 @@ public: } // Primitives Object Registration - typedef std::list PrimitiveListType; + typedef Common::List PrimitiveListType; PrimitiveListType::const_iterator primitivesBegin() const { return _primitiveObjects.begin(); } diff --git a/engine/imuse/imuse_sndmgr.cpp b/engine/imuse/imuse_sndmgr.cpp index a4bff3033b7..eb95ba43885 100644 --- a/engine/imuse/imuse_sndmgr.cpp +++ b/engine/imuse/imuse_sndmgr.cpp @@ -30,8 +30,6 @@ #include "engine/imuse/imuse_sndmgr.h" #include "engine/imuse/imuse_mcmp_mgr.h" -#include - ImuseSndMgr::ImuseSndMgr() { for (int l = 0; l < MAX_IMUSE_SOUNDS; l++) { memset(&_sounds[l], 0, sizeof(SoundDesc)); @@ -158,7 +156,7 @@ ImuseSndMgr::SoundDesc *ImuseSndMgr::allocSlot() { } ImuseSndMgr::SoundDesc *ImuseSndMgr::openSound(const char *soundName, int volGroupId) { - const char *extension = soundName + std::strlen(soundName) - 3; + const char *extension = soundName + strlen(soundName) - 3; byte *ptr = NULL; int headerSize = 0; diff --git a/engine/keyframe.cpp b/engine/keyframe.cpp index b52b2d7f461..7a4b11134e5 100644 --- a/engine/keyframe.cpp +++ b/engine/keyframe.cpp @@ -28,12 +28,10 @@ #include "engine/keyframe.h" #include "engine/textsplit.h" -#include - KeyframeAnim::KeyframeAnim(const char *filename, const char *data, int len) : Resource(filename) { - if (len >= 4 && std::memcmp(data, "FYEK", 4) == 0) + if (len >= 4 && READ_BE_UINT32(data) == MKID_BE('FYEK')) loadBinary(data, len); else { TextSplitter ts(data, len); @@ -110,7 +108,7 @@ void KeyframeAnim::loadText(TextSplitter &ts) { ts.scanString("fps %f", 1, &_fps); ts.scanString("joints %d", 1, &_numJoints); - if (std::strcmp(ts.currentLine(), "section: markers") == 0) { + if (strcasecmp(ts.currentLine(), "section: markers") == 0) { ts.nextLine(); ts.scanString("markers %d", 1, &_numMarkers); _markers = new Marker[_numMarkers]; @@ -171,9 +169,9 @@ void KeyframeAnim::KeyframeNode::loadBinary(const char *&data) { // If the name handle is entirely null (like ma_rest.key) // then we shouldn't try to set the name if (READ_LE_UINT32(data) == 0) - std::memcpy(_meshName, "(null)", 32); + memcpy(_meshName, "(null)", 32); else - std::memcpy(_meshName, data, 32); + memcpy(_meshName, data, 32); _numEntries = READ_LE_UINT32(data + 36); data += 44; _entries = new KeyframeEntry[_numEntries]; diff --git a/engine/lipsync.cpp b/engine/lipsync.cpp index 87b4c474a8a..2bee8daad70 100644 --- a/engine/lipsync.cpp +++ b/engine/lipsync.cpp @@ -27,8 +27,6 @@ #include "engine/lipsync.h" -#include - // A new define that'll be around when theres a configure script :) #undef DEBUG_VERBOSE @@ -37,7 +35,7 @@ LipSync::LipSync(const char *filename, const char *data, int len) : uint16 readPhoneme; int j; - if (std::memcmp(data, "LIP!", 4) != 0) { + if (READ_BE_UINT32(data) != MKID_BE('LIP!')) { error("Invalid file format in %s", filename); } else { _numEntries = (len - 8) / 4; diff --git a/engine/lua.cpp b/engine/lua.cpp index 1206bdb4020..457e1a95e26 100644 --- a/engine/lua.cpp +++ b/engine/lua.cpp @@ -38,12 +38,6 @@ #include "engine/lua/lauxlib.h" #include "engine/imuse/imuse.h" -#ifdef __SYMBIAN32__ -#include -#else -#include -#endif - extern Imuse *g_imuse; Common::StringList g_listfiles; @@ -219,32 +213,27 @@ static void new_dofile() { static void PrintDebug() { DEBUG_FUNCTION(); if (debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL) { - std::string msg = luaL_check_string(1); - - msg.insert(0, "Debug: "); - msg.append("\n"); - std::fputs(msg.c_str(), stderr); + Common::String msg("Debug: "); + msg += Common::String(luaL_check_string(1)) + "\n"; + printf(msg.c_str()); } } static void PrintError() { DEBUG_FUNCTION(); if (debugLevel == DEBUG_ERROR || debugLevel == DEBUG_ALL) { - std::string msg = luaL_check_string(1); - - msg.insert(0, "Error: "); - // don't do 'error()' so we can stay alive if possible - std::fputs(msg.c_str(), stderr); + Common::String msg("Error: "); + msg += Common::String(luaL_check_string(1)) + "\n"; + printf(msg.c_str()); } } static void PrintWarning() { DEBUG_FUNCTION(); if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) { - std::string msg = luaL_check_string(1); - - msg.insert(0, "Warning: "); - warning(msg.c_str()); + Common::String msg("Warning: "); + msg += Common::String(luaL_check_string(1)) + "\n"; + printf(msg.c_str()); } } @@ -2421,7 +2410,7 @@ static void MakeTextObject() { DEBUG_FUNCTION(); line = lua_getstring(lua_getparam(1)); - std::string text = line; + Common::String text = line; tableObj = lua_getparam(2); textObject->setDefaults(&blastTextDefaults); @@ -2479,7 +2468,7 @@ static void BlastText() { DEBUG_FUNCTION(); line = lua_getstring(lua_getparam(1)); - std::string text = line; + Common::String text = line; tableObj = lua_getparam(2); textObject->setDefaults(&blastTextDefaults); @@ -3829,7 +3818,7 @@ int bundle_dofile(const char *filename) { delete b; // Don't print warnings on Scripts\foo.lua, // d:\grimFandango\Scripts\foo.lua - if (!std::strstr(filename, "Scripts\\") && (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)) + if (!strstr(filename, "Scripts\\") && (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)) warning("Cannot find script %s", filename); return 2; diff --git a/engine/model.cpp b/engine/model.cpp index 636735ed9ee..cb69c009fe1 100644 --- a/engine/model.cpp +++ b/engine/model.cpp @@ -31,12 +31,10 @@ #include "engine/textsplit.h" #include "engine/gfx_base.h" -#include - Model::Model(const char *filename, const char *data, int len, const CMap &cmap) : Resource(filename), _numMaterials(0), _numGeosets(0) { - if (len >= 4 && std::memcmp(data, "LDOM", 4) == 0) + if (len >= 4 && READ_BE_UINT32(data) == MKID_BE('LDOM')) loadBinary(data, cmap); else { TextSplitter ts(data, len); @@ -248,7 +246,7 @@ void Model::draw() const { Model::HierNode *Model::copyHierarchy() { HierNode *result = new HierNode[_numHierNodes]; - std::memcpy(result, _rootHierNode, _numHierNodes * sizeof(HierNode)); + memcpy(result, _rootHierNode, _numHierNodes * sizeof(HierNode)); // Now adjust pointers for (int i = 0; i < _numHierNodes; i++) { if (result[i]._parent) @@ -361,7 +359,7 @@ void Model::Mesh::loadText(TextSplitter &ts, ResPtr *materials) { ts.scanString("radius %f", 1, &_radius); // In data001/rope_scale.3do, the shadow line is missing - if (std::sscanf(ts.currentLine(), "shadow %d", &_shadow) < 1) { + if (sscanf(ts.currentLine(), "shadow %d", &_shadow) < 1) { _shadow = 0; if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) warning("Missing shadow directive in model"); @@ -417,7 +415,7 @@ void Model::Mesh::loadText(TextSplitter &ts, ResPtr *materials) { if (ts.eof()) error("Expected face data, got EOF"); - if (std::sscanf(ts.currentLine(), " %d: %d %i %d %d %d %f %d%n", &num, &materialid, &type, &geo, &light, &tex, &extralight, &verts, &readlen) < 8) + if (sscanf(ts.currentLine(), " %d: %d %i %d %d %d %f %d%n", &num, &materialid, &type, &geo, &light, &tex, &extralight, &verts, &readlen) < 8) error("Expected face data, got '%s'", ts.currentLine()); _materialid[num] = materialid; @@ -433,7 +431,7 @@ void Model::Mesh::loadText(TextSplitter &ts, ResPtr *materials) { for (int j = 0; j < verts; j++) { int readlen2; - if (std::sscanf(ts.currentLine() + readlen, " %d, %d%n", _faces[num]._vertices + j, _faces[num]._texVertices + j, &readlen2) < 2) + if (sscanf(ts.currentLine() + readlen, " %d, %d%n", _faces[num]._vertices + j, _faces[num]._texVertices + j, &readlen2) < 2) error("Could not read vertex indices in line '%s'", ts.currentLine()); diff --git a/engine/resource.cpp b/engine/resource.cpp index 4e7820f0146..d20361d098f 100644 --- a/engine/resource.cpp +++ b/engine/resource.cpp @@ -31,12 +31,6 @@ #include "engine/engine.h" #include "engine/lipsync.h" -#include - -static void makeLower(std::string& s) { - std::transform(s.begin(), s.end(), s.begin(), tolower); -} - ResourceLoader *g_resourceloader = NULL; ResourceLoader::ResourceLoader() { @@ -134,9 +128,9 @@ int ResourceLoader::fileLength(const char *filename) const { } Bitmap *ResourceLoader::loadBitmap(const char *filename) { - std::string fname = filename; - makeLower(fname); - CacheType::iterator i = _cache.find(fname); + Common::String fname = filename; + fname.toLowercase(); + CacheType::iterator i = _cache.find(fname.c_str()); if (i != _cache.end()) { return dynamic_cast(i->second); } @@ -150,14 +144,14 @@ Bitmap *ResourceLoader::loadBitmap(const char *filename) { Bitmap *result = new Bitmap(filename, b->data(), b->len()); delete b; - _cache[fname] = result; + _cache[fname.c_str()] = result; return result; } CMap *ResourceLoader::loadColormap(const char *filename) { - std::string fname = filename; - makeLower(fname); - CacheType::iterator i = _cache.find(fname); + Common::String fname = filename; + fname.toLowercase(); + CacheType::iterator i = _cache.find(fname.c_str()); if (i != _cache.end()) { return dynamic_cast(i->second); @@ -168,13 +162,13 @@ CMap *ResourceLoader::loadColormap(const char *filename) { error("Could not find colormap %s", filename); CMap *result = new CMap(filename, b->data(), b->len()); delete b; - _cache[fname] = result; + _cache[fname.c_str()] = result; return result; } Costume *ResourceLoader::loadCostume(const char *filename, Costume *prevCost) { - std::string fname = filename; - makeLower(fname); + Common::String fname = filename; + fname.toLowercase(); Block *b = getFileBlock(filename); if (!b) error("Could not find costume %s", filename); @@ -184,9 +178,9 @@ Costume *ResourceLoader::loadCostume(const char *filename, Costume *prevCost) { } Font *ResourceLoader::loadFont(const char *filename) { - std::string fname = filename; - makeLower(fname); - CacheType::iterator i = _cache.find(fname); + Common::String fname = filename; + fname.toLowercase(); + CacheType::iterator i = _cache.find(fname.c_str()); if (i != _cache.end()) { return dynamic_cast(i->second); } @@ -196,14 +190,14 @@ Font *ResourceLoader::loadFont(const char *filename) { error("Could not find font file %s", filename); Font *result = new Font(filename, b->data(), b->len()); delete b; - _cache[fname] = result; + _cache[fname.c_str()] = result; return result; } KeyframeAnim *ResourceLoader::loadKeyframe(const char *filename) { - std::string fname = filename; - makeLower(fname); - CacheType::iterator i = _cache.find(fname); + Common::String fname = filename; + fname.toLowercase(); + CacheType::iterator i = _cache.find(fname.c_str()); if (i != _cache.end()) { return dynamic_cast(i->second); } @@ -213,16 +207,16 @@ KeyframeAnim *ResourceLoader::loadKeyframe(const char *filename) { error("Could not find keyframe file %s", filename); KeyframeAnim *result = new KeyframeAnim(filename, b->data(), b->len()); delete b; - _cache[fname] = result; + _cache[fname.c_str()] = result; return result; } LipSync *ResourceLoader::loadLipSync(const char *filename) { - std::string fname = filename; + Common::String fname = filename; + fname.toLowercase(); LipSync *result; - makeLower(fname); - CacheType::iterator i = _cache.find(fname); + CacheType::iterator i = _cache.find(fname.c_str()); if (i != _cache.end()) { return dynamic_cast(i->second); } @@ -238,7 +232,7 @@ LipSync *ResourceLoader::loadLipSync(const char *filename) { // Some lipsync files have no data if (result->isValid()) { delete b; - _cache[fname] = result; + _cache[fname.c_str()] = result; } else { delete result; result = NULL; @@ -249,9 +243,9 @@ LipSync *ResourceLoader::loadLipSync(const char *filename) { } Material *ResourceLoader::loadMaterial(const char *filename, const CMap &c) { - std::string fname = std::string(filename) + "@" + c.filename(); - makeLower(fname); - CacheType::iterator i = _cache.find(fname); + Common::String fname = Common::String(filename) + "@" + c.filename(); + fname.toLowercase(); + CacheType::iterator i = _cache.find(fname.c_str()); if (i != _cache.end()) { return dynamic_cast(i->second); } @@ -261,14 +255,14 @@ Material *ResourceLoader::loadMaterial(const char *filename, const CMap &c) { error("Could not find material %s", filename); Material *result = new Material(fname.c_str(), b->data(), b->len(), c); delete b; - _cache[fname] = result; + _cache[fname.c_str()] = result; return result; } Model *ResourceLoader::loadModel(const char *filename, const CMap &c) { - std::string fname = filename; - makeLower(fname); - CacheType::iterator i = _cache.find(fname); + Common::String fname = filename; + fname.toLowercase(); + CacheType::iterator i = _cache.find(fname.c_str()); if (i != _cache.end()) { return dynamic_cast(i->second); } @@ -278,7 +272,7 @@ Model *ResourceLoader::loadModel(const char *filename, const CMap &c) { error("Could not find model %s", filename); Model *result = new Model(filename, b->data(), b->len(), c); delete b; - _cache[fname] = result; + _cache[fname.c_str()] = result; return result; } @@ -295,9 +289,9 @@ bool ResourceLoader::exportResource(const char *filename) { } void ResourceLoader::uncache(const char *filename) { - std::string fname = filename; - makeLower(fname); - CacheType::iterator i = _cache.find(fname); + Common::String fname = filename; + fname.toLowercase(); + CacheType::iterator i = _cache.find(fname.c_str()); if (i != _cache.end()) _cache.erase(i); } diff --git a/engine/resource.h b/engine/resource.h index ddb47de5f79..02d58917e9b 100644 --- a/engine/resource.h +++ b/engine/resource.h @@ -30,8 +30,6 @@ #include "engine/lab.h" -#include -#include #include class Bitmap; @@ -57,7 +55,7 @@ public: void luaGc() { if (_luaRef) { _luaRef = false; deref(); } } private: - std::string _fname; + Common::String _fname; int _ref; bool _luaRef; }; @@ -119,10 +117,10 @@ public: const Lab *findFile(const char *filename) const; private: - typedef std::list LabList; + typedef Common::List LabList; LabList _labs; - typedef std::map CacheType; + typedef std::map CacheType; CacheType _cache; Common::SearchSet _files; diff --git a/engine/savegame.h b/engine/savegame.h index 3521c5f45ec..3ecb065988d 100644 --- a/engine/savegame.h +++ b/engine/savegame.h @@ -26,12 +26,6 @@ #ifndef SAVEGAME_H #define SAVEGAME_H -#ifdef __SYMBIAN32__ -#include -#else -#include -#endif - #include "common/savefile.h" extern Common::SaveFileManager *g_saveFileMan; diff --git a/engine/vector3d.h b/engine/vector3d.h index aade4556288..467209f48d0 100644 --- a/engine/vector3d.h +++ b/engine/vector3d.h @@ -26,7 +26,7 @@ #ifndef ENGINE_VECTOR3D_H #define ENGINE_VECTOR3D_H -#include +#include "common/sys.h" class Vector3d { public: