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 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
33namespace Ultima {
34namespace Ultima4 {
35
36class Map;
37struct Portal;
38class Creature;
39class Location;
40class MoveEvent;
41class Party;
42class PartyEvent;
43class PartyMember;
44
45typedef 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
60void gameSetViewMode(ViewMode newMode);
61void gameUpdateScreen();
62
63/* spell functions */
64void gameSpellEffect(int spell, int player, Sound sound);
65
66/* action functions */
70bool gamePeerCity(int city, void *data);
71
75void peer(bool useGem = true);
76bool fireAt(const Coords &coords, bool originAvatar);
77Direction gameGetDirection();
78uint32 gameTimeSinceLastCommand();
79
80/* checking functions */
85void gameCheckHullIntegrity();
86
87/* creature functions */
91bool creatureRangeAttack(const Coords &coords, Creature *m);
92void gameCreatureCleanup();
93
98bool gameSpawnCreature(const class Creature *m);
99
104void gameFixupObjects(Map *map);
105
109void gameDestroyAllCreatures();
110
114void gameCreatureAttack(Creature *obj);
115
116/* etc */
117Common::String gameGetInput(int maxlen = 32);
118int gameGetPlayer(bool canBeDisabled, bool canBeActivePlayer);
119void gameGetPlayerForCommand(bool (*commandFn)(int player), bool canBeDisabled, bool canBeActivePlayer);
120
127void gameDamageParty(int minDamage, int maxDamage);
128
134void gameDamageShip(int minDamage, int maxDamage);
135
139void gameSetActivePlayer(int player);
140
148Common::Array<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: array.h:52
Definition: str.h:59