diff options
author | Max Horn | 2010-10-13 10:51:20 +0000 |
---|---|---|
committer | Max Horn | 2010-10-13 10:51:20 +0000 |
commit | 85fa23afbe08d6296d716321d95214042d70f9ac (patch) | |
tree | f14d491c57cab5078a74c0561fbd38af1914103a /engines/sword25/kernel | |
parent | b3c352d1fee37831408c43155cca91f3d8e42764 (diff) | |
download | scummvm-rg350-85fa23afbe08d6296d716321d95214042d70f9ac.tar.gz scummvm-rg350-85fa23afbe08d6296d716321d95214042d70f9ac.tar.bz2 scummvm-rg350-85fa23afbe08d6296d716321d95214042d70f9ac.zip |
SWORD25: Get rid of kernel/bs_stdint.h
svn-id: r53405
Diffstat (limited to 'engines/sword25/kernel')
-rw-r--r-- | engines/sword25/kernel/bs_stdint.h | 47 | ||||
-rw-r--r-- | engines/sword25/kernel/callbackregistry.h | 3 | ||||
-rw-r--r-- | engines/sword25/kernel/filesystemutil.cpp | 2 | ||||
-rw-r--r-- | engines/sword25/kernel/filesystemutil.h | 3 | ||||
-rw-r--r-- | engines/sword25/kernel/kernel.h | 1 | ||||
-rw-r--r-- | engines/sword25/kernel/objectregistry.h | 4 |
6 files changed, 4 insertions, 56 deletions
diff --git a/engines/sword25/kernel/bs_stdint.h b/engines/sword25/kernel/bs_stdint.h deleted file mode 100644 index 360ac59436..0000000000 --- a/engines/sword25/kernel/bs_stdint.h +++ /dev/null @@ -1,47 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -/* - * This code is based on Broken Sword 2.5 engine - * - * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer - * - * Licensed under GNU GPL v2 - * - */ - -// TODO: Properly replace all game occurances that use these types with proper ScummVM types, and remove this file - -#ifndef SWORD25_STDINT_H -#define SWORD25_STDINT_H - -#include "common/scummsys.h" - -typedef unsigned long long uint64_t; -typedef signed long long int64_t; -typedef unsigned long long uint64; -typedef signed long long int64; - -#endif diff --git a/engines/sword25/kernel/callbackregistry.h b/engines/sword25/kernel/callbackregistry.h index c5076d22f5..8671a932de 100644 --- a/engines/sword25/kernel/callbackregistry.h +++ b/engines/sword25/kernel/callbackregistry.h @@ -43,7 +43,6 @@ #include "common/str.h" #include "common/hash-str.h" #include "common/hashmap.h" -#include "sword25/kernel/bs_stdint.h" #include "sword25/kernel/common.h" namespace Sword25 { @@ -76,7 +75,7 @@ private: }; struct CallbackPtr_Hash { uint operator()(CallbackPtr x) const { - return static_cast<uint>((int64)x % ((int64)1 << sizeof(uint))); + return (uint)x; } }; diff --git a/engines/sword25/kernel/filesystemutil.cpp b/engines/sword25/kernel/filesystemutil.cpp index 853e6b247f..c77a70daaa 100644 --- a/engines/sword25/kernel/filesystemutil.cpp +++ b/engines/sword25/kernel/filesystemutil.cpp @@ -87,7 +87,7 @@ public: return Common::String("/"); } - virtual int64 GetFileSize(const Common::String &Filename) { + virtual uint32 GetFileSize(const Common::String &Filename) { Common::FSNode node(Filename); // If the file does not exist, return -1 as a result diff --git a/engines/sword25/kernel/filesystemutil.h b/engines/sword25/kernel/filesystemutil.h index 43ce7c908e..de23520255 100644 --- a/engines/sword25/kernel/filesystemutil.h +++ b/engines/sword25/kernel/filesystemutil.h @@ -52,7 +52,6 @@ #include "common/str.h" #include "common/str-array.h" #include "sword25/kernel/common.h" -#include "sword25/kernel/bs_stdint.h" namespace Sword25 { @@ -81,7 +80,7 @@ public: * @return Returns the size of the specified file. If the size could not be * determined, or the file does not exist, returns -1 */ - virtual int64 GetFileSize(const Common::String &Filename) = 0; + virtual uint32 GetFileSize(const Common::String &Filename) = 0; /** * @param Filename The path to a file. * @return Returns the timestamp of the specified file. diff --git a/engines/sword25/kernel/kernel.h b/engines/sword25/kernel/kernel.h index 6bc6f3de03..29cf1b550c 100644 --- a/engines/sword25/kernel/kernel.h +++ b/engines/sword25/kernel/kernel.h @@ -53,7 +53,6 @@ #include "engines/engine.h" #include "sword25/kernel/common.h" -#include "sword25/kernel/bs_stdint.h" #include "sword25/kernel/window.h" #include "sword25/kernel/resmanager.h" diff --git a/engines/sword25/kernel/objectregistry.h b/engines/sword25/kernel/objectregistry.h index dc702f2d75..0f50b79b00 100644 --- a/engines/sword25/kernel/objectregistry.h +++ b/engines/sword25/kernel/objectregistry.h @@ -37,7 +37,6 @@ #include "common/func.h" #include "common/hashmap.h" -#include "sword25/kernel/bs_stdint.h" #include "sword25/kernel/common.h" namespace Sword25 { @@ -131,7 +130,6 @@ public: } protected: - // FIXME: I'm not entirely sure my current hash function is legitimate struct ClassPointer_EqualTo { bool operator()(const T *x, const T *y) const { return x == y; @@ -139,7 +137,7 @@ protected: }; struct ClassPointer_Hash { uint operator()(const T *x) const { - return static_cast<uint>((int64)x % ((int64)1 << sizeof(uint))); + return (uint)x; } }; |