From 8173c95fc599603bb0d3f7c5226b698757b71121 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 31 May 2025 00:31:46 -0500 Subject: [PATCH] [jasper/world/studio] Simplify Person template --- .../modules/world/src/studio/studiomodule.cpp | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/src/jasper/modules/world/src/studio/studiomodule.cpp b/src/jasper/modules/world/src/studio/studiomodule.cpp index 889d12a..09019cf 100644 --- a/src/jasper/modules/world/src/studio/studiomodule.cpp +++ b/src/jasper/modules/world/src/studio/studiomodule.cpp @@ -32,30 +32,27 @@ static class: public studio::Module { ox::Vector> itemTemplates(studio::Context&) const noexcept override { ox::Vector> 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>( - "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>( + "Jasper World Person", + std::move(ts))); return out; }