Commit Graph
204 Commits
Author SHA1 Message Date
kichikuou b6a47d8db7 emscripten: FM sound support 2020-11-23 13:51:25 +09:00
kichikuou 4b4053cf1e Add -fm command line option 2020-11-21 14:01:38 +09:00
kichikuou 893f716ef3 Add FM synthesizer support
This adds support for "real" FM sound that can be used instead of MIDI
sound. (Currently only available on platforms where SDL_mixer is used.)

The MakoFM class interprets AMUS.DAT to create a write sequence to the
OPNA registers, from which fmgen generates an audio stream.
2020-11-21 13:40:21 +09:00
kichikuou f4f8b7d104 Fix use-after-free in MCIThread::close() 2020-10-26 18:39:43 +09:00
kichikuou 79b4efa63e MIDI: Generate at least 60 seconds of MIDI data 2020-10-25 14:52:52 +09:00
kichikuou f426bf87e1 Update emscripten to 2.0.7 2020-10-24 18:56:02 +09:00
kichikuou 17ef39abed emscripten: Add SDL_Delay() to ASYNCIFY_REMOVE
This is safe because we use SDL_HINT_EMSCRIPTEN_ASYNCIFY = 0. This
significantly reduces the number of Asyncified functions and reduces the
wasm code size by 47kb.
2020-10-24 18:55:24 +09:00
kichikuou c4c17854f9 MAKO: select_sound() sets title-dependent values in cd_track
Fixes #6.
2020-10-24 18:15:11 +09:00
kichikuou 9ddbf01d23 Minor refactoring of MAKO
- Move select_sound() from NACT to MAKO
- Make cd_track private
2020-10-24 17:53:07 +09:00
kichikuou 4c5ee008cb Android: Fix StringIndexOutOfBoundsException in text input dialog 2020-10-18 15:15:16 +09:00
kichikuou 01608c8fd5 Generate just right amount of MIDI data
Before this, MIDI data was generated until a fixed number of bytes was
reached. After this, MIDI data is generated for the duration of one
playback of the entire music, plus 1-second fade out.
2020-10-17 16:18:02 +09:00
kichikuou bb9fc273ac Windows: Move MCI operation to a background thread
MCI is very slow to open a MIDI file. Not to block the main thread for
hundreds of milliseconds, this moves MCI calls to a separate thread.
2020-10-17 15:59:28 +09:00
kichikuou 932df7e6a3 Windows: Adjust window size after adding menubar 2020-10-11 14:04:07 +09:00
kichikuou b618d61ca5 CI: Address deprecation of add-path and set-env 2020-10-10 16:19:12 +09:00
kichikuou 9637701340 Windows: Implement reset menu command
A bit hacky but works.
2020-10-10 15:26:01 +09:00
kichikuou da53cda5ab Windows: Add menubar
This ressurects the window menubar that was in the original System3 for
Win32.

The reset feature is not implemented yet because it needs more work.
2020-10-10 15:26:01 +09:00
kichikuou 520b542fcc Introduce NACT::on_syswmevent()
This is in preparation for adding more handlers for platform-specific
window messages (e.g. menu commands).
2020-10-10 15:26:01 +09:00
kichikuou 7f94312c58 Rename {initialize,release}_console to platform_{initialize,finalize}
So that other platform-specific setups (e.g. menus) can be done there.
2020-10-10 15:26:01 +09:00
kichikuou 47ac7a81aa Android: Implement string length limit for input dialog 2020-09-06 12:55:14 +09:00
kichikuou 4229ca6910 emscripten: Introduce nact_emscripten.cpp
And use tvar_maxlen in text_dialog().
2020-09-06 11:46:42 +09:00
kichikuou b5ef0791c5 Android: Implement text input dialog 2020-09-05 10:49:09 +09:00
kichikuou e3ca7d0ecd Android CI: Use the system's default JDK 2020-08-23 14:07:20 +09:00
kichikuou b686a91e41 Android: Update build instructions to use commandline-tools
Now it works with JDK 9+.
2020-08-23 13:22:41 +09:00
kichikuou 91a117c355 Android: Upgrade build environment
- targetSdkVersion 28
- Android Gradle plugin 4.0.1
- Kotlin 1.3.72
- Gradle 6.1.1
2020-08-23 11:09:24 +09:00
kichikuou 3e6f63db95 Emscripten: Remove getMemory from EXTRA_EXPORTED_RUNTIME_METHODS 2020-08-08 14:30:22 +09:00
kichikuou 0e9bc5a10b Allow virtual functions in NACT
This essentially reverts commit 7ffa8bc. With the new "ASYNCIFY_ADD"
emscripten option, we no longer need this workaround.
2020-08-08 12:16:39 +09:00
kichikuou 4526ffa517 Linux CI: Run 'apt update' 2020-08-08 12:09:50 +09:00
kichikuou 94723e501e Update CI for emscripten
- emscripten SDK 1.40.1
- mymindstorm/setup-emsdk@v6
- actions/cache@v2
- actions/upload-artifact@v2
2020-08-08 11:40:29 +09:00
kichikuou 81d66c4075 Enable text anti-aliasing by default
To disable it, use -noantialias command-line option.
2020-06-04 10:24:39 +09:00
kichikuou a0396679a6 CI updates
- Add Windows build
- Run Debug and Release builds on Linux
- Run CI against pull requests
2020-06-04 09:55:15 +09:00
kichikuou 289aebd970 Add .editorconfig, reformat CMakeLists.txt 2020-05-30 09:58:33 +09:00
kichikuou ac1bf0bac1 Update emscripten to 1.39.16
And add a fix for emscripten-core/emscripten#10746.
2020-05-28 19:27:51 +09:00
kichikuou 76b9a896a7 Windows: Static link MinGW libraries
This reduces the number of dependent DLLs. Note that SDL is still
dynamically linked.
2020-05-24 22:47:00 +09:00
kichikuou a0af5ef10c Windows: Embed default font as a resource
After this, embedded MTLc3m.ttf is used unless the -fontfile option is
specified.
2020-05-24 22:01:32 +09:00
kichikuou b11ddd35c8 Android: Bump version to 0.4.0 android-0.4.0 2020-05-24 17:32:25 +09:00
kichikuou b683924564 MDA loading on non-Windows platforms
- On Android, MDAs are now loaded from APK assets.
- On Mac/Linux, MDAs are now installed by 'make install', and loaded
  from installation directory.
- MDAs and fonts are moved into a new toplevel directory, resources/.
2020-05-24 16:39:18 +09:00
kichikuou 47e86d9a05 Load MDA from resource on Windows
Fixes #1.
2020-05-24 12:07:57 +09:00
kichikuou 112cf9a2dc Merge pull request #3 from kichikuou/merge-upstream
This merges changes in System3 for Win32 between 2016-01-16 and 2020-03-21.
2020-05-23 13:08:14 +09:00
kichikuou b3019b97ea Update game_ids in README.md 2020-05-23 12:53:46 +09:00
kichikuou 11c888e30f Merge upstream changes: Merge readme.txt and history.txt 2020-05-23 12:46:29 +09:00
kichikuou aa5a8f3a52 Merge upstream changes: Merge the remaining nact_sys2 changes
Mostly mechanically merged, I haven't looked into individual changes in
detail.
2020-05-23 12:11:08 +09:00
kichikuou d18f441722 Merge upstream changes: Merge the remaining nact_sys1 changes
- cmd_branch: Uses getw when skipping 2-byte objects
- cmd_y: Restructured, but functionally identical
2020-05-23 11:30:03 +09:00
kichikuou eb24179d76 Merge upstream changes: Merge NACT-common changes
- Half-width kana characters are converted to full-width hiragana if
  ags->draw_hankaku is false.
- tvars can now support 33 characters instead of 22.
2020-05-23 11:14:34 +09:00
kichikuou 5571061ac1 Merge upstream changes: Add wait after opening menu
This prevents mis-selection by key repeat etc.
2020-05-23 10:53:34 +09:00
kichikuou cda1888ebc Merge upstream changes: Prevent menu selection when cursor is out of window
This was introduced in System3-sdl2 71728db only for nact_sys3. TOTO took
this change and expanded for nact_sys1 and nact_sys2 as well.
2020-05-23 10:40:05 +09:00
kichikuou 49b4ac4053 Merge upstream changes: Merge AGS changes
- Added initial text / menu positions for newly-supported games
- convert_zenkaku and convert_hankaku are now public
- load_cg supports Ayumi Floppy
- VSP: A transparency value of 101 now ignores get_palette
2020-05-23 09:52:16 +09:00
kichikuou c6fce5144b Merge upstream changes: Add MDA files
These files are not actually used yet. (See issue #1)
2020-05-22 22:17:37 +09:00
kichikuou 6d39b6feee Merge upstream changes: Merge DRI changes
- Fail if file entry's size is 0
- load_mda() can now load MDA from subsequent disks.
2020-05-22 19:39:47 +09:00
kichikuou 657057fa64 Merge upstream changes: CRC32 updates
- Check CRC32 of both ADISK.DAT (storead as crc32_a) and BDISK.DAT (crc32_b)
- Update the CRC32 database adding more titles
2020-05-22 16:09:55 +09:00
kichikuou e8d254328a Merge upstream changes: Merge FILEIO changes
FILEIO has been updated to resolve relative paths inside FILEIO::Fopen(),
which has been already done in System3-sdl2.

FILEIO::Fgets() now uses a length param.

Callsites for these functions are also updated to reduce the diff from
upstream.
2020-05-22 12:04:36 +09:00