[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.1,1.2 scumm.h,1.21,1.22 scummvm.cpp,1.26,1.27
Max Horn
fingolfin at users.sourceforge.net
Thu Sep 19 14:46:05 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui newgui.cpp,1.9,1.10 newgui.h,1.6,1.7
- Next message: [Scummvm-cvs-logs] CVS: scummvm/gui gui.cpp,1.10,1.11 gui.h,1.1.1.1,1.2 guimaps.h,1.1.1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv8369/scumm
Modified Files:
dialogs.cpp scumm.h scummvm.cpp
Log Message:
removed even more scumm dependencies from NewGUI; fixed some redraw issues (this might help the inventory-display issue in The Dig, and definitly fixes the 'vanishing volcanoe' in the FOA extro)
Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- dialogs.cpp 19 Sep 2002 17:44:41 -0000 1.1
+++ dialogs.cpp 19 Sep 2002 21:45:56 -0000 1.2
@@ -146,7 +146,7 @@
const char *str = queryResString(resID);
if (!str)
str = "Dummy!";
- new StaticTextWidget(this, x, y, w, h, str, kTextAlignLeft);
+ new StaticTextWidget(this, x, y, w, h, str, kTextAlignCenter);
}
@@ -241,21 +241,19 @@
case kListItemChangedCmd:
case kSaveCmd:
if (_savegameList->getSelected() >= 1 && !_savegameList->getSelectedString().isEmpty()) {
- Scumm *s = _scumm;
- s->_saveLoadSlot = _savegameList->getSelected();
- s->_saveLoadCompatible = false;
- s->_saveLoadFlag = 1; // 1 for save, I assume (Painelf)
- strcpy(s->_saveLoadName, _savegameList->getSelectedString().c_str());
+ _scumm->_saveLoadSlot = _savegameList->getSelected();
+ _scumm->_saveLoadCompatible = false;
+ _scumm->_saveLoadFlag = 1; // 1 for save, I assume (Painelf)
+ strcpy(_scumm->_saveLoadName, _savegameList->getSelectedString().c_str());
close();
}
break;
case kListItemDoubleClickedCmd:
case kLoadCmd:
if (_savegameList->getSelected() >= 0 && !_savegameList->getSelectedString().isEmpty()) {
- Scumm *s = _scumm;
- s->_saveLoadSlot = _savegameList->getSelected();
- s->_saveLoadCompatible = false;
- s->_saveLoadFlag = 2; // 2 for load. Magic number anyone?
+ _scumm->_saveLoadSlot = _savegameList->getSelected();
+ _scumm->_saveLoadCompatible = false;
+ _scumm->_saveLoadFlag = 2; // 2 for load. Magic number anyone?
close();
}
break;
@@ -263,7 +261,7 @@
close();
break;
case kOptionsCmd:
- _gui->optionsDialog();
+ _scumm->optionsDialog();
break;
case kQuitCmd: {
_scumm->_system->quit();
@@ -321,7 +319,6 @@
}
}
-
#pragma mark -
AboutDialog::AboutDialog(NewGui *gui, Scumm *scumm)
@@ -335,11 +332,15 @@
new StaticTextWidget(this, 10, 78, 240, 16, "Simon the Sorcerer (c) Adventuresoft", kTextAlignCenter);
}
+#pragma mark -
+
PauseDialog::PauseDialog(NewGui *gui, Scumm *scumm)
- : ScummDialog(gui, scumm, 50, 80, 220, 16)
+ : ScummDialog(gui, scumm, 35, 80, 250, 16)
{
- addResText(4, 4, 220, 16, 10);
+ addResText(4, 4, 250-8, 16, 10);
}
+
+#pragma mark -
SoundDialog::SoundDialog(NewGui *gui, Scumm *scumm)
: ScummDialog(gui, scumm, 30, 20, 260, 110)
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- scumm.h 17 Sep 2002 15:33:31 -0000 1.21
+++ scumm.h 19 Sep 2002 21:45:56 -0000 1.22
@@ -30,6 +30,7 @@
class GameDetector;
class Gui;
class NewGui;
+class Dialog;
class Scumm;
class IMuse;
class Actor;
@@ -325,8 +326,6 @@
* That results in a shorter form of the opcode
* on some architectures. */
IMuse *_imuse;
- Gui *_gui;
- NewGui *_newgui;
uint32 _features;
VerbSlot *_verbs;
ObjectData *_objs;
@@ -390,12 +389,25 @@
void shutDown(int i);
void setOptions(void);
+
+ // GUI
+ Gui *_gui;
+ NewGui *_newgui;
+
+ Dialog *_pauseDialog;
+ Dialog *_optionsDialog;
+ Dialog *_saveLoadDialog;
+
+ void pauseDialog();
+ void saveloadDialog();
+ void optionsDialog();
+
+ // Misc startup/event functions
void main();
void parseCommandLine(int argc, char **argv);
void showHelpAndExit();
bool detectGame();
void processKbd();
- void clear_fullRedraw();
int checkKeyHit();
void convertKeysToClicks();
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- scummvm.cpp 19 Sep 2002 11:06:10 -0000 1.26
+++ scummvm.cpp 19 Sep 2002 21:45:56 -0000 1.27
@@ -29,6 +29,7 @@
#include "scumm/bundle.h"
#include "actor.h"
#include "debug.h"
+#include "dialogs.h"
#include "gameDetector.h"
#include "gui/gui.h"
#include "gui/newgui.h"
@@ -68,9 +69,8 @@
return getRandomNumber(max - min) + min;
}
-
Scumm::Scumm (GameDetector *detector, OSystem *syst)
- : Engine(detector, syst)
+ : Engine(detector, syst), _pauseDialog(0), _optionsDialog(0), _saveLoadDialog(0)
{
OSystem::Property prop;
@@ -156,8 +156,17 @@
Scumm::~Scumm ()
{
delete [] _actors;
+
+ if (_pauseDialog)
+ delete _pauseDialog;
+ if (_optionsDialog)
+ delete _optionsDialog;
+ if (_saveLoadDialog)
+ delete _saveLoadDialog;
+
delete _gui;
delete _newgui;
+
delete _bundle;
delete _sound;
delete _imuse;
@@ -459,7 +468,7 @@
}
processActors();
- clear_fullRedraw();
+ _fullRedraw = false;
cyclePalette();
palManipulate();
@@ -883,12 +892,6 @@
out.close();
}
-
-void Scumm::clear_fullRedraw()
-{
- _fullRedraw = 0;
-}
-
void Scumm::clearClickedStatus()
{
checkKeyHit();
@@ -907,7 +910,7 @@
void Scumm::pauseGame(bool user)
{
//_gui->pause();
- _newgui->pauseDialog();
+ pauseDialog();
}
void Scumm::setOptions()
@@ -916,6 +919,27 @@
//_newgui->optionsDialog();
}
+void Scumm::pauseDialog()
+{
+ if (!_pauseDialog)
+ _pauseDialog = new PauseDialog(_newgui, this);
+ _pauseDialog->open();
+}
+
+void Scumm::saveloadDialog()
+{
+ if (!_saveLoadDialog)
+ _saveLoadDialog = new SaveLoadDialog(_newgui, this);
+ _saveLoadDialog->open();
+}
+
+void Scumm::optionsDialog()
+{
+ if (!_optionsDialog)
+ _optionsDialog = new OptionsDialog(_newgui, this);
+ _optionsDialog->open();
+}
+
void Scumm::shutDown(int i)
{
/* TODO: implement this */
@@ -1017,7 +1041,7 @@
_vars[VAR_CHARINC] = _defaultTalkDelay / 20;
} else if (_lastKeyHit == 321) { // F7, display new GUI
- _newgui->saveloadDialog();
+ saveloadDialog();
}
_mouseButStat = _lastKeyHit;
@@ -1510,12 +1534,6 @@
_gui->_textcolor = getDefaultGUIColor(2);
_gui->_textcolorhi = getDefaultGUIColor(6);
_gui->_shadowcolor = getDefaultGUIColor(8);
-
- _newgui->_bgcolor = _gui->_bgcolor;
- _newgui->_color = _gui->_color;
- _newgui->_textcolor = _gui->_textcolor;
- _newgui->_textcolorhi = _gui->_textcolorhi;
- _newgui->_shadowcolor = _gui->_shadowcolor;
}
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui newgui.cpp,1.9,1.10 newgui.h,1.6,1.7
- Next message: [Scummvm-cvs-logs] CVS: scummvm/gui gui.cpp,1.10,1.11 gui.h,1.1.1.1,1.2 guimaps.h,1.1.1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list