Skip to content

Map Editor

Vincent Liu edited this page Jan 9, 2023 · 2 revisions

Hierarchy

As far as map editing goes, the class hierarchy looks something like this.

image

  • The RagnarockMap class is a thin abstraction layer over the raw JSON map data.

  • The MapEditor class is responsible for making changes to the map, as well as handling other editing tasks, such as difficulty selection, copy/paste and undo/redo. Some of these are done via children classes, like EditManager.

  • The EditorGridController handles state changes in the Editing Grid and tells the MapEditor what changes to make to the map in response.

For UI actions that do not interface with the Editing Grid, the MainWindow will directly tell MapEditor what changes to make, without going through EditorGridController.

Also, MapEditor occasionally communicates to MainWindow and EditorGridController (via the former) to refresh data (e.g redraw grid, update difficulty buttons) on changes to the map. This kind of referencing isn't ideal and should probably be improved in future.

RagnarockMap class

TODO

Clone this wiki locally