FixesKartKrew/Kart#1020 by not trying to write over ringconfig until
we have successfully written the whole config out, then atomically
replacing the old config with the new one using C++17 FS.
Holey textures (textures with transparent pixels) cannot
be used on upper/lower textures or on 1-sided linedefs. If
the game tries to render this, the texture name will
appear on the HUD if devmode render is turned on.
Map name on pause menu and intermission; current song credit on pause menu; server name in medium font
Closes#769 and #402
See merge request KartKrew/Kart!1892
- cursongcredit behaves the same as before
- Always compose song credit string
- g_realsongcredit always stores the song credit for the
current music, even if no song credit is displayed on
the HUD
- Some maps may contain very large or very many (animated)
textures
- Texture sets are not typically shared between maps, so
each texture allocation may go unused for a long time
after the map ends
- Keeping these PU_STATIC leads to significant memory
usage over the program duration
- This code uploads encoremap to the GPU as a texture.
- It assumes encoremap is 256 * 32 bytes, but in reality
encoremap is only 256 bytes.
- The textures go completely unused, so I simply
commented out the code altogether.
How lightlists work:
- Each FOF casts a shadow beneath it.
- Draw the column above each FOF with colormap set from
the previous FOF.
- Then set colormap from the current FOF, so the next FOF
is bathed in the current FOF's shadow.
What broke:
- Colormap was not set when drawing the column above the
first FOF.
This commit:
- Before iterating lightlists, set colormap to base sector
lighting.
- De-duplicate some code by using lambdas.
- Column would be zero length if there are no visible
pixels in it.
- Trying to draw such a column results in a negative
heightmask in R_DrawColumnTemplate and a probable read
out of bounds.
- Holey textures are ones where the column height may not
match the texture height.
- R_DrawColumn cannot cope with this directly and it may
lead to a read out bounds.
- Transparency would not render for true wall textures
anyway since these are not masked midtextures, so just
don't render the texture in this case.