Zachary Reyes / Lab4_gnuarmeclipse_lpc1768

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DrawMaze.cpp Source File

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 }