[Scummvm-cvs-logs] SF.net SVN: scummvm:[53737] scummvm/trunk/engines/saga
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Oct 23 17:45:23 CEST 2010
Revision: 53737
http://scummvm.svn.sourceforge.net/scummvm/?rev=53737&view=rev
Author: fingolfin
Date: 2010-10-23 15:45:22 +0000 (Sat, 23 Oct 2010)
Log Message:
-----------
SAGA: Add some const qualifiers to SagaEngine methods
Modified Paths:
--------------
scummvm/trunk/engines/saga/detection.cpp
scummvm/trunk/engines/saga/saga.cpp
scummvm/trunk/engines/saga/saga.h
scummvm/trunk/engines/saga/saveload.cpp
Modified: scummvm/trunk/engines/saga/detection.cpp
===================================================================
--- scummvm/trunk/engines/saga/detection.cpp 2010-10-23 15:44:55 UTC (rev 53736)
+++ scummvm/trunk/engines/saga/detection.cpp 2010-10-23 15:45:22 UTC (rev 53737)
@@ -56,9 +56,9 @@
bool SagaEngine::isBigEndian() const { return isMacResources() && getGameId() == GID_ITE; }
bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); }
-const GameResourceDescription *SagaEngine::getResourceDescription() { return _gameDescription->resourceDescription; }
+const GameResourceDescription *SagaEngine::getResourceDescription() const { return _gameDescription->resourceDescription; }
-const GameFontDescription *SagaEngine::getFontDescription(int index) {
+const GameFontDescription *SagaEngine::getFontDescription(int index) const {
assert(index < _gameDescription->fontsCount);
return &_gameDescription->fontDescriptions[index];
}
Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp 2010-10-23 15:44:55 UTC (rev 53736)
+++ scummvm/trunk/engines/saga/saga.cpp 2010-10-23 15:45:22 UTC (rev 53737)
@@ -461,7 +461,7 @@
}
}
-const char *SagaEngine::getObjectName(uint16 objectId) {
+const char *SagaEngine::getObjectName(uint16 objectId) const {
ActorData *actor;
ObjectData *obj;
const HitZone *hitZone;
@@ -616,7 +616,7 @@
ConfMan.setInt("talkspeed", (talkspeed * 255 + 3 / 2) / 3);
}
-int SagaEngine::getTalkspeed() {
+int SagaEngine::getTalkspeed() const {
return (ConfMan.getInt("talkspeed") * 3 + 255 / 2) / 255;
}
Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h 2010-10-23 15:44:55 UTC (rev 53736)
+++ scummvm/trunk/engines/saga/saga.h 2010-10-23 15:45:22 UTC (rev 53737)
@@ -486,15 +486,14 @@
void save(const char *fileName, const char *saveName);
void load(const char *fileName);
- uint32 getCurrentLoadVersion() {
+ uint32 getCurrentLoadVersion() const {
return _saveHeader.version;
}
void fillSaveList();
char *calcSaveFileName(uint slotNumber);
SaveFileData *getSaveFile(uint idx);
- uint getSaveSlotNumber(uint idx);
- uint getNewSaveSlotNumber();
+ uint getNewSaveSlotNumber() const;
bool locateSaveFile(char *saveName, uint &titleNumber);
bool isSaveListFull() const {
return _saveFilesCount == MAX_SAVES;
@@ -503,7 +502,7 @@
return isSaveListFull() ? _saveFilesCount : _saveFilesCount + 1;
}
- bool isIHNMDemo() { return _isIHNMDemo; }
+ bool isIHNMDemo() const { return _isIHNMDemo; }
int16 _framesEsc;
@@ -559,12 +558,12 @@
const byte *getImagePal(const byte *image_data, size_t image_size);
void loadStrings(StringsTable &stringsTable, const byte *stringsPointer, size_t stringsLength);
- const char *getObjectName(uint16 objectId);
+ const char *getObjectName(uint16 objectId) const;
public:
int processInput();
Point mousePos() const;
- int getMouseClickCount() {
+ int getMouseClickCount() const {
return _mouseClickCount;
}
@@ -588,7 +587,7 @@
return _leftMouseButtonPressed || _rightMouseButtonPressed;
}
- inline int ticksToMSec(int tick) {
+ inline int ticksToMSec(int tick) const {
if (getGameId() == GID_ITE)
return tick * 1000 / kScriptTimeTicksPerSecond;
else
@@ -619,9 +618,9 @@
bool isBigEndian() const;
bool isMacResources() const;
bool isSaga2() const { return getGameId() == GID_DINO || getGameId() == GID_FTA2; }
- const GameResourceDescription *getResourceDescription();
+ const GameResourceDescription *getResourceDescription() const;
- const GameFontDescription *getFontDescription(int index);
+ const GameFontDescription *getFontDescription(int index) const;
int getFontsCount() const;
int getGameId() const;
@@ -650,7 +649,7 @@
public:
ColorId KnownColor2ColorId(KnownColor knownColor);
void setTalkspeed(int talkspeed);
- int getTalkspeed();
+ int getTalkspeed() const;
};
} // End of namespace Saga
Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp 2010-10-23 15:44:55 UTC (rev 53736)
+++ scummvm/trunk/engines/saga/saveload.cpp 2010-10-23 15:45:22 UTC (rev 53737)
@@ -82,7 +82,7 @@
return false;
}
-uint SagaEngine::getNewSaveSlotNumber() {
+uint SagaEngine::getNewSaveSlotNumber() const {
uint i, j;
bool found;
for (i = 0; i < MAX_SAVES; i++) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list