renders
This commit is contained in:
13
src/ui/ui.c
13
src/ui/ui.c
@@ -9,12 +9,17 @@
|
||||
#include "util/memory.h"
|
||||
#include "assert/assert.h"
|
||||
#include "display/spritebatch.h"
|
||||
#include "display/screen.h"
|
||||
|
||||
ui_t UI;
|
||||
|
||||
errorret_t uiInit(void) {
|
||||
memoryZero(&UI, sizeof(ui_t));
|
||||
|
||||
cameraInitOrthographic(&UI.camera);
|
||||
UI.camera.orthographic.left = 0;
|
||||
UI.camera.orthographic.bottom = 0;
|
||||
|
||||
errorOk();
|
||||
}
|
||||
|
||||
@@ -27,6 +32,9 @@ void uiUpdate(void) {
|
||||
}
|
||||
|
||||
void uiRender(void) {
|
||||
UI.camera.orthographic.right = SCREEN.width;
|
||||
UI.camera.orthographic.top = SCREEN.height;
|
||||
|
||||
cameraPushMatrix(&UI.camera);
|
||||
spriteBatchClear();
|
||||
|
||||
@@ -36,11 +44,6 @@ void uiRender(void) {
|
||||
i++;
|
||||
}
|
||||
|
||||
// spriteBatchPush(
|
||||
// NULL,
|
||||
// 0, 0, 32, 32, COLOR_RED, 0, 0, 1, 1
|
||||
// );
|
||||
|
||||
spriteBatchFlush();
|
||||
cameraPopMatrix();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user