Crappy Layout
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user