Commit Graph
1141 Commits
Author SHA1 Message Date
Nunuhara Cabbage ffe4d0d4ae Merge pull request #184 from kichikuou/gsave7
Add support for group save format v7
2024-09-15 21:02:14 -07:00
kichikuou 9e2f03d8be Add support for group save format v7
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.
2024-09-16 09:01:49 +09:00
Nunuhara Cabbage 489cfe5a96 Merge pull request #183 from kichikuou/RanceQuest
Fix two graphical bugs of Rance quest
2024-09-15 13:06:18 -07:00
kichikuou 71debfbb65 Rance Quest: Do not render suspended TapirEngine sprites 2024-09-15 08:04:14 +09:00
kichikuou 34258511b9 Rance Quest: GetPartsCGName() returns the name specified by SetPartsCG()
This fixes a graphical bug mentioned in
https://github.com/nunuhara/xsystem4/issues/180#issuecomment-2351079908 .
2024-09-15 07:57:40 +09:00
Nunuhara Cabbage 0f121860fe Merge pull request #182 from kichikuou/msgskip
Android: Call msgskip_save() when app goes to the background
2024-09-14 10:39:50 -07:00
Nunuhara Cabbage 70a6f547cf parts: use separate sprite for each parts
Each parts object is now its own entity in the scene so that entities
are rendered in the correct order when mixing sprites and parts.

Fixes #180
2024-09-14 10:22:51 -07:00
kichikuou 886f15aa9f Android: Call msgskip_save() when app goes to the background
This ensures that msgskip file is saved even if the app is killed.
2024-09-13 14:43:46 +09:00
Nunuhara Cabbage d895301116 Merge pull request #181 from kichikuou/ndk27
Android: Update SDL2 to 2.30.7
2024-09-01 22:45:41 -07:00
kichikuou fdaa2d1dba Android: Update SDL2 to 2.30.7
This fixes build with Android NDK 27.
https://github.com/libsdl-org/SDL/issues/9792
2024-09-02 11:25:56 +09:00
Nunuhara Cabbage da52b312ca Use git describe for version number
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.
alpha-5
2024-08-25 10:26:55 -07:00
Nunuhara Cabbage 8cc2334692 windows: use 'windows' subsystem for release build
Only show the console on debug builds.

Fixes item 2 in #177.
2024-08-25 10:10:46 -07:00
Nunuhara Cabbage 486d89669f Reduce window size on small displays
Reduce the window size if the display resolution is smaller than the
game resolution.

Fixes item 1 of #177.
2024-08-25 10:03:10 -07:00
Nunuhara Cabbage c3614c9280 Merge pull request #179 from kichikuou/rsave-comments
Update rsave_read() parameters to specify read mode
2024-08-24 17:43:05 -07:00
kichikuou 00aa0c2ae6 Fix build without debugger 2024-08-25 08:08:45 +09:00
kichikuou 240c2c9395 Update rsave_read() parameters to specify read mode 2024-08-25 08:00:16 +09:00
Nunuhara Cabbage 88236b5a0b Merge branch 'master' of github.com:nunuhara/xsystem4 2024-08-18 13:00:21 -07:00
Nunuhara Cabbage 041cbafef1 Merge pull request #176 from kichikuou/zerodiv
Add guard against division by zero in sact_QuakeScreen()
2024-08-13 18:03:18 -07:00
kichikuou c5b0916279 Add guard against division by zero in sact_QuakeScreen()
GALZOO calls this with amp_x = 0, to shake the screen vertically.
2024-08-13 18:27:48 +09:00
Nunuhara Cabbage 3c61f7cebf dap: draw origin/bounds of parts 2024-08-10 18:54:13 -07:00
Nunuhara Cabbage a13bd155dc dap: send correct reason for stopped event 2024-08-10 18:52:08 -07:00
Nunuhara Cabbage 09bae3d423 Merge pull request #175 from kichikuou/SoundFilePlayer
Implement SoundFilePlayer HLL
2024-08-10 18:40:22 -07:00
kichikuou 1f0fc09294 Implement SoundFilePlayer HLL
Using this, Widenyo plays user-provided BGM files in the
SaveData/MusicData directory.
2024-08-11 07:18:19 +09:00
Nunuhara Cabbage acc869086f Merge pull request #174 from kichikuou/FileOperation
Fix FileOperation.Get{File,Folder}List
2024-08-09 19:18:25 -07:00
kichikuou 0cdf793b42 Fix FileOperation.Get{File,Folder}List
They should return base names, not full paths.
2024-08-10 09:20:13 +09:00
Nunuhara Cabbage d1ba60b673 Merge pull request #173 from kichikuou/hll-sigs
Fix signature mismatch in HLL_EXPORT functions
2024-08-06 19:12:34 -07:00
kichikuou ade7ea9235 Fix signature mismatch in HLL_EXPORT functions
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.
2024-08-07 09:14:38 +09:00
Nunuhara Cabbage 7365e8a7ca Merge pull request #172 from kichikuou/RSMv9
resume: Support RSM v9 format
2024-08-05 21:33:52 -07:00
kichikuou c4207e4226 Store struct_ptr in local page
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.
2024-08-06 07:15:54 +09:00
kichikuou ddaef07fb5 resume: Support RSM v9 format
This enables using --save-format=rsm for games that use delegates.
2024-08-06 07:02:21 +09:00
Nunuhara Cabbage f8174231cb parts: implement flash blend modes
Implement the add, multiply and screen blend modes.
2024-08-05 14:52:13 -07:00
Nunuhara Cabbage 0c8e52f18c parts: ignore invalid state in PE_SetInputState
Fixes bug with disappearing frame on choices in Drapeko.
2024-08-05 13:56:11 -07:00
Nunuhara Cabbage 559ccae1ad Fix text issue in Daibanchou EN
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.
2024-08-05 12:37:28 -07:00
Nunuhara Cabbage 0597bfa513 Change status of STB (EN) to supported 2024-08-05 11:15:09 -07:00
Nunuhara Cabbage 921c0b699c Fix glitch in EFFECT_TURN_PAGE shader
The first frame of this effect was not displayed correctly.
2024-08-05 10:57:41 -07:00
Nunuhara Cabbage 3f36bf29b1 Gpx2Plus: use shaders for fullscreen effects
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.
2024-08-05 10:48:22 -07:00
Nunuhara Cabbage c6e1f8f155 Fix NewFont layout issues
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.
2024-08-05 09:12:21 -07:00
Nunuhara Cabbage 65c178c04c Sleep less in ChipmunkSpriteEngine.Sleep
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.
2024-08-05 08:44:12 -07:00
Nunuhara Cabbage 69ab413676 Remove random print at movie end
Oops.
2024-08-05 08:10:00 -07:00
Nunuhara Cabbage 71a4f5079e Merge pull request #171 from kichikuou/cmake
Add new files to CMakeLists.txt
2024-08-05 08:04:40 -07:00
Nunuhara Cabbage caeba1536a Merge pull request #170 from kichikuou/delegate
Rework delegate implementation
2024-08-05 08:04:15 -07:00
kichikuou fd16bab763 Add new files to CMakeLists.txt 2024-08-05 16:47:16 +09:00
kichikuou 2046ad4d06 Remove delegate field from struct function_call
Now dg_index in the stack is incremented by delegate_call().
2024-08-05 16:25:08 +09:00
kichikuou 12ddb585fb Rework delegate implementation
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.
2024-08-05 16:25:08 +09:00
kichikuou 0a78489993 Revert delegate memory management changes
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.
2024-08-05 16:25:08 +09:00
Nunuhara Cabbage 21abe6ff9a movie: load case-insensitive filename 2024-08-04 22:25:17 -07:00
Nunuhara Cabbage ab810e8f57 Implement functions for EN Haruka
Implement the NewFont HLL. This is a basic text rendering interface
which supports proportional fonts and kerning

Fixes #154
2024-08-04 21:17:10 -07:00
Nunuhara Cabbage ac298baaec Fix fnl font selection
type 0 -> gothic (ttf)
type 1 -> mincho (ttf)
type >= 256 -> fnl[type - 256]
2024-08-04 09:27:57 -07:00
Nunuhara Cabbage cf3fe0e852 dbg: allow middle-click break in DAP debugger 2024-08-04 09:10:01 -07:00
Nunuhara Cabbage 79ebe443f5 dbg: handle window events while waiting for input
Keep the screen updated while in the debugger.
2024-08-03 09:34:59 -07:00