-
Notifications
You must be signed in to change notification settings - Fork 43
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
Print centerprint messages to the console #159
Print centerprint messages to the console #159
Conversation
…e previous centerprint message
You seem to have included an unused global Do you have plans to call Con_CenterPrint() from other places? If not then IMO this should be inlined in SCR_CenterPrint(). |
Cheers. That was going to hold the previous message before I found
I don't think there are other places from where I would call it. You would prefer for the contents of |
Yes please, we can always split it out later if we find a reason to. |
All done. |
… center-aligning centerprint messages in the console.
…about too-long messages.
Signed-off-by: bones_was_here <[email protected]>
Signed-off-by: bones_was_here <[email protected]>
Parm names and the printf attribute make IDEs and other tools more useful. Signed-off-by: bones_was_here <[email protected]>
Fixes printing an empty message when stepping out of the trigger on alk1.2 start.bsp, and repeated prints of the same message when those are triggered repeatedly. Signed-off-by: bones_was_here <[email protected]>
This code was OK, but if someone were to change the buffer size(s) such that line[] were smaller than msg[], or were to call Con_CenterPrintf() with a maxLineLength > 40, then a buffer overflow would have become possible. This patch prevents it. See #159 Signed-off-by: bones_was_here <[email protected]>
Fixes a bug introduced by me in #159 where a `svc_finale` message with the empty string could cause a previously displayed engine centreprint to appear again. Signed-off-by: bones_was_here <[email protected]>
Fixes a bug introduced by me in DarkPlacesEngine/DarkPlaces#159 where a `svc_finale` message with the empty string could cause a previously displayed engine centreprint to appear again. Signed-off-by: bones_was_here <[email protected]>
Add new function
Con_CenterPrint
which can be used to print messages to the console, without showing onscreen, and with a "horizontal rule" above and below. UseCon_CenterPrint
to log centerprint messages to the console.Fixes #98