diff options
author | Willem Jan Palenstijn | 2011-12-07 19:36:18 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-12-07 19:42:15 +0100 |
commit | f7cd6781d865b038263f5ce7e452694a19d77e81 (patch) | |
tree | ced22914e60f1f658f62e0b9eac7cb69d72b4839 /engines/dreamweb/stubs.cpp | |
parent | ad877e9306d4e8f671c0b24137bbaf277316bf45 (diff) | |
download | scummvm-rg350-f7cd6781d865b038263f5ce7e452694a19d77e81.tar.gz scummvm-rg350-f7cd6781d865b038263f5ce7e452694a19d77e81.tar.bz2 scummvm-rg350-f7cd6781d865b038263f5ce7e452694a19d77e81.zip |
DREAMWEB: Convert 'selectlocation'
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r-- | engines/dreamweb/stubs.cpp | 78 |
1 files changed, 61 insertions, 17 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 6d13ed6378..add7438bbd 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1033,10 +1033,6 @@ uint16 DreamGenContext::allocateMem(uint16 paragraphs) { return result; } -void DreamGenContext::deallocateMem() { - deallocateMem((uint16)es); -} - void DreamGenContext::deallocateMem(uint16 segment) { debug(1, "deallocating segment %04x", segment); deallocateSegment(segment); @@ -1798,19 +1794,6 @@ void DreamGenContext::checkCoords() { checkCoords(quitList); break; } - case offset_destlist: { - RectWithCallback destList[] = { - { 238,258,4,44,&DreamGenContext::nextDest }, - { 104,124,4,44,&DreamGenContext::lastDest }, - { 280,308,4,44,&DreamGenContext::lookAtPlace }, - { 104,216,138,192,&DreamGenContext::destSelect }, - { 273,320,157,198,&DreamGenContext::getBack1 }, - { 0,320,0,200,&DreamGenContext::blank }, - { 0xFFFF,0,0,0,0 } - }; - checkCoords(destList); - break; - } case offset_diarylist: { RectWithCallback diaryList[] = { { kDiaryx+94,kDiaryx+110,kDiaryy+97,kDiaryy+113,&DreamGenContext::diaryKeyN }, @@ -3841,4 +3824,65 @@ void DreamGenContext::dumpZoom() { multiDump(kZoomx + 5, kZoomy + 4, 46, 40); } +void DreamGenContext::selectLocation() { + data.byte(kInmaparea) = 0; + clearBeforeLoad(); + data.byte(kGetback) = 0; + data.byte(kPointerframe) = 22; + readCityPic(); + showCity(); + getRidOfTemp(); + readDestIcon(); + loadTravelText(); + showPanel(); + showMan(); + showArrows(); + showExit(); + locationPic(); + underTextLine(); + data.byte(kCommandtype) = 255; + readMouse(); + data.byte(kPointerframe) = 0; + showPointer(); + workToScreen(); + playChannel0(9, 255); + data.byte(kNewlocation) = 255; + + while (data.byte(kNewlocation) == 255) { + if (quitRequested()) + break; + + delPointer(); + readMouse(); + showPointer(); + vSync(); + dumpPointer(); + dumpTextLine(); + + if (data.byte(kGetback) == 1) + break; + + RectWithCallback destList[] = { + { 238,258,4,44,&DreamGenContext::nextDest }, + { 104,124,4,44,&DreamGenContext::lastDest }, + { 280,308,4,44,&DreamGenContext::lookAtPlace }, + { 104,216,138,192,&DreamGenContext::destSelect }, + { 273,320,157,198,&DreamGenContext::getBack1 }, + { 0,320,0,200,&DreamGenContext::blank }, + { 0xFFFF,0,0,0,0 } + }; + checkCoords(destList); + } + + if (quitRequested() || data.byte(kGetback) == 1 || data.byte(kNewlocation) == data.byte(kLocation)) { + data.byte(kNewlocation) = data.byte(kReallocation); + data.byte(kGetback) = 0; + } + + getRidOfTemp(); + getRidOfTemp2(); + getRidOfTemp3(); + deallocateMem(data.word(kTraveltext)); +} + } // End of namespace DreamGen |