#include #include "CResLoader.h" using namespace irr; #ifdef _IRR_WINDOWS_ #pragma comment(lib, "Irrlicht.lib") #endif int main() { IrrlichtDevice *device = createDevice( video::EDT_OPENGL, core::dimension2d(800, 600), 32); if (!device) return 1; io::IFileSystem* fs = device->getFileSystem(); video::IVideoDriver* driver = device->getVideoDriver(); scene::ISceneManager* smgr = device->getSceneManager(); gui::IGUIEnvironment* guienv = device->getGUIEnvironment(); // create an instance of the loader and add it to the filesystem io::CArchiveLoaderRes* resLoader = new io::CArchiveLoaderRes(fs); fs->addArchiveLoader(resLoader); // we created it with new, we are finished with it so we must drop it. resLoader->drop(); // now we can add an executable to the filesystem as an archive fs->addFileArchive("c:\\windows\\system32\\inetcpl.cpl"); // now let's extract a bitmap and add it to the GUI guienv->addImage(driver->getTexture("4474.bmp"), core::vector2di(0,0)); while(device->run()) { driver->beginScene(true, true, video::SColor(255,100,101,140)); smgr->drawAll(); guienv->drawAll(); driver->endScene(); } device->drop(); return 0; }