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 {
|
Result<ModelObject> readClaw(TypeStore &ts, const char *buff, std::size_t buffSz) noexcept {
|
||||||
oxRequire(header, readClawHeader(buff, buffSz));
|
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;
|
ModelObject obj;
|
||||||
oxReturnError(obj.setType(t));
|
oxReturnError(obj.setType(t));
|
||||||
switch (header.fmt) {
|
switch (header.fmt) {
|
||||||
|
@ -18,8 +18,10 @@ arch = platform.machine()
|
|||||||
host_env = f'{os}-{arch}'
|
host_env = f'{os}-{arch}'
|
||||||
|
|
||||||
# get current build type
|
# get current build type
|
||||||
with open(".current_build","r") as f:
|
with open(".current_build", "r") as f:
|
||||||
current_build = f.readlines()[0]
|
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_dir = sys.argv[1]
|
||||||
project_name = sys.argv[2]
|
project_name = sys.argv[2]
|
||||||
|
@ -125,7 +125,11 @@ ox::Error preloadDir(
|
|||||||
auto const dir = ox::sfmt("{}{}/", path, name);
|
auto const dir = ox::sfmt("{}{}/", path, name);
|
||||||
oxReturnError(preloadDir(ts, romFs, pl, dir));
|
oxReturnError(preloadDir(ts, romFs, pl, dir));
|
||||||
} else {
|
} 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 {};
|
return {};
|
||||||
|
@ -120,7 +120,11 @@ static ox::Error transformClaw(
|
|||||||
auto const dir = ox::sfmt("{}{}/", path, name);
|
auto const dir = ox::sfmt("{}{}/", path, name);
|
||||||
oxReturnError(transformClaw(ctx, ts, dest, dir));
|
oxReturnError(transformClaw(ctx, ts, dest, dir));
|
||||||
} else {
|
} 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 {};
|
return {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user