memgame_context Struct Reference
[Memory game application]

Context for the memory game application. More...

Collaboration diagram for memgame_context:
Collaboration graph
[legend]

Data Fields

struct win_windowwin
 Pointer to the application's main window.
struct gfx_bitmap bitmap
 Bitmap metadata for application window background.
struct workqueue_tasktask
 Pointer to workqueue task for the application.
struct font old_sysfont
 Backup copy of sysfont, to restore upon application exit.
struct timer timer
 Timer struct needed for the timer driver.
uint16_t timer_delay
 Timer delay needed to detect elapsed half-seconds.
uint8_t ticks_to_go
 Application timer countdown.
struct memgame_piece pieces [NR_OF_PIECES]
 Data for all the game pieces.
enum memgame_state state
 Current state of the game.
uint8_t piece_1
 Index and position of first selected piece.
uint8_t piece_2
 Index and position of second selected piece.
uint8_t pairs_left
 Number of piece pairs left before game over.
uint8_t tries
 Number of tries the user has had.
struct wtk_labeltries_label
 Label widget for displaying number of tries.
bool busy
 Flag indicating that the application is busy loading images.

Detailed Description

Context for the memory game application.

Note:
The index of a piece in pieces and its position on the game board are equivalent.

Definition at line 249 of file app_memgame.c.


Field Documentation

Bitmap metadata for application window background.

Definition at line 253 of file app_memgame.c.

Referenced by app_memgame_launch().

Flag indicating that the application is busy loading images.

Definition at line 279 of file app_memgame.c.

Referenced by memgame_start_new_game(), memgame_update(), and memgame_window_handler().

Backup copy of sysfont, to restore upon application exit.

Definition at line 257 of file app_memgame.c.

Referenced by app_memgame_launch(), memgame_draw_piece(), and memgame_handle_command_event().

Number of piece pairs left before game over.

Definition at line 273 of file app_memgame.c.

Referenced by memgame_start_new_game(), and memgame_update().

Index and position of first selected piece.

Definition at line 269 of file app_memgame.c.

Referenced by memgame_start_new_game(), and memgame_update().

Index and position of second selected piece.

Definition at line 271 of file app_memgame.c.

Referenced by memgame_update().

struct memgame_piece memgame_context::pieces[NR_OF_PIECES]

Data for all the game pieces.

Definition at line 265 of file app_memgame.c.

Referenced by memgame_draw_piece(), memgame_start_new_game(), and memgame_update().

Current state of the game.

Definition at line 267 of file app_memgame.c.

Referenced by memgame_start_new_game(), and memgame_update().

Pointer to workqueue task for the application.

Definition at line 255 of file app_memgame.c.

Referenced by app_memgame_launch(), memgame_draw_piece(), memgame_start_new_game(), and memgame_timer_callback().

Application timer countdown.

Definition at line 263 of file app_memgame.c.

Referenced by memgame_timer_callback(), and memgame_update().

Timer struct needed for the timer driver.

Definition at line 259 of file app_memgame.c.

Referenced by app_memgame_launch(), memgame_timer_callback(), and memgame_update().

Timer delay needed to detect elapsed half-seconds.

Definition at line 261 of file app_memgame.c.

Referenced by app_memgame_launch(), memgame_timer_callback(), and memgame_update().

Number of tries the user has had.

Definition at line 275 of file app_memgame.c.

Referenced by memgame_print_tries(), memgame_start_new_game(), and memgame_update().

Label widget for displaying number of tries.

Definition at line 277 of file app_memgame.c.

Referenced by app_memgame_launch(), and memgame_print_tries().

Pointer to the application's main window.

Definition at line 251 of file app_memgame.c.

Referenced by app_memgame_launch(), memgame_draw_piece(), memgame_handle_command_event(), and memgame_start_new_game().


The documentation for this struct was generated from the following file:
Generated on Thu Apr 29 14:10:02 2010 for display-demo by  doxygen 1.6.3