V5 is used until Daiteikoku, and v7 since Rance Quest. Since both are
Ain v6, the save version is determined by the presence of the "MainVM"
field in AliceStart.ini.
Use `git describe` instead of `git rev-parse` for the version number,
since this command will report the latest tagged version in addition to
the current commit.
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.