DREAMWEB: do not call updatescreen before quitting, fixed crash on dosreturn, cleaned up dosreturn stub
This commit is contained in:
parent
4cdc9c9f8e
commit
cf671227fe
6 changed files with 33 additions and 10 deletions
|
@ -194,11 +194,12 @@ alreadyloaded: mov newlocation,255
|
|||
call startup
|
||||
mov commandtype,255
|
||||
|
||||
mainloop: call screenupdate
|
||||
mainloop:
|
||||
cmp quitrequested, 0
|
||||
jz $1
|
||||
ret
|
||||
$1:
|
||||
call screenupdate
|
||||
cmp wongame,0
|
||||
jnz endofgame
|
||||
cmp mandead,1
|
||||
|
|
|
@ -83,6 +83,12 @@ bool DreamWebMetaEngine::hasFeature(MetaEngineFeature f) const {
|
|||
}
|
||||
|
||||
bool DreamWeb::DreamWebEngine::hasFeature(EngineFeature f) const {
|
||||
switch(f) {
|
||||
case kSupportsRTL:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4165,6 +4165,11 @@ deloneloop:
|
|||
goto deloneloop;
|
||||
}
|
||||
|
||||
void DreamGenContext::width160() {
|
||||
STACK_CHECK;
|
||||
_movsw(161);
|
||||
}
|
||||
|
||||
void DreamGenContext::doblocks() {
|
||||
STACK_CHECK;
|
||||
es = data.word(kWorkspace);
|
||||
|
@ -21358,12 +21363,12 @@ loadnew:
|
|||
startup();
|
||||
data.byte(kCommandtype) = 255;
|
||||
mainloop:
|
||||
screenupdate();
|
||||
_cmp(data.byte(kQuitrequested), 0);
|
||||
if (flags.z())
|
||||
goto _tmp1;
|
||||
return;
|
||||
_tmp1:
|
||||
screenupdate();
|
||||
_cmp(data.byte(kWongame), 0);
|
||||
if (!flags.z())
|
||||
goto endofgame;
|
||||
|
@ -22115,6 +22120,7 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
|
|||
case 0xc20c: doshake(); break;
|
||||
case 0xc210: zoom(); break;
|
||||
case 0xc214: delthisone(); break;
|
||||
case 0xc224: width160(); break;
|
||||
case 0xc228: doblocks(); break;
|
||||
case 0xc22c: showframe(); break;
|
||||
case 0xc230: frameoutv(); break;
|
||||
|
|
|
@ -964,6 +964,7 @@ public:
|
|||
void createpanel();
|
||||
void turnpathon();
|
||||
void showmainops();
|
||||
void width160dosreturn();
|
||||
void madmanstelly();
|
||||
void constant();
|
||||
void loadroomssample();
|
||||
|
|
|
@ -116,6 +116,9 @@ void DreamWebEngine::processEvents() {
|
|||
int softKey, hardKey;
|
||||
while (event_manager->pollEvent(event)) {
|
||||
switch(event.type) {
|
||||
case Common::EVENT_RTL:
|
||||
quit();
|
||||
break;
|
||||
case Common::EVENT_KEYDOWN:
|
||||
if (event.kbd.flags & Common::KBD_CTRL) {
|
||||
switch (event.kbd.keycode) {
|
||||
|
|
|
@ -162,6 +162,10 @@ void DreamGenContext::openfilefromc() {
|
|||
|
||||
void DreamGenContext::openfile() {
|
||||
Common::String name = getFilename(*this);
|
||||
if (name.empty()) { //fixme: this happens if you quit from new game/load screen
|
||||
flags._c = true;
|
||||
return;
|
||||
}
|
||||
debug(1, "opening file: %s", name.c_str());
|
||||
engine->openFile(name);
|
||||
cs.word(kHandle) = 1; //only one handle
|
||||
|
@ -361,17 +365,19 @@ void DreamGenContext::generalerror() {
|
|||
|
||||
void DreamGenContext::dosreturn() {
|
||||
_cmp(data.byte(kCommandtype), 250);
|
||||
if (flags.z()) goto alreadydos;
|
||||
if (!flags.z()) {
|
||||
data.byte(kCommandtype) = 250;
|
||||
al = 46;
|
||||
commandonly();
|
||||
alreadydos:
|
||||
}
|
||||
|
||||
ax = data.word(kMousebutton);
|
||||
_and(ax, 1);
|
||||
if (flags.z()) return;
|
||||
if (flags.z())
|
||||
return;
|
||||
|
||||
quickquit2();
|
||||
quickquit();
|
||||
data.word(kMousebutton) = 0;
|
||||
engine->quit();
|
||||
}
|
||||
|
||||
void DreamGenContext::set16colpalette() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue