Skip to content
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

Fix minimap update in dungeon #171

Merged
merged 1 commit into from
Apr 24, 2022
Merged

Conversation

Baoulettes
Copy link
Contributor

Thanks to Rozelette for this method !

Nice zombie minimap isn't it?

Thanks to Rozelette for this method !
@@ -664,6 +664,7 @@ void Minimap_Draw(GlobalContext* globalCtx) {
if (CHECK_DUNGEON_ITEM(DUNGEON_MAP, mapIndex)) {
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha);

gSPInvalidateTexCache(OVERLAY_DISP++, interfaceCtx->mapSegment);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be placed in a more conservative location? Such as when interfaceCtx->mapSegment changes, so perhaps at the end of Map_InitData.

Generally, texture cache invalidates should happen as infrequently as possible for maximum performance.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Baoulettes Any luck finding a more conservative location?

Copy link
Contributor Author

@Baoulettes Baoulettes Apr 21, 2022

Choose a reason for hiding this comment

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

Right now I am not sure if that finding better place.
I have no idea if opening disp and doing an InvalidateTexCache is better but if it is I would have done it in the end of Map_initData like Rozelette suggested work fine
I would have done it this way :

OPEN_DISPS(globalCtx->state.gfxCtx, "../z_map_exp.c", 626);
gSPInvalidateTexCache(OVERLAY_DISP++, interfaceCtx->mapSegment);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_map_exp.c", 782);
But I am not sure of the impact of it

@Rozelette
Copy link
Contributor

Nice! I'm glad that I could help. Enabling the texture cache happened somewhat close to release, so I wouldn't be surprised if there's still a few places where we need to do invalidation.

@jbodner09
Copy link
Contributor

Looks like this should close #24

@Kenix3 Kenix3 merged commit 7d26b32 into HarbourMasters:develop Apr 24, 2022
@Baoulettes Baoulettes deleted the patch-2 branch May 7, 2022 06:36
PurpleHato pushed a commit to PurpleHato/Shipwright that referenced this pull request Jun 23, 2022
Kenix3 pushed a commit to Kenix3/Shipwright that referenced this pull request Oct 19, 2022
Thanks to Rozelette for this method !
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.

4 participants