mirror of
https://github.com/GearsProgress/Poke_Transporter_GB.git
synced 2026-03-21 17:34:42 -05:00
This commit moves payload_builder and the z80_asm code to the data-generator subproject in order to generate the gameboy payloads at compile time instead of at runtime. In addition, we select a couple of base payloads (more than 1 for compressibility's sake) and generate binary patches to transform them into other payloads. We then generate a binary file with both the base payload and binary patches and compress these files with zx0. This reduces the rom size by about 8 KB.
17 lines
375 B
C++
17 lines
375 B
C++
#ifndef _PAYLOAD_FILE_READER_H
|
|
#define _PAYLOAD_FILE_READER_H
|
|
|
|
#include <cstdint>
|
|
|
|
class payload_file_reader {
|
|
public:
|
|
payload_file_reader(const uint8_t *file_buffer, uint16_t buffer_size);
|
|
|
|
bool read_payload(uint8_t *buffer, uint8_t language, uint8_t game_variant);
|
|
protected:
|
|
private:
|
|
const uint8_t *file_buffer_;
|
|
const uint8_t *file_buffer_end_;
|
|
};
|
|
|
|
#endif |