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.
DrawMaze.cpp
00001 #include "uLCD_4DGL.h" 00002 #include "BuzzyGraphics.h" 00003 #include "Buzzy.h" 00004 00005 extern uLCD_4DGL guLCD; 00006 extern char gDynaMaze[MAZE_NUM_ROW][MAZE_NUM_COL]; 00007 extern Buzzy gBuzzy; 00008 ///////////////////////////////////////////////////////////////////// 00009 // The maze is a scaled down version of the LCD display 00010 // Each element in the maze is really a 3x3 segment of the LCD 00011 // This must be taken into account when drawing the maze on the LCD 00012 00013 00014 // Draw a wall tile when 00015 void DrawMazeWall(int const &x1, int const &y1) 00016 { 00017 int ii = 3*x1+1; 00018 int jj = 3*y1+1; 00019 guLCD.filled_rectangle(ii-1, jj-1, ii+1, jj+1, _BLUE); 00020 } 00021 /* 00022 ////////////////////////////////////////////////////////////////////// 00023 Use the following #defines to determine which icon to draw in the LCD 00024 #define BLUE_SQUARE 1 00025 #define HONEYDROP_SQUARE 2 00026 #define PWRUP_SQUARE 3 00027 #define GHOST_ICON 4 00028 #define BUZZY_ICON 5 00029 #define TRAP_LINE 6 00030 00031 When drawing the ghosts draw one of each color 00032 */ 00033 void DrawMaze() 00034 { 00035 00036 for (int ii = 0 ; ii < MAZE_NUM_ROW ; ii++) 00037 { 00038 for (int jj = 0 ; jj < MAZE_NUM_COL ; jj++) 00039 { 00040 } 00041 } 00042 }
Generated on Wed Jul 13 2022 01:21:55 by
1.7.2