From ea046a32eeb90208b374f4e4e6f6ecadf224bdc6 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Fri, 23 Mar 2012 22:08:59 +0100 Subject: [PATCH] Fixed includes and GCC syntax errors --- src/displayinfo.cpp | 4 ++-- src/displayinfo.h | 4 ++++ src/displaytext.cpp | 2 +- src/displaytext.h | 3 +++ src/edit.cpp | 5 +---- src/edit.h | 3 ++- src/editvalue.cpp | 6 +----- src/editvalue.h | 2 +- src/event.h | 7 ++++++- src/gauge.cpp | 5 +---- src/gauge.h | 2 +- src/group.cpp | 4 +--- src/group.h | 2 +- src/image.cpp | 6 +----- src/image.h | 2 +- src/interface.cpp | 2 +- src/key.cpp | 5 +---- src/key.h | 2 +- src/label.cpp | 4 +--- src/label.h | 2 +- src/light.cpp | 2 +- src/light.h | 4 +++- src/list.cpp | 6 +----- src/list.h | 1 + 24 files changed, 38 insertions(+), 47 deletions(-) diff --git a/src/displayinfo.cpp b/src/displayinfo.cpp index a3746f5a..473a805f 100644 --- a/src/displayinfo.cpp +++ b/src/displayinfo.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/displayinfo.h b/src/displayinfo.h index e51c6da8..61b87ee4 100644 --- a/src/displayinfo.h +++ b/src/displayinfo.h @@ -20,6 +20,10 @@ #define _DISPLAYINFO_H_ +#include "struct.h" +#include "camera.h" + + class CInstanceManager; class CD3DEngine; class CEvent; diff --git a/src/displaytext.cpp b/src/displaytext.cpp index abc9eec2..a56bf9fb 100644 --- a/src/displaytext.cpp +++ b/src/displaytext.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "event.h" #include "misc.h" #include "restext.h" diff --git a/src/displaytext.h b/src/displaytext.h index 5b56a2df..6a54e1fe 100644 --- a/src/displaytext.h +++ b/src/displaytext.h @@ -20,6 +20,9 @@ #define _DISPLAYTEXT_H_ +#include "d3dengine.h" + + class CInstanceManager; class CD3DEngine; class CInterface; diff --git a/src/edit.cpp b/src/edit.cpp index 8264dad2..0bf90f2a 100644 --- a/src/edit.cpp +++ b/src/edit.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "language.h" #include "math3d.h" #include "event.h" @@ -86,8 +86,6 @@ CEdit::CEdit(CInstanceManager* iMan) : CControl(iMan) FPOINT pos; int i; - CControl::CControl(iMan); - m_maxChar = 100; m_text = (char*)malloc(sizeof(char)*(m_maxChar+1)); m_format = 0; @@ -134,7 +132,6 @@ CEdit::~CEdit() delete m_text; delete m_format; delete m_scroll; - CControl::~CControl(); } diff --git a/src/edit.h b/src/edit.h index 908bcab1..4ad884fe 100644 --- a/src/edit.h +++ b/src/edit.h @@ -20,6 +20,7 @@ #define _EDIT_H_ +#include "struct.h" #include "control.h" @@ -91,7 +92,7 @@ class CEdit : public CControl { public: CEdit(CInstanceManager* iMan); - ~CEdit(); + virtual ~CEdit(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/editvalue.cpp b/src/editvalue.cpp index 101ec068..ce8515c2 100644 --- a/src/editvalue.cpp +++ b/src/editvalue.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -40,8 +40,6 @@ CEditValue::CEditValue(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); - m_edit = 0; m_buttonUp = 0; m_buttonDown = 0; @@ -59,8 +57,6 @@ CEditValue::~CEditValue() delete m_edit; delete m_buttonUp; delete m_buttonDown; - - CControl::~CControl(); } diff --git a/src/editvalue.h b/src/editvalue.h index 693ea614..3203b8b3 100644 --- a/src/editvalue.h +++ b/src/editvalue.h @@ -41,7 +41,7 @@ class CEditValue : public CControl { public: CEditValue(CInstanceManager* iMan); - ~CEditValue(); + virtual ~CEditValue(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/event.h b/src/event.h index a708a241..8da26000 100644 --- a/src/event.h +++ b/src/event.h @@ -12,12 +12,17 @@ // * 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/.// event.h +// * along with this program. If not, see http://www.gnu.org/licenses/. + +// event.h #ifndef _EVENT_H_ #define _EVENT_H_ +#include "struct.h" + + #if !defined (WM_XBUTTONDOWN) #define WM_XBUTTONDOWN 0x020B #define WM_XBUTTONUP 0x020C diff --git a/src/gauge.cpp b/src/gauge.cpp index 0930e793..420cebfc 100644 --- a/src/gauge.cpp +++ b/src/gauge.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -38,8 +38,6 @@ CGauge::CGauge(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); - m_level = 0.0f; } @@ -47,7 +45,6 @@ CGauge::CGauge(CInstanceManager* iMan) : CControl(iMan) CGauge::~CGauge() { - CControl::~CControl(); } diff --git a/src/gauge.h b/src/gauge.h index 853a6b13..9895d756 100644 --- a/src/gauge.h +++ b/src/gauge.h @@ -31,7 +31,7 @@ class CGauge : public CControl { public: CGauge(CInstanceManager* iMan); - ~CGauge(); + virtual ~CGauge(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/group.cpp b/src/group.cpp index f77d4088..f49fd69e 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -39,14 +39,12 @@ CGroup::CGroup(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); } // Object's destructor. CGroup::~CGroup() { - CControl::~CControl(); } diff --git a/src/group.h b/src/group.h index 17d6abaf..6dab275d 100644 --- a/src/group.h +++ b/src/group.h @@ -31,7 +31,7 @@ class CGroup : public CControl { public: CGroup(CInstanceManager* iMan); - ~CGroup(); + virtual ~CGroup(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/image.cpp b/src/image.cpp index 33b2a346..974216ac 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -39,8 +39,6 @@ CImage::CImage(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); - m_filename[0] = 0; } @@ -52,8 +50,6 @@ CImage::~CImage() { m_engine->FreeTexture(m_filename); } - - CControl::~CControl(); } diff --git a/src/image.h b/src/image.h index 707f627c..7545ac04 100644 --- a/src/image.h +++ b/src/image.h @@ -31,7 +31,7 @@ class CImage : public CControl { public: CImage(CInstanceManager* iMan); - ~CImage(); + virtual ~CImage(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/interface.cpp b/src/interface.cpp index 24efbde1..fe1f1125 100644 --- a/src/interface.cpp +++ b/src/interface.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/key.cpp b/src/key.cpp index b8515d18..c59dac34 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -64,8 +64,6 @@ void GetKeyName(char *name, int key) CKey::CKey(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); - m_key[0] = 0; m_key[1] = 0; m_bCatch = FALSE; @@ -75,7 +73,6 @@ CKey::CKey(CInstanceManager* iMan) : CControl(iMan) CKey::~CKey() { - CControl::~CControl(); } diff --git a/src/key.h b/src/key.h index 089019bc..f2924256 100644 --- a/src/key.h +++ b/src/key.h @@ -31,7 +31,7 @@ class CKey : public CControl { public: CKey(CInstanceManager* iMan); - ~CKey(); + virtual ~CKey(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/label.cpp b/src/label.cpp index 64147966..46d0099a 100644 --- a/src/label.cpp +++ b/src/label.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -39,14 +39,12 @@ CLabel::CLabel(CInstanceManager* iMan) : CControl(iMan) { - CControl::CControl(iMan); } // Object's destructor. CLabel::~CLabel() { - CControl::~CControl(); } diff --git a/src/label.h b/src/label.h index c5c9ea94..c36a7582 100644 --- a/src/label.h +++ b/src/label.h @@ -31,7 +31,7 @@ class CLabel : public CControl { public: CLabel(CInstanceManager* iMan); - ~CLabel(); + virtual ~CLabel(); BOOL Create(FPOINT pos, FPOINT dim, int icon, EventMsg eventMsg); diff --git a/src/light.cpp b/src/light.cpp index b99122a9..cbb69140 100644 --- a/src/light.cpp +++ b/src/light.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "event.h" #include "misc.h" #include "iman.h" diff --git a/src/light.h b/src/light.h index 802dc24d..ae2bcfb8 100644 --- a/src/light.h +++ b/src/light.h @@ -20,6 +20,8 @@ #define _LIGHT_H_ +#include "d3dengine.h" + class CInstanceManager; class CD3DEngine; @@ -62,7 +64,7 @@ class CLight { public: CLight(CInstanceManager *iMan, CD3DEngine* engine); - ~CLight(); + virtual ~CLight(); void SetD3DDevice(LPDIRECT3DDEVICE7 device); diff --git a/src/list.cpp b/src/list.cpp index e936d84d..08b09c0b 100644 --- a/src/list.cpp +++ b/src/list.cpp @@ -24,7 +24,7 @@ #include #include "struct.h" -#include "D3DEngine.h" +#include "d3dengine.h" #include "math3d.h" #include "event.h" #include "misc.h" @@ -46,8 +46,6 @@ CList::CList(CInstanceManager* iMan) : CControl(iMan) { int i; - CControl::CControl(iMan); - for ( i=0 ; i