Commit Graph
44 Commits
Author SHA1 Message Date
kichikuou b08b9f80f2 Add some helper functions to GameId 2024-12-24 12:22:10 +09:00
kichikuou daeef22a29 AGS: Introduce Palette type 2024-12-21 09:55:29 +09:00
kichikuou eab5eb075d Fix out-of-bounds memory access in text rendering
This fixes SEGV in Hashiri Onna II when custom font is used. (#32)
2024-12-11 16:30:42 +09:00
kichikuou 4930154d45 Expose g_nact 2024-12-11 14:03:55 +09:00
kichikuou 9173742ffb Introduce GameId class 2024-12-11 10:43:28 +09:00
kichikuou e79f24d8b9 Replace NACT::fatal() with global sys_error() 2024-12-10 07:54:56 +09:00
kichikuou 8303f7c770 Refactor FILEIO 2024-12-08 15:06:00 +09:00
kichikuou 48d780add6 Introduce Dri class
It caches the link table.
2024-12-08 13:39:23 +09:00
kichikuou 723e5cef05 Fix crash when font not found
Now NACT::fatal() immediately exits the process.
2024-04-06 08:31:37 +09:00
kichikuou 7b7394e5fe Fix use-of-uninitialized-value for text_font_maxsize
This fixes https://github.com/kichikuou/system3-sdl2/issues/25.
2023-04-15 09:29:18 +09:00
kichikuou 7f6a085f56 Scanline screen effect
It can be activated by the -scanline command line flag, system3.ini, or
the menubar on Windows. Effective especially for games with 200-line
screen mode, such as Little Vampire and Intruder.
2023-04-09 18:23:42 +09:00
kichikuou ec1dfbffcf Use non-square pixels for Gakuen Senki
Stretch 512 horizontal pixels to 582 pixels. This is the same pixel
aspect ratio used by WebMSX.

Also set SDL_HINT_RENDER_SCALE_QUALITY to "linear", to improve the
scaling quality.
2023-04-09 18:23:39 +09:00
kichikuou 24224e0d2b Merge some changes from SysEng 0.7 (for Gakuen Senki port) 2023-04-09 15:17:33 +09:00
kichikuou 32f4c0f945 Improve anti-aliasing quality of non-white text
By presetting palette.
2023-04-06 21:17:51 +09:00
kichikuou 6d6d5ca829 Reset RenderDrawColor after changing it for fading
Otherwise, the next SDL_RenderClear() will fill the screen with that
color, including areas outside the viewport.
2023-03-25 16:13:55 +09:00
kichikuou 2cb0b2a2a2 Reuse SDL_Renderer after VM reset
Otherwise mouse input doesn't work after restart in emscripten port.
2022-06-26 15:00:23 +09:00
kichikuou cc75dd7c94 Convert linebreaks from CRLF to LF 2022-04-03 11:34:48 +09:00
kichikuou dc471399e5 Rewrite fade in / fade out implementation
Before this change, fade in and fade out was implemented using a
16-steps dithering pattern.

Now fading uses alpha-blending. It behaves like the PC98 version, where
fading was done by palette animation.

This reduces `sizeof(AGS)` by 1.2MB.
2021-11-20 17:09:17 +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 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 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 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 9637701340 Windows: Implement reset menu command
A bit hacky but works.
2020-10-10 15:26:01 +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 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 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 7a1cc2a483 Convert all Shift_JIS files to UTF-8 2020-02-24 18:06:38 +09:00
kichikuou 20ba438300 Unify executables
Instead of building multiple executables using #ifdefs, create a single
executable (still called "system3") that can run all System1-3 games.
2020-02-22 16:15:47 +09:00
kichikuou 387c5febf2 Remove tchar.h shim 2020-02-16 15:57:05 +09:00
kichikuou 6e73c48e68 Report errors using SDL message box 2019-12-27 19:41:55 +09:00
kichikuou e417118713 Add -fontfile option 2019-08-18 18:31:26 +09:00
kichikuou de3bbf2595 System1: Detect game title by CRC32 2019-08-18 16:55:17 +09:00
kichikuou cedf84f08e Grayscale initial palette for better antialias 2017-06-17 11:14:05 +09:00
kichikuou e00e1c4552 Add exported function for screenshot 2017-05-02 21:53:55 +09:00
kichikuou f35990d1a4 Prepend g_root in FILEIO 2017-04-30 15:05:03 +09:00
kichikuou bd2e483704 Clipping 2016-07-10 13:16:25 +09:00
kichikuou 79039f90dc SDL cursor functions 2016-04-02 22:23:33 +09:00
kichikuou 4be0695ec3 Crash fix 2016-04-02 17:46:31 +09:00
kichikuou b716e76734 SDL2 port 2016-04-02 17:06:57 +09:00
kichikuou 582989f2e7 Remove win32 headers dependency from common.h 2016-03-27 17:40:20 +09:00
kichikuou 65221695d8 Import system3 for win32 2016-01-16, downloaded from
http://homepage3.nifty.com/takeda-toshiya/alice/index.html
2016-03-27 15:01:10 +09:00