[jasper/world] Add World Person TileSheet template
Some checks failed
Build / build (push) Failing after 1m13s
Some checks failed
Build / build (push) Failing after 1m13s
This commit is contained in:
parent
0f5f41de64
commit
a5e089b6ae
@ -12,12 +12,14 @@
|
||||
namespace jasper::world {
|
||||
|
||||
static class: public studio::Module {
|
||||
|
||||
ox::Vector<studio::EditorMaker> editors(studio::StudioContext &ctx) const noexcept override {
|
||||
return {
|
||||
studio::editorMaker<WorldObjectSetEditorImGui>(ctx, FileExt_jwob),
|
||||
studio::editorMaker<WorldEditorImGui>(ctx, FileExt_jwld),
|
||||
};
|
||||
}
|
||||
|
||||
ox::Vector<ox::UPtr<studio::ItemMaker>> itemMakers(studio::StudioContext&) const noexcept override {
|
||||
ox::Vector<ox::UPtr<studio::ItemMaker>> out;
|
||||
out.emplace_back(ox::make<studio::ItemMakerT<WorldObjectSet>>(
|
||||
@ -26,7 +28,38 @@ static class: public studio::Module {
|
||||
"World", "Worlds", FileExt_jwld, ox::ClawFormat::Organic));
|
||||
return out;
|
||||
}
|
||||
} mod;
|
||||
|
||||
ox::Vector<ox::UPtr<studio::ItemTemplate>> itemTemplates(studio::StudioContext&) const noexcept override {
|
||||
ox::Vector<ox::UniquePtr<studio::ItemTemplate>> out;
|
||||
// Person TileSheet
|
||||
{
|
||||
ncore::TileSheetV4 ts;
|
||||
ts.bpp = 4;
|
||||
auto const addSheet = [&ts](
|
||||
ncore::TileSheetV4::SubSheet &ss,
|
||||
ox::StringParam name,
|
||||
int const cols,
|
||||
int const rows) -> auto& {
|
||||
return ss.subsheets.emplace_back(++ts.idIt, std::move(name), cols, rows, ts.bpp);
|
||||
};
|
||||
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<ncore::TileSheetV4>>(
|
||||
"Jasper World Person",
|
||||
std::move(ts)));
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
} const mod;
|
||||
|
||||
studio::Module const*studioModule() noexcept {
|
||||
return &mod;
|
||||
|
Loading…
x
Reference in New Issue
Block a user