42 control_active_ =
false;
65 while (letsexit ==
false)
89 if (audio::is_background_finished ()) audio::run_schedule ();
179 view.mapview::attach_map (&lmap);
182 view.mapview::get_state (file);
203 view.mapview::put_state (file);
213 view.mapview::attach_map (&lmap);
224 view.mapview::detach_map ();
static bool get_state(igzstream &in)
Load the state of the gamedate class from disk.
void main(win_base *wnd=NULL, const string name="")
Starts the main loop.
Class to write data from a Gzip compressed file.
void fade_in()
Fades in from a black screen.
Class to read data from a Gzip compressed file.
void fade_out()
Fades the screen to black.
void update()
Update the state of all top level windows.
static win_manager * active
Pointer to the active, i.e.
void set_visible(const bool b)
Set the visible parameter.
static void show()
Ensure the framebuffer is copied to the physical screen.
s_int8 put_state(ogzstream &file) const
Saves the landmap's state into an opened file.
Declares the gametime class.
static u_int16 length()
Returns the length of the screen.
s_int8 put(ogzstream &file) const
Put a map into an opened file.
static void update()
Call this after each run of the main loop to sync the game's speed to the machine it is running on...
void main_quit()
Quit the main loop.
bool create_instance(string file, string classname, PyObject *args=NULL)
Creates an instance of a Python class.
Declares the adonthell class.
The window manager takes care of basic GUI functions, such as input focus, window state updates and d...
void remove(win_base *wnd)
Remove a window from the window manager.
static u_int8 frames_to_skip()
Returns the number of updates to perform before drawing the next frame.
static void clear()
Totally clears the screen with black.
void run(PyObject *args=NULL)
Calls the run () method of this object.
void update()
Update the entire map (mapcharacters, mapobjects, etc...
s_int8 get(igzstream &file)
Load a map from an opened file.
adonthell()
Standard constructor.
s_int8 get_state(igzstream &file)
Restore the engine's state.
void set_focus(win_base *wnd)
Gives the input focus to wnd.
void set_control_active(bool c)
Set whether the control script should be executed or not.
Declares the gamedate class.
#define s_int16
16 bits long signed integer
void draw()
Draws all windows.
string filename() const
Get the filename of the map, i.e the file from which it has been loaded (if any). ...
void main_loop()
The actual main loop.
void set_update_map(bool u)
static void transition(u_int16 i)
Make a nice transition effect.
static void put_state(ogzstream &out)
Save the state of the gamedate class to disk.
static void update()
Update the game date.
Declares the win_manager class.
void add(win_base *wnd)
Add a window to the window manager.
s_int8 put_state(ogzstream &file)
Save the engine's state.
s_int8 get_state(igzstream &file)
Restore the landmap's state from an opened file.
Common properties for each win_base's object.
#define s_int8
8 bits long signed integer
void input_update()
Checks for user input.
This is the heart of the Adonthell engine.
adonthell * engine
Engine used during the game.
static u_int16 height()
Returns the height of the screen.
bool control_active()
Returns whether the control script is active or not.