This fixes a bug where the wrong font was used on the Rance Quest status
screen.
Commit 6c2a55c reset `font_size` on size changes, but the same is needed
for face changes.
Used for the treasure chest opening effect in Rance Quest.
Implemented using draw_plugin. The render() method of draw_plugin is no
longer dedicated to custom sprites, but can be used for any sprites to
override the default sprite rendering function.
It is called when the plugin is unbound from a sprite, or when the
sprite to which the plugin is bound is released.
This prevents memory leaks when sprites are destroyed without the plugin
being released, and simplifies lifetime management of the DrawDungeon
plugin.
It draws a quadrilateral with arbitrary vertex and texture coordinates.
This is used to properly implement DrawGraph.DrawDeformedSpriteBilinear,
and will be used to implement ChipmunkSpriteEngine.
SP_SetSpriteTransformPos in a subsequent patch.
Debuggers that operate at the instruction level can execute instruction-
level step even when xsystem4 has loaded debug information, by adding
`granularity: "instruction"` to the step request.
- Add support for setBreakpoints request
- Add source locations to stackTrace response
- Source-level stepIn/stepOut/next executions
All of these only work if debug information is available. Otherwise they
work at the instruction level as before.
In SACT2, if two sprites have the same Z value, they are rendered in
increasing order of their sprite numbers. This behavior is documented in
the SDK manual.
However, in later versions of the sprite engine (SACTDX,
StoatSpriteEngine, ChipmunkSpriteEngine), sprites are drawn in the order
they were created.
This fixes an issue in Rance Quest Magnum which relies on this behavior.
If the log exceeds 1000 pages, the oldest pages are discarded. This
behavior is in line with AnteaterADVEngine.dll of Daiteikoku.
This prevents the log buffer from growing indefinitely, slowing down
saves and loads.
sprite_set_show() is also used by MultiSprite_SetAllShowMessageFrame,
causing interference.
Now multisprite_update() clears the sprite's texture when there's no CG,
rather than hiding it.
Fixes#218.
This function draws a quad with arbitrary vertex and texture
coordinates, but since it is actually only used to copy a rectangular
area, this can be implemented using gfx_copy_stretch().
This also adds HLL_TODO_EXPORTs for the DrawGraph functions defined but
unused in Daiteikoku.
Before this, character glyphs were copied to an intermediate texture
(text->common.texture) using gfx_copy_with_alpha_map(). In Daiteikoku,
some text sprites have a character spacing of -4, causing the copy to
cut off the right edge of the previously drawn character.
This fixes the problem by having parts_render_text() blend per-glyph
textures directly onto the target without using an intermediate texture.
This fixes the same bug that commit c4e17c6 fixed, for sprites created
by ChipmunkSpriteEngine.SP_SetTextSprite. This uses text_style_width()
instead of gfx_size_char() so that edge width is taken into account.
This setting has a significant impact on system load, so users may want
xsystem4 to remember their preference.
This implementation uses a JSON format, while the AliceSoft's
implementation saves it to a binary file (WindowSetting.sav).
This only records the wait_vsync setting, since the other fields in
window_settings are currently no-op.
Before this, the resume save format defaulted to JSON, which could not
be loaded by System40.exe and save/load was sometimes too slow even on
desktop environments.
In xsystem4-android the RSM format has been the default for 9 months and
no problems have been reported. Let's make this the default on all
platforms.