This commit is contained in:
2025-11-11 15:50:57 -06:00
parent 5adf8a0773
commit 9953d7d388
11 changed files with 135 additions and 86 deletions

View File

@@ -14,20 +14,18 @@ errorret_t assetMapLoad(void *data, void *output) {
assertNotNull(output, "Output cannot be NULL");
assetmap_t *mapData = (assetmap_t *)data;
assetmapmodel_t *mesh = (assetmapmodel_t *)output;
assetmap_t *out = (assetmap_t *)output;
memoryCopy(
mesh,
&mapData->models[0],
sizeof(assetmapmodel_t)
);
memoryCopy(out, mapData, sizeof(assetmap_t));
meshInit(
&mesh->mesh,
&out->models[0].mesh,
MESH_PRIMITIVE_TRIANGLES,
mesh->vertexCount,
mesh->vertices
out->models[0].vertexCount,
out->models[0].vertices
);
printf("Load asset\n");
errorOk();
}

View File

@@ -12,7 +12,7 @@
typedef struct {
uint32_t vertexCount;
meshvertex_t vertices[36];
meshvertex_t vertices[6 * CHUNK_TILE_COUNT];
mesh_t mesh;
} assetmapmodel_t;