Update and make level bigger

This commit is contained in:
Sheldon Lee 2023-04-20 02:21:11 +01:00
parent 900504971b
commit d186b948a7

View File

@ -2,18 +2,23 @@
#include "maths.h" #include "maths.h"
#define WIDTH 5 #define WIDTH 10
#define HEIGHT 5 #define HEIGHT 10
static float castRay(sf::Vector2f point, float direction); static float castRay(sf::Vector2f point, float direction);
static void getGridIndex(sf::Vector2f point, int* x, int* y); static void getGridIndex(sf::Vector2f point, int* x, int* y);
static unsigned int level[WIDTH * HEIGHT] = { static unsigned int level[WIDTH * HEIGHT] = {
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1,
1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1,
1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1,
1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1,
1, 0, 0, 1, 0, 0, 0, 0, 0, 1,
1, 0, 0, 1, 0, 0, 0, 1, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 1, 0, 0, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
}; };
int level_init() int level_init()