ScummVM API documentation
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 BLADERUNNER_SCORES_H
23 #define BLADERUNNER_SCORES_H
24 
25 #include "common/array.h"
26 
27 namespace Common {
28 struct KeyState;
29 struct Event;
30 }
31 
32 namespace BladeRunner {
33 
34 class BladeRunnerEngine;
35 class Font;
36 class Shape;
37 class SaveFileReadStream;
38 class SaveFileWriteStream;
39 class TextResource;
40 class VQAPlayer;
41 class UIImagePicker;
42 
43 class Scores {
44  BladeRunnerEngine *_vm;
45  bool _isOpen;
46  bool _isLoaded;
47  VQAPlayer *_vqaPlayer;
48  int _scores[7];
49  int _scorers[7];
50 
51  int _lastScoreId;
52  int _lastScoreValue;
53 
54  Font *_font;
55  TextResource *_txtScorers;
56 
57 public:
59  ~Scores();
60 
61  void open();
62  bool isOpen() const;
63  void close();
64 
65  int query(int index) { return _scores[index]; }
66  void set(int index, int value);
67 
68  void handleCustomEventStart(const Common::Event &evt);
69  void handleKeyDown(const Common::KeyState &kbd);
70  int handleMouseUp(int x, int y);
71  int handleMouseDown(int x, int y);
72 
73  void tick();
74  void fill();
75 
76  void reset();
77  void save(SaveFileWriteStream &f);
78  void load(SaveFileReadStream &f);
79 };
80 
81 } // End of namespace BladeRunner
82 
83 #endif
Definition: savefile.h:88
Definition: actor.h:31
Definition: savefile.h:113
Definition: scores.h:43
Definition: vqa_player.h:45
Definition: events.h:198
Definition: algorithm.h:29
signed char * fill(signed char *first, signed char *last, Value val)
Definition: algorithm.h:111
Definition: text_resource.h:32
Definition: keyboard.h:294
Definition: bladerunner.h:113
Definition: font.h:38