Physics I guess
This commit is contained in:
@@ -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
16
src/rpg/world/tile.h
Normal 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;
|
||||
Reference in New Issue
Block a user