feat(editor): complete level editor integration and fixes - #173
Open
alfonsoalvarohervas-sudo wants to merge 1 commit into
Open
feat(editor): complete level editor integration and fixes#173alfonsoalvarohervas-sudo wants to merge 1 commit into
alfonsoalvarohervas-sudo wants to merge 1 commit into
Conversation
alfonsoalvarohervas-sudo
force-pushed
the
feature/level-editor-clean
branch
2 times, most recently
from
July 22, 2026 23:07
fc6f9d7 to
b6ae548
Compare
alfonsoalvarohervas-sudo
marked this pull request as draft
July 23, 2026 01:03
alfonsoalvarohervas-sudo
marked this pull request as ready for review
July 23, 2026 01:06
alfonsoalvarohervas-sudo
marked this pull request as draft
July 23, 2026 01:07
alfonsoalvarohervas-sudo
force-pushed
the
feature/level-editor-clean
branch
from
July 23, 2026 20:56
b6ae548 to
160d63d
Compare
alfonsoalvarohervas-sudo
marked this pull request as ready for review
July 23, 2026 21:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As requested in the feedback for splitting PR #165 , this Pull Request isolates the Level Editor feature. It has been built and rebased cleanly against the latest
upstream/master, removing all unrelated engine bugfixes.This feature allows developer/modder painting and saving of custom level maps directly from the GBA PC port runtime using an ImGui overlay.
Detailed Changes per File
port/port_level_editor.cpp(NEW)SaveCurrentRoom) to output binary file layouts toedited_levels/area%02X_room%02X.bin.Port_LevelEditor_OnRoomLoad) to parse saved levels and rebuild collision matrices.SDL_Rendererprimitives (outline overlay, tile previews, overlay sidebar).port/port_level_editor.h(NEW)Port_LevelEditor_*) to integrate with the GBA engine and port layer.xmake.lua(MODIFIED)port/port_level_editor.cppto the compile list of the maintmc_pctarget.port/port_bios.c(MODIFIED)upstream/masterversion containing decoupled pacing variables.Port_PumpEventsusingPort_LevelEditor_HandleKeyto capture layout hotkeys.Port_LevelEditor_HandleMouseButton) and mouse motion (Port_LevelEditor_HandleMouseMotion) when the editor is active to intercept clicks and prevent forwarding inputs to the GBA game thread.port/port_imgui_menu.cpp(MODIFIED)"Map Editor"tab to the F8 Ribbon menu (DrawRibbonMapEditorTab).Port_LevelEditor_Renderright before ImGui presentation to draw overlays on the SDL backend.port/port_ppu.cpp(MODIFIED)upstream/masterversion.Port_PPU_VisibleFrameWidth()declaration toextern "C"so it can be resolved inside the C++ level editor module.src/playerUtils.c(MODIFIED)Port_LevelEditor_OnRoomLoad()to the end of the general room graphic initialization functionLoadRoomGfx(). This ensures edited room binaries are loaded cleanly on warps, saves, transitions, and startup.include/room.h(MODIFIED)RoomTransitiontoRoomTransitionTypeto avoid C++ linkage conflicts.src/game.c(RESTORED)upstream/master.Verification
dist/<REGION>/edited_levels/and load correctly upon room entry.sdlorsoftwarebackend for overlay drawing).