/* 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. */ #include #include "IrrLib.h" //#include "IrrSphere.h" //You probably aren't going to be using 3D objects in a 2D environment! #include "Irr2D.h" #include #include using namespace irr; using namespace core; using namespace scene; using namespace video; using namespace io; using namespace gui; using namespace std; Irr2D::Irr2D(){ this->numTextures = 0; } Irr2D::~Irr2D(){ for(int i = 0; i < numTextures; ++i) delete this->textures[i]; delete this->textures; } void Irr2D::SetSmgr(irr::scene::ISceneManager* smgr){ this->smgr = smgr; } void Irr2D::SetDriver(irr::video::IVideoDriver* driver){ this->driver = driver; } void Irr2D::LoadTexturemap(std::string file){ this->texturemap = driver->getTexture(file.c_str()); } int Irr2D::LoadTexture(std::string file){ this->textures[this->numTextures] = driver->getTexture(file.c_str()); this->numTextures++; return numTextures--; }