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_ULTIMA1_GAME_H
23 #define ULTIMA_ULTIMA1_GAME_H
24 
25 #include "ultima/shared/early/game.h"
26 #include "ultima/shared/gfx/visual_container.h"
27 #include "ultima/ultima1/core/quests.h"
28 
29 namespace Ultima {
30 namespace Ultima1 {
31 
32 enum VideoMode {
33  VIDEOMODE_EGA = 0, VIDEOMODE_VGA = 1
34 };
35 
36 enum CharacterClass {
37  CLASS_FIGHTER = 0, CLASS_CLERIC = 1, CLASS_WIZARD = 2, CLASS_THIEF = 3
38 };
39 
40 class GameResources;
41 
42 class Ultima1Game : public Shared::Game {
43  DECLARE_MESSAGE_MAP;
44 public:
45  GameResources *_res;
46  Shared::Gfx::VisualItem *_gameView;
47  Shared::Gfx::VisualItem *_titleView;
48  Shared::Gfx::VisualItem *_charGenView;
49  uint _gems[4];
50  Quests _quests;
51 public:
52  CLASSDEF;
53  Ultima1Game();
54  ~Ultima1Game() override;
55 
59  void synchronize(Common::Serializer &s) override;
60 
64  bool isVGA() const override { return _videoMode == VIDEOMODE_VGA; }
65 
69  void starting(bool isLoading) override;
70 
74  bool canSaveGameStateCurrently() override;
75 
79  void giveTreasure(int coins, int v2);
80 };
81 
82 } // End of namespace Ultima1
83 } // End of namespace Ultima
84 
85 #endif
void synchronize(Common::Serializer &s) override
Definition: game.h:42
Definition: resources.h:32
Definition: visual_item.h:39
void starting(bool isLoading) override
Definition: serializer.h:79
Definition: detection.h:27
Definition: game.h:42
void giveTreasure(int coins, int v2)
bool canSaveGameStateCurrently() override
bool isVGA() const override
Definition: game.h:64
Definition: quests.h:87