[Scummvm-cvs-logs] CVS: scummvm/common main.cpp,1.8,1.9
Max Horn
fingolfin at users.sourceforge.net
Fri Sep 27 06:07:05 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.5,1.6 sdl-common.h,1.3,1.4 sdl.cpp,1.6,1.7 sdl_gl.cpp,1.4,1.5
- Next message: [Scummvm-cvs-logs] CVS: scummvm/gui newgui.cpp,1.16,1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/common
In directory usw-pr-cvs1:/tmp/cvs-serv26173/common
Modified Files:
main.cpp
Log Message:
enabled demo dialog shown during startup; some fixes/cleanup in NewGUI
Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/main.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- main.cpp 26 Sep 2002 12:29:10 -0000 1.8
+++ main.cpp 27 Sep 2002 13:06:58 -0000 1.9
@@ -151,13 +151,44 @@
// TODO - move this up for the launcher dialog?
g_gui = new NewGui(system);
-#if 0
- // FIXME - we need to be able to do an init_size() call on the system object here
- // so that we can display stuff. But right now, init_size() can't safely be called
- // multiple times (at least not for the SDL backend). So either we have to modify
- // all the backends to allow for this, or come up with some other solution.
- const char *message = "This dialog is shown before the Engine is even created!\n"
- "Wow! Ain't e cool?\n";
+#if 1
+ // FIXME - we need to call init_size() here so that we can display for example
+ // the launcher dialog. But the Engine object will also call it again (possibly
+ // with a different widht/height!9 However, this method is not for all OSystem
+ // implementations reentrant (it is so now for the SDL backend). Thus we need
+ // to fix all backends to support it, if they don't already.
+ system->init_size(320, 200);
+
+ // FIXME - mouse cursors are currently always set via 8 bit data.
+ // Thus for now we need to setup a dummy palette. On the long run, we might
+ // want to add a set_mouse_cursor_overlay() method to OSystem, which would serve
+ // two purposes:
+ // 1) allow for 16 bit mouse cursors in overlay mode
+ // 2) no need to backup & restore the mouse cursor before/after the overlay is shown
+ const byte dummy_palette[] = {
+ 0, 0, 0, 0,
+ 0, 0, 171, 0,
+ 0, 171, 0, 0,
+ 0, 171, 171, 0,
+ 171, 0, 0, 0,
+ 171, 0, 171, 0,
+ 171, 87, 0, 0,
+ 171, 171, 171, 0,
+ 87, 87, 87, 0,
+ 87, 87, 255, 0,
+ 87, 255, 87, 0,
+ 87, 255, 255, 0,
+ 255, 87, 87, 0,
+ 255, 87, 255, 0,
+ 255, 255, 87, 0,
+ 255, 255, 255, 0,
+ };
+
+ system->set_palette(dummy_palette, 0, 16);
+
+ const char *message = "This dialog is shown before the\n"
+ "Engine obejct is even created.\n"
+ "Wow! Ain't we cool?\n";
Dialog *dlg = new MessageDialog(g_gui, message);
dlg->open();
g_gui->runLoop();
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.5,1.6 sdl-common.h,1.3,1.4 sdl.cpp,1.6,1.7 sdl_gl.cpp,1.4,1.5
- Next message: [Scummvm-cvs-logs] CVS: scummvm/gui newgui.cpp,1.16,1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list