mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
update vcm::parse semantics
This commit is contained in:
parent
c34cb57fb8
commit
6760d16052
4 changed files with 55 additions and 51 deletions
|
|
@ -57,11 +57,14 @@ static int l_parse_model(lua::State* L) {
|
|||
auto name = lua::require_string(L, 3);
|
||||
|
||||
if (format == "xml" || format == "vcm") {
|
||||
auto vcmModel = vcm::parse(name, string, format == "xml");
|
||||
engine->getAssets()->store(
|
||||
vcm::parse(name, string, format == "xml"), name
|
||||
std::make_unique<model::Model>(std::move(vcmModel.squash())), name
|
||||
);
|
||||
} else {
|
||||
throw std::runtime_error("unknown format " + util::quote(std::string(format)));
|
||||
throw std::runtime_error(
|
||||
"unknown format " + util::quote(std::string(format))
|
||||
);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue