Merge branch 'master' of github.com:supertuxkart/stk-code

This commit is contained in:
hiker 2014-02-01 23:23:33 +11:00
commit b6112997b5
3 changed files with 35 additions and 3 deletions

View File

@ -1,4 +1,6 @@
#SuperTuxKart
[![Build Status](https://travis-ci.org/supertuxkart/stk-code.png?branch=master)](https://travis-ci.org/supertuxkart/stk-code)
SuperTuxKart is a free kart racing game. It is focusing on fun and
not on realistic kart physics. Instruction can be found on the
in-game help page.

View File

@ -1457,15 +1457,15 @@ void IrrDriver::setAmbientLight(const video::SColor &light)
*/
void IrrDriver::displayFPS()
{
gui::IGUIFont* font = GUIEngine::getFont();
gui::IGUIFont* font = GUIEngine::getSmallFont();
if(UserConfigParams::m_artist_debug_mode)
{
GL32_draw2DRectangle(video::SColor(150, 96, 74, 196),core::rect< s32 >(75,0,1100,50),NULL);
GL32_draw2DRectangle(video::SColor(150, 96, 74, 196),core::rect< s32 >(75,0,1100,40),NULL);
}
else
{
GL32_draw2DRectangle(video::SColor(150, 96, 74, 196),core::rect< s32 >(75,0,900,50),NULL);
GL32_draw2DRectangle(video::SColor(150, 96, 74, 196),core::rect< s32 >(75,0,900,40),NULL);
}
// We will let pass some time to let things settle before trusting FPS counter
// even if we also ignore fps = 1, which tends to happen in first checks

View File

@ -20,6 +20,7 @@
#include "audio/sfx_base.hpp"
#include "audio/sfx_buffer.hpp"
#include "challenges/unlock_manager.hpp"
#include "graphics/irr_driver.hpp"
#include "graphics/material_manager.hpp"
#include "graphics/particle_emitter.hpp"
@ -674,6 +675,35 @@ void TrackObjectPresentationActionTrigger::onTriggerItemApproached(Item* who)
new RacePausedDialog(0.8f, 0.6f);
//dynamic_cast<OverWorld*>(World::getWorld())->scheduleSelectKart();
}
//action trigger near big doors in the overword to notify players that they'll open once they finish all the challenges
else if (m_action == "big_door")
{
m_action_active = false;
unsigned int unlocked_challenges = 0;
GameSlot* slot = unlock_manager->getCurrentSlot();
std::vector<OverworldChallenge> m_challenges = World::getWorld()->getTrack()->getChallengeList();
for (unsigned int i=0; i<m_challenges.size(); i++)
{
if (m_challenges[i].m_challenge_id == "tutorial")
{
unlocked_challenges++;
continue;
}
if (slot->getChallenge(m_challenges[i].m_challenge_id)
->isSolvedAtAnyDifficulty())
{
unlocked_challenges++;
}
}
// allow ONE unsolved challenge : the last one and check for negation
if ((unlocked_challenges < m_challenges.size() - 1))
{
new TutorialMessageDialog(_("Complete all challenges to unlock the big door!"), true);
}
}
else if (m_action == "tutorial_drive")
{
//if (World::getWorld()->getPhase() == World::RACE_PHASE)