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