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
a726d577ef
modules: Move SACT/sactcg.c to lib/ and use it from NIGHTDLL
2026-03-17 11:09:47 +09:00
kichikuou
b5bf439b8e
Remove graphics.h
2025-06-11 09:23:42 +09:00
kichikuou
ec071d4e8a
dt_drawtext_col: Fix blend mode
...
This fixes #66 . It was a regression by commit 6b646b3 .
2025-05-14 12:46:30 +09:00
kichikuou
f673708a3f
Remove depth field from surface_t
2025-02-21 09:12:07 +09:00
kichikuou
2ed44dab6d
Move surface and graphic functions from modules/lib to modules/Gpx
...
Except for gr_blend_alpha_map(), which is used by oujimisc.
2025-02-19 14:57:40 +09:00
kichikuou
a8f46453d8
Remove redundant fields from surface_t
2025-02-19 14:03:01 +09:00
kichikuou
8328b93227
Rename agsurface_t to surface_t
2025-02-19 13:24:56 +09:00
kichikuou
51954c6bd4
Move load_cg_to_sdlsurface() to src/cg.c
...
And rename it to cg_load_as_sdlsurface().
2025-02-19 12:30:13 +09:00
kichikuou
b28e3ef2fd
Do not use gr_* functions from SACT/ and NIGHTDLL/
2025-02-19 12:14:58 +09:00
kichikuou
215de5511e
Simplify gre_BlendUseAMap()
2025-02-19 10:20:38 +09:00
kichikuou
f669804573
Refactor sactamask.c to use SDL_Surface
2025-02-19 09:59:31 +09:00
kichikuou
9c6423bf99
drawtext: Remove 8-bit text rendering function
2025-02-19 09:59:22 +09:00
kichikuou
6b646b3857
SACT: Change text canvas from surface_t to SDL_Surface
2025-02-18 22:01:18 +09:00
kichikuou
dec1649882
SACT: Make sprites have SDL_Surface instead of surface_t
2025-02-18 21:58:06 +09:00
kichikuou
6b9c3475a0
Simplify sdl_scaledCopyArea()
2025-02-17 08:16:09 +09:00
kichikuou
5bae0c16c5
Simplify gr_ functions using SDL surface operations
2025-02-16 21:03:59 +09:00
kichikuou
d551cdbb70
Refactor text rendering functions in modules/
2025-02-16 13:13:16 +09:00
kichikuou
e711d5786e
Make agsurface_t backed by SDL_Surface
...
This adds `sdl_surface` field to agsurface_t. `agsurface->pixel` is now
set to `agsurfae->sdl_surface->pixels`.
Note that the `sdl_surface` field does not have alpha; transparent
surfaces have a separate alpha plane in `agsurface->alpha`.
2025-02-16 13:13:13 +09:00
kichikuou
bf26f1b0c0
Refactor clipping functions
2025-02-11 12:36:21 +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
7f645d6bd1
Refactor function return types in modules/
2025-02-03 09:24:45 +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
28e685818c
Remove gre_Blend() and gre_BlendScreen()
2025-01-10 09:23:08 +09:00
kichikuou
e800a23e1d
Implement Gpx functions for Ore no Shita de Agake
2025-01-07 15:52:44 +09:00
kichikuou
e464d92164
Fix buffer overrun in stretch functions
...
Fixes #61 .
2024-12-09 20:31:23 +09:00
kichikuou
c694d2282c
Fix CX (sprite copy) in 24-bit color games with 16-bit CGs
...
System3.x uses the following bit expansion when converting RGB565 to
RGB888:
RRRRR GGGGGG BBBBB => RRRRRRRR GGGGGGGG BBBBBBBB
12345 123456 12345 12345123 12345612 12345123
However, SDL's blit functions use a slightly different mapping, so
sometimes expanded color did not match the color key specified in the CX
command.
To avoid this, convert to RGB888 by ourselves when drawing 16-bit CGs.
2023-06-19 17:18:17 +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
3377441caf
Simplify CG drawing functions
...
This removes extra buffer copy in some cases.
2022-04-02 22:13:25 +09:00
kichikuou
901a3bb28c
Revamp NightDemonDemo
...
- Fix off-by-one bug in demo number
- Use the jpeg extraction function in src/
- Improve alk archive interface
2022-04-02 22:12:16 +09:00
kichikuou
c67198cc0e
emscripten: Load Mincho font on demand in SACT games
2022-03-05 11:52:52 +09:00
kichikuou
63c456329f
Remove (unused) MMX support
2022-02-05 22:08:26 +09:00
kichikuou
d35a24f142
sdl_effect: Implement linear blur effects
...
Now Gpx and NIGHTDLL are fully migrated to sdl_effect.
2022-01-17 17:41:13 +09:00
kichikuou
c4d74d659a
sdl_fader: Add fade in/out and white in/out effects
...
This replaces the existing three separate implementations (CE command,
Gpx, and NIGHTDLL) of these effects with the new one implemented in
sdl_fader.
2022-01-16 15:48:58 +09:00
kichikuou
0ecc4edb43
Add webp CG support
...
Used in the MangaGamer version of Rance 5D.
The logic for the OVER chunk was taken from libsys4.
2021-11-03 21:09:02 +09:00
kichikuou
4fd00a9088
CMake: Build modules as a single library
2020-10-04 16:02:10 +09:00
kichikuou
ebb249cd47
Remove 15bpp surface operations
...
These were used only with X11 backend.
2020-10-04 16:01:48 +09:00
kichikuou
379ca744d5
Remove BGR-order macros
2020-10-04 15:35:51 +09:00
kichikuou
15fb122148
Remove agsurface.has_{pixel,alpha} fields
2020-08-30 10:26:55 +09:00
kichikuou
652e4b9111
Simplify ags_drawStringToSurface()
2020-08-08 22:57:22 +09:00
kichikuou
e830190537
Add ags_drawStringToSurface()
2020-08-08 21:28:01 +09:00
kichikuou
f978c43ee1
Move mmap-related code to mmap.{h,c}
...
And add Windows implementation.
2020-08-06 15:09:51 +09:00
kichikuou
fb10cbc52d
Add unittest.h with some assertion macros
2020-07-24 12:46:14 +09:00
kichikuou
1a3b779ace
Use const strings for file names
2020-07-12 13:41:57 +09:00
kichikuou
37f4d847e5
Fix Windows build
2020-06-07 21:29:53 +09:00
kichikuou
9a1f1c77a6
Static link DLL modules
...
We only support a fixed set of modules, so dynamic linking isn't really
necessary. This paves the way for running System3.9 games on more
platforms.
NIGHTDLL is temporarily disabled, because many symbols conflict with the
SACT module.
2020-06-04 19:56:05 +09:00
kichikuou
c0ac281789
Suppress some compiler warnings
2019-09-15 18:42:19 +09:00