asset_exists and asset_get now take 1-indexed IDs.
Custom CG indexing code for Shaman's Sanctuary is now removed and
replaced with a proper implementation of afa v1 archives in libsys4.
ReignEngine is the 3D rendering engine used in Toushin Toshi III, and is
the predecessor of the 3D engines for Rance Quest, Rance 9, Evenicle,
etc.
This implements minimal functionality to be able to draw the first 3D
dungeon scene. Many important parts such as motion and lighting are not
implemented yet.
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.