From c18ba6bc0318781a712a2f59386d20d259964e5b Mon Sep 17 00:00:00 2001 From: auria Date: Fri, 5 Mar 2010 01:42:54 +0000 Subject: [PATCH] Fixed funny-colored stuff coming out of the chest (and fixed the network button hack to get there quicker) git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4930 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/graphics/irr_driver.cpp | 8 ++++---- src/states_screens/feature_unlocked.cpp | 7 ++++--- src/states_screens/main_menu_screen.cpp | 12 +++++++----- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index aef505c02..6c7ea47fa 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -529,22 +529,22 @@ scene::IMesh *IrrDriver::createTexturedQuadMesh(const video::SMaterial *material video::S3DVertex v1; v1.Pos = core::vector3df(-w_2,-h_2,0); - v1.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); // I hope normals are ok... + v1.Normal = core::vector3df(0, 0, -1.0f); v1.TCoords = core::vector2d(0,1); video::S3DVertex v2; v2.Pos = core::vector3df(w_2,-h_2,0); - v2.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); + v2.Normal = core::vector3df(0, 0, -1.0f); v2.TCoords = core::vector2d(1,1); video::S3DVertex v3; v3.Pos = core::vector3df(w_2,h_2,0); - v3.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); + v3.Normal = core::vector3df(0, 0, -1.0f); v3.TCoords = core::vector2d(1,0); video::S3DVertex v4; v4.Pos = core::vector3df(-w_2,h_2,0); - v4.Normal = core::vector3df(1/sqrt(2.0f), 1/sqrt(2.0f), 0); + v4.Normal = core::vector3df(0, 0, -1.0f); v4.TCoords = core::vector2d(0,0); diff --git a/src/states_screens/feature_unlocked.cpp b/src/states_screens/feature_unlocked.cpp index 12c34590c..b90854a38 100644 --- a/src/states_screens/feature_unlocked.cpp +++ b/src/states_screens/feature_unlocked.cpp @@ -109,9 +109,10 @@ void FeatureUnlockedCutScene::init() m.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; m.BackfaceCulling = false; m.setTexture(0, m_unlocked_stuff[n].m_picture); - m.AmbientColor = SColor(255,255,255,255); - m.DiffuseColor = SColor(255,255,255,255); - m.SpecularColor = SColor(0,0,0,0); + m.AmbientColor = video::SColor(255, 255, 255, 255); + m.DiffuseColor = video::SColor(255, 255, 255, 255); + m.EmissiveColor = video::SColor(255, 255, 255, 255); + m.SpecularColor = video::SColor(255, 255, 255, 255); m.GouraudShading = false; m.Shininess = 0; //m.setFlag(video::EMF_TEXTURE_WRAP, false); diff --git a/src/states_screens/main_menu_screen.cpp b/src/states_screens/main_menu_screen.cpp index 26e67bcd7..d23a26935 100644 --- a/src/states_screens/main_menu_screen.cpp +++ b/src/states_screens/main_menu_screen.cpp @@ -66,12 +66,13 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name, cons if (selection == "network") { // FIXME : remove, temporary test + /* GrandPrixOver* scene = GrandPrixOver::getInstance(); const std::string winners[] = { "mriceblock", "nolok", "pidgin" }; scene->setKarts( winners ); StateManager::get()->pushScreen(scene); - - /* + */ + FeatureUnlockedCutScene* scene = FeatureUnlockedCutScene::getInstance(); static int i = 0; @@ -80,15 +81,16 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name, cons if (i % 2 == 0) { // the passed kart will not be modified, that's why I allow myself to use const_cast - scene->setUnlockedKart( const_cast(kart_properties_manager->getKart("gnu")) ); + scene->addUnlockedKart( const_cast(kart_properties_manager->getKart("gnu")), + L"Unlocked"); StateManager::get()->pushScreen(scene); } else { - scene->setUnlockedPicture( irr_driver->getTexture(track_manager->getTrack("beach")->getScreenshotFile().c_str()) ); + scene->addUnlockedPicture( irr_driver->getTexture(track_manager->getTrack("beach")->getScreenshotFile().c_str()), + 1.0, 0.75, L"You did it"); StateManager::get()->pushScreen(scene); } - */ } if (selection == "new")