diff options
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 120 | ||||
-rw-r--r-- | engines/dreamweb/object.cpp | 120 |
3 files changed, 121 insertions, 120 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 02d1aafbe3..7fc9e526e9 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -215,6 +215,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'loadgame', 'savegame', 'zoomonoff', + 'inventory', 'doload' ]) generator.generate('dreamweb') #start routine diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index d9a2f7a44f..a2c83f04f1 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -4158,126 +4158,6 @@ foundmatch: bx = pop(); } -void DreamGenContext::inventory() { - STACK_CHECK; - _cmp(data.byte(kMandead), 1); - if (flags.z()) - goto iswatchinv; - _cmp(data.word(kWatchingtime), 0); - if (flags.z()) - goto notwatchinv; -iswatchinv: - blank(); - return; -notwatchinv: - _cmp(data.byte(kCommandtype), 239); - if (flags.z()) - goto alreadyopinv; - data.byte(kCommandtype) = 239; - al = 32; - commandonly(); -alreadyopinv: - ax = data.word(kMousebutton); - _cmp(ax, data.word(kOldbutton)); - if (flags.z()) - return /* (cantopinv) */; - _and(ax, 1); - if (!flags.z()) - goto doopeninv; - return; -doopeninv: - data.word(kTimecount) = 0; - data.byte(kPointermode) = 0; - data.byte(kInmaparea) = 0; - animpointer(); - createpanel(); - showpanel(); - examicon(); - showman(); - showexit(); - undertextline(); - data.byte(kPickup) = 0; - data.byte(kInvopen) = 2; - openinv(); - readmouse(); - showpointer(); - worktoscreen(); - delpointer(); - data.byte(kOpenedob) = 255; - goto waitexam; - return; -/*continuing to unbounded code: examineagain from examineob:3-69*/ -examineagain: - data.byte(kInmaparea) = 0; - data.byte(kExamagain) = 0; - data.byte(kOpenedob) = 255; - data.byte(kOpenedtype) = 255; - data.byte(kInvopen) = 0; - al = data.byte(kCommandtype); - data.byte(kObjecttype) = al; - data.byte(kItemframe) = 0; - data.byte(kPointerframe) = 0; - createpanel(); - showpanel(); - showman(); - showexit(); - obicons(); - obpicture(); - describeob(); - undertextline(); - data.byte(kCommandtype) = 255; - readmouse(); - showpointer(); - worktoscreen(); - delpointer(); -waitexam: - readmouse(); - showpointer(); - vsync(); - dumppointer(); - dumptextline(); - delpointer(); - data.byte(kGetback) = 0; - bx = offset_examlist; - _cmp(data.byte(kInvopen), 0); - if (flags.z()) - goto notuseinv; - bx = offset_invlist1; - _cmp(data.byte(kInvopen), 1); - if (flags.z()) - goto notuseinv; - bx = offset_withlist1; -notuseinv: - checkcoords(); - _cmp(data.byte(kQuitrequested), 0); - if (!flags.z()) - goto stopwaiting; - _cmp(data.byte(kExamagain), 0); - if (flags.z()) - goto norex; - goto examineagain; -norex: - _cmp(data.byte(kGetback), 0); - if (flags.z()) - goto waitexam; -stopwaiting: - data.byte(kPickup) = 0; - _cmp(data.word(kWatchingtime), 0); - if (!flags.z()) - goto iswatching; - _cmp(data.byte(kNewlocation), 255); - if (!flags.z()) - goto justgetback; -iswatching: - makemainscreen(); - data.byte(kInvopen) = 0; - data.byte(kOpenedob) = 255; - return; -justgetback: - data.byte(kInvopen) = 0; - data.byte(kOpenedob) = 255; -} - void DreamGenContext::setpickup() { STACK_CHECK; _cmp(data.byte(kObjecttype), 1); diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 1c58559dcd..446278252c 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -179,6 +179,126 @@ void DreamGenContext::examineob(bool examineAgain) { data.byte(kOpenedob) = 255; } +void DreamGenContext::inventory() { + STACK_CHECK; + _cmp(data.byte(kMandead), 1); + if (flags.z()) + goto iswatchinv; + _cmp(data.word(kWatchingtime), 0); + if (flags.z()) + goto notwatchinv; +iswatchinv: + blank(); + return; +notwatchinv: + _cmp(data.byte(kCommandtype), 239); + if (flags.z()) + goto alreadyopinv; + data.byte(kCommandtype) = 239; + al = 32; + commandonly(); +alreadyopinv: + ax = data.word(kMousebutton); + _cmp(ax, data.word(kOldbutton)); + if (flags.z()) + return /* (cantopinv) */; + _and(ax, 1); + if (!flags.z()) + goto doopeninv; + return; +doopeninv: + data.word(kTimecount) = 0; + data.byte(kPointermode) = 0; + data.byte(kInmaparea) = 0; + animpointer(); + createpanel(); + showpanel(); + examicon(); + showman(); + showexit(); + undertextline(); + data.byte(kPickup) = 0; + data.byte(kInvopen) = 2; + openinv(); + readmouse(); + showpointer(); + worktoscreen(); + delpointer(); + data.byte(kOpenedob) = 255; + goto waitexam; + return; +/*continuing to unbounded code: examineagain from examineob:3-69*/ +examineagain: + data.byte(kInmaparea) = 0; + data.byte(kExamagain) = 0; + data.byte(kOpenedob) = 255; + data.byte(kOpenedtype) = 255; + data.byte(kInvopen) = 0; + al = data.byte(kCommandtype); + data.byte(kObjecttype) = al; + data.byte(kItemframe) = 0; + data.byte(kPointerframe) = 0; + createpanel(); + showpanel(); + showman(); + showexit(); + obicons(); + obpicture(); + describeob(); + undertextline(); + data.byte(kCommandtype) = 255; + readmouse(); + showpointer(); + worktoscreen(); + delpointer(); +waitexam: + readmouse(); + showpointer(); + vsync(); + dumppointer(); + dumptextline(); + delpointer(); + data.byte(kGetback) = 0; + bx = offset_examlist; + _cmp(data.byte(kInvopen), 0); + if (flags.z()) + goto notuseinv; + bx = offset_invlist1; + _cmp(data.byte(kInvopen), 1); + if (flags.z()) + goto notuseinv; + bx = offset_withlist1; +notuseinv: + checkcoords(); + _cmp(data.byte(kQuitrequested), 0); + if (!flags.z()) + goto stopwaiting; + _cmp(data.byte(kExamagain), 0); + if (flags.z()) + goto norex; + goto examineagain; +norex: + _cmp(data.byte(kGetback), 0); + if (flags.z()) + goto waitexam; +stopwaiting: + data.byte(kPickup) = 0; + _cmp(data.word(kWatchingtime), 0); + if (!flags.z()) + goto iswatching; + _cmp(data.byte(kNewlocation), 255); + if (!flags.z()) + goto justgetback; +iswatching: + makemainscreen(); + data.byte(kInvopen) = 0; + data.byte(kOpenedob) = 255; + return; +justgetback: + data.byte(kInvopen) = 0; + data.byte(kOpenedob) = 255; +} + } /*namespace dreamgen */ |