Topic is a bit misleading since I already fixed tons of errors due to tutorial authors typos... Not mad about typos I learned a bit while correcting those and now I know where to look for help.
But this one confuses me too much so making a thread sounded like a nice idea.
Code in question:
Code: Select all
#include "irrlicht.h"
#include <Smaterial.h>
#include <iostream>
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
#endif
// Irrlicht Namespaces
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main()
{
IrrlichtDevice *irrDevice = createDevice(EDT_OPENGL,
dimension2d<s32>(800, 600),
32,
false,
false,
0);
irrDevice->setWindowCaption(L"Irrlicht 1.3.1");
IVideoDriver* irrDriver = irrDevice->getVideoDriver();
ISceneManager* irrSceneMgr = irrDevice->getSceneManager();
ISceneManager* smgr = irrDevice->getSceneManager();
irrDevice->getFileSystem()->addZipFileArchive("/media/pptp.pk3");
IAnimatedMesh* mesh = smgr->getMesh("maps/gauntlet.bsp");
ISceneNode* node = 0;
if (mesh)
node = smgr->addOctTreeSceneNode(mesh->getMesh(0), 0, -1, 128);
if (node)
node->setPosition(core::vector3df(-1300,-144,-1249));
smgr->addCameraSceneNodeFPS();
irrDevice->getCursorControl()->setVisible(false);
while(irrDevice->run())
{
irrDriver->beginScene(true, true, SColor(0,100,125,125));
irrSceneMgr->drawAll();
irrGUIEnv->drawAll();
irrDriver->endScene();
}
irrDevice->drop();
return(0);
}
Which is a bit odd, since it works on the tutorial to make a window without declaring it and with the same header files aswell.
Any help?
ps. The .pk3 file is in the .exe files subfolder called /media and the .bsp is in /maps folder in .pk3 are those ok?