Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE mbed wave_player
Fork of PacMan_Skeleton_unlock by
pacman.h File Reference
Go to the source code of this file.
Data Structures | |
| struct | PLAYER |
| This struct contains the status of a pacman. More... | |
Enumerations | |
| enum | PACMAN_STATUS |
The enum defines the status of a pacman. More... | |
| enum | PACMAN_MOTION |
The enum defines the motion of a pacman. More... | |
Functions | |
| int | pacman_get_x (void) |
| Resets the score for pacman. | |
| void | pacman_init (int grid_x, int grid_y) |
| Initialize a pacman with given position. | |
| void | pacman_draw (void) |
| Draw the pacman on the screen with different mouse direction base on current motion. | |
| void | pacman_set_action (PACMAN_MOTION motion) |
| Set the pacman's motion according to the input mostion. | |
Detailed Description
Definition in file pacman.h.
Enumeration Type Documentation
| enum PACMAN_MOTION |
| enum PACMAN_STATUS |
Function Documentation
| void pacman_draw | ( | void | ) |
Draw the pacman on the screen with different mouse direction base on current motion.
Definition at line 62 of file pacman.cpp.
| int pacman_get_x | ( | void | ) |
Resets the score for pacman.
Definition at line 36 of file pacman.cpp.
| void pacman_init | ( | int | grid_x, |
| int | grid_y | ||
| ) |
Initialize a pacman with given position.
The default mostion is PACMAN_HEADING_RIGHT and status is PACMAN_WAIT_COMMAND.
- Parameters:
-
blk_x The horizontal position in the grid. blk_y The vertical position in the grid.
Definition at line 49 of file pacman.cpp.
| void pacman_set_action | ( | PACMAN_MOTION | motion ) |
Set the pacman's motion according to the input mostion.
- Parameters:
-
motion The desired pacman motion.
Definition at line 96 of file pacman.cpp.
Generated on Thu Aug 4 2022 06:03:35 by
1.7.2
