Offically support Sony VAG because we have no own conversion
This commit is contained in:
parent
c308fba040
commit
de1a8b497d
|
@ -10,9 +10,7 @@ namespace JabyEngine {
|
||||||
enum struct CDFileType : CDFileType_t {
|
enum struct CDFileType : CDFileType_t {
|
||||||
CopyTo = 0,
|
CopyTo = 0,
|
||||||
SimpleTIM,
|
SimpleTIM,
|
||||||
#ifdef __SUPPORT_VAG__
|
|
||||||
SonyVAG,
|
SonyVAG,
|
||||||
#endif // __SUPPORT_VAG__
|
|
||||||
Custom,
|
Custom,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,11 +49,9 @@ namespace JabyEngine {
|
||||||
return CDFile{.rel_lba_idx = rel_lba_idx, .type = CDFileType::SimpleTIM, .payload = {.simple_tim = simple_tim}};
|
return CDFile{.rel_lba_idx = rel_lba_idx, .type = CDFileType::SimpleTIM, .payload = {.simple_tim = simple_tim}};
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __SUPPORT_VAG__
|
|
||||||
static constexpr CDFile sony_vag(uint8_t lba_idx, VAG vag) {
|
static constexpr CDFile sony_vag(uint8_t lba_idx, VAG vag) {
|
||||||
return CDFile{.rel_lba_idx = lba_idx, .type = CDFileType::SonyVAG, .payload = {.vag = vag}};
|
return CDFile{.rel_lba_idx = lba_idx, .type = CDFileType::SonyVAG, .payload = {.vag = vag}};
|
||||||
}
|
}
|
||||||
#endif //__SUPPORT_VAG__
|
|
||||||
|
|
||||||
static constexpr CDFile overlay(uint8_t rel_lba_idx, uint32_t* overlay_dst) {
|
static constexpr CDFile overlay(uint8_t rel_lba_idx, uint32_t* overlay_dst) {
|
||||||
return CDFile{.rel_lba_idx = rel_lba_idx, .type = CDFileType::CopyTo, .payload = {.overlay = Overlay{overlay_dst}}};
|
return CDFile{.rel_lba_idx = rel_lba_idx, .type = CDFileType::CopyTo, .payload = {.overlay = Overlay{overlay_dst}}};
|
||||||
|
|
|
@ -31,8 +31,6 @@ namespace JabyEngine {
|
||||||
using Configuration = CustomConfiguration;
|
using Configuration = CustomConfiguration;
|
||||||
#else
|
#else
|
||||||
using Configuration = DefaultConfiguration;
|
using Configuration = DefaultConfiguration;
|
||||||
// TODO: v Turn off when this is supported
|
|
||||||
#define __SUPPORT_VAG__
|
|
||||||
#define __SUPPORT_PS3__
|
#define __SUPPORT_PS3__
|
||||||
#endif // has jabyengine_custom_config
|
#endif // has jabyengine_custom_config
|
||||||
}
|
}
|
|
@ -43,10 +43,8 @@ namespace JabyEngine {
|
||||||
case CDFileType::SimpleTIM:
|
case CDFileType::SimpleTIM:
|
||||||
return FileProcessor::create(data_adr, file.payload.simple_tim);
|
return FileProcessor::create(data_adr, file.payload.simple_tim);
|
||||||
|
|
||||||
#ifdef __SUPPORT_VAG__
|
|
||||||
case CDFileType::SonyVAG:
|
case CDFileType::SonyVAG:
|
||||||
return FileProcessor::create(data_adr, file.payload.vag);
|
return FileProcessor::create(data_adr, file.payload.vag);
|
||||||
#endif //__SUPPORT_VAG__
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return FileProcessor::create_custom(data_adr, static_cast<CDFileType_t>(file.type) - static_cast<CDFileType_t>(CDFileType::Custom), file.payload);
|
return FileProcessor::create_custom(data_adr, static_cast<CDFileType_t>(file.type) - static_cast<CDFileType_t>(CDFileType::Custom), file.payload);
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include <PSX/SPU/spu.hpp>
|
#include <PSX/SPU/spu.hpp>
|
||||||
#include <stdio.hpp>
|
#include <stdio.hpp>
|
||||||
|
|
||||||
#ifdef __SUPPORT_VAG__
|
|
||||||
namespace JabyEngine {
|
namespace JabyEngine {
|
||||||
namespace FileProcessor {
|
namespace FileProcessor {
|
||||||
struct VAGHeader {
|
struct VAGHeader {
|
||||||
|
@ -77,5 +76,4 @@ namespace JabyEngine {
|
||||||
return State::from(VAGState::create(file.voice_number, file.inital_stereo_vol), data_adr, parse_header);
|
return State::from(VAGState::create(file.voice_number, file.inital_stereo_vol), data_adr, parse_header);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // __SUPPORT_VAG__
|
|
Loading…
Reference in New Issue