Palettized image test.
This commit is contained in:
@@ -11,8 +11,10 @@
|
||||
#include "display/framebuffer/framebuffer.h"
|
||||
#include "display/scene/scenemanager.h"
|
||||
#include "display/mesh/quad.h"
|
||||
#include "asset/assetmanager.h"
|
||||
|
||||
camera_t SCENE_OVERWORLD_CAMERA;
|
||||
asset_t *testAsset;
|
||||
|
||||
void sceneOverworldInit(void) {
|
||||
cameraInit(&SCENE_OVERWORLD_CAMERA);
|
||||
@@ -20,6 +22,10 @@ void sceneOverworldInit(void) {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void sceneOverworldUpdate(void) {
|
||||
@@ -35,7 +41,7 @@ void sceneOverworldRender(void) {
|
||||
// Draw overlay layer.
|
||||
|
||||
spriteBatchPush(
|
||||
NULL,
|
||||
&testAsset->paletteImage.texture,
|
||||
0.0f, 0.0f, 12.0f, 12.0f,
|
||||
0xFF, 0x00, 0x00, 0xFF,
|
||||
0.0f, 0.0f, 1.0f, 1.0f
|
||||
|
Reference in New Issue
Block a user