Use continous memory for loading files

This commit is contained in:
Jaby
2022-10-02 10:18:27 +02:00
parent 949c502d5d
commit 04358ed368
3 changed files with 23 additions and 12 deletions

View File

@@ -36,8 +36,8 @@ namespace GPU {
Display::enable();
//For now
auto state = FileProcessor::create(SimpleTIM(0, 0, 0, 0));
while(state.process(nullptr, 0ull));
auto state = FileProcessor::create(nullptr, SimpleTIM(0, 0, 0, 0));
while(state.process(0ull));
}
void setup() {

View File

@@ -14,15 +14,15 @@ namespace FileProcessor {
};
static_assert(sizeof(SimpleTIMState) <= sizeof(State::Reserved));
static bool process(uint32_t*, size_t, SimpleTIMState &state) {
static bool process(State::Configuration& config, SimpleTIMState& state, size_t size) {
printf("Dino: %i\n", state.test);
return false;
}
State create(const SimpleTIM& file) {
State create(const uint32_t* data_adr, const SimpleTIM& file) {
SimpleTIMState test(123);
return State{.process_adr = reinterpret_cast<State::ProcessRoutine>(process), .reserved = test._reserved};
return State{.config = State::Configuration::from(process, data_adr), .reserved = test._reserved};
}
}