From 3c018d5ac146318235413190ff37bbe01234e6e5 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Tue, 29 Jul 2008 05:38:30 +0000 Subject: [PATCH] 1) Bugfix: GP were not locked. 2) Renamed all 'cups' into grand_prix. 3) Removed obsolete source files. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2190 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- data/grandprix/alltracks.grandprix | 2 +- data/grandprix/atworldsend.grandprix | 2 +- data/grandprix/penguinplayground.grandprix | 2 +- data/grandprix/snagdrive.grandprix | 2 +- data/grandprix/tothemoonandback.grandprix | 2 +- src/challenges/challenge_data.cpp | 6 +- src/challenges/penguin_playground_gp.cpp | 61 ------------------- src/challenges/penguin_playground_gp.hpp | 34 ----------- src/challenges/worlds_end_gp.cpp | 69 ---------------------- src/challenges/worlds_end_gp.hpp | 36 ----------- src/{cup_data.cpp => grand_prix_data.cpp} | 14 ++--- src/{cup_data.hpp => grand_prix_data.hpp} | 24 ++++---- src/grand_prix_manager.cpp | 18 +++--- src/grand_prix_manager.hpp | 18 +++--- src/gui/grand_prix_select.cpp | 26 ++++---- src/gui/grand_prix_select.hpp | 6 +- src/herring_manager.hpp | 2 +- src/ide/vc9/supertuxkart.vcproj | 24 +++----- src/race_manager.cpp | 6 +- src/race_manager.hpp | 12 ++-- src/world.cpp | 2 +- 21 files changed, 80 insertions(+), 288 deletions(-) delete mode 100644 src/challenges/penguin_playground_gp.cpp delete mode 100644 src/challenges/penguin_playground_gp.hpp delete mode 100644 src/challenges/worlds_end_gp.cpp delete mode 100644 src/challenges/worlds_end_gp.hpp rename src/{cup_data.cpp => grand_prix_data.cpp} (83%) rename src/{cup_data.hpp => grand_prix_data.hpp} (78%) diff --git a/data/grandprix/alltracks.grandprix b/data/grandprix/alltracks.grandprix index 2ed0d3e8c..26f53d92b 100644 --- a/data/grandprix/alltracks.grandprix +++ b/data/grandprix/alltracks.grandprix @@ -1,6 +1,6 @@ ;; -*- mode: lisp -*- -(supertuxkart-cup +(supertuxkart-grand-prix (name _("All tracks")) (description _("All tracks included in SuperTuxKart")) (tracks "beach" "startrack" "lighthouse" "jungle" "volcano" "islandtrack" "sandtrack" "fortmagma" "snowtuxpeak" "crescentcrossing" "olivermath" "race" "city" "canyon" "subseatrack" "tuxtrack") diff --git a/data/grandprix/atworldsend.grandprix b/data/grandprix/atworldsend.grandprix index d5c1f1998..b6e9718ed 100644 --- a/data/grandprix/atworldsend.grandprix +++ b/data/grandprix/atworldsend.grandprix @@ -1,6 +1,6 @@ ;; -*- mode: lisp -*- -(supertuxkart-cup +(supertuxkart-grand-prix (name _("At world's end")) (description _("Last grand prix, longer and harder")) (tracks "fortmagma" "canyon" "subseatrack" "volcano" "snowtuxpeak") diff --git a/data/grandprix/penguinplayground.grandprix b/data/grandprix/penguinplayground.grandprix index 7b3936c05..e331102b5 100644 --- a/data/grandprix/penguinplayground.grandprix +++ b/data/grandprix/penguinplayground.grandprix @@ -1,6 +1,6 @@ ;; -*- mode: lisp -*- -(supertuxkart-cup +(supertuxkart-grand-prix (name _("Penguin Playground")) (description _("First grand prix, easy to get started")) (tracks "tuxtrack" "race" "olivermath") diff --git a/data/grandprix/snagdrive.grandprix b/data/grandprix/snagdrive.grandprix index 8cebfe084..3173006d5 100644 --- a/data/grandprix/snagdrive.grandprix +++ b/data/grandprix/snagdrive.grandprix @@ -1,6 +1,6 @@ ;; -*- mode: lisp -*- -(supertuxkart-cup +(supertuxkart-grand-prix (name _("Snag Drive")) (description _("Third grand prix")) (tracks "islandtrack" "sandtrack" "city" "crescentcrossing") diff --git a/data/grandprix/tothemoonandback.grandprix b/data/grandprix/tothemoonandback.grandprix index e9078ac51..c2258c6c3 100644 --- a/data/grandprix/tothemoonandback.grandprix +++ b/data/grandprix/tothemoonandback.grandprix @@ -1,6 +1,6 @@ ;; -*- mode: lisp -*- -(supertuxkart-cup +(supertuxkart-grand-prix (name _("To the Moon and Back")) (description _("Second grand prix")) (tracks "beach" "startrack" "jungle" "lighthouse") diff --git a/src/challenges/challenge_data.cpp b/src/challenges/challenge_data.cpp index c7e4c4645..f4d77bfc3 100755 --- a/src/challenges/challenge_data.cpp +++ b/src/challenges/challenge_data.cpp @@ -23,7 +23,7 @@ #include "lisp/parser.hpp" #include "translation.hpp" #include "world.hpp" -#include "cup_data.hpp" +#include "grand_prix_data.hpp" #include "grand_prix_manager.hpp" #if defined(WIN32) && !defined(__CYGWIN__) @@ -198,8 +198,8 @@ void ChallengeData::setRace() const else // GP { race_manager->setMinorMode(m_minor); - const CupData *cup = grand_prix_manager->getCup(m_gp_id); - race_manager->setGrandPrix(*cup); + const GrandPrixData *gp = grand_prix_manager->getGrandPrix(m_gp_id); + race_manager->setGrandPrix(*gp); race_manager->setDifficulty(m_difficulty); race_manager->setNumKarts(m_num_karts); race_manager->setNumPlayers(1); diff --git a/src/challenges/penguin_playground_gp.cpp b/src/challenges/penguin_playground_gp.cpp deleted file mode 100644 index 09d4785a9..000000000 --- a/src/challenges/penguin_playground_gp.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// $Id$ -// -// SuperTuxKart - a fun racing game with go-kart -// Copyright (C) 2008 Joerg Henrichs -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 3 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be ruseful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include "translation.hpp" -#include "challenges/penguin_playground_gp.hpp" -#include "race_manager.hpp" -#include "world.hpp" - -PenguinPlaygroundGP::PenguinPlaygroundGP() : Challenge("penguinplaygroundgp", _("Win Penguin Playground Grand\nPrix")) -{ - setChallengeDescription(_("Win Penguin Playground Grand\nPrix with 3 'Racer' Level AI karts.")); - addUnlockModeReward("followleader", _("Follow the Leader")); - // The energymathclass challenge must be done, otherwise GP can't be selected -} - -//----------------------------------------------------------------------------- -void PenguinPlaygroundGP::setRace() const { - race_manager->setMajorMode(RaceManager::RM_GRAND_PRIX); - race_manager->setMinorMode(RaceManager::RM_QUICK_RACE); - CupData cup("gp1.cup"); - race_manager->setGrandPrix(cup); - race_manager->setDifficulty(RaceManager::RD_HARD); - race_manager->setNumKarts(4); - race_manager->setNumPlayers(1); -} // setRace - -//----------------------------------------------------------------------------- -bool PenguinPlaygroundGP::grandPrixFinished() -{ - if (race_manager->getMajorMode() != RaceManager::RM_GRAND_PRIX || - race_manager->getMinorMode() != RaceManager::RM_QUICK_RACE || - race_manager->getGrandPrix()->getName() != _("Penguin Playground") || - race_manager->getDifficulty()!= RaceManager::RD_HARD || - race_manager->getNumKarts() < 4 || - race_manager->getNumPlayers() > 1) return false; - // Check if the player was in top 3: - for(int i=0; i<(int)race_manager->getNumKarts(); i++) - { - const Kart* k=world->getKart(i); - if(k->isPlayerKart() && !k->isEliminated()) return k->getPosition()==1; - } - return false; - -} // grandPrixFinished -//----------------------------------------------------------------------------- diff --git a/src/challenges/penguin_playground_gp.hpp b/src/challenges/penguin_playground_gp.hpp deleted file mode 100644 index f26c6ca1e..000000000 --- a/src/challenges/penguin_playground_gp.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// $Id$ -// -// SuperTuxKart - a fun racing game with go-kart -// Copyright (C) 2008 Joerg Henrichs -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 3 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef PENGUIN_PLAYGROUND_GP_H -#define PENGUIN_PLAYGROUND_GP_H - -#include "challenges/challenge.hpp" - -class PenguinPlaygroundGP : public Challenge -{ -public: - PenguinPlaygroundGP(); - virtual bool grandPrixFinished(); - virtual void setRace() const; - -}; - -#endif /*PENGUIN_PLAYGROUND_GP_H*/ diff --git a/src/challenges/worlds_end_gp.cpp b/src/challenges/worlds_end_gp.cpp deleted file mode 100644 index 8d35024f0..000000000 --- a/src/challenges/worlds_end_gp.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// $Id$ -// -// SuperTuxKart - a fun racing game with go-kart -// Copyright (C) 2008 Joerg Henrichs -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 3 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be ruseful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include "translation.hpp" -#include "worlds_end_gp.hpp" -#include "race_manager.hpp" -#include "world.hpp" - -WorldsEndGP::WorldsEndGP() : Challenge("worldsendgp",_("Win the At World's End\nGrand Prix")) -{ - setChallengeDescription(_("Come first in the At World's End\nGrand Prix with 3 'Racer'\nLevel AI karts.")); - - addUnlockDifficultyReward("skidding","Skidding Preview"); - addUnlockGPReward("All tracks"); - - addDependency("islandfollow"); - addDependency("racetracktime"); - addDependency("tollwaytime"); - addDependency("junglefollow"); - addDependency("citytime"); - addDependency("tollwayhead"); -} - -//----------------------------------------------------------------------------- -void WorldsEndGP::setRace() const { - race_manager->setMajorMode(RaceManager::RM_GRAND_PRIX); - race_manager->setMinorMode(RaceManager::RM_QUICK_RACE); - CupData cup("gp4.cup"); - race_manager->setGrandPrix(cup); - race_manager->setDifficulty(RaceManager::RD_HARD); - race_manager->setNumKarts(4); - race_manager->setNumPlayers(1); -} // setRace - -//----------------------------------------------------------------------------- -bool WorldsEndGP::grandPrixFinished() -{ - if (race_manager->getMajorMode() != RaceManager::RM_GRAND_PRIX || - race_manager->getMinorMode() != RaceManager::RM_QUICK_RACE || - race_manager->getGrandPrix()->getName() != _("At world's end") || - race_manager->getDifficulty()!= RaceManager::RD_HARD || - race_manager->getNumKarts() < 4 || - race_manager->getNumPlayers() > 1) return false; - // Check if the player was first: - for(int i=0; i<(int)race_manager->getNumKarts(); i++) - { - const Kart* k=world->getKart(i); - if(k->isPlayerKart() && !k->isEliminated()) return k->getPosition()==1; - } - return false; - -} // grandPrixFinished -//----------------------------------------------------------------------------- diff --git a/src/challenges/worlds_end_gp.hpp b/src/challenges/worlds_end_gp.hpp deleted file mode 100644 index c15c08776..000000000 --- a/src/challenges/worlds_end_gp.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// $Id$ -// -// SuperTuxKart - a fun racing game with go-kart -// Copyright (C) 2008 Joerg Henrichs -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 3 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef WORLDS_END_GP_H -#define WORLDS_END_GP_H - - -#include "challenge.hpp" - -class WorldsEndGP : public Challenge -{ -public: - WorldsEndGP(); - virtual bool grandPrixFinished(); - virtual void setRace() const; - -}; - - -#endif /*WORLDS_END_GP_H*/ diff --git a/src/cup_data.cpp b/src/grand_prix_data.cpp similarity index 83% rename from src/cup_data.cpp rename to src/grand_prix_data.cpp index 08990aa60..eba28aa13 100644 --- a/src/cup_data.cpp +++ b/src/grand_prix_data.cpp @@ -23,24 +23,24 @@ #include "file_manager.hpp" #include "lisp/parser.hpp" #include "lisp/lisp.hpp" -#include "cup_data.hpp" +#include "grand_prix_data.hpp" #include "string_utils.hpp" #include "track_manager.hpp" -CupData::CupData(const std::string filename) +GrandPrixData::GrandPrixData(const std::string filename) { m_filename = filename; - m_id = StringUtils::without_extension(filename); + m_id = StringUtils::basename(StringUtils::without_extension(filename)); const lisp::Lisp* lisp = 0; try { lisp::Parser parser; lisp = parser.parse(file_manager->getConfigFile(m_filename)); - lisp = lisp->getLisp("supertuxkart-cup"); + lisp = lisp->getLisp("supertuxkart-grand-prix"); if(!lisp) { - throw std::runtime_error("No supertuxkart-cup node"); + throw std::runtime_error("No supertuxkart-grand-prix node"); } lisp->get ("name", m_name ); @@ -51,7 +51,7 @@ CupData::CupData(const std::string filename) } catch(std::exception& err) { - fprintf(stderr, "Error while reading cup file '%s'\n", filename.c_str()); + fprintf(stderr, "Error while reading grandprix file '%s'\n", filename.c_str()); fprintf(stderr, err.what()); fprintf(stderr, "\n"); } @@ -59,7 +59,7 @@ CupData::CupData(const std::string filename) delete lisp; } // ---------------------------------------------------------------------------- -bool CupData::checkConsistency() +bool GrandPrixData::checkConsistency() { bool correct=true; for(unsigned int i=0; i #include @@ -27,16 +27,16 @@ #include "herring_manager.hpp" -/** Simple class that hold the data relevant to a 'cup', aka. a number +/** Simple class that hold the data relevant to a 'grand_prix', aka. a number of races that has to be completed one after the other */ -class CupData +class GrandPrixData { - std::string m_name; // The name of the cup - might be translated! - std::string m_id; // Internal name of the cup, not translated + std::string m_name; // The name of the grand prix - might be translated! + std::string m_id; // Internal name of the grand prix, not translated std::string m_filename; // Original filename, only for error handling needed std::string m_description; // Description for this track std::string m_herring_style; // herring style which overwrites the track default - /** The ident of the tracks in this cup in their right order, ident + /** The ident of the tracks in this grand prix in their right order, ident means the filename of the .track file without .track extension (ie. 'volcano') */ std::vector m_tracks; @@ -46,9 +46,9 @@ class CupData public: - /** Load the CupData from the given filename */ - CupData (const std::string filename); - CupData () {}; // empty for initialising + /** Load the GrandPrixData from the given filename */ + GrandPrixData (const std::string filename); + GrandPrixData () {}; // empty for initialising const std::string& getName () const { return m_name; } const std::string& getId () const { return m_id; } const std::string& getDescription () const { return m_description; } @@ -60,10 +60,10 @@ public: const std::vector& getLaps() const {return m_laps; } size_t getTrackCount() const {return m_tracks.size(); } const int& getLaps(size_t lap_index) const {assert(lap_index < m_tracks.size()); - return m_laps[lap_index]; } + return m_laps[lap_index];} bool checkConsistency(); } -; // CupData +; // GrandPrixData #endif diff --git a/src/grand_prix_manager.cpp b/src/grand_prix_manager.cpp index 4a3062fa2..9851813e3 100644 --- a/src/grand_prix_manager.cpp +++ b/src/grand_prix_manager.cpp @@ -43,31 +43,31 @@ GrandPrixManager::GrandPrixManager() // ---------------------------------------------------------------------------- GrandPrixManager::~GrandPrixManager() { - for(unsigned int i=0; igetId()==s) return m_cup_data[i]; + for(unsigned int i=0; igetId()==s) return m_gp_data[i]; return NULL; -} // getCup +} // getGrandPrix // ---------------------------------------------------------------------------- void GrandPrixManager::load(const std::string& filename) { - m_cup_data.push_back(new CupData(filename)); + m_gp_data.push_back(new GrandPrixData(filename)); } // load // ---------------------------------------------------------------------------- void GrandPrixManager::checkConsistency() { - for(unsigned int i=0; icheckConsistency(); + m_gp_data[i]->checkConsistency(); } } // checkConsistency // ---------------------------------------------------------------------------- diff --git a/src/grand_prix_manager.hpp b/src/grand_prix_manager.hpp index d554ea606..4ccf5e19b 100644 --- a/src/grand_prix_manager.hpp +++ b/src/grand_prix_manager.hpp @@ -22,20 +22,20 @@ #include #include -#include "cup_data.hpp" +#include "grand_prix_data.hpp" class GrandPrixManager { private: - std::vector m_cup_data; + std::vector m_gp_data; public: - GrandPrixManager(); - ~GrandPrixManager(); - void load(const std::string &filename); - const CupData* getCup(int i) const { return m_cup_data[i]; } - const CupData* getCup(const std::string& s) const; - unsigned int getNumberOfGrandPrix() const { return m_cup_data.size(); } - void checkConsistency(); + GrandPrixManager(); + ~GrandPrixManager(); + void load(const std::string &filename); + const GrandPrixData* getGrandPrix(int i) const { return m_gp_data[i]; } + const GrandPrixData* getGrandPrix(const std::string& s) const; + unsigned int getNumberOfGrandPrix() const { return m_gp_data.size(); } + void checkConsistency(); }; // GrandPrixManager diff --git a/src/gui/grand_prix_select.cpp b/src/gui/grand_prix_select.cpp index d25fe87b9..f4b25e702 100644 --- a/src/gui/grand_prix_select.cpp +++ b/src/gui/grand_prix_select.cpp @@ -51,9 +51,9 @@ GrandPrixSelect::GrandPrixSelect() : m_curr_track_img(0), m_clock(0.0f) m_gp_index.clear(); for(unsigned int i=0; igetNumberOfGrandPrix(); i++) { - const CupData *cup = grand_prix_manager->getCup(i); - if(unlock_manager->isLocked(cup->getName())) continue; - widget_manager->addTextButtonWgt(WTOK_FIRSTPRIX + nId, 60, 7, cup->getName() ); + const GrandPrixData *gp = grand_prix_manager->getGrandPrix(i); + if(unlock_manager->isLocked(gp->getId())) continue; + widget_manager->addTextButtonWgt(WTOK_FIRSTPRIX + nId, 60, 7, gp->getName() ); m_gp_index.push_back(i); nId++; } // for i @@ -97,19 +97,19 @@ void GrandPrixSelect::update(float dt) if( widget_manager->selectionChanged() && !( SELECTED_TOKEN < WTOK_FIRSTPRIX )) { - const int CUP_NUM = m_gp_index[SELECTED_TOKEN - WTOK_FIRSTPRIX]; - const CupData *cup = grand_prix_manager->getCup(CUP_NUM); - const int NUM_TRACKS = cup->getTrackCount(); + const int NUM = m_gp_index[SELECTED_TOKEN - WTOK_FIRSTPRIX]; + const GrandPrixData *gp = grand_prix_manager->getGrandPrix(NUM); + const int NUM_TRACKS = gp->getTrackCount(); - widget_manager->setWgtText(WTOK_DESCRIPTION, cup->getDescription()); + widget_manager->setWgtText(WTOK_DESCRIPTION, gp->getDescription()); std::string track_list; - m_cup_tracks = cup->getTracks(); + m_gp_tracks = gp->getTracks(); for( int i = 0; i < NUM_TRACKS; ++i ) { - track_list.append( track_manager->getTrack( m_cup_tracks[i] )->getName() ); + track_list.append( track_manager->getTrack( m_gp_tracks[i] )->getName() ); track_list.push_back('\n'); } widget_manager->setWgtText( WTOK_TRACKS, track_list ); @@ -122,10 +122,10 @@ void GrandPrixSelect::update(float dt) for( int i = 0; i < NUM_TRACKS; ++i ) { - img_filename = track_manager->getTrack( m_cup_tracks[i] )->getTopviewFile(); + img_filename = track_manager->getTrack( m_gp_tracks[i] )->getTopviewFile(); if( img_filename.empty() ) { - img_filename = track_manager->getTrack( m_cup_tracks[i] )->getScreenshotFile(); + img_filename = track_manager->getTrack( m_gp_tracks[i] )->getScreenshotFile(); if( img_filename.empty() ) continue; } @@ -182,8 +182,8 @@ void GrandPrixSelect::select() menu_manager->popMenu(); return; } - const CupData *cup=grand_prix_manager->getCup(m_gp_index[CLICKED_TOKEN-WTOK_FIRSTPRIX]); - race_manager->setGrandPrix(*cup); + const GrandPrixData *gp=grand_prix_manager->getGrandPrix(m_gp_index[CLICKED_TOKEN-WTOK_FIRSTPRIX]); + race_manager->setGrandPrix(*gp); menu_manager->pushMenu(MENUID_RACE_OPTIONS); } // select diff --git a/src/gui/grand_prix_select.hpp b/src/gui/grand_prix_select.hpp index af29af13b..24158b2b0 100644 --- a/src/gui/grand_prix_select.hpp +++ b/src/gui/grand_prix_select.hpp @@ -22,12 +22,12 @@ #include #include "base_gui.hpp" -#include "cup_data.hpp" +#include "grand_prix_data.hpp" class GrandPrixSelect: public BaseGUI { -private: - std::vector m_cup_tracks; +private: + std::vector m_gp_tracks; std::vector m_track_imgs; std::vector m_gp_index; unsigned int m_curr_track_img; diff --git a/src/herring_manager.hpp b/src/herring_manager.hpp index d23c1040c..02b7ed6ac 100644 --- a/src/herring_manager.hpp +++ b/src/herring_manager.hpp @@ -42,7 +42,7 @@ private: ssgEntity *m_herring_model[HE_SILVER+1]; // This is the active model. It gets determined by first loading the - // default, then track models, user models, cup models. This means, that + // default, then track models, user models, grand prix models. This means that // a herring style specified in a track overwrites a command line option. std::map m_all_models; diff --git a/src/ide/vc9/supertuxkart.vcproj b/src/ide/vc9/supertuxkart.vcproj index 99f84694f..bc1d64246 100644 --- a/src/ide/vc9/supertuxkart.vcproj +++ b/src/ide/vc9/supertuxkart.vcproj @@ -699,10 +699,6 @@ RelativePath="../../../src\collectable_manager.cpp" > - - @@ -719,6 +715,10 @@ RelativePath="../../../src\game_manager.cpp" > + + @@ -1078,10 +1078,6 @@ RelativePath="..\..\challenges\challenge_data.cpp" > - - - - @@ -1157,6 +1149,10 @@ RelativePath="../../../src\game_manager.hpp" > + + @@ -1552,10 +1548,6 @@ RelativePath="..\..\challenges\challenge_data.hpp" > - - 0); diff --git a/src/race_manager.hpp b/src/race_manager.hpp index a8c80f3ec..68221b0b6 100644 --- a/src/race_manager.hpp +++ b/src/race_manager.hpp @@ -24,7 +24,7 @@ #include #include -#include "cup_data.hpp" +#include "grand_prix_data.hpp" /** The race manager has two functions: 1) it stores information about the race the user selected (e.g. number @@ -79,7 +79,7 @@ private: std::vector m_num_laps; std::vector m_score_for_position; int m_track_number; - CupData m_cup; + GrandPrixData m_grand_prix; int m_num_karts; unsigned int m_num_finished_karts; unsigned int m_num_finished_players; @@ -105,7 +105,7 @@ public: void reset(); void RaceFinished(const Kart* kart, float time); void setTrack(const std::string& track); - void setGrandPrix(const CupData &cup){ m_cup = cup; } + void setGrandPrix(const GrandPrixData &gp){ m_grand_prix = gp; } void setDifficulty(Difficulty diff); void setNumLaps(int num) { m_num_laps.clear(); m_num_laps.push_back(num); } @@ -121,14 +121,14 @@ public: Difficulty getDifficulty() const { return m_difficulty; } const std::string& getTrackName() const { return m_tracks[m_track_number]; } - const CupData - *getGrandPrix() const { return &m_cup; } + const GrandPrixData + *getGrandPrix() const { return &m_grand_prix; } unsigned int getFinishedKarts() const { return m_num_finished_karts; } unsigned int getFinishedPlayers() const { return m_num_finished_players; } const std::string& getKartName(int kart) const { return m_kart_status[kart].m_ident;} const std::string& - getHerringStyle() const { return m_cup.getHerringStyle(); } + getHerringStyle() const { return m_grand_prix.getHerringStyle();} int getKartScore(int krt) const { return m_kart_status[krt].m_score;} int getKartPrevScore(int krt)const { return m_kart_status[krt].m_last_score;} int getkartPlayerId(int krt) const { return m_kart_status[krt].m_player_id;} diff --git a/src/world.cpp b/src/world.cpp index 7126de734..3634aec5a 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -724,7 +724,7 @@ void World::loadTrack() } catch(std::runtime_error) { - fprintf(stderr, "The cup '%s' contains an invalid herring style '%s'.\n", + fprintf(stderr, "The grand prix '%s' contains an invalid herring style '%s'.\n", race_manager->getGrandPrix()->getName().c_str(), race_manager->getHerringStyle().c_str()); fprintf(stderr, "Please fix the file '%s'.\n",