Skip to content

Fix dungeon entrance icon + feature#252

Merged
Kenix3 merged 3 commits intoHarbourMasters:developfrom
Baoulettes:fix-dungeon-entrance-icon
May 2, 2022
Merged

Fix dungeon entrance icon + feature#252
Kenix3 merged 3 commits intoHarbourMasters:developfrom
Baoulettes:fix-dungeon-entrance-icon

Conversation

@Baoulettes
Copy link
Contributor

This PR add Fixes submenu to include L&R Kaleido button color and this Dungeon icon on minimap. (under Enhancements menu)
It fixes the Dungeon Entrance icon that was not visible when it should be and was present when it should not.
Also it add the ability to show the dungeon entrance before finishing a dungeon.

This code also rework a bit the icon draw to make it a bit more readable.

Screen before fixes:
what an ugly top left icon

Screenshots after fixes:
no more icon
Nice head there

Here what the fix look next to GCN version
Compare

@Kenix3 Kenix3 merged commit 8c18b4b into HarbourMasters:develop May 2, 2022
@Baoulettes Baoulettes deleted the fix-dungeon-entrance-icon branch May 7, 2022 06:37
@vaguerant
Copy link
Contributor

vaguerant commented Jun 6, 2022

Is it still possible to have the original broken behavior after this change? Specifically the unnecessary top left icon behavior, I can't seem to reproduce that any more. Toggling gFixDungeonMinimapIcon to either state doesn't cause, e.g. the Hyrule Field dungeon map icon to appear for me.

Fixing/unfixing the other icon positions by toggling the CVar works normally.

EDIT: I think this might be a mistake:

if (gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2 != 0 && CVar_GetS32("gFixDungeonMinimapIcon", 1) != 0){

That first condition is where the bug fix happens, and that's evaluated regardless of whether the user has the bugfix CVar set, so it's no longer possible for the bugged behavior to occur regardless of CVar setting. I think you'd want to do something more like this, where the bug fix condition only occurs if the CVar is set.

if (CVar_GetS32("gFixDungeonMinimapIcon", 0) != 0 ? gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2 != 0 : 1 ) {

The ternary I'm using here will just return 1 if the CVar is not set, so that the code in the if will always run in that scenario, which looks like it was normal behavior before the bug fix.

Fixing that exposes a new problem, though. In the original bug, the dungeon entrance icon appeared at the top-left origin, whereas now the bugged Hyrule Field dungeon icon appears in a different location:

New bugged map icon placement

I think this is something to do with the margin adjustments introduced to align the icon with the right side of the screen, but my understanding of how those changes work is poor.

EDIT2: Also, once any further bugs with the bug (haha) are fixed, this should probably go back to being defaulted off like all the other fixes, per @Kenix3's statement on Discord.

aMannus pushed a commit to aMannus/Shipwright that referenced this pull request Jul 2, 2022
…t-skip

Skip ruto text box in jabu blue warp
Kenix3 pushed a commit to Kenix3/Shipwright that referenced this pull request Oct 19, 2022
* Add Cvar stuff and fix dungeon entrance icons

* Added Cvar toggles

* Move fixes to fix sub menu
Malkierian pushed a commit to Malkierian/Shipwright that referenced this pull request Nov 20, 2023
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.

3 participants