Context for the memory game application. More...

Data Fields | |
| struct win_window * | win |
| Pointer to the application's main window. | |
| struct gfx_bitmap | bitmap |
| Bitmap metadata for application window background. | |
| struct workqueue_task * | task |
| 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_label * | tries_label |
| Label widget for displaying number of tries. | |
| bool | busy |
| Flag indicating that the application is busy loading images. | |
Context for the memory game application.
Definition at line 249 of file app_memgame.c.
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().
| struct font memgame_context::old_sysfont |
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().
| struct workqueue_task* memgame_context::task |
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().
| struct timer memgame_context::timer |
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().
| struct win_window* memgame_context::win |
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().
1.6.3