Compare commits
3 Commits
89fab5cc20
...
43a87b606e
Author | SHA1 | Date | |
---|---|---|---|
43a87b606e | |||
8acc6244d5 | |||
bd2aeee276 |
5
deps/ox/src/ox/claw/read.cpp
vendored
5
deps/ox/src/ox/claw/read.cpp
vendored
@ -74,7 +74,10 @@ Result<Buffer> stripClawHeader(const ox::Buffer &buff) noexcept {
|
||||
|
||||
Result<ModelObject> readClaw(TypeStore &ts, const char *buff, std::size_t buffSz) noexcept {
|
||||
oxRequire(header, readClawHeader(buff, buffSz));
|
||||
oxRequire(t, ts.getLoad(header.typeName, header.typeVersion, header.typeParams));
|
||||
auto const [t, tdErr] = ts.getLoad(header.typeName, header.typeVersion, header.typeParams);
|
||||
if (tdErr) {
|
||||
return OxError(3, "Could not load type descriptor");
|
||||
}
|
||||
ModelObject obj;
|
||||
oxReturnError(obj.setType(t));
|
||||
switch (header.fmt) {
|
||||
|
@ -18,8 +18,10 @@ arch = platform.machine()
|
||||
host_env = f'{os}-{arch}'
|
||||
|
||||
# get current build type
|
||||
with open(".current_build","r") as f:
|
||||
with open(".current_build", "r") as f:
|
||||
current_build = f.readlines()[0]
|
||||
if current_build[len(current_build) - 1] == '\n':
|
||||
current_build = current_build[:len(current_build) - 1]
|
||||
|
||||
project_dir = sys.argv[1]
|
||||
project_name = sys.argv[2]
|
||||
|
@ -125,7 +125,11 @@ ox::Error preloadDir(
|
||||
auto const dir = ox::sfmt("{}{}/", path, name);
|
||||
oxReturnError(preloadDir(ts, romFs, pl, dir));
|
||||
} else {
|
||||
oxReturnError(preloadObj(ts, romFs, pl, filePath));
|
||||
auto const err = preloadObj(ts, romFs, pl, filePath);
|
||||
if (err) {
|
||||
oxErrf("\033[31;1;1mCould not preload {}:\n\t{}\n", filePath, toStr(err));
|
||||
return err;
|
||||
}
|
||||
}
|
||||
}
|
||||
return {};
|
||||
|
@ -120,7 +120,11 @@ static ox::Error transformClaw(
|
||||
auto const dir = ox::sfmt("{}{}/", path, name);
|
||||
oxReturnError(transformClaw(ctx, ts, dest, dir));
|
||||
} else {
|
||||
oxReturnError(doTransformations(ctx, ts, dest, filePath));
|
||||
auto const err = doTransformations(ctx, ts, dest, filePath);
|
||||
if (err) {
|
||||
oxErrf("\033[31;1;1mCould not do transformations for {}:\n\t{}\n", filePath, toStr(err));
|
||||
return err;
|
||||
}
|
||||
}
|
||||
}
|
||||
return {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user