[nostalgia/tools/pack] Add PtrSize to GbaPlatSpec
This commit is contained in:
parent
b506c5defb
commit
0d040ad752
@ -149,11 +149,11 @@ static ox::Error preloadObj(core::TypeStore *ts, ox::FileSystem *romFs, GbaPrelo
|
||||
oxRequireM(obj, ox::readClaw(ts, buff));
|
||||
if (obj.type()->preloadable) {
|
||||
// preload
|
||||
oxReturnError(pl->startAlloc(ox::sizeOf<GbaPlatSpec>(&obj)));
|
||||
auto err = ox::preload<GbaPlatSpec, decltype(obj)>(pl, &obj);
|
||||
oxRequire(a, pl->startAlloc(ox::sizeOf<GbaPlatSpec>(&obj)));
|
||||
const auto err = ox::preload<GbaPlatSpec, decltype(obj)>(pl, &obj);
|
||||
oxReturnError(pl->endAlloc());
|
||||
oxReturnError(err);
|
||||
const core::PreloadPtr p{.preloadAddr = 0};
|
||||
const core::PreloadPtr p{.preloadAddr = static_cast<uint32_t>(a)};
|
||||
oxReturnError(ox::writeMC(&p).moveTo(&buff));
|
||||
} else {
|
||||
// strip the Claw header (it is not needed after preloading) and write back out to dest fs
|
||||
|
@ -14,6 +14,7 @@ struct GbaPlatSpec {
|
||||
using PtrType = uint32_t;
|
||||
using size_t = uint32_t;
|
||||
|
||||
static constexpr auto PtrSize = 4;
|
||||
static constexpr auto PtrAlign = 4;
|
||||
static constexpr PtrType RomStart = 0x08000000;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user