From 33a5a937281082a572b3b66483e8a4579db2935d Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Thu, 5 Apr 2012 22:23:14 +0200 Subject: GCC include and syntax fixes --- src/maindialog.cpp | 4 ++-- src/maindialog.h | 18 ++++++++---------- src/mainmap.cpp | 4 ++-- src/mainmovie.cpp | 2 +- src/mainshort.cpp | 2 +- src/map.cpp | 3 +-- src/map.h | 5 ++--- src/metafile.h | 2 ++ src/misc.h | 5 +++-- src/model.cpp | 4 ++-- src/model.h | 3 +++ src/modfile.cpp | 4 ++-- src/modfile.h | 4 +++- src/motion.cpp | 2 +- src/motion.h | 3 +++ src/motionant.cpp | 2 +- src/motionant.h | 3 +++ src/motionbee.cpp | 2 +- src/motionbee.h | 3 +++ src/motionhuman.cpp | 5 +++-- src/motionhuman.h | 4 ++++ src/motionmother.cpp | 2 +- src/motionmother.h | 3 +++ src/motionspider.cpp | 2 +- src/motionspider.h | 3 +++ src/motiontoto.cpp | 2 +- src/motiontoto.h | 6 +++++- src/motionvehicle.cpp | 2 +- src/motionvehicle.h | 3 +++ src/motionworm.cpp | 2 +- src/motionworm.h | 3 +++ 31 files changed, 73 insertions(+), 39 deletions(-) diff --git a/src/maindialog.cpp b/src/maindialog.cpp index 1f3f1ef..a216cd9 100644 --- a/src/maindialog.cpp +++ b/src/maindialog.cpp @@ -27,8 +27,8 @@ #include #include "struct.h" -#include "D3DEngine.h" -#include "D3DMath.h" +#include "d3dengine.h" +#include "d3dmath.h" #include "global.h" #include "language.h" #include "event.h" diff --git a/src/maindialog.h b/src/maindialog.h index e24a651..21dca18 100644 --- a/src/maindialog.h +++ b/src/maindialog.h @@ -19,22 +19,20 @@ #ifndef _MAINDIALOG_H_ #define _MAINDIALOG_H_ +#include "struct.h" +#include "camera.h" +#include "robotmain.h" class CInstanceManager; -class CRobotMain; class CEvent; class CD3DEngine; class CInterface; class CWindow; class CControl; class CParticule; -class CCamera; class CSound; -enum Phase; -enum CameraType; - #define USERLISTMAX 100 #define MAXSCENE 1000 @@ -188,11 +186,11 @@ protected: int m_persoTab; // perso: tab selected float m_persoAngle; // perso: angle of presentation - char m_sceneDir[_MAX_FNAME]; // scene folder\ - char m_savegameDir[_MAX_FNAME]; // savegame folder\ - char m_publicDir[_MAX_FNAME]; // program folder\ - char m_userDir[_MAX_FNAME]; // user folder\ - char m_filesDir[_MAX_FNAME]; // case files\ + char m_sceneDir[_MAX_FNAME]; // scene folder + char m_savegameDir[_MAX_FNAME]; // savegame folder + char m_publicDir[_MAX_FNAME]; // program folder + char m_userDir[_MAX_FNAME]; // user folder + char m_filesDir[_MAX_FNAME]; // case files int m_index; // 0..4 int m_chap[10]; // selected chapter (0..8) diff --git a/src/mainmap.cpp b/src/mainmap.cpp index fa59a13..c66edf2 100644 --- a/src/mainmap.cpp +++ b/src/mainmap.cpp @@ -24,8 +24,8 @@ #include #include "struct.h" -#include "D3DEngine.h" -#include "D3DMath.h" +#include "d3dengine.h" +#include "d3dmath.h" #include "global.h" #include "event.h" #include "iman.h" diff --git a/src/mainmovie.cpp b/src/mainmovie.cpp index b29bd83..8205d16 100644 --- a/src/mainmovie.cpp +++ b/src/mainmovie.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "global.h" #include "event.h" #include "iman.h" diff --git a/src/mainshort.cpp b/src/mainshort.cpp index fc59fb7..4e934e5 100644 --- a/src/mainshort.cpp +++ b/src/mainshort.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "global.h" #include "event.h" #include "iman.h" diff --git a/src/map.cpp b/src/map.cpp index f247a6f..c44a218 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "event.h" #include "math3d.h" #include "terrain.h" @@ -79,7 +79,6 @@ CMap::CMap(CInstanceManager* iMan) : CControl(iMan) CMap::~CMap() { - CControl::~CControl(); } diff --git a/src/map.h b/src/map.h index 4936d71..4b1f793 100644 --- a/src/map.h +++ b/src/map.h @@ -21,16 +21,15 @@ #include "control.h" +#include "struct.h" +#include "object.h" class CD3DEngine; class CTerrain; class CWater; -class CObject; class CRobotMain; -enum ObjectType; - #define MAPMAXOBJECT 100 diff --git a/src/metafile.h b/src/metafile.h index 7848aff..b334b3e 100644 --- a/src/metafile.h +++ b/src/metafile.h @@ -20,6 +20,8 @@ #define _METAFILE_H_ +#include + #define METAMAX 5 diff --git a/src/misc.h b/src/misc.h index a5efc46..9eaba53 100644 --- a/src/misc.h +++ b/src/misc.h @@ -20,7 +20,10 @@ #define _MISC_H_ #include + + #include "metafile.h" +#include "event.h" extern CMetaFile g_metafile; @@ -216,8 +219,6 @@ enum Error // Procedures. -enum EventMsg; - extern EventMsg GetUniqueEventMsg(); extern char RetNoAccent(char letter); diff --git a/src/model.cpp b/src/model.cpp index 945041d..80ce6b5 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -24,8 +24,8 @@ #include #include "struct.h" -#include "D3DEngine.h" -#include "D3DMath.h" +#include "d3dengine.h" +#include "d3dmath.h" #include "event.h" #include "misc.h" #include "iman.h" diff --git a/src/model.h b/src/model.h index 5c5a718..35b48b6 100644 --- a/src/model.h +++ b/src/model.h @@ -20,6 +20,9 @@ #define _MODEL_H_ +#include "struct.h" + + class CInstanceManager; class CD3DEngine; class CModFile; diff --git a/src/modfile.cpp b/src/modfile.cpp index aed612b..08fb89d 100644 --- a/src/modfile.cpp +++ b/src/modfile.cpp @@ -24,8 +24,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/modfile.h b/src/modfile.h index 3ad4175..f97ae91 100644 --- a/src/modfile.h +++ b/src/modfile.h @@ -20,8 +20,10 @@ #define _MODFILE_H_ +#include "d3dengine.h" + + class CInstanceManager; -class CD3DEngine; diff --git a/src/motion.cpp b/src/motion.cpp index 95fb16b..642108b 100644 --- a/src/motion.cpp +++ b/src/motion.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" diff --git a/src/motion.h b/src/motion.h index cb93d74..5aa0afb 100644 --- a/src/motion.h +++ b/src/motion.h @@ -20,6 +20,9 @@ #define _MOTION_H_ +#include "d3dengine.h" + + class CInstanceManager; class CEngine; class CLight; diff --git a/src/motionant.cpp b/src/motionant.cpp index d4e70bf..3790f7e 100644 --- a/src/motionant.cpp +++ b/src/motionant.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" diff --git a/src/motionant.h b/src/motionant.h index ca93dbf..e8d79c6 100644 --- a/src/motionant.h +++ b/src/motionant.h @@ -20,6 +20,9 @@ #define _MOTIONANT_H_ +#include "motion.h" + + class CInstanceManager; class CEngine; class CLight; diff --git a/src/motionbee.cpp b/src/motionbee.cpp index 489e6af..65ebeb7 100644 --- a/src/motionbee.cpp +++ b/src/motionbee.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" diff --git a/src/motionbee.h b/src/motionbee.h index 60f470b..facf650 100644 --- a/src/motionbee.h +++ b/src/motionbee.h @@ -20,6 +20,9 @@ #define _MOTIONBEE_H_ +#include "motion.h" + + class CInstanceManager; class CEngine; class CLight; diff --git a/src/motionhuman.cpp b/src/motionhuman.cpp index 4e122d1..78750fa 100644 --- a/src/motionhuman.cpp +++ b/src/motionhuman.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -1516,7 +1516,8 @@ BOOL CMotionHuman::EventFrame(const Event &event) SetInclinaison(dir); //? dir.x = -(sinf(time*0.05f+PI*1.5f)+1.0f)*100.0f; - dir.x = -(powf(Min(time/30.0f), 4.0f))*1000.0f; // from the distance + // original code: Min(time/30.0f) (?) changed to time/30.0f + dir.x = -(powf(time/30.0f, 4.0f))*1000.0f; // from the distance dir.y = 0.0f; dir.z = 0.0f; m_object->SetLinVibration(dir); diff --git a/src/motionhuman.h b/src/motionhuman.h index 68d6ce0..44a0c4c 100644 --- a/src/motionhuman.h +++ b/src/motionhuman.h @@ -20,6 +20,10 @@ #define _MOTIONHUMAN_H_ +#include "motion.h" +#include "misc.h" + + class CInstanceManager; class CEngine; class CLight; diff --git a/src/motionmother.cpp b/src/motionmother.cpp index e32edcf..872ef76 100644 --- a/src/motionmother.cpp +++ b/src/motionmother.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" diff --git a/src/motionmother.h b/src/motionmother.h index 0526fd8..6e8eb32 100644 --- a/src/motionmother.h +++ b/src/motionmother.h @@ -20,6 +20,9 @@ #define _MOTIONMOTHER_H_ +#include "motion.h" + + class CInstanceManager; class CEngine; class CLight; diff --git a/src/motionspider.cpp b/src/motionspider.cpp index 6b2274d..99c3d06 100644 --- a/src/motionspider.cpp +++ b/src/motionspider.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" diff --git a/src/motionspider.h b/src/motionspider.h index 199f433..294daf3 100644 --- a/src/motionspider.h +++ b/src/motionspider.h @@ -20,6 +20,9 @@ #define _MOTIONSPIDER_H_ +#include "motion.h" + + class CInstanceManager; class CEngine; class CLight; diff --git a/src/motiontoto.cpp b/src/motiontoto.cpp index ba3cef9..afd5779 100644 --- a/src/motiontoto.cpp +++ b/src/motiontoto.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" diff --git a/src/motiontoto.h b/src/motiontoto.h index 41c9149..22955bb 100644 --- a/src/motiontoto.h +++ b/src/motiontoto.h @@ -20,6 +20,11 @@ #define _MOTIONTOTO_H_ +#include "struct.h" +#include "object.h" +#include "motion.h" + + class CInstanceManager; class CEngine; class CLight; @@ -28,7 +33,6 @@ class CTerrain; class CCamera; class CBrain; class CPhysics; -class CObject; #define MT_ERROR 0 diff --git a/src/motionvehicle.cpp b/src/motionvehicle.cpp index 059d06a..73dae74 100644 --- a/src/motionvehicle.cpp +++ b/src/motionvehicle.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" diff --git a/src/motionvehicle.h b/src/motionvehicle.h index 75ab423..1b351c4 100644 --- a/src/motionvehicle.h +++ b/src/motionvehicle.h @@ -20,6 +20,9 @@ #define _MOTIONVEHICLE_H_ +#include "motion.h" + + class CInstanceManager; class CEngine; class CLight; diff --git a/src/motionworm.cpp b/src/motionworm.cpp index 00eddc4..eb32b44 100644 --- a/src/motionworm.cpp +++ b/src/motionworm.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" diff --git a/src/motionworm.h b/src/motionworm.h index a8a0ffd..cabb2ba 100644 --- a/src/motionworm.h +++ b/src/motionworm.h @@ -20,6 +20,9 @@ #define _MOTIONWORM_H_ +#include "motion.h" + + class CInstanceManager; class CEngine; class CLight; -- cgit v1.2.3-1-g7c22