ScummVM API documentation
game.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 ULTIMA_SHARED_EARLY_GAME_H
23 #define ULTIMA_SHARED_EARLY_GAME_H
24 
25 #include "ultima/shared/early/game_base.h"
26 #include "ultima/shared/core/party.h"
27 
28 namespace Ultima {
29 namespace Shared {
30 
31 class GameView;
32 class GameState;
33 class FontResources;
34 
35 namespace Maps {
36 class Map;
37 }
38 
42 class Game : public GameBase {
43  DECLARE_MESSAGE_MAP;
44  bool EndOfTurnMsg(CEndOfTurnMsg *msg);
45 protected:
46  GameView *_gameView;
47  FontResources *_fontResources;
48 protected:
52  void setEGAPalette();
53 
57  void loadU6Palette();
58 public:
59  byte _edgeColor;
60  byte _borderColor;
61  byte _highlightColor;
62  byte _textColor;
63  byte _color1;
64  byte _bgColor;
65  byte _whiteColor;
66 
71 
76 
80  uint32 _randomSeed;
81 
82 public:
83  CLASSDEF;
84 
88  Game();
89 
93  ~Game() override;
94 
98  void playFX(uint effectId);
99 
103  void setEGAPalette(const byte *palette);
104 
108  void setCGAPalette();
109 
113  Maps::Map *getMap() const override { return _map; }
114 
118  void synchronize(Common::Serializer &s) override;
119 
123  void endOfTurn();
124 };
125 
126 } // End of namespace Shared
127 } // End of namespace Ultima
128 
129 #endif
Definition: map.h:46
Maps::Map * getMap() const override
Definition: game.h:113
Party * _party
Definition: game.h:70
Definition: game.h:42
Maps::Map * _map
Definition: game.h:75
Definition: serializer.h:79
Definition: detection.h:27
Definition: messages.h:402
Definition: game_base.h:53
uint32 _randomSeed
Definition: game.h:80
Definition: font_resources.h:32
Definition: party.h:36