scene stuff

This commit is contained in:
2025-10-08 15:18:38 -05:00
parent 67604eca8d
commit 20cf016b06
6 changed files with 28 additions and 10 deletions

View File

@@ -6,6 +6,7 @@
*/
#include "scenemap.h"
#include "display/spritebatch.h"
errorret_t sceneMapInit(scenedata_t *data) {
errorOk();
@@ -15,7 +16,25 @@ void sceneMapUpdate(scenedata_t *data) {
}
void sceneMapRender(scenedata_t *data) {
entity_t *ent = ENTITIES;
do {
sceneMapRenderEntity(ent);
} while(++ent, ent < &ENTITIES[ENTITY_COUNT]);
}
void sceneMapRenderEntity(const entity_t *entity) {
assertNotNull(entity);
if(entity->type == ENTITY_TYPE_NULL) return;
spriteBatchPush(
NULL,
0.0f, 0.0f,
32.0f, 32.0f,
COLOR_RED,
0.0f, 0.0f,
1.0f, 1.0f
);
}
void sceneMapDispose(scenedata_t *data) {

View File

@@ -7,6 +7,7 @@
#pragma once
#include "scene/scene.h"
#include "rpg/entity/entity.h"
typedef struct {
int32_t nothing;
@@ -15,6 +16,7 @@ typedef struct {
errorret_t sceneMapInit(scenedata_t *data);
void sceneMapUpdate(scenedata_t *data);
void sceneMapRender(scenedata_t *data);
void sceneMapRenderEntity(const entity_t *entity);
void sceneMapDispose(scenedata_t *data);
static scene_t SCENE_MAP = {