Clean up interface between framework, ivis_opengl and main, reducing dependencies that go the wrong way.
Removing unnecessary header file frameint.hmaster
parent
81cbe807bd
commit
3830e1ae77
|
@ -27,7 +27,6 @@ noinst_HEADERS = \
|
|||
file.h \
|
||||
fixedpoint.h \
|
||||
frame.h \
|
||||
frameint.h \
|
||||
frameresource.h \
|
||||
geometry.h \
|
||||
gettext.h \
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include <physfs.h>
|
||||
|
||||
#include "frameint.h"
|
||||
#include "frameresource.h"
|
||||
#include "input.h"
|
||||
#include "physfs_ext.h"
|
||||
|
@ -91,11 +90,6 @@ bool frameInitialise()
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!screenInitialise())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Initialise the input system */
|
||||
inputInitialise();
|
||||
|
||||
|
@ -135,9 +129,6 @@ void frameUpdate(void)
|
|||
*/
|
||||
void frameShutDown(void)
|
||||
{
|
||||
debug(LOG_NEVER, "Screen shutdown!");
|
||||
screenShutDown();
|
||||
|
||||
// Shutdown the resource stuff
|
||||
debug(LOG_NEVER, "No more resources!");
|
||||
resShutDown();
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
This file is part of Warzone 2100.
|
||||
Copyright (C) 1999-2004 Eidos Interactive
|
||||
Copyright (C) 2005-2013 Warzone 2100 Project
|
||||
|
||||
Warzone 2100 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Warzone 2100 is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Warzone 2100; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/*! \file frameint.h
|
||||
* \brief Internal definitions for the framework library.
|
||||
*/
|
||||
#ifndef _frameint_h
|
||||
#define _frameint_h
|
||||
|
||||
/* Check the header files have been included from frame.h if they
|
||||
* are used outside of the framework library.
|
||||
*/
|
||||
#if !defined(_frame_h) && !defined(FRAME_LIB_INCLUDE)
|
||||
#error Framework header files MUST be included from Frame.h ONLY.
|
||||
#endif
|
||||
|
||||
/* Initialise the double buffered display */
|
||||
extern bool screenInitialise(void);
|
||||
|
||||
/* Release the DD objects */
|
||||
extern void screenShutDown(void);
|
||||
|
||||
/* The Current screen size and bit depth */
|
||||
extern unsigned screenWidth;
|
||||
extern unsigned screenHeight;
|
||||
|
||||
#endif //_frameint_h
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
|
||||
#include "lib/framework/frame.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "lib/framework/opengl.h"
|
||||
|
||||
#include "lib/gamelib/gtime.h"
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include <png.h>
|
||||
#include "lib/ivis_opengl/png_util.h"
|
||||
#include "lib/ivis_opengl/tex.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "lib/ivis_opengl/textdraw.h"
|
||||
#include "lib/ivis_opengl/piestate.h"
|
||||
#include "lib/ivis_opengl/pieblitfunc.h"
|
||||
|
|
|
@ -38,11 +38,8 @@
|
|||
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
|
||||
/* Legacy stuff
|
||||
* - only used in the sequence video code we have not yet decided whether to port or to junk */
|
||||
|
||||
/* Set the colour for text */
|
||||
extern void screenSetTextColour(UBYTE red, UBYTE green, UBYTE blue);
|
||||
extern unsigned screenWidth;
|
||||
extern unsigned screenHeight;
|
||||
|
||||
/* backDrop */
|
||||
extern void screen_SetBackDropFromFile(const char* filename);
|
||||
|
@ -77,6 +74,9 @@ enum PERF_POINT
|
|||
PERF_COUNT
|
||||
};
|
||||
|
||||
bool screenInitialise();
|
||||
void screenShutDown();
|
||||
|
||||
void wzPerfBegin(PERF_POINT pp, const char *descr);
|
||||
void wzPerfEnd(PERF_POINT pp);
|
||||
void wzPerfStart();
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "lib/framework/frame.h"
|
||||
#include "lib/ivis_opengl/pieclip.h"
|
||||
#include "src/warzoneconfig.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "wzapp_qt.h"
|
||||
|
||||
// used in crash reports & version info
|
||||
|
|
|
@ -105,8 +105,8 @@ static bool mouseInWindow = false;
|
|||
static CURSOR lastCursor = CURSOR_ARROW;
|
||||
static bool crashing = false;
|
||||
|
||||
unsigned screenWidth = 0; // Declared in frameint.h.
|
||||
unsigned screenHeight = 0; // Declared in frameint.h.
|
||||
unsigned screenWidth = 0; // Declared in screen.h
|
||||
unsigned screenHeight = 0; // Declared in screen.h
|
||||
static void inputAddBuffer(UDWORD key, utf_32_char unicode);
|
||||
static int WZkeyToQtKey(int code);
|
||||
|
||||
|
|
|
@ -48,8 +48,8 @@ int main(int argc, char *argv[])
|
|||
return realmain(argc, argv);
|
||||
}
|
||||
|
||||
unsigned screenWidth = 0; // Declared in frameint.h.
|
||||
unsigned screenHeight = 0; // Declared in frameint.h.
|
||||
unsigned screenWidth = 0; // Declared in screen.h
|
||||
unsigned screenHeight = 0; // Declared in screen.h
|
||||
static unsigned screenDepth = 0;
|
||||
static SDL_Surface * screen = NULL;
|
||||
|
||||
|
|
|
@ -56,13 +56,13 @@
|
|||
*/
|
||||
|
||||
#include "lib/framework/frame.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "lib/framework/opengl.h"
|
||||
#include "sequence.h"
|
||||
#include "timer.h"
|
||||
#include "lib/framework/math_ext.h"
|
||||
#include "lib/ivis_opengl/piestate.h"
|
||||
#include "lib/ivis_opengl/pieblitfunc.h"
|
||||
#include "lib/ivis_opengl/screen.h"
|
||||
#include "lib/sound/audio.h"
|
||||
#include "lib/sound/openal_error.h"
|
||||
#include "lib/sound/mixer.h"
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
|
||||
#include "lib/framework/frame.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "widget.h"
|
||||
#include "widgint.h"
|
||||
#include "button.h"
|
||||
|
|
|
@ -23,11 +23,10 @@
|
|||
|
||||
#include "lib/framework/frame.h"
|
||||
#include "lib/framework/wzapp.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "lib/ivis_opengl/screen.h"
|
||||
#include "widget.h"
|
||||
#include "widgint.h"
|
||||
#include "tip.h"
|
||||
// FIXME Direct iVis implementation include!
|
||||
#include "lib/ivis_opengl/pieblitfunc.h"
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
|
||||
#include "lib/framework/frame.h"
|
||||
#include "lib/framework/string_ext.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "lib/framework/utf.h"
|
||||
#include "lib/ivis_opengl/textdraw.h"
|
||||
#include "lib/ivis_opengl/pieblitfunc.h"
|
||||
#include "lib/ivis_opengl/piestate.h"
|
||||
#include "lib/ivis_opengl/screen.h"
|
||||
#include "lib/gamelib/gtime.h"
|
||||
|
||||
#include "widget.h"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "lib/framework/endian_hack.h"
|
||||
#include "lib/framework/wzconfig.h"
|
||||
#include "lib/framework/file.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "lib/framework/physfs_ext.h"
|
||||
#include "lib/framework/strres.h"
|
||||
#include "lib/framework/opengl.h"
|
||||
|
|
|
@ -728,6 +728,7 @@ void systemShutdown(void)
|
|||
debug(LOG_MAIN, "shutting down everything else");
|
||||
pal_ShutDown(); // currently unused stub
|
||||
frameShutDown(); // close screen / SDL / resources / cursors / trig
|
||||
screenShutDown();
|
||||
closeConfig(); // "registry" close
|
||||
cleanSearchPath(); // clean PHYSFS search paths
|
||||
debug_exit(); // cleanup debug routines
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#endif // WZ_OS_WIN
|
||||
|
||||
#include "lib/framework/input.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "lib/framework/physfs_ext.h"
|
||||
#include "lib/exceptionhandler/exceptionhandler.h"
|
||||
#include "lib/exceptionhandler/dumpinfo.h"
|
||||
|
@ -1262,6 +1261,10 @@ int realmain(int argc, char *argv[])
|
|||
{
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (!screenInitialise())
|
||||
{
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
war_SetWidth(pie_GetVideoBufferWidth());
|
||||
war_SetHeight(pie_GetVideoBufferHeight());
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include <time.h>
|
||||
|
||||
#include "lib/framework/frameresource.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "lib/framework/file.h"
|
||||
#include "lib/framework/stdio_ext.h"
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
#include "keymap.h"
|
||||
#include "keybind.h"
|
||||
#include "loop.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
#include "frontend.h"
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "lib/framework/frame.h"
|
||||
#include "lib/framework/frameint.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <physfs.h>
|
||||
|
|
Loading…
Reference in New Issue