[Scummvm-cvs-logs] scummvm master -> d1fbf595206c1010755667b404e823f13caa4c2b
eriktorbjorn
eriktorbjorn at telia.com
Sat Jul 16 11:08:29 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d1fbf59520 DREAMWEB: Rewrote lockmon() to fix pausing/unpausing
Commit: d1fbf595206c1010755667b404e823f13caa4c2b
https://github.com/scummvm/scummvm/commit/d1fbf595206c1010755667b404e823f13caa4c2b
Author: eriktorbjorn (eriktorbjorn at users.sourceforge.net)
Date: 2011-07-16T02:04:49-07:00
Commit Message:
DREAMWEB: Rewrote lockmon() to fix pausing/unpausing
The original function would busy-wait for the user to press space
again. We can't do that, of course, since we don't have interrupt-
driven keyboard input.
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/stubs.cpp
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 5f7a528..54fc091 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -24,6 +24,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'readabyte',
'readoneblock',
'frameoutv',
- 'modifychar'
+ 'modifychar',
+ 'lockmon'
])
generator.generate('dreamweb') #start routine
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index a183c7c..a25fae0 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -11039,19 +11039,6 @@ void DreamGenContext::scrollmonitor() {
ax = pop();
}
-void DreamGenContext::lockmon() {
- STACK_CHECK;
- _cmp(data.byte(kLasthardkey), 57);
- if (!flags.z())
- return /* (notlock) */;
- locklighton();
-lockloop:
- _cmp(data.byte(kLasthardkey), 57);
- if (flags.z())
- goto lockloop;
- locklightoff();
-}
-
void DreamGenContext::monitorlogo() {
STACK_CHECK;
al = data.byte(kLogonum);
@@ -22407,7 +22394,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case 0xc550: searchforstring(); break;
case 0xc554: parser(); break;
case 0xc558: scrollmonitor(); break;
- case 0xc55c: lockmon(); break;
case 0xc560: monitorlogo(); break;
case 0xc564: printlogo(); break;
case 0xc568: showcurrentfile(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 71c466d..08053b6 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -602,7 +602,6 @@ public:
void clearbuffers();
void neterror();
void storeit();
- void lockeddoorway();
void isitworn();
void putundertimed();
void dumpmap();
@@ -958,9 +957,8 @@ public:
void showmonk();
void diarykeyn();
void set16colpalette();
- void convicons();
- void interviewer();
void sparky();
+ void interviewer();
void purgeanitem();
void madman();
void createpanel();
@@ -1255,12 +1253,14 @@ public:
void usechurchgate();
void monkandryan();
void allocatebuffers();
+ void convicons();
void swapwithinv();
void usecontrol();
void buttonseven();
void redrawmainscrn();
void finishedwalking();
void findallryan();
+ void lockeddoorway();
void channel0tran();
void buttonpress();
void parseblaster();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 5614aa3..bed259d 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -554,4 +554,30 @@ void DreamGenContext::modifychar() {
al = engine->modifyChar(al);
}
+void DreamGenContext::lockmon() {
+ // Pressing space pauses text output in the monitor. We use the "hard"
+ // key because calling readkey() drains characters from the input
+ // buffer, we we want the user to be able to type ahead while the text
+ // is being printed.
+ if (data.byte(kLasthardkey) == 57) {
+ // Clear the keyboard buffer. Otherwise the space that caused
+ // the pause will be read immediately in the pause loop.
+ do {
+ readkey();
+ } while (data.byte(kCurrentkey) != 0);
+
+ locklighton();
+ while (!engine->shouldQuit()) {
+ engine->waitForVSync();
+ readkey();
+ if (data.byte(kCurrentkey) == ' ')
+ break;
+ }
+ // Forget the last "hard" key, otherwise the space that caused
+ // the unpausing will immediately re-pause the game.
+ data.byte(kLasthardkey) = 0;
+ locklightoff();
+ }
+}
+
} /*namespace dreamgen */
More information about the Scummvm-git-logs
mailing list