Notable changes:
* The numerator / denominator parameters of AddMotion[HV]GaugeRate are
int in GoatGUIEngine but float in GUIEngine and PartsEngine.
* AnteaterADVEngine.ADVLogList_AddText has second parameter
(int WindowNo) since Oyako Rankan.
This also avoids using non-void functions where a void function is
expected. It is fine in most ABIs, but raises a runtime error in wasm32.
It is currently only used to populate a field in RSM v9 save file.
As far as I can tell from examining Rance 01's resume save, this
reference does not seem to increment the target's refcount.
Fix issue where black boxes would appear in the action list text.
Glyph textures are now *at least* as wide as the duospace block width
(e.g. 16/8 on a 16px font), but can be larger to accomodate proportional
fonts with larger glyphs.
Use the normal effect system for fullscreen effects. This allows effects
that are implemented via shaders to be used, such as the blind effects
which are used frequently in Daibanchou.
Ensure that our FT_Face has the correct size before calling
FT_Get_Advance. This fixes the backscene issue mentioned in #154 as well
as some other spacing issues.
Take delta from previous frame into account when deciding how long to
sleep. And leave a few ms headroom.
This is not how this function works in AliceSoft's implementation. On a
(nearly) empty scene, they start by sleeping 1ms and gradually ramp up.
The largest delay I observed was 11ms.
Delegates "weakly" reference objects, meaning that referenced objects
can be deleted. Delegate invocations must not invoke on deleted objects.
This is achieved as follows:
* Each heap object has a sequential number.
* Each delegate object is backed by a page storing (object, function,
seq) triples.
* Deleted objects can be detected by comparing the sequential number
stored in the delegate with the sequential number of the object
currently on the heap.
This is consistent with the AliceSoft's implementation (presumed from
the contents of resume save).
This implementation removes dead objects from the delegate in DG_CALL
and DG_NUMOF instructions. (We could do that more often, e.g. when an
object is added to a delegate.)
This breaks existing resume saves that contain delegates. For games that
predate delegate support, this does not affect the save format.
This reverts the following commits:
* 4b1257f "Fix delegate memory management"
* 9bb4665 "Add changes to vm.h" (partial revert)
* 75d6386 "Fix ResumeSave/ResumeLoad bugs with delegates" (partial
revert)
We are going to take a different approach to implementing weak
references in delegates.
As far as I'm aware, the only unimplemented functionality is Y-rotations
of parts objects, which is only used for some screen transition
animations. I was able to clear the game without issue.
When loading parts, we need to mark them as dirty and recalculate
hitboxes. Also fix loading of numerals, which was completely broken
previously on games that use combined numeral CGs (e.g. Rance 01).
Numerals now use a `parts_numeral_font` structure, so that textures can
be shared between numeral objects.
Add an option to insert a delay when skipping messages with CTRL.
This is accomplished by overriding the 'A' function. Since the function
to check the state of a key (CTRL in this case) varies by game, an
xsystem4-specific system call is added for this purpose.
Fixes#119
* SetFind(2) lets the sprite to participate in hit testing even if it is
not visible.
* SetAnime() respects frame_s and frame_e parameters. Sprites animate
only when `current` is within the range of [frame_s, frame_e].
* SetCurrent() resets animation state.