diff options
author | uruk | 2013-07-09 18:54:53 +0200 |
---|---|---|
committer | uruk | 2013-07-09 18:54:53 +0200 |
commit | 2c0b69437161d03cf08f8b8da5b45af4c3e5696d (patch) | |
tree | f2f463df3f9b88f93ea343b5ef3b2b4876d38999 /engines/avalanche | |
parent | a394fea15d4991128fdaa452698c2f926032527e (diff) | |
download | scummvm-rg350-2c0b69437161d03cf08f8b8da5b45af4c3e5696d.tar.gz scummvm-rg350-2c0b69437161d03cf08f8b8da5b45af4c3e5696d.tar.bz2 scummvm-rg350-2c0b69437161d03cf08f8b8da5b45af4c3e5696d.zip |
AVALANCHE: update file handling in multiple files.
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/celer2.cpp | 4 | ||||
-rw-r--r-- | engines/avalanche/gyro2.cpp | 6 | ||||
-rw-r--r-- | engines/avalanche/lucerna2.cpp | 16 | ||||
-rw-r--r-- | engines/avalanche/scrolls2.cpp | 3 |
4 files changed, 10 insertions, 19 deletions
diff --git a/engines/avalanche/celer2.cpp b/engines/avalanche/celer2.cpp index b6257d77e5..cc44021531 100644 --- a/engines/avalanche/celer2.cpp +++ b/engines/avalanche/celer2.cpp @@ -296,7 +296,6 @@ void Celer::load_chunks(Common::String xx) { ch.memorise = f.readByte(); if (ch.memorise) { - memos[fv].x = ch.x; memos[fv].xl = ch.xl; memos[fv].y = ch.y; @@ -313,8 +312,7 @@ void Celer::load_chunks(Common::String xx) { warning("STUB: Celer::load_chunks()"); if (!ch.natural) - for (int32 i = 0; i < ch.size; i++) - memory[fv][i] = f.readByte(); + f.read(memory[fv], ch.size); } else memos[fv].x = on_disk; } diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp index 6c5d960160..faafdcd764 100644 --- a/engines/avalanche/gyro2.cpp +++ b/engines/avalanche/gyro2.cpp @@ -530,11 +530,9 @@ void Gyro::load_a_mouse(byte which) { f.seek(mouse_size * 2 * (which - 1) + 134); - for (int i = 0; i < mouse_size; i++) - vmc.andpic[i] = f.readByte(); + f.read(vmc.andpic, mouse_size); - for (int i = 0; i < mouse_size; i++) - vmc.xorpic[i] = f.readByte(); + f.read(vmc.xorpic, mouse_size); f.close(); diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index 3dc69d5968..9feca69257 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -731,8 +731,7 @@ void Lucerna::thinkabout(char z, bool th) { /* Hey!!! Get it and put it!!! * f.seek(z * picsize + 65); - for (int16 i = 0; i < picsize; i++) - p[i] = f.readByte(); + f.read(p, picsize); _vm->_gyro.off(); @@ -756,8 +755,7 @@ void Lucerna::thinkabout(char z, bool th) { /* Hey!!! Get it and put it!!! * f.seek(fv * picsize + 65); - for (int16 i = 0; i < picsize; i++) - p[i] = f.readByte(); + f.read(p, picsize); _vm->_gyro.off(); @@ -789,15 +787,14 @@ void Lucerna::load_digits() { /* Load the scoring digits & rwlites */ for (byte fv = 0; fv < 10; fv ++) { _vm->_gyro.digit[fv] = new byte[digitsize]; - for (byte i = 0; i < digitsize; i++) - _vm->_gyro.digit[fv][i] = f.readByte(); + f.read(_vm->_gyro.digit[fv], digitsize); } for (byte ff = 0; ff < 9; ff ++) { _vm->_gyro.digit[ff] = new byte[rwlitesize]; - for (byte i = 0; i < rwlitesize; i++) - _vm->_gyro.digit[ff][i] = f.readByte(); + f.read(_vm->_gyro.digit[ff], rwlitesize); } + f.close(); } @@ -813,8 +810,7 @@ void Lucerna::toolbar() { s = f.size() - 40; p = new byte[s]; f.seek(40); - for (uint16 i = 0; i < s; i++) - p[i] = f.readByte(); + f.read(p, s); f.close(); /* off;*/ diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp index 8bf53cbed1..d4a7752e6e 100644 --- a/engines/avalanche/scrolls2.cpp +++ b/engines/avalanche/scrolls2.cpp @@ -147,8 +147,7 @@ void Scrolls::geticon(int16 x, int16 y, byte which) { f.seek(which * 426); p = new byte[426]; - for (int16 i = 0; i < 426; i++) - p[i] = f.readByte(); + f.read(p, 426); //putimage(x, y, p, 0); warning("STUB: Scrolls::geticon()"); |