We no longer link to libGL by default. All GL functions are loaded
dynamically through SDL apis. Use -DLINK_TO_LIBGL to enable linking, in
which case Taisei won't try to dynamically load any of the gl functions.
Previously we used a strange inconsistent setup where some functions
were loaded dynamically and others pulled from the linked library.
We also no longer link to libGLU even if LINK_TO_LIBGL is set. The only
function we used from that library was gluPerspective. taiseigl now
provides a simple substitute via glFrustum.
The SDL2 gl headers are now used instead of the system ones, this should
be more portable. The taiseigl.h header contains generated code
partially based on content from those headers. It also doubles as a
python3 script that actually generates that code and inserts it into
itself. It scans the Taisei source tree for gl* calls and generates code
only for the functions we use, and a few manually specified ones that
are called indirectly.
Assumptions such as "linux = glx" are no longer made. SDL takes care of
platform specifics, as it should.
The GL_EXT_draw_instanced/GL_ARB_draw_instanced extension detection has
been improved. Taisei should be able to figure out which one to use
without a compile-time check, and support for the ARB version has been
actually implemented for the laser snippet loader. I've tested it on
Windows 8 with Intel drivers that don't support the EXT version but do
support the ARB one, instanced drawing works and the lasers don't lag!
OSX should benefit from this change as well, although I've not yet
tested the OSX build, beyond simply compiling it.
Fixed all warnings and compile errors.
Confirmed successful compilation without warnings for linux (gcc,
clang), windows (gcc-mingw), osx (clang-osxcross).
Adapted all of the current spellcards into spellstages, which will
later be used in a spell practice mode a-la IN.
For now they are only accessible through the stage select menu or
by specifying their ID on the command line; both available only
if you built with -DTAISEI_DEBUG=1
The strncat/strncpy functions have dangerously counter-intuitive
semantics. They are meant to be used with fixed-width,
non-null-terminated strings, which is in, 99% cases, not what you want.
The strlcat/strlcpy ones are non-standard, however SDL provides its own
implementations on platforms that do not have them.
All events are now stored at the end of the file, after the metadata of all stages.
It's now possible to load a replay partially to examine the metadata, and optionally load the input events later if needed.
This is not used yet. The replay menu code will be updated to make use of this feature soon.
Player power is now internally an integer. There is no good reason to use floating point math there. Stored as an uint16 in replays.
Player coordinates are now floored when a stage starts. This is unnoticable to the player. Stored as a pair of uint16s in replays.