Merge branch 'ToolBox_TODOs_SupportSFX' into ToolBox_TODOs
This commit is contained in:
@@ -16,7 +16,7 @@ namespace JabyEngine {
|
||||
State create_custom(const uint32_t* data_adr, const CDFileType_t& file_type, const CDFile::Payload& payload) {
|
||||
switch(static_cast<FileType>(file_type)) {
|
||||
case FileType::Jingle:
|
||||
return State::from(JingleState{.sfx_id = payload.raw}, reinterpret_cast<const uint8_t*>(data_adr), parse_jingle);
|
||||
return State::from(JingleState{.sfx_id = payload.raw}, data_adr, parse_jingle);
|
||||
|
||||
default:
|
||||
return FileProcessor::create(data_adr, Nothing());
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "include/controller_state.hpp"
|
||||
#include <PSX/GPU/gpu.hpp>
|
||||
#include <PSX/SPU/spu.hpp>
|
||||
|
||||
namespace ControllerTest {
|
||||
using DigitalButton = Periphery::AnalogeController::Button;
|
||||
@@ -7,6 +8,9 @@ namespace ControllerTest {
|
||||
|
||||
static void set_active(GPU::SPRT_16::Linked& sprt, bool is_active) {
|
||||
sprt->tex_offset.y = is_active ? 16 : 0;
|
||||
if(is_active) {
|
||||
SPU::voice[1].play_if_end();
|
||||
}
|
||||
}
|
||||
|
||||
static void set_active(GPU::POLY_FT4::Linked& poly, bool is_active) {
|
||||
@@ -14,6 +18,10 @@ namespace ControllerTest {
|
||||
poly->tex_offset1.y = is_active ? 16 : 0;
|
||||
poly->tex_offset2.y = is_active ? 32 : 16;
|
||||
poly->tex_offset3.y = is_active ? 32 : 16;
|
||||
|
||||
if(is_active) {
|
||||
SPU::voice[1].play_if_end();
|
||||
}
|
||||
}
|
||||
|
||||
static const char* get_type_name(Periphery::ControllerType type) {
|
||||
|
@@ -17,6 +17,8 @@ namespace Assets {
|
||||
__jabyengine_start_lba_request
|
||||
__jabyengine_request_lba_for(PACO, "ASSETS/MAIN/PACO.IMG"),
|
||||
__jabyengine_request_lba_for(DFISH, "ASSETS/MAIN/DFISH.IMG"),
|
||||
__jabyengine_request_lba_for(APPLE_SFX, "SFX/APPLE.VAG"),
|
||||
__jabyengine_request_lba_for(BLUBB_SFX, "SFX/BLUBB.VAG"),
|
||||
__jabyengine_request_lba_for(MIX_XA, "XAAUDIO/MIX.XA"),
|
||||
__jabyengine_request_lba_for(BIOS_INFO_OVL, "BIO.BIN"),
|
||||
__jabyengine_request_lba_for(GPU_TEST_OVL, "GTO.BIN"),
|
||||
@@ -58,9 +60,13 @@ namespace Assets {
|
||||
}
|
||||
|
||||
namespace Main {
|
||||
using SPU::operator""_vol;
|
||||
|
||||
static const CDFile Files[] = {
|
||||
CDFileBuilder::simple_tim(LBA::PACO, PacoTIM),
|
||||
CDFileBuilder::simple_tim(LBA::DFISH, DoenerFishInfo.tim),
|
||||
CDFileBuilder::sony_vag(LBA::APPLE_SFX, VAG::create(0, 1.0_vol)),
|
||||
CDFileBuilder::sony_vag(LBA::BLUBB_SFX, VAG::create(1, 1.0_vol)),
|
||||
CustomCDFileBuilder::jingle(32),
|
||||
};
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include "../include/shared.hpp"
|
||||
#include "include/menu.hpp"
|
||||
#include <PSX/Periphery/periphery.hpp>
|
||||
#include <PSX/SPU/spu.hpp>
|
||||
|
||||
namespace Menu {
|
||||
using DigitalButton = Periphery::GenericController::Button;
|
||||
@@ -24,6 +25,7 @@ namespace Menu {
|
||||
}
|
||||
|
||||
if(controller.button.went_down(DigitalButton::Cross)) {
|
||||
SPU::voice[0].play();
|
||||
this->selection_callback(this->cur_selection);
|
||||
}
|
||||
|
||||
|
@@ -12,6 +12,8 @@ CLUT_4_COLOR_TRANS_FLAGS = simple-tim clut4 --color-trans
|
||||
## Music tracks
|
||||
INPUT += $(OUTPUT_DIR)/Evacuation_cdda.xa
|
||||
INPUT += $(OUTPUT_DIR)/fox.xa
|
||||
INPUT += $(OUTPUT_DIR)/apple.vag
|
||||
INPUT += $(OUTPUT_DIR)/blubb.vag
|
||||
|
||||
## Images
|
||||
INPUT += $(OUTPUT_DIR)/TexturePage.img
|
||||
@@ -36,6 +38,10 @@ $(OUTPUT_DIR)/fox.xa: audio/temp/fox.wav
|
||||
@mkdir -p $(OUTPUT_DIR)
|
||||
jaby_engine_fconv $< -o $@ xa
|
||||
|
||||
$(OUTPUT_DIR)/%.vag: audio/temp/%.wav
|
||||
@mkdir -p $(OUTPUT_DIR)
|
||||
jaby_engine_fconv $< -o $@ vag
|
||||
|
||||
$(OUTPUT_DIR)/%.xa: audio/%.wav
|
||||
@mkdir -p $(OUTPUT_DIR)
|
||||
jaby_engine_fconv $< -o $@ xa
|
||||
|
@@ -47,6 +47,11 @@
|
||||
<Channel>../assets/bin/fox.xa</Channel>
|
||||
</InterleavedFile>
|
||||
</Directory>
|
||||
<Directory name = "SFX" hidden = "true">
|
||||
<!--TODO: test lz4 version-->
|
||||
<File name = "APPLE.VAG" lz4 = "none">../assets/bin/apple.vag</File>
|
||||
<File name = "BLUBB.VAG" lz4 = "none">../assets/bin/blubb.vag</File>
|
||||
</Directory>
|
||||
</Filesystem>
|
||||
<AudioTrack align = "true">../assets/audio/temp/breaking.wav</AudioTrack>
|
||||
</PSXCD>
|
Reference in New Issue
Block a user