Add in-game level editor with auto-discovered tile/entity palettes
Implements a full level editor that runs inside the game engine as an alternative mode, accessible via --edit flag or E key during gameplay. The editor auto-discovers available tiles from the tileset texture and entities from a new central registry, so adding new game content automatically appears in the editor without any editor-specific changes. Editor features: tile painting (pencil/eraser/flood fill) across 3 layers, entity placement with drag-to-move, player spawn point tool, camera pan/zoom, grid overlay, .lvl save/load, map resize, and test play (P to play, ESC to return to editor). Supporting changes: - Entity registry centralizes spawn functions (replaces strcmp chain) - Mouse input + raw keyboard access added to input system - Camera zoom support for editor overview - Zoom-aware rendering in tilemap, renderer, and sprite systems - Powerup and drone sprites/animations wired up (were defined but unused) - Bitmap font renderer for editor UI (4x6 pixel glyphs, no dependencies)
This commit is contained in:
@@ -16,6 +16,13 @@ ENTITY grunt 9 16
|
||||
ENTITY flyer 20 10
|
||||
ENTITY flyer 30 8
|
||||
|
||||
# Hazards
|
||||
ENTITY turret 33 4
|
||||
ENTITY flame_vent 18 19
|
||||
ENTITY force_field 35 17
|
||||
ENTITY platform 12 11
|
||||
ENTITY platform_v 27 12
|
||||
|
||||
# Tile definitions: ID TEX_X TEX_Y FLAGS
|
||||
# Flag 1 = SOLID, Flag 2 = PLATFORM
|
||||
TILEDEF 1 0 0 1
|
||||
|
||||
Reference in New Issue
Block a user