|
From: Markus R. <god...@us...> - 2009-07-29 15:35:21
|
Module: performous
Branch: master
Commit: 54f381e4c47697c1f995b0656dcb5d0150bb3c4d
Author: Markus Raab <un...@ma...>
Date: Fri Jul 24 12:06:05 2009 +0200
Introduce PlayerItem
---
game/player.hh | 14 ++++++++++++++
game/players.hh | 2 +-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/game/player.hh b/game/player.hh
index a983e51..5d3e7eb 100644
--- a/game/player.hh
+++ b/game/player.hh
@@ -40,5 +40,19 @@ struct Player {
int getScore() const {
return 10000.0 * m_score;
}
+};
+
+/** Static Information of a player, not
+ dependent from current song.
+ Used for Players Management.
+ */
+struct PlayerItem
+{
+ std::string name; /// unique name, link to highscore
+/* Future ideas
+ std::string displayedName; /// artist name, short name, nick (can be changed)
+ std::string picture; /// a path to a picture shown
+ std::map<std::string, int> scores; /// map between a Song and the highest score the Player achieved
+*/
};
diff --git a/game/players.hh b/game/players.hh
index e400984..8d3187d 100644
--- a/game/players.hh
+++ b/game/players.hh
@@ -9,7 +9,7 @@
class Players
{
private:
- std::list<Player> m_players;
+ std::list<PlayerItem> m_players;
public:
void load();
void save();
|