Image bug :
Code :
Code: Select all
#include <irrlicht.h>
int main(void)
{
irr::IrrlichtDevice* device = irr::createDevice(irr::video::EDT_OPENGL,
irr::core::dimension2d<irr::u32>(800,800),32,false,false,false);
irr::video::IVideoDriver* driver = device->getVideoDriver ();
irr::scene::ISceneManager *sceneManager = device->getSceneManager (); //
device->getCursorControl ()-> setVisible (false);
device->getFileSystem()->addZipFileArchive("focal_p132.pk3"); // Ajout du fichier compresser de la map
irr::scene::IAnimatedMesh* mesh = sceneManager->getMesh("focal_p132.bsp");
irr::scene::ISceneNode* node = 0;
if (mesh)
node = sceneManager->addOctTreeSceneNode(mesh->getMesh(0));
if (node)
node->setPosition(irr::core::vector3df(-1300,-144,-1249));
sceneManager->setAmbientLight(irr::video::SColorf(1.0,1.0,1.0,0.0));
node->setMaterialFlag(irr::video::EMF_BACK_FACE_CULLING, false);
irr::SKeyMap keyMap[5];
//avancer
keyMap[0].Action = irr::EKA_MOVE_FORWARD;
keyMap[0].KeyCode = irr::KEY_KEY_Z;
//reculer
keyMap[1].Action = irr::EKA_MOVE_BACKWARD;
keyMap[1].KeyCode = irr::KEY_KEY_S;
//a gauche
keyMap[2].Action = irr::EKA_STRAFE_LEFT;
keyMap[2].KeyCode = irr::KEY_KEY_Q;
//a droite
keyMap[3].Action = irr::EKA_STRAFE_RIGHT;
keyMap[3].KeyCode = irr::KEY_KEY_D;
//saut
keyMap[4].Action = irr::EKA_JUMP_UP;
keyMap[4].KeyCode = irr::KEY_SPACE;
irr::scene::ICameraSceneNode *camera;
camera = sceneManager->addCameraSceneNodeFPS (0, 100.0f, 0.3f, -1, keyMap, 5, false, 0.4);
while (device->run()) //
{
driver->beginScene(true, true,
irr::video::SColor(0,200,200,200));
sceneManager->drawAll (); //
driver->endScene (); //
}
device->drop ();
return 0;
}
http://www.filefront.com/15690927/focal_p132.zip/
Thank you in advance for your answers.
Best regards.