diff options
author | Einar Johan Trøan Sømåen | 2013-04-17 20:54:41 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-04-17 21:21:17 +0200 |
commit | 5f5b415289d80e6e0dacfc15000bb6ae3e45d824 (patch) | |
tree | 40b63f4e2887889c3fd4ca6b91f2de3e608acffe /engines/wintermute/ad | |
parent | 7f4b95b3f8bbe7aa2be842462e57868ec17fd19e (diff) | |
download | scummvm-rg350-5f5b415289d80e6e0dacfc15000bb6ae3e45d824.tar.gz scummvm-rg350-5f5b415289d80e6e0dacfc15000bb6ae3e45d824.tar.bz2 scummvm-rg350-5f5b415289d80e6e0dacfc15000bb6ae3e45d824.zip |
WINTERMUTE: Increase const-usage.
Diffstat (limited to 'engines/wintermute/ad')
-rw-r--r-- | engines/wintermute/ad/ad_game.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/ad/ad_game.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp index 3730b23fc2..f0d2fcf5c8 100644 --- a/engines/wintermute/ad/ad_game.cpp +++ b/engines/wintermute/ad/ad_game.cpp @@ -1497,7 +1497,7 @@ bool AdGame::scheduleChangeScene(const char *filename, bool fadeIn) { ////////////////////////////////////////////////////////////////////////// -bool AdGame::getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor) { +bool AdGame::getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor) const { BaseGame::getVersion(verMajor, verMinor, nullptr, nullptr); if (extMajor) { @@ -1766,7 +1766,7 @@ bool AdGame::addBranchResponse(int id) { ////////////////////////////////////////////////////////////////////////// -bool AdGame::branchResponseUsed(int id) { +bool AdGame::branchResponseUsed(int id) const { char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : nullptr; for (uint32 i = 0; i < _responsesBranch.size(); i++) { if (_responsesBranch[i]->_id == id) { @@ -1793,7 +1793,7 @@ bool AdGame::addGameResponse(int id) { ////////////////////////////////////////////////////////////////////////// -bool AdGame::gameResponseUsed(int id) { +bool AdGame::gameResponseUsed(int id) const { char *context = _dlgPendingBranches.size() > 0 ? _dlgPendingBranches[_dlgPendingBranches.size() - 1] : nullptr; for (uint32 i = 0; i < _responsesGame.size(); i++) { AdResponseContext *respContext = _responsesGame[i]; @@ -1958,7 +1958,7 @@ bool AdGame::isItemTaken(char *itemName) { } ////////////////////////////////////////////////////////////////////////// -AdItem *AdGame::getItemByName(const char *name) { +AdItem *AdGame::getItemByName(const char *name) const { for (uint32 i = 0; i < _items.size(); i++) { if (scumm_stricmp(_items[i]->getName(), name) == 0) { return _items[i]; diff --git a/engines/wintermute/ad/ad_game.h b/engines/wintermute/ad/ad_game.h index 81c79a3da8..9bcd0bb531 100644 --- a/engines/wintermute/ad/ad_game.h +++ b/engines/wintermute/ad/ad_game.h @@ -63,7 +63,7 @@ public: bool _tempDisableSaveState; virtual bool resetContent(); bool addItem(AdItem *item); - AdItem *getItemByName(const char *name); + AdItem *getItemByName(const char *name) const; AdObject *_inventoryOwner; bool isItemTaken(char *itemName); @@ -71,11 +71,11 @@ public: bool unregisterInventory(AdInventory *inv); virtual bool displayContent(bool update = true, bool displayAll = false); - bool gameResponseUsed(int ID); + bool gameResponseUsed(int ID) const; bool addGameResponse(int ID); bool resetResponse(int ID); - bool branchResponseUsed(int ID); + bool branchResponseUsed(int ID) const; bool addBranchResponse(int ID); bool clearBranchResponses(char *name); bool startDlgBranch(const char *branchName, const char *scriptName, const char *eventName); @@ -93,7 +93,7 @@ public: TTalkSkipButton _talkSkipButton; - virtual bool getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor); + virtual bool getVersion(byte *verMajor, byte *verMinor, byte *extMajor, byte *extMinor) const; bool scheduleChangeScene(const char *filename, bool fadeIn); void setPrevSceneName(const char *name); void setPrevSceneFilename(const char *name); |