kichikuou
39f3f15282
Split TextContext into style and position
...
And give the two style members more specific names.
2026-09-03 09:43:15 +09:00
kichikuou
6fa1ae9a26
Refactor menu construction
2026-09-03 09:27:08 +09:00
kichikuou
fcffc7ab78
Introduce ScreenId enum
2026-09-02 17:19:23 +09:00
kichikuou
783584d176
Drop cursor_color and unused includes
2026-09-02 12:28:41 +09:00
kichikuou
0b4a95aca6
Move text contexts to NACT
2026-09-02 12:28:14 +09:00
kichikuou
8b2a2d8a5e
Move menu_w[] and text_w[] from AGS to NACT
2026-09-02 11:57:14 +09:00
kichikuou
4a58251afd
Move CG display flags to NACT
2026-09-02 11:41:24 +09:00
kichikuou
8a12fc50e7
Move box[] from AGS to NACT
2026-09-02 09:13:48 +09:00
kichikuou
e2afd77ec9
System3: Fix Y 4 1 (random) to return 1
...
Gakuen KING's original implementation returns 1 for num=1; it returns 0
only when num is 0.
The line dates back to the initial upstream import and had never been
changed. nact_sys1.cpp and nact_sys2.cpp still have the same expression
but they are left alone.
2026-08-26 18:12:39 +09:00
kichikuou
64f8e7bf9f
Extract NACT_GakuenKing into a separate file
2026-08-22 08:46:47 +09:00
kichikuou
8212548376
Use std::string_view in Encoding and AGS::draw_text()
2026-05-02 11:35:03 +09:00
kichikuou
0187d0f216
System3: Implement CD availability check
...
The `Y14,2:` command (`Y20,2:` in Gakuen KING) now returns zero if CD
audio is not available (i.e. playlist is not loaded).
2025-11-28 10:41:20 +09:00
kichikuou
ad73ed9271
Refactor key release handling in NACT commands
2025-11-27 08:49:51 +09:00
kichikuou
cba31e264a
Implement commands for Gakuen King's music mode
...
This adds minimal command support to enable Gakuen King's music mode:
- P: Set text color
- I: Allow user to select a grid item using mouse/keyboard input
- Y25: Switch text window
- Y118: Set text X coordinate
- Y119: Set text Y coordinate
The meanings of these commands were investigated from the implementation
of Gakuen King's system3.5 port.
2025-11-25 15:46:00 +09:00
kichikuou
8f36143ce5
Refactor CG destination handling
2025-11-11 09:11:44 +09:00
kichikuou
febee3f5a3
Refactor savefile path handling
2025-06-06 16:13:02 +09:00
kichikuou
7f527da74f
nact: Change tvar from char array to std::string
2025-06-06 14:51:38 +09:00
kichikuou
d97d49dbe7
Fix Y103 command (play_pcm)
...
* The parameter is the number of times to loop, e.g. Y103,2: will play
the sound twice. This still does not work on Windows because
PlaySound() does not support specifying the loop count.
* Get AMSE data size from its header. This fixes audio glitch at the end
of sounds.
2025-03-04 15:59:22 +09:00
kichikuou
446d34132a
AGS: Defer texture update until update_screen()
2025-02-22 15:24:27 +09:00
kichikuou
bf9742533f
AGS: Move scroll handling to update_screen()
...
This fixes an out-of-bounds access bug when scroll > 400.
2025-02-09 14:42:52 +09:00
kichikuou
b1dfc57e9b
AGS: Refactor palette loading logic
2025-02-09 11:06:37 +09:00
kichikuou
c205806d7b
Fix header include paths
2025-02-08 12:55:14 +09:00
kichikuou
43d1af3a44
AGS: Refactor text layout logic
2025-01-19 10:41:14 +09:00
kichikuou
ff00165f47
AGS: Refactor Box struct
2025-01-18 15:37:15 +09:00
kichikuou
fad34f7bb9
Refactor text / menu window code
2025-01-18 15:37:13 +09:00
kichikuou
ca2ca7276f
AGS: Use SDL_Surface to save / restore screen
2025-01-17 10:58:50 +09:00
kichikuou
fad7a843f0
Add NACT_Rance4 and NACT_Toushin2
...
These games are still unsupported, but at least they should not crash
due to command parsing errors.
2025-01-11 13:27:18 +09:00
kichikuou
d676a68b95
Add TRACE_UNIMPLEMENTED macro
2025-01-11 10:59:23 +09:00
kichikuou
d8c20c94be
NACT: Handle unused commands in base class
2025-01-11 10:37:19 +09:00
kichikuou
d98b2884ed
Refactoring: Move declaration of NACT_Sys* classes to cpp files
2025-01-05 08:14:02 +09:00
kichikuou
7f7ff91439
GameId: Replace CRC32 with enum
...
This makes it possible to define games that do not have a CRC32.
2025-01-03 08:52:27 +09:00
kichikuou
1a53c50c75
Rework NACT command tracing
...
- Now tracing is not a build-time config but a runtime option (`-trace`)
- One command per line, so that traces are not mixed with other outputs
- Send traces to DAP client
- Fix garbled characters in non-SJIS environments
2025-01-02 16:53:01 +09:00
kichikuou
6800258113
NACT: Add warnings for unimplemented Y commands
2025-01-02 10:54:21 +09:00
kichikuou
2498669da3
NACT: Refactor data structure for menu
2024-12-24 13:46:47 +09:00
kichikuou
b08b9f80f2
Add some helper functions to GameId
2024-12-24 12:22:10 +09:00
kichikuou
bb1573ec6d
NACT: Factor out load/save functions
2024-12-24 12:19:13 +09:00
kichikuou
57fad54420
NACT: Make some command functions non-virtual
2024-12-24 12:19:10 +09:00
kichikuou
a7d4e32273
Set RND after save / load
...
`L [1-26]` should set RND to 0 after load, and `Q [1-26]` should set RND
to 1 after save. This behavior is used by the following games:
ayumi_fd, prog_fd, funnybee_cd, funnybee_fd, onlyyou, prog_cd, ayumi_cd,
yakata3_cd, otome, hashirionna2
Especially in hashirionna2, not setting RND breaks the control flow.
2024-12-21 16:14:35 +09:00
kichikuou
f356d268df
Scenario: Refactor address handling
2024-12-18 13:50:46 +09:00
kichikuou
989b6a844d
System3: L 101-126 returns 255 if save file does not exist
...
This fixes an issue in Hashiri Onna II where "Data Load" appears in the
start menu even though there is no save. (#32 )
2024-12-11 17:00:14 +09:00
kichikuou
9173742ffb
Introduce GameId class
2024-12-11 10:43:28 +09:00
kichikuou
930fdfab4e
Fix MSVS build
2024-12-10 22:08:19 +09:00
kichikuou
4ec1a12daa
Add Scenario::unknown_command() for error reporting
2024-12-10 09:12:55 +09:00
kichikuou
ffa3a364ce
NACT: Make cmd_{label,page}_{jump,call} methods non-virtual
2024-12-10 08:42:36 +09:00
kichikuou
d10ae21ff4
Move call stacks from NACT to Scenario
2024-12-10 08:35:23 +09:00
kichikuou
e79f24d8b9
Replace NACT::fatal() with global sys_error()
2024-12-10 07:54:56 +09:00
kichikuou
5483d1932f
Introduce Scenario class
2024-12-09 14:44:37 +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
8eaaec8e16
Add scenario address to cali parse error messages
2024-12-03 11:08:51 +09:00