[Scummvm-cvs-logs] CVS: scummvm/sky mouse.h,1.17,1.18 sky.cpp,1.88,1.89 sky.h,1.42,1.43

Robert G?ffringmann lavosspawn at users.sourceforge.net
Fri Jul 11 19:08:06 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv25437/sky

Modified Files:
	mouse.h sky.cpp sky.h 
Log Message:
added dialog skipping by pressing '.'

Index: mouse.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/mouse.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- mouse.h	12 Jul 2003 01:12:00 -0000	1.17
+++ mouse.h	12 Jul 2003 02:07:37 -0000	1.18
@@ -54,6 +54,7 @@
 	uint16 giveMouseY(void) { return _mouseY; };
 	uint16 giveCurrentMouseType(void) { return _currentCursor; };
 	bool wasClicked(void) { return _logicClick; };
+	void logicClick(void) { _logicClick = true; };
 
 protected:
 

Index: sky.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sky.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- sky.cpp	12 Jul 2003 01:12:00 -0000	1.88
+++ sky.cpp	12 Jul 2003 02:07:37 -0000	1.89
@@ -134,6 +134,27 @@
 	}
 }
 
+void SkyState::handleKey(void) {
+
+	if (_key_pressed == 63)
+		_skyControl->doControlPanel();
+
+	if ((_key_pressed == 27) && (!_systemVars.pastIntro))
+		_skyControl->restartGame();
+#ifdef WITH_DEBUG_CHEATS
+	if ((_key_pressed >= '0') && (_key_pressed <= '9'))
+		doCheat(_key_pressed - '0');
+
+	if (_key_pressed == 'r') {
+		warning("loading grid");
+		_skyLogic->_skyGrid->loadGrids();
+	}
+#endif
+	if (_key_pressed == '.')
+		_skyMouse->logicClick();
+	_key_pressed = 0;
+}
+
 void SkyState::go() {
 
 	if (!_dump_file)
@@ -150,8 +171,6 @@
 
 	loadBase0();
 
-	_paintGrid = false;
-
 	if (introSkipped)
 		_skyControl->restartGame();
 
@@ -164,46 +183,15 @@
 			_lastSaveTime = _system->get_msecs();
 			_skyControl->doAutoSave();
 		}
-
-		if (_key_pressed == 63) {
-			_key_pressed = 0;
-			_skyControl->doControlPanel();
-		}			
-		if ((_key_pressed == 27) && (!_systemVars.pastIntro)) {
-			_skyControl->restartGame();
-			_key_pressed = 0;
-		}
-#ifdef WITH_DEBUG_CHEATS
-		if ((_key_pressed >= '0') && (_key_pressed <= '9')) {
-			doCheat(_key_pressed - '0');
-			_key_pressed = 0;
-		}
-		if (_key_pressed == 'r') {
-			warning("loading grid");
-			_skyLogic->_skyGrid->loadGrids();
-			_key_pressed = 0;
-		}
-		if (_key_pressed == 'g') {
-			_paintGrid = !_paintGrid;
-			warning("Grid paint: %s",(_paintGrid)?("ON"):("OFF"));
-			if (!_paintGrid)
-				_skyScreen->forceRefresh();
-			_key_pressed = 0;
-		}
-#endif
 		_skySound->checkFxQueue();
 		_skyMouse->mouseEngine((uint16)_sdl_mouse_x, (uint16)_sdl_mouse_y);
+		if (_key_pressed)
+			handleKey();
 		_skyLogic->engine();
 		if (!_skyLogic->checkProtection()) { // don't let copy prot. screen flash up
-			if (_paintGrid)
-				_skyScreen->forceRefresh();
 			_skyScreen->recreate();
 			_skyScreen->spriteEngine();
 			_skyScreen->flip();
-			if (_paintGrid) {
-				_skyScreen->showGrid(_skyLogic->_skyGrid->giveGrid(SkyLogic::_scriptVariables[SCREEN]));
-				_system->update_screen();
-			}
 		}
 	}
 }

Index: sky.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sky.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- sky.h	11 Jul 2003 22:19:16 -0000	1.42
+++ sky.h	12 Jul 2003 02:07:37 -0000	1.43
@@ -71,7 +71,6 @@
 
 	uint16 _debugMode;
 	uint16 _debugLevel;
-	bool _paintGrid;
 
 	int _numScreenUpdates;
 
@@ -120,6 +119,7 @@
 	void delay(uint amount);
 	void go();
 	void doCheat(uint8 num);
+	void handleKey(void);
 
 	//intro related
 	static uint8 fosterImg[297 * 143];





More information about the Scummvm-git-logs mailing list