aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreriktorbjorn2011-07-02 20:25:39 +0200
committereriktorbjorn2011-07-02 20:25:39 +0200
commitada4556b9ae3b7d94ccac8ecec2ed31ba959ad55 (patch)
tree581c5b12e98ce934a52e12e530582ccd3a8e0be0
parentbdc213846e1c35c7b6b7f5a397f97d8fe334c1b1 (diff)
downloadscummvm-rg350-ada4556b9ae3b7d94ccac8ecec2ed31ba959ad55.tar.gz
scummvm-rg350-ada4556b9ae3b7d94ccac8ecec2ed31ba959ad55.tar.bz2
scummvm-rg350-ada4556b9ae3b7d94ccac8ecec2ed31ba959ad55.zip
CGE: Simplify error() calls
This also silences a few GCC warnings.
-rw-r--r--engines/cge/cge_main.cpp6
-rw-r--r--engines/cge/vga13h.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 22316d79b1..31a71cc16c 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -1357,7 +1357,7 @@ void CGEEngine::loadSprite(const char *fname, int ref, int cav, int col = 0, int
continue;
if ((i = takeEnum(Comd, strtok(line, " =\t"))) < 0)
- error("%s [%s]", NumStr("Bad line ######", lcnt), (const char *)fname);
+ error("Bad line %d [%s]", lcnt, fname);
switch (i) {
@@ -1365,7 +1365,7 @@ void CGEEngine::loadSprite(const char *fname, int ref, int cav, int col = 0, int
break;
case 1 : // Type
if ((type = takeEnum(Type, strtok(NULL, " \t,;/"))) < 0)
- error("%s [%s]", NumStr("Bad line ######", lcnt), (const char *)fname);
+ error("Bad line %d [%s]", lcnt, fname);
break;
case 2 : // Phase
++ shpcnt;
@@ -1533,7 +1533,7 @@ void CGEEngine::loadScript(const char *fname) {
_sprite->_flags._back = true;
}
if (! ok)
- error("%s [%s]", NumStr("Bad INI line ######", lcnt), fname);
+ error("Bad INI line %d [%s]", lcnt, fname);
}
#define GAME_FRAME_DELAY (1000 / 50)
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index 484d7118ef..41d4b79469 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -558,7 +558,7 @@ Sprite *Sprite::expand() {
else {
Snail::Com *c = &nea[neacnt++];
if ((c->_com = (SNCOM)takeEnum(Snail::_comTxt, strtok(NULL, " \t,;/"))) < 0)
- error("%s [%s]", (const char*)NumStr("Bad NEAR in ######", lcnt), (const char*)fname);
+ error("Bad NEAR in %d [%s]", lcnt, fname);
c->_ref = atoi(strtok(NULL, " \t,;/"));
c->_val = atoi(strtok(NULL, " \t,;/"));
c->_ptr = NULL;
@@ -574,7 +574,7 @@ Sprite *Sprite::expand() {
else {
Snail::Com *c = &tak[takcnt++];
if ((c->_com = (SNCOM)takeEnum(Snail::_comTxt, strtok(NULL, " \t,;/"))) < 0)
- error("%s [%s]", NumStr("Bad NEAR in ######", lcnt), (const char *)fname);
+ error("Bad NEAR in %d [%s]", lcnt, fname);
c->_ref = atoi(strtok(NULL, " \t,;/"));
c->_val = atoi(strtok(NULL, " \t,;/"));
c->_ptr = NULL;