forked from Mirrors/openclonk
shuffle the #includes around a bit
This reduces the dependencies from src/lib to the rest of the code a bit.stable-5.2
parent
2f505e2bc2
commit
a28a6621da
|
@ -42,6 +42,7 @@ set(OC_CLONK_SOURCES
|
|||
src/config/C4Config.h
|
||||
src/config/C4ConfigShareware.cpp
|
||||
src/config/C4ConfigShareware.h
|
||||
src/config/C4Constants.h
|
||||
src/config/C4SecurityCertificates.cpp
|
||||
src/config/C4SecurityCertificates.h
|
||||
src/control/C4Control.cpp
|
||||
|
@ -73,7 +74,6 @@ set(OC_CLONK_SOURCES
|
|||
src/editor/C4PropertyDlg.h
|
||||
src/editor/C4ToolsDlg.cpp
|
||||
src/editor/C4ToolsDlg.h
|
||||
src/game/C4Constants.h
|
||||
src/game/C4GameVersion.h
|
||||
src/game/C4Physics.h
|
||||
src/game/landscape/C4Landscape.cpp
|
||||
|
|
|
@ -168,6 +168,7 @@ src/config/C4Config.cpp \
|
|||
src/config/C4Config.h \
|
||||
src/config/C4ConfigShareware.cpp \
|
||||
src/config/C4ConfigShareware.h \
|
||||
src/config/C4Constants.h \
|
||||
src/config/C4SecurityCertificates.cpp \
|
||||
src/config/C4SecurityCertificates.h \
|
||||
src/control/C4Control.cpp \
|
||||
|
@ -199,7 +200,6 @@ src/editor/C4PropertyDlg.cpp \
|
|||
src/editor/C4PropertyDlg.h \
|
||||
src/editor/C4ToolsDlg.cpp \
|
||||
src/editor/C4ToolsDlg.h \
|
||||
src/game/C4Constants.h \
|
||||
src/game/C4GameVersion.h \
|
||||
src/game/C4Physics.h \
|
||||
src/game/landscape/C4Landscape.cpp \
|
||||
|
|
|
@ -141,6 +141,9 @@
|
|||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
|
|
|
@ -101,7 +101,6 @@
|
|||
|
||||
#include "C4Id.h"
|
||||
#include "C4Prototypes.h"
|
||||
#include "C4Constants.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <mmsystem.h>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#define INC_C4GroupEx
|
||||
|
||||
#include "C4Group.h"
|
||||
#include "C4InputValidation.h"
|
||||
|
||||
const int C4UP_MaxUpGrpCnt = 50;
|
||||
|
||||
|
|
|
@ -25,18 +25,11 @@
|
|||
|
||||
//============================= Main =====================================================
|
||||
|
||||
const int C4MaxNameList = 10,
|
||||
C4MaxName = 30, // player names, etc.
|
||||
C4MaxLongName = 120, // scenario titles, etc. - may include markup
|
||||
C4MaxComment = 256, // network game and player comments
|
||||
const int
|
||||
C4MaxDefString = 100,
|
||||
C4MaxTitle = 512,
|
||||
C4MaxMessage = 256,
|
||||
|
||||
C4MaxServerName = 255,
|
||||
|
||||
C4MaxVariable = 10,
|
||||
|
||||
C4ViewDelay = 100,
|
||||
C4RetireDelay = 60,
|
||||
|
||||
|
@ -64,19 +57,11 @@ const int C4MaxNameList = 10,
|
|||
|
||||
const int C4M_MaxName = 15,
|
||||
C4M_MaxDefName = 2*C4M_MaxName+1,
|
||||
C4M_ColsPerMat = 3,
|
||||
C4M_MaxTexIndex = 127; // last texture map index is reserved for diff
|
||||
|
||||
const int C4S_MaxPlayer = 4;
|
||||
|
||||
const int C4D_MaxName = C4MaxName,
|
||||
C4D_MaxVertex = 30,
|
||||
C4D_MaxIDLen = C4D_MaxName;
|
||||
|
||||
const int C4Px_MaxName = C4MaxName,// maximum length of a particle def name
|
||||
C4Px_MaxParticle= 256, // maximum number of particles of one type
|
||||
C4Px_BufSize = 128, // number of particles in one buffer
|
||||
C4Px_MaxIDLen = 30; // maximum length of internal identifiers
|
||||
const int C4D_MaxVertex = 30;
|
||||
|
||||
const int C4SymbolSize = 35,
|
||||
C4SymbolBorder = 5,
|
|
@ -21,6 +21,8 @@
|
|||
#ifndef INC_C4Teams
|
||||
#define INC_C4Teams
|
||||
|
||||
#include "C4InputValidation.h"
|
||||
|
||||
// class predec
|
||||
namespace C4GUI { class ComboBox_FillCB; };
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include <gtk/gtkwidget.h>
|
||||
#endif
|
||||
|
||||
#include "C4Constants.h"
|
||||
|
||||
const int32_t C4TLS_Brush = 0,
|
||||
C4TLS_Line = 1,
|
||||
C4TLS_Rect = 2,
|
||||
|
|
|
@ -867,12 +867,13 @@ void C4MaterialMap::UpdateScriptPointers()
|
|||
|
||||
|
||||
int32_t PixCol2MatOld(BYTE pixc)
|
||||
{
|
||||
if (pixc < GBM) return MNone;
|
||||
pixc &= 63; // Substract GBM, ignore IFT
|
||||
if (pixc > ::MaterialMap.Num*C4M_ColsPerMat-1) return MNone;
|
||||
return pixc / C4M_ColsPerMat;
|
||||
}
|
||||
{
|
||||
const int C4M_ColsPerMat = 3;
|
||||
if (pixc < GBM) return MNone;
|
||||
pixc &= 63; // Substract GBM, ignore IFT
|
||||
if (pixc > ::MaterialMap.Num*C4M_ColsPerMat-1) return MNone;
|
||||
return pixc / C4M_ColsPerMat;
|
||||
}
|
||||
|
||||
int32_t PixCol2MatOld2(BYTE pixc)
|
||||
{
|
||||
|
|
|
@ -52,6 +52,11 @@ typedef void (*C4ParticleDrawProc)(C4Particle *, C4TargetFacet &, C4Object *); /
|
|||
|
||||
#define ParticleSystem ::Particles
|
||||
|
||||
const int
|
||||
C4Px_MaxParticle = 256, // maximum number of particles of one type
|
||||
C4Px_BufSize = 128, // number of particles in one buffer
|
||||
C4Px_MaxIDLen = 30; // maximum length of internal identifiers
|
||||
|
||||
// core for particle defs
|
||||
class C4ParticleDefCore
|
||||
{
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#define INC_C4Region
|
||||
|
||||
#include <C4Id.h>
|
||||
#include <C4Constants.h>
|
||||
|
||||
const int C4RGN_MaxCaption=256;
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#define INC_C4Texture
|
||||
|
||||
#include <C4Surface.h>
|
||||
#include <C4Constants.h>
|
||||
|
||||
class C4Texture
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <C4ScriptHost.h>
|
||||
#include <C4DefGraphics.h>
|
||||
#include "C4LangStringTable.h"
|
||||
#include "C4InputValidation.h"
|
||||
|
||||
const int32_t C4D_None = 0,
|
||||
C4D_All = ~C4D_None,
|
||||
|
@ -203,7 +204,7 @@ class C4Def: public C4PropList
|
|||
int32_t Timer;
|
||||
int32_t NoComponentMass;
|
||||
int32_t NoStabilize;
|
||||
char STimerCall[C4D_MaxIDLen];
|
||||
char STimerCall[C4AUL_MAX_Identifier];
|
||||
int32_t ClosedContainer; // if set, contained objects are not damaged by lava/acid etc. 1: Contained objects can't view out; 2: They can
|
||||
int32_t SilentCommands; // if set, no command failure messages are printed
|
||||
int32_t NoBurnDamage; // if set, the object won't take damage when burning
|
||||
|
|
|
@ -22,8 +22,9 @@
|
|||
#ifndef INC_C4DefGraphics
|
||||
#define INC_C4DefGraphics
|
||||
|
||||
#include <C4FacetEx.h>
|
||||
#include <C4Surface.h>
|
||||
#include "C4FacetEx.h"
|
||||
#include "C4Surface.h"
|
||||
#include "C4InputValidation.h"
|
||||
|
||||
#define C4Portrait_None "none"
|
||||
#define C4Portrait_Random "random"
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <C4Id.h>
|
||||
#include <C4ValueMap.h>
|
||||
#include <Fixed.h>
|
||||
#include "C4InputValidation.h"
|
||||
|
||||
class C4RankSystem;
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#ifndef INC_C4RankSystem
|
||||
#define INC_C4RankSystem
|
||||
|
||||
#include "C4InputValidation.h"
|
||||
|
||||
class C4RankSystem
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
*/
|
||||
// user input validation functions
|
||||
|
||||
#include <C4Include.h>
|
||||
#include <Standard.h>
|
||||
#include <C4InputValidation.h>
|
||||
#include <C4Log.h>
|
||||
#include <C4Config.h>
|
||||
#include "StdMarkup.h"
|
||||
|
||||
#include <cctype>
|
||||
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
#define INC_C4InputValidation
|
||||
|
||||
#include "StdBuf.h"
|
||||
#include "StdFile.h"
|
||||
#include "StdAdaptors.h"
|
||||
|
||||
const int C4MaxName = 30; // player names, etc.
|
||||
const int C4MaxLongName = 120; // scenario titles, etc. - may include markup
|
||||
const int C4MaxComment = 256; // network game and player comments
|
||||
|
||||
namespace C4InVal
|
||||
{
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
#include <C4Language.h>
|
||||
#include <C4Network2.h>
|
||||
#include <C4GraphicsSystem.h>
|
||||
#include <C4Config.h>
|
||||
#include <C4Components.h>
|
||||
#include <StdWindow.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SHARE_H) || defined(_WIN32)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
// a buffer holding a log history
|
||||
|
||||
#include "C4Include.h"
|
||||
#include "Standard.h"
|
||||
#include "C4LogBuf.h"
|
||||
|
||||
C4LogBuffer::C4LogBuffer(int iSize, int iMaxLines, int iLBWidth, const char *szIndentChars, bool fDynamicGrow, bool fMarkup)
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#ifndef INC_C4LogBuf
|
||||
#define INC_C4LogBuf
|
||||
|
||||
#include <StdFont.h>
|
||||
|
||||
// circular log buffer to holding line-wise log data
|
||||
class C4LogBuffer
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/* A static list of strings and integer values, i.e. for material amounts */
|
||||
|
||||
#include <C4Include.h>
|
||||
#include <Standard.h>
|
||||
#include <C4NameList.h>
|
||||
|
||||
C4NameList::C4NameList()
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
#ifndef INC_C4NameList
|
||||
#define INC_C4NameList
|
||||
|
||||
const int C4MaxNameList = 10;
|
||||
|
||||
#include "C4Constants.h"
|
||||
#include "C4InputValidation.h"
|
||||
|
||||
#include <cstring>
|
||||
class C4NameList
|
||||
{
|
||||
|
|
|
@ -19,6 +19,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
|
|||
#ifndef INC_C4RTF
|
||||
#define INC_C4RTF
|
||||
|
||||
#include <StdBuf.h>
|
||||
|
||||
class C4RTFFile
|
||||
{
|
||||
public:
|
||||
|
@ -73,7 +75,7 @@ class C4RTFFile
|
|||
class ParserError
|
||||
{
|
||||
public:
|
||||
StdStrBuf ErrorText;
|
||||
StdCopyStrBuf ErrorText;
|
||||
ParserError(const char *szErr) { ErrorText.Copy(szErr); }
|
||||
};
|
||||
|
||||
|
|
|
@ -19,9 +19,8 @@
|
|||
*/
|
||||
// RTF file parsing functionality
|
||||
|
||||
#include "C4Include.h"
|
||||
#include "Standard.h"
|
||||
#include "C4RTF.H"
|
||||
#include "C4Config.h"
|
||||
|
||||
#include <cctype>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/* Buffered fast and network-safe random */
|
||||
|
||||
#include <C4Include.h>
|
||||
#include <Standard.h>
|
||||
#include <C4Random.h>
|
||||
|
||||
int RandomCount = 0;
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
#ifndef INC_C4Random
|
||||
#define INC_C4Random
|
||||
|
||||
|
||||
#ifdef DEBUGREC
|
||||
#include <C4Record.h>
|
||||
#include <C4Record.h>
|
||||
#endif
|
||||
#include <ctime>
|
||||
|
||||
extern int RandomCount;
|
||||
extern unsigned int RandomHold;
|
||||
|
@ -40,13 +40,6 @@ inline void FixedRandom(DWORD dwSeed)
|
|||
RandomCount=0;
|
||||
}
|
||||
|
||||
inline void Randomize()
|
||||
{
|
||||
FixedRandom((unsigned)time(NULL));
|
||||
// for SafeRandom
|
||||
srand((unsigned)time(NULL));
|
||||
}
|
||||
|
||||
inline int Random(int iRange)
|
||||
{
|
||||
// next pseudorandom value
|
||||
|
|
|
@ -21,9 +21,11 @@
|
|||
|
||||
/* Basic classes for rectangles and vertex outlines */
|
||||
|
||||
#include "C4Include.h"
|
||||
#include "Standard.h"
|
||||
#include "C4Rect.h"
|
||||
#include "C4FacetEx.h"
|
||||
#include "StdCompiler.h"
|
||||
#include "StdAdaptors.h"
|
||||
|
||||
void C4Rect::Default()
|
||||
{
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
|
||||
#define C4D_VertexCpyPos (C4D_MaxVertex/2)
|
||||
|
||||
#include <vector>
|
||||
|
||||
struct FLOAT_RECT { float left,right,top,bottom; };
|
||||
class C4TargetFacet;
|
||||
|
||||
class C4Rect
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
// statistics
|
||||
|
||||
#include <C4Include.h>
|
||||
#include <Standard.h>
|
||||
#include <C4Stat.h>
|
||||
|
||||
// ** implemetation of C4MainStat
|
||||
|
|
|
@ -299,8 +299,8 @@ BOOL SWildcardMatchEx(const char *szString, const char *szWildcard);
|
|||
|
||||
// sprintf wrapper
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define vsnprintf _vsnprintf
|
||||
|
@ -336,5 +336,11 @@ template <typename T>
|
|||
// open a weblink in an external browser
|
||||
bool OpenURL(const char *szURL);
|
||||
|
||||
class StdCompiler;
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
#endif // INC_STANDARD
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <StdMarkup.h>
|
||||
#include <StdFont.h>
|
||||
#include <StdWindow.h>
|
||||
#include "C4Rect.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
|
|
@ -199,9 +199,7 @@ class CGammaControl
|
|||
friend class CStdGL;
|
||||
};
|
||||
|
||||
// helper structs
|
||||
struct FLOAT_RECT { float left,right,top,bottom; };
|
||||
|
||||
// helper struct
|
||||
struct ZoomData
|
||||
{
|
||||
float Zoom;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <StdGL.h>
|
||||
#include <StdSurface2.h>
|
||||
#include <StdWindow.h>
|
||||
#include "C4Rect.h"
|
||||
|
||||
#ifdef USE_GL
|
||||
|
||||
|
|
Loading…
Reference in New Issue