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