Poke_Transporter_GB/include/payload_file_reader.h
Philippe Symons 2689ffd3cf Optimize Gameboy payloads for size by generating the payloads at runtime and generate binary patches
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.
2025-07-18 12:48:50 +02:00

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