Conversation
Jbudone
commented
Dec 17, 2022
- Introduced speedometer similar to JoeQuake, useful for speedrunners
- Updated character draws to allow size specification
- Added helpful calls -- find best matching color in palette; find hud size for offsetting
- Introduced speedometer similar to JoeQuake, useful for speedrunners - Updated character draws to allow size specification - Added helpful calls -- find best matching color in palette; find hud size for offsetting
|
|
||
| /* | ||
| ================ | ||
| TexMgr_NearestColor |
There was a problem hiding this comment.
This doesn't belong here. Has nothing to do with texture management.
There was a problem hiding this comment.
Agreed -- what would be a better spot for this? gl_draw.c maybe?
There was a problem hiding this comment.
Are there plans to allow for changing colors? This seems to be only ever called with the pair of values (20, 20, 0), (40, 30, 15), so you could assume the default Quake palette is used and do bgColor = 51; fillColor = 19;. Otherwise gl_draw.c may be the best place.
|
A few general comments:
|
|
The abstractions (_WithSize, _NearestColor) were intentional :) its only called here yes, but helpful for future newcomers like myself to not have to hardcode (eg. looking up palette and deciding color, or not being able to scale text) |
|
I like the idea. scr_showspeed is the only reason I use my own fork. My implementation is simpler - just print the speed under crosshair. |
|
Poke @Novum -- Is there anything else that needs to change?
|
| static int fillColor = -1; | ||
| if (bgColor == -1) | ||
| { | ||
| bgColor = TexMgr_NearestColor (20, 20, 0); |
There was a problem hiding this comment.
What's the point of this? Can't you just hard code the closest color from the palette? The palette is fixed as far as I know? Why does it even have to be a palette color?
7b55369 to
87b39c2
Compare
