scene stuff
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user