scene stuff
This commit is contained in:
@@ -10,10 +10,10 @@
|
|||||||
#define CONSOLE_CMD_NAME_MAX 32
|
#define CONSOLE_CMD_NAME_MAX 32
|
||||||
#define CONSOLE_CMD_ARGC_MAX 16
|
#define CONSOLE_CMD_ARGC_MAX 16
|
||||||
|
|
||||||
#define CONSOLE_COMMANDS_MAX 128
|
#define CONSOLE_COMMANDS_MAX 32
|
||||||
#define CONSOLE_VARIABLES_MAX 128
|
#define CONSOLE_VARIABLES_MAX 64
|
||||||
#define CONSOLE_LINE_MAX 256
|
#define CONSOLE_LINE_MAX 128
|
||||||
#define CONSOLE_HISTORY_MAX 32
|
#define CONSOLE_HISTORY_MAX 16
|
||||||
#define CONSOLE_EXEC_BUFFER_MAX 32
|
#define CONSOLE_EXEC_BUFFER_MAX 32
|
||||||
#define CONSOLE_ALIAS_MAX 32
|
#define CONSOLE_ALIAS_MAX 32
|
||||||
|
|
||||||
|
@@ -23,8 +23,8 @@ if(DUSK_TARGET_SYSTEM STREQUAL "linux")
|
|||||||
target_compile_definitions(${DUSK_TARGET_NAME}
|
target_compile_definitions(${DUSK_TARGET_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
DISPLAY_SDL2=1
|
DISPLAY_SDL2=1
|
||||||
DISPLAY_WINDOW_WIDTH_DEFAULT=960
|
DISPLAY_WINDOW_WIDTH_DEFAULT=1080
|
||||||
DISPLAY_WINDOW_HEIGHT_DEFAULT=720
|
DISPLAY_WINDOW_HEIGHT_DEFAULT=810
|
||||||
)
|
)
|
||||||
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
||||||
target_compile_definitions(${DUSK_TARGET_NAME}
|
target_compile_definitions(${DUSK_TARGET_NAME}
|
||||||
|
@@ -117,8 +117,6 @@ errorret_t displayUpdate(void) {
|
|||||||
);
|
);
|
||||||
sceneManagerRender();
|
sceneManagerRender();
|
||||||
uiRender();
|
uiRender();
|
||||||
|
|
||||||
// UI will probs go here
|
|
||||||
|
|
||||||
// Finish up
|
// Finish up
|
||||||
spriteBatchFlush();
|
spriteBatchFlush();
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "scenemap.h"
|
#include "scenemap.h"
|
||||||
|
#include "display/spritebatch.h"
|
||||||
|
|
||||||
errorret_t sceneMapInit(scenedata_t *data) {
|
errorret_t sceneMapInit(scenedata_t *data) {
|
||||||
errorOk();
|
errorOk();
|
||||||
@@ -15,7 +16,25 @@ void sceneMapUpdate(scenedata_t *data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void sceneMapRender(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) {
|
void sceneMapDispose(scenedata_t *data) {
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "scene/scene.h"
|
#include "scene/scene.h"
|
||||||
|
#include "rpg/entity/entity.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t nothing;
|
int32_t nothing;
|
||||||
@@ -15,6 +16,7 @@ typedef struct {
|
|||||||
errorret_t sceneMapInit(scenedata_t *data);
|
errorret_t sceneMapInit(scenedata_t *data);
|
||||||
void sceneMapUpdate(scenedata_t *data);
|
void sceneMapUpdate(scenedata_t *data);
|
||||||
void sceneMapRender(scenedata_t *data);
|
void sceneMapRender(scenedata_t *data);
|
||||||
|
void sceneMapRenderEntity(const entity_t *entity);
|
||||||
void sceneMapDispose(scenedata_t *data);
|
void sceneMapDispose(scenedata_t *data);
|
||||||
|
|
||||||
static scene_t SCENE_MAP = {
|
static scene_t SCENE_MAP = {
|
||||||
|
@@ -34,7 +34,6 @@ void uiUpdate(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void uiRender(void) {
|
void uiRender(void) {
|
||||||
|
|
||||||
cameraPushMatrix(&UI.camera);
|
cameraPushMatrix(&UI.camera);
|
||||||
|
|
||||||
// Render UI elements here
|
// Render UI elements here
|
||||||
|
Reference in New Issue
Block a user