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 ULTIMA8_GAMES_GAME_H
23#define ULTIMA8_GAMES_GAME_H
24
25#include "ultima/ultima8/games/game_info.h"
26#include "ultima/ultima8/misc/common_types.h"
27#include "ultima/ultima8/usecode/intrinsics.h"
28
29namespace Ultima {
30namespace Ultima8 {
31
32class Game {
33public:
34 Game();
35 virtual ~Game();
36
37 static Game *get_instance() {
38 return _game;
39 }
40
42 virtual bool loadFiles() = 0;
43
45 virtual bool startGame() = 0;
46
48 virtual bool startInitialUsecode(int saveSlot = -1) = 0;
49
51 virtual void writeSaveInfo(Common::WriteStream *ws) = 0;
52
53 virtual ProcId playIntroMovie(bool fade) = 0;
54 virtual ProcId playEndgameMovie(bool fade) = 0;
55 virtual void playCredits() = 0;
56 virtual void playQuotes() = 0;
57 virtual void playDemoScreen() = 0;
58
59 static Game *createGame(const GameInfo *info);
60
61 INTRINSIC(I_playEndgame);
62 INTRINSIC(I_playCredits);
63 INTRINSIC(I_playDemoScreen);
64
65protected:
66 static Game *_game;
67};
68
69} // End of namespace Ultima8
70} // End of namespace Ultima
71
72#endif
Definition: stream.h:77
Definition: game.h:32
virtual bool loadFiles()=0
load/init game's data files
virtual void writeSaveInfo(Common::WriteStream *ws)=0
write game-specific savegame info (avatar stats, equipment, ...)
virtual bool startInitialUsecode(int saveSlot=-1)=0
start initial usecode
virtual bool startGame()=0
initialize new game
GameInfo contains detailed information about the game.
Definition: game_info.h:38