diff --git a/src/states_screens/feature_unlocked.cpp b/src/states_screens/feature_unlocked.cpp index 637c82ae5..b211ed2bb 100644 --- a/src/states_screens/feature_unlocked.cpp +++ b/src/states_screens/feature_unlocked.cpp @@ -37,7 +37,7 @@ FeatureUnlockedCutScene::UnlockedThing::UnlockedThing(KartProperties* kart, irr: m_unlocked_kart = kart; m_unlock_message = msg; m_curr_image = -1; -} +} // UnlockedThing::UnlockedThing // ------------------------------------------------------------------------------------- @@ -51,9 +51,9 @@ FeatureUnlockedCutScene::UnlockedThing::UnlockedThing(irr::video::ITexture* pict m_h = h; m_unlock_message = msg; m_curr_image = -1; -} +} // UnlockedThing::UnlockedThing -// ------------------------------------------------------------------------------------- +// ---------------------------------------------------------------------------- FeatureUnlockedCutScene::UnlockedThing::UnlockedThing(std::vector picts, float w, float h, irr::core::stringw msg) @@ -64,18 +64,17 @@ FeatureUnlockedCutScene::UnlockedThing::UnlockedThing(std::vectorremoveNode(m_root_gift_node); m_root_gift_node = NULL; -} +} // UnlockedThing::~UnlockedThing -// ------------------------------------------------------------------------------------- -// ------------------------------------------------------------------------------------- +// ============================================================================ #if 0 #pragma mark - @@ -87,13 +86,13 @@ FeatureUnlockedCutScene::FeatureUnlockedCutScene() : Screen("feature_unlocked.st setNeeds3D(true); m_throttle_FPS = false; -} +} // FeatureUnlockedCutScene // ------------------------------------------------------------------------------------- void FeatureUnlockedCutScene::loadedFromFile() { -} +} // loadedFromFile // ------------------------------------------------------------------------------------- @@ -101,7 +100,7 @@ void FeatureUnlockedCutScene::addUnlockedKart(KartProperties* unlocked_kart, irr { assert(unlocked_kart != NULL); m_unlocked_stuff.push_back( new UnlockedThing(unlocked_kart, msg) ); -} +} // addUnlockedKart // ------------------------------------------------------------------------------------- @@ -111,7 +110,7 @@ void FeatureUnlockedCutScene::addUnlockedPicture(irr::video::ITexture* picture, assert(picture != NULL); m_unlocked_stuff.push_back( new UnlockedThing(picture, w, h, msg) ); -} +} // addUnlockedPicture // ------------------------------------------------------------------------------------- @@ -121,7 +120,7 @@ void FeatureUnlockedCutScene::addUnlockedPictures(std::vectorcreateTexturedQuadMesh(&m, - m_unlocked_stuff[n].m_w, - m_unlocked_stuff[n].m_h); + scene::IMesh* mesh = + irr_driver->createTexturedQuadMesh(&m, + m_unlocked_stuff[n].m_w, + m_unlocked_stuff[n].m_h); m_unlocked_stuff[n].m_root_gift_node = irr_driver->addMesh(mesh); } @@ -202,7 +202,9 @@ void FeatureUnlockedCutScene::init() std::cerr << "Malformed unlocked goody!!!\n"; } } -} + + +} // init // ------------------------------------------------------------------------------------- @@ -346,10 +348,10 @@ void FeatureUnlockedCutScene::onUpdate(float dt, irr::video::IVideoDriver* drive node->setMesh(mesh); m_unlocked_stuff[n].m_curr_image = textureID; - } - } - } - } + } // textureID != previousTextureID + } // if pictureCount>1 + } // if !m_unlocked_stuff[n].m_pictures.empty() + } // for n 0); if (m_unlocked_stuff[0].m_root_gift_node != NULL)