C4Include.h: Do not include C4Gui.h

The two dialogs in headers included in C4Game.h are only used by classes in
those headers, and do not need to be defined in the headers.
Günther Brammer 2011-01-24 01:15:58 +01:00
parent 6bf504cf0c
commit cde66b249f
25 changed files with 103 additions and 75 deletions

View File

@ -132,7 +132,11 @@ class CStdApp;
class CStdWindow;
class CSurface;
namespace C4GUI { class Screen; }
namespace C4GUI
{
class Screen;
class Dialog;
}
typedef C4GUI::Screen C4GUIScreen;
#endif // INC_C4Prototypes

View File

@ -18,6 +18,8 @@
#include <C4Include.h>
#include <C4Reloc.h>
#include <C4Config.h>
C4Reloc Reloc; // singleton
void C4Reloc::Init()

View File

@ -26,6 +26,7 @@
#include "C4ObjectList.h"
#include "C4Control.h"
#include "C4Rect.h"
#ifdef WITH_DEVELOPER_MODE
#include <gtk/gtk.h>

View File

@ -25,6 +25,7 @@
#include <C4Include.h>
#include <C4PXS.h>
#include <C4Config.h>
#include <C4Physics.h>
#include <C4Random.h>
#include <C4Weather.h>

View File

@ -24,6 +24,7 @@
#include <C4Include.h>
#include <C4Particles.h>
#include <C4Config.h>
#include <C4Physics.h>
#include <C4Object.h>
#include <C4Random.h>

View File

@ -24,8 +24,9 @@
#include <C4Include.h>
#include <C4Scenario.h>
#include <C4InputValidation.h>
#include <C4Config.h>
#include <C4InputValidation.h>
#include <C4Random.h>
#include <C4Group.h>
#include <C4Components.h>

View File

@ -28,6 +28,7 @@
#include <C4Random.h>
#include <C4GraphicsSystem.h>
#include <C4Game.h>
#include <C4SoundSystem.h>
C4Weather::C4Weather()
{

View File

@ -40,6 +40,7 @@
#include <C4Object.h>
#include "C4Network2Res.h"
#include <C4Material.h>
#include <C4SoundSystem.h>
//--------------------------------- C4DefCore ----------------------------------------------

View File

@ -23,6 +23,7 @@
#define INC_C4Sector
#include <C4ObjectList.h>
#include <C4Rect.h>
// class predefs
class C4LSector;

View File

@ -34,6 +34,7 @@
#include <C4PXS.h>
#include <C4PlayerList.h>
#include <C4GameObjects.h>
#include <C4SoundSystem.h>
void C4Effect::AssignCallbackFunctions()
{

View File

@ -240,7 +240,7 @@ const C4KeyCodeMapEntry KeyCodeMap [] =
{ VK_F23 , "F23" , NULL },
{ VK_F24 , "F24" , NULL },
{ VK_NUMLOCK , "NumLock" , "NLock" },
{ K_SCROLL , "Scroll" , NULL },
{ VK_SCROLL , "Scroll" , NULL },
{ VK_PROCESSKEY , "PROCESSKEY" , NULL },

View File

@ -29,6 +29,34 @@
#include "C4GameOverDlg.h"
#include <C4GraphicsResource.h>
class C4ScoreboardDlg : public C4GUI::Dialog
{
private:
int32_t *piColWidths;
C4Scoreboard *pBrd;
enum { XIndent = 4, YIndent = 4, XMargin = 3, YMargin = 3 };
public:
C4ScoreboardDlg(C4Scoreboard *pForScoreboard);
~C4ScoreboardDlg();
protected:
void InvalidateRows() { delete [] piColWidths; piColWidths = NULL; }
void Update(); // update row widths and own size and caption
virtual bool DoPlacement(C4GUI::Screen *pOnScreen, const C4Rect &rPreferredDlgRect);
virtual void Draw(C4TargetFacet &cgo);
virtual void DrawElement(C4TargetFacet &cgo);
virtual const char *GetID() { return "Scoreboard"; }
virtual bool IsMouseControlled() { return false; }
friend class C4Scoreboard;
};
// ************************************************
// *** C4Scoreboard

View File

@ -21,7 +21,6 @@
#define INC_C4Scoreboard
#include <utility>
#include "C4Gui.h"
class C4Scoreboard
{
@ -93,32 +92,5 @@ public:
void CompileFunc(StdCompiler *pComp);
};
class C4ScoreboardDlg : public C4GUI::Dialog
{
private:
int32_t *piColWidths;
C4Scoreboard *pBrd;
enum { XIndent = 4, YIndent = 4, XMargin = 3, YMargin = 3 };
public:
C4ScoreboardDlg(C4Scoreboard *pForScoreboard);
~C4ScoreboardDlg();
protected:
void InvalidateRows() { delete [] piColWidths; piColWidths = NULL; }
void Update(); // update row widths and own size and caption
virtual bool DoPlacement(C4GUI::Screen *pOnScreen, const C4Rect &rPreferredDlgRect);
virtual void Draw(C4TargetFacet &cgo);
virtual void DrawElement(C4TargetFacet &cgo);
virtual const char *GetID() { return "Scoreboard"; }
virtual bool IsMouseControlled() { return false; }
friend class C4Scoreboard;
};
#endif // INC_C4Scoreboard

View File

@ -27,6 +27,7 @@
#include <C4Include.h>
#include <C4GamePadCon.h>
#include <C4Config.h>
#include <C4ObjectCom.h>
#include <C4Log.h>
#include <C4Game.h>

View File

@ -23,6 +23,8 @@
#include <C4Include.h>
#include "C4SoundLoaders.h"
#include <C4Application.h>
#if defined(USE_OPEN_AL) && defined(__APPLE__)
#import <CoreFoundation/CoreFoundation.h>
#import <AudioToolbox/AudioToolbox.h>

View File

@ -21,6 +21,7 @@
#endif
#include <vector>
#include <C4SoundSystem.h>
namespace C4SoundLoaders
{

View File

@ -23,6 +23,7 @@
#include <C4FullScreen.h>
#include <C4Game.h>
#include "C4Gui.h"
#include <C4Log.h>
#ifdef HAVE_LIBSMPEG
@ -31,6 +32,48 @@
#include <SDL_mixer.h>
#endif // HAVE_LIBSMPEG
// playback dialog
class C4VideoShowDialog : public C4GUI::FullscreenDialog
{
private:
#ifdef _WIN32
CStdAVIFile AVIFile;
C4SoundEffect *pAudioTrack;
#endif
#ifdef HAVE_LIBSDL_MIXER
SMPEG * mpeg;
SMPEG_Info * mpeg_info;
SDL_Surface * surface;
#endif
C4FacetSurface fctBuffer;
time_t iStartFrameTime;
protected:
virtual int32_t GetZOrdering() { return C4GUI_Z_VIDEO; }
virtual bool IsExclusiveDialog() { return true; }
void VideoDone(); // mark video done
public:
C4VideoShowDialog() : C4GUI::FullscreenDialog(NULL, NULL)
#ifdef _WIN32
, pAudioTrack(NULL)
#endif
#ifdef HAVE_LIBSDL_MIXER
, mpeg(0)
, mpeg_info(0)
, surface(0)
#endif
{}
~C4VideoShowDialog();
bool LoadVideo(C4VideoFile *pVideoFile);
virtual void DrawElement(C4TargetFacet &cgo); // draw current video frame
};
void C4VideoFile::Clear()
{
if (sFilename.getLength())

View File

@ -21,7 +21,6 @@
#ifndef INC_C4VideoPlayback
#define INC_C4VideoPlayback
#include "C4Gui.h"
#include <StdVideo.h>
typedef struct _SMPEG SMPEG;
@ -51,47 +50,6 @@ public:
void SetNext(C4VideoFile *pNewNext) { pNext = pNewNext; }
};
// playback dialog
class C4VideoShowDialog : public C4GUI::FullscreenDialog
{
private:
#ifdef _WIN32
CStdAVIFile AVIFile;
C4SoundEffect *pAudioTrack;
#endif
#ifdef HAVE_LIBSDL_MIXER
SMPEG * mpeg;
SMPEG_Info * mpeg_info;
SDL_Surface * surface;
#endif
C4FacetSurface fctBuffer;
time_t iStartFrameTime;
protected:
virtual int32_t GetZOrdering() { return C4GUI_Z_VIDEO; }
virtual bool IsExclusiveDialog() { return true; }
void VideoDone(); // mark video done
public:
C4VideoShowDialog() : C4GUI::FullscreenDialog(NULL, NULL)
#ifdef _WIN32
, pAudioTrack(NULL)
#endif
#ifdef HAVE_LIBSDL_MIXER
, mpeg(0)
, mpeg_info(0)
, surface(0)
#endif
{}
~C4VideoShowDialog();
bool LoadVideo(C4VideoFile *pVideoFile);
virtual void DrawElement(C4TargetFacet &cgo); // draw current video frame
};
// main playback class (C4Game member)
class C4VideoPlayer
{

View File

@ -32,6 +32,7 @@
#include <StdFont.h>
#include <StdWindow.h>
#include "C4Rect.h"
#include <C4Config.h>
#include "StdMesh.h"
#include <stdio.h>

View File

@ -25,6 +25,7 @@
#include <StdGL.h>
#include <StdSurface2.h>
#include <StdWindow.h>
#include <C4Config.h>
#ifdef USE_GL

View File

@ -22,13 +22,15 @@
#include <C4Include.h>
#include <StdGtkWindow.h>
#include "C4Version.h"
#include "C4Config.h"
#include <X11/Xlib.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "C4Version.h"
/* CStdGtkWindow */

View File

@ -28,6 +28,7 @@
#include <StdBuf.h>
#include "C4Version.h"
#include <C4Config.h>
/* CStdWindow */

View File

@ -36,6 +36,7 @@
#include <StdD3D.h>
#include <Bitmap256.h>
#include <StdPNG.h>
#include <C4Config.h>
#ifdef HAVE_IO_H

View File

@ -25,14 +25,16 @@
/* A wrapper class to OS dependent event and window interfaces, WIN32 version */
#include "C4Include.h"
#include <StdWindow.h>
#include <StdRegistry.h>
#include <C4Config.h>
#ifdef USE_GL
#include <StdGL.h>
#endif
#ifdef USE_DIRECTX
#include <StdD3D.h>
#endif
#include <StdWindow.h>
#include <mmsystem.h>
#include <stdio.h>
#include <io.h>

View File

@ -32,6 +32,7 @@
#include <C4Def.h>
#include <C4Game.h>
#include <C4Log.h>
#include <C4Config.h>
#define DEBUG_BYTECODE_DUMP 0