1#ifndef YAZE_APP_GFX_scad_format_H
2#define YAZE_APP_GFX_scad_format_H
14#include <unordered_map>
17#include "absl/status/status.h"
18#include "absl/status/statusor.h"
29namespace scad_format {
58constexpr uint16_t
kMatchedBytes[] = {0x4E, 0x41, 0x4B, 0x31, 0x39, 0x38, 0x39};
69absl::Status
LoadScr(std::string_view filename, uint8_t input_value,
70 std::vector<uint8_t>& map_data);
75absl::Status
LoadCgx(uint8_t bpp, std::string_view filename,
76 std::vector<uint8_t>& cgx_data,
77 std::vector<uint8_t>& cgx_loaded,
78 std::vector<uint8_t>& cgx_header);
83absl::Status
DrawScrWithCgx(uint8_t bpp, std::vector<uint8_t>& map_bitmap_data,
84 std::vector<uint8_t>& map_data,
85 std::vector<uint8_t>& cgx_loaded);
90std::vector<SDL_Color>
DecodeColFile(
const std::string_view filename);
96 std::string_view filename, std::vector<uint8_t>& obj_data,
97 std::vector<uint8_t> actual_obj_data,
98 std::unordered_map<std::string, std::vector<uint8_t>> decoded_obj,
99 std::vector<uint8_t>& decoded_extra_obj,
int& obj_loaded);