#include <cgame.h>
Inheritance diagram for CGame:


Public Member Functions | |
| void | run () |
| void | quit () |
| CFont * | get_font_large () |
| CFont * | get_font_small () |
Static Public Member Functions | |
| void | init (CSystemFactorySet *driver) |
| void | deinit () |
| CGame & | get_instance () |
Public Attributes | |
| std::list< ITickable * > | tickables |
| CFPSTimer | timer |
Protected Member Functions | |
| virtual void | do_draw (CSurface &surface, CRect &rect) |
| virtual void | add_dirty_rect (const CRect &r) |
Private Member Functions | |
| virtual int | do_handle_event (CEvent &event) |
Definition at line 88 of file cgame.h.
|
|
Add the given "dirty" rectangle to our list of rectangles to redraw. Reimplemented from CComponent. |
|
|
Static singleton deinitializer, to be called once at the end of program execution. |
|
||||||||||||
|
Draws a black background rectangle in the given rectangle, so that when there's a dirty rectangle on the screen that needs to be redrawn, it is first overwritten by the background.
Reimplemented from CComponent. Definition at line 37 of file cgame.cpp. References CSurface::fill_rect(). |
Here is the call graph for this function:

|
|
Template event handling method for the component. This is the method that does the event handling; the CComponent::handle_event() method mostly does some "housekeeping" tasks and then calls this method. Reimplemented from CComponent. Definition at line 59 of file cgame.cpp. References CScreen::get_fullscreen_mode(), CSingletonManager< CVideoSystem >::get_instance(), CEvent::get_key_ascii_value(), CVideoSystem::get_screen(), CEvent::get_type(), CEvent::is_ctrl_pressed(), quit(), CScreen::set_fullscreen_mode(), CEvent::TYPE_APPLICATION_EXIT, and CEvent::TYPE_KEY_DOWN. |
Here is the call graph for this function:

|
|
Return the large font.
|
|
|
Return the small font. See CGame::get_font_large() for more notes. |
|
|
Returns the singleton instance. |
|
|
Static singleton initializer, to be called once at the beginning of program execution. |
|
|
Tell the game to quit after it finishes drawing the current frame. |
|
|
Run the game. Definition at line 90 of file cgame.cpp. References CSingletonManager< CEventSystem >::get_instance(), CEventSystem::get_next_event(), CFPSTimer::get_time_passed(), CPanel::handle_event(), CFPSTimer::restart(), tickables, timer, and CFPSTimer::update(). |
Here is the call graph for this function:

|
|
The list of tickables that the game processes every frame.
|
|
|
The frames-per-second timer, as well as the game's general timer. |
1.3.3