diff options
author | Arnaud Boutonné | 2010-09-22 21:22:11 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2010-09-22 21:22:11 +0000 |
commit | b9b1905378ee1cd7a67428849925ae0e7ba8fcbe (patch) | |
tree | acb2659bbbb780022a2b6329af2e45e2ce6f684b | |
parent | 0db9a4d6b4a5ed8bd7d706dca9835b38ac4b673b (diff) | |
download | scummvm-rg350-b9b1905378ee1cd7a67428849925ae0e7ba8fcbe.tar.gz scummvm-rg350-b9b1905378ee1cd7a67428849925ae0e7ba8fcbe.tar.bz2 scummvm-rg350-b9b1905378ee1cd7a67428849925ae0e7ba8fcbe.zip |
HUGO: Constify char* parameters in Screen
svn-id: r52860
-rw-r--r-- | engines/hugo/display.cpp | 8 | ||||
-rw-r--r-- | engines/hugo/display.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 0c6ed083f1..55f685de0f 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -349,7 +349,7 @@ int16 Screen::fontHeight() { // Returns length of supplied string in pixels -int16 Screen::stringLength(char *s) { +int16 Screen::stringLength(const char *s) { int16 sum; byte **fontArr = _font[_fnt]; @@ -362,7 +362,7 @@ int16 Screen::stringLength(char *s) { } // Return x which would center supplied string -int16 Screen::center(char *s) { +int16 Screen::center(const char *s) { debugC(1, kDebugDisplay, "center(%s)", s); return ((int16)((XPIX - stringLength(s)) >> 1)); @@ -370,7 +370,7 @@ int16 Screen::center(char *s) { // Write string at sx,sy in supplied color in current font // If sx == CENTER, center it -void Screen::writeStr(int16 sx, int16 sy, char *s, byte color) { +void Screen::writeStr(int16 sx, int16 sy, const char *s, byte color) { byte **font = _font[_fnt]; debugC(2, kDebugDisplay, "writeStr(%d, %d, %s, %d)", sx, sy, s, color); @@ -385,7 +385,7 @@ void Screen::writeStr(int16 sx, int16 sy, char *s, byte color) { } // Shadowed version of writestr -void Screen::shadowStr(int16 sx, int16 sy, char *s, byte color) { +void Screen::shadowStr(int16 sx, int16 sy, const char *s, byte color) { debugC(1, kDebugDisplay, "shadowStr(%d, %d, %s, %d)", sx, sy, s, color); if (sx == CENTER) diff --git a/engines/hugo/display.h b/engines/hugo/display.h index e315edbc92..8f5677faef 100644 --- a/engines/hugo/display.h +++ b/engines/hugo/display.h @@ -43,7 +43,7 @@ public: virtual ~Screen(); int16 fontHeight(); - int16 stringLength(char *s); + int16 stringLength(const char *s); void displayBackground(); void displayFrame(int sx, int sy, seq_t *seq, bool foreFl); @@ -56,10 +56,10 @@ public: void restorePal(Common::SeekableReadStream *f); void savePal(Common::WriteStream *f); void setBackgroundColor(long color); - void shadowStr(int16 sx, int16 sy, char *s, byte color); + void shadowStr(int16 sx, int16 sy, const char *s, byte color); void userHelp(); void writeChr(int sx, int sy, byte color, char *local_fontdata); - void writeStr(int16 sx, int16 sy, char *s, byte color); + void writeStr(int16 sx, int16 sy, const char *s, byte color); icondib_t &getIconBuffer() { return _iconBuffer; @@ -96,7 +96,7 @@ private: overlayState_t findOvl(seq_t *seq_p, image_pt dst_p, uint16 y); void merge(rect_t *rectA, rect_t *rectB); int16 mergeLists(rect_t *list, rect_t *blist, int16 len, int16 blen, int16 bmax); - int16 center(char *s); + int16 center(const char *s); }; class Screen_v1d : public Screen { |