diff options
author | Strangerke | 2011-07-25 16:04:45 +0200 |
---|---|---|
committer | Strangerke | 2011-07-25 16:04:45 +0200 |
commit | cf619196484d7edc11dc6908ab81ebafcb65405f (patch) | |
tree | c2225e8cc01d80f7dad7706ebecb0c0a01a00b73 /engines/cge/cge_main.cpp | |
parent | 82adc025ea451f1fce2c0e0eed03d6e48a51e152 (diff) | |
download | scummvm-rg350-cf619196484d7edc11dc6908ab81ebafcb65405f.tar.gz scummvm-rg350-cf619196484d7edc11dc6908ab81ebafcb65405f.tar.bz2 scummvm-rg350-cf619196484d7edc11dc6908ab81ebafcb65405f.zip |
CGE: Replace 'no core' checks by asserts
Diffstat (limited to 'engines/cge/cge_main.cpp')
-rw-r--r-- | engines/cge/cge_main.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 98de57597d..352d2954dc 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -353,8 +353,7 @@ void CGEEngine::syncGame(Common::SeekableReadStream *readStream, Common::WriteSt S._prev = S._next = NULL; spr = (scumm_stricmp(S._file + 2, "MUCHA") == 0) ? new Fly(this, NULL) : new Sprite(this, NULL); - if (spr == NULL) - error("No core"); + assert(spr != NULL); *spr = S; _vga->_spareQ->append(spr); } @@ -1075,7 +1074,7 @@ void CGEEngine::sayDebug() { uint16 n = 0; Sprite *spr; for (spr = _vga->_showQ->first(); spr; spr = spr->_next) { - ++ n; + n++; if (spr == _sprite) { dwtom(n, SP_N, 10, 2); dwtom(_sprite->_x, SP_X, 10, 3); @@ -1220,9 +1219,9 @@ void CGEEngine::loadSprite(const char *fname, int ref, int cav, int col = 0, int error("Bad SPR [%s]", line); while ((len = sprf.read((uint8 *)line)) != 0) { - ++ lcnt; + lcnt++; if (len && line[len - 1] == '\n') - line[-- len] = '\0'; + line[--len] = '\0'; if (len == 0 || *line == '.') continue; @@ -1238,7 +1237,7 @@ void CGEEngine::loadSprite(const char *fname, int ref, int cav, int col = 0, int error("Bad line %d [%s]", lcnt, fname); break; case 2 : // Phase - ++ shpcnt; + shpcnt++; break; case 3 : // East east = (atoi(strtok(NULL, " \t,;/")) != 0); |