Build 0.2 native launcher and portable Classic runtime (by Codex)

This commit is contained in:
Codex committed 2026-10-18 11:28:51 +02:00
1 parent 3a021fc160
commit 2552528176
84 files changed
+5004 -197

No files matched your search

+9
View File
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "formats/executable_layout.hpp"
#include "ui/sportschau.hpp"
#include "formats/content.hpp"
#include <algorithm>
#include <array>
@@ -89,6 +90,14 @@ Image load_kb(const std::filesystem::path& data_directory, const char* file) {
}
std::optional<Palette> load_optional_embedded_palette(const std::filesystem::path& path) {
if (const auto resource = content::find(path)) {
auto name = std::filesystem::path(resource->key);
name.replace_extension();
const auto it = resource->content->image_palettes.find(name.generic_string());
if (it == resource->content->image_palettes.end())
return std::nullopt;
return it->second;
}
const Bytes bytes = read_file(path);
if (bytes.size() < 8) throw FormatError("sportschau: VGA palette source is truncated");
const size_t rle_end = 8 + size_t(le32(bytes, 4));