Prepare VAG loading
This commit is contained in:
@@ -37,11 +37,17 @@ namespace JabyEngine {
|
||||
}(file, buf_cfg, is_lz4);
|
||||
|
||||
switch(file.type) {
|
||||
case CDFileType::SimpleTIM:
|
||||
return FileProcessor::create(data_adr, file.payload.simple_tim);
|
||||
case CDFileType::CopyTo:
|
||||
return FileProcessor::create(data_adr, Nothing());
|
||||
|
||||
|
||||
case CDFileType::SimpleTIM:
|
||||
return FileProcessor::create(data_adr, file.payload.simple_tim);
|
||||
|
||||
#ifdef __SUPPORT_VAG__
|
||||
case CDFileType::SonyVAG:
|
||||
return FileProcessor::create(data_adr, file.payload.vag);
|
||||
#endif //__SUPPORT_VAG__
|
||||
|
||||
default:
|
||||
return FileProcessor::create_custom(data_adr, static_cast<CDFileType_t>(file.type) - static_cast<CDFileType_t>(CDFileType::Custom), file.payload);
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
State create(const uint32_t* data_adr, const Nothing& nothing) {
|
||||
return State::from(NothingState(), reinterpret_cast<const uint8_t*>(data_adr), parse_nothing);
|
||||
return State::from(NothingState(), data_adr, parse_nothing);
|
||||
}
|
||||
}
|
||||
}
|
@@ -139,7 +139,7 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
State create(const uint32_t* data_adr, const SimpleTIM& file) {
|
||||
return State::from(SimpleTIMState(file), reinterpret_cast<const uint8_t*>(data_adr), parse_header);
|
||||
return State::from(SimpleTIMState(file), data_adr, parse_header);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
23
src/Library/src/File/Processor/vag_processor.cpp
Normal file
23
src/Library/src/File/Processor/vag_processor.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <PSX/File/file_processor_helper.hpp>
|
||||
#include <stdio.hpp>
|
||||
|
||||
#ifdef __SUPPORT_VAG__
|
||||
namespace JabyEngine {
|
||||
namespace FileProcessor {
|
||||
struct VAGState {
|
||||
static constexpr VAGState create() {
|
||||
return VAGState{};
|
||||
}
|
||||
};
|
||||
|
||||
static Progress parse_header(State::Configuration& config, VAGState& state) {
|
||||
printf("What am I supposed to do?!\n");
|
||||
return Progress::Error;
|
||||
}
|
||||
|
||||
State create(const uint32_t* data_adr, const VAG& file) {
|
||||
return State::from(VAGState::create(), data_adr, parse_header);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // __SUPPORT_VAG__
|
Reference in New Issue
Block a user