frogger game
Dependencies: 4DGL-uLCD-SE MMA8452 SDFileSystem mbed wave_player
Fork of ECE2035_FroggerGame_SUM2015 by
map/map_private.h@0:7fe3c940e4b5, 2015-06-25 (annotated)
- Committer:
- leuyentran
- Date:
- Thu Jun 25 14:35:52 2015 +0000
- Revision:
- 0:7fe3c940e4b5
- Child:
- 4:3fb1d198e9d6
Georgia Tech ECE2035 Sum 15
Who changed what in which revision?
User | Revision | Line number | New 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 |
leuyentran | 0:7fe3c940e4b5 | 36 | #define SIDE_WALK_COLOR_2 0x999999 |
leuyentran | 0:7fe3c940e4b5 | 37 | #define SIDE_WALK_COLOR 0x198C19 |
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 | |
leuyentran | 0:7fe3c940e4b5 | 57 | #define DEFAULT_MAP {\ |
leuyentran | 0:7fe3c940e4b5 | 58 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 59 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 60 | 0, 0, 0, 7, 3, 1, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 61 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 62 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 63 | 0, 0, 0, 7, 3, 2, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 64 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 65 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 66 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 67 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 68 | 0, 0, 0, 7, 3, 1, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 69 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 70 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 71 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 72 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, \ |
leuyentran | 0:7fe3c940e4b5 | 73 | 0, 0, 0, 7, 3, 4, 5, 3, 4, 5, 3, 4, 5, 7, 6, 6, 6, } |
leuyentran | 0:7fe3c940e4b5 | 74 | |
leuyentran | 0:7fe3c940e4b5 | 75 | // Here defines some useful macros |
leuyentran | 0:7fe3c940e4b5 | 76 | #define IDX2X(idx) (idx%NUM_GRID_X) |
leuyentran | 0:7fe3c940e4b5 | 77 | #define IDX2Y(idx) (idx/NUM_GRID_X) |
leuyentran | 0:7fe3c940e4b5 | 78 | #define XY2IDX(x,y) (y*NUM_GRID_X+x) |
leuyentran | 0:7fe3c940e4b5 | 79 | |
leuyentran | 0:7fe3c940e4b5 | 80 | void map_draw(void); |
leuyentran | 0:7fe3c940e4b5 | 81 | |
leuyentran | 0:7fe3c940e4b5 | 82 | |
leuyentran | 0:7fe3c940e4b5 | 83 | #endif //MAP_H |