Verify basic usage of FileProcessor
This commit is contained in:
27
include/PSX/File/Processor/File_Processor.hpp
Normal file
27
include/PSX/File/Processor/File_Processor.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef __JABYENGINE_FILE_PROCESSOR_HPP__
|
||||
#define __JABYENGINE_FILE_PROCESSOR_HPP__
|
||||
#include "../File_Types.hpp"
|
||||
|
||||
namespace FileProcessor {
|
||||
class State {
|
||||
private:
|
||||
struct Reserved {
|
||||
uint32_t _reserved[2] = {0};
|
||||
};
|
||||
|
||||
typedef bool (*ProcessRoutine)(uint32_t*, size_t, Reserved&);
|
||||
|
||||
private:
|
||||
ProcessRoutine process_adr = nullptr;
|
||||
Reserved reserved;
|
||||
|
||||
public:
|
||||
bool process(uint32_t* data, size_t size) {
|
||||
return (*this->process_adr)(data, size, this->reserved);
|
||||
}
|
||||
};
|
||||
|
||||
State create(const SimpleTIM& file);
|
||||
}
|
||||
|
||||
#endif // !__JABYENGINE_FILE_PROCESSOR_HPP__
|
Reference in New Issue
Block a user