Still won't work

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Revision:
5:142e66c8a7fa
Parent:
4:237c791cc5c0
--- a/map.cpp	Thu Apr 11 23:55:36 2019 +0000
+++ b/map.cpp	Fri Apr 12 18:42:43 2019 +0000
@@ -25,7 +25,8 @@
  * key information (x, y) into a one-dimensional unsigned integer.
  * This function should uniquely map (x,y) onto the space of unsigned integers.
  */
-static unsigned XY_KEY(int X, int Y) {
+static unsigned XY_KEY(int X, int Y)
+{
     // TODO: Fix me!
     return X + (Y*map_height());
 }
@@ -43,10 +44,10 @@
 
 void maps_init()
 {
-    // TODO: Implement!    
+    // TODO: Implement!
     // Initialize hash table
     // Set width & height
-    HashTable* ht = createHashTable(&map_hash, 50);
+    HashTable* ht = createHashTable(map_hash, 50);
     map.items = ht;
     map.w = map_width();
     map.h = map_height();
@@ -68,10 +69,8 @@
 {
     // As you add more types, you'll need to add more items to this array.
     char lookup[] = {'W', 'P'};
-    for(int y = 0; y < map_height(); y++)
-    {
-        for (int x = 0; x < map_width(); x++)
-        {
+    for(int y = 0; y < map_height(); y++) {
+        for (int x = 0; x < map_width(); x++) {
             MapItem* item = get_here(x,y);
             if (item) pc.printf("%c", lookup[item->type]);
             else pc.printf(" ");
@@ -97,25 +96,25 @@
 
 MapItem* get_north(int x, int y)
 {
-    unsigned ynew = y-1;
+    unsigned int ynew = y-1;
     return (MapItem*)getItem(map.items,XY_KEY(x,ynew));
 }
 
 MapItem* get_south(int x, int y)
 {
-    unsigned ynew = y+1;
+    unsigned int ynew = y+1;
     return (MapItem*)getItem(map.items,XY_KEY(x,ynew));
 }
 
 MapItem* get_east(int x, int y)
 {
-    unsigned xnew = x+1;
+    unsigned int xnew = x+1;
     return (MapItem*)getItem(map.items,XY_KEY(xnew,y));
 }
 
 MapItem* get_west(int x, int y)
 {
-    unsigned xnew = x-1;
+    unsigned int xnew = x-1;
     return (MapItem*)getItem(map.items,XY_KEY(xnew,y));
 }
 
@@ -127,12 +126,12 @@
 
 void map_erase(int x, int y)
 {
+    
 }
 
 void add_wall(int x, int y, int dir, int len)
 {
-    for(int i = 0; i < len; i++)
-    {
+    for(int i = 0; i < len; i++) {
         MapItem* w1 = (MapItem*) malloc(sizeof(MapItem));
         w1->type = WALL;
         w1->draw = draw_wall;