With the new Wii U upscaling code, 640x480 uses too much MEM1.
Honestly, maybe I should just overhaul how render targets work on the
Wii U. Surely there's a way to dynamically allocate only one colour
buffer at a time?
It just so happens that a path buffer and a FILE pointer both take up
the right amount of stack space *and* have the correct stack frame
ordering, so maybe this is actually what the original source code
did.
This is currently hardcoded to 640x480 English builds.
What I've done is temporarily gutted the FreeType2 font renderer, and
instead introduced a system where the font is read from a
pre-rendered font atlas. This allows me to get 100% accurate font
rendering to Windows XP... because I literally created these atlases
with Windows XP.
So not only does this eliminate the issue of FreeType producing
misshapen glyphs, but it also works around the copyright issue
regarding bundling the Courier New and MS Gothic fonts with CSE2.
You see, font files can be copyrighted like any old software, however
typefaces have a lot less protection - they're basically fair-game.
IANAL, of course - look it up yourself.
I don't really want to throw away the FreeType font system since I
spent a ton of time working on it, it allows you to use other font
files, and I'll probably wind up needing it for CSE2EX. I guess I'll
just have to find some way to either have the two systems coexist, or
make it so one or the other can be selected at compile-time.
The old locking/unlocking API was plain inefficient. Soon I'll move
upscaling to the backend anyway, to minimise the overhead where
possible.
Currently only the software renderer has been updated.
This one specifically fixes bugs that either invoke undefined
behaviour or cause memory leaks. Essentially, they affect stability.
Bugs that just affect gameplay will remain covered by FIX_BUGS.
This commit changes which variables are static: the Mac (and
presumably the Linux) debug data tells you what variables are static,
by prefixing their names with double_underscores.
The variable names themselves also hint at this: global variables are
prefixed with 'g', and use upper-camelcase, while static variables
use whatever_you_call_this.
The Wii U has a very limited pool of memory for render targets
(32MB), so we should only use it if we have to.
This 'fixes' a bug in the enhanced branch, where if you use 2x
sprites at 854x480, the third line of the text box will be corrupted
(text will appear on the second line instead, and be black instead of
white).
The other renderers haven't been updated for the API change yet.
Previously, each backend had to guard against it, which is messy,
results in duplication, and leaves new backends open to the risk
of not guarding against it (the Wii U GX2 renderer didn't).