[Scummvm-cvs-logs] CVS: scummvm/gui newgui.cpp,1.9,1.10 newgui.h,1.6,1.7
Max Horn
fingolfin at users.sourceforge.net
Thu Sep 19 14:46:05 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,NONE,1.1 dialogs.h,NONE,1.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.1,1.2 scumm.h,1.21,1.22 scummvm.cpp,1.26,1.27
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/gui
In directory usw-pr-cvs1:/tmp/cvs-serv8369/gui
Modified Files:
newgui.cpp newgui.h
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: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- newgui.cpp 19 Sep 2002 17:44:41 -0000 1.9
+++ newgui.cpp 19 Sep 2002 21:45:55 -0000 1.10
@@ -28,13 +28,12 @@
/*
* TODO list
- * - use a nice font
- * - implement the missing / incomplete dialogs
+ * - get a nicer font which contains diacrits (§ etc.)
* - add more widgets
* - allow multi line (l/c/r aligned) text via StaticTextWidget ?
* - add "close" widget to all dialogs (with a flag to turn it off) ?
* - make dialogs "moveable" ?
- * - come up with a new look&feel / theme for the GUI
+ * - come up with a new look & feel / theme for the GUI
* - ...
*/
@@ -68,31 +67,16 @@
// Constructor
NewGui::NewGui(Scumm *s) : _s(s), _system(s->_system), _screen(0),
- _use_alpha_blending(true), _need_redraw(false),_prepare_for_gui(true),
- _pauseDialog(0), _saveLoadDialog(0), _aboutDialog(0), _optionsDialog(0),
+ _use_alpha_blending(true), _need_redraw(false), _prepare_for_gui(true),
_currentKeyDown(0)
{
-}
-
-void NewGui::pauseDialog()
-{
- if (!_pauseDialog)
- _pauseDialog = new PauseDialog(this, _s);
- _pauseDialog->open();
-}
-
-void NewGui::saveloadDialog()
-{
- if (!_saveLoadDialog)
- _saveLoadDialog = new SaveLoadDialog(this, _s);
- _saveLoadDialog->open();
-}
-
-void NewGui::optionsDialog()
-{
- if (!_optionsDialog)
- _optionsDialog = new OptionsDialog(this, _s);
- _optionsDialog->open();
+ // Setup some default GUI colors.
+ // TODO - either use nicer values, or maybe make this configurable?
+ _bgcolor = RGB_TO_16(0, 0, 0);
+ _color = RGB_TO_16(80, 80, 80);
+ _shadowcolor = RGB_TO_16(64, 64, 64);
+ _textcolor = RGB_TO_16(32, 160, 32);
+ _textcolorhi = RGB_TO_16(0, 255, 0);
}
void NewGui::loop()
@@ -103,13 +87,6 @@
if (_prepare_for_gui) {
saveState();
- // Setup some default GUI colors
- _bgcolor = RGB_TO_16(0, 0, 0);
- _color = RGB_TO_16(80, 80, 80);
- _shadowcolor = RGB_TO_16(64, 64, 64);
- _textcolor = RGB_TO_16(32, 192, 32);
- _textcolorhi = RGB_TO_16(0, 255, 0);
-
_eventList.clear();
_currentKeyDown = 0;
@@ -203,8 +180,6 @@
}
_keyRepeatLoopCount++;
}
-
- _s->drawDirtyScreenParts();
}
#pragma mark -
@@ -234,8 +209,6 @@
void NewGui::restoreState()
{
- _s->_fullRedraw = true;
- _s->_completeScreenRedraw = true;
_s->_cursorAnimate--;
// Restore old cursor
@@ -333,19 +306,18 @@
void NewGui::blendRect(int x, int y, int w, int h, int16 color)
{
- int r = RED_FROM_16(color) * 2;
- int g = GREEN_FROM_16(color) * 2;
- int b = BLUE_FROM_16(color) * 2;
+ int r = RED_FROM_16(color) * 3;
+ int g = GREEN_FROM_16(color) * 3;
+ int b = BLUE_FROM_16(color) * 3;
int16 *ptr = getBasePtr(x, y);
if (ptr == NULL)
return;
while (h--) {
for (int i = 0; i < w; i++) {
- ptr[i] = RGB_TO_16((RED_FROM_16(ptr[i])+r)/3,
- (GREEN_FROM_16(ptr[i])+g)/3,
- (BLUE_FROM_16(ptr[i])+b)/3);
-// ptr[i] = color;
+ ptr[i] = RGB_TO_16((RED_FROM_16(ptr[i])+r)/4,
+ (GREEN_FROM_16(ptr[i])+g)/4,
+ (BLUE_FROM_16(ptr[i])+b)/4);
}
ptr += _screen_pitch;
}
Index: newgui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- newgui.h 19 Sep 2002 17:44:41 -0000 1.6
+++ newgui.h 19 Sep 2002 21:45:55 -0000 1.7
@@ -68,11 +68,6 @@
int16 _textcolor;
int16 _textcolorhi;
- // Dialogs
- void pauseDialog();
- void saveloadDialog();
- void optionsDialog();
-
void loop();
bool isActive() { return ! _dialogStack.empty(); }
@@ -92,12 +87,6 @@
bool _prepare_for_gui;
DialogStack _dialogStack;
- Dialog *_pauseDialog;
- Dialog *_saveLoadDialog;
- Dialog *_aboutDialog;
- Dialog *_optionsDialog;
- Dialog *_soundDialog;
-
// for continuous events (keyDown)
int _currentKeyDown, _currentKeyDownFlags;
int _keyRepeatLoopCount;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,NONE,1.1 dialogs.h,NONE,1.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.1,1.2 scumm.h,1.21,1.22 scummvm.cpp,1.26,1.27
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list