[jasper/world/studio] Simplify Person template
All checks were successful
Build / build (push) Successful in 1m28s
All checks were successful
Build / build (push) Successful in 1m28s
This commit is contained in:
parent
e5eafba951
commit
8173c95fc5
@ -32,30 +32,27 @@ static class: public studio::Module {
|
|||||||
ox::Vector<ox::UPtr<studio::ItemTemplate>> itemTemplates(studio::Context&) const noexcept override {
|
ox::Vector<ox::UPtr<studio::ItemTemplate>> itemTemplates(studio::Context&) const noexcept override {
|
||||||
ox::Vector<ox::UniquePtr<studio::ItemTemplate>> out;
|
ox::Vector<ox::UniquePtr<studio::ItemTemplate>> out;
|
||||||
// Person TileSheet
|
// Person TileSheet
|
||||||
{
|
ngfx::TileSheetV5 ts;
|
||||||
ngfx::TileSheetV5 ts;
|
ts.bpp = 4;
|
||||||
ts.bpp = 4;
|
auto const addSheet = [&ts](
|
||||||
auto const addSheet = [&ts](
|
ngfx::TileSheetV5::SubSheet &ss,
|
||||||
ngfx::TileSheetV5::SubSheet &ss,
|
ox::StringParam name,
|
||||||
ox::StringParam name,
|
int const cols,
|
||||||
int const cols,
|
int const rows) -> auto& {
|
||||||
int const rows) -> auto& {
|
return ss.subsheets.emplace_back(++ts.idIt, std::move(name), cols, rows);
|
||||||
return ss.subsheets.emplace_back(++ts.idIt, std::move(name), cols, rows);
|
};
|
||||||
};
|
auto const addSheetSet = [&ts, &addSheet](ox::StringParam name) {
|
||||||
auto const addSheetSet = [&ts, &addSheet](ox::StringParam name) {
|
auto &s = addSheet(ts.subsheet, std::move(name), -1, -1);
|
||||||
auto &s = addSheet(ts.subsheet, std::move(name), -1, -1);
|
addSheet(s, "Still", 2, 3);
|
||||||
addSheet(s, "Still", 2, 3);
|
addSheet(s, "Step 1", 2, 3);
|
||||||
addSheet(s, "Step 1", 2, 3);
|
addSheet(s, "Step 2", 2, 3);
|
||||||
addSheet(s, "Step 2", 2, 3);
|
};
|
||||||
};
|
addSheetSet("Front");
|
||||||
addSheetSet("Front");
|
addSheetSet("Back");
|
||||||
addSheetSet("Back");
|
addSheetSet("Side");
|
||||||
addSheetSet("Left");
|
out.emplace_back(ox::make<studio::ItemTemplateT<ngfx::TileSheetV5>>(
|
||||||
addSheetSet("Right");
|
"Jasper World Person",
|
||||||
out.emplace_back(ox::make<studio::ItemTemplateT<ngfx::TileSheetV5>>(
|
std::move(ts)));
|
||||||
"Jasper World Person",
|
|
||||||
std::move(ts)));
|
|
||||||
}
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user