diff options
author | uruk | 2013-07-09 18:17:02 +0200 |
---|---|---|
committer | uruk | 2013-07-09 18:17:02 +0200 |
commit | 848860a5fb556dad3d22e882cbfca73bda6da500 (patch) | |
tree | c92a675b9473f77de962b21701886b8ed2fd0459 /engines | |
parent | 2d4f710c9c14d93dabae061f54db22932e7140d9 (diff) | |
download | scummvm-rg350-848860a5fb556dad3d22e882cbfca73bda6da500.tar.gz scummvm-rg350-848860a5fb556dad3d22e882cbfca73bda6da500.tar.bz2 scummvm-rg350-848860a5fb556dad3d22e882cbfca73bda6da500.zip |
AVALANCHE: Trip: modify trptype::init(), minor modifications in other functions parameter lists.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/trip6.cpp | 45 | ||||
-rw-r--r-- | engines/avalanche/trip6.h | 4 |
2 files changed, 24 insertions, 25 deletions
diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp index f5faa5b77c..3bc6d4c734 100644 --- a/engines/avalanche/trip6.cpp +++ b/engines/avalanche/trip6.cpp @@ -54,7 +54,6 @@ void triptype::init(byte spritenum, bool do_check, Trip *tr) { int16 gd, gm; byte fv/*,nds*/; int32 id; - uint16 soa; Common::File inf; if (spritenum == 177) @@ -76,20 +75,15 @@ void triptype::init(byte spritenum, bool do_check, Trip *tr) { return; } - soa = inf.readUint16LE(); // Only used in the original code. - // I use it just to jump forward in the file. Should be replaced with seek(). + inf.skip(2); // Replace variable named 'soa' in the original code. - byte size = inf.readByte(); // Same purpose as soa. - for (byte i = 0; i < 12; i++) { - byte be = inf.readByte(); - a.name += be; - } - - size = inf.readByte(); // Same purpose as soa. - for (byte i = 0; i < 16; i++) { - byte be = inf.readByte(); - a.comment += be; - } + inf.skip(1); // We don't need to read the size of the string as in the original code. + for (byte i = 0; i < 12; i++) + a.name += inf.readByte(); + + inf.skip(1); // Same as above. + for (byte i = 0; i < 16; i++) + a.comment += inf.readByte(); a.num = inf.readByte(); a.xl = inf.readByte(); @@ -148,7 +142,7 @@ void triptype::original() { } void triptype::andexor() { - warning("STUB: Trip::andexor()"); + warning("STUB: triptype::andexor()"); } void triptype::turn(byte whichway) { @@ -183,7 +177,7 @@ bool triptype::collision_check() { } void triptype::walk() { - warning("STUB: Trip::walk()"); + warning("STUB: triptype::walk()"); } void triptype::bounce() { @@ -328,20 +322,20 @@ void triptype::unload_saver(trip_saver_type v) { vanishifstill = v.vanishifstill; } -void triptype::savedata(/*untyped_file &f*/) { - warning("STUB: _vm->_timeout.savedata()"); +void triptype::savedata(Common::File &f) { + warning("STUB: triptype::savedata()"); } -void triptype::loaddata(/*untyped_file &f*/) { - warning("STUB: _vm->_timeout.loaddata()"); +void triptype::loaddata(Common::File &f) { + warning("STUB: triptype::loaddata()"); } void triptype::save_data_to_mem(uint16 &where) { - warning("STUB: save_data_to_mem()"); + warning("STUB: triptype::save_data_to_mem()"); } void triptype::load_data_from_mem(uint16 &where) { - warning("STUB: load_data_from_mem()"); + warning("STUB: triptype::load_data_from_mem()"); } triptype *triptype::done() { @@ -376,7 +370,7 @@ getsettype *getsettype::init() { void getsettype::remember(bytefield r) { numleft++; - warning("STUB: _vm->_timeout.getsettype::remember()"); + warning("STUB: getsettype::remember()"); gs[numleft] = r; } @@ -385,6 +379,11 @@ void getsettype::recall(bytefield &r) { numleft--; } + + + + + Trip::Trip() { getsetclear(); mustexclaim = false; diff --git a/engines/avalanche/trip6.h b/engines/avalanche/trip6.h index 1c45037508..bbb47852bc 100644 --- a/engines/avalanche/trip6.h +++ b/engines/avalanche/trip6.h @@ -116,8 +116,8 @@ public: void set_up_saver(trip_saver_type &v); void unload_saver(trip_saver_type v); - void savedata(/*untyped_file &f*/); /* Self-explanatory, */ - void loaddata(/*untyped_file &f*/); /* really. */ + void savedata(Common::File &f); /* Self-explanatory, */ + void loaddata(Common::File &f); /* really. */ void save_data_to_mem(uint16 &where); void load_data_from_mem(uint16 &where); |