mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-10-12 09:18:11 +03:00
76710475fb3d8b565d562f8e7c1d4983521b1fea
This code was changed at some point so that sact_get_sprite allocates a sprite and only returns NULL for a negative sprite index, but some functions were still assuming that it could return NULL under normal circumstances and trying to manually allocate sprites. I've gone through all of the SP_* functions to check which ones allocate a sprite and which ones don't. If a function doesn't allocate a sprite, sact_try_get_sprite is called instead of sact_get_sprite. This fixes a crash on startup in the MangaGamer version of Sengoku Rance (SengokuRanceFont.SP_ClearState was incorrectly allocating a sprite).
xsystem4
xsystem4 is an implementation of AliceSoft's System 4 game engine for unix-like operating systems.
Compatiblity
See the game compatibility table for a list of games that can be played on xsystem4.
Building
First install the dependencies (corresponding Debian package in parentheses):
- chibi-scheme [optional, for debugger]
- bison (bison)
- cglm (libcglm-dev) [optional, fetched by meson if not available]
- flex (flex)
- glew (libglew-dev)
- meson (meson)
- libffi (libffi-dev)
- libpng (libpng-dev)
- libsndfile (libsndfile-dev)
- libturbojpeg (libturbojpeg0-dev)
- libwebp (libwebp-dev)
- SDL2 (libsdl2-dev)
- SDL2_ttf (libsdl2-ttf-dev)
- zlib (zlib1g-dev)
Then fetch the git submodules,
git submodule init
git submodule update
(Alternatively, pass --recurse-submodules when cloning this repository)
Then build the xsystem4 executable with meson,
mkdir build
meson build
ninja -C build
Finally install it to your system (optional),
ninja -C build install
Running
You can run a game by passing the path to its game directory to the xsystem4 executable,
build/src/xsystem4 /path/to/game_directory
Alternatively, run xsystem4 from within the game directory,
cd /path/to/game_directory
xsystem4
Languages
C
96.5%
GLSL
2.7%
Meson
0.3%
CMake
0.2%
Scheme
0.2%