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.
Read .xsys4-debugrc from ~/.xsystem4 and/or the game directory on
startup. This is just a text file with one debugger command per line.
Can be used to set breakpoints or log functions automatically at
startup.
This can also be used to work around a limitation on Windows where the
IME doesn't work in the debugger, making it impossible to input Japanese
text.
Add vm-state command, which prints disassembly around the current
instruction pointer and the current contents of the stack.
It was necessary to change how breakpoints are implemented for this.
When adding a breakpoint, the original opcode now remains in the
instruction stream, bitwise-or'd with BREAKPOINT. A hash table indexed
by address is used to store breakpoint objects.
* Add "frame" command to change the current frame.
* Add "members" command to print struct members for current frame (if it's
a method frame).
* Support printing member variables (e.g. "this.var") in the "print"
command.
Fix issue in Rance VI where BGM would resume playing from the previous
position instead of restarting after a stream was stopped.
Also fix an issue where a stale sample could be played when starting a
stream after it had been stopped.
Joypad support is enabled if UseJoypad = true. This can be overridden by
the --joypad option, which now takes an optional argument, which may be
"off".
Gpx2Plus.CopyStretchReduceAMap behaves differently in the English
version.
Fixes an issue with text being squashed horizontally on the regional
phase menus.
Fix a bug where animations would replay after calling
StoatSpriteEngine.MultiSprite_EndAllMove (e.g. the start of battle
animation in Rance 02 replaying after every attack).
System 4 has 4 font weights: light, medium, bold and heavy bold.
SDL_ttf has 2 (normal and bold). For now, xsystem4 treats light/medium
as normal and bold/heavy-bold as bold.
It was a bug to call this function outside of sact_Update, because it
set scene_is_dirty to false without first rendering the scene. This can
cause the scene to not be rendered in a timely manner.
The MangaGamer version of Rance 02 has a custom proportional font
implementation which makes assumptions about the font in use. This is
worked around by rewriting their '_CalculateWidth' function to use
fixed-width logic.
I also tried using TTF_SizeUTF8 to get the proper character width but I
found this made the text overflow even worse than using a fixed width
(at least with the default gothic font, perhaps other fonts would fare
better).
Fix bug affecting non-ASCII text in iarray_write_string. This fixes a
bug in ADVLogList_Save/ADVLogList_Load which would cause log text to
become garbled after loading a save.
The VM can under no circumstance store it's own data on the heap. Doing
so causes said data to leak into saved VM images. This is the worst kind
of memory leak: even restarting the game will not fix it, because the
data is permanently leaked into the save files.
This will break save compatibility in games that use ADVSceneKeeper
(e.g. Alice 2010 games).
cJSON_AddArrayItem is O(n), which made saving arrays O(n^2). This was
causing extremely poor performance when saving large arrays, such as
those created by MultiSprite_Encode.
A special cJSON_CreateIntArray_cb function is now used instead, which
can create and populate an array in O(n).