quick and dirty editor works for now

This commit is contained in:
2011-01-02 18:25:20 +01:00
parent 88b622928e
commit 965c4d9269
19 changed files with 360 additions and 42 deletions
+10
View File
@@ -23,6 +23,7 @@ class Model : public Engine::ModelBase {
/* Level loading etc. */
int DoLoadLevel (const char* filename);
int DoSaveLevel (const char* filename);
void ResetLevel ();
void ReloadLevel();
void ProceedToNextLevel ();
@@ -34,6 +35,12 @@ class Model : public Engine::ModelBase {
mPlayerName = name;
};
std::string GetLevelName() { return mLevelName; };
void SetLevelName(const std::string &name) {
Engine::LogMessage("new level name: %s", name.c_str());
mLevelName = name;
}
/* Highscore */
struct HighscoreEntry {
HighscoreEntry(): name ("unknown"), points (0) { };
@@ -74,12 +81,15 @@ class Model : public Engine::ModelBase {
int mPlayerLives;
unsigned int mPoints;
unsigned int mCurrentLevelIndex;
std::string mPlayerName;
std::vector<std::string> mLevelList;
std::string mLevelName;
virtual bool OnReceiveEvent (const Engine::EventBasePtr &event);
friend class View;
friend class Controller;
};
}