kichikuou
50d05e5b56
font: Replace stateful font_select() with explicit parameter
...
The font module kept a global "currently selected font" set by
font_select() and implicitly used when drawing. Make it stateless by
introducing a FontSpec {type, weight, size} that font_render_text() /
font_draw_text() and gfx_drawString() take directly.
Make FontWeight a two-valued enum and normalize the 1-9 weight to it
in commandZB().
Removes font_select(), ags_setFont() and ags_setFontWithWeight().
2026-06-24 16:11:49 +09:00
kichikuou
dc17b78365
Move miscellaneous low-level functions to system.[ch]
2025-06-11 09:23:44 +09:00
kichikuou
9a01d28075
Move gfx_* functions from sdl_core.h to gfx.h
2025-06-11 09:22:36 +09:00
kichikuou
945dbd7722
Rename graphics functions from sdl_* to gfx_*
...
And rename sdl_{video,draw,image}.c to gfx_{video,draw,image}.c.
2025-06-10 15:00:27 +09:00
kichikuou
3f495b72c1
Fix message waiting in Rance 2 intro
...
By recreating a bug of the ZW command in system35.exe.
2025-04-21 09:43:01 +09:00
kichikuou
fb77b229ea
Apply text decoration to selection menus too
2025-02-07 10:52:58 +09:00
kichikuou
886d55057a
ZZ13 command should also affect menu font
...
This fixes the problem of menus always being displayed in Gothic font.
The font type at the time the `]` command is executed should be used.
2025-02-07 09:29:30 +09:00
kichikuou
dccd75113b
emscripten: Make load_mincho_font() return bool
2025-02-02 14:25:36 +09:00
kichikuou
d14b42c146
Replace boolean/TRUE/FALSE with bool/true/false
2025-02-02 10:02:08 +09:00
kichikuou
29988d0d6c
Simplify boolean expressions
2025-02-02 09:36:20 +09:00
kichikuou
78dc226d13
Add scheduler.c
...
It consolidates VM throttling logic that was scattered in various
places.
2025-01-07 15:52:48 +09:00
kichikuou
84e3666a66
Rename DEBUG_COMMAND{,_YET} to TRACE{,_UNIMPLEMENTED}
...
And now TRACE_UNIMPLEMENTED is not ignored in release build.
2025-01-06 14:14:10 +09:00
kichikuou
85d69aa5f0
Output debug messages by ZD command at log level 2
2025-01-05 12:46:37 +09:00
kichikuou
47e2fcaec0
Add enable_zb option for enabling ZB command
...
By default it is disabled and normal weight is always used.
Issue: https://github.com/kichikuou/xsystem35-sdl2/issues/44
2024-01-18 08:27:46 +09:00
kichikuou
183ceb614a
Implement ZB command
...
Although undocumented, it also affects the font weight of selection
window.
Issue: https://github.com/kichikuou/xsystem35-sdl2/issues/44
2024-01-17 14:32:32 +09:00
kichikuou
894cd51e01
Improve ZZ0,1 behavior
...
- Check nact->is_quit
- Avoid busy loop in emscripten
2023-03-28 22:03:12 +09:00
kichikuou
29a139c8a1
Use the standard integer types
...
This replaces BYTE, WORD and DWORD types with uint8_t, uint16_t and
uint32_t respectively.
2022-10-29 09:34:21 +09:00
kichikuou
d1712ab7b4
Remove newline character from debug print macro calls
...
Now "\n" is appended by the macros.
2022-09-02 20:37:26 +09:00
kichikuou
3dd38959a3
Emscripten: Expose sys_restart() function
...
Also ZZ0 now restarts the game instead of exiting.
2022-06-26 17:25:43 +09:00
kichikuou
b15690d9b7
Windows: Add "Restart" menu command
...
It resets all VM states and restart the game.
2022-06-26 17:25:39 +09:00
kichikuou
45b50fe78a
ZT counter: wrap around on 16-bit overflow
...
This behavior matches System 3.9.
2021-11-16 21:37:14 +09:00
kichikuou
c31da0fe10
Merge counter.c into cmdz.c
2021-11-16 09:10:07 +09:00
kichikuou
6ef699e87d
Clean up scenario.h dependencies
...
- nact.h and xsystem35.h no longer include scenario.h
- Removed `sys_*` aliases in nact.h
- sys_getString() and sys_getConstString() are moved to
scenario.c as sl_getString() and sl_getConstString()
- DEBUG_COMMAND macros are now defined in scenario.h
2021-07-31 15:18:02 +09:00
kichikuou
9f9805128f
Improve message skip
...
When message skip is enabled while executing sys_keywait(), skip starts
immediately.
2020-12-13 12:29:09 +09:00
kichikuou
d531fa3994
Refactor fullscreen code
2020-12-12 16:21:10 +09:00
kichikuou
316a06a168
Refactor string variable functions
...
This replaces v_str* functions with new svar_* functions.
The new svar_* functions use 1-based string variable index, so that
callers don't have to decrement string numbers from SCO.
2020-09-21 16:17:23 +09:00
kichikuou
bc9fc924ed
[experimental] Unicode mode
...
This adds "Unicode mode", in which scenarios can be written in any
language. xsys35c 1.2.0 and later can produce Unicode scenarios.
- nact->encoding represents the current scenario encoding. The initial
value is SJIS, and ZU command changes it to UTF8.
- Use conversion macros that switch the behavior by the scenario
encoding. For example, toUTF8() calls sjis2utf() if the scenario
encoding is SJIS, and calls strdup() if it is UTF8.
- Fix various string processing functions to work with UTF8.
2020-08-09 21:24:56 +09:00
kichikuou
077e4d32e0
Fix emscripten build
2020-08-08 23:07:53 +09:00
kichikuou
8c31e7a2ec
Rename imput.[ch] to input.[ch]
2019-12-24 17:40:02 +09:00
kichikuou
8958b41ad2
Windows MSYS2 build support
...
- Add feature detection and fallback implementation for some functions
- Use binary mode for fopen()
- CMake: Add workaround for MSYS link error
2019-10-14 17:32:17 +09:00
kichikuou
447632a4c3
Simplify logic around message wait cancellation
2019-07-21 10:18:09 +09:00
kichikuou
bea272611a
emscripten: Lazily load mincho font
2019-01-20 12:47:40 +09:00
kichikuou
f1b0b399fa
Convert EUC to utf-8
2017-02-11 19:03:05 +09:00
kichikuou
e607c9c2ee
Import xsystem35-1.7.3-pre5
2014-04-26 18:40:24 +09:00