ECE 2035 Summer 2015
Dependencies: 4DGL-uLCD-SE MMA8452 SDFileSystem mbed wave_player
Fork of ECE2035_FroggerGame_SUM1025 by
Revision 6:5ed435a31cc7, committed 2015-07-05
- Comitter:
- ece2035ta
- Date:
- Sun Jul 05 21:58:24 2015 +0000
- Parent:
- 5:52a01054e275
- Child:
- 7:b9b305de0fbb
- Commit message:
- ECE 2035 Summer 2015
Changed in this revision
--- a/globals.h Sun Jul 05 21:52:08 2015 +0000 +++ b/globals.h Sun Jul 05 21:58:24 2015 +0000 @@ -1,4 +1,4 @@ -/* Gatech ECE2035 2015 SPRING PAC MAN +/*Gatech ECE2035 2015 SUMMER ROBOFROGGER * Copyright (c) 2015 Gatech ECE2035 * * Permission is hereby granted, free of charge, to any person obtaining a copy
--- a/map/map.cpp Sun Jul 05 21:52:08 2015 +0000 +++ b/map/map.cpp Sun Jul 05 21:58:24 2015 +0000 @@ -1,4 +1,4 @@ -/* Gatech ECE2035 2015 SPRING PAC MAN +/* Gatech ECE2035 2015 SUMMER ROBOFROGGER * Copyright (c) 2015 Gatech ECE2035 * * Permission is hereby granted, free of charge, to any person obtaining a copy
--- a/map/map_private.h Sun Jul 05 21:52:08 2015 +0000 +++ b/map/map_private.h Sun Jul 05 21:58:24 2015 +0000 @@ -1,4 +1,4 @@ -/* Gatech ECE2035 2015 SPRING PAC MAN +/*Gatech ECE2035 2015 SUMMER ROBOFROGGER * Copyright (c) 2015 Gatech ECE2035 * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -44,14 +44,14 @@ // It defines the values used in the DEFAULT_MAP -#define MAP_ATTRIBUTE_SIDE_WALK 0 //side walk +#define MAP_ATTRIBUTE_SIDE_WALK 0 //side walk #define MAP_ATTRIBUTE_CANDY 1 //candy -#define MAP_ATTRIBUTE_BIG_CANDY 2 //big candy -#define MAP_ATTRIBUTE_ROAD_L 3 -#define MAP_ATTRIBUTE_ROAD 4 -#define MAP_ATTRIBUTE_ROAD_R 5 -#define MAP_ATTRIBUTE_V_LINE 6 -#define MAP_ATTRIBUTE_SIDE_WALK_2 7 +#define MAP_ATTRIBUTE_BIG_CANDY 2 //big candy +#define MAP_ATTRIBUTE_ROAD_L 3 //left side of the road +#define MAP_ATTRIBUTE_ROAD 4 //middle of the road +#define MAP_ATTRIBUTE_ROAD_R 5 //right side of the road +#define MAP_ATTRIBUTE_V_LINE 6 //finish line +#define MAP_ATTRIBUTE_SIDE_WALK_2 7 #define DEFAULT_MAP {\
--- a/map/map_public.h Sun Jul 05 21:52:08 2015 +0000 +++ b/map/map_public.h Sun Jul 05 21:58:24 2015 +0000 @@ -1,4 +1,4 @@ -/* Gatech ECE2035 2015 SPRING PAC MAN +/*Gatech ECE2035 2015 SUMMER ROBOFROGGER * Copyright (c) 2015 Gatech ECE2035 * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -26,11 +26,11 @@ /// The enum define the status of a grid on the map typedef enum { GRID_SIDE_WALK=0, //Side_walk - GRID_CANDY, ///< A candy + GRID_CANDY, ///A candy GRID_BIG_CANDY, // Bigger candy! GRID_ROAD_L, //Road left - GRID_ROAD, - GRID_ROAD_R, + GRID_ROAD, //Middle of the road + GRID_ROAD_R, //Road right GRID_V_LINE, //V_line GRID_SIDE_WALK_2, } GRID_STATUS; @@ -47,11 +47,11 @@ */ void map_init(void); -/** Remove the cookie/super-cookie from map +/** Remove the candy/big-candy from map @brief It could be called by Pacman when it eat the cookie. @param grid_x The horizontal position in the grid. @param grid_y The vertical position in the grid. - @return 1:There is a cookie be eaten. 0:The is no cookie at the grid. + @return 1:There is a candy be eaten. 0:The is no candy at the grid. */ bool map_eat_candy(int grid_x, int grid_y); @@ -68,8 +68,8 @@ */ void map_draw_grid(unsigned grid_x, unsigned grid_y); -/** Get the number of remaining cookie. - @brief The game should be ended when there is no cookie. +/** Get the number of remaining candy. + @brief The game should be ended when there is no candy. @return The number of remaining cookie. */ int map_remaining_candy(void);
--- a/robot/robot.cpp Sun Jul 05 21:52:08 2015 +0000 +++ b/robot/robot.cpp Sun Jul 05 21:58:24 2015 +0000 @@ -4,11 +4,11 @@ #include "robot.h" // Following code will only draw the Robot on the screen. You are expected to modify most of the functions here. -// All other necessary functions will be implemented by you. Ex: the movement of Pacman, calculate the score ... etc. +// All other necessary functions will be implemented by you. Ex: the movement of roboFrogger, calculate the score ... etc. void robot_init(int grid_x, int grid_y){ - map_eat_candy(grid_x,grid_y); //clear the cookie on the grid. + map_eat_candy(grid_x,grid_y); //clear the candy on the grid. robot_draw(grid_x,grid_y); } @@ -32,7 +32,7 @@ void robot_clear(int grid_x, int grid_y){ GRID grid_info = map_get_grid_status(grid_x,grid_y); - //Fill the grid (a rectangle) with BACKGROUND_COLOR to clear the pacman + //Fill the grid (a rectangle) with BACKGROUND_COLOR to clear the roboFrogger uLCD.filled_rectangle(grid_info.x, grid_info.y, grid_info.x+GRID_SIZE-1, grid_info.y+GRID_SIZE-1, BACKGROUND_COLOR); }