Prepare ControllerTest state with art and back functionality
This commit is contained in:
parent
425e093442
commit
64ac557d73
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
#include "include/controller_test_assets.hpp"
|
||||
#include <PSX/File/Processor/cd_file_processor.hpp>
|
||||
#include <PSX/AutoLBA/auto_lba_declaration.hpp>
|
||||
|
||||
namespace ControllerTest {
|
||||
using namespace JabyEngine;
|
||||
|
||||
enum LBA {
|
||||
__jabyengine_start_lba_request
|
||||
__jabyengine_request_lba_for(CONT, "ASSETS/CONT/CONT.BIN"),
|
||||
__jabyengine_end_lba_request
|
||||
};
|
||||
__declare_lba_header(LBA);
|
||||
|
||||
CDFile Assets[1] = {
|
||||
CDFileBuilder::simple_tim(LBA::CONT, ControllerButtonTIM),
|
||||
};
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
#pragma once
|
||||
#include <PSX/File/cd_file_types.hpp>
|
||||
|
||||
namespace ControllerTest {
|
||||
using namespace JabyEngine;
|
||||
|
||||
static constexpr auto ControllerButtonTIM = SimpleTIM(384, 0, 384, 511);
|
||||
}
|
|
@ -129,7 +129,7 @@ namespace GPUTest {
|
|||
break;
|
||||
}
|
||||
|
||||
GPU::swap_buffers_vsync(2);
|
||||
GPU::swap_buffers_vsync(1);
|
||||
|
||||
GPU::render(triangle1);
|
||||
GPU::render(triangle2);
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
#include <PSX/File/cd_file_types.hpp>
|
||||
|
||||
namespace ControllerTest {
|
||||
extern const volatile JabyEngine::AutoLBAEntry lba[];
|
||||
extern JabyEngine::CDFile Assets[1];
|
||||
|
||||
void main();
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,8 @@ namespace Assets {
|
|||
};
|
||||
|
||||
void load_controller_test() {
|
||||
::Assets::load(lba, ControllerFiles);
|
||||
::Assets::load(lba, ControllerFiles);
|
||||
::Assets::load(ControllerTest::lba, ControllerTest::Assets);
|
||||
}
|
||||
|
||||
void load_gpu_test() {
|
||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@ include $(JABY_ENGINE_DIR)/mkfile/ExportPath.mk
|
|||
include $(JABY_ENGINE_DIR)/mkfile/RebuildTarget.mk
|
||||
|
||||
OUTPUT_DIR = bin
|
||||
INPUT = $(OUTPUT_DIR)/TexturePage.bin $(OUTPUT_DIR)/IconTexture.bin $(OUTPUT_DIR)/Paco.bin
|
||||
INPUT = $(OUTPUT_DIR)/TexturePage.bin $(OUTPUT_DIR)/IconTexture.bin $(OUTPUT_DIR)/Paco.bin $(OUTPUT_DIR)/Controller.bin
|
||||
|
||||
$(OUTPUT_DIR)/TexturePage.bin: TexturePage.png
|
||||
@mkdir -p $(OUTPUT_DIR)
|
||||
|
@ -15,6 +15,9 @@ $(OUTPUT_DIR)/IconTexture.bin: IconTexture.png
|
|||
$(OUTPUT_DIR)/Paco.bin: Paco.png
|
||||
jaby_engine_fconv --lz4 $< -o $@ simple-tim clut4 --color-trans
|
||||
|
||||
$(OUTPUT_DIR)/Controller.bin: Controller.png
|
||||
jaby_engine_fconv --lz4 $< -o $@ simple-tim clut4 --color-trans
|
||||
|
||||
all: $(INPUT)
|
||||
|
||||
clean:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<Track>
|
||||
<File name = "SYSTEM.CNF">System.cnf</File>
|
||||
<Main name = "XXXX_AAA.AA" lba_source = "../application/src/asset_mgr.cpp">../application/bin/PSX-release/PoolBox.psexe</Main>
|
||||
<Overlay name = "CTO.BIN">../application/bin/PSX-release/Overlay.controller_tests</Overlay>
|
||||
<Overlay name = "CTO.BIN" lba_source = "../application/src/Overlay/ControllerTest/controller_test_assets.cpp">../application/bin/PSX-release/Overlay.controller_tests</Overlay>
|
||||
<Overlay name = "GTO.BIN" lba_source = "../application/src/Overlay/GPUTest/gpu_test_assets.cpp">../application/bin/PSX-release/Overlay.gpu_tests</Overlay>
|
||||
|
||||
<Directory name="ASSETS" hidden = "true">
|
||||
|
@ -14,6 +14,10 @@
|
|||
<File name = "PACO.BIN" lz4 = "already">../assets/bin/Paco.bin</File>
|
||||
</Directory>
|
||||
|
||||
<Directory name = "CONT">
|
||||
<File name = "CONT.BIN" lz4 = "already">../assets/bin/Controller.bin</File>
|
||||
</Directory>
|
||||
|
||||
<File name = "TEX.BIN" lz4 = "already">../assets/bin/TexturePage.bin</File>
|
||||
<File name = "ICON.BIN" lz4 = "already">../assets/bin/IconTexture.bin</File>
|
||||
</Directory>
|
||||
|
|
Loading…
Reference in New Issue