ScummVM API documentation
engine.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 AGS_ENGINE_MAIN_ENGINE_H
23#define AGS_ENGINE_MAIN_ENGINE_H
24
25#include "ags/shared/util/ini_util.h"
26
27namespace AGS3 {
28
29const char *get_engine_name();
30const char *get_engine_version();
31AGS::Shared::String get_engine_version_and_build();
32
33void show_preload();
34void engine_init_game_settings();
35int initialize_engine(const AGS::Shared::ConfigTree &startup_opts);
36
37struct DisplayModeSetup;
38// Try to set new graphics mode deduced from given configuration;
39// if requested mode fails, tries to find any compatible mode close to the
40// requested one.
41bool engine_try_set_gfxmode_any(const DisplayModeSetup &setup);
42// Tries to switch between fullscreen and windowed mode; uses previously saved
43// setup if it is available, or default settings for the new mode
44bool engine_try_switch_windowed_gfxmode();
45// Update graphic renderer and render frame when window size changes
46void engine_on_window_changed(const Size &sz);
47// Shutdown graphics mode (used before shutting down tha application)
48void engine_shutdown_gfxmode();
49
50using AGS::Shared::String;
51// Defines a package file location
53 String Name; // filename, for the reference or to use as an ID
54 String Path; // full path
55};
56// Game resource paths
57// TODO: the asset path configuration should certainly be revamped at some
58// point, with uniform method of configuring auxiliary paths and packages.
60 PackLocation GamePak; // main game package
61 PackLocation AudioPak; // audio package
62 PackLocation SpeechPak; // voice-over package
63 String DataDir; // path to the data directory
64 bool VoiceAvail = false; // tells whether voice files available in either location
65 // NOTE: optional directories are currently only for compatibility with Editor (game test runs)
66 // This is bit ugly, but remain so until more flexible configuration is designed
67 String DataDir2; // optional data directory
68 String AudioDir2; // optional audio directory
69 String VoiceDir2; // optional voice-over directory (base)
70 String VoiceDirSub;// full voice-over directory with optional sub-dir
71};
72
73// (Re-)Assign all known asset search paths to the AssetManager
74void engine_assign_assetpaths();
75
76// Register a callback that will be called before engine is initialised.
77// Used for apps to register their own plugins and other configuration
78typedef void (*t_engine_pre_init_callback)(void);
79extern void engine_set_pre_init_callback(t_engine_pre_init_callback callback);
80
81} // namespace AGS3
82
83#endif
Definition: string.h:60
Definition: engine.h:52
Definition: engine.h:59