forked from Mirrors/openclonk
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.
parent
6bf504cf0c
commit
cde66b249f
|
@ -132,7 +132,11 @@ class CStdApp;
|
||||||
class CStdWindow;
|
class CStdWindow;
|
||||||
class CSurface;
|
class CSurface;
|
||||||
|
|
||||||
namespace C4GUI { class Screen; }
|
namespace C4GUI
|
||||||
|
{
|
||||||
|
class Screen;
|
||||||
|
class Dialog;
|
||||||
|
}
|
||||||
typedef C4GUI::Screen C4GUIScreen;
|
typedef C4GUI::Screen C4GUIScreen;
|
||||||
|
|
||||||
#endif // INC_C4Prototypes
|
#endif // INC_C4Prototypes
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <C4Include.h>
|
#include <C4Include.h>
|
||||||
#include <C4Reloc.h>
|
#include <C4Reloc.h>
|
||||||
|
|
||||||
|
#include <C4Config.h>
|
||||||
|
|
||||||
C4Reloc Reloc; // singleton
|
C4Reloc Reloc; // singleton
|
||||||
|
|
||||||
void C4Reloc::Init()
|
void C4Reloc::Init()
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include "C4ObjectList.h"
|
#include "C4ObjectList.h"
|
||||||
#include "C4Control.h"
|
#include "C4Control.h"
|
||||||
|
#include "C4Rect.h"
|
||||||
|
|
||||||
#ifdef WITH_DEVELOPER_MODE
|
#ifdef WITH_DEVELOPER_MODE
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <C4Include.h>
|
#include <C4Include.h>
|
||||||
#include <C4PXS.h>
|
#include <C4PXS.h>
|
||||||
|
|
||||||
|
#include <C4Config.h>
|
||||||
#include <C4Physics.h>
|
#include <C4Physics.h>
|
||||||
#include <C4Random.h>
|
#include <C4Random.h>
|
||||||
#include <C4Weather.h>
|
#include <C4Weather.h>
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include <C4Include.h>
|
#include <C4Include.h>
|
||||||
#include <C4Particles.h>
|
#include <C4Particles.h>
|
||||||
|
|
||||||
|
#include <C4Config.h>
|
||||||
#include <C4Physics.h>
|
#include <C4Physics.h>
|
||||||
#include <C4Object.h>
|
#include <C4Object.h>
|
||||||
#include <C4Random.h>
|
#include <C4Random.h>
|
||||||
|
|
|
@ -24,8 +24,9 @@
|
||||||
|
|
||||||
#include <C4Include.h>
|
#include <C4Include.h>
|
||||||
#include <C4Scenario.h>
|
#include <C4Scenario.h>
|
||||||
#include <C4InputValidation.h>
|
|
||||||
|
|
||||||
|
#include <C4Config.h>
|
||||||
|
#include <C4InputValidation.h>
|
||||||
#include <C4Random.h>
|
#include <C4Random.h>
|
||||||
#include <C4Group.h>
|
#include <C4Group.h>
|
||||||
#include <C4Components.h>
|
#include <C4Components.h>
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <C4Random.h>
|
#include <C4Random.h>
|
||||||
#include <C4GraphicsSystem.h>
|
#include <C4GraphicsSystem.h>
|
||||||
#include <C4Game.h>
|
#include <C4Game.h>
|
||||||
|
#include <C4SoundSystem.h>
|
||||||
|
|
||||||
C4Weather::C4Weather()
|
C4Weather::C4Weather()
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include <C4Object.h>
|
#include <C4Object.h>
|
||||||
#include "C4Network2Res.h"
|
#include "C4Network2Res.h"
|
||||||
#include <C4Material.h>
|
#include <C4Material.h>
|
||||||
|
#include <C4SoundSystem.h>
|
||||||
|
|
||||||
//--------------------------------- C4DefCore ----------------------------------------------
|
//--------------------------------- C4DefCore ----------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#define INC_C4Sector
|
#define INC_C4Sector
|
||||||
|
|
||||||
#include <C4ObjectList.h>
|
#include <C4ObjectList.h>
|
||||||
|
#include <C4Rect.h>
|
||||||
|
|
||||||
// class predefs
|
// class predefs
|
||||||
class C4LSector;
|
class C4LSector;
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include <C4PXS.h>
|
#include <C4PXS.h>
|
||||||
#include <C4PlayerList.h>
|
#include <C4PlayerList.h>
|
||||||
#include <C4GameObjects.h>
|
#include <C4GameObjects.h>
|
||||||
|
#include <C4SoundSystem.h>
|
||||||
|
|
||||||
void C4Effect::AssignCallbackFunctions()
|
void C4Effect::AssignCallbackFunctions()
|
||||||
{
|
{
|
||||||
|
|
|
@ -240,7 +240,7 @@ const C4KeyCodeMapEntry KeyCodeMap [] =
|
||||||
{ VK_F23 , "F23" , NULL },
|
{ VK_F23 , "F23" , NULL },
|
||||||
{ VK_F24 , "F24" , NULL },
|
{ VK_F24 , "F24" , NULL },
|
||||||
{ VK_NUMLOCK , "NumLock" , "NLock" },
|
{ VK_NUMLOCK , "NumLock" , "NLock" },
|
||||||
{ K_SCROLL , "Scroll" , NULL },
|
{ VK_SCROLL , "Scroll" , NULL },
|
||||||
|
|
||||||
{ VK_PROCESSKEY , "PROCESSKEY" , NULL },
|
{ VK_PROCESSKEY , "PROCESSKEY" , NULL },
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,34 @@
|
||||||
#include "C4GameOverDlg.h"
|
#include "C4GameOverDlg.h"
|
||||||
#include <C4GraphicsResource.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
|
// *** C4Scoreboard
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#define INC_C4Scoreboard
|
#define INC_C4Scoreboard
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include "C4Gui.h"
|
|
||||||
|
|
||||||
class C4Scoreboard
|
class C4Scoreboard
|
||||||
{
|
{
|
||||||
|
@ -93,32 +92,5 @@ public:
|
||||||
void CompileFunc(StdCompiler *pComp);
|
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
|
#endif // INC_C4Scoreboard
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <C4Include.h>
|
#include <C4Include.h>
|
||||||
#include <C4GamePadCon.h>
|
#include <C4GamePadCon.h>
|
||||||
|
|
||||||
|
#include <C4Config.h>
|
||||||
#include <C4ObjectCom.h>
|
#include <C4ObjectCom.h>
|
||||||
#include <C4Log.h>
|
#include <C4Log.h>
|
||||||
#include <C4Game.h>
|
#include <C4Game.h>
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
#include <C4Include.h>
|
#include <C4Include.h>
|
||||||
#include "C4SoundLoaders.h"
|
#include "C4SoundLoaders.h"
|
||||||
|
|
||||||
|
#include <C4Application.h>
|
||||||
|
|
||||||
#if defined(USE_OPEN_AL) && defined(__APPLE__)
|
#if defined(USE_OPEN_AL) && defined(__APPLE__)
|
||||||
#import <CoreFoundation/CoreFoundation.h>
|
#import <CoreFoundation/CoreFoundation.h>
|
||||||
#import <AudioToolbox/AudioToolbox.h>
|
#import <AudioToolbox/AudioToolbox.h>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <C4SoundSystem.h>
|
||||||
|
|
||||||
namespace C4SoundLoaders
|
namespace C4SoundLoaders
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include <C4FullScreen.h>
|
#include <C4FullScreen.h>
|
||||||
#include <C4Game.h>
|
#include <C4Game.h>
|
||||||
|
#include "C4Gui.h"
|
||||||
#include <C4Log.h>
|
#include <C4Log.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBSMPEG
|
#ifdef HAVE_LIBSMPEG
|
||||||
|
@ -31,6 +32,48 @@
|
||||||
#include <SDL_mixer.h>
|
#include <SDL_mixer.h>
|
||||||
#endif // HAVE_LIBSMPEG
|
#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()
|
void C4VideoFile::Clear()
|
||||||
{
|
{
|
||||||
if (sFilename.getLength())
|
if (sFilename.getLength())
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#ifndef INC_C4VideoPlayback
|
#ifndef INC_C4VideoPlayback
|
||||||
#define INC_C4VideoPlayback
|
#define INC_C4VideoPlayback
|
||||||
|
|
||||||
#include "C4Gui.h"
|
|
||||||
#include <StdVideo.h>
|
#include <StdVideo.h>
|
||||||
|
|
||||||
typedef struct _SMPEG SMPEG;
|
typedef struct _SMPEG SMPEG;
|
||||||
|
@ -51,47 +50,6 @@ public:
|
||||||
void SetNext(C4VideoFile *pNewNext) { pNext = pNewNext; }
|
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)
|
// main playback class (C4Game member)
|
||||||
class C4VideoPlayer
|
class C4VideoPlayer
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <StdFont.h>
|
#include <StdFont.h>
|
||||||
#include <StdWindow.h>
|
#include <StdWindow.h>
|
||||||
#include "C4Rect.h"
|
#include "C4Rect.h"
|
||||||
|
#include <C4Config.h>
|
||||||
#include "StdMesh.h"
|
#include "StdMesh.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <StdGL.h>
|
#include <StdGL.h>
|
||||||
#include <StdSurface2.h>
|
#include <StdSurface2.h>
|
||||||
#include <StdWindow.h>
|
#include <StdWindow.h>
|
||||||
|
#include <C4Config.h>
|
||||||
|
|
||||||
#ifdef USE_GL
|
#ifdef USE_GL
|
||||||
|
|
||||||
|
|
|
@ -22,13 +22,15 @@
|
||||||
#include <C4Include.h>
|
#include <C4Include.h>
|
||||||
#include <StdGtkWindow.h>
|
#include <StdGtkWindow.h>
|
||||||
|
|
||||||
|
#include "C4Version.h"
|
||||||
|
#include "C4Config.h"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#include "C4Version.h"
|
|
||||||
|
|
||||||
/* CStdGtkWindow */
|
/* CStdGtkWindow */
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include <StdBuf.h>
|
#include <StdBuf.h>
|
||||||
|
|
||||||
#include "C4Version.h"
|
#include "C4Version.h"
|
||||||
|
#include <C4Config.h>
|
||||||
|
|
||||||
/* CStdWindow */
|
/* CStdWindow */
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include <StdD3D.h>
|
#include <StdD3D.h>
|
||||||
#include <Bitmap256.h>
|
#include <Bitmap256.h>
|
||||||
#include <StdPNG.h>
|
#include <StdPNG.h>
|
||||||
|
#include <C4Config.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_IO_H
|
#ifdef HAVE_IO_H
|
||||||
|
|
|
@ -25,14 +25,16 @@
|
||||||
/* A wrapper class to OS dependent event and window interfaces, WIN32 version */
|
/* A wrapper class to OS dependent event and window interfaces, WIN32 version */
|
||||||
|
|
||||||
#include "C4Include.h"
|
#include "C4Include.h"
|
||||||
|
#include <StdWindow.h>
|
||||||
|
|
||||||
#include <StdRegistry.h>
|
#include <StdRegistry.h>
|
||||||
|
#include <C4Config.h>
|
||||||
#ifdef USE_GL
|
#ifdef USE_GL
|
||||||
#include <StdGL.h>
|
#include <StdGL.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_DIRECTX
|
#ifdef USE_DIRECTX
|
||||||
#include <StdD3D.h>
|
#include <StdD3D.h>
|
||||||
#endif
|
#endif
|
||||||
#include <StdWindow.h>
|
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <C4Def.h>
|
#include <C4Def.h>
|
||||||
#include <C4Game.h>
|
#include <C4Game.h>
|
||||||
#include <C4Log.h>
|
#include <C4Log.h>
|
||||||
|
#include <C4Config.h>
|
||||||
|
|
||||||
#define DEBUG_BYTECODE_DUMP 0
|
#define DEBUG_BYTECODE_DUMP 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue