From fe7a90ac34de28e30863a1257319f85a5e662286 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Fri, 23 Mar 2012 21:02:53 +0100 Subject: Fixed includes and GCC syntax errors --- src/blitz.cpp | 5 +++-- src/blitz.h | 6 ++++++ src/brain.cpp | 6 +++--- src/brain.h | 16 ++++++++++------ src/button.cpp | 3 +-- src/button.h | 4 +++- src/camera.cpp | 4 ++-- src/camera.h | 7 ++++++- src/cbottoken.cpp | 4 ++-- src/cbottoken.h | 5 +++-- src/check.cpp | 3 +-- src/check.h | 4 +++- src/cloud.cpp | 5 +++-- src/cloud.h | 5 +++++ src/cmdtoken.cpp | 4 ++-- src/cmdtoken.h | 13 ++++++++----- src/color.cpp | 3 +-- src/color.h | 5 ++++- src/compass.cpp | 3 +-- src/compass.h | 4 +++- src/control.cpp | 2 +- src/control.h | 9 +++++++-- src/d3dapp.cpp | 8 ++++---- src/d3dapp.h | 17 ++++++++--------- src/d3dengine.cpp | 12 ++++++------ src/d3dengine.h | 7 ++++--- src/d3denum.cpp | 10 +++++----- src/d3dframe.cpp | 4 ++-- src/d3dmath.cpp | 2 +- src/d3dtextr.cpp | 4 ++-- src/d3dutil.cpp | 2 +- 31 files changed, 111 insertions(+), 75 deletions(-) diff --git a/src/blitz.cpp b/src/blitz.cpp index b6690c5..cf88fe3 100644 --- a/src/blitz.cpp +++ b/src/blitz.cpp @@ -22,8 +22,9 @@ #include #include "struct.h" -#include "D3DEngine.h" -#include "D3DMath.h" +#include "d3dengine.h" +#include "d3dmath.h" +#include "d3dutil.h" #include "event.h" #include "misc.h" #include "iman.h" diff --git a/src/blitz.h b/src/blitz.h index 563cc0d..30a34ed 100644 --- a/src/blitz.h +++ b/src/blitz.h @@ -14,10 +14,16 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. +// blitz.h + #ifndef _BLITZ_H_ #define _BLITZ_H_ +#include "misc.h" +#include "struct.h" + + class CInstanceManager; class CD3DEngine; class CTerrain; diff --git a/src/brain.cpp b/src/brain.cpp index d9017e2..e942e5d 100644 --- a/src/brain.cpp +++ b/src/brain.cpp @@ -21,10 +21,10 @@ #include #include -#include "cbot/cbotdll.h" +#include "CBot/CBotDll.h" #include "struct.h" -#include "D3DEngine.h" -#include "D3DMath.h" +#include "d3dengine.h" +#include "d3dmath.h" #include "language.h" #include "global.h" #include "event.h" diff --git a/src/brain.h b/src/brain.h index 491b564..988a3cc 100644 --- a/src/brain.h +++ b/src/brain.h @@ -14,10 +14,20 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. +// brain.h + #ifndef _BRAIN_H_ #define _BRAIN_H_ +#include "misc.h" +#include "event.h" +#include "object.h" +#include "taskmanip.h" +#include "taskflag.h" +#include "taskshield.h" + + class CInstanceManager; class CD3DEngine; class CTerrain; @@ -36,12 +46,6 @@ class CStudio; class CSound; class CParticule; -enum ObjectType; -enum TaskManipOrder; -enum TaskManipArm; -enum TaskFlagOrder; -enum TaskShieldMode; - #define BRAINMAXSCRIPT 10 diff --git a/src/button.cpp b/src/button.cpp index ba67367..f25663c 100644 --- a/src/button.cpp +++ b/src/button.cpp @@ -22,7 +22,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "language.h" #include "math3d.h" #include "event.h" @@ -54,7 +54,6 @@ CButton::CButton(CInstanceManager* iMan) : CControl(iMan) CButton::~CButton() { - CControl::~CControl(); } diff --git a/src/button.h b/src/button.h index 2ebddf6..1b50682 100644 --- a/src/button.h +++ b/src/button.h @@ -12,7 +12,9 @@ // * GNU General Public License for more details. // * // * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/.// button.h +// * along with this program. If not, see http://www.gnu.org/licenses/. + +// button.h #ifndef _BUTTON_H_ #define _BUTTON_H_ diff --git a/src/camera.cpp b/src/camera.cpp index 9dd678a..e526d6c 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -22,8 +22,8 @@ #include #include "struct.h" -#include "D3DEngine.h" -#include "D3DMath.h" +#include "d3dengine.h" +#include "d3dmath.h" #include "language.h" #include "event.h" #include "misc.h" diff --git a/src/camera.h b/src/camera.h index 7dfe61c..f38db1a 100644 --- a/src/camera.h +++ b/src/camera.h @@ -14,16 +14,21 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. +// camera.h + #ifndef _CAMERA_H_ #define _CAMERA_H_ +#include "d3dengine.h" +#include "struct.h" + + class CInstanceManager; class CD3DEngine; class CTerrain; class CWater; class CObject; -enum D3DMouse; enum CameraType diff --git a/src/cbottoken.cpp b/src/cbottoken.cpp index 857d517..d97239d 100644 --- a/src/cbottoken.cpp +++ b/src/cbottoken.cpp @@ -22,8 +22,8 @@ #include #include "struct.h" -#include "D3DEngine.h" -#include "D3DMath.h" +#include "d3dengine.h" +#include "d3dmath.h" #include "language.h" #include "global.h" #include "event.h" diff --git a/src/cbottoken.h b/src/cbottoken.h index b4cfb12..0767b04 100644 --- a/src/cbottoken.h +++ b/src/cbottoken.h @@ -14,12 +14,13 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. +// cbottoken.h + #ifndef _CBOTTOKEN_H_ #define _CBOTTOKEN_H_ - -enum ObjectType; +#include "object.h" diff --git a/src/check.cpp b/src/check.cpp index 058bdf2..baaf15d 100644 --- a/src/check.cpp +++ b/src/check.cpp @@ -22,7 +22,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -45,7 +45,6 @@ CCheck::CCheck(CInstanceManager* iMan) : CControl(iMan) CCheck::~CCheck() { - CControl::~CControl(); } diff --git a/src/check.h b/src/check.h index 74d3ceb..33d1c79 100644 --- a/src/check.h +++ b/src/check.h @@ -12,7 +12,9 @@ // * GNU General Public License for more details. // * // * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/.// check.h +// * along with this program. If not, see http://www.gnu.org/licenses/. + +// check.h #ifndef _CHECK_H_ #define _CHECK_H_ diff --git a/src/cloud.cpp b/src/cloud.cpp index 0d7d054..8d6aeae 100644 --- a/src/cloud.cpp +++ b/src/cloud.cpp @@ -22,8 +22,9 @@ #include #include "struct.h" -#include "D3DEngine.h" -#include "D3DMath.h" +#include "d3dengine.h" +#include "d3dmath.h" +#include "d3dutil.h" #include "event.h" #include "misc.h" #include "iman.h" diff --git a/src/cloud.h b/src/cloud.h index f5f3b51..b912670 100644 --- a/src/cloud.h +++ b/src/cloud.h @@ -14,10 +14,15 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. +// cloud.h + #ifndef _CLOUD_H_ #define _CLOUD_H_ +#include "struct.h" + + class CInstanceManager; class CD3DEngine; class CTerrain; diff --git a/src/cmdtoken.cpp b/src/cmdtoken.cpp index 9e26d5a..d5295c5 100644 --- a/src/cmdtoken.cpp +++ b/src/cmdtoken.cpp @@ -22,8 +22,8 @@ #include #include "struct.h" -#include "D3DEngine.h" -#include "D3DMath.h" +#include "d3dengine.h" +#include "d3dmath.h" #include "language.h" #include "global.h" #include "event.h" diff --git a/src/cmdtoken.h b/src/cmdtoken.h index 76ee7f5..40fb36a 100644 --- a/src/cmdtoken.h +++ b/src/cmdtoken.h @@ -14,15 +14,18 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. +// cmdtoken.h + #ifndef _CMDTOKEN_H_ #define _CMDTOKEN_H_ - -enum ObjectType; -enum WaterType; -enum PyroType; -enum CameraType; +#include "d3denum.h" +#include "d3dengine.h" +#include "object.h" +#include "water.h" +#include "pyro.h" +#include "camera.h" diff --git a/src/color.cpp b/src/color.cpp index 1ced324..d088aa1 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -22,7 +22,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "language.h" #include "math3d.h" #include "event.h" @@ -57,7 +57,6 @@ CColor::CColor(CInstanceManager* iMan) : CControl(iMan) CColor::~CColor() { - CControl::~CControl(); } diff --git a/src/color.h b/src/color.h index d9aacc9..31176fe 100644 --- a/src/color.h +++ b/src/color.h @@ -12,13 +12,16 @@ // * GNU General Public License for more details. // * // * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/.// color.h +// * along with this program. If not, see http://www.gnu.org/licenses/. + +// color.h #ifndef _COLOR_H_ #define _COLOR_H_ #include "control.h" +#include "d3dengine.h" class CD3DEngine; diff --git a/src/compass.cpp b/src/compass.cpp index c31ceb2..0ec718c 100644 --- a/src/compass.cpp +++ b/src/compass.cpp @@ -22,7 +22,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -45,7 +45,6 @@ CCompass::CCompass(CInstanceManager* iMan) : CControl(iMan) CCompass::~CCompass() { - CControl::~CControl(); } diff --git a/src/compass.h b/src/compass.h index 057c452..20f11c2 100644 --- a/src/compass.h +++ b/src/compass.h @@ -12,7 +12,9 @@ // * GNU General Public License for more details. // * // * You should have received a copy of the GNU General Public License -// * along with this program. If not, see http://www.gnu.org/licenses/.// compass.h +// * along with this program. If not, see http://www.gnu.org/licenses/. + +// compass.h #ifndef _COMPASS_H_ #define _COMPASS_H_ diff --git a/src/control.cpp b/src/control.cpp index 7f5ba63..6ba5cef 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -22,7 +22,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "language.h" #include "restext.h" #include "math3d.h" diff --git a/src/control.h b/src/control.h index 77a0f55..619cef2 100644 --- a/src/control.h +++ b/src/control.h @@ -14,10 +14,17 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. +// control.h + #ifndef _CONTROL_H_ #define _CONTROL_H_ +#include "text.h" +#include "struct.h" +#include "event.h" + + class CInstanceManager; class CEvent; class CD3DEngine; @@ -25,8 +32,6 @@ class CRobotMain; class CParticule; class CSound; -enum FontType; - #define STATE_ENABLE (1<<0) // active #define STATE_CHECK (1<<1) // pressed diff --git a/src/d3dapp.cpp b/src/d3dapp.cpp index 7d784ad..568cf1a 100644 --- a/src/d3dapp.cpp +++ b/src/d3dapp.cpp @@ -18,7 +18,7 @@ #define D3D_OVERLOADS #include -#include +#include #include #include #include @@ -27,8 +27,8 @@ #include #include "struct.h" -#include "D3DTextr.h" -#include "D3DEngine.h" +#include "d3dtextr.h" +#include "d3dengine.h" #include "language.h" #include "event.h" #include "profile.h" @@ -38,7 +38,7 @@ #include "joystick.h" #include "robotmain.h" #include "sound.h" -#include "D3DApp.h" +#include "d3dapp.h" diff --git a/src/d3dapp.h b/src/d3dapp.h index 271ac9c..6f28cda 100644 --- a/src/d3dapp.h +++ b/src/d3dapp.h @@ -14,7 +14,7 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// D3DApp.h +// d3dapp.h #ifndef _D3DAPP_H @@ -23,22 +23,21 @@ #define D3D_OVERLOADS #include -#include "D3DFrame.h" -#include "D3DEnum.h" -#include "D3DUtil.h" -#include "D3DRes.h" +#include "d3dengine.h" +#include "d3dframe.h" +#include "d3denum.h" +#include "d3dutil.h" +#include "d3dres.h" +#include "misc.h" +#include "struct.h" class CInstanceManager; class CEvent; -class CD3DEngine; class CRobotMain; class CSound; -enum D3DMouse; -enum Error; - class CD3DApplication diff --git a/src/d3dengine.cpp b/src/d3dengine.cpp index 73be93d..01ee2b4 100644 --- a/src/d3dengine.cpp +++ b/src/d3dengine.cpp @@ -23,11 +23,11 @@ #include #include "struct.h" -#include "D3DApp.h" -#include "D3DTextr.h" -#include "D3DUtil.h" -#include "D3DMath.h" -#include "D3DEngine.h" +#include "d3dapp.h" +#include "d3dtextr.h" +#include "d3dutil.h" +#include "d3dmath.h" +#include "d3dengine.h" #include "language.h" #include "iman.h" #include "event.h" @@ -2045,7 +2045,7 @@ void CD3DEngine::SetViewParams(const D3DVECTOR &vEyePt, m_eyeDirH = RotateAngle(vEyePt.x-vLookatPt.x, vEyePt.z-vLookatPt.z); m_eyeDirV = RotateAngle(Length2d(vEyePt, vLookatPt), vEyePt.y-vLookatPt.y); - D3DUtil_SetViewMatrix(m_matView, (D3DVECTOR)vEyePt, (D3DVECTOR)vLookatPt, (D3DVECTOR)vUpVec); + D3DUtil_SetViewMatrix(m_matView, (D3DVECTOR&)vEyePt, (D3DVECTOR&)vLookatPt, (D3DVECTOR&)vUpVec); if ( m_sound == 0 ) { diff --git a/src/d3dengine.h b/src/d3dengine.h index a212b62..a99db93 100644 --- a/src/d3dengine.h +++ b/src/d3dengine.h @@ -14,15 +14,16 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// D3DEngine.h +// d3dengine.h #ifndef _D3DENGINE_H_ #define _D3DENGINE_H_ -#include "D3DApp.h" +#include "struct.h" +class CD3DApplication; class CInstanceManager; class CObject; class CLight; @@ -82,7 +83,7 @@ enum D3DMouse D3DMOUSEMOVEH = 9, // - D3DMOUSEMOVEV = 10, // | D3DMOUSEMOVED = 11, // / - D3DMOUSEMOVEI = 12, // \ + D3DMOUSEMOVEI = 12, // \ // D3DMOUSESCROLLL = 13, // << D3DMOUSESCROLLR = 14, // >> D3DMOUSESCROLLU = 15, // ^ diff --git a/src/d3denum.cpp b/src/d3denum.cpp index 3125e8a..bd125d6 100644 --- a/src/d3denum.cpp +++ b/src/d3denum.cpp @@ -25,9 +25,9 @@ #include #include #include -#include "D3DEnum.h" -#include "D3DUtil.h" // For DEBUG_MSG -#include "D3DRes.h" // For dialog controls +#include "d3denum.h" +#include "d3dutil.h" // For DEBUG_MSG +#include "d3dres.h" // For dialog controls @@ -177,7 +177,7 @@ static HRESULT WINAPI DeviceEnumCallback( TCHAR* strDesc, TCHAR* strName, return D3DENUMRET_OK; // Find a 640x480x16 mode for the default fullscreen mode - for( i=0; idwNumModes; i++ ) + for( DWORD i=0; idwNumModes; i++ ) { if( ( pDeviceInfo->pddsdModes[i].dwWidth == 640 ) && ( pDeviceInfo->pddsdModes[i].dwHeight == 480 ) && @@ -435,7 +435,7 @@ static VOID UpdateDialogControls( HWND hDlg, D3DEnum_DeviceInfo* pCurrentDevice, // Name: ChangeDeviceProc() // Desc: Windows message handling function for the device select dialog //----------------------------------------------------------------------------- -static BOOL CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, +static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam ) { static D3DEnum_DeviceInfo** ppDeviceArg; diff --git a/src/d3dframe.cpp b/src/d3dframe.cpp index f43776b..3207a4b 100644 --- a/src/d3dframe.cpp +++ b/src/d3dframe.cpp @@ -25,8 +25,8 @@ #include #include #include -#include "D3DFrame.h" -#include "D3DUtil.h" +#include "d3dframe.h" +#include "d3dutil.h" diff --git a/src/d3dmath.cpp b/src/d3dmath.cpp index a2d0070..2686215 100644 --- a/src/d3dmath.cpp +++ b/src/d3dmath.cpp @@ -25,7 +25,7 @@ #define STRICT #include #include -#include "D3DMath.h" +#include "d3dmath.h" diff --git a/src/d3dtextr.cpp b/src/d3dtextr.cpp index 7f977a5..cceab99 100644 --- a/src/d3dtextr.cpp +++ b/src/d3dtextr.cpp @@ -29,8 +29,8 @@ #define STRICT #include #include -#include "D3DTextr.h" -#include "D3DUtil.h" +#include "d3dtextr.h" +#include "d3dutil.h" #include "language.h" #include "misc.h" diff --git a/src/d3dutil.cpp b/src/d3dutil.cpp index 7c58d88..b4a0eb7 100644 --- a/src/d3dutil.cpp +++ b/src/d3dutil.cpp @@ -27,7 +27,7 @@ #include #include #include -#include "D3DUtil.h" +#include "d3dutil.h" -- cgit v1.2.3-1-g7c22