[Scummvm-cvs-logs] SF.net SVN: scummvm:[52860] scummvm/trunk/engines/hugo
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Wed Sep 22 23:22:12 CEST 2010
Revision: 52860
http://scummvm.svn.sourceforge.net/scummvm/?rev=52860&view=rev
Author: strangerke
Date: 2010-09-22 21:22:11 +0000 (Wed, 22 Sep 2010)
Log Message:
-----------
HUGO: Constify char* parameters in Screen
Modified Paths:
--------------
scummvm/trunk/engines/hugo/display.cpp
scummvm/trunk/engines/hugo/display.h
Modified: scummvm/trunk/engines/hugo/display.cpp
===================================================================
--- scummvm/trunk/engines/hugo/display.cpp 2010-09-22 21:13:13 UTC (rev 52859)
+++ scummvm/trunk/engines/hugo/display.cpp 2010-09-22 21:22:11 UTC (rev 52860)
@@ -349,7 +349,7 @@
// 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 @@
}
// 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 @@
// 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 @@
}
// 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)
Modified: scummvm/trunk/engines/hugo/display.h
===================================================================
--- scummvm/trunk/engines/hugo/display.h 2010-09-22 21:13:13 UTC (rev 52859)
+++ scummvm/trunk/engines/hugo/display.h 2010-09-22 21:22:11 UTC (rev 52860)
@@ -43,7 +43,7 @@
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 @@
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 @@
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 {
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