draw text.
This commit is contained in:
@@ -16,28 +16,16 @@
|
||||
|
||||
camera_t SCENE_OVERWORLD_CAMERA;
|
||||
asset_t *testAsset;
|
||||
ref_t testAssetRef;
|
||||
|
||||
void sceneOverworldInit(void) {
|
||||
cameraInit(&SCENE_OVERWORLD_CAMERA);
|
||||
// glm_vec3_copy((vec3){32.0f, 32.0f, 32.0f}, SCENE_OVERWORLD_CAMERA.lookat.position);
|
||||
|
||||
SCENE_OVERWORLD_CAMERA.projType = CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC;
|
||||
SCENE_OVERWORLD_CAMERA.orthographic.left = 0.0f;
|
||||
SCENE_OVERWORLD_CAMERA.orthographic.right = 128.0f;
|
||||
SCENE_OVERWORLD_CAMERA.orthographic.top = 0.0f;
|
||||
SCENE_OVERWORLD_CAMERA.orthographic.bottom = 72.0f;
|
||||
SCENE_OVERWORLD_CAMERA.nearClip = -1.0f;
|
||||
SCENE_OVERWORLD_CAMERA.farClip = 1000.0f;
|
||||
|
||||
SCENE_OVERWORLD_CAMERA.viewType = CAMERA_VIEW_TYPE_MATRIX;
|
||||
glm_mat4_identity(SCENE_OVERWORLD_CAMERA.view);
|
||||
glm_vec3_copy((vec3){32.0f, 32.0f, 32.0f}, SCENE_OVERWORLD_CAMERA.lookat.position);
|
||||
|
||||
scene_t *scene = &SCENE_MANAGER_SCENES[SCENE_TYPE_OVERWORLD];
|
||||
scene->flags |= SCENE_FLAG_ACTIVE | SCENE_FLAG_VISIBLE;
|
||||
|
||||
assetManagerGetAsset("entities.dpi", &testAsset);
|
||||
ref_t lock = assetLock(testAsset);
|
||||
assetLoad(testAsset);
|
||||
assetManagerLoadAsset("entities.dpi", &testAsset, &testAssetRef);
|
||||
}
|
||||
|
||||
void sceneOverworldUpdate(void) {
|
||||
@@ -51,7 +39,7 @@ void sceneOverworldRender(void) {
|
||||
// Draw entities
|
||||
|
||||
// Draw overlay layer.
|
||||
renderTextDraw(0.0f, 0.0f, "Hello World", 0xFF, 0xFF, 0xFF);
|
||||
// renderTextDraw(0.0f, 0.0f, "Hello World", 0xFF, 0xFF, 0xFF);
|
||||
|
||||
// spriteBatchPush(
|
||||
// &testAsset->paletteImage.texture,
|
||||
@@ -66,4 +54,5 @@ void sceneOverworldRender(void) {
|
||||
|
||||
void sceneOverworldDispose(void) {
|
||||
// Dispose of the overworld scene.
|
||||
if(testAsset) assetUnlock(testAsset, testAssetRef);
|
||||
}
|
||||
|
Reference in New Issue
Block a user