może to dlatego że plik MapITEMS.h ma dołączony LuaScript.h a LuaScript.h ma dołączony Scene.h i potem jak jeszcze dodaje ten plik... eh no nie wiem;;;
MapITEMS.h
#ifndef MapITEMS_H
#define MapITEMS_H
#include <math.h>
#include <irrlicht.h>
#include "GameEngine.h"
#include "Timers.h"
#include "LuaScript.h"
using namespace irr; // pozwoliłem sobie przywrócić namespace'y
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
class MapITEMS
{
public:
MapITEMS(Mapa *mmap)
{
eng=mmap->eng;
map=mmap;
texture=NULL;
tmr=false;
scriptFile[0]=NULL;
mscr=NULL;
}
Engine *eng;
Mapa *map;
scene::ISceneNode * node;
video::ITexture *texture;
irr::newton::SBodyFromNode sphereData;
irr::newton::IBody* sphere_body;
LuaScript *mscr;
int CreateCube(video::ITexture *t,vector3df pos,vector3df rot=vector3df(0,0,0),vector3df siz=vector3df(1,1,1),bool l=false,bool c=true);
int CreateSphere(video::ITexture *t,vector3df pos,vector3df rot=vector3df(0,0,0),vector3df siz=vector3df(1,1,1),bool l=false,bool c=true);
int AddColision();
int AddPhysx(irr::f32 mass=1,vector3df force=vector3df(0,-2,0),vector3df mforce=vector3df(0,0,0));
int SetScript(LuaScript *ss,char s[],int tr=0,bool timer=false,int del=500,int t=1);
int UpDate();
char scriptFile[1000];
bool tmr;
int stryb;
Timers *scrt;
};
#endif
Scene.h
#ifndef Scene_H
#define Scene_H
#include <math.h>
#include <irrlicht.h>
#include "GameEngine.h"
#include "Gracz.h"
#include "MapITEMS.h"
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
class mScene
{
public:
mScene(Engine *meng,Mapa *mmap,Gracz *p)
{
eng=meng;
map=mmap;
mp=p;
}
Engine *eng;
Mapa *map;
Gracz *mp;
MapITEMS *items[1000];
};
#endif
LuaScript.h
#ifndef LuaS_H
#define LuaS_H
#include <math.h>
#include <irrlicht.h>
#include "GameEngine.h"
#include "Gracz.h"
#include "Timers.h"
#include "Scene.h"
extern "C"
{
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
}
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
class LuaScript
{
public:
LuaScript(Engine *meng,Mapa *mmap,Gracz *p,mScene *m)
{
eng=meng;
map=mmap;
mp=p;
ms=m;
luaState = lua_open();
scriptIL=0;
}
~LuaScript(){lua_close(luaState);}
Engine *eng;
Mapa *map;
Gracz *mp;
mScene *ms;
lua_State *luaState;
char LastLuaErr[500];
bool WykonajSkrypt(char plik[],int tryb=0);
bool Laduj_wykonaj_skrypt(char plik[]);
char *scripts[500];
char scrnames[500][500];
int scriptIL;
};
#endif