OK,
I removed every class forward in the header files, and now the number of errors went up to 61(!). I have included the current code in all header files (engine.h, gameobject.h, texturedobject.h and input.h)
#ifndef ENGINE_H#define ENGINE_H#include <NukeDX.h>#include "gameobject.h"#include "texturedobject.h"#include "input.h"#include <string>using namespace std;class Engine{private: NDX_Screen *Screen; NDX_Window *Window; NDX_Log *PrvtLog; Input *I; HINSTANCE hInst; HINSTANCE hPrevInstance; LPSTR lpszCmdParam; int nCmdShow;public: Engine(HINSTANCE _hInst,HINSTANCE _hPrevInstance,LPSTR _lpszCmdParam,int _nCmdShow, int ResX, int ResY); ~Engine(); NDX_Screen* GetScreen(); bool MainLoop(); GameObject* AddObject(GameObject *NewObject); void Log(string Text);public: float Scale; GameObject *Objects;};#endif
#ifndef GAMEOBJECT_H#define GAMEOBJECT_H#include "engine.h"class GameObject{protected: Engine *E;public: GameObject(Engine *NewEngine); GameObject *Next;};#endif
#ifndef INPUT_H#define INPUT_H#include "gameobject.h"#include "texturedobject.h"#include "engine.h"class Input : public GameObject{protected: NDX_Input *I; TexturedObject *Cursor;public: Input(Engine *NewEngine, NDX_Window *Window); ~Input(); void HandleInput();};#endif
#ifndef TEXTUREDOBJECT_H#define TEXTUREDOBJECT_H#include "gameobject.h"#include "engine.h"class TexturedObject : public GameObject{protected: NDX_Surface *Surface; char *FileName; float X; float Y;public: TexturedObject(Engine *NewEngine, char *_FileName); NDX_Surface* GetSurface(); void SetPos(float NewX, float NewY); float GetX() { return X; } float GetY() { return Y; } void SetTransparentColor(bool UseTransP, DWORD Color);};#endif
I really hope someone will be able to help me.
Thanks a lot in advance,
DaJero
- Oderint dum metuant
[edited by - DaJero on February 22, 2003 12:29:26 PM]