How theniteswhosay/chkdraft works
Chkdraft is a Windows map editor intended as a remake of Scmdraft. Its principal workflow is editing a StarCraft map through the desktop interface and saving map data; the tree also shows dedicated editors for terrain, actors, map settings, and triggers. MappingCore contains scenario, CHK, archive, and rendering modules, while Chkdraft has UI and graphics layers. The sampled code confirms app startup, asset-change handling, and a separate map-rendering utility; wiring between most editor subsystems is not shown, so uncertain links are omitted.
Main entry points: mpq_asset_manager.cpp Asset changes · gfx_util.cpp Graphics utility · main.cpp App entry · renderer.cpp Map renderer
Components 19
Desktop editor
- App entry
src/main.cpp - Chkdraft app
src/chkdraft/chkdraft.cpp - Map interface
src/chkdraft/ui/main_windows/gui_map.cpp - Map editors
src/chkdraft/ui/dialog_windows - Profiles and plugins
src/chkdraft/mapping/chkd_profiles.cpp
Map data
- Scenario state
src/mapping_core/scenario.cpp - CHK map data
src/mapping_core/chk.cpp - Map files
src/mapping_core/map_file.cpp - Archive access
src/mapping_core/mpq_file.cpp - Asset changes
src/mapping_core/mpq_asset_manager.cpp - Session asset store
src/mapping_core/mpq_file.cpp
Map content
- Trigger editing
src/chkdraft/ui/dialog_windows/trig_editor/trig_editor.cpp - Text triggers
src/mapping_core/text_trig_compiler.cpp - Map settings
src/chkdraft/ui/dialog_windows/map_settings/map_settings.cpp - Units and sprites
src/mapping_core/render/map_actor.cpp
Rendering
- Graphics utility
src/map_gfx_utils/gfx_util.cpp - Map renderer
src/map_gfx_utils/renderer.cpp - Map graphics
src/mapping_core/render/sc_gl_graphics.cpp
Other components
- Map author
Connections 7
- Map author → App entry: starts
- App entry → Chkdraft app: runs
- Graphics utility → Scenario state: creates map
- Graphics utility → Map renderer: creates renderer
- Map renderer → Scenario state: renders
- Asset changes → Session asset store: stores assets
- Asset changes → Archive access: saves changes