hgftf
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: map.cpp
- Revision:
- 10:0b2f37cef9b9
- Parent:
- 9:d09b96b6c39c
--- a/map.cpp Fri Nov 20 21:58:45 2020 +0000 +++ b/map.cpp Sat Apr 17 14:09:46 2021 +0000 @@ -23,7 +23,7 @@ #define MAPS_HEIGHT 50 static Map maps[NUM_MAPS]; static int active_map; -unsigned int NUMBUCKETS = 100; +unsigned int NUMBUCKETS = 750; // this is important static const MapItem CLEAR_SENTINEL = { @@ -284,7 +284,7 @@ void add_snake_head(int x, int y) { MapItem* w1 = (MapItem*) malloc(sizeof(MapItem)); - w1->type = SNAKE_BODY; + w1->type = SNAKE_HEAD; w1->draw = draw_snake_head; w1->walkable = false; w1->data = NULL; @@ -295,7 +295,7 @@ void add_snake_tail(int x, int y) { MapItem* w1 = (MapItem*) malloc(sizeof(MapItem)); - w1->type = SNAKE_BODY; + w1->type = SNAKE_TAIL; w1->draw = draw_snake_tail; w1->walkable = false; w1->data = NULL;