Fix TileDef rendering at (0,0) and open editor with current level
Remove the (tex_x || tex_y) guard in tilemap_render_layer() that silently ignored TileDefs pointing to tileset position (0,0). The tile_def_count check alone is sufficient to distinguish defined from undefined tiles. Sync the editor palette to use TileDef tex coords when available, fixing the mismatch where the palette showed tiles by sequential grid position while the canvas used TileDef coordinates. Save all TileDef entries unconditionally to prevent round-trip data loss for tiles at position (0,0) with no flags. Track the active level file path so pressing E during gameplay opens the editor with that level loaded instead of a blank canvas.
This commit is contained in:
@@ -130,11 +130,11 @@ Current directives: `TILESET`, `SIZE`, `SPAWN`, `GRAVITY`, `BG_COLOR`, `MUSIC`,
|
||||
1. **Mars Surface** - Low gravity, red surface, spacey, little to no obstacles, transition area is entry to base
|
||||
2. **Mars Base** - Normal gravity, very vertical, narrow, 90 degree turns, lots of enemies
|
||||
3. **Derelict Station** — Low gravity, dark, flickering lights, abandoned corridors
|
||||
4. **Desert Planet** — High gravity, sand storm wind, bright orange palette
|
||||
5. **Gas Giant Moon** — Very low gravity, floating platforms, toxic atmosphere
|
||||
4. **Desert Planet (Saturn)** — High gravity, sand storm wind, bright orange palette
|
||||
5. **Gas Giant (Jupiter)** — Very low gravity, floating platforms, toxic atmosphere
|
||||
6. **Asteroid Belt** — Zero-G sections, small disconnected platforms
|
||||
7. **Space Freighter** — Normal gravity, tight corridors, turret enemies
|
||||
8. **Volcanic World** — Normal gravity, rising lava hazard, fire enemies
|
||||
8. **Ice World** — Normal gravity, strong winds, slippery surface
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user