19#ifndef HEADER_UNLOCK_MANAGER_HPP
20#define HEADER_UNLOCK_MANAGER_HPP
24#include "challenges/challenge_data.hpp"
25#include "challenges/story_mode_status.hpp"
27#include "utils/no_copy.hpp"
28#include "utils/ptr_vector.hpp"
44 typedef std::map<std::string, ChallengeData*> AllChallengesType;
45 AllChallengesType m_all_challenges;
48 AllChallengesType m_list_challenges;
50 void readAllChallengesInDirs(
const std::vector<std::string>* all_dirs);
67 std::vector<std::string>& tracks,
68 std::vector<std::string>& gps,
69 std::vector<std::string>& karts,
70 std::vector<const ChallengeData*>& unlocked);
the description of one challenge
Definition: challenge_data.hpp:35
The state of a challenge for one player.
Definition: challenge_status.hpp:53
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
The base class for sound effects.
Definition: sfx_base.hpp:43
This class contains the progression through challenges for the story mode.
Definition: story_mode_status.hpp:49
main class to handle locking/challenges
Definition: unlock_manager.hpp:40
~UnlockManager()
Saves the challenge status.
Definition: unlock_manager.cpp:86
void addChallenge(const std::string &filename)
Reads a challenge from the given filename.
Definition: unlock_manager.cpp:173
void findWhatWasUnlocked(int pointsBefore, int pointsNow, std::vector< std::string > &tracks, std::vector< std::string > &gps, std::vector< std::string > &karts, std::vector< const ChallengeData * > &unlocked)
This functions finds what new tracks, GP and karts have been unlocked.
Definition: unlock_manager.cpp:251
bool unlockSpecial(ChallengeStatus *unlock_list, int max_req_in_lower_diff)
This functions sets as completed the "challenges" requiring some special conditions Returns true if t...
Definition: unlock_manager.cpp:324
void addOrFreeChallenge(ChallengeData *c)
If a challenge is supported by this binary (i.e.
Definition: unlock_manager.cpp:143
void playLockSound() const
Eye- (or rather ear-) candy.
Definition: unlock_manager.cpp:231
void addListChallenge(ChallengeData *c)
Add a challenge to the unlock challenges list.
Definition: unlock_manager.cpp:163
bool unlockByPoints(int points, ChallengeStatus *unlock_list)
This functions sets as completed the "challenges" requiring a certain number of points,...
Definition: unlock_manager.cpp:310
bool isSupportedVersion(const ChallengeData &challenge)
Test if the given challenge is supported by this binary.
Definition: unlock_manager.cpp:240
const ChallengeData * getChallengeData(const std::string &id)
Returns the challenge data for a challenge id, or NULL if no such challenge exist.
Definition: unlock_manager.cpp:198
StoryModeStatus * createStoryModeStatus(const XMLNode *node=NULL)
Creates a game slot.
Definition: unlock_manager.cpp:211
utility class used to parse XML files
Definition: xml_node.hpp:48