[Scummvm-cvs-logs] SF.net SVN: scummvm: [24883] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Tue Dec 19 08:38:35 CET 2006


Revision: 24883
          http://scummvm.svn.sourceforge.net/scummvm/?rev=24883&view=rev
Author:   drmccoy
Date:     2006-12-18 23:38:33 -0800 (Mon, 18 Dec 2006)

Log Message:
-----------
Fixed backspace and delete in the note-pad

Modified Paths:
--------------
    scummvm/trunk/engines/gob/inter.cpp
    scummvm/trunk/engines/gob/inter.h
    scummvm/trunk/engines/gob/inter_v1.cpp
    scummvm/trunk/engines/gob/inter_v2.cpp

Modified: scummvm/trunk/engines/gob/inter.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter.cpp	2006-12-19 04:35:08 UTC (rev 24882)
+++ scummvm/trunk/engines/gob/inter.cpp	2006-12-19 07:38:33 UTC (rev 24883)
@@ -189,31 +189,6 @@
 	return;
 }
 
-void Inter::storeKey(int16 key) {
-	WRITE_VAR(12, _vm->_util->getTimeKey() - _vm->_game->_startTimeKey);
-
-	storeMouse();
-	WRITE_VAR(1, _vm->_snd->_playingSound);
-
-	if (key == 0x4800)
-		key = 0x0b;
-	else if (key == 0x5000)
-		key = 0x0a;
-	else if (key == 0x4d00)
-		key = 0x09;
-	else if (key == 0x4b00)
-		key = 0x08;
-	else if (key == 0x011b)
-		key = 0x1b;
-	else if ((key & 0xff) != 0)
-		key &= 0xff;
-
-	WRITE_VAR(0, key);
-
-	if (key != 0)
-		_vm->_util->waitKey();
-}
-
 void Inter::checkSwitchTable(char **ppExec) {
 	int16 i;
 	int16 len;

Modified: scummvm/trunk/engines/gob/inter.h
===================================================================
--- scummvm/trunk/engines/gob/inter.h	2006-12-19 04:35:08 UTC (rev 24882)
+++ scummvm/trunk/engines/gob/inter.h	2006-12-19 07:38:33 UTC (rev 24883)
@@ -58,13 +58,13 @@
 	char evalExpr(int16 *pRes);
 	char evalBoolResult(void);
 	void funcBlock(int16 retFlag);
-	void storeKey(int16 key);
 	void checkSwitchTable(char **ppExec);
 	void callSub(int16 retFlag);
 	void initControlVars(char full);
 	void renewTimeInVars(void);
 	void manipulateMap(int16 xPos, int16 yPos, int16 item);
 	virtual int16 loadSound(int16 slot) = 0;
+	virtual void storeKey(int16 key) = 0;
 	virtual void storeMouse(void) = 0;
 	virtual void animPalette(void) = 0;
 
@@ -89,6 +89,7 @@
 	Inter_v1(GobEngine *vm);
 	virtual ~Inter_v1() {};
 	virtual int16 loadSound(int16 slot);
+	virtual void storeKey(int16 key);
 	virtual void storeMouse(void);
 	virtual void animPalette(void);
 
@@ -281,6 +282,7 @@
 	Inter_v2(GobEngine *vm);
 	virtual ~Inter_v2() {};
 	virtual int16 loadSound(int16 search);
+	virtual void storeKey(int16 key);
 	virtual void storeMouse(void);
 	virtual void animPalette(void);
 

Modified: scummvm/trunk/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v1.cpp	2006-12-19 04:35:08 UTC (rev 24882)
+++ scummvm/trunk/engines/gob/inter_v1.cpp	2006-12-19 07:38:33 UTC (rev 24883)
@@ -1339,8 +1339,9 @@
 	animPalette();
 	_vm->_draw->blitInvalidated();
 
+	_vm->_video->waitRetrace(_vm->_global->_videoMode);
 	// Gob2 busy-waits here, so add a delay
-	_vm->_util->longDelay(1);
+	_vm->_util->delay(1);
 
 	if (flag != 0) {
 
@@ -2797,6 +2798,31 @@
 	}
 }
 
+void Inter_v1::storeKey(int16 key) {
+	WRITE_VAR(12, _vm->_util->getTimeKey() - _vm->_game->_startTimeKey);
+
+	storeMouse();
+	WRITE_VAR(1, _vm->_snd->_playingSound);
+
+	if (key == 0x4800)
+		key = 0x0B;
+	else if (key == 0x5000)
+		key = 0x0A;
+	else if (key == 0x4D00)
+		key = 0x09;
+	else if (key == 0x4B00)
+		key = 0x08;
+	else if (key == 0x011B)
+		key = 0x1B;
+	else if ((key & 0xFF) != 0)
+		key &= 0xFF;
+
+	WRITE_VAR(0, key);
+
+	if (key != 0)
+		_vm->_util->waitKey();
+}
+
 void Inter_v1::storeMouse(void) {
 	WRITE_VAR(2, _vm->_global->_inter_mouseX);
 	WRITE_VAR(3, _vm->_global->_inter_mouseY);

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2006-12-19 04:35:08 UTC (rev 24882)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2006-12-19 07:38:33 UTC (rev 24883)
@@ -2312,6 +2312,35 @@
 	_vm->_game->switchTotSub(index, skipPlay);
 }
 
+void Inter_v2::storeKey(int16 key) {
+	WRITE_VAR(12, _vm->_util->getTimeKey() - _vm->_game->_startTimeKey);
+
+	storeMouse();
+	WRITE_VAR(1, _vm->_snd->_playingSound);
+
+	if (key == 0x4800)
+		key = 0x0B;
+	else if (key == 0x5000)
+		key = 0x0A;
+	else if (key == 0x4D00)
+		key = 0x09;
+	else if (key == 0x4B00)
+		key = 0x08;
+	else if (key == 0x011B)
+		key = 0x1B;
+	else if (key == 0x0E08)
+		key = 0x19;
+	else if (key == 0x5300)
+		key = 0x1A;
+	else if ((key & 0xFF) != 0)
+		key &= 0xFF;
+
+	WRITE_VAR(0, key);
+
+	if (key != 0)
+		_vm->_util->waitKey();
+}
+
 void Inter_v2::storeMouse(void) {
 	int16 x;
 	int16 y;


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