Prepare ControllerTest state with art and back functionality

This commit is contained in:
2024-01-04 12:30:17 -06:00
parent 425e093442
commit 64ac557d73
9 changed files with 70 additions and 4 deletions

View File

@@ -1,7 +1,33 @@
#include "../../../include/shared.hpp"
#include <PSX/Periphery/periphery.hpp>
#include <stdio.h>
namespace ControllerTest {
using namespace JabyEngine;
static bool update_or_exit() {
Periphery::query_controller();
if(Shared::back_menu.update(Make::PositionI16(0, GPU::Display::Height - 32))) {
return true;
}
return false;
}
static void render() {
Shared::back_menu.render();
}
void main() {
printf("CONT: BlubbBlubbBlubb!!\n");
Shared::back_menu.reset();
while(true) {
if(update_or_exit()) {
break;
}
GPU::swap_buffers_vsync(1);
Shared::back_menu.render();
}
}
}