This commit is contained in:
2025-10-01 13:20:34 -05:00
parent 28174b8dc8
commit 22e2f703db
229 changed files with 272 additions and 8941 deletions

View File

@@ -1,33 +0,0 @@
/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "map.h"
#include "util/memory.h"
#include "assert/assert.h"
void mapInit(map_t *map) {
assertNotNull(map, "Map cannot be NULL");
memoryZero(map, sizeof(map_t));
}
void mapUpdate(map_t *map) {
assertNotNull(map, "Map cannot be NULL");
entity_t *start = &map->entities[0];
entity_t *end = &map->entities[map->entityCount];
while(start < end) {
entityUpdate(start++);
}
}
entity_t * mapEntityAdd(map_t *map) {
assertNotNull(map, "Map cannot be NULL");
assertTrue(map->entityCount < MAP_ENTITY_COUNT_MAX, "Map entities full");
entity_t *entity = &map->entities[map->entityCount++];
return entity;
}