Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: 4DGL-uLCD-SE mbed wave_player
Fork of PacMan_Skeleton_unlock by
map_private.h
00001 /* Gatech ECE2035 2015 SPRING PAC MAN 00002 * Copyright (c) 2015 Gatech ECE2035 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a copy 00005 * of this software and associated documentation files (the "Software"), to deal 00006 * in the Software without restriction, including without limitation the rights 00007 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00008 * copies of the Software, and to permit persons to whom the Software is 00009 * furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included in 00012 * all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00015 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00016 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00017 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00018 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00019 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00020 * SOFTWARE. 00021 */ 00022 #ifndef MAP_PRIVATE_H 00023 #define MAP_PRIVATE_H 00024 00025 #include "mbed.h" 00026 00027 #ifndef ULCD_4DGL_H_ 00028 #define ULCD_4DGL_H_ 00029 #include "uLCD_4DGL.h" 00030 #endif 00031 00032 #include "globals.h" 00033 #include "map_public.h " 00034 00035 // It defines the settings for drawing the map 00036 #define WALL_COLOR 0x0000FF 00037 #define COOKIE_RADIUS 1 00038 #define SUPER_COOKIE_RADIUS 2 00039 #define COOKIE_COLOR 0x00FF00 00040 00041 // It defines the values used in the DEFAULT_MAP 00042 #define MAP_ATTRIBUTE_WALL 0 //wall 00043 #define MAP_ATTRIBUTE_COOKIE 1 //cookie 00044 #define MAP_ATTRIBUTE_SUPER_COOKIE 2 //super cookie 00045 00046 #define DEFAULT_MAP {\ 00047 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, \ 00048 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, \ 00049 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, \ 00050 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, \ 00051 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, \ 00052 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, \ 00053 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, \ 00054 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, \ 00055 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, \ 00056 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, \ 00057 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, \ 00058 1, 1, 1, 1, 1, 2, 0, 0, 1, 0, 0, 2, 1, 1, 1, 1, 1, \ 00059 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, \ 00060 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, \ 00061 0, 2, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 0, \ 00062 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0} 00063 00064 // Here defines some useful macros 00065 #define IDX2X(idx) (idx%NUM_GRID_X) 00066 #define IDX2Y(idx) (idx/NUM_GRID_X) 00067 #define XY2IDX(x,y) (y*NUM_GRID_X+x) 00068 00069 void map_draw(void); 00070 00071 00072 #endif //MAP_H
Generated on Thu Aug 4 2022 06:03:35 by
1.7.2
