diff --git a/src/keel/asset.cpp b/src/keel/asset.cpp index 87ba8ab9..340284ba 100644 --- a/src/keel/asset.cpp +++ b/src/keel/asset.cpp @@ -11,10 +11,10 @@ ox::Result readUuidHeader(const ox::Buffer &buff) noexcept { } ox::Result readUuidHeader(const char *buff, std::size_t buffLen) noexcept { - if (buffLen < N1HdrSz) { + if (buffLen < K1HdrSz) { return OxError(1, "Insufficient data to contain complete Nostalgia header"); } - ox::StringView n1Hdr = "N1;"; + ox::StringView n1Hdr = "K1;"; if (n1Hdr == buff) { return OxError(2, "No Nostalgia asset header data"); } @@ -24,7 +24,7 @@ ox::Result readUuidHeader(const char *buff, std::size_t buffLen) noexc ox::Result readAsset(ox::TypeStore *ts, const ox::Buffer &buff) noexcept { std::size_t offset = 0; if (!readUuidHeader(buff).error) { - offset = N1HdrSz; + offset = K1HdrSz; } return ox::readClaw(ts, buff.data() + offset, buff.size() - offset); } @@ -32,7 +32,7 @@ ox::Result readAsset(ox::TypeStore *ts, const ox::Buffer &buff) ox::Result readAssetHeader(const char *buff, std::size_t buffLen) noexcept { AssetHdr out; const auto err = readUuidHeader(buff, buffLen).moveTo(&out.uuid); - const auto offset = err ? 0 : N1HdrSz; + const auto offset = err ? 0 : K1HdrSz; buff = buff + offset; buffLen = buffLen - offset; oxReturnError(ox::readClawHeader(buff, buffLen).moveTo(&out.clawHdr)); diff --git a/src/keel/asset.hpp b/src/keel/asset.hpp index 331f6640..0de3d200 100644 --- a/src/keel/asset.hpp +++ b/src/keel/asset.hpp @@ -11,14 +11,14 @@ namespace keel { -constexpr auto N1HdrSz = 40; +constexpr auto K1HdrSz = 40; ox::Result readUuidHeader(const ox::Buffer &buff) noexcept; ox::Result readUuidHeader(const char *buff, std::size_t buffLen) noexcept; ox::Error writeUuidHeader(ox::Writer_c auto *writer, const ox::UUID &uuid) noexcept { - const auto hdr = ox::sfmt>("N1;{};", uuid.toString()); + const auto hdr = ox::sfmt>("K1;{};", uuid.toString()); return write(writer, hdr); } @@ -27,7 +27,7 @@ ox::Result readAsset(const ox::Buffer &buff) noexcept { std::size_t offset = 0; const auto err = readUuidHeader(buff).error; if (!err) { - offset = N1HdrSz; // the size of N1 headers + offset = K1HdrSz; // the size of K1 headers } return ox::readClaw(buff.data() + offset, buff.size() - offset); } diff --git a/src/keel/pack.hpp b/src/keel/pack.hpp index 2369622f..d6bc4427 100644 --- a/src/keel/pack.hpp +++ b/src/keel/pack.hpp @@ -8,10 +8,8 @@ #include namespace keel { -class Context; -} -namespace keel { +class Context; struct GbaPlatSpec { using PtrType = uint32_t; diff --git a/src/keel/typeconv.hpp b/src/keel/typeconv.hpp index 6cc70d0a..e154fb29 100644 --- a/src/keel/typeconv.hpp +++ b/src/keel/typeconv.hpp @@ -10,8 +10,8 @@ #include #include +#include "asset.hpp" #include "context.hpp" -#include "media.hpp" namespace keel { diff --git a/src/nostalgia/player/app.cpp b/src/nostalgia/player/app.cpp index e06a26c7..08404898 100644 --- a/src/nostalgia/player/app.cpp +++ b/src/nostalgia/player/app.cpp @@ -2,6 +2,8 @@ * Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved. */ +#include + #include #include diff --git a/src/nostalgia/player/main.cpp b/src/nostalgia/player/main.cpp index 552c7bec..5417ceb6 100644 --- a/src/nostalgia/player/main.cpp +++ b/src/nostalgia/player/main.cpp @@ -4,6 +4,8 @@ #include +#include + #include #include diff --git a/src/nostalgia/tools/pack.cpp b/src/nostalgia/tools/pack.cpp index 41ea2b81..baec38df 100644 --- a/src/nostalgia/tools/pack.cpp +++ b/src/nostalgia/tools/pack.cpp @@ -9,6 +9,7 @@ #include #include + #include #include