Integrate CircularBuffer as essential part of loading files from CD and dedicate file processing to the FileProcessor

This commit is contained in:
Jaby
2023-04-01 11:20:56 +02:00
parent 864ecf4412
commit 658d092315
7 changed files with 85 additions and 53 deletions

View File

@@ -25,17 +25,15 @@ namespace JabyEngine {
};
private:
FileProcessor::State file_pro_state;
FileProcessor::State file_state;
CircularBuffer<CD_IO::DataSector> circular_buffer;
LZ4Decompressor lz4_decomp;
JobArray jobs;
const AutoLBAEntry* lba = nullptr;
uint32_t*const tmp_area = nullptr; //< The start of the area to copy data to
uint32_t* dst_area = nullptr; //< Current target for copying the data
uint32_t*const tmp_area = nullptr; //< The start of the area to copy data to for the file processor
void start_cur_job();
void reading_state(const CDFile& file);
void done_state(const CDFile& file);
void start_cur_job();
bool process_data();
public:
CDFileProcessor() = default;

View File

@@ -51,6 +51,8 @@ namespace JabyEngine {
}
};
// The nothing state
State create(const uint32_t* data_adr, const Nothing& nothing);
State create(const uint32_t* data_adr, const SimpleTIM& file);
}
}