ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 ULTIMA4_GAME_GAME_H
23 #define ULTIMA4_GAME_GAME_H
24 
25 #include "ultima/ultima4/events/event_handler.h"
26 #include "ultima/ultima4/controllers/game_controller.h"
27 #include "ultima/ultima4/core/observer.h"
28 #include "ultima/ultima4/core/types.h"
29 #include "ultima/ultima4/map/map.h"
30 #include "ultima/ultima4/views/tileview.h"
31 #include "ultima/ultima4/sound/sound.h"
32 
33 namespace Ultima {
34 namespace Ultima4 {
35 
36 class Map;
37 struct Portal;
38 class Creature;
39 class Location;
40 class MoveEvent;
41 class Party;
42 class PartyEvent;
43 class PartyMember;
44 
45 typedef enum {
46  VIEW_NORMAL,
47  VIEW_GEM,
48  VIEW_RUNE,
49  VIEW_DUNGEON,
50  VIEW_DEAD,
51  VIEW_CODEX,
52  VIEW_MIXTURES
53 } ViewMode;
54 
55 /* map and screen functions */
56 
60 void gameSetViewMode(ViewMode newMode);
61 void gameUpdateScreen();
62 
63 /* spell functions */
64 void gameSpellEffect(int spell, int player, Sound sound);
65 
66 /* action functions */
70 bool gamePeerCity(int city, void *data);
71 
75 void peer(bool useGem = true);
76 bool fireAt(const Coords &coords, bool originAvatar);
77 Direction gameGetDirection();
78 uint32 gameTimeSinceLastCommand();
79 
80 /* checking functions */
85 void gameCheckHullIntegrity();
86 
87 /* creature functions */
91 bool creatureRangeAttack(const Coords &coords, Creature *m);
92 void gameCreatureCleanup();
93 
98 bool gameSpawnCreature(const class Creature *m);
99 
104 void gameFixupObjects(Map *map);
105 
109 void gameDestroyAllCreatures();
110 
114 void gameCreatureAttack(Creature *obj);
115 
116 /* etc */
117 Common::String gameGetInput(int maxlen = 32);
118 int gameGetPlayer(bool canBeDisabled, bool canBeActivePlayer);
119 void gameGetPlayerForCommand(bool (*commandFn)(int player), bool canBeDisabled, bool canBeActivePlayer);
120 
127 void gameDamageParty(int minDamage, int maxDamage);
128 
134 void gameDamageShip(int minDamage, int maxDamage);
135 
139 void gameSetActivePlayer(int player);
140 
148 Std::vector<Coords> gameGetDirectionalActionPath(int dirmask, int validDirections, const Coords &origin, int minDistance, int maxDistance, bool (*blockedPredicate)(const Tile *tile), bool includeBlocked);
149 
150 } // End of namespace Ultima4
151 } // End of namespace Ultima
152 
153 #endif
Definition: vector.h:39
Definition: str.h:59
Definition: detection.h:27