-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "More info in file select" enhancement #3053
Add "More info in file select" enhancement #3053
Conversation
Visually, I have a tiny nitpick for the double defence going vertically instead of horizontally, which makes them overlapping the FILE title holder |
The reason it goes vertically instead of horizontally is that the numbers of the counter are tied to the icon, so if I shifted it horizontally the numbers would follow one heart instead of being in the middle of them. Also the positions of icons are constant in the current system so that's another reason why I chose to have them vertically (the top one appears or disappears and the bottom one is always there). |
I see, I wonder if it would be possible to create a "dummy" icon that would be hidden and the size of the double defence one which will be used for the number tracking and basically overlay itself at the center of your hearts display? I'm just throwing some idea on top of my head right now |
The only way that'd work would be with 4 icons; the dummy one, the normal hearts one and one for each of the double defense hearts. I could move the double defense icon slightly down so it doesn't overlay the FILE box as much. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the implementation looks clean and the patterns used are easy to follow. Left some minor comments and suggestions below.
@@ -956,6 +956,8 @@ void DrawEnhancementsMenu() { | |||
"This might affect other decal effects\n"); | |||
UIWidgets::PaddedEnhancementSliderInt("Text Spacing: %d", "##TEXTSPACING", "gTextSpacing", 4, 6, "", 6, true, true, true); | |||
UIWidgets::Tooltip("Space between text characters (useful for HD font textures)"); | |||
UIWidgets::PaddedEnhancementCheckbox("More info in file select", "gFileSelectMoreInfo", true, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should move to the Gameplay submenu instead. Although it renders icons, it doesn't really feel like a graphics option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though I'm still not a fan of it's current location, the randomizer enhancements submenu is probably better for this. It should also be enabled by default similar to the other randomizer enhancements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a randomizer enhancemet specifically, it works with vanilla and mq save files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature is not limited to randomizer saves, so that may be confusing. Unless we would rather it be forced on for rando saves, and instead the toggle is only used for vanilla/mq saves?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like that would also be weird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, I guess I hadn't considered it being useful outside of rando. disregard my comment then. Default on for rando would be nice to be consistent with zootr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code is very clean great work!
Only minor feedback I have is we can probably remove the != 0;
and == 0
for ints that are effectively bools, especially when the function name makes the return type obvious (HasItem and ShouldRenderItem)
I believe they did that because the return type is a different size to the evaluated return statement. I think it would be better to either shift the bits right rather than the flag to the left to effectively make it a bool or just leave it as is since the item tracker apparently does this anyway. |
The reason some of these were added was because when checking for certain values, like quest items with an index over 7, the value would be truncated and would return 0 even if you had the item. |
In this case that makes sense: return (Save_GetSaveMetaInfo(fileIndex)->questItems & (1 << (item - 0x66))) != 0; But not so much in these cases HasItem(fileIndex, ITEM_MASK_GORON) == 0
ShouldRenderItem(fileIndex, data->item) != 0
CVarGetInteger("gFileSelectMoreInfo", 0) == 0 |
Removed the unneeded checks |
Just a thought, have you considered checking if this works with texture packs? We do still have the bugged song display in the item tracker when high-res textures are used, and figured either that would also apply here and should be looked into, or this already accounts for it and the process could be applied to the item tracker. |
I have not checked it with texture packs, I assume it's also broken. I did notice that the textures that are broken on the check tracker are the ones in ia8 format, so it's probably a bug in the decoding of ia8 textures or packs saving them in the wrong format (rgba instead of ia). |
OK, so Archez actually just mentioned he figured out the song icons thing, so you shouldn't have to worry. |
Marking this as merge ready, will let it simmer for a bit longer before merging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Only recommendation I have based on earlier conversation is maybe we can change this from a toggle to a dropdown similar to "Allow cursor over empty slots on pause screen", where there is a Never
, Only for Rando Saves
and Always
option.
But that doesn't need to block this PR as is, and can happen in a follow up PR if others agree.
I don't see why someone would want this but only for rando save files, that said, I can add it if others want it |
yes, having two hearts represents double defense, in n64 rando they're next to each other horizontally instead of vertically, the problem was explained before:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'm not the biggest fan of the stacked hearts for double defense, but that definitely shouldn't block merging. One little nit about abbreviated macro names but that also shouldn't block merging.
#define INV_IC_POS(x, y) {0x4E + ICON_SIZE * x, 0x00 + ICON_SIZE * y} | ||
#define EQP_IC_POS(x, y) {0x7E + ICON_SIZE * x, 0x2A + ICON_SIZE * y} | ||
#define SNG_IC_POS(x, y) {0x49 + SONG_WIDTH * x, 0x45 + SONG_HEIGHT * y} | ||
#define UPG_IC_POS(x, y) {0x5A + ICON_SIZE * x, 0x2A + ICON_SIZE * y} | ||
#define STN_IC_POS(i) {0x29 + ICON_SIZE * i, 0x31} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it'd be nice to have these named without abbreviations
Adds the "More info in file select" enhancement which shows the items that you've obtained similarly to how n64 randomizer does it.
Here is a 100% vanilla save file:
Here is a new vanilla save file:
Here is a new randomizer save file:
This doesn't apply when copying or erasing save files:
This PR also changes the spoiler log seed hash icons to only appear on quest selection and the file hash icons to appear at the top when a randomizer save file is selected.