Support CLUT (untested)
This commit is contained in:
parent
17f7ba545e
commit
194b1f0f9c
|
@ -11,7 +11,7 @@ namespace GPU {
|
|||
|
||||
// Upload SplashScreen picture
|
||||
auto state = FileProcessor::create(reinterpret_cast<const uint32_t*>(SplashScreen), SimpleTIM(93, 0, 0, 0));
|
||||
while(state.process((2048/sizeof(uint32_t))));
|
||||
while(state.process((sizeof(SplashScreen)/sizeof(uint32_t))));
|
||||
|
||||
Display::enable();
|
||||
}
|
||||
|
|
|
@ -88,6 +88,21 @@ namespace FileProcessor {
|
|||
}
|
||||
}
|
||||
|
||||
static bool switch_state_parse_data(State::Configuration& config, SimpleTIMState& state) {
|
||||
set_gpu_receive_data(config.data_adr, state, state.size_info.getTextureWidth(), state.size_info.getTextureHeight());
|
||||
return Helper::exchange_and_execute_process_function(parse_data, config, state);
|
||||
}
|
||||
|
||||
static bool parse_clut(State::Configuration& config, SimpleTIMState& state) {
|
||||
if(parse_data(config, state)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
else {
|
||||
return switch_state_parse_data(config, state);
|
||||
}
|
||||
}
|
||||
|
||||
static bool parse_header(State::Configuration& config, SimpleTIMState& state) {
|
||||
if(config.data_word_size >= (sizeof(SimpleTIMSize)/sizeof(uint32_t))) {
|
||||
Helper::simple_read(state.size_info, config);
|
||||
|
@ -95,14 +110,13 @@ namespace FileProcessor {
|
|||
//Check if we have a clut to care about
|
||||
if(state.size_info.getClutWidth() > 0) {
|
||||
//CLUTs are 16bit full color anyway
|
||||
printf("We found a CLUT which is not yet implemented!\n");
|
||||
return false;
|
||||
set_gpu_receive_data(config.data_adr, state, state.size_info.getClutWidth(), state.size_info.getClutHeight());
|
||||
return Helper::exchange_and_execute_process_function(parse_clut, config, state);
|
||||
}
|
||||
|
||||
//We have direct data
|
||||
else {
|
||||
set_gpu_receive_data(config.data_adr, state, state.size_info.getTextureWidth(), state.size_info.getTextureHeight());
|
||||
return Helper::exchange_and_execute_process_function(parse_data, config, state);
|
||||
return switch_state_parse_data(config, state);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue