This introduces draw_plugin struct that can be attached to a sprite.
The update() function of attached plugin is called every frame by
sact_Update(). This corresponds to the DrawPlugin mechanism of
System4/SACT2.
This is currently used only from DrawDungeon. The 3D engine for Toushin
Toshi 3 etc. will also use this.
Fix issue where outlines would get cropped when crossing the glyph
texture boundary.
This is accomplished by adding 4 border pixels to each glyph texture.
The `--save-folder` command line option, or `save-folder` option in
.xsys4rc, can be used to override the default save folder location.
This is useful in cases where English and Japanese versions of the same
game share a save location, or to isolate saves from a mod, etc.
SDL_ttf isn't really designed to be used with OpenGL. It caches glyph
bitmaps in memory, whereas we want to cache glyph textures on the GPU.
By using FreeType directly we avoid creating and destroying a new
texture every time a glyph is rendered.
Additionally, all glyph textures (including fnl-derived glyphs) now use
the GL_RED internal format instead of GL_RGBA.
Values returned by SACT2.System_GetDate etc. should correspond to the
Windows SYSTEMTIME structure, not struct tm.
This also fixes a bug where get_time() returns a value greater than 60
for `sec`.
Use `unlikely` (__builtin_expect) to help the compiler optimize error
checks in some hot functions (in my testing, stack_pop_var was one of
the hottest functions, right behind execute_instruction).
Part of StoatSpriteEngine and KiwiSoundEngine.
This fixes an issue with per-channel volume settings not working
correctly in Haruurare (and presumably other games).
Used in Sengoku Rance (when Ran summons Suzaku).
The scale curve in this implementation is a bit off compared to
AliceSoft's implementation (theirs looks a bit sharper at the end), but
it's only really noticable with a very long effect time.
AliceSoft's implementation also has a lot more jitter, but I don't think
this is intentional.
The reported size of the tab character seems to be roughly 2.88x the
size of the glyph in the font.
This fixes a text layout issue with the commander info (HP, Job, etc).
Implement EFFECT_FADEOUT, EFFECT_FADEIN, EFFECT_WHITEOUT and
EFFECT_WHITEIN.
I'm not aware of these being used in any game (fade effects seem to be
implemented manually most of the time).