Merge branch 'cleanups' into default branch

stable-5.2
Günther Brammer 2009-06-28 23:05:32 +02:00
commit fbac806cc5
382 changed files with 4018 additions and 3693 deletions

View File

@ -157,7 +157,6 @@ add_executable(clonk WIN32 MACOSX_BUNDLE
engine/src/C4Viewport.cpp
engine/src/C4Weather.cpp
engine/src/C4WinMain.cpp
engine/src/C4Wrappers.cpp
engine/sec/C4ConfigShareware.cpp
engine/sec/C4ConfigShareware.h
engine/sec/C4SecurityCertificates.cpp
@ -304,7 +303,6 @@ add_executable(clonk WIN32 MACOSX_BUNDLE
engine/inc/C4VideoPlayback.h
engine/inc/C4Viewport.h
engine/inc/C4Weather.h
engine/inc/C4Wrappers.h
engine/inc/C4RoundResults.h
engine/src/C4RoundResults.cpp
engine/res/Brush.h

View File

@ -226,7 +226,6 @@ clonk_SOURCES = \
engine/src/C4Viewport.cpp \
engine/src/C4Weather.cpp \
engine/src/C4WinMain.cpp \
engine/src/C4Wrappers.cpp \
engine/sec/C4ConfigShareware.cpp \
engine/sec/C4ConfigShareware.h \
engine/sec/C4SecurityCertificates.cpp \
@ -373,7 +372,6 @@ clonk_SOURCES = \
engine/inc/C4VideoPlayback.h \
engine/inc/C4Viewport.h \
engine/inc/C4Weather.h \
engine/inc/C4Wrappers.h \
engine/inc/C4RoundResults.h \
engine/src/C4RoundResults.cpp \
engine/res/Brush.h \
@ -503,8 +501,6 @@ c4group_CPPFLAGS = \
c4group_SOURCES = \
group/c4group_ng.cpp \
engine/src/C4Config.cpp \
engine/sec/C4ConfigShareware.cpp \
engine/src/C4Group.cpp \
engine/src/C4InputValidation.cpp \
engine/sec/C4SecurityCertificates.cpp \

View File

@ -24,7 +24,7 @@ AC_CANONICAL_HOST
dnl foreign to tell automake to shut up,
dnl and subdir-objects because it makes the Makefile smaller.
dnl no-define because PACKAGE and VERSION are not used
AM_INIT_AUTOMAKE([foreign subdir-objects nostdinc no-define 1.10])
AM_INIT_AUTOMAKE([foreign nostdinc no-define 1.10])
AC_PROG_CXX
AC_LANG([C++])

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2007 Matthes Bender
* Copyright (c) 2001, 2004-2005, 2008 Sven Eberhardt
* Copyright (c) 2005-2006 Günther Brammer
* Copyright (c) 2007, 2009 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,11 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2001-2002, 2006-2007 Sven Eberhardt
* Copyright (c) 2001, 2004, 2006 Peter Wortmann
* Copyright (c) 2004, 2006-2009 Günther Brammer
* Copyright (c) 2006 Armin Burgmeier
* Copyright (c) 2007 Matthes Bender
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -397,7 +402,6 @@ enum C4AulScriptState
ASS_PARSED // byte code generated
};
#ifdef C4ENGINE
// script profiler entry
class C4AulProfiler
@ -424,7 +428,6 @@ class C4AulProfiler
static void StopProfiling();
};
#endif
// script class
class C4AulScript
@ -575,4 +578,5 @@ class C4AulScriptEngine : public C4AulScript
friend class C4AulParseState;
};
extern C4AulScriptEngine ScriptEngine;
#endif

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2007 Sven Eberhardt
* Copyright (c) 2007 Peter Wortmann
* Copyright (c) 2007-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2005-2006 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001 Michael Käser
* Copyright (c) 2005, 2007 Sven Eberhardt
* Copyright (c) 2008 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2004 Matthes Bender
* Copyright (c) 2005, 2007 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2003-2004, 2008 Matthes Bender
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2009 Armin Burgmeier
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,11 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2007 Matthes Bender
* Copyright (c) 2001, 2004, 2006-2007 Sven Eberhardt
* Copyright (c) 2005 Peter Wortmann
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2009 Nicolas Hake
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -77,7 +82,6 @@ class C4ConfigGeneral
void AdoptOldSettings();
void DeterminePaths(BOOL forceWorkingDirectory);
void CompileFunc(StdCompiler *pComp);
bool IsUTF8() { return SEqual(LoadResStr("IDS_LANG_CHARSET"), "UTF-8"); }
void AddAdditionalDataPath(const char *szPath);
void ClearAdditionalDataPaths();
~C4ConfigGeneral() { ClearAdditionalDataPaths(); }
@ -189,6 +193,7 @@ class C4ConfigNetwork
public:
void CompileFunc(StdCompiler *pComp);
const char *GetLeagueServerAddress();
void CheckPortsForCollisions();
};
class C4ConfigStartup

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2005 Günther Brammer
* Copyright (c) 2006 Armin Burgmeier
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -24,7 +28,6 @@
#include "C4ToolsDlg.h"
#include "C4ObjectListDlg.h"
#include "C4EditCursor.h"
#include "C4Game.h"
#include <StdWindow.h>

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2005 Matthes Bender
* Copyright (c) 2002, 2006-2007, 2009 Sven Eberhardt
* Copyright (c) 2005, 2007 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001-2002, 2005 Sven Eberhardt
* Copyright (c) 2004-2007 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2001 Matthes Bender
* Copyright (c) 2001-2007 Sven Eberhardt
* Copyright (c) 2003 Peter Wortmann
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -28,11 +32,9 @@
#include <C4Surface.h>
#include <C4ComponentHost.h>
#ifdef C4ENGINE
#include <C4ScriptHost.h>
#include <C4DefGraphics.h>
#include "C4LangStringTable.h"
#endif
const int32_t C4D_None = 0,
C4D_All = ~C4D_None,
@ -193,9 +195,6 @@ class C4DefCore
C4Rect Entrance;
C4Rect Collection;
C4Rect PictureRect;
#ifndef C4ENGINE
C4Rect PictureRectFE;
#endif
C4TargetRect SolidMask;
C4TargetRect TopFace;
C4IDList Component;
@ -303,7 +302,6 @@ class C4Def: public C4DefCore
C4AulScriptFunc *TimerCall;
C4ComponentHost Desc;
#ifdef C4ENGINE
// Currently cannot have script host in frontend because that
// would need C4Script, C4AulScript, and all that as well...
C4DefScriptHost Script;
@ -325,7 +323,6 @@ class C4Def: public C4DefCore
C4PhysicalInfo *pFairCrewPhysical;
C4Facet MainFace;
#endif
protected:
C4Def *Next;
@ -338,13 +335,11 @@ class C4Def: public C4DefCore
class C4SoundSystem *pSoundSystem = NULL);
void Draw(C4Facet &cgo, BOOL fSelected=FALSE, DWORD iColor=0, C4Object *pObj=NULL, int32_t iPhaseX=0, int32_t iPhaseY=0);
#ifdef C4ENGINE
inline C4Facet &GetMainFace(C4DefGraphics *pGraphics, DWORD dwClr=0) { MainFace.Surface=pGraphics->GetBitmap(dwClr); return MainFace; }
int32_t GetValue(C4Object *pInBase, int32_t iBuyPlayer); // get value of def; calling script functions if defined
C4PhysicalInfo *GetFairCrewPhysicals(); // get fair crew physicals at current fair crew strength
void ClearFairCrewPhysicals(); // remove cached fair crew physicals, will be created fresh on demand
void Synchronize();
#endif
const char *GetDesc() { return Desc.GetData(); }
protected:
bool LoadPortraits(C4Group &hGroup);
@ -364,9 +359,7 @@ class C4Def: public C4DefCore
};
class C4DefList
#ifdef C4ENGINE
: public CStdFont::CustomImages
#endif
{
public:
C4DefList();
@ -414,9 +407,7 @@ class C4DefList
BOOL Add(C4Def *ndef, BOOL fOverload);
void BuildTable(); // build quick access table
void ResetIncludeDependencies(); // resets all pointers into foreign definitions caused by include chains
#ifdef C4ENGINE
void Synchronize();
#endif
// callback from font renderer: get ID image
virtual bool GetFontImage(const char *szImageTag, CFacet &rOutImgFacet);
@ -425,6 +416,13 @@ class C4DefList
void SortByID(); // sorts list by quick access table
};
extern C4DefList Definitions;
inline C4Def *C4Id2Def(C4ID id)
{
return ::Definitions.ID2Def(id);
}
// Default Action Procedures
#define DFA_NONE -1

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2006 Sven Eberhardt
* Copyright (c) 2005 Peter Wortmann
* Copyright (c) 2005 Günther Brammer
* Copyright (c) 2004-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -172,11 +175,9 @@ class C4GraphicsOverlay
C4TargetFacet fctBlit; // current blit data
uint32_t dwBlitMode; // extra parameters for additive blits, etc.
uint32_t dwClrModulation; // colormod for this overlay
#ifdef C4ENGINE
C4Object *pOverlayObj; // object to be drawn as overlay in MODE_Object
int32_t nOverlayObj; // compiled ptr
C4DrawTransform Transform; // drawing transformation: Rotation, zoom, etc.
#endif
int32_t iPhase; // action face for MODE_Action
bool fZoomToShape; // if true, overlay will be zoomed to match the target object shape
@ -189,9 +190,7 @@ class C4GraphicsOverlay
public:
C4GraphicsOverlay() : eMode(MODE_None), pSourceGfx(NULL), fctBlit(), dwBlitMode(0), dwClrModulation(0xffffff),
#ifdef C4ENGINE
pOverlayObj(NULL), nOverlayObj(0), Transform(+1),
#endif
iPhase(0), fZoomToShape(false), iID(0), pNext(NULL) { *Action=0; } // std ctor
~C4GraphicsOverlay(); // dtor
@ -218,10 +217,8 @@ class C4GraphicsOverlay
bool IsValid(const C4Object *pForObj) const;
#ifdef C4ENGINE
C4DrawTransform *GetTransform() { return &Transform; }
C4Object *GetOverlayObject() const { return pOverlayObj; }
#endif
int32_t GetID() const { return iID; }
void SetID(int32_t aID) { iID = aID; }
void SetPhase(int32_t iToPhase);

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2007 Armin Burgmeier
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2007 Sven Eberhardt
* Copyright (c) 2007-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2006 Armin Burgmeier
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2004-2005 Sven Eberhardt
* Copyright (c) 2005 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -25,6 +28,7 @@
#define INC_C4Effects
#include <C4Constants.h>
#include <C4ValueList.h>
// callback return values
#define C4Fx_OK 0 // generic standard behaviour for all effect callbacks

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2002 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2003, 2005-2006 Sven Eberhardt
* Copyright (c) 2006 Peter Wortmann
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -44,7 +48,6 @@ struct C4Vec2D
C4Vec2D(int32_t x=0, int32_t y=0) : x(x), y(y) {}
};
#ifdef C4ENGINE
class C4DrawTransform : public CBltTransform
{
public:
@ -113,7 +116,6 @@ class C4DrawTransform : public CBltTransform
int32_t GetYOffset() const { return static_cast<int32_t>(mat[5]); }
};
#endif // C4ENGINE
class C4Facet
{
@ -140,11 +142,9 @@ class C4Facet
void DrawValue2(C4Facet &cgo, int32_t iValue1, int32_t iValue2, int32_t iPhaseX=0, int32_t iPhaseY=0, int32_t iAlign=C4FCT_Center, int32_t *piUsedWidth=NULL);
void Draw(C4Facet &cgo, BOOL fAspect=TRUE, int32_t iPhaseX=0, int32_t iPhaseY=0, BOOL fTransparent=TRUE);
void DrawFullScreen(C4Facet &cgo);
#ifdef C4ENGINE
void DrawT(SURFACE sfcTarget, int32_t iX, int32_t iY, int32_t iPhaseX, int32_t iPhaseY, C4DrawTransform *pTransform); // draw with transformation (if pTransform is assigned)
void DrawT(C4Facet &cgo, BOOL fAspect, int32_t iPhaseX, int32_t iPhaseY, C4DrawTransform *pTransform);
void DrawXT(SURFACE sfcTarget, int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, int32_t iPhaseX, int32_t iPhaseY, C4DrawTransform *pTransform);
#endif // C4ENGINE
void DrawClr(C4Facet &cgo, BOOL fAspect=TRUE, DWORD dwClr=0); // set surface color and draw
void DrawXClr(SURFACE sfcTarget, int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, DWORD dwClr); // set surface color and draw
void DrawValue2Clr(C4Facet &cgo, int32_t iValue1, int32_t iValue2, DWORD dwClr); // set surface color and draw

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2004, 2008-2009 Sven Eberhardt
* Copyright (c) 2008 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2008 Peter Wortmann
* Copyright (c) 2008 Günther Brammer
* Copyright (c) 2008-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2008 Sven Eberhardt
* Copyright (c) 2008-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2006-2007 Peter Wortmann
* Copyright (c) 2006, 2008 Günther Brammer
* Copyright (c) 2007 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2007 Matthes Bender
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2005 Sven Eberhardt
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2004-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -59,7 +61,7 @@ class C4VectorFont
~C4VectorFont(); // dtor - releases font and deletes temp file
bool Init(C4Group &hGrp, const char *szFilename, C4Config &rCfg); // load font from group
bool Init(const char *szFacename, int32_t iSize, uint32_t dwWeight, const char *szCharSet); // load system font specified by face name
bool Init(const char *szFacename, int32_t iSize, uint32_t dwWeight); // load system font specified by face name
void Init(const char *szName, CStdVectorFont *pFont); // init from a font that has been laoded already
friend class C4FontLoader;
};
@ -86,12 +88,10 @@ class C4FontLoader
int32_t GetClosestAvailableSize(const char *szFontName, int32_t iWantedSize); // return possible font size that mathces the desired value closest
void AddVectorFont(C4VectorFont *pAddFont); // adds a new font to the list
#ifdef C4ENGINE
bool InitFont(CStdFont &rFont, C4VectorFont * pFont, int32_t iSize, uint32_t dwWeight, bool fDoShadow);
// init a font class of the given type
// iSize is always the size of the normal font, which is adjusted for larger (title) and smaller (log) font types
bool InitFont(CStdFont &rFont, const char *szFontName, FontType eType, int32_t iSize, C4GroupSet *pGfxGroups, bool fDoShadow=true);
#endif
};

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -23,10 +26,6 @@
#include "C4MainMenu.h"
#include <StdWindow.h>
#ifndef BIG_C4INCLUDE
#include "C4Game.h"
#endif
bool IsKeyDown(int iKey);
class C4FullScreen: public CStdWindow

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2007-2008 Matthes Bender
* Copyright (c) 2001-2002, 2004-2005, 2008 Sven Eberhardt
* Copyright (c) 2004, 2006 Peter Wortmann
* Copyright (c) 2005 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -20,44 +24,19 @@
#ifndef INC_C4Game
#define INC_C4Game
#ifdef C4ENGINE
#include <C4Def.h>
#include <C4Texture.h>
#include <C4RankSystem.h>
#include <C4GraphicsSystem.h>
#include <C4GraphicsResource.h>
#include <C4GameMessage.h>
#include <C4MouseControl.h>
#include <C4MessageInput.h>
#include <C4Weather.h>
#include <C4Material.h>
#include <C4GameObjects.h>
#include <C4Landscape.h>
#include <C4Scenario.h>
#include <C4MassMover.h>
#include <C4PXS.h>
#include <C4PlayerList.h>
#include <C4Teams.h>
#include <C4GameParameters.h>
#include <C4PlayerInfo.h>
#include <C4RoundResults.h>
#include <C4Scenario.h>
#include <C4Control.h>
#include <C4PathFinder.h>
#include <C4ComponentHost.h>
#include <C4ScriptHost.h>
#include <C4Particles.h>
#include <C4GroupSet.h>
#include <C4Extra.h>
#include <C4GameControl.h>
#include <C4Effects.h>
#include <C4Fonts.h>
#include "C4LangStringTable.h"
#include "C4Scoreboard.h"
#include <C4Network2.h>
#include <C4Scenario.h>
#include <C4Client.h>
#include <C4Network2Reference.h>
#include <C4VideoPlayback.h>
#include <C4RoundResults.h>
#include <C4ScriptHost.h>
class C4Game
{
@ -85,41 +64,20 @@ class C4Game
C4Game();
~C4Game();
public:
C4DefList Defs;
C4TextureMap TextureMap;
C4RankSystem Rank;
C4GraphicsSystem GraphicsSystem;
C4MessageInput MessageInput;
C4GraphicsResource GraphicsResource;
C4Network2 Network;
C4ClientList &Clients; // Shortcut
C4GameParameters Parameters;
C4TeamList &Teams; // Shortcut
C4PlayerInfoList &PlayerInfos; // Shortcut
C4PlayerInfoList &RestorePlayerInfos; // Shortcut
C4RoundResults RoundResults;
C4GameMessageList Messages;
C4MouseControl MouseControl;
C4Weather Weather;
C4MaterialMap Material;
C4GameObjects Objects;
C4ObjectList BackObjects; // objects in background (C4D_Background)
C4ObjectList ForeObjects; // objects in foreground (C4D_Foreground)
C4Landscape Landscape;
C4Scenario C4S;
C4ComponentHost Info;
C4ComponentHost Title;
C4ComponentHost Names;
C4ComponentHost GameText;
C4AulScriptEngine ScriptEngine;
C4GameScriptHost Script;
C4LangStringTable MainSysLangStringTable, ScenarioLangStringTable, ScenarioSysLangStringTable;
C4MassMoverSet MassMover;
C4PXSSystem PXS;
C4ParticleSystem Particles;
C4PlayerList Players;
StdStrBuf PlayerNames;
C4GameControl Control;
C4Control &Input; // shortcut
C4PathFinder PathFinder;
@ -128,7 +86,6 @@ class C4Game
C4GroupSet GroupSet;
C4Group *pParentGroup;
C4Extra Extra;
C4GUIScreen *pGUI;
C4ScenarioSection *pScenarioSections, *pCurrentScenarioSection;
C4Effect *pGlobalEffects;
#ifndef USE_CONSOLE
@ -168,7 +125,7 @@ class C4Game
bool TempScenarioFile;
bool fPreinited; // set after PreInit has been called; unset by Clear and Default
int32_t FrameCounter;
int32_t iTick2,iTick3,iTick5,iTick10,iTick35,iTick255,iTick500,iTick1000;
int32_t iTick2,iTick3,iTick5,iTick10,iTick35,iTick255,iTick1000;
bool TimeGo;
int32_t Time;
int32_t StartTime;
@ -327,7 +284,6 @@ class C4Game
BOOL OpenScenario();
BOOL InitDefs();
BOOL InitMaterialTexture();
BOOL EnumerateMaterials();
BOOL GameOverCheck();
BOOL PlaceInEarth(C4ID id);
BOOL Compile(const char *szSource);
@ -371,6 +327,5 @@ inline StdStrBuf GetKeyboardInputName(const char *szKeyName, bool fShort = false
return Game.KeyboardInput.GetKeyCodeNameByKeyName(szKeyName, fShort, iIndex);
}
#endif // C4ENGINE
#endif

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2005 Peter Wortmann
* Copyright (c) 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -164,5 +166,6 @@ protected:
void RemoveOldSyncChecks();
};
extern C4GameControl Control;
#endif // INC_C4GameControl

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2005, 2008 Peter Wortmann
* Copyright (c) 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2005 Sven Eberhardt
* Copyright (c) 2008 Matthes Bender
* Copyright (c) 2005-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2003-2007 Sven Eberhardt
* Copyright (c) 2005 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005, 2008 Sven Eberhardt
* Copyright (c) 2001 Michael Käser
* Copyright (c) 2004 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -97,11 +101,30 @@ class C4GameMessageList
bool Append(int32_t iType, const char *szText, C4Object *pTarget, int32_t iPlayer, int32_t iX, int32_t iY, uint8_t bCol, bool fNoDuplicates = false);
};
void GameMsgObject(const char *szText, C4Object *pTarget, int32_t iFCol=FWhite);
void GameMsgObjectPlayer(const char *szText, C4Object *pTarget, int32_t iPlayer, int32_t iFCol=FWhite);
void GameMsgGlobal(const char *szText, int32_t iFCol=FWhite);
void GameMsgPlayer(const char *szText, int32_t iPlayer, int32_t iFCol=FWhite);
extern C4GameMessageList Messages;
void GameMsgObjectDw(const char *szText, C4Object *pTarget, uint32_t dwClr);
inline void GameMsgObject(const char *szText, C4Object *pTarget, int32_t iFCol=FWhite)
{
::Messages.New(C4GM_Target,szText,pTarget,NO_OWNER,0,0,(uint8_t) iFCol);
}
inline void GameMsgObjectPlayer(const char *szText, C4Object *pTarget, int32_t iPlayer, int32_t iFCol=FWhite)
{
::Messages.New(C4GM_TargetPlayer,szText,pTarget,iPlayer,0,0,(uint8_t) iFCol);
}
inline void GameMsgGlobal(const char *szText, int32_t iFCol=FWhite)
{
::Messages.New(C4GM_Global,szText,NULL,ANY_OWNER,0,0,(uint8_t) iFCol);
}
inline void GameMsgPlayer(const char *szText, int32_t iPlayer, int32_t iFCol=FWhite)
{
::Messages.New(C4GM_GlobalPlayer,szText,NULL,iPlayer,0,0,(uint8_t) iFCol);
}
inline void GameMsgObjectDw(const char *szText, C4Object *pTarget, uint32_t dwClr)
{
::Messages.New(C4GM_Target,szText,pTarget,NO_OWNER,0,0,dwClr);
}
#endif

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2001, 2004 Sven Eberhardt
* Copyright (c) 2006 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -38,6 +40,8 @@ class C4GameObjects : public C4NotifyingObjectList
public:
C4LSectors Sectors; // section object lists
C4ObjectList InactiveObjects; // inactive objects (Status=2)
C4ObjectList BackObjects; // objects in background (C4D_Background)
C4ObjectList ForeObjects; // objects in foreground (C4D_Foreground)
C4ObjResort *ResortProc; // current sheduled user resorts
unsigned int LastUsedMarker; // last used value for C4Object::Marker
@ -76,7 +80,7 @@ class C4GameObjects : public C4NotifyingObjectList
void ResortUnsorted(); // resort any objects with unsorted-flag set into lists
void ExecuteResorts(); // execute custom resort procs
void DeleteObjects(); // delete all objects and links
void DeleteObjects(bool fDeleteInactive); // delete all objects and links
void ClearDefPointers(C4Def *pDef); // clear all pointers into definition
void UpdateDefPointers(C4Def *pDef); // restore any cleared pointers after def reload
@ -85,7 +89,7 @@ class C4GameObjects : public C4NotifyingObjectList
bool AssignInfo();
};
class C4AulFunc;
extern C4GameObjects Objects;
// sheduled resort holder
class C4ObjResort

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2005-2008 Sven Eberhardt
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2005-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2008 Sven Eberhardt
* Copyright (c) 2009 Peter Wortmann
* Copyright (c) 2008-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2006 Sven Eberhardt
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2007 Julian Raschke
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2006-2007 Peter Wortmann
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004, 2007 Sven Eberhardt
* Copyright (c) 2008 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2007 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2004-2005, 2007 Sven Eberhardt
* Copyright (c) 2008 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -116,4 +119,6 @@ class C4GraphicsResource
friend class C4StartupGraphics;
};
extern C4GraphicsResource GraphicsResource;
#define GfxR (&(::GraphicsResource))
#endif

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2008 Matthes Bender
* Copyright (c) 2001, 2005, 2008 Sven Eberhardt
* Copyright (c) 2005 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -94,9 +97,7 @@ class C4GraphicsSystem
C4Viewport *FirstViewport;
BOOL fViewportClassRegistered;
C4Facet ViewportArea;
#ifdef C4ENGINE
C4RectList BackgroundAreas; // rectangles covering background without viewports in fullscreen
#endif
char FlashMessageText[C4MaxTitle+1];
int32_t FlashMessageTime,FlashMessageX,FlashMessageY;
void DrawHelp();
@ -120,4 +121,5 @@ class C4GraphicsSystem
bool ViewportZoomIn();
};
extern C4GraphicsSystem GraphicsSystem;
#endif

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2004, 2007 Matthes Bender
* Copyright (c) 2002, 2005, 2007 Sven Eberhardt
* Copyright (c) 2004, 2006, 2008 Peter Wortmann
* Copyright (c) 2004-2005, 2007 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -239,18 +243,6 @@ class C4Group: public CStdStream
bool fStartAtFilename=false);
bool Read(void *pBuffer, size_t iSize);
bool Advance(int iOffset);
#ifdef C4FRONTEND
// Stuff for the FE
bool LoadIcon(const char *szEntryname, HICON *lphIcon);
bool ReadDDB(HBITMAP *lphBitmap, HDC hdc = NULL);
bool ReadDDBSection(HBITMAP *lphBitmap, HDC hdc,
int iSecX, int iSecY, int iSecWdt, int iSecHgt,
int iImgWdt=-1, int iImgHgt=-1,
BOOL fTransCol = FALSE);
bool ReadPNGSection(HBITMAP *lphBitmap, HDC hdc,
int iSecX, int iSecY, int iSecWdt, int iSecHgt,
int iImgWdt=-1, int iImgHgt=-1);
#endif
void SetMaker(const char *szMaker);
void SetPassword(const char *szPassword);
void SetStdOutput(BOOL fStatus);
@ -311,15 +303,6 @@ class C4Group: public CStdStream
C4GroupEntry *GetEntry(const char *szName);
C4GroupEntry *SearchNextEntry(const char *szName);
C4GroupEntry *GetNextFolderEntry();
#ifdef C4FRONTEND
HBITMAP SubReadDDB(HDC hdc,
int sx=-1, int sy=-1, int swdt=-1, int shgt=-1,
int twdt=-1, int thgt=-1,
BOOL transcol=FALSE);
HBITMAP SubReadPNG(HDC hdc,
int sx=-1, int sy=-1, int swdt=-1, int shgt=-1,
int twdt=-1, int thgt=-1);
#endif
bool CalcCRC32(C4GroupEntry *pEntry);
};

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2002, 2004-2005 Sven Eberhardt
* Copyright (c) 2004 Matthes Bender
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2003-2008 Sven Eberhardt
* Copyright (c) 2005, 2009 Peter Wortmann
* Copyright (c) 2005-2008 Günther Brammer
* Copyright (c) 2007 Matthes Bender
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -2728,5 +2732,5 @@ namespace C4GUI {
}; // end of namespace
typedef C4GUI::Screen C4GUIScreen;
extern C4GUIScreen *pGUI;
#endif

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001-2002, 2005, 2008 Sven Eberhardt
* Copyright (c) 2005 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2005 Peter Wortmann
* Copyright (c) 2005, 2008 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2007 Matthes Bender
* Copyright (c) 2005 Tobias Zwick
* Copyright (c) 2005, 2008 Sven Eberhardt
* Copyright (c) 2005-2006 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -40,7 +44,6 @@
#define C4_OS "unknown";
#endif
#ifdef C4ENGINE
#ifndef HAVE_CONFIG_H
// different debugrec options
@ -79,7 +82,6 @@
#if defined(HAVE_MIDI_H) && !defined(USE_FMOD)
#define USE_WINDOWS_MIDI
#endif
#endif // C4ENGINE
#include <Standard.h>
#include <CStdFile.h>
@ -246,7 +248,6 @@
#include "C4Video.h"
#include "C4Viewport.h"
#include "C4Weather.h"
#include "C4Wrappers.h"
#endif
#endif // INC_C4Include

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2006 Matthes Bender
* Copyright (c) 2001, 2005-2006, 2008 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -101,16 +103,12 @@ class C4TempPhysicalInfo : public C4PhysicalInfo
{
private:
// changes done to the original physicals; used for backtracing
#ifdef C4ENGINE
std::vector<C4PhysicalChange> Changes;
#endif
public:
void Clear()
{
#ifdef C4ENGINE
Changes.clear();
#endif
}
void Default() { Clear(); C4PhysicalInfo::Default(); } // clears
void CompileFunc(StdCompiler *pComp);

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2007-2008 Sven Eberhardt
* Copyright (c) 2007-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -45,9 +46,6 @@ namespace C4InVal
bool ValidateInt(int32_t &riVal, int32_t iMinVal, int32_t iMaxVal);
inline bool ValidateFilename(char *szFilename, size_t iMaxSize=_MAX_PATH) { return ValidateString(szFilename, VAL_Filename, iMaxSize); }
// checks for phising attacks: Return true if input contains user's webcode
bool IsConfidentialData(const char *szInput, bool fShowWarningMessage);
};
// Validation adapter: Call ValidateString on string after compiling it

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2007, 2009 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2005-2006 Sven Eberhardt
* Copyright (c) 2005 Günther Brammer
* Copyright (c) 2005-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2005-2007 Peter Wortmann
* Copyright (c) 2007, 2009 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -24,6 +28,7 @@
#include "C4Shape.h"
#include <StdSurface8.h>
#include <C4Material.h>
const uint8_t GBM = 128,
GBM_ColNum = 64,
@ -232,6 +237,8 @@ class C4Landscape
bool DebugSave(const char *szFilename);
};
extern C4Landscape Landscape;
/* Some global landscape functions */
BOOL AboveSolid(int32_t &rx, int32_t &ry);
@ -247,5 +254,81 @@ BOOL PathFree(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t *ix=NULL,
BOOL PathFreeIgnoreVehicle(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t *ix=NULL, int32_t *iy=NULL);
BOOL FindClosestFree(int32_t &rX, int32_t &rY, int32_t iAngle1, int32_t iAngle2, int32_t iExcludeAngle1, int32_t iExcludeAngle2);
BOOL ConstructionCheck(C4ID id, int32_t iX, int32_t iY, C4Object *pByObj=NULL);
int32_t PixCol2Mat(BYTE pixc);
#define GBackWdt ::Landscape.Width
#define GBackHgt ::Landscape.Height
#define GBackPix ::Landscape.GetPix
#define SBackPix ::Landscape.SetPix
#define ClearBackPix ::Landscape.ClearPix
#define _GBackPix ::Landscape._GetPix
#define _SBackPix ::Landscape._SetPix
#define _SBackPixIfMask ::Landscape._SetPixIfMask
inline bool DensitySolid(int32_t dens)
{
return (dens>=C4M_Solid);
}
inline bool DensitySemiSolid(int32_t dens)
{
return (dens>=C4M_SemiSolid);
}
inline bool DensityLiquid(int32_t dens)
{
return ((dens>=C4M_Liquid) && (dens<C4M_Solid));
}
inline BYTE PixColIFT(BYTE pixc)
{
return pixc & IFT;
}
// always use OldGfx-version (used for convert)
inline BYTE PixColIFTOld(BYTE pixc)
{
if (pixc>=GBM+IFTOld) return IFTOld;
return 0;
}
inline int32_t PixCol2Tex(BYTE pixc)
{
// Remove IFT
int32_t iTex = int32_t(pixc & (IFT - 1));
// Validate
if(iTex >= C4M_MaxTexIndex) return 0;
// Done
return iTex;
}
inline BYTE GBackIFT(int32_t x, int32_t y)
{
return PixColIFT(GBackPix(x,y));
}
inline int32_t GBackMat(int32_t x, int32_t y)
{
return ::Landscape.GetMat(x, y);
}
inline int32_t GBackDensity(int32_t x, int32_t y)
{
return ::Landscape.GetDensity(x, y);
}
inline bool GBackSolid(int32_t x, int32_t y)
{
return DensitySolid(GBackDensity(x,y));
}
inline bool GBackSemiSolid(int32_t x, int32_t y)
{
return DensitySemiSolid(GBackDensity(x,y));
}
inline bool GBackLiquid(int32_t x, int32_t y)
{
return DensityLiquid(GBackDensity(x,y));
}
#endif

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004 Matthes Bender
* Copyright (c) 2005-2007 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -39,7 +41,6 @@ class C4LanguageInfo
char Name[C4MaxLanguageInfo + 1];
char Info[C4MaxLanguageInfo + 1];
char Fallback[C4MaxLanguageInfo + 1];
char Charset[C4MaxLanguageInfo + 1];
//char Location[C4MaxLanguageInfo + 1]; ...store group name here
protected:
C4LanguageInfo* Next;
@ -74,7 +75,6 @@ class C4Language
// Encoding conversion functions
static StdStrBuf IconvClonk(const char * string);
static StdStrBuf IconvSystem(const char * string);
static StdStrBuf IconvUtf8(const char * string);
protected:
// Handling of language info loaded from string tables
void InitInfos();
@ -85,15 +85,10 @@ class C4Language
#ifdef HAVE_ICONV
static iconv_t local_to_host;
static iconv_t host_to_local;
static iconv_t local_to_utf_8;
static StdStrBuf Iconv(const char * string, iconv_t cd);
#endif
};
extern C4Language Languages;
static inline StdStrBuf LoadResStrUtf8(const char* ident)
{
return Languages.IconvUtf8(LoadResStr(ident));
}
#endif

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2002, 2006-2007, 2009 Sven Eberhardt
* Copyright (c) 2002, 2006-2007 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2003 Sven Eberhardt
* Copyright (c) 2003-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2006 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2008 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2001-2002, 2005 Sven Eberhardt
* Copyright (c) 2004, 2007 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -334,9 +336,7 @@ class C4MapCreatorS2 : public C4MCNode
C4MCMap *GetMap(const char *szMapName); // get map by name
public:
#ifdef C4ENGINE
CSurface8 * Render(const char *szMapName); // create map surface
#endif
BYTE *RenderBuf(const char *szMapName, int32_t &sfcWdt, int32_t &sfcHgt); // create buffer and render it
void SetC4SLandscape(C4SLandscape *pLandscape) // update source for map size

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -60,4 +62,6 @@ class C4MassMoverSet
void Consolidate();
};
extern C4MassMoverSet MassMover;
#endif

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2007 Matthes Bender
* Copyright (c) 2001-2002, 2005-2007 Sven Eberhardt
* Copyright (c) 2007 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -48,9 +51,7 @@ struct C4MaterialReaction
bool fUserDefined; // false for internal reactions generated by material parameters
StdCopyStrBuf TargetSpec; // target material specification
StdCopyStrBuf ScriptFunc; // for reaction func 'script': Script func to be called for reaction evaluation
#ifdef C4ENGINE
C4AulFunc *pScriptFunc; // resolved script function
#endif
uint32_t iExecMask; // execution mask: Bit mask with indices into MaterialInteractionEvent
bool fReverse; // if set, spec will be handled as if specified in target mat def
bool fInverseSpec; // if set, all mats except the given are used
@ -60,16 +61,12 @@ struct C4MaterialReaction
int32_t iConvertMat; // in mat conversion material; evaluated in CrossMapMaterials
int32_t iCorrosionRate; // chance of doing a corrosion
#ifdef C4ENGINE
C4MaterialReaction(C4MaterialReactionFunc pFunc) : pFunc(pFunc), fUserDefined(false), pScriptFunc(NULL), iExecMask(~0u), fReverse(false), fInverseSpec(false), fInsertionCheck(true), iDepth(0), iConvertMat(-1), iCorrosionRate(100) {}
C4MaterialReaction() : pFunc(&NoReaction), fUserDefined(true), pScriptFunc(NULL), iExecMask(~0u), fReverse(false), fInverseSpec(false), fInsertionCheck(true), iDepth(0), iConvertMat(-1), iCorrosionRate(100) { }
#endif
void CompileFunc(StdCompiler *pComp);
#ifdef C4ENGINE
void ResolveScriptFuncs(const char *szMatName);
#endif
bool operator ==(const C4MaterialReaction &rCmp) const { return false; } // never actually called; only comparing with empty vector of C4MaterialReactions
};
@ -145,12 +142,10 @@ class C4Material: public C4MaterialCore
int32_t InMatConvertTo; // Mat
int32_t BelowTempConvertTo; // MatTex
int32_t AboveTempConvertTo; // MatTex
#ifdef C4ENGINE
int32_t DefaultMatTex; // texture used for single pixel values
C4Facet PXSFace; // loose pixel facet
void UpdateScriptPointers(); // set all material script pointers
#endif
};
class C4MaterialMap
@ -172,9 +167,7 @@ class C4MaterialMap
static bool mrfIncinerate(C4MaterialReaction *pReaction, int32_t &iX, int32_t &iY, int32_t iLSPosX, int32_t iLSPosY, FIXED &fXDir, FIXED &fYDir, int32_t &iPxsMat, int32_t iLsMat, MaterialInteractionEvent evEvent, bool *pfPosChanged);
static bool mrfInsert (C4MaterialReaction *pReaction, int32_t &iX, int32_t &iY, int32_t iLSPosX, int32_t iLSPosY, FIXED &fXDir, FIXED &fYDir, int32_t &iPxsMat, int32_t iLsMat, MaterialInteractionEvent evEvent, bool *pfPosChanged);
// user-defined actions
#ifdef C4ENGINE
static bool mrfScript(C4MaterialReaction *pReaction, int32_t &iX, int32_t &iY, int32_t iLSPosX, int32_t iLSPosY, FIXED &fXDir, FIXED &fYDir, int32_t &iPxsMat, int32_t iLsMat, MaterialInteractionEvent evEvent, bool *pfPosChanged);
#endif
public:
void Default();
void Clear();
@ -187,15 +180,15 @@ class C4MaterialMap
{ assert(ppReactionMap); assert(Inside<int32_t>(iPXSMat,-1,Num-1)); assert(Inside<int32_t>(iLandscapeMat,-1,Num-1));
return ppReactionMap[(iLandscapeMat+1)*(Num+1) + iPXSMat+1]; }
C4MaterialReaction *GetReaction(int32_t iPXSMat, int32_t iLandscapeMat);
#ifdef C4ENGINE
void UpdateScriptPointers(); // set all material script pointers
void CrossMapMaterials();
#endif
bool CrossMapMaterials();
protected:
void SetMatReaction(int32_t iPXSMat, int32_t iLSMat, C4MaterialReaction *pReact);
BOOL SortEnumeration(int32_t iMat, const char *szMatName);
};
extern C4MaterialMap MaterialMap;
const int32_t C4M_Flat = 0,
C4M_TopFlat = 1,
C4M_Smooth = 2,
@ -211,4 +204,48 @@ const int32_t C4M_Flat = 0,
const int32_t MNone = -1;
extern int32_t MVehic,MTunnel,MWater,MSnow,MEarth,MGranite,MFlyAshes; // presearched materials
extern BYTE MCVehic; // precalculated material color
inline bool MatValid(int32_t mat)
{
return Inside<int32_t>(mat,0,::MaterialMap.Num-1);
}
inline bool MatVehicle(int32_t iMat)
{
return iMat == MVehic;
}
inline BYTE MatTex2PixCol(int32_t tex)
{
return BYTE(tex);
}
inline BYTE Mat2PixColDefault(int32_t mat)
{
return ::MaterialMap.Map[mat].DefaultMatTex;
}
inline int32_t MatDensity(int32_t mat)
{
if (!MatValid(mat)) return 0;
return ::MaterialMap.Map[mat].Density;
}
inline int32_t MatPlacement(int32_t mat)
{
if (!MatValid(mat)) return 0;
return ::MaterialMap.Map[mat].Placement;
}
inline int32_t MatDigFree(int32_t mat)
{
if (!MatValid(mat)) return 1;
return ::MaterialMap.Map[mat].DigFree;
}
int32_t PixCol2MatOld(BYTE pixc);
int32_t PixCol2MatOld2(BYTE pixc);
#endif

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2005, 2007-2008 Sven Eberhardt
* Copyright (c) 2006-2008 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2002 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2005-2006 Sven Eberhardt
* Copyright (c) 2005-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -146,6 +147,8 @@ class C4MessageInput
friend class C4ChatInputDialog;
};
extern C4MessageInput MessageInput;
// script query to ask a player for a string
class C4MessageBoardQuery
{

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005, 2007 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -142,4 +144,5 @@ class C4MouseControl
int32_t GetPlayer() { return Player; }
};
extern C4MouseControl MouseControl;
#endif

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2001 Michael Käser
* Copyright (c) 2002-2003 Peter Wortmann
* Copyright (c) 2005, 2008 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,11 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2001 Carlo Teubner
* Copyright (c) 2002 Peter Wortmann
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2003-2007 Peter Wortmann
* Copyright (c) 2005-2006, 2009 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2007 Sven Eberhardt
* Copyright (c) 2004-2008 Peter Wortmann
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -18,20 +21,13 @@
#define INC_C4Network2
#include "C4NetIO.h"
#include "C4Application.h"
#include "C4Network2Client.h"
#include "C4Network2Res.h"
#include "C4Network2IO.h"
#include "C4Network2Players.h"
#include "C4GameParameters.h"
#ifndef BIG_C4INCLUDE
#include "C4PlayerInfo.h"
#include "C4Teams.h"
#include "C4Network2IO.h"
#include "C4Network2Res.h"
#include "C4Network2Client.h"
#include "C4Control.h"
#include "C4Gui.h"
#endif
#include "C4GameParameters.h"
// lobby predef - no need to include lobby in header just for the class ptr
namespace C4GameLobby { class MainDlg; class Countdown; }
@ -363,6 +359,8 @@ protected:
};
extern C4Network2 Network;
class C4VoteDialog : public C4GUI::MessageDialog
{
public:

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2006 Peter Wortmann
* Copyright (c) 2005 Sven Eberhardt
* Copyright (c) 2005 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2008 Sven Eberhardt
* Copyright (c) 2005, 2009 Peter Wortmann
* Copyright (c) 2006 Günther Brammer
* Copyright (c) 2004-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2006-2007 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2008 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2007 Sven Eberhardt
* Copyright (c) 2007 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2005 Sven Eberhardt
* Copyright (c) 2004-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2006-2007 Peter Wortmann
* Copyright (c) 2007-2008 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -17,12 +19,8 @@
#ifndef C4NETWORK2REFERENCE_H
#define C4NETWORK2REFERENCE_H
#ifdef C4ENGINE
#include "C4Network2.h"
#include "C4Network2Client.h"
#else
#include "C4NetIO.h"
#endif
#include "C4GameParameters.h"
#include "C4Version.h"
#include "C4GameVersion.h"
@ -81,7 +79,7 @@ public:
void SetSourceIP(in_addr ip);
void InitLocal(C4Game *pGame);
void InitLocal();
void SortNullIPsBack();

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2007 Peter Wortmann
* Copyright (c) 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2005 Sven Eberhardt
* Copyright (c) 2005 Peter Wortmann
* Copyright (c) 2005-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001-2005, 2007 Sven Eberhardt
* Copyright (c) 2004-2005 Peter Wortmann
* Copyright (c) 2006-2009 Günther Brammer
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000, 2003 Matthes Bender
* Copyright (c) 2001, 2004 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -22,10 +24,8 @@
#include <C4Surface.h>
#include <C4InfoCore.h>
#ifdef C4ENGINE
#include <C4Object.h>
#include <C4FacetEx.h>
#endif
class C4ObjectInfo: public C4ObjectInfoCore
{
@ -39,11 +39,9 @@ class C4ObjectInfo: public C4ObjectInfoCore
BOOL HasDied;
int32_t ControlCount;
class C4Def *pDef; // definition to ID - only eresolved if defs were loaded at object info loading time
#ifdef C4ENGINE
C4Portrait Portrait; // portrait link (usually to def graphics)
C4Portrait *pNewPortrait; // new permanent portrait link (usually to def graphics)
C4Portrait *pCustomPortrait; // if assigned, the Clonk has a custom portrait to be set via SetPortrait("custom")
#endif
char Filename[_MAX_PATH+1];
C4ObjectInfo *Next;
public:
@ -57,12 +55,10 @@ class C4ObjectInfo: public C4ObjectInfoCore
BOOL Save(C4Group &hGroup, bool fStoreTiny, C4DefList *pDefs);
BOOL Load(C4Group &hGroup, bool fLoadPortrait);
BOOL Load(C4Group &hMother, const char *szEntryname, bool fLoadPortrait);
#ifdef C4ENGINE
bool SetRandomPortrait(C4ID idSourceDef, bool fAssignPermanently, bool fCopyFile);
bool SetPortrait(const char *szPortraitName, C4Def *pSourceDef, bool fAssignPermanently, bool fCopyFile);
bool SetPortrait(C4PortraitGraphics *pNewPortraitGfx, bool fAssignPermanently, bool fCopyFile);
bool ClearPortrait(bool fPermanently);
#endif
};
#endif

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,10 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2006-2008 Günther Brammer
* Copyright (c) 2009 Armin Burgmeier
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2007 Günther Brammer
* Copyright (c) 2007-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,7 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2008 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2005 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -62,4 +64,5 @@ class C4PXSSystem
C4PXS *New();
};
extern C4PXSSystem PXS;
#endif

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2004-2005, 2007 Peter Wortmann
* Copyright (c) 2005 Günther Brammer
* Copyright (c) 2008 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2002, 2004-2005 Sven Eberhardt
* Copyright (c) 2004, 2006, 2008 Günther Brammer
* Copyright (c) 2005 Tobias Zwick
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -23,7 +26,7 @@
// thus, more complex partivle behaviour should be solved via
// objects
// note: this particle system will always assume the owning def
// object to be a static class named Game.Particles!
// object to be a static class named ::Particles!
#ifndef INC_C4Particles
#define INC_C4Particles
@ -47,7 +50,7 @@ typedef C4ParticleProc C4ParticleExecProc; // particle execution proc - returns
typedef C4ParticleProc C4ParticleCollisionProc; // particle collision proc - returns whether particle died
typedef void (*C4ParticleDrawProc)(C4Particle *, C4TargetFacet &, C4Object *); // particle drawing code
#define ParticleSystem Game.Particles
#define ParticleSystem ::Particles
// core for particle defs
class C4ParticleDefCore
@ -221,6 +224,8 @@ class C4ParticleSystem
friend class C4ParticleChunk;
};
extern C4ParticleSystem Particles;
// default particle execution/drawing functions
bool fxStdInit(C4Particle *pPrt, C4Object *pTarget);
bool fxStdExec(C4Particle *pPrt, C4Object *pTarget);

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2005 Sven Eberhardt
* Copyright (c) 2005 Armin Burgmeier
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed

View File

@ -1,6 +1,9 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001 Sven Eberhardt
* Copyright (c) 2002 Peter Wortmann
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -24,7 +27,7 @@ const int StableRange=10;
const int AttachRange=5;
const int CornerRange=AttachRange+2;
#define GravAccel (Game.Landscape.Gravity)
#define GravAccel (::Landscape.Gravity)
extern const FIXED FloatAccel;
extern const FIXED HitSpeed1,HitSpeed2,HitSpeed3,HitSpeed4;

View File

@ -1,6 +1,8 @@
/*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 1998-2000 Matthes Bender
* Copyright (c) 2001, 2004-2007 Sven Eberhardt
* Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
*
* Portions might be copyrighted by other authors who have contributed
@ -234,9 +236,7 @@ class C4Player: public C4PlayerInfoCore
void ClearGraphs();
void CountControl(ControlType eType, int32_t iID, int32_t iCntAdd=1);
#ifdef C4ENGINE
class C4PlayerInfo *GetInfo(); // search info by ID
#endif
private:
// messageboard-calls for this player

Some files were not shown because too many files have changed in this diff Show More