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 "util/memory.h"
|
||||||
#include "assert/assert.h"
|
#include "assert/assert.h"
|
||||||
#include "display/spritebatch.h"
|
#include "display/spritebatch.h"
|
||||||
|
#include "display/screen.h"
|
||||||
|
|
||||||
ui_t UI;
|
ui_t UI;
|
||||||
|
|
||||||
errorret_t uiInit(void) {
|
errorret_t uiInit(void) {
|
||||||
memoryZero(&UI, sizeof(ui_t));
|
memoryZero(&UI, sizeof(ui_t));
|
||||||
|
|
||||||
cameraInitOrthographic(&UI.camera);
|
cameraInitOrthographic(&UI.camera);
|
||||||
|
UI.camera.orthographic.left = 0;
|
||||||
|
UI.camera.orthographic.bottom = 0;
|
||||||
|
|
||||||
errorOk();
|
errorOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,6 +32,9 @@ void uiUpdate(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void uiRender(void) {
|
void uiRender(void) {
|
||||||
|
UI.camera.orthographic.right = SCREEN.width;
|
||||||
|
UI.camera.orthographic.top = SCREEN.height;
|
||||||
|
|
||||||
cameraPushMatrix(&UI.camera);
|
cameraPushMatrix(&UI.camera);
|
||||||
spriteBatchClear();
|
spriteBatchClear();
|
||||||
|
|
||||||
@@ -36,11 +44,6 @@ void uiRender(void) {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// spriteBatchPush(
|
|
||||||
// NULL,
|
|
||||||
// 0, 0, 32, 32, COLOR_RED, 0, 0, 1, 1
|
|
||||||
// );
|
|
||||||
|
|
||||||
spriteBatchFlush();
|
spriteBatchFlush();
|
||||||
cameraPopMatrix();
|
cameraPopMatrix();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user