aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorStrangerke2013-04-11 12:17:06 +0200
committerStrangerke2013-04-11 12:17:06 +0200
commit54e3df0140c2d37257132dc8a62520ec8febfc36 (patch)
tree7988e9e3d27b0716bc4378022b6ad9c1ff24aa7c /engines/hopkins
parente56123b18f55e14a304480c905477813127146b2 (diff)
downloadscummvm-rg350-54e3df0140c2d37257132dc8a62520ec8febfc36.tar.gz
scummvm-rg350-54e3df0140c2d37257132dc8a62520ec8febfc36.tar.bz2
scummvm-rg350-54e3df0140c2d37257132dc8a62520ec8febfc36.zip
HOPKINS: Constify some functions and members
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/computer.cpp2
-rw-r--r--engines/hopkins/computer.h2
-rw-r--r--engines/hopkins/events.cpp4
-rw-r--r--engines/hopkins/events.h4
-rw-r--r--engines/hopkins/objects.cpp6
-rw-r--r--engines/hopkins/objects.h10
-rw-r--r--engines/hopkins/script.cpp2
-rw-r--r--engines/hopkins/script.h2
8 files changed, 16 insertions, 16 deletions
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
index 32d5548922..f51e1be494 100644
--- a/engines/hopkins/computer.cpp
+++ b/engines/hopkins/computer.cpp
@@ -994,7 +994,7 @@ void ComputerManager::saveScore() {
/**
* Display parts of the hiscore line
*/
-void ComputerManager::displayHiscoreLine(byte *objectData, int x, int y, int curChar) {
+void ComputerManager::displayHiscoreLine(const byte *objectData, int x, int y, int curChar) {
int idx = 36;
if (curChar == 100)
diff --git a/engines/hopkins/computer.h b/engines/hopkins/computer.h
index e5c0ae2af6..cdd653f793 100644
--- a/engines/hopkins/computer.h
+++ b/engines/hopkins/computer.h
@@ -85,7 +85,7 @@ private:
void displayBricks();
void displayGamesSubMenu();
int displayHiscores();
- void displayHiscoreLine(byte *objectData, int x, int y, int curChar);
+ void displayHiscoreLine(const byte *objectData, int x, int y, int curChar);
void displayMessage(int xp, int yp, int textIdx);
void displayScore();
void displayScoreChar(int charPos, int charDisp);
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp
index 6c3b8fd05a..c266f6b105 100644
--- a/engines/hopkins/events.cpp
+++ b/engines/hopkins/events.cpp
@@ -183,7 +183,7 @@ void EventsManager::mouseOn() {
/**
* Change Mouse Cursor
*/
-void EventsManager::changeMouseCursor(const int id) {
+void EventsManager::changeMouseCursor(int id) {
int cursorId = id;
if (_mouseCursorId == 23)
@@ -282,7 +282,7 @@ void EventsManager::pollEvents() {
_keyState[(byte)chr] = false;
}
-void EventsManager::handleKey(Common::Event &event) {
+void EventsManager::handleKey(const Common::Event &event) {
_escKeyFl = (event.kbd.keycode == Common::KEYCODE_ESCAPE);
if (event.kbd.keycode == Common::KEYCODE_i || event.kbd.keycode == Common::KEYCODE_TAB)
diff --git a/engines/hopkins/events.h b/engines/hopkins/events.h
index 1c3b3b1c28..f4dedce1c5 100644
--- a/engines/hopkins/events.h
+++ b/engines/hopkins/events.h
@@ -48,7 +48,7 @@ private:
HopkinsEngine *_vm;
void pollEvents();
- void handleKey(Common::Event &event);
+ void handleKey(const Common::Event &event);
void checkForNextFrameCounter();
void updateCursor();
@@ -75,7 +75,7 @@ public:
void initMouseData();
void delay(int totalMilli);
- void changeMouseCursor(const int id);
+ void changeMouseCursor(int id);
void refreshEvents();
int waitKeyPress();
int getMouseX();
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 4e27cb1cf7..a37295cf0e 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -2784,7 +2784,7 @@ void ObjectsManager::quickDisplayBobSprite(int idx) {
_vm->_graphicsMan->fastDisplay(_vm->_talkMan->_characterSprite, xp, yp, spriteIndex);
}
-void ObjectsManager::initVbob(byte *src, int idx, int xp, int yp, int frameIndex) {
+void ObjectsManager::initVbob(const byte *src, int idx, int xp, int yp, int frameIndex) {
if (idx > 29)
error("MAX_VBOB exceeded");
@@ -3558,7 +3558,7 @@ void ObjectsManager::showActionAnimation(const byte *spriteData, const Common::S
}
}
-void ObjectsManager::showSpecialActionAnimationWithFlip(byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl) {
+void ObjectsManager::showSpecialActionAnimationWithFlip(const byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl) {
Common::String tmpStr = "";
int realSpeed = speed;
@@ -3600,7 +3600,7 @@ void ObjectsManager::showSpecialActionAnimationWithFlip(byte *spriteData, const
} while (spriteIndex != -1);
}
-void ObjectsManager::showSpecialActionAnimation(byte *spriteData, const Common::String &animString, int speed) {
+void ObjectsManager::showSpecialActionAnimation(const byte *spriteData, const Common::String &animString, int speed) {
Common::String tmpStr = "";
int realSpeed = speed;
if (_vm->_globals->_speed == 2)
diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h
index dca7e5ce7c..0562af9ba7 100644
--- a/engines/hopkins/objects.h
+++ b/engines/hopkins/objects.h
@@ -109,7 +109,7 @@ struct LockAnimItem {
};
struct VBobItem {
- byte *_spriteData;
+ const byte *_spriteData;
int _displayMode;
int _xp;
int _yp;
@@ -118,7 +118,7 @@ struct VBobItem {
int _oldX;
int _oldY;
int _oldFrameIndex;
- byte *_oldSpriteData;
+ const byte *_oldSpriteData;
};
struct ListeItem {
@@ -315,13 +315,13 @@ public:
int getObjectWidth() { return _objectWidth; }
int getObjectHeight() { return _objectHeight; }
- void showSpecialActionAnimationWithFlip(byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl);
- void showSpecialActionAnimation(byte *spriteData, const Common::String &animString, int speed);
+ void showSpecialActionAnimationWithFlip(const byte *spriteData, const Common::String &animationSeq, int speed, bool flipFl);
+ void showSpecialActionAnimation(const byte *spriteData, const Common::String &animString, int speed);
void checkEventBobAnim(int idx, int animIdx, int animDataIdx, int a4);
void setMultiBobAnim(int idx1, int idx2, int anim1Idx, int anim2Idx);
void loadObjectIniFile();
void quickDisplayBobSprite(int idx);
- void initVbob(byte *src, int idx, int xp, int yp, int frameIndex);
+ void initVbob(const byte *src, int idx, int xp, int yp, int frameIndex);
void disableVbob(int idx);
void setAndPlayAnim(int idx, int animIdx, int destPosi, bool animAction);
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index c8dc0ebd5d..ce60377c5c 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -40,7 +40,7 @@ ScriptManager::ScriptManager(HopkinsEngine *vm) {
_tempObjectFl = false;
}
-int ScriptManager::handleOpcode(byte *dataP) {
+int ScriptManager::handleOpcode(const byte *dataP) {
if (READ_BE_UINT16(dataP) != MKTAG16('F', 'C'))
return 0;
diff --git a/engines/hopkins/script.h b/engines/hopkins/script.h
index 41da519410..2a22e18ccb 100644
--- a/engines/hopkins/script.h
+++ b/engines/hopkins/script.h
@@ -40,7 +40,7 @@ public:
ScriptManager(HopkinsEngine *vm);
- int handleOpcode(byte *dataP);
+ int handleOpcode(const byte *dataP);
int handleIf(const byte *dataP, int offset);
int handleGoto(const byte *dataP);
};