Physics I guess

This commit is contained in:
2025-09-15 19:37:01 -05:00
parent 07ab2b4b02
commit f799690d3c
25 changed files with 315 additions and 13 deletions

View File

@@ -10,9 +10,25 @@
#define MAP_ENTITY_COUNT_MAX 32
#define MAP_WIDTH_MAX 64
#define MAP_HEIGHT_MAX 64
#define MAP_TILE_COUNT_MAX (MAP_WIDTH_MAX * MAP_HEIGHT_MAX)
typedef struct {
uint8_t id;
} tile_t;
typedef struct {
tile_t tiles[MAP_TILE_COUNT_MAX];
} maplayer_t;
typedef struct {
entity_t entities[MAP_ENTITY_COUNT_MAX];
uint8_t entityCount;
uint8_t width, height;
maplayer_t base;
maplayer_t overlay;
} map_t;
extern map_t testMap;

16
src/rpg/world/tile.h Normal file
View File

@@ -0,0 +1,16 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
typedef enum {
TILE_TYPE_NULL,
} tiletype_t;
typedef struct {
tiletype_t type;
} tile_t;