diff options
author | uruk | 2014-07-09 11:33:02 +0200 |
---|---|---|
committer | uruk | 2014-07-09 11:33:02 +0200 |
commit | 5a1383343fb645b5fbd80060da81253b2443bf28 (patch) | |
tree | 465a5fbddecf55e10df39da836e31bd1b34ff18f /engines/cge2/vga13h.cpp | |
parent | 45da1e7c741a1906b60ad3d55a9e0087fd9a4a3e (diff) | |
download | scummvm-rg350-5a1383343fb645b5fbd80060da81253b2443bf28.tar.gz scummvm-rg350-5a1383343fb645b5fbd80060da81253b2443bf28.tar.bz2 scummvm-rg350-5a1383343fb645b5fbd80060da81253b2443bf28.zip |
CGE2: Rework number().
Diffstat (limited to 'engines/cge2/vga13h.cpp')
-rw-r--r-- | engines/cge2/vga13h.cpp | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index a53a1160b8..069c2672ae 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -353,12 +353,8 @@ Sprite *Sprite::expand() { CommandHandler::Command *c = &_ext->_actions[section][cnt[section]++]; c->_commandType = CommandType(id); c->_lab = label; - if ((p = _vm->token(nullptr)) == nullptr) - error("Unexpected end of file! %s", fname); - c->_ref = _vm->number(p); - if ((p = _vm->token(nullptr)) == nullptr) - error("Unexpected end of file! %s", fname); - c->_val = _vm->number(p); + c->_ref = _vm->number(nullptr); + c->_val = _vm->number(nullptr); c->_spritePtr = nullptr; } break; @@ -367,9 +363,7 @@ Sprite *Sprite::expand() { s->_now = atoi(p); if (s->_now > maxnow) maxnow = s->_now; - if ((p = _vm->token(nullptr)) == nullptr) - break; - s->_next = _vm->number(p); + s->_next = _vm->number(nullptr); switch (s->_next) { case 0xFF: s->_next = seqcnt; @@ -380,18 +374,10 @@ Sprite *Sprite::expand() { } if (s->_next > maxnxt) maxnxt = s->_next; - if ((p = _vm->token(nullptr)) == nullptr) - error("Unexpected end of file! %s", fname); - s->_dx = _vm->number(p); - if ((p = _vm->token(nullptr)) == nullptr) - error("Unexpected end of file! %s", fname); - s->_dy = _vm->number(p); - if ((p = _vm->token(nullptr)) == nullptr) - error("Unexpected end of file! %s", fname); - s->_dz = _vm->number(p); - if ((p = _vm->token(nullptr)) == nullptr) - error("Unexpected end of file! %s", fname); - s->_dly = _vm->number(p); + s->_dx = _vm->number(nullptr); + s->_dy = _vm->number(nullptr); + s->_dz = _vm->number(nullptr); + s->_dly = _vm->number(nullptr); break; case kIdPhase: { shplist[shpcnt] = Bitmap(_vm, p); |