[Scummvm-cvs-logs] CVS: scummvm gui.h,1.25,1.26 guimaps.h,1.4,1.5 init.cpp,1.11,1.12 scumm.h,1.175,1.176 scummvm.cpp,1.167,1.168 Makefile.common,1.5,1.6

Max Horn fingolfin at users.sourceforge.net
Fri Jul 5 10:01:06 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv26821

Modified Files:
	gui.h guimaps.h init.cpp scumm.h scummvm.cpp Makefile.common 
Log Message:
hooked in new experimental, *incomplete* GUI code to F6/F7

Index: gui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- gui.h	4 Jul 2002 15:48:17 -0000	1.25
+++ gui.h	5 Jul 2002 17:00:16 -0000	1.26
@@ -18,8 +18,8 @@
  * $Header$
  */
 
-#if !defined(gui_h)
-#define gui_h
+#ifndef GUI_H
+#define GUI_H
 
 // Forward declaration for GuiWidget
 struct GuiWidget;

Index: guimaps.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/guimaps.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- guimaps.h	4 Jul 2002 12:58:36 -0000	1.4
+++ guimaps.h	5 Jul 2002 17:00:17 -0000	1.5
@@ -48,7 +48,7 @@
 	"Options",									//17
 	"Misc",											//18
 	"Show speech subtitles",		//19
-	"Amiga pallete conversion",	//20
+	"Amiga pallette conversion",	//20
 	"Except:",									//21
 	"Simon the Sorcerer (c) Adventuresoft" //22
 };

Index: init.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/init.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- init.cpp	15 May 2002 10:25:00 -0000	1.11
+++ init.cpp	5 Jul 2002 17:00:17 -0000	1.12
@@ -23,9 +23,13 @@
 #include"stdafx.h"
 #include"scumm.h"
 #include"actor.h"
+#include"newgui.h"
+
 Scumm::Scumm (void) {
+	_newgui = new NewGui(this);
 }
 
 Scumm::~Scumm (void) {
 	delete [] actor;
+	delete _newgui;
 }

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- scumm.h	4 Jul 2002 15:48:17 -0000	1.175
+++ scumm.h	5 Jul 2002 17:00:17 -0000	1.176
@@ -35,6 +35,7 @@
 
 class GameDetector;
 class Gui;
+class NewGui;
 class Scumm;
 class IMuse;
 class Actor;
@@ -509,6 +510,7 @@
 	OSystem *_system;
 	IMuse *_imuse;
 	Gui *_gui;
+	NewGui *_newgui;
 	uint32 _features;
 	VerbSlot *_verbs;
 	ObjectData *_objs;

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -d -r1.167 -r1.168
--- scummvm.cpp	2 Jul 2002 20:56:17 -0000	1.167
+++ scummvm.cpp	5 Jul 2002 17:00:18 -0000	1.168
@@ -28,6 +28,7 @@
 #include "string.h"
 #include "gameDetector.h"
 #include "actor.h"
+#include"newgui.h"
 
 int autosave(int interval)	/* Not in class to prevent being bound */
 {
@@ -845,12 +846,12 @@
 
 void Scumm::pauseGame(bool user)
 {
-	((Gui *)_gui)->pause();
+	_gui->pause();
 }
 
 void Scumm::setOptions()
 {
-	((Gui *)_gui)->options();
+	_gui->options();
 }
 
 void Scumm::shutDown(int i)
@@ -923,7 +924,7 @@
 						 && _currentRoom != 0) {
 		if (_features & GF_AFTER_V7)
 			runScript(_vars[VAR_UNK_SCRIPT], 0, 0, 0);
-		((Gui *)_gui)->saveLoadDialog();
+		_gui->saveLoadDialog();
 		if (_features & GF_AFTER_V7)
 			runScript(_vars[VAR_UNK_SCRIPT_2], 0, 0, 0);
 	} else if (_lastKeyHit == _vars[VAR_TALKSTOP_KEY]) {
@@ -953,6 +954,10 @@
 			_defaultTalkDelay = 5;
 
 		_vars[VAR_CHARINC] = _defaultTalkDelay / 20;
+	} else if (_lastKeyHit == 320) { // F6, display new GUI
+		_newgui->pauseDialog();
+	} else if (_lastKeyHit == 321) { // F7, display new GUI
+		_newgui->saveloadDialog();
 	}
 			
 	_mouseButStat = _lastKeyHit;
@@ -1354,6 +1359,9 @@
 		if (_gui->isActive()) {
 			_gui->loop();
 			delta = 5;
+		} else if (_newgui->isActive()) {
+			_newgui->loop();
+			delta = 5;
 		} else {
 			delta = scummLoop(delta);
 			if (delta < 1)	// Ensure we don't get into a loop
@@ -1538,16 +1546,13 @@
 }
 
 void Scumm::setupGUIColors() {
-	Gui *gui = (Gui*)_gui;
 
 	/* FIXME: strange IF line? */
 	if (_gameId && !(_features & GF_SMALL_HEADER)	&& !(_features & GF_AFTER_V7)) {
-		gui->_bgcolor = getDefaultGUIColor(0);
-		gui->_color = getDefaultGUIColor(1);
-		gui->_textcolor = getDefaultGUIColor(2);
-		gui->_textcolorhi = getDefaultGUIColor(6);
-		gui->_shadowcolor = getDefaultGUIColor(8);
+		_newgui->_bgcolor = _gui->_bgcolor = getDefaultGUIColor(0);
+		_newgui->_color = _gui->_color = getDefaultGUIColor(1);
+		_newgui->_textcolor = _gui->_textcolor = getDefaultGUIColor(2);
+		_newgui->_textcolorhi = _gui->_textcolorhi = getDefaultGUIColor(6);
+		_newgui->_shadowcolor = _gui->_shadowcolor = getDefaultGUIColor(8);
 	}
 }
-
-

Index: Makefile.common
===================================================================
RCS file: /cvsroot/scummvm/scummvm/Makefile.common,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Makefile.common	29 Jun 2002 16:17:29 -0000	1.5
+++ Makefile.common	5 Jul 2002 17:00:18 -0000	1.6
@@ -6,7 +6,8 @@
 
 INCS	= scumm.h scummsys.h stdafx.h
 
-OBJS	+= actor.o boxes.o costume.o gfx.o object.o resource.o \
+OBJS	+= gui/widget.o gui/dialog.o newgui.o \
+	actor.o boxes.o costume.o gfx.o object.o resource.o \
 	saveload.o script.o scummvm.o sound.o string.o \
 	sys.o verbs.o script_v1.o script_v2.o debug.o gui.o \
 	sound/imuse.o sound/fmopl.o sound/mixer.o debugrl.o \





More information about the Scummvm-git-logs mailing list