Remove unused includes when INCLUDE_OLDGFX is not set. Implemented the full screen updates that the current menu code is doing using new graphics functions (still unfinished). Some cleanup.

svn-id: r45536
This commit is contained in:
Filippos Karapetis 2009-10-30 12:33:05 +00:00
parent 272cc75715
commit ff284c9f5b
7 changed files with 18 additions and 5 deletions

View file

@ -34,9 +34,11 @@
#include "sci/engine/state.h"
#include "sci/engine/gc.h"
#include "sci/engine/kernel_types.h" // for determine_reg_type
#ifdef INCLUDE_OLDGFX
#include "sci/gfx/gfx_gui.h" // for sciw_set_status_bar
#include "sci/gfx/gfx_state_internal.h"
#include "sci/gfx/gfx_widgets.h" // for getPort
#endif
#include "sci/sfx/songlib.h" // for SongLibrary
#include "sci/sfx/iterator.h" // for SCI_SONG_ITERATOR_TYPE_SCI0
#include "sci/sfx/sci_midi.h"

View file

@ -33,7 +33,9 @@
#include "sci/engine/kernel_types.h"
#include "sci/gui/gui.h"
#include "sci/engine/message.h"
#ifdef INCLUDE_OLDGFX
#include "sci/gfx/gfx_state_internal.h" // required for GfxPort, GfxVisual
#endif
#include "sci/gfx/menubar.h"
namespace Sci {

View file

@ -27,8 +27,6 @@
#include "sci/engine/state.h"
#include "sci/engine/kernel.h"
#include "sci/gfx/operations.h"
#include "sci/gfx/gfx_widgets.h"
#include "sci/gfx/gfx_state_internal.h" // required for GfxPort, GfxVisual
#include "sci/console.h"
#include "sci/debug.h" // for g_debug_simulated_key
#include "sci/gui/gui.h"

View file

@ -27,9 +27,11 @@
#include "sci/resource.h"
#include "sci/engine/state.h"
#include "sci/engine/kernel.h"
#ifdef INCLUDE_OLDGFX
#include "sci/gfx/gfx_gui.h"
#include "sci/gfx/menubar.h"
#include "sci/gfx/gfx_state_internal.h" // required for GfxPort, GfxVisual
#endif
#include "sci/gfx/menubar.h"
#include "sci/gui/gui.h"
#include "sci/gui/gui_cursor.h"
@ -112,12 +114,14 @@ static int _menu_go_down(Menubar *menubar, int menu_nr, int item_nr) {
return item_nr;
}
// TODO/FIXME: avoid full screen updates
#ifdef INCLUDE_OLDGFX
#define FULL_REDRAW \
s->visual->draw(Common::Point(0, 0)); \
gfxop_update(s->gfx_state);
#else
#define FULL_REDRAW
#define FULL_REDRAW \
s->_gui->graphRedrawBox(Common::Rect(0, 0, 319, 219));
#endif
reg_t kMenuSelect(EngineState *s, int argc, reg_t *argv) {

View file

@ -25,7 +25,6 @@
#include "sci/sci.h"
#include "sci/engine/state.h"
//#include "sci/sfx/player.h"
#include "sci/sfx/iterator.h"
#include "sci/sfx/misc.h"
#include "sci/engine/kernel.h"

View file

@ -31,7 +31,9 @@
#include "sci/sci.h"
#include "sci/gfx/menubar.h"
#ifdef INCLUDE_OLDGFX
#include "sci/gfx/gfx_state_internal.h" // required for GfxPort, GfxContainer
#endif
#include "sci/sfx/core.h"
#include "sci/sfx/iterator.h"
#include "sci/engine/state.h"

View file

@ -36,8 +36,10 @@
#include "sci/engine/kernel.h"
#include "sci/gfx/operations.h" // fog GfxState
#ifdef INCLUDE_OLDGFX
#include "sci/gfx/gfx_state_internal.h" // required for GfxContainer, GfxPort, GfxVisual
#include "sci/gui32/gui32.h"
#endif
#include "sci/gui/gui.h"
#include "sci/gui/gui_palette.h"
#include "sci/gui/gui_cursor.h"
@ -120,9 +122,13 @@ Common::Error SciEngine::run() {
if (script_init_engine(_gamestate))
return Common::kUnknownError;
#ifdef INCLUDE_OLDGFX
// Gui change
//_gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor); // new
_gamestate->_gui = new SciGui32(_gamestate, screen, palette, cursor); // old
#else
_gamestate->_gui = new SciGui(_gamestate, screen, palette, cursor);
#endif
if (game_init(_gamestate)) { /* Initialize */
warning("Game initialization failed: Aborting...");