ScummVM API documentation
m_scores.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef QDENGINE_MINIGAMES_ADV_M_SCORES_H
23 #define QDENGINE_MINIGAMES_ADV_M_SCORES_H
24 
25 #include "qdengine/minigames/adv/MinigameInterface.h"
26 #include "qdengine/minigames/adv/RunTime.h"
27 
28 namespace QDEngine {
29 
30 class Scores : public MinigameInterface {
31 public:
32  Scores(MinigameManager *runtime);
33  ~Scores();
34 
35  void quant(float dt);
36 
37 private:
38  struct GameData {
39  GameData(int gameNum, const MinigameData& inf) : num(gameNum), info(inf) {}
40  int num;
41  MinigameData info;
42  bool operator< (const GameData& rsh) const {
43  return info._sequenceIndex < rsh.info._sequenceIndex;
44  }
45  };
47  struct Level {
48  Level(int lvl = 0) : level(lvl) {}
49  int level;
50  Indexes games;
51  GameDatas data;
52  bool operator< (const Level& rsh) const {
53  return level < rsh.level;
54  }
55  };
56  typedef Std::vector<Level> Levels;
57  Levels levels_;
58 
59  const char *_currentLevel;
60  const char *_bestScore;
61  const char *_bestTime;
62  const char *_lastScore;
63  const char *_lastTime;
64 
65  QDObject _prev;
66  QDObject _next;
67  QDObject _outMaxLevel;
68 
69  QDObjects _games;
70 
71  int _preLevel;
72  int _level;
73 
74  Coords _positions;
75 
76  const char *getName(const char *begin, int idx) const;
77 
78  MinigameManager *_runtime;
79 };
80 
81 } // namespace QDEngine
82 
83 #endif // QDENGINE_MINIGAMES_ADV_M_SCORES_H
Definition: m_scores.h:30
Definition: common.h:34
Definition: MinigameInterface.h:27
Definition: RunTime.h:53
Definition: RunTime.h:94
Базовый класс для игровых ресурсов.
Definition: console.h:28