Was a lot easier than I expected. The software renderer is such a
godsend for quick-and-dirty ports.
Oddly enough, even on an old3DS, this actually almost runs at full
speed (hits around 40FPS in Mimiga Village).
There's a lot of work left to do before this is actually useable:
* There's no audio
* You can't save
* A proper hardware-accelerated renderer is needed
No point using BMP, since they're way bigger, and they're not
required for authenticity, since the original files were .cur and
.ico files. At some point, I'd like to support those formats, so this
branch can use the original files.
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.
Now the various backends have far less duplicate code, and are part
of a separate backend system specifically for the software mixer.
Now, any modifications to the MixSoundsAndUpdateOrganya function
will apply to all backends, instead of needing to manually be applied
to each one.
This uses basic hardware-acceleration to bounce the software-rendered
frame to both the gamepad *and* the TV!
The previous method only supported the gamepad, suffered from V-tear,
and used slightly more CPU (my test with the end of Egg Corridor ran
at 52FPS, while this new method runs at 55FPS).
Currently doesn't produce sound unless you stop Organya from calling
AudioBackend_CreateSound, because it exhausts the Wii U's 150-sound
pool before the SFX get any of them.
With this backend, CSE2 can run on the Wii U.
It's not ideal - it doesn't have its own renderer yet, so it just
uses the software renderer, and it only displays on the gamepad,
because drawing to the TV as well makes the game lag.
Also there's no sound.
Also the lack of input rebinding is annoying.
Also does absolute nothing.
The point of these things is so it's easier to test out new ports.
For example, with the Null backends and the software renderer, we
don't need to write any code to build for other platforms.
In addition, by having no platform-dependant code, this can be used
to trace crashes. For example, I was having crashes on the Wii U,
despite there being no Wii U-specific code at all - the cause turned
out to be that the executable wasn't stripped, and it had nothing to
do with the code at all.