SomeGameEngineV2/tile_test.c

31 lines
710 B
C

#include "raylib.h"
enum TileType {
TILE_EMPTY = 0,
TILE_SOLID_FULL = 1,
};
#define TILE_SIZE 32
#define WINDOW_WIDTH 640
#define WINDOW_HEIGHT 320
#define TILEMAP_WIDTH (WINDOW_WIDTH / TILE_SIZE)
#define TILEMAP_HEIGHT (WINDOW_HEIGHT / TILE_SIZE)
#define N_TILES (TILEMAP_WIDTH * TILEMAP_HEIGHT)
static enum TileType tiles[N_TILES] = {0};
int main(void)
{
InitWindow(640, 320, "raylib");
SetTargetFPS(60);
while(!WindowShouldClose())
{
// TODO: Get Click location and toggle the tile
// TODO: Need to add feature to disable/enable tile edges and vertices
BeginDrawing();
ClearBackground(WHITE);
EndDrawing();
}
CloseWindow();
}