LTCHIPS / rottexpr

A Rise Of The Triad Source Port with additional gameplay options and more...
GNU General Public License v2.0
97 stars 26 forks source link

Make a better HUD Rescale method #9

Open LTCHIPS opened 6 years ago

LTCHIPS commented 6 years ago

From commit a93aaf3 on SDL2Port

The current method that is being used to resize the hud is that it takes the region of the screen occupied by the status bar and bottom bar and make that into an SDL Texture, then draws said textures onto the screen, but rescaled. Simple, but also quite hacky, plus this method doesn't translate to the transparent hud (or where it just draws the health and ammo) very well. It's also quite wasteful, seeing as it has to do this for EVERY frame that is drawn.

What I intend to do essentially is take all the HUD elements and load them into SDL Surfaces (with the appropriate palettes loaded), and make sdl textures out of those, then rescaling them by whatever factor the user chooses. This should give the same level of quality as the aforementioned method, but it will allow the transparent hud items to be rescaled properly.