From 900fc7d50e2688a83029578eb284483299465b2f Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sat, 26 Nov 2011 20:45:23 +0100 Subject: DREAMWEB: Move 'restorereels' from dreamgen --- engines/dreamweb/dreamgen.cpp | 32 -------------------------------- engines/dreamweb/dreamgen.h | 3 +-- engines/dreamweb/stubs.cpp | 32 ++++++++++++++++++++++++++++++++ engines/dreamweb/stubs.h | 1 + 4 files changed, 34 insertions(+), 34 deletions(-) (limited to 'engines/dreamweb') diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 516011739f..61d9e6f458 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -12715,38 +12715,6 @@ void DreamGenContext::getridofall() { deallocatemem(); } -void DreamGenContext::restorereels() { - STACK_CHECK; - _cmp(data.byte(kRoomloaded), 0); - if (flags.z()) - return /* (dontrestore) */; - al = data.byte(kReallocation); - getroomdata(); - dx = bx; - openfile(); - readheader(); - dontloadseg(); - dontloadseg(); - dontloadseg(); - dontloadseg(); - allocateload(); - data.word(kReel1) = ax; - ds = ax; - dx = 0; - loadseg(); - allocateload(); - data.word(kReel2) = ax; - ds = ax; - dx = 0; - loadseg(); - allocateload(); - data.word(kReel3) = ax; - ds = ax; - dx = 0; - loadseg(); - closefile(); -} - void DreamGenContext::allocateload() { STACK_CHECK; push(es); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 5c9d860698..ddfa97789d 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -55,7 +55,6 @@ public: static const uint16 addr_getridoftemp = 0xcb70; static const uint16 addr_allocateload = 0xcb68; static const uint16 addr_dontloadseg = 0xcb64; - static const uint16 addr_restorereels = 0xcb40; static const uint16 addr_getridofall = 0xcb3c; static const uint16 addr_getridofreels = 0xcb38; static const uint16 addr_loadtemptext = 0xcb2c; @@ -1704,7 +1703,7 @@ public: void newgame(); //void showwatch(); //void turnanypathon(); - void restorereels(); + //void restorereels(); void setwalk(); //void useroutine(); //void zoomicon(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index f80fad4d83..40c9cd18b0 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2314,5 +2314,37 @@ void DreamGenContext::restoreall() { setallchanges(); } +void DreamGenContext::restorereels() { + STACK_CHECK; + _cmp(data.byte(kRoomloaded), 0); + if (flags.z()) + return /* (dontrestore) */; + al = data.byte(kReallocation); + getroomdata(); + dx = bx; + openfile(); + readheader(); + dontloadseg(); + dontloadseg(); + dontloadseg(); + dontloadseg(); + allocateload(); + data.word(kReel1) = ax; + ds = ax; + dx = 0; + loadseg(); + allocateload(); + data.word(kReel2) = ax; + ds = ax; + dx = 0; + loadseg(); + allocateload(); + data.word(kReel3) = ax; + ds = ax; + dx = 0; + loadseg(); + closefile(); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index ddf89daef0..cbad64ba6e 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -353,4 +353,5 @@ void clearAndLoad(uint16 seg, uint8 c, unsigned int size, unsigned int maxSize); void loadRoomData(const Room* room, bool skipDat); void restoreall(); + void restorereels(); -- cgit v1.2.3