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`.
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).
Fill fully-transparent pixels on the destination texture with the text
color before rendering to it. This eliminates halos around text caused
by the invisible texture color (usually black) being blended with the
text.
Only unscaled glyph bitmaps are now cached in regular memory. Scaled
glyphs are stored as textures on the GPU. Only the alpha channel on
glyph textures is used, with the color being provided as an input to the
shader.
Outline and bold rendering is improved by using a simple dilate shader.
This looks okay but could be improved (the result is a bit blurry
still).
This improves the look and (especially) the performance of text
rendering in the MangaGamer version of Sengoku Rance.
There are still some bugs/unimplemented features, but the game should be
more or less bearable to play in this state.
The game now basically runs, but with very bad performance and lots of
aliasing on text.
Need to implement anti-aliasing and caching of rendered glyphs next.
If two sprites have the same Z value, they are rendered in increasing
order of their sprite numbers.
This fixes an issue in the MangaGamer version of Sengoku Rance, which
depends on this behavior.
This code was changed at some point so that sact_get_sprite allocates a
sprite and only returns NULL for a negative sprite index, but some
functions were still assuming that it could return NULL under normal
circumstances and trying to manually allocate sprites.
I've gone through all of the SP_* functions to check which ones allocate
a sprite and which ones don't. If a function doesn't allocate a sprite,
sact_try_get_sprite is called instead of sact_get_sprite.
This fixes a crash on startup in the MangaGamer version of Sengoku
Rance (SengokuRanceFont.SP_ClearState was incorrectly allocating a
sprite).
Add an option to control the horizontal scaling of text. This is mainly
to work around text overflow issues in the MangaGamer version of Rance
02 (an appropriate value is set automatically for that game).
Used in Rance VI.
This implementation is not perfect, but it gets pretty close.
Alicesoft's implementation has a sharper curve on the blur size around
t=0.5, giving a "snappy" effect at the middle of the transition.
Properly handle the case where the stream loops while fading, by
tracking the elapsed frame count rather than comparing the current frame
with a computed end position.
Properly handle the case where time=0, by applying the volume
immediately instead of in the audio callback.
This fixes some audio bugs in Rance VI.
This function is not supposed to call destructors, but was calling
heap_unref instead of exit_unref on local pages.
Fixes a bug in Rance VI where the game would crash on game over.