Hold R2 and L2 to active load test
This commit is contained in:
parent
79f2b436ff
commit
c4d4b8f014
|
@ -6,4 +6,5 @@
|
||||||
namespace Shared {
|
namespace Shared {
|
||||||
extern Menu::BackMenu back_menu;
|
extern Menu::BackMenu back_menu;
|
||||||
extern JabyEngine::GPU::POLY_G4 background;
|
extern JabyEngine::GPU::POLY_G4 background;
|
||||||
|
extern bool load_test;
|
||||||
}
|
}
|
|
@ -57,7 +57,6 @@ namespace GTETest {
|
||||||
}
|
}
|
||||||
|
|
||||||
static auto star_base = Make::SPRT(
|
static auto star_base = Make::SPRT(
|
||||||
// TODO: improve magic numbers
|
|
||||||
Make::AreaI16(Position, Make::SizeI16(64, 64)),
|
Make::AreaI16(Position, Make::SizeI16(64, 64)),
|
||||||
Make::OffsetPageWithClut(JabySTARTim.get_page_offset_clut4(), Make::PageClut(JabySTARTim.get_clut_position()))
|
Make::OffsetPageWithClut(JabySTARTim.get_page_offset_clut4(), Make::PageClut(JabySTARTim.get_clut_position()))
|
||||||
).linked();
|
).linked();
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include <stdio.hpp>
|
#include <stdio.hpp>
|
||||||
|
|
||||||
using namespace JabyEngine;
|
using namespace JabyEngine;
|
||||||
|
using DigitalButton = Periphery::GenericController::Button;
|
||||||
|
|
||||||
struct XAPlayer {
|
struct XAPlayer {
|
||||||
static constexpr auto MaxChannels = 2;
|
static constexpr auto MaxChannels = 2;
|
||||||
|
@ -91,12 +92,19 @@ namespace Shared {
|
||||||
Make::AreaI16(0, 0, GPU::Display::Width, GPU::Display::Height),
|
Make::AreaI16(0, 0, GPU::Display::Width, GPU::Display::Height),
|
||||||
{GPU::Color24::Red(0xA0), GPU::Color24::Green(0xA0), GPU::Color24::Blue(0xA0), GPU::Color24::Black()}
|
{GPU::Color24::Red(0xA0), GPU::Color24::Green(0xA0), GPU::Color24::Blue(0xA0), GPU::Color24::Black()}
|
||||||
);
|
);
|
||||||
|
bool load_test = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup() {
|
static void setup() {
|
||||||
// Use this size for the doener fish state?
|
// Use this size for the doener fish state?
|
||||||
// doener_fish.set_rect_size_fast(Make::SizeI16(64, 32));
|
// doener_fish.set_rect_size_fast(Make::SizeI16(64, 32));
|
||||||
|
|
||||||
|
const auto& controller = Periphery::get_primary_controller_as<JabyEngine::Periphery::GenericController>();
|
||||||
|
// With this approach we can default load_test to true for debugging reasons
|
||||||
|
if(controller.button.is_down(DigitalButton::R2) && controller.button.is_down(DigitalButton::L2)) {
|
||||||
|
Shared::load_test = true;
|
||||||
|
}
|
||||||
|
|
||||||
Assets::Main::load();
|
Assets::Main::load();
|
||||||
FontWriter::setup();
|
FontWriter::setup();
|
||||||
paco.setup();
|
paco.setup();
|
||||||
|
@ -145,8 +153,6 @@ static void setup() {
|
||||||
|
|
||||||
namespace NormalScene {
|
namespace NormalScene {
|
||||||
static void update() {
|
static void update() {
|
||||||
using DigitalButton = Periphery::GenericController::Button;
|
|
||||||
|
|
||||||
static const char Title[] = ">> Pool Box <<";
|
static const char Title[] = ">> Pool Box <<";
|
||||||
static const char Version[] = "Ver. 0.8.5";
|
static const char Version[] = "Ver. 0.8.5";
|
||||||
static constexpr auto TitleLength = DefaultFont::Info.estimate_str_render_length(Title);
|
static constexpr auto TitleLength = DefaultFont::Info.estimate_str_render_length(Title);
|
||||||
|
@ -170,10 +176,13 @@ namespace NormalScene {
|
||||||
FontWriter::new_font_writer.write(cursor.change_position(Make::PositionI16((GPU::Display::Width-VersionLength)/2, 16 + DefaultFont::Info.get_kern_size().height)), Version, GPU::Color24::Green(0xD0), &FontWriter::wiggle);
|
FontWriter::new_font_writer.write(cursor.change_position(Make::PositionI16((GPU::Display::Width-VersionLength)/2, 16 + DefaultFont::Info.get_kern_size().height)), Version, GPU::Color24::Green(0xD0), &FontWriter::wiggle);
|
||||||
menu.update(FontWriter::bios_font_writer, cursor, Make::PositionI16(8, 64));
|
menu.update(FontWriter::bios_font_writer, cursor, Make::PositionI16(8, 64));
|
||||||
|
|
||||||
// TODO: Make this a feature
|
|
||||||
// Force state change for now
|
if(Shared::load_test) {
|
||||||
/*state_changer.asset_load = Assets::Overlay::load_gpu_test;
|
// Force state change if we are in the load_test state
|
||||||
state_changer.main = GPUTest::main;*/
|
state_changer.asset_load = Assets::Overlay::load_gpu_test;
|
||||||
|
state_changer.main = GPUTest::main;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void render() {
|
static void render() {
|
||||||
|
@ -226,6 +235,7 @@ namespace LoadingScene {
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
Periphery::query_controller();
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "../include/shared.hpp"
|
||||||
#include "include/menu.hpp"
|
#include "include/menu.hpp"
|
||||||
#include <PSX/Periphery/periphery.hpp>
|
#include <PSX/Periphery/periphery.hpp>
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ namespace Menu {
|
||||||
bool BackMenu :: update(const GPU::PositionI16& position, bool auto_clear) {
|
bool BackMenu :: update(const GPU::PositionI16& position, bool auto_clear) {
|
||||||
const auto& controller = Periphery::get_primary_controller_as<JabyEngine::Periphery::GenericController>();
|
const auto& controller = Periphery::get_primary_controller_as<JabyEngine::Periphery::GenericController>();
|
||||||
|
|
||||||
if(true/*controller.button.is_down(DigitalButton::Circle)*/) {
|
if(Shared::load_test || controller.button.is_down(DigitalButton::Circle)) {
|
||||||
this->waiting = true;
|
this->waiting = true;
|
||||||
if(this->timeout.is_expired_for(2500_ms)) {
|
if(this->timeout.is_expired_for(2500_ms)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory name = "XAAUDIO" hidden = "true">
|
<Directory name = "XAAUDIO" hidden = "true">
|
||||||
<XA-Audio name = "FOX.XA">
|
<XA-Audio name = "FOX.XA">
|
||||||
<Channel>../assets/bin/fox.xa</Channel>
|
|
||||||
<Channel>../assets/bin/Evacuation.xa</Channel>
|
<Channel>../assets/bin/Evacuation.xa</Channel>
|
||||||
|
<Channel>../assets/bin/fox.xa</Channel>
|
||||||
</XA-Audio>
|
</XA-Audio>
|
||||||
</Directory>
|
</Directory>
|
||||||
</Track>
|
</Track>
|
||||||
|
|
Loading…
Reference in New Issue