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.
* Add `allThreadsStopped` to Stopped event to indicate that stacktrace
can be accessed
* StackTraceResponse should return most recent call first
* Fix instruction pointers of calling frames
The first two will improve compatibility with DAP clients other than
xsys4dbg.
This adds source-level debugging capabilities to the command-line
debugger, utilizing debug information generated by sys4dc. The debug
information format is documented at:
https://github.com/kichikuou/sys4dc/blob/master/docs/debug_info.md
The location of the debug information file can be specified with the
`--debug-info` command-line flag. If not specified, xsystem4 will
attempt to load it from `gamedir_path("src/debug_info.json")`.
When debug information is available, a breakpoint can be set at a
specific line in a file using `breakpoint <file> <line>`. Also, `step`
and `next` commands advance execution to the next source line (this is
naively implemented by repeating instruction-level stepping).
Used in Tsuma Shibori, and some indie System 4 games.
This HLL is a draw plugin that uses SACT2's "custom sprite" mechanism.
Custom sprites do not have a texture. Instead, the plugin's render()
callback draws them directly to the main surface.
This fixes "incomplete framebuffer" error in Haru Urare right after the
game start, due to gfx_set_framebuffer() being called with a zero width
texture. It was a regression introduced by commit 04d5237, which started
using gfx_set_framebuffer() in gfx_init_texture_rgba().
Ideally, we should avoid creating zero-area textures in upper layers
(commit 3f18b18 was an attempt to do so), but this is difficult because
there are many places that create textures. Let's just make sure that we
don't generate unrecoverable errors.