ScummVM API documentation
globals.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 MM1_GLOBALS_H
23#define MM1_GLOBALS_H
24
25#include "common/serializer.h"
26#include "graphics/font.h"
27#include "mm/shared/utils/xeen_font.h"
28#include "mm/xeen/sprites.h"
29#include "mm/mm1/data/bestiary.h"
30#include "mm/mm1/data/game_state.h"
31#include "mm/mm1/data/items.h"
32#include "mm/mm1/data/monsters.h"
33#include "mm/mm1/data/roster.h"
34#include "mm/mm1/data/treasure.h"
35#include "mm/mm1/gfx/bitmap_font.h"
36#include "mm/mm1/gfx/symbols.h"
37#include "mm/mm1/game/combat.h"
38#include "mm/mm1/game/encounter.h"
39#include "mm/mm1/maps/maps.h"
40
41namespace MM {
42namespace MM1 {
43
44class Globals : public GameState {
45public:
46 Roster _roster;
47 Common::Array<Character *> _combatParty;
48 Character *_currCharacter = nullptr;
49 Item _currItem;
50 ItemsArray _items;
51 Maps::TownId _startingTown = Maps::SORPIGAL;
52 Maps::Maps _maps;
53 Gfx::BitmapFont _font;
54 bool _heardRumor = false;
55 Game::Encounter _encounters;
56 Game::Combat *_combat = nullptr;
57 Monsters *_monsters = nullptr;
58 BestiaryState _bestiary;
59 Treasure _treasure;
60 byte _delay = 5;
61 int _nonCombatEffectCtr = 0, _combatEffectCtr = 0;
62 bool _minimapOn = true;
63 Common::Array<SuggestedName> *_suggestedNames = nullptr;
64
65
66 // Console flags
67 bool _intangible = false;
68 bool _encountersOn = true;
69 bool _allSpells = false;
70
75
76public:
77 // Enhanced mode globals
79 Shared::Xeen::SpriteResource _confirmIcons;
80 Shared::Xeen::SpriteResource _globalSprites;
83 Graphics::ManagedSurface _blankButton;
84 Graphics::ManagedSurface _gameBackground;
85 Gfx::Symbols _symbols;
86 XeenFont _fontNormal;
87 XeenFont _fontReduced;
88public:
89 Globals();
90 virtual ~Globals();
91
95 bool load(bool isEnhanced);
96
101};
102
103extern Globals *g_globals;
104
105} // namespace MM1
106} // namespace MM
107
108#endif
Definition: array.h:52
Definition: serializer.h:80
Definition: managed_surface.h:51
Definition: bestiary.h:35
Definition: combat.h:36
Definition: encounter.h:41
Definition: bitmap_font.h:35
Definition: symbols.h:35
Definition: globals.h:44
bool load(bool isEnhanced)
void synchronize(Common::Serializer &s)
void createBlankButton()
Definition: maps.h:60
Definition: monsters.h:112
Definition: treasure.h:38
Definition: sprites.h:52
Definition: xeen_font.h:35
Definition: detection.h:27
Definition: character.h:432
Definition: game_state.h:40
Definition: items.h:98
Definition: items.h:107
Definition: roster.h:35