![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
game for 2035
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: map.cpp
- Revision:
- 5:a16af8f3fea9
- Parent:
- 4:af9d6e3b8a29
--- a/map.cpp Fri Nov 30 05:31:06 2018 +0000 +++ b/map.cpp Fri Nov 30 08:29:52 2018 +0000 @@ -148,6 +148,8 @@ w1->draw = draw_wall; w1->walkable = false; w1->data = NULL; + w1->x = x; + w1->y = y; unsigned key = (dir == HORIZONTAL) ? XY_KEY(x+i, y) : XY_KEY(x, y+i); void* val = insertItem(get_active_map()->items, key, w1); if (val) free(val); // If something is already there, free it @@ -161,6 +163,8 @@ w1->draw = draw_netPortal; w1->walkable = false; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } @@ -172,6 +176,8 @@ w1->draw = draw_terminal; w1->walkable = false; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } @@ -183,6 +189,8 @@ w1->draw = draw_hacked_terminal; w1->walkable = false; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } @@ -194,6 +202,8 @@ w1->draw = draw_NPC; w1->walkable = false; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } @@ -205,6 +215,8 @@ w1->draw = draw_plant; w1->walkable = true; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } @@ -216,6 +228,8 @@ w1->draw = draw_door; w1->walkable = walk; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } @@ -226,6 +240,8 @@ w1->draw = draw_boots; w1->walkable = false; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } @@ -235,6 +251,8 @@ w1->draw = draw_gun; w1->walkable = false; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } @@ -244,6 +262,8 @@ w1->draw = draw_printer; w1->walkable = false; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } @@ -253,6 +273,8 @@ w1->draw = draw_teleport; w1->walkable = false; w1->data = NULL; + w1->x = x; + w1->y = y; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it } \ No newline at end of file