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