ECE2035 class project
Dependencies: 4DGL-uLCD-SE SDFileSystem mbed wave_player
Fork of missile_command by
Diff: city_landscape/city_landscape.cpp
- Revision:
- 2:d39a6a36e0c0
- Parent:
- 1:3da29f1d84b4
--- a/city_landscape/city_landscape.cpp Wed Oct 29 02:58:53 2014 +0000 +++ b/city_landscape/city_landscape.cpp Mon Nov 17 13:15:34 2014 +0000 @@ -21,9 +21,11 @@ */ #include "city_landscape_private.h" +#include "globals.h" +// +//CITY city_record[]; +int building_height[NUM_BUILDING]; -CITY city_record[MAX_NUM_CITY]; -int building_height[NUM_BUILDING]; // See the comments in city_landscape_public.h void city_landscape_init(int num_city) { @@ -112,6 +114,17 @@ } } +int is_any_left() { + int i, left = 0; + for (i = 0; i < MAX_NUM_CITY; i++) { + if (city_record[i].status == EXIST) { + left = 1; + break; + } + } + return left; +} + void draw_landscape(void){ uLCD.filled_rectangle(0, SIZE_Y-1, SIZE_X-1, REVERSE_Y(LANDSCAPE_HEIGHT), LANDSCAPE_COLOR); } \ No newline at end of file