Skip to content

Conversation

@slaw-22
Copy link
Contributor

@slaw-22 slaw-22 commented Dec 31, 2025

No description provided.

@slaw-22 slaw-22 force-pushed the DungeonInit branch 3 times, most recently from d02ce55 to fb74272 Compare December 31, 2025 19:20
switch (dungeon_idx) {
default:
break;
case 0x26:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dungeon IDs in these switch statements correspond with the dungeon_id enum in enums.h, so let's swap those out here. 0x26 is DUNGEON_HIDDEN_LAND, for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered this, but I didn't want to give the impression that a dungeon index is the same as a dungeon ID.

They're closely linked, and there's a mapping table between index and id here: DUNGEON_SWAP_ID_TABLE.

What makes this even more tricky is that, in practice, the indexes are the same as the IDs, apart from 212 - 219 (inclusive), and the indexes referenced in this PR are always the same as the IDs.

I'm happy to use the ID enum if you feel this is the way to go. I've also asked AI how to use macros to define an ID enum and an index enum from a single source but it was messy. Suggestions are welcome.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, tricky. If defining multiple enums from one source is messy, then we can go the old-fashioned way and define a new dungeon_index enum separately from dungeon_id, with most of the data copied aside from IDs 212-219. You can leave a comment in the new enum mentioning the difference between it and dungeon_id.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thank you.

@slaw-22 slaw-22 force-pushed the DungeonInit branch 3 times, most recently from 303c74e to 404f722 Compare December 31, 2025 21:26
@AnonymousRandomPerson AnonymousRandomPerson merged commit 478bc10 into pret:main Dec 31, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Dec 31, 2025
@slaw-22 slaw-22 deleted the DungeonInit branch January 1, 2026 10:23
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.

2 participants