[Scummvm-cvs-logs] SF.net SVN: scummvm: [31002] scummvm/trunk/engines/drascula
aquadran at users.sourceforge.net
aquadran at users.sourceforge.net
Fri Feb 29 16:11:44 CET 2008
Revision: 31002
http://scummvm.svn.sourceforge.net/scummvm/?rev=31002&view=rev
Author: aquadran
Date: 2008-02-29 07:11:44 -0800 (Fri, 29 Feb 2008)
Log Message:
-----------
fixed exit from engine
Modified Paths:
--------------
scummvm/trunk/engines/drascula/drascula.cpp
scummvm/trunk/engines/drascula/drascula.h
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2008-02-29 14:45:53 UTC (rev 31001)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2008-02-29 15:11:44 UTC (rev 31002)
@@ -75,8 +75,6 @@
}
DrasculaEngine::~DrasculaEngine() {
- salir_al_dos(0);
-
delete _rnd;
}
@@ -762,15 +760,9 @@
delay(1460);
if (num_ejec != 3)
cont_sv = 0;
- } else if (key == Common::KEYCODE_DELETE) {
-// if (num_ejec == 4) // FIXME
-// carga_partida("gsave00");
-// else
- confirma_go();
- if (num_ejec != 3)
- cont_sv = 0;
} else if (key == Common::KEYCODE_ESCAPE) {
- confirma_salir();
+ if (!confirma_salir())
+ return false;
if (num_ejec != 3)
cont_sv = 0;
} else if (num_ejec == 6 && key == Common::KEYCODE_0 && !strcmp(num_room, "61.alg")) {
@@ -2328,34 +2320,15 @@
_system->delayMillis(ms * 2); // originaly was 1
}
-void DrasculaEngine::confirma_go() {
+bool DrasculaEngine::confirma_salir() {
byte key;
color_abc(ROJO);
refresca_pantalla();
- centra_texto(SYS0, 160, 87);
- VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
-
- for (;;) {
- key = getscan();
- if (key != 0)
- break;
- }
-
- if (key == Common::KEYCODE_DELETE) {
- stopmusic();
-// carga_partida("gsave00"); // FIXME
- }
-}
-
-void DrasculaEngine::confirma_salir() {
- byte key;
-
- color_abc(ROJO);
- refresca_pantalla();
centra_texto(SYS1, 160, 87);
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
+ delay(100);
for (;;) {
key = getscan();
if (key != 0)
@@ -2364,8 +2337,10 @@
if (key == Common::KEYCODE_ESCAPE) {
stopmusic();
- salir_al_dos(0);
+ return false;
}
+
+ return true;
}
void DrasculaEngine::salva_pantallas() {
Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h 2008-02-29 14:45:53 UTC (rev 31001)
+++ scummvm/trunk/engines/drascula/drascula.h 2008-02-29 15:11:44 UTC (rev 31002)
@@ -584,8 +584,7 @@
bool saves();
void print_abc(const char *, int, int);
void delay(int ms);
- void confirma_go();
- void confirma_salir();
+ bool confirma_salir();
void salva_pantallas();
void elige_objeto(int objeto);
void suma_objeto(int);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list