74 if (!python::module)
return false;
94 int main(
int argc,
char * argv[])
105 #if !defined (SINGLE_DIR_INST) 112 do if (*str ==
'\\') *str =
'/';
115 str = strrchr (argv[0],
'/');
120 myconfig.
gamedir = string (argv[0]) +
"/games/wastesedge";
127 getcwd (buf,
sizeof (buf));
130 do if (*str ==
'\\') *str =
'/';
159 audio::init (&myconfig);
170 data::the_player = NULL;
204 if (data::the_player)
205 delete data::the_player;
bool read_adonthellrc()
Reads the configuration file.
Declares the event_handler class.
static bool exec_file(string filename)
Executes a Python script.
PyObject * globals
Global namespace to use in scripts.
static void cleanup()
Cleanup the saved game array.
static void init()
Instanciate the actual event handlers.
string gamedir
Path of the directory that contains the game running at present.
Declares the screen class.
static bool init(string udir, string gdir, string gname, u_int8 qload)
Initialise the saved games array.
Declares the gametime class.
static string info()
Returns information about the current screen settings, suitable for being displayed to the user...
National Language Support.
void init_adonthell(void)
SWIG init prototype.
static void init(const string &font)
Empty for now.
static void init(config &myconfig)
Initialize national language support.
static void init(string game_dir)
Initialise the game framework.
static string global_data_dir()
Returns the absolute path to the global data directory.
Declares the gamedata and data classes.
static PyObject * import_module(string filename)
Imports a Python module.
static string game_data_dir()
Returns the absolute path to the current game's directory (if any).
u_int8 quick_load
Whether the quick-load feature is enabled (1) or not (0)
static void cleanup()
Delete the event handlers.
int main(int argc, char *argv[])
Game's main function.
Defines the python class. This file is named this way so it doesn't conflicts with Python...
u_int8 audio_volume
The volume: a value betwen 0 and 100.
void parse_arguments(int argc, char *argv[])
See whether any options have been specified on the command line.
static void cleanup()
Delete all themes and fonts currently loaded.
static void insert_path(char *name)
Adds a directory to Python's include path.
string game_name
Name of the game that is running at present.
static void set_game_data_dir(string game_dir)
Specify an additional data directory containing game data.
Declares the win_manager class.
static void init(u_int16 rt_minutes)
Initialize the gametime class.
static string user_data_dir()
Returns the absolute path to the user data directory (usually ~/.adonthell).
static void set_video_mode(u_int16 nl, u_int16 nh, u_int8 depth=0, bool dbl=false, bool fscreen=false)
Sets the video mode.
This class contains the engine's configuration read either from the config file or from the command l...
This is the heart of the Adonthell engine.
static void cleanup()
Cleanup Python.
u_int8 screen_mode
Whether the engine shall run in window (0) or fullscreen (1) mode.
static void init()
Initialise Python and insert the Adonthell include paths.