Commit Graph
998 Commits
Author SHA1 Message Date
kichikuou 39701c7657 Create savedir just before running VM
Before this change, directory described in System40.ini was created even
if --save-folder was specified.
2024-02-07 16:36:57 +09:00
Nunuhara Cabbage 6bdd22f875 Merge pull request #142 from kichikuou/game_compatibility
Update game_compatibility.md
2024-01-31 06:12:09 -08:00
kichikuou 20411f3518 Update game_compatibility.md 2024-01-31 18:09:28 +09:00
Nunuhara Cabbage 27e733758d Merge pull request #141 from kichikuou/banmisc
BanMisc: Use the same save format as AliceSoft's implementation
2023-12-16 17:01:35 -08:00
kichikuou 288381d8f6 BanMisc: Use the same save format as AliceSoft's implementation
BanMisc.{Save,Load}Struct now serializes structs in the same format as
AliceSoft's implementation, rather than in JSON format. The old JSON
format can also be loaded for backwards compatibility.
2023-12-17 09:01:36 +09:00
kichikuou c3f39aeb96 Use mt19937_xorcode helper function 2023-12-17 09:01:28 +09:00
Nunuhara Cabbage 05d2ad8600 Merge pull request #139 from kichikuou/shimaima
Update libsys4
2023-11-17 23:41:48 -08:00
kichikuou 0911103949 Update libsys4
And add tests for https://github.com/nunuhara/libsys4/pull/26.
2023-11-18 16:35:58 +09:00
Nunuhara Cabbage 9c8c290d83 Merge pull request #138 from kichikuou/movie-fix
Fix a bug that bgm did not work after movie load failed
2023-10-15 07:02:08 -07:00
kichikuou bf3700ea8e Fix a bug that bgm did not work after movie load failed
When movie_free() was called in movie_load(), mixer_stream_stop(0) was
mistakenly called and the music mixer was stopped.
2023-10-15 15:00:07 +09:00
Nunuhara Cabbage c521f1faf7 Merge pull request #137 from kichikuou/confirm3
Add Confirm3.Initialize
2023-09-25 20:10:23 -07:00
kichikuou ef7b789810 Add Confirm3.Initialize
For some reason, this function is renamed from GetHDDVolumeNumber only
in Momoiro Guardian.

This also makes all Confirm3 functions HLL_QUIET_UNIMPLEMENTED.
2023-09-17 21:22:43 +09:00
Nunuhara Cabbage 530f606657 Merge pull request #136 from kichikuou/sactdx
Add SACTDX.SP_DeleteAll
2023-09-05 06:06:03 -07:00
kichikuou 120b9888f1 Add SACTDX.SP_DeleteAll
Used in Edo Ranze.
2023-09-05 20:31:27 +09:00
Nunuhara Cabbage 87884d4230 Merge pull request #135 from kichikuou/s_mod
Fix S_MOD for bool and long int
2023-09-01 20:38:21 -07:00
kichikuou 0b4eb92e95 Fix S_MOD for bool and long int
* The "type" argument of S_MOD is 48 for bool, 56 for long int
* %b, %c, %d can consume any integer types (int, bool, or long int)
* If the value cannot be consumed, S_MOD should return the format
  string instead of an empty string
2023-09-02 11:36:54 +09:00
kichikuou 51e55644f5 DrawDungeon14: Fix incorrect return types in SetRaster{Scroll,Amp} 2023-09-02 11:11:01 +09:00
Nunuhara Cabbage 296496e895 Merge pull request #134 from kichikuou/raster
DrawDungeon14: Implement raster effect
2023-09-01 13:42:49 -07:00
kichikuou afae3fc9a6 DrawDungeon14: Implement raster effect
It is implemented as a post-processing effect. The hack for the
projection transform matrix has been removed, because now the image is
flipped upside down in the post-processing stage.
2023-09-01 21:45:46 +09:00
kichikuou a301ca1311 DrawGraph, Gpx2Plus: Implement CopyReverseUD() 2023-08-31 14:16:52 +09:00
Nunuhara Cabbage eb97693e3f Merge pull request #133 from kichikuou/msgskip
Fix path resolution in MsgSkip.Init
2023-08-25 06:48:35 -07:00
kichikuou a6f01f7f82 Fix path resolution in MsgSkip.Init
Some games (Ojou-sama o Iinari ni Suru Game and Double Sensei Life, as
far as I know) pass "SaveData\\MsgSkip.asd" to MsgSkip.Init. So this
change:

* uses savedir_path() to resolve the relative path, and
* removes the "SaveData\\" prefix, otherwise "SaveData/" will be
  duplicated in the resolved path.
2023-08-24 21:31:14 +09:00
Nunuhara Cabbage a27996def8 Merge pull request #132 from kichikuou/window-settings
SystemService: Implement "Wait Vsync" window setting
2023-08-22 18:26:42 -07:00
kichikuou fa96987eca SystemService: Implement "Wait Vsync" window setting
This also rewrites the SetWindowSetting and GetWindowSetting functions
based on the understanding gained from examining games after Haru Urare:

* Setting IDs are consistent across games.
* Settings 5 and 6 are added in Pastel Chime 3, both default true
2023-08-22 21:27:46 +09:00
Nunuhara Cabbage 192e65a827 Merge pull request #131 from kichikuou/mixer
SystemService can only access mixers specified in ini
2023-07-13 16:58:47 -07:00
kichikuou a536912b38 SystemService can only access mixers specified in ini
This ensures that SystemService.hll mixer functions can only access
mixers specified in System40.ini, even if xsystem4 added more mixers.

Beat Blades Haruka checks the number and names of mixers, and refuses to
open the config screen if they are not as expected.
2023-07-13 09:13:26 +09:00
Nunuhara Cabbage fcf26a9ca7 Merge pull request #130 from kichikuou/flash
Flash: Add support for sounds and sprite objects
2023-07-09 16:43:49 -07:00
kichikuou 4cb374dd5d Flash: add support for sprite objects
This implementation supports only single-frame sprites with a single
child object. As far as I know, all Flash effects in AliceSoft games
meet this requirement.
2023-07-09 17:05:25 +09:00
kichikuou 9543bf1761 Flash: sound support
The DefineSound tag in SWF has raw PCM data, so we create a WAV file in-
memory and pass it to audio_play_archive_data(). This is not strictly
necessary since libsndfile can handle raw PCM data, but keeps the audio
and mixer interfaces simple.
2023-07-09 17:05:21 +09:00
Nunuhara Cabbage 1527a1cb85 Merge pull request #129 from kichikuou/tapir
Initial implementation of TapirEngine HLL
2023-07-08 07:27:32 -07:00
kichikuou 588d4f1024 Initial implementation of TapirEngine HLL
TapirEngine is the 3D rendering engine used in RanceQuest.

This implements the minimum functionality that is needed to render the
first battle scene. The lighting is still incorrect.
2023-07-08 08:05:07 +09:00
kichikuou c815d48274 Add stubs for SpriteEngine functions
- ChipmunkSpriteEngine.SP_Suspend
- StoatSpriteEngine.FPS_SetShow
- StoatSpriteEngine.FPS_GetShow
2023-07-07 09:29:21 +09:00
kichikuou 1730ddebae ChipmunkSpriteEngine: Add DX_{Get,Set}UsePower2Texture 2023-07-03 08:39:45 +09:00
kichikuou 1694f5cb89 Add Math.tan 2023-07-03 08:39:42 +09:00
Nunuhara Cabbage 1855cd4167 Merge pull request #128 from kichikuou/drawline
DrawGraph: Implement DrawLine and DrawLineToAMap
2023-07-02 07:30:10 -07:00
kichikuou a4ff641366 DrawGraph: Implement DrawLine and DrawLineToAMap 2023-07-02 14:04:31 +09:00
Nunuhara Cabbage 2085c28bd1 Merge pull request #127 from kichikuou/text
StoatSpriteEngine: Clear cached font_size struct in SP_SetTextSpriteSize
2023-07-01 20:54:12 -07:00
kichikuou 6c2a55c67a StoatSpriteEngine: Clear cached font_size struct in SP_SetTextSpriteSize
This fixes text layout issue in Daiteikoku and Rance Quest.
2023-07-02 10:11:44 +09:00
Nunuhara Cabbage 2ffb4a4ab0 Merge pull request #126 from kichikuou/DrawGraph
Add two DrawGraph functions used in Daiteikoku
2023-06-18 07:16:08 -07:00
kichikuou 0e5d41a728 Implement DrawGraph.CopyGrayscale
Used in Daiteikoku.
2023-06-18 20:57:00 +09:00
kichikuou e1d5eba1f2 Implement DrawGraph.CopyRotZoom2Bilinear
Used in Daiteikoku.

It's similar to DrawGraph.CopyRotZoom, but specifies source and
destination center points.
2023-06-18 20:57:00 +09:00
Nunuhara Cabbage c99e9842ad Merge pull request #125 from kichikuou/file2
Implement File2.OpenArchiveForRead
2023-06-17 22:05:22 -07:00
kichikuou 20fabf40fa Implement File2.OpenArchiveForRead
Rance Quest uses yet another ad hoc archive format (.rea) for the map
data. This function opens an entry in the rea archive for reading.
2023-06-17 13:47:51 +09:00
Nunuhara Cabbage d8bba6e391 Merge pull request #124 from kichikuou/flash
Partial implementation of Flash parts type
2023-06-16 19:54:40 -07:00
kichikuou 01429fe2a8 Update libsys4 2023-06-17 11:32:47 +09:00
kichikuou 3496f45e39 parts: add basic implementation of Flash type
Sprite objects and sounds are not implemented yet.
2023-06-17 11:32:14 +09:00
kichikuou 88c37a9165 Add AFF/SWF parser
This SWF parser is far from complete, in particular it only supports
simple bitmap-filled rectangular shapes, but it covers all the features
used in Daiteikoku, Rance Quest, Pastel Chime 3 and Dorapeko.

Flash files are stored in archives in AFF format, which is an encrypted
SWF wrapper. The decryption code was adapted from GARbro.
2023-06-17 11:32:11 +09:00
kichikuou 6d3abdaa02 Add ASSET_FLASH asset type 2023-06-11 15:06:44 +09:00
Nunuhara Cabbage eaa08b6991 Merge pull request #123 from kichikuou/sprite-newline
Fix sact_SP_TextNewLine when nTextSize is 0
2023-06-04 15:30:35 -07:00
kichikuou 1887ceff7f Fix sact_SP_TextNewLine when nTextSize is 0
Text sprites hold the height of the text drawn on them, and
sact_SP_TextNewLine increases the Y coordinate by this value if
nTextSize is 0.

The nTextSize argument of sact_SP_TextHome affects this value.

Beat Blades Haruka depends on this behavior.
2023-06-04 12:04:28 +09:00