pocket tanks

Dependencies:   4DGL-uLCD-SE pockettanks SDFileSystem mbed wave_player

Fork of ECE2035_FroggerGame_SUM1025 by Le Tran

Committer:
ece2035ta
Date:
Sun Oct 04 22:05:25 2015 +0000
Revision:
1:172fbc00199c
Parent:
0:7fe3c940e4b5
Child:
3:8f68c00dd75a
pocket tanks;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
leuyentran 0:7fe3c940e4b5 1 /* Gatech ECE2035 2015 SPRING PAC MAN
leuyentran 0:7fe3c940e4b5 2 * Copyright (c) 2015 Gatech ECE2035
leuyentran 0:7fe3c940e4b5 3 *
leuyentran 0:7fe3c940e4b5 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
leuyentran 0:7fe3c940e4b5 5 * of this software and associated documentation files (the "Software"), to deal
leuyentran 0:7fe3c940e4b5 6 * in the Software without restriction, including without limitation the rights
leuyentran 0:7fe3c940e4b5 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
leuyentran 0:7fe3c940e4b5 8 * copies of the Software, and to permit persons to whom the Software is
leuyentran 0:7fe3c940e4b5 9 * furnished to do so, subject to the following conditions:
leuyentran 0:7fe3c940e4b5 10 *
leuyentran 0:7fe3c940e4b5 11 * The above copyright notice and this permission notice shall be included in
leuyentran 0:7fe3c940e4b5 12 * all copies or substantial portions of the Software.
leuyentran 0:7fe3c940e4b5 13 *
leuyentran 0:7fe3c940e4b5 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
leuyentran 0:7fe3c940e4b5 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
leuyentran 0:7fe3c940e4b5 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
leuyentran 0:7fe3c940e4b5 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
leuyentran 0:7fe3c940e4b5 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
leuyentran 0:7fe3c940e4b5 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
leuyentran 0:7fe3c940e4b5 20 * SOFTWARE.
leuyentran 0:7fe3c940e4b5 21 */
leuyentran 0:7fe3c940e4b5 22 #ifndef MAP_PRIVATE_H
leuyentran 0:7fe3c940e4b5 23 #define MAP_PRIVATE_H
leuyentran 0:7fe3c940e4b5 24
leuyentran 0:7fe3c940e4b5 25 #include "mbed.h"
leuyentran 0:7fe3c940e4b5 26
leuyentran 0:7fe3c940e4b5 27 #ifndef ULCD_4DGL_H_
leuyentran 0:7fe3c940e4b5 28 #define ULCD_4DGL_H_
leuyentran 0:7fe3c940e4b5 29 #include "uLCD_4DGL.h"
leuyentran 0:7fe3c940e4b5 30 #endif
leuyentran 0:7fe3c940e4b5 31
leuyentran 0:7fe3c940e4b5 32 #include "globals.h"
leuyentran 0:7fe3c940e4b5 33 #include "map_public.h"
leuyentran 0:7fe3c940e4b5 34
leuyentran 0:7fe3c940e4b5 35 // It defines the settings for drawing the map
ece2035ta 1:172fbc00199c 36 #define SIDE_WALK_COLOR_2 0x00ffdf //SKy blue
ece2035ta 1:172fbc00199c 37 #define SIDE_WALK_COLOR 0x198C19 // green
leuyentran 0:7fe3c940e4b5 38 #define LINE_COLOR 0xE5E500
leuyentran 0:7fe3c940e4b5 39 #define CANDY_COLOR 0xFF7F7F
leuyentran 0:7fe3c940e4b5 40 #define CANDY_RADIUS 1
leuyentran 0:7fe3c940e4b5 41 #define BIG_CANDY_RADIUS 2
leuyentran 0:7fe3c940e4b5 42 #define WHITE 0xFFFFFF
leuyentran 0:7fe3c940e4b5 43
leuyentran 0:7fe3c940e4b5 44
leuyentran 0:7fe3c940e4b5 45
leuyentran 0:7fe3c940e4b5 46 // It defines the values used in the DEFAULT_MAP
leuyentran 0:7fe3c940e4b5 47 #define MAP_ATTRIBUTE_SIDE_WALK 0 //side walk
leuyentran 0:7fe3c940e4b5 48 #define MAP_ATTRIBUTE_CANDY 1 //candy
leuyentran 0:7fe3c940e4b5 49 #define MAP_ATTRIBUTE_BIG_CANDY 2 //big candy
leuyentran 0:7fe3c940e4b5 50 #define MAP_ATTRIBUTE_ROAD_L 3
leuyentran 0:7fe3c940e4b5 51 #define MAP_ATTRIBUTE_ROAD 4
leuyentran 0:7fe3c940e4b5 52 #define MAP_ATTRIBUTE_ROAD_R 5
leuyentran 0:7fe3c940e4b5 53 #define MAP_ATTRIBUTE_V_LINE 6
leuyentran 0:7fe3c940e4b5 54 #define MAP_ATTRIBUTE_SIDE_WALK_2 7
leuyentran 0:7fe3c940e4b5 55
leuyentran 0:7fe3c940e4b5 56
ece2035ta 1:172fbc00199c 57
ece2035ta 1:172fbc00199c 58 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 59 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 60 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 61 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 62 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 63 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 64 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 65 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 66 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 67 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 68 //0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
ece2035ta 1:172fbc00199c 69 //7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 70 //7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 71 //7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 72 //7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 73 //7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, }
leuyentran 0:7fe3c940e4b5 74 #define DEFAULT_MAP {\
ece2035ta 1:172fbc00199c 75 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 76 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 77 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 78 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 79 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 80 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 81 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 82 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 83 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 84 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 85 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 86 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 87 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, \
ece2035ta 1:172fbc00199c 88 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, }
leuyentran 0:7fe3c940e4b5 89 // Here defines some useful macros
leuyentran 0:7fe3c940e4b5 90 #define IDX2X(idx) (idx%NUM_GRID_X)
leuyentran 0:7fe3c940e4b5 91 #define IDX2Y(idx) (idx/NUM_GRID_X)
leuyentran 0:7fe3c940e4b5 92 #define XY2IDX(x,y) (y*NUM_GRID_X+x)
leuyentran 0:7fe3c940e4b5 93
leuyentran 0:7fe3c940e4b5 94 void map_draw(void);
leuyentran 0:7fe3c940e4b5 95
leuyentran 0:7fe3c940e4b5 96
leuyentran 0:7fe3c940e4b5 97 #endif //MAP_H