diff --git a/src/states_screens/feature_unlocked.cpp b/src/states_screens/feature_unlocked.cpp index 2812d85d3..3e414eebe 100644 --- a/src/states_screens/feature_unlocked.cpp +++ b/src/states_screens/feature_unlocked.cpp @@ -30,8 +30,13 @@ FeatureUnlockedCutScene::FeatureUnlockedCutScene() : CutScene(CUTSCENE_NAME) void FeatureUnlockedCutScene::prepare() { + angle = 0.0f; + sky = irr_driver->addSkyDome(file_manager->getTextureFile("lscales.png"), 16 /* hori_res */, 16 /* vert_res */, - 15.0f /* texture_percent */, 1.3f /* sphere_percent */); + 1.0f /* texture_percent */, 2.0f /* sphere_percent */); + + camera = irr_driver->addCamera(); + /* for (unsigned int i=0; igetMaterialCount(); i++) { @@ -49,13 +54,20 @@ void FeatureUnlockedCutScene::prepare() void FeatureUnlockedCutScene::terminate() { printf("+++++++ FeatureUnlockedCutScene:Terminate +++++++++\n"); + irr_driver->removeNode(sky); sky = NULL; + + irr_driver->removeCamera(camera); + camera = NULL; } void FeatureUnlockedCutScene::onUpdate(float dt, irr::video::IVideoDriver* driver) { - sky->render(); + angle += dt*2; + if (angle > 360) angle -= 360; + sky->setRotation( core::vector3df(0, angle, 0) ); + const int w = irr_driver->getFrameSize().Width; const int h = irr_driver->getFrameSize().Height; const irr::video::SColor color(255, 255, 0 ,0); diff --git a/src/states_screens/feature_unlocked.hpp b/src/states_screens/feature_unlocked.hpp index 6498d7bcb..c572776bb 100644 --- a/src/states_screens/feature_unlocked.hpp +++ b/src/states_screens/feature_unlocked.hpp @@ -3,14 +3,16 @@ #include "guiengine/cutscene.hpp" -namespace irr { namespace scene { class ISceneNode; } } +namespace irr { namespace scene { class ISceneNode; class ICameraSceneNode; } } class FeatureUnlockedCutScene : public GUIEngine::CutScene { FeatureUnlockedCutScene(); void prepare(); + float angle; irr::scene::ISceneNode* sky; + irr::scene::ICameraSceneNode* camera; public: static void show();