aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-07-05 17:00:18 +0000
committerMax Horn2002-07-05 17:00:18 +0000
commiteacf0afa95de9be6b795b46ca7ba87ba7cf22a23 (patch)
treec146d623564f97f6f29659d7168c76828fa1cb84
parent84cafcc64a7ae6b62112c917c063f616dba0efe4 (diff)
downloadscummvm-rg350-eacf0afa95de9be6b795b46ca7ba87ba7cf22a23.tar.gz
scummvm-rg350-eacf0afa95de9be6b795b46ca7ba87ba7cf22a23.tar.bz2
scummvm-rg350-eacf0afa95de9be6b795b46ca7ba87ba7cf22a23.zip
hooked in new experimental, *incomplete* GUI code to F6/F7
svn-id: r4464
-rw-r--r--Makefile.common3
-rw-r--r--gui.h4
-rw-r--r--guimaps.h2
-rw-r--r--init.cpp4
-rw-r--r--scumm.h2
-rw-r--r--scummvm.cpp27
6 files changed, 27 insertions, 15 deletions
diff --git a/Makefile.common b/Makefile.common
index 1465573928..6b7fca84eb 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -6,7 +6,8 @@ ZIPFILE := scummvm-`date '+%Y-%m-%d'`.zip
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 \
diff --git a/gui.h b/gui.h
index 02cfdbf507..b7755cf226 100644
--- a/gui.h
+++ b/gui.h
@@ -18,8 +18,8 @@
* $Header$
*/
-#if !defined(gui_h)
-#define gui_h
+#ifndef GUI_H
+#define GUI_H
// Forward declaration for GuiWidget
struct GuiWidget;
diff --git a/guimaps.h b/guimaps.h
index 5b1d7b9bef..2573d4f2b2 100644
--- a/guimaps.h
+++ b/guimaps.h
@@ -48,7 +48,7 @@ static const char* string_map_table_custom[] = {
"Options", //17
"Misc", //18
"Show speech subtitles", //19
- "Amiga pallete conversion", //20
+ "Amiga pallette conversion", //20
"Except:", //21
"Simon the Sorcerer (c) Adventuresoft" //22
};
diff --git a/init.cpp b/init.cpp
index f0917bab4a..3fd5843aff 100644
--- a/init.cpp
+++ b/init.cpp
@@ -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;
} \ No newline at end of file
diff --git a/scumm.h b/scumm.h
index 168001a9e6..6712ca6ca4 100644
--- a/scumm.h
+++ b/scumm.h
@@ -35,6 +35,7 @@
class GameDetector;
class Gui;
+class NewGui;
class Scumm;
class IMuse;
class Actor;
@@ -509,6 +510,7 @@ public:
OSystem *_system;
IMuse *_imuse;
Gui *_gui;
+ NewGui *_newgui;
uint32 _features;
VerbSlot *_verbs;
ObjectData *_objs;
diff --git a/scummvm.cpp b/scummvm.cpp
index a380001b8b..3a5f6f2490 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -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::palManipulate(int palettes, int brightness, int color, int time, int
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 @@ void Scumm::processKbd()
&& _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 @@ void Scumm::processKbd()
_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 @@ void Scumm::mainRun()
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 @@ byte Scumm::getDefaultGUIColor(int color)
}
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);
}
}
-
-