Crappy Layout

This commit is contained in:
2024-01-04 17:11:40 -06:00
parent 64ac557d73
commit e368ab08de
5 changed files with 138 additions and 5 deletions

View File

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