Play bubble sound when pressing buttons
This commit is contained in:
parent
b79dd47982
commit
714ef195d3
|
@ -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) {
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace Assets {
|
|||
__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"),
|
||||
|
@ -65,6 +66,7 @@ namespace Assets {
|
|||
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),
|
||||
};
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ CLUT_4_COLOR_TRANS_FLAGS = simple-tim clut4 --color-trans
|
|||
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
|
||||
|
|
|
@ -45,7 +45,9 @@
|
|||
</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>
|
||||
|
|
Loading…
Reference in New Issue