Commit Graph
131 Commits
Author SHA1 Message Date
kichikuou 6ec42bbdfc Make window resizable 2021-08-14 13:28:56 +09:00
kichikuou c58d5b690a Fix mouse cursor movement in fullscreen mode
Ported from kichikuou/xsystem35-sdl2@91d30c9.
2021-08-14 13:18:42 +09:00
kichikuou 8f48093409 Update emscripten to 2.0.25 2021-07-14 18:29:50 +09:00
kichikuou 98038a5c74 Do not use SDL_RWFromFile on Windows
It does not work in the MSVC build of SDL2 (although it works in
Mingw-w64's SDL2 package).

Fixes #11.
2021-07-08 17:08:20 +09:00
kichikuou 52eea935fe Android: Allow specifying custom fonts in system3.ini
Now custom font files specified in system3.ini (as relative paths from the
game directory) can be loaded correctly.
2021-06-06 22:08:07 +09:00
kichikuou 0f4984bef5 Introduce Config struct
For now, it's just a container for command line arguments.
2021-06-06 16:18:17 +09:00
kichikuou 34175d5a85 Add English translations for string constants 2021-03-18 09:38:13 +09:00
kichikuou 4c6d8d5f8b Support Y240 (hankaku mode) in System1 2021-03-18 09:38:13 +09:00
kichikuou 8417e7758a Skip SysEng's "new style" marker
It can be simply skipped, because SysEng's command set is a superset
of System1-3.
2021-03-18 09:38:13 +09:00
kichikuou 9a8ebbdcb0 Support SysEng's quoted message commands 2021-03-18 09:38:10 +09:00
kichikuou 20e06235d2 Add CRC32 for English translations of Little Vampire / Rance 4.x
Note that these are still in beta; CRC32s may change.
2021-03-17 20:47:01 +09:00
kichikuou 77d50780f8 Implement AGS::paint() 2021-01-23 10:51:05 +09:00
kichikuou db66e62b88 emscripten: Drop MIDI support
After kichikuou/web@c901b19, the web port only supports FM sound.
2021-01-17 17:37:58 +09:00
kichikuou cbb40d0b67 emscripten: minor refactoring
- Remove the use of EXPORTED_FUNCTIONS in favor of EMSCRIPTEN_KEEPALIVE
- SDL_Delay is no longer aliased to emscripten_sleep
2021-01-17 13:55:43 +09:00
kichikuou 8519bc1a55 Implement NACT::set_cursor() 2021-01-11 20:48:49 +09:00
kichikuou 1d3715580b MSVS build: Suppress warning C4244 (possible loss of data)
VC++ is picky about narrowing conversion. Let's ignore it instead of
scattering static_casts.
2021-01-02 13:22:36 +09:00
kichikuou 60a0b43831 Fix warnings in MSVS build 2021-01-02 10:45:38 +09:00
kichikuou 56bb588ca7 Support building with Microsoft Visual Studio 2021-01-02 09:10:51 +09:00
kichikuou 75cbb2bcef Windows: Add "Save Screenshot" menu command 2020-12-31 14:17:55 +09:00
kichikuou fab3b2eaa0 Support propotional fonts 2020-12-30 22:21:59 +09:00
kichikuou d3d820d727 emscripten: Support message skip
Also add flags that control message skip behavior.
2020-12-29 12:09:34 +09:00
kichikuou 46827f35ef Use common menu selection function in all systems 2020-12-24 22:55:33 +09:00
kichikuou 958e922d54 Apply NACT_Sys3 changes to NACT_Sys1, NACT_Sys2
Some fixes / improvements were made only in NACT_Sys3 but not in
NACT_Sys1 and NACT_Sys2. This applies the followings to NACT_Sys[12]:

f680fb3e Add savedir option
ba359b4b Performance tweak
bde689ea Text hook

Especially, this fixes a bug where save files were created not in save
directory, but in game directory.
2020-12-24 22:19:37 +09:00
kichikuou e091bd9c1c Improve message skip
When message skip is enabled while executing cmd_a(), skip starts
immediately.

This also makes messages displayed during skip visible for a moment.
2020-12-24 22:18:52 +09:00
kichikuou c2ff6de675 Stop message skip on unseen text
This makes System3-sdl2 stop message skip when it sees text that has not
been read by the player. Seen / unseen flags are stored in MSGSKIP.DAT
file in the save folder.
2020-12-24 17:12:47 +09:00
kichikuou 3a2d345521 Introduce NACT::message() 2020-12-24 16:54:09 +09:00
kichikuou 067e1e23bd Refectoring: Add is_[12]byte_message() helper functions 2020-12-20 14:44:08 +09:00
kichikuou 33a0595016 Windows: Add "MIDI Sound" menu item
Now "FM Sound" really means FM sound, not MIDI.
2020-12-11 17:15:12 +09:00
kichikuou 6d1a8f7987 Fix an operator precedence bug in nact_sys3.cpp 2020-12-06 15:39:37 +09:00
kichikuou 32448652c9 Fix unsequenced modification and access in nact_sys2.cpp 2020-12-06 15:36:34 +09:00
kichikuou c575fb303f Android: Add system menu items for switching FM / MIDI 2020-11-29 18:27:53 +09:00
kichikuou 602c309c47 Android: Add system menu
The system menu opens with 3-finger touch. Currently, it can only exit
the game.
2020-11-29 18:27:50 +09:00
kichikuou 07da17a00e Pump events in sys_sleep()
This allows handling window events while fading etc.
2020-11-29 12:06:17 +09:00
kichikuou f2139440b6 Defer rendering to idle time
SDL_RenderCopy / SDL_RenderPresent was called too often, which sometimes
caused screen update to fail on Mac.
2020-11-29 12:06:08 +09:00
kichikuou 0f4f5d2e0d emscripten: Add function for switching FM / MIDI synthesizer 2020-11-23 16:27:08 +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 79b4efa63e MIDI: Generate at least 60 seconds of MIDI data 2020-10-25 14:52:52 +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 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 9637701340 Windows: Implement reset menu command
A bit hacky but works.
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 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 81d66c4075 Enable text anti-aliasing by default
To disable it, use -noantialias command-line option.
2020-06-04 10:24:39 +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 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 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