ECE2035 class project
Dependencies: 4DGL-uLCD-SE SDFileSystem mbed wave_player
Fork of missile_command by
Revision 1:3da29f1d84b4, committed 2014-10-29
- Comitter:
- arvahsu
- Date:
- Wed Oct 29 02:58:53 2014 +0000
- Parent:
- 0:532cb55d6136
- Child:
- 2:d39a6a36e0c0
- Commit message:
- fix typo
Changed in this revision
--- a/city_landscape/city_landscape.cpp Wed Oct 29 01:21:34 2014 +0000
+++ b/city_landscape/city_landscape.cpp Wed Oct 29 02:58:53 2014 +0000
@@ -44,7 +44,7 @@
city_record[i].status = EXIST;
}
else{
- city_record[i].status = DESTORIED;
+ city_record[i].status = DESTROYED;
}
}
@@ -67,7 +67,7 @@
return city_record[index];
}
-void city_destory(int index){
+void city_destroy(int index){
int j;
int city_x, city_y, building_x, building_y;
int height;
@@ -76,7 +76,7 @@
ASSERT_P(index<MAX_NUM_CITY,ERROR_CITY_INDEX_DESTROY);
// remove the record
- city_record[index].status = DESTORIED;
+ city_record[index].status = DESTROYED;
// use the background color to cover the city
city_x = city_record[index].x;
--- a/city_landscape/city_landscape_public.h Wed Oct 29 01:21:34 2014 +0000
+++ b/city_landscape/city_landscape_public.h Wed Oct 29 02:58:53 2014 +0000
@@ -26,7 +26,7 @@
/// The enum define the status of a city
typedef enum {
EXIST=1, ///< The city will be shown on screen
- DESTORIED=0 ///< The city won't 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
@@ -55,7 +55,7 @@
/** 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_destory(int index);
+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.
--- a/globals.h Wed Oct 29 01:21:34 2014 +0000 +++ b/globals.h Wed Oct 29 02:58:53 2014 +0000 @@ -50,7 +50,7 @@ // other missile error code ... #define ERROR_CITY_NUMBER -11 // num_city in city_landscape_init() is larger than MAX_NUM_CITY #define ERROR_CITY_INDEX_GET_INFO -12 // make sure your code give the valid index for city_get_info() -#define ERROR_CITY_INDEX_DESTROY -13 // make sure your code give the valid index for city_destory() +#define ERROR_CITY_INDEX_DESTROY -13 // make sure your code give the valid index for city_destroy() // other player-missile error code ... #endif //GLOBAL_H \ No newline at end of file
--- a/main.cpp Wed Oct 29 01:21:34 2014 +0000
+++ b/main.cpp Wed Oct 29 02:58:53 2014 +0000
@@ -103,7 +103,7 @@
/// 7.Implement the code to detect the collision between missiles and cities
/// -[Hint] You could use city_get_info() and missile_get_info() <br>
/// -[Hint] You could use missile_set_exploded() to notify the missile module that the missile was exploded. <br>
- /// -[Hint] You need to check which city was hit by the missile, and call city_destory() to destroy it. <br>
+ /// -[Hint] You need to check which city was hit by the missile, and call city_destroy() to destroy it. <br>
/// -[Hint] You might also check whether the missile hit the land <br>
/// 8.Implement the code to detect a collision between player-missiles and incoming missiles
