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.
These were retrieved from the Mac port (v0.0.7), which kept these
functions.
Unfortunately, this port is missing local variable names, so we can't
use it to make InitBack accurate.
The CMake file allows you to compile the accurate branch with
whatever version of Visual Studio you have lying around, without
having to clumbsily convert the VS2003 project.
I've tested this with VS2019, VS2003, and VS6. VS6 is goofy - it's
missing a few types and constants, and it's not smart enough to
realise that ints and longs are the same in ILP32 data models. I've
added a few small hacks to address this. Might undo them. Who knows.
For now, I want to support VS6 because Mint compiled CSE2 with it
before, and because VS6 uses `msvcrt.dll` as its C runtime, which
apparently comes pre-installed in Windows, as opposed to all those
other annoying runtime versions that require they be installed
separately (which is why MinGW targets it specifically).
Also, VS6 *should* give us Win95-compatible builds. The internet says
MSVC2003 is Win95-compatible too, but Mint claims the vanilla EXE
doesn't run on there. I imagine it has something to do with its
static runtime library (VS2003 links the static one by default for
some reason).
The original code didn't account for it failing, which leads to
annoying bugs happening whenever it does fail.
Now, the game just closes, like it does with any other init error.
There's no evidence Tags.h contained these variables (if anything, it
appears that Pixel manually declared them in every file that used
them).
gg Pixel
This matches the original EXE. I didn't catch it while doing the
ASM-accuracy checks because absolute addresses don't match yet.
Thanks to Gabe for noticing this.
Yay 100% hardware-acceleration. Yes, I know 2.1 is outdated and
crappy, but it was the easiest one to write. I'll probably make an
OpenGL 3.0 Core renderer at some point.
Anyway, font rendering isn't here yet, because I plan to overhaul it.