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

rename sbw_secret->sbw_announce, announce level in central message #2064

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

rfomin
Copy link
Collaborator

@rfomin rfomin commented Dec 2, 2024

Don't colorize secret message.

Fix #2039 Also fix [doomworld]

Copy link
Owner

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

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

Nope, secret messages remain gold.

@rfomin
Copy link
Collaborator Author

rfomin commented Dec 2, 2024

Nope, secret messages remain gold.

Should level name announce also be gold?

@fabiangreffrath
Copy link
Owner

I'd say they shouldn't be in the center of the screen in the first place.

@rfomin
Copy link
Collaborator Author

rfomin commented Dec 2, 2024

I'd say they shouldn't be in the center of the screen in the first place.

I played some WADs with it and I like it. I think it's a good idea.

@rfomin
Copy link
Collaborator Author

rfomin commented Dec 2, 2024

Nope, secret messages remain gold.

Done in 0930831

@fabiangreffrath
Copy link
Owner

Thanks!

@@ -142,12 +144,19 @@ static void UpdateSecretMessage(sbe_widget_t *widget, player_t *player)
return;
}

static char string[80];
Copy link
Owner

Choose a reason for hiding this comment

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

The level title won't be displayed if hud_secret_message == 0.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 85bc7ef

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks!

As it is now, the "secret revealed" message immediately overrides the map announcement if the player starts the map in a sector tagged as secret. Is this intended? Could we show both messages on two lines probably?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As it is now, the "secret revealed" message immediately overrides the map announcement if the player starts the map in a sector tagged as secret. Is this intended?

Yes, it's intended. For me, the secret message is more important than the level title, but we can change the priority if you prefer. By the way, what is this map?

Could we show both messages on two lines probably?

It won't look good.

Copy link
Owner

Choose a reason for hiding this comment

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

By the way, what is this map?

A copy of MAP01 with the starting sector tagged as secret. 😁

I have seen a map like this in the wild, but couldn't remember which it was.

Copy link
Owner

Choose a reason for hiding this comment

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

BTW, why do we clear the line and add the string again during each tic for this widget? The strings aren't going to change anyway.

Copy link
Collaborator Author

@rfomin rfomin Dec 3, 2024

Choose a reason for hiding this comment

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

Strings can change, e.g. if the player enters a secret sector while the map announce is still on. Note that no strings are copied every tic, only pointers.
I check if lines array is not empty in widget drawing function.
We can check if (string[0] == '/0'), but this code is more complicated and there is no performance benefit - no strings are copied anyway.

@rfomin rfomin merged commit d11167d into fabiangreffrath:master Dec 3, 2024
8 checks passed
@rfomin rfomin deleted the announce_widget branch December 3, 2024 12:02
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.

Swap Positions of Secret and Level Title Messages
2 participants