Skip to content

Comments

Fix the GoldenrodUndergroundSwitchRoomEntrances door-switch macros#1245

Open
Rangi42 wants to merge 1 commit intopret:masterfrom
Rangi42:underground-switch-room
Open

Fix the GoldenrodUndergroundSwitchRoomEntrances door-switch macros#1245
Rangi42 wants to merge 1 commit intopret:masterfrom
Rangi42:underground-switch-room

Conversation

@Rangi42
Copy link
Member

@Rangi42 Rangi42 commented Feb 23, 2026

Bulbapedia documents how the Goldenrod Underground switch room works:

...the basement maze involves three switches along the north wall, labelled 1 to 3 from right to left, that, when turned on or off, open or close doors in the maze. The doors are internally numbered according to the following diagram:

image

The ugdoor_def and changeugdoor macros in this PR correspond to that diagram.

The previous ugdoor and doorstate macros had a number of problems:

  • They had swapped X and Y values
  • They confused the OPEN and CLOSED block IDs
  • They declared 16 doors, when actually there are 6 horizontal doors and 5 vertical ones, with the vertical ones using 2 blocks each
  • They declared 14 EVENT_SWITCH_ flags, when actually there are 3 switches and 11 door states

I did not keep the original macro names, partly because I think the new ones better match typical script commands (changedoorstate vs changeblock, ugdoor_def vs warp_def) and partly to avoid any confusion about whether someone's code has old vs new behavior.

Mostly what I'm looking for in a review is feedback on whether I'm going too far with macros and for loops.

@Rangi42 Rangi42 requested review from dannye and mid-kid February 23, 2026 04:28
@Rangi42 Rangi42 force-pushed the underground-switch-room branch from 5e05cb5 to 984b842 Compare February 23, 2026 04:39
Rangi42 added a commit to Rangi42/polishedcrystal that referenced this pull request Feb 23, 2026
@Rangi42
Copy link
Member Author

Rangi42 commented Feb 23, 2026

This is an example of what it looks like to shift/change all the door coordinates and IDs: Rangi42/polishedcrystal@46f7d69#diff-c0a6db620bab535fdf6d747b731136e0a9160cf1a95711d4801da7d7e1e34b3d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant