Mission Control Code for Interactive Alarm Clock
Dependencies: 4DGL-uLCD-SE mbed
Diff: city_landscape/city_landscape_public.h
- Revision:
- 0:02b0b24dedd1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/city_landscape/city_landscape_public.h Thu Dec 10 08:59:21 2015 +0000 @@ -0,0 +1,49 @@ +#ifndef CITY_LANDSCAPE_PUBLIC_H +#define CITY_LANDSCAPE_PUBLIC_H + +/// The enum define the status of a city +typedef enum { + EXIST=1, ///< The city will be shown on screen + DESTROYED=0 ///< The city won't be shown on screen +} CITY_STATUS; + +/// The structure to store the information of a city +typedef struct { + int x; ///< Bottom-left corner of the city. x coordinate on the screen. + int y; ///< Bottom-left corner of the city. y coordinate on the screen. + int width; ///< The width of the city. The shape of the city is an rectangle. + int height; ///< The height of the city + CITY_STATUS status; ///< See enum CITY_STATUS +} CITY; + +#define MAX_NUM_CITY 6 + +/** Call city_landscape_init() once at the begining of your code + @brief It initialize the city data structure and draw the cities. + @param num_city number of city to be draw. It must be less/equal to MAX_NUM_CITY. +*/ +void city_landscape_init(int num_city); + +/** Get the information of city + @param index The index in city_record. It must be smaller than MAX_NUM_CITY. + @return The structure of city information +*/ +CITY city_get_info(int index); + +/** Remove the city from its record and the screen + @param index The index in city_record. It must be smaller than MAX_NUM_CITY. +*/ +void city_destroy(int index); + +/** Draw all exist cities on the screen + @brief You might not need to use this function, but you could still use it if you want. +*/ +void draw_cities(void); + +/** Draw the landscape + @brief You might not need to use this function, but you could still use it if you want. +*/ +void draw_landscape(void); + + +#endif //CITY_LANDSCAPE_H \ No newline at end of file