37 lines
711 B
C

/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma ocne
#include "display/shader/shaderbuffer.h"
#include "overworld/overworld.h"
#define MAP_BLOCK_NAME "b_Map"
#define MAP_TILE_PACK_SIZE sizeof(uvec4_t) / sizeof(tileid_t)
typedef struct {
uvec4_t tileIds[OVERWORLD_TILE_COUNT_MAX / MAP_TILE_PACK_SIZE];
uint_t mapSize;
uvec3_t _p0;
} mapdata_t;
extern shaderbuffer_t MAP_BUFFER;
extern mapdata_t MAP_DATA;
/**
* Initializes the map buffer and data.
*/
void mapInit();
/**
* Updates the map buffer with the current data.
*/
void mapUpdate();
/**
* Destroys the map buffer.
*/
void mapDispose();