[jasper/world] Update for new Olympic changes
This commit is contained in:
parent
62a3066c7c
commit
5c125bda26
@ -13,14 +13,14 @@ namespace jasper::world {
|
||||
|
||||
static class: public studio::Module {
|
||||
|
||||
ox::Vector<studio::EditorMaker> editors(studio::StudioContext &ctx) const noexcept override {
|
||||
ox::Vector<studio::EditorMaker> editors(studio::Context &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>> itemMakers(studio::Context&) const noexcept override {
|
||||
ox::Vector<ox::UPtr<studio::ItemMaker>> out;
|
||||
out.emplace_back(ox::make<studio::ItemMakerT<WorldObjectSet>>(
|
||||
"World Object Set", "WorldObjectSets", FileExt_jwob, ox::ClawFormat::Organic));
|
||||
@ -29,7 +29,7 @@ static class: public studio::Module {
|
||||
return out;
|
||||
}
|
||||
|
||||
ox::Vector<ox::UPtr<studio::ItemTemplate>> itemTemplates(studio::StudioContext&) const noexcept override {
|
||||
ox::Vector<ox::UPtr<studio::ItemTemplate>> itemTemplates(studio::Context&) const noexcept override {
|
||||
ox::Vector<ox::UniquePtr<studio::ItemTemplate>> out;
|
||||
// Person TileSheet
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ constexpr ox::Point fbPtToTileAddr(
|
||||
};
|
||||
}
|
||||
|
||||
WorldEditorImGui::WorldEditorImGui(studio::StudioContext &sctx, ox::StringParam path):
|
||||
WorldEditorImGui::WorldEditorImGui(studio::Context &sctx, ox::StringParam path):
|
||||
Editor(sctx, std::move(path)),
|
||||
m_sctx{sctx},
|
||||
m_objSetPicker{"Object Set Chooser", keelCtx(m_sctx), FileExt_jwob},
|
||||
@ -89,7 +89,7 @@ WorldEditorImGui::WorldEditorImGui(studio::StudioContext &sctx, ox::StringParam
|
||||
});
|
||||
}
|
||||
|
||||
void WorldEditorImGui::draw(studio::StudioContext&) noexcept {
|
||||
void WorldEditorImGui::draw(studio::Context&) noexcept {
|
||||
auto const paneSize = ImGui::GetContentRegionAvail();
|
||||
{
|
||||
constexpr auto resourcesWidth = 300.f;
|
||||
|
@ -21,7 +21,7 @@ class WorldEditorImGui: public studio::Editor {
|
||||
studio::SelectionTracker m_selTracker;
|
||||
ox::Optional<studio::Selection> m_selection;
|
||||
uint8_t m_activeLayer{};
|
||||
studio::StudioContext &m_sctx;
|
||||
studio::Context &m_sctx;
|
||||
studio::FilePickerPopup m_objSetPicker;
|
||||
WorldDoc m_doc;
|
||||
struct ObjSetRef {
|
||||
@ -49,9 +49,9 @@ class WorldEditorImGui: public studio::Editor {
|
||||
} m_sizeEditor;
|
||||
|
||||
public:
|
||||
WorldEditorImGui(studio::StudioContext &sctx, ox::StringParam path);
|
||||
WorldEditorImGui(studio::Context &sctx, ox::StringParam path);
|
||||
|
||||
void draw(studio::StudioContext&) noexcept final;
|
||||
void draw(studio::Context&) noexcept final;
|
||||
|
||||
void onActivated() noexcept override;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace jasper::world {
|
||||
|
||||
WorldEditorView::WorldEditorView(studio::StudioContext &sctx, WorldStatic const&worldStatic):
|
||||
WorldEditorView::WorldEditorView(studio::Context &sctx, WorldStatic const&worldStatic):
|
||||
m_sctx{sctx},
|
||||
m_nctx{ngfx::init(m_sctx.tctx, {.glInstallDrawer = false}).unwrapThrow()},
|
||||
m_worldStatic{worldStatic},
|
||||
|
@ -22,7 +22,7 @@ namespace ngfx = nostalgia::gfx;
|
||||
class WorldEditorView: public ox::SignalHandler {
|
||||
|
||||
private:
|
||||
studio::StudioContext &m_sctx;
|
||||
studio::Context &m_sctx;
|
||||
ox::UPtr<ngfx::Context> m_nctx;
|
||||
WorldStatic const&m_worldStatic;
|
||||
int m_columns{}, m_rows{};
|
||||
@ -35,7 +35,7 @@ class WorldEditorView: public ox::SignalHandler {
|
||||
bool m_animateWorld{};
|
||||
|
||||
public:
|
||||
WorldEditorView(studio::StudioContext &ctx, WorldStatic const&worldStatic);
|
||||
WorldEditorView(studio::Context &ctx, WorldStatic const&worldStatic);
|
||||
|
||||
ox::Error setupTile(uint32_t lyr, uint32_t x, uint32_t y) noexcept;
|
||||
|
||||
|
@ -11,7 +11,7 @@ CollisionMap mapIdx(auto x, auto y) noexcept {
|
||||
+ static_cast<CollisionMap>(x);
|
||||
}
|
||||
|
||||
CollisionView::CollisionView(studio::StudioContext &sctx):
|
||||
CollisionView::CollisionView(studio::Context &sctx):
|
||||
m_nctx(ngfx::init(sctx.tctx, {
|
||||
.glInstallDrawer = false,
|
||||
.glSpriteCount = 0,
|
||||
|
@ -28,7 +28,7 @@ class CollisionView {
|
||||
MapTileHighlighter m_highlighter;
|
||||
|
||||
public:
|
||||
CollisionView(studio::StudioContext &sctx);
|
||||
CollisionView(studio::Context &sctx);
|
||||
|
||||
ox::Error setup(
|
||||
ox::FileAddress const&tsAddr,
|
||||
|
@ -22,7 +22,7 @@ namespace ig = studio::ig;
|
||||
constexpr auto btnSize = ImVec2{22, ig::BtnSz.y};
|
||||
|
||||
WorldObjectSetEditorImGui::WorldObjectSetEditorImGui(
|
||||
studio::StudioContext &sctx,
|
||||
studio::Context &sctx,
|
||||
ox::StringParam path):
|
||||
Editor(sctx, std::move(path)),
|
||||
m_sctx{sctx},
|
||||
@ -43,7 +43,7 @@ WorldObjectSetEditorImGui::WorldObjectSetEditorImGui(
|
||||
buildPaletteDisplayNameList();
|
||||
}
|
||||
|
||||
void WorldObjectSetEditorImGui::draw(studio::StudioContext&) noexcept {
|
||||
void WorldObjectSetEditorImGui::draw(studio::Context&) noexcept {
|
||||
const auto paneSize = ImGui::GetContentRegionAvail();
|
||||
constexpr auto resourcesWidth = 300.f;
|
||||
ImGui::BeginChild("ObjEditor", {paneSize.x - resourcesWidth, 0});
|
||||
|
@ -15,7 +15,7 @@ namespace jasper::world {
|
||||
class WorldObjectSetEditorImGui: public studio::Editor {
|
||||
|
||||
private:
|
||||
studio::StudioContext &m_sctx;
|
||||
studio::Context &m_sctx;
|
||||
ox::String m_itemPath;
|
||||
WorldObjectSet m_doc;
|
||||
keel::AssetRef<ngfx::TileSheet> m_tileSheet;
|
||||
@ -35,9 +35,9 @@ class WorldObjectSetEditorImGui: public studio::Editor {
|
||||
} m_objEditor;
|
||||
|
||||
public:
|
||||
WorldObjectSetEditorImGui(studio::StudioContext &sctx, ox::StringParam path);
|
||||
WorldObjectSetEditorImGui(studio::Context &sctx, ox::StringParam path);
|
||||
|
||||
void draw(studio::StudioContext&) noexcept final;
|
||||
void draw(studio::Context&) noexcept final;
|
||||
|
||||
void onActivated() noexcept override;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
namespace studio {
|
||||
|
||||
static constexpr ox::Array<uint8_t, 327> WindowIcon480Data {
|
||||
static const ox::Array<uint8_t, 327> WindowIcon480Data {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00,
|
||||
0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x01, 0xe0,
|
||||
0x00, 0x00, 0x01, 0xe0, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00,
|
||||
@ -43,7 +43,7 @@ static constexpr ox::Array<uint8_t, 327> WindowIcon480Data {
|
||||
|
||||
ox::SpanView<uint8_t> WindowIcon480() noexcept { return WindowIcon480Data; }
|
||||
|
||||
static constexpr ox::Array<uint8_t, 9784> WindowIcon1080Data {
|
||||
static const ox::Array<uint8_t, 9784> WindowIcon1080Data {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00,
|
||||
0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x04, 0x38,
|
||||
0x00, 0x00, 0x04, 0x38, 0x02, 0x03, 0x00, 0x00, 0x00, 0x91,
|
||||
|
Loading…
x
Reference in New Issue
Block a user