[jasper/world/studio] Cleanup
This commit is contained in:
parent
e2e5240bae
commit
ace11f392b
@ -12,11 +12,9 @@ namespace jasper::world {
|
||||
ModifyTilesCommand::ModifyTilesCommand(
|
||||
WorldDoc &doc,
|
||||
WorldStatic &worldStatic,
|
||||
ObjectCache &objCache,
|
||||
ox::Vector<Mod> mods):
|
||||
m_doc(doc),
|
||||
m_worldStatic(worldStatic),
|
||||
m_objCache(objCache),
|
||||
m_mods(std::move(mods)) {
|
||||
auto const unchanged = [this](Mod const&mod) {
|
||||
auto const&docTile = tile(m_doc, mod.layer, mod.tileAddr.x, mod.tileAddr.y);
|
||||
|
@ -21,13 +21,11 @@ class ModifyTilesCommand: public studio::UndoCommand {
|
||||
private:
|
||||
WorldDoc &m_doc;
|
||||
WorldStatic &m_worldStatic;
|
||||
ObjectCache &m_objCache;
|
||||
ox::Vector<Mod> m_mods;
|
||||
public:
|
||||
ModifyTilesCommand(
|
||||
WorldDoc &doc,
|
||||
WorldStatic &worldStatic,
|
||||
ObjectCache &objCache,
|
||||
ox::Vector<Mod> mods);
|
||||
ox::Error redo() noexcept override;
|
||||
ox::Error undo() noexcept override;
|
||||
|
@ -150,7 +150,6 @@ void WorldEditorImGui::cut() noexcept {
|
||||
std::ignore = pushCommand<ModifyTilesCommand>(
|
||||
m_doc,
|
||||
m_worldStatic,
|
||||
m_objCache,
|
||||
std::move(mods));
|
||||
}
|
||||
}
|
||||
@ -175,7 +174,6 @@ void WorldEditorImGui::paste() {
|
||||
std::ignore = pushCommand<ModifyTilesCommand>(
|
||||
m_doc,
|
||||
m_worldStatic,
|
||||
m_objCache,
|
||||
std::move(mods));
|
||||
}
|
||||
}
|
||||
@ -386,7 +384,6 @@ ox::Error WorldEditorImGui::handleDrop(float fbPaneScale) noexcept {
|
||||
std::ignore = pushCommand<ModifyTilesCommand>(
|
||||
m_doc,
|
||||
m_worldStatic,
|
||||
m_objCache,
|
||||
std::move(mods));
|
||||
}
|
||||
OX_RETURN_ERROR(loadWorldStatic(keelCtx(m_sctx), m_objCache, m_doc).moveTo(m_worldStatic));
|
||||
|
Loading…
x
Reference in New Issue
Block a user