/* Irrlicht Library Wrapper Created by Nathan Adams Version 1.1 Copyright (C) 2007 This software is licensed under the GNU/GPL. This software may not be used for commerical purposes. */ #ifndef IRRLIB_H #define IRRLIB_H /* We should include some basic functions */ #include /* include strings */ #include /* We have to include Irrlichts libs */ #include #include "IrrSphere.h" //Start class class IrrLib { private: /* Create an Irrlicht device as private because the class should handle All irrlicht interaction */ irr::IrrlichtDevice *device; // Tells Irrlicht what driver to use //video::E_DRIVER_TYPE driverType; /* Get a pointer to the video driver and the SceneManager so that we do not always have to write device->getVideoDriver() and device->getSceneManager(). */ irr::video::IVideoDriver* driver; irr::scene::ISceneManager* smgr; /* Get a pointer to the 'mesh' aka the level. Note: This is for Quake3 levels, ie bsp maps. */ irr::scene::IAnimatedMesh* mesh; irr::scene::ISceneNode* node; irr::scene::ISceneNode * tempNode; //use this to store nodeNew's data so we can resize it irr::scene::ICameraSceneNode * cam; char key; void IrrLib::Init(); public: IrrSphere Sphere; //This has to be public to be able to access the Sphere class IrrLib::IrrLib(); //IrrLib::IrrLib(MastEventReceiver & receiver); IrrLib::IrrLib(irr::video::E_DRIVER_TYPE drivertype, irr::core::dimension2d & res, irr::u32 bits, bool fullscreen, bool stencilbuffer, bool vsync); IrrLib::IrrLib(int drivertype, int width, int height, int bits, bool fullscreen, bool stencilbuffer, bool vsync); IrrLib::~IrrLib(); //Our moms wont clean up after us! void IrrLib::ReadArchive(std::string file); void IrrLib::LoadQ3Level(std::string q3level); void IrrLib::NodePos(int x, int y, int z); //I think this moves the actual camera? void IrrLib::NodePos(); void IrrLib::AddFPSCam(); void IrrLib::AddFPSCam(irr::f32 x, irr::f32 y, irr::f32 z); void IrrLib::VisibleCursor(bool tf); int IrrLib::GetFPSCount(); bool IrrLib::DeviceIsRunning(); bool IrrLib::IsActiveWindow(); void IrrLib::BeginScene(); void IrrLib::BeginScene(irr::video::SColor color); void IrrLib::BeginScene(bool usebackBuffer, bool usezBuffer, irr::video::SColor color); //TODO: Add one more for human readable colors and hex colors! void IrrLib::DrawAll(); void IrrLib::EndScene(); void IrrLib::SetWindowCaption(irr::core::stringw str); irr::core::stringw IrrLib::GetDriverName(); //TODO: Make function to turn stringw to string and visa versa void IrrLib::EndIrrlicht(); //Renamed from KillIrrlicht to EndIrrlicht //TODO: Add logging void IrrLib::KeyPress(char key); char IrrLib::KeyPressed(); }; #endif