Upgrade level editor for moon campaign support
Preserve tileset path and parallax style on save instead of hardcoding tileset.png. Add tileset cycling (T key), tile flag editing (F key for solid/platform/hazard/none), and 8x8 pixel mini-icons for all entity types in the palette and canvas. Fix entity palette not appearing when editor starts without a prior level load by splitting entity_registry_init into populate and init phases. Fix bitmap font rendering dropping the top row by correcting FONT_H from 6 to 7. Widen toolbar button spacing. Fix invisible collision from placed tiles lacking TileDefs by calling ensure_tile_def on pencil and fill placement. Fix editor hotkeys not working in the web build by latching key presses from SDL_KEYDOWN events instead of comparing keyboard state snapshots.
This commit is contained in:
@@ -47,6 +47,7 @@ typedef struct Tilemap {
|
||||
int tile_def_count;
|
||||
SDL_Texture *tileset;
|
||||
int tileset_cols; /* columns in tileset image */
|
||||
char tileset_path[ASSET_PATH_MAX]; /* tileset file path */
|
||||
Vec2 player_spawn;
|
||||
float gravity; /* level gravity (px/s^2), 0 = use default */
|
||||
char music_path[ASSET_PATH_MAX]; /* level music file path */
|
||||
|
||||
Reference in New Issue
Block a user