载入中...
搜索中...
未找到
LevelEditorModule.cpp
浏览该文件的文档.
19std::unique_ptr<level_editing::TileBuffer> LevelEditorModule::newTileBuffer(int width, int height) const {
89 "EditorHistory", std::function<level_editing::EditorHistory*()>([]() { return nullptr; }), true);
113 "TileBufferTarget", std::function<level_editing::TileBufferTarget*()>([]() { return nullptr; }), true);
135 cls.addFunc("newHistory", [](LevelEditorModule* self) { return self->newHistory().release(); });
virtual void clearDirtyRegion()=0
Clears dirty region.
Hosts interchangeable editor tools and routes their lifecycle/input.
Definition EditorSession.h:30
Unity GridBrushBase-inspired tile brush. Operates on TileBuffer; exposes preview + change list for UI...
Definition Brush.h:16
int paintRect(TileBuffer *buffer, int x0, int y0, int x1, int y1, bool filled)
Paint rect.
Definition Brush.cpp:250
int paintLine(TileBuffer *buffer, int x0, int y0, int x1, int y1)
Paint line.
Definition Brush.cpp:243
int previewAt(TileBuffer *buffer, int tx, int ty)
Fill preview buffer without mutating target.
Definition Brush.cpp:257
int previewLine(TileBuffer *buffer, int x0, int y0, int x1, int y1)
Preview line.
Definition Brush.cpp:283
int paintAt(TileBuffer *buffer, int tx, int ty)
Apply current tool at / between cells. Returns cells changed.
Definition Brush.cpp:192
int previewRect(TileBuffer *buffer, int x0, int y0, int x1, int y1, bool filled)
Preview rect.
Definition Brush.cpp:290
void push(const std::string &name, const std::string &payload)
Pushes .
Definition EditorHistory.cpp:19
bool applyLastToBuffer(TileBuffer *buffer)
Compatibility-only nullable pointer projection of applyLastToBufferChecked().
Definition EditorHistory.cpp:106
int getLastTileNewGid(int index) const
Returns the last tile new gid.
Definition EditorHistory.cpp:134
int getLastTileOldGid(int index) const
Returns the last tile old gid.
Definition EditorHistory.cpp:130
Non-owning IIntFieldTarget adapter for TileBuffer.
Definition FieldTargets.h:23
FieldWriteStatus writeInt(int x, int y, int value) override
Writes int.
Definition FieldTargets.cpp:14
Independent GID grid for map brushes (no hard dependency on map.TileLayer).
Definition TileBuffer.h:11
bool containsCell(int x, int y) const
Return whether a cell belongs to this buffer.
Definition TileBuffer.cpp:35
Script composition adapter for tile-oriented level authoring.
Definition LevelEditorModule.h:23
std::unique_ptr< level_editing::TileBufferTarget > newTarget(std::string id, level_editing::TileBuffer *buffer) const
Create a non-owning editable target over a tile buffer.
Definition LevelEditorModule.cpp:31
std::unique_ptr< level_editing::EditorHistory > newHistory() const
Create a tile-aware undo history. @ownership Transfers unique ownership to the caller.
Definition LevelEditorModule.cpp:27
void bind(editor::EditorSession *session, level_editing::TileBufferTarget *target) const
Bind a borrowed tile target to a borrowed editor session.
Definition LevelEditorModule.cpp:36
std::unique_ptr< level_editing::Brush > newBrush() const
Create a tile brush. @ownership Transfers unique ownership to the caller.
Definition LevelEditorModule.cpp:23
std::unique_ptr< level_editing::TileBuffer > newTileBuffer(int width, int height) const
Create an independent GID grid. @ownership Transfers unique ownership to the caller.
Definition LevelEditorModule.cpp:19
Definition LevelEditorModule.cpp:15
Definition Container.h:602