Compare commits

...
87 Commits
Author SHA1 Message Date
kichikuou 51eca5c8c0 Version 2.14.0 2025-01-09 10:31:50 +09:00
kichikuou 1699fbda6c Update game_compatibility.md
Ore no Shita de Agake and Rakuen Yuki are now supported.

Fixes #63.
2025-01-09 10:21:42 +09:00
kichikuou abbe8b9be1 Add warning for missing .ALD files
This warns when the link table has an entry but the contents cannot be
read.

For example, Atlach-Nacha installs only GA.ALD on the hard drive and
read GB.ALD directly from the CD-ROM. This warning message prompts the
user to copy GB.ALD to the game directory.
2025-01-09 09:24:50 +09:00
kichikuou 10735b8be6 Windows: Add application manifest to set ActiveCodePage to UTF-8
This will set the process code page to UTF-8 on Windows 10 version 1903
or above, allowing Japanese file names to be handled correctly even if
the system locale is not Japanese.
2025-01-09 08:58:14 +09:00
kichikuou e9d8a9d1a6 Refactor: Remove sdl_videodev and its accessor macros 2025-01-09 08:26:53 +09:00
kichikuou 780d30c01f Fix lnkIsLink
If the link table indicates the existence of an entry, but the volume
containing that entry is missing, this command returns 1.
2025-01-08 16:15:37 +09:00
kichikuou d6adb3241c Add sdl_showMessageBox and replace menu_msgbox_open 2025-01-08 11:24:49 +09:00
kichikuou 3594fc19dc Fix slot game speed in Persiom 2025-01-08 10:54:56 +09:00
kichikuou 883f538709 Fix SACT.QueryTextPos
It should return screen coordinates, not sprite-local coordinates.
2025-01-08 10:04:31 +09:00
kichikuou c280fc719b Implement SACT.PeekKey and SACT.MessagePeek
Used in Rakuen Yuki.
2025-01-08 10:04:28 +09:00
kichikuou 7da9e64ab6 Fix speed of slot game in Ore no Shita de Agake 2025-01-07 16:16:01 +09:00
kichikuou bba602ab04 Scheduler: Yield based on scenario address
Now it yields execution when the device state is checked multiple times
from the same scenario address.
2025-01-07 16:15:59 +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 a2792d502e Implement mathSetClipWindow and mathClip
Used in Ore no Shita de Agake.
2025-01-07 15:52:47 +09:00
kichikuou e800a23e1d Implement Gpx functions for Ore no Shita de Agake 2025-01-07 15:52:44 +09:00
kichikuou e731b4ec95 Implement ShCalc functions for Ore no Shita de Agake 2025-01-07 15:41:53 +09:00
kichikuou dde697d3b4 Implement S3xMusic HLL
Used in Ore no Shita de Agake.

Since the musbgm_* interface does not allow multiple channels, this
implementation uses musbgm_* for channel 0 and muspcm_* for channel 1.
2025-01-07 15:41:43 +09:00
kichikuou c4d4f85ae4 Use consistent message format in sys_message() 2025-01-06 14:26:47 +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 c2f11ecfbe Fix Gpx.IsSurface()
Used in Ore no Shita de Agake.
2025-01-05 12:59:07 +09:00
kichikuou 85d69aa5f0 Output debug messages by ZD command at log level 2 2025-01-05 12:46:37 +09:00
kichikuou 7beb558140 Fix compiler warnings about unused results 2024-12-30 15:47:31 +09:00
kichikuou 49126c506d debug_symbol: Fix warning message format 2024-12-26 08:37:14 +09:00
kichikuou 4c57c98e67 Update bug report template 2024-12-26 08:36:08 +09:00
kichikuou e464d92164 Fix buffer overrun in stretch functions
Fixes #61.
2024-12-09 20:31:23 +09:00
kichikuou b30fd71e4b Version 2.13.0 2024-12-07 08:23:49 +09:00
kichikuou 99ad91306b Emscripten: Use texthook suppression list 2024-12-06 13:11:09 +09:00
kichikuou ed96f26cea Add texthook_suppress option
For suppressing text hook on specified scenario pages.
2024-12-06 09:24:08 +09:00
kichikuou e6f71190ed Add texthook option
`-texthook print` prints text to console, and `-texthook copy`
automatically copies text to clipboard (for use with text hooker tools).

On Windows, copy mode can be toggled from the menu bar.
2024-12-04 16:34:12 +09:00
kichikuou 8219feee6d Windows: Redirect stderr to console
So that WARNING messages are printed on the console.
2024-12-04 11:43:59 +09:00
kichikuou bc8a85e046 Version 2.12.1 2024-12-02 10:42:58 +09:00
kichikuou 67f62f02e6 MSYS build: Static link portmidi
Fixes #60.
2024-12-02 10:12:20 +09:00
kichikuou 471c65973b emscripten: Do not use mmap for ALDs
To save memory, as ALD files are now stored as regular files in memfs.
2024-11-28 10:23:21 +09:00
kichikuou 5ff7149dc1 Fix a compiler warning 2024-11-28 10:21:18 +09:00
kichikuou 80988e52cf emscripten: Restore a hack to asyncify send_agsevent() callers
It was inadvertently removed in commit 61ad428.
2024-11-27 09:12:39 +09:00
kichikuou ade76adda6 Version 2.12.0 2024-11-26 20:49:17 +09:00
kichikuou 53d0e8ffef NightDemonDemo, tDemo: refresh screen when frame rate < 30 2024-11-25 17:30:15 +09:00
kichikuou b2e14bd19a Implement tDemo module
Fixes #59.
2024-11-25 16:35:05 +09:00
kichikuou 9c73a34c35 Version 2.11.7 2024-11-12 08:57:54 +09:00
kichikuou 36e1dc152b Fix crash when canceling menu with two-finger touch
Fixes #58.

It was a regression by commit eeeab6e.
2024-11-12 08:55:36 +09:00
kichikuou f786db5a50 Android: Upgrade SDL to 2.30.9 2024-11-12 08:51:36 +09:00
kichikuou c515b21afb Refactor ags_eSpriteCopyArea() 2024-09-01 21:44:11 +09:00
kichikuou d3db3fa83e sdl_effect: Implement EFFECT_PAN_IN_* and EFFECT_SKIP_LINE_*
This also fixes incorrect behavior of `CD 1` and `CD 2`.
2024-09-01 14:57:59 +09:00
kichikuou 86068b0ab9 Prefer single precision float 2024-09-01 08:25:34 +09:00
kichikuou de4f3ebb0d sdl_effect: Implement EFFECT_RASTER_BLEND (CD 5)
Used in Mugen Houyou's title logo.
2024-08-31 22:00:07 +09:00
kichikuou 187a3ced35 Separate ags_eSpriteCopyArea() from ags_eCopyArea() 2024-08-31 16:10:42 +09:00
kichikuou b7703b6270 CMake: Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP 2024-08-31 12:36:22 +09:00
kichikuou b7d0efbe55 README.md: Add note for Windows 2024-08-31 10:52:29 +09:00
kichikuou 02fe55eb93 Remove console message on quit 2024-08-31 10:39:00 +09:00
kichikuou 058789b435 Fix fade-in when screen refresh is disabled
Fade-in by `PF` or `PW` command was updating sdl_display even if screen
update was disabled by the `WZ 0` command.

In Rance 3, this caused a screen artifact immediately after selecting
"Game Start".

This was a regression introduced by commit 605de28.
2024-08-31 10:27:09 +09:00
kichikuou c5dcb20ac3 Simplify midifile.c 2024-08-21 12:20:01 +09:00
kichikuou cb08f7ca76 Windows CI: Build with portmidi
Also update README.md.
2024-08-19 12:58:46 +09:00
kichikuou 7a7d94e60f Remove raw and OSS sequencer MIDI mackends
In favor of PortMidi.
2024-08-19 12:46:56 +09:00
kichikuou b7681982a6 Rework midi.portmidi.c
Copied midi.rawmidi.c and adapted it to use PortMidi. Now the main
thread and the MIDI thread communicate via a message queue.
2024-08-19 11:07:00 +09:00
kichikuou fefaf6c343 Remove RPM spec files 2024-08-02 15:17:49 +09:00
kichikuou 42e994dfba emscripten: Use EM_ASYNC_JS 2024-07-31 08:59:33 +09:00
kichikuou a6aa50b5cf emscripten: Use MODULARIZE=1 2024-07-30 12:30:50 +09:00
kichikuou c4e8205d6c Version 2.11.6 2024-07-22 12:32:33 +09:00
kichikuou dd09f54329 mouse: Use system cursor if possible 2024-07-22 09:28:07 +09:00
kichikuou 435ceb31d3 Fix build with portmidi enabled but raw-midi disabled 2024-07-22 09:28:07 +09:00
kichikuou e40de66821 Remove obsolete docs 2024-07-12 11:25:15 +09:00
kichikuou 73c79b7a2e Add xsystem35 version string to mansource 2024-07-12 08:07:42 +09:00
kichikuou a825ee80b3 Add AsciiDoc manuals for xsystem35 command and .gr file format
They replace the outdated README and GRFMT.TXT files.
2024-07-12 07:40:32 +09:00
kichikuou eeeab6e054 Right-click exits selection without waiting for button up
This fixes https://github.com/kichikuou/xsystem35-sdl2/issues/56.
2024-06-18 13:17:53 +09:00
kichikuou 875b233f32 CI: Build with latest emscripten 2024-06-11 07:49:43 +09:00
kichikuou bcaed3a687 Version 2.11.5 2024-06-10 13:56:51 +09:00
kichikuou 894e8e26a6 Add CHANGELOG.md 2024-06-10 10:24:46 +09:00
kichikuou 7206b0a4f7 emscripten: Build with libwebp 2024-06-10 09:46:41 +09:00
kichikuou 343f3bb7c5 Fix fileCheckExist
This fixes https://github.com/kichikuou/xsystem35-sdl2/issues/55.
2024-06-10 08:59:58 +09:00
kichikuou d3650ce293 Update game_compatibility.md 2024-05-24 21:32:39 +09:00
kichikuou 386cfeb60c Update .gitignore 2024-05-24 21:31:49 +09:00
kichikuou 9cd66c83ef Android: Build with libwebp
Fixes https://github.com/kichikuou/xsystem35-sdl2/issues/46.
2024-05-23 10:57:38 +09:00
kichikuou 065e16a082 Version 2.11.4 2024-05-22 13:38:33 +09:00
kichikuou 3699aa5c2d Windows: Hide menu bar in fullscreen mode
The menu bar is displayed when the mouse is moved to the top of the
screen, like System39.exe's full-screen mode.

This fixes https://github.com/kichikuou/xsystem35-sdl2/issues/53.
2024-05-22 13:37:12 +09:00
kichikuou 20914970c9 Fix text rendering issue in Rance 3 OP
This fixes https://github.com/kichikuou/xsystem35-sdl2/issues/54.
2024-05-22 09:13:09 +09:00
kichikuou 3f2f555aa6 Add a link to SDL issue 2024-05-16 20:55:35 +09:00
kichikuou 095da0bb86 Version 2.11.3 2024-04-11 09:12:55 +09:00
kichikuou 7b8acd6e05 Use lowercase s[a-z].asd in Android and Emscripten
To make sure that save files created in older versions can be loaded.
2024-04-11 09:10:39 +09:00
kichikuou 1b13e331e4 emscripten: Enable msgskip in initGameResourceFromDir()
This is in preparation to stop using xsystem35.gr in Kichikuou on Web,
without changing the current behavior.
2024-04-11 09:00:42 +09:00
kichikuou 5621ab4d86 Version 2.11.2 2024-04-10 17:21:55 +09:00
kichikuou 79805d9ea2 Android: Update SDL, SDL_ttf and SDL_mixer 2024-04-10 15:32:40 +09:00
kichikuou f427d50fa3 Android: Remove playlist migration code
And stop using -playlist option, so that it can be overridden by
.xsys35rc.
2024-04-10 15:07:07 +09:00
kichikuou 7c7768fba4 Android: Improve installation when game is in non-root directory of ZIP
Launcher.kt extracts given ZIP file to the internal storage, preserving
its directory structure.

Before this change, if the game files were in a subdirectory, an
xsystem35.gr file was generated containing the path to the game files.
However, with this method, .xsys35rc and some data files (such as map
files of Kaeru Nyo) could not be loaded.

After this change, Launcher.kt will no longer generate the xsystem35.gr
file. Instead, it records the directory where the game is located in
game_directory.txt, and specify that directory in -gamedir to launch
xsystem35.

Fixes #51.
2024-04-10 15:06:51 +09:00
kichikuou 2b6267aeb9 Create save directory if it doesn't exist 2024-04-10 14:37:21 +09:00
kichikuou 16e7d3baf1 Add -savedir option
It allows specifying a save directory without writing a game resource
file.
2024-04-10 14:37:21 +09:00
kichikuou 2d8d95ac6f emscripten: Simplify link options 2024-03-12 17:03:57 +09:00
kichikuou d5899ff55a emscripten: Add return in wait_vsync
To make it work with ASYNCIFY=2.
2024-03-12 13:04:30 +09:00
193 changed files with 3724 additions and 4880 deletions
+2
View File
@@ -10,6 +10,7 @@ assignees: ''
### Environment
- xsystem35 version:
- OS:
- Game title:
### Steps to reproduce the behavior
1.
@@ -22,3 +23,4 @@ assignees: ''
<!-- If applicable, add screenshots to help explain your problem. -->
### Additional context
<!-- Note: Please do not post copyrighted game files. -->
+1 -1
View File
@@ -2,7 +2,7 @@ name: Emscripten Build
on: [push, pull_request]
env:
EM_VERSION: 3.1.54
EM_VERSION: latest
EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
- name: Install Deps
run: |
sudo apt update
sudo apt install libgtk-3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libwebp-dev libportmidi-dev libcjson-dev
sudo apt install libgtk-3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libwebp-dev libportmidi-dev libcjson-dev asciidoctor
- name: Build
run: |
+3 -2
View File
@@ -31,6 +31,7 @@ jobs:
SDL2_ttf:p
SDL2_mixer:p
libwebp:p
portmidi:p
${{ matrix.deps }}
- name: Checkout
@@ -44,7 +45,7 @@ jobs:
cp fonts/*.license dist/licenses/
- name: Install dev dependencies
run: pacboy --noconfirm -S --needed gcc:p cmake:p ninja:p
run: pacboy --noconfirm -S --needed gcc:p cmake:p ninja:p asciidoctor:p
- name: Build
run: |
@@ -59,7 +60,7 @@ jobs:
- name: Package
run: |
cp out/release/src/xsystem35.exe *.md COPYING xsys35rc.sample dist/
cp out/release/src/xsystem35.exe out/release/doc/*.html *.md COPYING xsys35rc.sample dist/
- name: Upload
uses: actions/upload-artifact@v4
+3
View File
@@ -1,10 +1,13 @@
out
android/.gradle
android/.idea
android/app/.cxx
android/app/.externalNativeBuild
android/app/build
android/app/src/main/assets
android/build
android/keystore.jks
android/local.properties
.ccls-cache
.dir-locals.el
compile_commands.json
+132
View File
@@ -0,0 +1,132 @@
# Changelog
## 2.14.0 - 2024-01-09
- New supported games: 俺の下であがけ and 楽園行.
- Windows: On Windows 10 version 1903 or above, now xsystem35 can handle
Japanese filenames correctly even if the system locale is not Japanese.
## 2.13.0 - 2024-12-07
- Windows: `Option` -> `Auto Copy Text to Clipboard` menu command has been added.
When enabled, in-game text will be copied to the clipboard automatically. This
can be used with text hooker tools that support clipboard monitoring.
## 2.12.1 - 2024-12-02
- Windows: Fixed missing DLL error (#60)
## 2.12.0 - 2024-11-26
- Implemented playback of the opening movie for 妻みぐい2.
## 2.11.7 - 2024-11-12
- Fixed crash when canceling menu with two-finger touch (#58)
- Fixed screen artifact in Rance 3 immediately after selecting "Game Start"
## 2.11.6 - 2024-07-22
- Fixed strange behavior when canceling the battle selection menu in Kichikuou Rance. (#56)
- Use system mouse cursors whenever possible. They look better on high dpi displays.
- Added manual page for the xsystem35 command.
## 2.11.5 - 2024-06-10
- Android: Fixed a black screen issue in the MangaGamer version of Rance 5D.
- Fixed `fileCheckExist` command. (#55)
## 2.11.4 - 2024-05-22
- Windows: In full-screen mode, the menu bar now appears only when the mouse pointer is at the top of the screen. (#53)
- Fixed text rendering issue in Rance 3 intro. (#54)
## 2.11.3 - 2024-04-11
- Android: Fixed a bug where save files from older versions could not be loaded in version 2.11.2.
## 2.11.2 - 2024-04-10
- Added `-savedir` option to specify save directory.
- Android: Fixed a bug where .xsys35rc in a subdirectory of ZIP was not loaded. (#51)
## 2.11.1 - 2024-02-18
- Windows: Fixed a black screen issue in the MangaGamer version of Rance 5D (#45).
- Fixed a crash bug in command-line debugger.
## 2.11.0 - 2024-01-20
- Windows: Now `xsystem35.exe` is a standalone executable. You can just copy it to the game folder and run it.
- Windows: The installer is no longer provided. If you have an earlier version installed, please uninstall it.
- Windows: The debugger is no longer available in the 32-bit version. Please use the 64-bit version if you need it.
- Added experimental `enable_zb` option (#44). See `xsys35rc.sample` for details.
## 2.10.1 - 2024-01-01
- Windows: Added "Integer Scaling" menu option
- Fixed initial palette colors (to match System3.9)
- Fixed a bug where palette 246 to 249 were unintentionally changed after loading 256-color CGs
## 2.10.0 - 2023-12-09
- Breaking change: A [bug](https://github.com/kichikuou/xsystem35-sdl2/issues/41) has been fixed in which save format for 大悪司 and かえるにょ国にょアリス was not compatible with System3.9. As a result, save files for these games created with older versions of xsystem35 are no longer usable. (Loading will not fail, but wrong values will be loaded.)
- Now the 64-bit executable supports Windows 10 or later. For older Windows, please use the 32-bit version.
- Fixed a problem with the download edition of Daiakuji requiring insertion of Disk 2. (#43)
- Debugger: Added debug commands for monitoring the color palette.
- Minor bug fixes.
## 2.9.1 - 2023-06-22
- Fixed a bug where the `CX 1` command (copy with transparent color) did not work in some games (e.g. Daiakuji)
- Debugger: Now breakpoints do not make the window completely unresponsive
- Debugger: Fixed a conditional breakpoint crash bug
## 2.9.0 - 2023-05-04
- Now xsystem35 uses the System3.9 save file format (unless `-saveformat` command line flag is specified). Old save files can still be loaded.
- Changed the default naming convention for save files from `[a-z]sleep.asd` to `<gamename>s[a-z].asd`.
- Fixed a bug where SACT games (e.g. Rance 5D) were not responding to touch.
- Fixed memory leaks in debugger.
## 2.8.0 - 2023-02-12
- Added support for Rance 4.1/4.2 ver1.05
- Fixed movement animation in rooms in Rance 4 v2.05 (#35)
- Added `-game` option which can be used to enable game-specific hacks in translated games
## 2.7.0 - 2023-01-28
- Added support for Rance4 ver.2.05
- Now supports BGM playback for the download edition of Daiakuji
- Bug fixes
## 2.6.0 - 2023-01-01
- Android: Introduced a new way to simulate right-click; tapping on the black bars at the left/right or top/bottom of the screen is treated as a right click. (Two-finger touch, the old way to simulate a right click, still works.)
- Windows: Added a menu command to enable/disable automatic mouse movements.
## 2.5.1 - 2022-07-31
- Implemented "palette shift" graphic effect (used in 闘神都市II).
- Implemented `grDrawFillCircle` command (used in グレイメルカ).
- Fixed color update bug in 256-color games.
- Fixed crash by out-of-bounds variable access in debugger.
## 2.5.0 - 2022-07-17
- Supported JPEG image format on Android.
## 2.4.0 - 2022-07-02
- Windows: Added "Restart" menu command.
- Fixed a bug where wrong music is played in Kichikuou Rance (System3.9 version). #32
- Supported mouse wheel input.
- Fixed a bug in `MF` command.
- Implemented `grEffectMoveView` command.
## 2.3.0 - 2022-04-08
- Code for screen transition effects have been substantially rewritten (but you probably wouldn't notice any difference).
- Fixed bugs in System3.9 games.
- Android: Enabled joystick input.
- Debugger improvements.
## 2.2.0 - 2021-12-03
From now on, the Android and Windows versions will use a common version number.
- Android: Use custom fonts specified in `.xsys35c`. (#20)
- Supported "王子さまLv1".
- Debugger improvements.
- Fixed some bugs and compatibility issues.
## 2.1.0 - 2021-11-07
- Fixed issues with MangaGamer version of Rance 5D.
- Fixed garbled text in some System3.9 games with Unicode mode.
- Display a message box on fatal errors.
- Various debugger improvements.
## 2.0.1 - 2021-10-24
- Fixed crash during shutdown.
## 2.0.0 - 2021-10-23
- Added window menubar from which you can save screenshots, change fullscreen mode, and enable message skipping.
- Added debugger support that can be used from Visual Studio Code. See [vscode-system3x](https://github.com/kichikuou/vscode-system3x) for details.
- Many bug fixes and compatibility fixes.
+51 -25
View File
@@ -1,11 +1,19 @@
cmake_minimum_required(VERSION 3.13)
# Rebuild external projects when download URL changes
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()
project(xsystem35 LANGUAGES C)
set(CMAKE_C_STANDARD 99)
enable_testing()
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
set(XSYSTEM35_VERSION "2.14.0")
include(CheckSymbolExists)
include(FetchContent)
# A wrapper around pkg_check_modules() that skips the check if ENABLE_<prefix> is false
macro (optional_pkg_check_modules prefix)
@@ -26,6 +34,27 @@ function(add_static_library name pkg)
INTERFACE_LINK_OPTIONS "${${pkg}_STATIC_LDFLAGS_OTHER}")
endfunction()
function(fetch_webp)
FetchContent_Declare(
libwebp
URL https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.4.0.tar.gz
URL_HASH SHA1=0b1c8bea200caaa010182609dbaaa91aec69b64d
)
set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities." FORCE)
set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool." FORCE)
set(WEBP_BUILD_DWEBP OFF CACHE BOOL "Build the dwebp command line tool." FORCE)
set(WEBP_BUILD_GIF2WEBP OFF CACHE BOOL "Build the gif2webp conversion tool." FORCE)
set(WEBP_BUILD_IMG2WEBP OFF CACHE BOOL "Build the img2webp animation tool." FORCE)
set(WEBP_BUILD_VWEBP OFF CACHE BOOL "Build the vwebp viewer tool." FORCE)
set(WEBP_BUILD_WEBPINFO OFF CACHE BOOL "Build the webpinfo command line tool." FORCE)
set(WEBP_BUILD_LIBWEBPMUX OFF CACHE BOOL "Build the libwebpmux library." FORCE)
set(WEBP_BUILD_WEBPMUX OFF CACHE BOOL "Build the webpmux command line tool." FORCE)
set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras." FORCE)
set(WEBP_BUILD_WEBP_JS OFF CACHE BOOL "Emscripten build of webp.js." FORCE)
FetchContent_MakeAvailable(libwebp)
add_library(WebP ALIAS webp)
endfunction()
check_symbol_exists(getlogin "unistd.h" HAVE_GETLOGIN)
check_symbol_exists(mmap "sys/mman.h" HAVE_MMAP)
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
@@ -37,10 +66,12 @@ if (EMSCRIPTEN)
INTERFACE_COMPILE_OPTIONS ${option}
INTERFACE_LINK_OPTIONS ${option})
endfunction()
add_emscripten_library(zlib "SHELL:-s USE_ZLIB=1")
add_emscripten_library(sdl2 "SHELL:-s USE_SDL=2")
add_emscripten_library(sdl2_ttf "SHELL:-s USE_SDL_TTF=2")
add_emscripten_library(zlib -sUSE_ZLIB=1)
add_emscripten_library(sdl2 -sUSE_SDL=2)
add_emscripten_library(sdl2_ttf -sUSE_SDL_TTF=2)
set(DEFAULT_FONT_PATH /fonts/)
fetch_webp()
set(HAVE_WEBP 1)
elseif (ANDROID)
add_library(sdl2 ALIAS SDL2)
@@ -50,6 +81,8 @@ elseif (ANDROID)
find_library(ndk_zlib z)
add_library(zlib INTERFACE)
set_target_properties(zlib PROPERTIES INTERFACE_LINK_LIBRARIES ${ndk_zlib})
fetch_webp()
set(HAVE_WEBP 1)
else() # non-emscripten, non-android
if (WIN32)
@@ -110,9 +143,18 @@ else() # non-emscripten, non-android
endif()
endif()
find_library(PORTMIDI portmidi)
if (PORTMIDI)
set(HAVE_PORTMIDI 1)
if (WIN32)
optional_pkg_check_modules(PORTMIDI IMPORTED_TARGET portmidi)
if (PORTMIDI_FOUND)
set(HAVE_PORTMIDI 1)
add_static_library(portmidi_static PORTMIDI)
set(PORTMIDI portmidi_static)
endif()
else ()
find_library(PORTMIDI portmidi)
if (PORTMIDI)
set(HAVE_PORTMIDI 1)
endif()
endif()
endif()
@@ -157,25 +199,6 @@ else()
list(APPEND SUMMARY_MIDI "SDL_mixer")
set(ENABLE_MIDI_SDLMIXER 1)
if (HAVE_SIGACTION)
list(APPEND SUMMARY_MIDI "raw")
set(MIDI_DEVICE "/dev/midi" CACHE STRING "midi device")
set(ENABLE_MIDI_RAWMIDI 1)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
check_symbol_exists(SNDCTL_SEQ_NRSYNTHS "machine/soundcard.h" ENABLE_MIDI_SEQMIDI)
elseif (CMAKE_SYSTEM_NAME MATCHES "(NetBSD|OpenBSD)")
check_symbol_exists(SNDCTL_SEQ_NRSYNTHS "soundcard.h" ENABLE_MIDI_SEQMIDI)
else ()
check_symbol_exists(SNDCTL_SEQ_NRSYNTHS "sys/soundcard.h" ENABLE_MIDI_SEQMIDI)
endif()
if (ENABLE_MIDI_SEQMIDI)
list(APPEND SUMMARY_MIDI "OSS sequencer")
set(SEQ_DEVICE "/dev/sequencer" CACHE STRING "sequencer device")
endif()
if (HAVE_PORTMIDI)
list(APPEND SUMMARY_MIDI "PortMidi")
set(ENABLE_MIDI_PORTMIDI 1)
@@ -206,6 +229,9 @@ add_compile_definitions($<$<CONFIG:Debug>:DEBUG>)
add_subdirectory(src)
add_subdirectory(tools)
add_subdirectory(fonts)
if (NOT ANDROID AND NOT EMSCRIPTEN)
add_subdirectory(doc)
endif()
if (ENABLE_NLS)
add_subdirectory(po)
endif()
+14 -6
View File
@@ -63,8 +63,14 @@ and examine or modify game variables. There are two ways to use the debugger:
## Installation
Prebuilt packages for Windows and Android can be downloaded from the
[Releases](https://github.com/kichikuou/xsystem35-sdl2/releases) page. For
other platforms, refer to the [Building](#building) section.
[Releases](https://github.com/kichikuou/xsystem35-sdl2/releases) page.
Note for Windows:
- The 64-bit version supports Windows 10 or later. For older versions of
Windows, please use the 32-bit version.
- Debugging is supported only in the 64-bit version.
For other platforms, refer to the [Building](#building) section.
## Running
### Windows
@@ -73,7 +79,7 @@ Copy `xsystem35.exe` to the game folder and run it.
### Android
See [android/README.md](android/README.md#use).
See [android/README.md](android/README.md#usage).
### Other Platforms
@@ -84,11 +90,13 @@ $ cd /path/to/game_directory
$ xsystem35
```
See [xsystem35 command manual](doc/xsystem35.6.adoc) for detailed usage.
## Building
### Linux (Debian / Ubuntu)
```bash
$ sudo apt install build-essential cmake libgtk-3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libwebp-dev libcjson-dev
$ sudo apt install build-essential cmake libgtk-3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libwebp-dev libportmidi-dev libcjson-dev asciidoctor
$ mkdir -p out/debug
$ cd out/debug
$ cmake -DCMAKE_BUILD_TYPE=Debug ../../
@@ -100,7 +108,7 @@ $ make && make install
[Homebrew](https://brew.sh/) is required.
```bash
$ brew install cmake pkg-config sdl2 sdl2_mixer sdl2_ttf webp cjson
$ brew install cmake pkg-config sdl2 sdl2_mixer sdl2_ttf webp portmidi cjson asciidoctor
$ mkdir -p out/debug
$ cd out/debug
$ cmake -DCMAKE_BUILD_TYPE=Debug ../../
@@ -112,7 +120,7 @@ $ make && make install
[MSYS2](https://www.msys2.org) is required.
```bash
$ pacman -S cmake mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-SDL2_ttf mingw-w64-ucrt-x86_64-SDL2_mixer mingw-w64-ucrt-x86_64-libwebp mingw-w64-ucrt-x86_64-cjson
$ pacman -S cmake mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-SDL2_ttf mingw-w64-ucrt-x86_64-SDL2_mixer mingw-w64-ucrt-x86_64-libwebp mingw-w64-ucrt-x86_64-portmidi mingw-w64-ucrt-x86_64-cjson
$ mkdir -p out/debug
$ cd out/debug
$ cmake -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug ../../
+2 -2
View File
@@ -16,8 +16,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 34
versionCode 19
versionName "2.11.1" + gitRevision()
versionCode 29
versionName "2.14.0" + gitRevision()
externalNativeBuild {
cmake {
arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static"
+8 -9
View File
@@ -7,18 +7,18 @@ set(PROJECT_ROOT_DIR ../../..)
include(FetchContent)
FetchContent_Declare(
SDL
URL https://github.com/libsdl-org/SDL/releases/download/release-2.28.5/SDL2-2.28.5.tar.gz
URL_HASH SHA1=50af6b564890d702e57e2a72d6429b43778ed29a
URL https://github.com/libsdl-org/SDL/releases/download/release-2.30.9/SDL2-2.30.9.tar.gz
URL_HASH SHA1=9403df0573d47f62f2de074b582b87576bb4abbc
)
FetchContent_Declare(
SDL_ttf
URL https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.20.1/SDL2_ttf-2.20.1.tar.gz
URL_HASH SHA1=f774ff407915ae4afa3d03e5a9395283d9090f28
URL https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.22.0/SDL2_ttf-2.22.0.tar.gz
URL_HASH SHA1=da5e86b601ad299a697878fab1af6f3be47b529d
)
FetchContent_Declare(
SDL_mixer
URL https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.6.2/SDL2_mixer-2.6.2.tar.gz
URL_HASH SHA1=036fc7839a6b8dc1af3dbfed4e2531224bbacdd7
URL https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0.tar.gz
URL_HASH SHA1=a58c69f9d00e44833b9e00e1adb58d85759ca499
)
set(SDL2TTF_SAMPLES OFF CACHE BOOL "Build the SDL2_ttf sample program(s)" FORCE)
@@ -29,12 +29,11 @@ set(SDL2MIXER_OPUS OFF CACHE BOOL "Enable Opus music" FORCE)
set(SDL2MIXER_FLAC OFF CACHE BOOL "Enable FLAC music" FORCE)
set(SDL2MIXER_MOD OFF CACHE BOOL "Support loading MOD music" FORCE)
set(SDL2MIXER_MIDI OFF CACHE BOOL "Enable MIDI music" FORCE)
set(SDL2MIXER_WAVPACK OFF CACHE BOOL "Enable WavPack music" FORCE)
set(SDL2MIXER_SAMPLES OFF CACHE BOOL "Build the SDL2_mixer sample program(s)" FORCE)
set(SDL2MIXER_INSTALL OFF CACHE BOOL "Enable SDL2_mixer install target" FORCE)
FetchContent_MakeAvailable(SDL)
FetchContent_MakeAvailable(SDL_ttf)
FetchContent_MakeAvailable(SDL_mixer)
FetchContent_MakeAvailable(SDL SDL_ttf SDL_mixer)
# The main CMakeLists.txt of xsystem35
add_subdirectory(${PROJECT_ROOT_DIR} xsystem35)
+1 -1
View File
@@ -80,7 +80,7 @@
android:label="@string/app_name"
android:alwaysRetainTaskState="true"
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:theme="@style/AppTheme"
android:hardwareAccelerated="true"
>
@@ -30,9 +30,11 @@ import java.io.IOException
// Intent for this activity must have the following extra:
// - EXTRA_GAME_ROOT (string): A path to the game installation.
// - EXTRA_SAVE_DIRECTORY (string): A path to the save data directory.
class GameActivity : SDLActivity() {
companion object {
const val EXTRA_GAME_ROOT = "GAME_ROOT"
const val EXTRA_SAVE_DIRECTORY = "SAVE_DIRECTORY"
const val EXTRA_ARCHIVE_NAME = "ARCHIVE_NAME"
}
@@ -61,7 +63,7 @@ class GameActivity : SDLActivity() {
override fun getArguments(): Array<String> {
return arrayOf(
"-gamedir", intent.getStringExtra(EXTRA_GAME_ROOT)!!,
"-playlist", Launcher.PLAYLIST_FILE)
"-savedir", intent.getStringExtra(EXTRA_SAVE_DIRECTORY)!!)
}
override fun setTitle(title: CharSequence?) {
@@ -25,9 +25,7 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.io.*
import java.lang.StringBuilder
import java.nio.charset.Charset
import java.util.*
import java.util.zip.ZipEntry
import java.util.zip.ZipInputStream
import java.util.zip.ZipOutputStream
@@ -41,13 +39,13 @@ interface LauncherObserver {
fun onInstallFailure(msgId: Int)
}
private const val SAVE_DIR = "save"
class Launcher private constructor(private val rootDir: File) {
companion object {
const val SAVE_DIR = "save"
const val TITLE_FILE = "title.txt"
const val PLAYLIST_FILE = "playlist2.txt"
const val OLD_PLAYLIST_FILE = "playlist.txt"
const val GAMEDIR_FILE = "game_directory.txt"
const val PLAYLIST_FILE = "playlist.txt"
const val OLD_PLAYLIST_FILE = "playlist2.txt"
fun getInstance(rootDir: File): Launcher {
if (gLauncher == null) {
@@ -79,14 +77,14 @@ class Launcher private constructor(private val rootDir: File) {
isInstalling = true
GlobalScope.launch(Dispatchers.Main) {
try {
withContext(Dispatchers.IO) {
val gameDir = withContext(Dispatchers.IO) {
extractFiles(input, dir) { msg ->
GlobalScope.launch(Dispatchers.Main) {
observer?.onInstallProgress(msg)
}
}
}
observer?.onInstallSuccess(dir, archiveName)
observer?.onInstallSuccess(gameDir, archiveName)
} catch (e: InstallFailureException) {
observer?.onInstallFailure(e.msgId)
} catch (e: Exception) {
@@ -114,9 +112,11 @@ class Launcher private constructor(private val rootDir: File) {
continue
}
try {
val titleFile = File(path, TITLE_FILE)
val gameDirFile = File(path, GAMEDIR_FILE)
val gamePath = if (gameDirFile.exists()) File(path, gameDirFile.readText()) else path
val titleFile = File(gamePath, TITLE_FILE)
val title = titleFile.readText()
games.add(Entry(path, title, titleFile.lastModified()))
games.add(Entry(gamePath, title, titleFile.lastModified()))
migratePlaylist(path)
} catch (e: IOException) {
// Incomplete game installation. Delete it.
@@ -179,7 +179,7 @@ class Launcher private constructor(private val rootDir: File) {
}
}
private fun extractFiles(input: InputStream, outDir: File, progressCallback: (String) -> Unit) {
private fun extractFiles(input: InputStream, outDir: File, progressCallback: (String) -> Unit): File {
val configWriter = GameConfigWriter()
val hadDecodeError = forEachZipEntry(input) { zipEntry, zip ->
Log.i("extractFiles", zipEntry.name)
@@ -193,90 +193,62 @@ class Launcher private constructor(private val rootDir: File) {
}
configWriter.maybeAdd(zipEntry.name)
}
if (!configWriter.readyToWrite()) {
if (!configWriter.ready) {
if (hadDecodeError)
throw InstallFailureException(R.string.unsupported_zip)
throw InstallFailureException(R.string.cannot_find_ald)
}
configWriter.write(outDir)
return configWriter.gameDir?.let { File(outDir, it) } ?: outDir
}
// Xsystem35-sdl2 <=2.2.0 had a bug where playlist had an extra empty line at
// the beginning of the file. This migrates playlist.txt created by an old
// version of xsystem35-sdl2 to playlist2.txt.
// Xsystem35-sdl2 2.3.0 - 2.11.1 used playlist2.txt. Rename it to playlist.txt.
private fun migratePlaylist(dir: File) {
val oldPlaylist = File(dir, OLD_PLAYLIST_FILE)
if (!oldPlaylist.exists())
return
var tracks = oldPlaylist.readLines()
if (tracks.isNotEmpty())
tracks = tracks.subList(1, tracks.size)
File(dir, PLAYLIST_FILE).writeText(tracks.joinToString("\n"))
oldPlaylist.delete()
if (oldPlaylist.exists()) {
oldPlaylist.renameTo(File(dir, PLAYLIST_FILE))
}
}
class InstallFailureException(val msgId: Int) : Exception()
// A helper class which generates xsystem35.gr and playlist.txt in the game root directory.
// A helper class which generates GAMEDIR_FILE and PLAYLIST_FILE.
private class GameConfigWriter {
private val grb = StringBuilder()
private var basename: String? = null
private val aldRegex = """(.*?)([a-z])([a-z])\.(ald|wai|bgi)""".toRegex(RegexOption.IGNORE_CASE)
private val aldType = mapOf(
"b" to "BGM",
"d" to "Data",
"g" to "Graphics",
"m" to "Midi",
"r" to "Resource",
"s" to "Scenario",
"w" to "Wave")
private val specialResources = mapOf(
"system39.ain" to "Ain",
"system39.ini" to "Init",
"sactefam.kld" to "SACT01"
)
var ready = false
private set
var gameDir: String? = null
private set
private val aldRegex = """.*?s[a-z]\.ald""".toRegex(RegexOption.IGNORE_CASE)
private val audioRegex = """.*?(\d+)\.(wav|mp3|ogg)""".toRegex(RegexOption.IGNORE_CASE)
private val audioFiles: Array<String?> = arrayOfNulls(100)
fun maybeAdd(path: String) {
val name = File(path).name
specialResources[name.lowercase(Locale.US)]?.let {
grb.appendLine("$it $path")
return
aldRegex.matchEntire(path)?.let {
gameDir = File(path).parent
ready = true
}
aldRegex.matchEntire(name)?.let {
val ext = it.groupValues[4].uppercase(Locale.US)
val type = if (ext == "ALD") {
aldType[it.groupValues[2].lowercase(Locale.US)]
} else {
ext
}
val id = it.groupValues[3].uppercase(Locale.US)
if (type != null) {
grb.appendLine("$type$id $path")
basename = it.groupValues[1]
}
}
audioRegex.matchEntire(name)?.let {
audioRegex.matchEntire(path)?.let {
val track = it.groupValues[1].toInt()
if (0 < track && track <= audioFiles.size)
audioFiles[track - 1] = path
}
}
fun readyToWrite() = basename != null
fun write(outDir: File) {
for (id in 'A' .. 'Z') {
grb.appendLine("Save$id ../save/${basename}s${id.lowercase(Locale.US)}.asd")
// Generate GAMEDIR_FILE
gameDir?.let {
File(outDir, GAMEDIR_FILE).writeText(it)
}
// Generate PLAYLIST_FILE
val absGameDir = gameDir?.let { File(outDir, it) } ?: outDir
val playlistFile = File(absGameDir, PLAYLIST_FILE)
if (!playlistFile.exists()) {
val prefixToRemove = gameDir?.let { "$it/" } ?: ""
val playlist = audioFiles.joinToString("\n") {
it?.removePrefix(prefixToRemove) ?: ""
}.trimEnd('\n')
playlistFile.writeText(playlist)
}
val gr = grb.toString()
Log.i("xsystem35.gr", gr)
File(outDir, "xsystem35.gr").writeText(gr)
val playlist = audioFiles.joinToString("\n") { it ?: "" }.trimEnd('\n')
File(outDir, PLAYLIST_FILE).writeText(playlist)
}
}
}
@@ -180,6 +180,7 @@ class LauncherActivity : Activity(), LauncherObserver {
val i = Intent()
i.setClass(applicationContext, GameActivity::class.java)
i.putExtra(GameActivity.EXTRA_GAME_ROOT, path.path)
i.putExtra(GameActivity.EXTRA_SAVE_DIRECTORY, File(filesDir, Launcher.SAVE_DIR).path)
i.putExtra(GameActivity.EXTRA_ARCHIVE_NAME, archiveName)
startActivity(i)
}
@@ -277,6 +277,7 @@ public class HIDDeviceManager {
0x044f, // Thrustmaster
0x045e, // Microsoft
0x0738, // Mad Catz
0x0b05, // ASUS
0x0e6f, // PDP
0x0f0d, // Hori
0x10f5, // Turtle Beach
@@ -285,6 +286,7 @@ public class HIDDeviceManager {
0x24c6, // PowerA
0x2dc8, // 8BitDo
0x2e24, // Hyperkin
0x3537, // GameSir
};
if (usbInterface.getId() == 0 &&
@@ -358,6 +360,12 @@ public class HIDDeviceManager {
private void initializeBluetooth() {
Log.d(TAG, "Initializing Bluetooth");
if (Build.VERSION.SDK_INT >= 31 /* Android 12 */ &&
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH_CONNECT, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH_CONNECT");
return;
}
if (Build.VERSION.SDK_INT <= 30 /* Android 11.0 (R) */ &&
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
@@ -583,7 +591,13 @@ public class HIDDeviceManager {
} else {
flags = 0;
}
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
if (Build.VERSION.SDK_INT >= 33 /* Android 14.0 (U) */) {
Intent intent = new Intent(HIDDeviceManager.ACTION_USB_PERMISSION);
intent.setPackage(mContext.getPackageName());
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, intent, flags));
} else {
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), flags));
}
} catch (Exception e) {
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
HIDDeviceOpenResult(deviceID, false);
@@ -38,6 +38,10 @@ public class SDL {
}
public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
loadLibrary(libraryName, mContext);
}
public static void loadLibrary(String libraryName, Context context) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
if (libraryName == null) {
throw new NullPointerException("No library name provided.");
@@ -53,10 +57,10 @@ public class SDL {
// To use ReLinker, just add it as a dependency. For more information, see
// https://github.com/KeepSafe/ReLinker for ReLinker's repository.
//
Class<?> relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
Class<?> relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
Class<?> contextClass = mContext.getClassLoader().loadClass("android.content.Context");
Class<?> stringClass = mContext.getClassLoader().loadClass("java.lang.String");
Class<?> relinkClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
Class<?> relinkListenerClass = context.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
Class<?> contextClass = context.getClassLoader().loadClass("android.content.Context");
Class<?> stringClass = context.getClassLoader().loadClass("java.lang.String");
// Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if
// they've changed during updates.
@@ -66,7 +70,7 @@ public class SDL {
// Actually load the library!
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
loadMethod.invoke(relinkInstance, mContext, libraryName, null, null);
loadMethod.invoke(relinkInstance, context, libraryName, null, null);
}
catch (final Throwable e) {
// Fall back
@@ -60,8 +60,8 @@ import java.util.Locale;
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 2;
private static final int SDL_MINOR_VERSION = 28;
private static final int SDL_MICRO_VERSION = 5;
private static final int SDL_MINOR_VERSION = 30;
private static final int SDL_MICRO_VERSION = 9;
/*
// Display InputType.SOURCE/CLASS of events and devices
//
@@ -89,7 +89,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
| InputDevice.SOURCE_CLASS_POSITION
| InputDevice.SOURCE_CLASS_TRACKBALL);
if (s2 != 0) cls += "Some_Unkown";
if (s2 != 0) cls += "Some_Unknown";
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
@@ -163,7 +163,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if (s == FLAG_TAINTED) src += " FLAG_TAINTED";
s2 &= ~FLAG_TAINTED;
if (s2 != 0) src += " Some_Unkown";
if (s2 != 0) src += " Some_Unknown";
Log.v(TAG, prefix + "int=" + s_copy + " CLASS={" + cls + " } source(s):" + src);
}
@@ -281,7 +281,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
// Load the .so
public void loadLibraries() {
for (String lib : getLibraries()) {
SDL.loadLibrary(lib);
SDL.loadLibrary(lib, this);
}
}
@@ -995,8 +995,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
/* No valid hint, nothing is explicitly allowed */
if (!is_portrait_allowed && !is_landscape_allowed) {
if (resizable) {
/* All orientations are allowed */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
/* All orientations are allowed, respecting user orientation lock setting */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
} else {
/* Fixed window and nothing specified. Get orientation from w/h of created window */
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
@@ -1005,8 +1005,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
/* At least one orientation is allowed */
if (resizable) {
if (is_portrait_allowed && is_landscape_allowed) {
/* hint allows both landscape and portrait, promote to full sensor */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
/* hint allows both landscape and portrait, promote to full user */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_USER;
} else {
/* Use the only one allowed "orientation" */
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
@@ -546,13 +546,15 @@ class SDLHapticHandler {
if (haptic == null) {
InputDevice device = InputDevice.getDevice(deviceIds[i]);
Vibrator vib = device.getVibrator();
if (vib.hasVibrator()) {
haptic = new SDLHaptic();
haptic.device_id = deviceIds[i];
haptic.name = device.getName();
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
if (vib != null) {
if (vib.hasVibrator()) {
haptic = new SDLHaptic();
haptic.device_id = deviceIds[i];
haptic.name = device.getName();
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
}
}
}
}
+2 -3
View File
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<style name="AppTheme" parent="android:Theme.NoTitleBar.Fullscreen">
<!-- Customize your theme here. -->
</style>
</resources>
+1 -5
View File
@@ -1,20 +1,16 @@
#cmakedefine PACKAGE "@PACKAGE@"
#define VERSION "2.11.1"
#define VERSION "@XSYSTEM35_VERSION@"
#cmakedefine CACHE_TOTALSIZE @CACHE_TOTALSIZE@
#cmakedefine ENABLE_DEBUGGER @ENABLE_DEBUGGER@
#cmakedefine ENABLE_GTK @ENABLE_GTK@
#cmakedefine ENABLE_MIDI_RAWMIDI @ENABLE_MIDI_RAWMIDI@
#cmakedefine ENABLE_MIDI_SDLMIXER @ENABLE_MIDI_SDLMIXER@
#cmakedefine ENABLE_MIDI_SEQMIDI @ENABLE_MIDI_SEQMIDI@
#cmakedefine ENABLE_MIDI_PORTMIDI @ENABLE_MIDI_PORTMIDI@
#cmakedefine ENABLE_NLS @ENABLE_NLS@
#cmakedefine DEFAULT_PLAYLIST_PATH "@DEFAULT_PLAYLIST_PATH@"
#cmakedefine JOY_DEVICE "@JOY_DEVICE@"
#cmakedefine MIDI_DEVICE "@MIDI_DEVICE@"
#cmakedefine SEQ_DEVICE "@SEQ_DEVICE@"
#cmakedefine HAVE_GETLOGIN @HAVE_GETLOGIN@
#cmakedefine HAVE_MMAP @HAVE_MMAP@
+42
View File
@@ -0,0 +1,42 @@
set(SOURCES
xsystem35.6.adoc
xsystem35.gr.5.adoc
)
find_program(ASCIIDOCTOR asciidoctor)
if (NOT ASCIIDOCTOR)
message(WARNING "asciidoctor not found, manpages will not be generated")
else()
if (WIN32)
set(BACKEND html)
else()
set(BACKEND manpage)
include(GNUInstallDirs)
endif()
set(MANUALS "")
foreach(SRC ${SOURCES})
string(REGEX MATCH "^(.*)\\.([0-9])\\.adoc$" _ ${SRC})
set(NAME ${CMAKE_MATCH_1})
set(SECTION ${CMAKE_MATCH_2})
if (WIN32)
set(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.html)
else()
set(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${SECTION})
install(FILES ${OUTPUT} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${SECTION})
endif()
add_custom_command(
OUTPUT ${OUTPUT}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${SRC}
COMMAND ${ASCIIDOCTOR}
--attribute xsystem35-version=${XSYSTEM35_VERSION}
--backend ${BACKEND}
--out-file ${OUTPUT}
${CMAKE_CURRENT_SOURCE_DIR}/${SRC}
)
list(APPEND MANUALS ${OUTPUT})
endforeach()
add_custom_target(manual ALL DEPENDS ${MANUALS})
endif()
View File
-80
View File
@@ -1,80 +0,0 @@
ゲームリソースファイル(*.gr)の書き方
xsystem35ではゲームデータの置き場所をテキストファイルに保存しておき、
それをxsystem35に指定してやる事でデータの置き場所を知らせます。
# このファイルのファイル名はxsystem35を起動する時に指定できますので、hoge.gr
# である必要は無く、自由につける事が出来ます。
ここでは、このテキストファイル(ゲームリソースファイル)の書式を説明します。
1つのデータにつき1行で記述します。例を見て下さい。
ScenarioA /home/chikama/game/rance4/rance4_sa.ald
キーワード データのフルパス
の順に書きます。キーワードは行の先頭から書き、データのフルパスとの間は半角
スペースです。(セーブデータのみ、ホームディレクトリを表す ~ を評価します。)
キーワードには次の7つがあります。
Scenario : シナリオ
Graphics : グラフィック
Wave : PCMデータ
Midi : MIDIデータ
Data : その他データ
Save : セーブデータ
Resource : リソースファイル(マウスカーソル形状)
Ain : DLL とその関数の情報のかかれた System39.ain
BGM : BGMデータ(エスカレイヤー以降のBGMデータファイル)
WAI : PCMデータの追加情報 (mixer channel 情報等)
BGI : BGMデータの追加情報 (ループ位置等)
SACT01 : SACT.DLL用データ (SACTEFAM.KLD)
ALK : デモ用アーカイブファイル
Init : System39.ini
同じ種類のデータが複数ある場合はキーワードの次にA,B,C...をつけます。
(Ain を除く)
CD-ROM上のどれがどの種類のファイルかは、ファイル名で判別します。
*SA.ALD ならシナリオの1番目、*GA.ALDはグラフィック、*WA.ALDはPCM、
*MA.ALD はMIDI、*DA.ALDはその他データです。
Ain は System39.ain へのパスを書きます。例えば
Ain /home/chikama/game/20cKaeru/System39.ain
のように書きます。
Init は System39.ini へのパスを書きます。例えば
Init /home/chikama/game/esuka/System39.ini
のように書きます。
WAI/BGI は通常1ファイルだけですので
WAIA /home/chikama/game/esuka/DOKI_WA.WAI
BGIA /home/chikama/game/esuka/DOKI_BA.BGI
のように書きます。
SACT01 は SACTシステム固有のデータファイル(SACTEFAM.KLD)へのパスを
指定します。
SACT01 /home/chikama/game/rance5d/SACTEFAM.KLD
ALK はデモ用のデータが入ったアーカイブファイルです。
ALK01 /home/chikama/game/nd/NightDemonDemo1.alk
ALK02 /home/chikama/game/nd/NightDemonDemo2.alk
ALK03 /home/chikama/game/nd/NightDemonDemo3.alk
のように書きます。
また、これらの範疇にはいらないデータ、たとえば、かえるにょぱにょんの
floor_1.mapなどはリソースファイルを介しませんので、ゲームリソース
ファイルには書かず、「セーブデータを置いたディレクトリと同じ場所」に
コピーして下さい。
また、Save? のみ、'~' (ホームディレクトリ)を評価しますので、
SaveA ~/savedata/kichiku/kichiku_sa.ald
のように書く事が出来ます。
コメントを書く場合は行頭に # をつけます。また空白行は無視されます。
-314
View File
@@ -1,314 +0,0 @@
System 3.5 for X Window System Version 1.7 (開発版)
0. 目次
1. はじめに
2. 開発環境と動作確認環境
2.a. 開発環境
2.b. 動作確認環境
2.c. 多分動くと思われる環境
3. xystem35の設定ファイル
4. ゲームの実行と終了
4.a. ゲームの実行
4.b. ゲームの終了
4.c. xsystem35メニュー
4.d. キーボード操作
5. コマンドラインオプション
6. その他情報
6.a. SYSV IPC
6.b. SharedMemoryの大きさについて
6.c. locale と X
7. 著作権とライセンス
8. サポート
1. はじめに
このソフトは AliceSoft の Syetem3.5/3.6/3.8/3.9 上で動くゲームを
X Window System 上で動かすためのプログラムです。
* 動作確認ゲーム
鬼畜王ランス
ランス4 (for Win95)
闘神都市II (for Win95)
夢幻泡影 (for Win95)
かえるにょぱにょ〜ん (初版、廉価版)
いけないかつみ先生
戦巫女 (初版、廉価版)
零式 (館456版、廉価版)
ATLACH=NACHA (館456版、廉価版)
人間狩り
王道勇者
ディアボリカ (初版、廉価版)
AmbivalenZ(for Win95)
ぱすてるチャイム
ぷろすちゅーでんとGood
守り神様
ママトト
アリスの館456
DALK
闘神都市
DrStop!
ランス1
ランス2
ランス3
アリスCD Ver 1.02
メイドのすすめ
ぶろぶろ
学園漂流戦記
Hushaby Baby
Darcrows
PERSIOM
隠れ月
SeeIn青
20世紀アリス
これDPS
かえるにょ国にょアリス
アリスCD Ver 2.02
妖精
OnlyYou リ・クルス
王子さま Lv1.5
* 動かないゲーム
夜が来る!
王子さま Lv1
DALK外伝 (System4)
ままにょにょ (System4)
* 一部動作可能
大悪司 (オープニング不可)
妻みぐい (オープニング不可)
エスカレイヤー (オープニング不可)
Rance5D
妻みぐい2 (オープニング不可)
シェル・クレイル
NightDemon (オープニング不可)
各ゲームについての補足事項は doc/GAMES.TXT を御覧ください。
また、ネット上で公開されているSYSTEM3.5用のゲームのうち、いくつかは
動作が確認されています。くわしくは MISCGAME.TXT を御覧下さい。
2. 開発環境と動作確認環境
2.a. 開発環境
Kondara-1.2 (Linux/i386)
2.b. 動作確認環境
DigitalUnix 4.0F (alpha)
SunOS 5.8 (sparc)
2.c. 多分動くと思われる環境
Linux(!i386)
FreeBSD/NetBSD/OpenBSD (i386 etc)
Irix 6.X
Solaris 2.X 以降 (sparc/i386)
3. xystem35の設定ファイル
xsystem35ではフォントの設定などを、カレントディレクトリとホームディレクトリに
ある .xsys35rcというファイルから読み込みます。カレントディレクトリの .xsys35rc
に書かれた設定のほうが優先されるため、一般的な設定はホームディレクトリの
.xsys35rcに書き、特定のゲームで書き換えたい項目はゲームを置いたディレクトリの
.xsys35rcに書くといいでしょう。
サンプルとなるファイルを xsys35rc.sample として用意しました。
また、gtk widgetのリソースは ~/.gtk/gtkrc または ~/.gtkrc から読み込みます。
読み込み先は .xsys35rc で指定できます。
ゲームで使用するフォントは X のフォントの仕組を使う方法と、TrueTypeFontを
外部ライブラリを使って直接表示する方法の2種類が選べます。
~/.xsys35rc の ttfont_mincho: と ttfont_gothic: の場所にフォントファイルを
指定し、font_device: ttf と指定してください。詳しくはサンプルファイル
(xsys35rc.sample)を見て下さい。
4. ゲームの実行と終了
4.a. ゲームの実行
instgameを使ってゲームデータをインストールすると、インストールした
ディレクトリにの一つ上に ???????.gr というファイル(ゲームリソースファイル)
が自動的に作成されますので
% xsystem35 -gamefile ~/game/???????.gr
のように実行します。-gamefile オプションをつけない場合は、カレントディレク
トリの xsystem35.gr を参照します。
またいずれも見つからない場合は、カレントディレクトリにあるファイルをゲーム
データとして設定します。例えば testSA.ALD というファイルがカレントディレク
トリにあると、それをシナリオデータとして使います。またセーブデータは適当な
名前で 10個確保されます。
ゲームリソースファイルの書き方については、doc/GRFMT.TXT を御覧下さい。
4.b. ゲームの終了
* 起動した端末で Ctrl+C を押すと、すぐに終了します。
* ゲーム中にマウスの真中のボタンを押すと、メニューが出て来ますので、
そこから 'Exit' を選んで終了させて下さい。Window Manager のCloseボタンでも
同じように動作します。
* ESC + SPACE + RET キーを同時に押すと、すぐに終了します。
4.c. xsystem35メニュー
ゲーム中にマウスの真中ボタンを押すとメニューが出て来ます。
メッセージスキップ(MessageSkip):
次の選択肢までメッセージを飛ばします。マウスの右クリックで
止まります。シナリオによっては停止しない場合もあります。
マウスカーソル移動(MouseAutoMove):
選択ウィンドなどでマウスが自動的に移動するのを制御します。
ボリュームバランス(VolumeValance):
SACTシステムで音声の人物毎に音量を変えることができます。
(ゲームがそう出来るように対応している場合のみ)
情報(About):
このゲームについて。
終了(Exit):
ゲームを終了します。
4.d. キーボード操作
アリスソフトのゲームは有史来、基本的に上下左右キーに SPACE, RET, ESC, TAB
キーしか使いません(一部のゲームはそれ以外のキーを使うこともあります)。
XSystem35 では次のキー割当を特別に使っています。
F1: メッセージスキップ
F4: フルスクリーン <-> Window表示の切替え
また、旧き良き時代の DOS への復帰キー (ESC + SPACE + RET) でゲームを確認なし
で終了出来ます。
5. コマンドラインオプション
-h : ヘルプを表示します。
-gamefile file : ゲームリソースファイルを file から読み込みます。
-no-shm : ネットワーク越しに起動する場合に指定します。
-devcd name : CD-ROM device名を name にします。
-devmidi name : MIDI device名を name にします。
-M? : MIDI の出力の種類を選択します。
-Me : External midi player (default)
-Mr : Raw Midi device
-Ms? : Sequencer device (?:device number)
-M0 : disable midi
-devjoy n : n 番目の joystick のデバイスを使用します。
-version : バージョン情報を表示します。
-fullscreen : フルスクリーンでゲームを実行します。
SDL 有効時には Widget にフォーカスが当たらないため Popup
menu 等が使用できません。
-antialias : 常に文字にアンチエリアスをかけます。
-noantialias : 常に文字にアンチエリアスをかけません。シナリオ上でアンチ
エリアスの指定があっても無視します。
-devfont : フォントデバイスを指定します。x11/ft2/sdl のいずれかが
使えます。
-noimagecursor : リソースファイルによるカーソル形状の変更(Darcrows等)を無効
にしたい場合に指定します。
6. その他情報
6.a. SYSV IPC
カーネルに SYSV IPC (SharedMemory/MessageQueue/Semaphore)の機能が
組み込まれている必要があります。
6.b. SharedMemoryの大きさについて
カーネルのSharedMemoryの大きさが十分大きい場合、MIT-SHMを利用して画面を
高速に描画する事が出来ます。起動時にエラーが出る場合、カーネルパラメータを
変更してみて下さい。(BSD 系はデフォルトの SharedMemory の大きさが小さい
ようです)
6.b.1. FreeBSDの場合 /usr/src/sys/i386/conf/LINT 中の
options SHMALL=1025
options "SHMMAX=(SHMMAXPGS*PAGE_SIZE+1)"
options SHMMAXPGS=1025
options SHMMIN=2
options SHMMNI=33
options SHMSEG=9
「SHMMAXPGS」が関連項目です。
24bppで起動する場合は SHMMAXPGS=4096 くらいにするとよいようです。
もちろん設定後はカーネルの再構築が必要です。
6.c. locale と X
libc に locale 機構が組み込まれていない環境の場合、libxpg4 などの
ライブラリ(FreeBSD) や X の locale を使うことになります。
linux の libc5 な環境では configure 時に --with-locale=ja_JP.ujis として
コンパイルしてください。
それ以外のほとんどの環境では考慮する必要はないでしょう。
7. 著作権とライセンス
プログラムの著作権は作者(chikama)に属しますが、ソースコードはGPLに基づいて
再配付できます。
(一部のソースコードは私以外に著作権があります。詳しくは、ソースコードを御覧
下さい)
ゲーム内で使われてるカーソルフォントの一部をqvwm(Windows95そっくりのWindow
Manager)からいただきました。
8. サポート
動作報告・バグ報告などは以下のメールアドレスまでお願いします。
E-Mail: chikama@nabal.aist-nara.ac.jp (private)
masaki-c@is.aist-nara.ac.jp (official)
また最新版は以下のURLからダウンロードできます。
http://www.aist-nara.ac.jp/~masaki-c/private/unitbase/xsys35/index.html
バグレポートの際は、お使いの環境を出来るだけくわしく書いて下さい。
また特定のゲームで動かない場合は、出来るだけセーブデータも添付して下さい。
プログラムやシナリオデータのバグで 'sigsegv caught @xxx,xxxxx' といって
終了する場合は、そのメッセージの部分(xxx,xxxx)も送って下さい。
可能ならば、./configure で --enable-debug を付けてコンパイルしておき、
デバッガ上で実行して segmentation fault で止まった時に、bt と打って出てくる
メッセージを添付していただけるととても助かります。
-307
View File
@@ -1,307 +0,0 @@
xsystem35 における音楽環境について
0. もくじ
1. MIDIについて
a) 外部プレーヤーを使う方法
1) xsystem35 側の準備
2) プレイヤーの準備
3) xsystem35へのリダイレクト
4) 制限事項
b) 外部 MIDI 音源を /dev/midi 経由で制御する方法
1) xsystem35 側の準備
2) 外部 MIDI 音源の準備
c) Synthesizer 音源を /dev/sequencer 経由で制御する方法
1) xsystem35 側の準備
2) Synthesizer 音源の準備
d) オプション一覧
2. 効果音(WAV)について
a) OSS 出力
b) ALSA 出力
c) ESD 出力
3. CDオーディオについて
a) CD-ROM コントロールによる演奏
b) 外部プレイヤ(mp3など)による演奏
4. PCM & MIDI(timidity) & CD-ROM(MP3) を1枚のサウンドカードで同時に使う方法
1. MIDIについて
xsystem35 では MIDI の演奏に外部プレーヤーを使う方法と、サウンドカードの
MIDI port を介して接続した外部 MIDI 機器を /dev/midi 経由で制御する方法、
さらに、synthesizer device を OSS sequencer (/dev/sequencer) 経由で制御する
方法の3種類が選択できます。
a) 外部プレーヤーを使う方法
1) xsystem35 側の準備
xsystem35 の configure 実行時に --enable-midi=extp を付けてコンパイル
しておきます。
2) プレイヤーの準備
TiMidity や playmidi など、お好みのプレーヤーをお使いください。
プレイヤーへはあらかじめパスを通しておき、~/.xsys35rc にプレイヤーと
プレイヤーへの引数を記述します。
(例) TiMidity を esd 経由で出力する場合
midi_player: timidity -A 100 -s 44100 -Oe
2a) xsystem35へのリダイレクト (オプション)
TiMidity を使っている場合、TiMidity の PCM 出力を xsystem35 へとリダ
イレクトして xsystem35 側で管理しているPCM デバイスに流す事が出来ます。
~/.xsys35rc の MIDI プレーヤーの設定の際に先頭に '-' をつけて下さい。
(例)
midi_player: -timidity -A 100 -s 44100 -Or -o-
この場合 timidity の出力は 44.1kHz, Stereo, 16bit 固定です。
3) 制限事項
外部プレイヤーを 使用する場合、MIDIファイルに埋め込まれた system35 用の
制御コマンドを実行することができず、リピート再生、ジャンプ再生などが出来
ません。このため、ゲームの進行に支障が出ることがあります。
b) 外部 MIDI 音源を /dev/midi 経由で制御する方法
1) xsystem35 側の準備
xsystem35 の configure 実行時に --enable-midi=raw を付けてコンパイル
しておきます。
2) 外部 MIDI 音源の準備
外部 MIDI 音源(SC-88など)をサウンドカード の MIDI port を介して接続
します。このポートは /dev/midi デバイスを介して制御できる必要があります。
ALSA OSS Emulation 上で SB-Live の MIDI 端子に接続した SC-88 での動作を
確認しています。
c) Synthesizer 音源を /dev/sequencer 経由で制御する方法
1) xsystem35 側の準備
xsystem35 の configure 実行時に --enable-midi=seq を付けてコンパイル
しておきます。
2) Synthesizer 音源の準備
外部 MIDI 機器を接続するか、サウンドカード上に soundfont を load するか
TiMidity を ALSA sequencer server として常駐させておいてください。
TiMidity を ALSA sequencer server にするには、コンパイル時にその機能を
有効にしておき、timidity -iA で常駐させます。
d) オプション一覧
MIDI 出力に関する、 .xsys35rc の設定項目(A)とコマンドラインオプション(B)
をまとめます。
1) MIDI プレイヤーの設定
(A) ----> midi_player:
(B) ----> -midiplayer
2) MIDI デバイスファイルの設定 (default: /dev/midi or /dev/sequencer)
(A) ----> midi_device:
(B) ----> -devmidi
3) MIDI 出力方法の選択 (default: e)
(A) ----> midi_output_device: ?
(B) ----> -M?
? .... e : 外部プレーヤ
r : midi device 経由
sX: sequencer device 経由 (X番目のポート)
0 : (ゼロ) 無効化
コンパイル時に --enable-midi=extp,raw,seq とすることで、複数の方式を有効
にし、実行時にいずれかを選択できます。その他のコンパイルオプションは
INSTALL ドキュメントを御覧ください。
sequencer device の X 番目のポートは通常、0 ですが、複数のポートがある
場合はそのポート番号を指定してください。ALSA の OSS emu では、
$ cat /proc/asound/seq/oss
と実行して出て来る
midi ?: [xxxx] ALSA port aa:bb
の ? の番号を指定します。
コマンドラインから外部MIDIプレイヤーを指定する場合は
-midiplayer "timidity -A 100 -s 44100 -Oe" のようにします。
2. 効果音(WAV)について
xsystem35ではオーディオインターフェイスとして、Linux/*BSD などで良く使われて
いる OSS およびその互換インターフェイスに加えて、ALSA(Advanced Linux Sound
Architecture) と ESD(Enligtened Sound Daemon)に対応しています。
a) OSS 出力
1) コンパイル
configure 時に --enable-audio=oss オプションを付けてコンパイルします。
2) 実行時オプション
コマンドライン: -Oo
.xsys35rc : audio_output_device: o
3) dsp デバイス (default: /dev/dsp)
コマンドライン: -devdsp
.xsys35rc : dsp_device:
4) mixer デバイス (default: /dev/mixer)
コマンドライン: -devmix
.xsys35rc : mixer_device:
b) ALSA 出力
1) コンパイル
configure 時に --enable-audio=alsa オプションを付けてコンパイルします。
2) 実行時オプション
コマンドライン: -Os
.xsys35rc : audio_output_device: s
3) dsp デバイス (default: 0:0)
コマンドライン: -devdsp
.xsys35rc : dsp_device:
c) ESD 出力
1) コンパイル
configure 時に --enable-audio=esd オプションを付けてコンパイルします。
2) 実行時オプション
コマンドライン: -Oe
.xsys35rc : audio_output_device: e
OSS/ALSA/ESD をすべて有効にしてコンパイルし、実行時にどの出力を使用するか
選択できます。configure 時に --enable-audio=oss,alsa,esd としてコンパイル
してください。
3. CDオーディオについて
CD-ROM の制御には Linux/FreeBSD/Irix のインターフェイスに対応しています。
また、CD-ROM デバイスを直接制御する他に、外部プレイヤを使って mp3 file など
を鳴らすことも出来ます。
a) CD-ROM コントロールによる演奏
環境によって自動的に適切なドライブが選択されコンパイルされます。
b) 外部プレイヤ(mp3など)による演奏
あらかじめ CD を MP3/WAV 化して起きます。また mpg123 などのプレイヤ
を用意し、パスを通しておきます。
1) コンパイル
configure 時に --enable-cdrom=mp3 オプションを追加します。CD-ROM
コントロールを実行時に使い分けたい時は --enable-cdrom=linux,mp3 などと
します。
3) プレイヤー名とファイルリストを書いた次のようなファイルを用意します。
% cat /game/kichiku.playlist
mpg123-esd -quite
/game/kichiku/mp3/trk02.mp3
/game/kichiku/mp3/trk03.mp3
/game/kichiku/mp3/trk04.mp3
/game/kichiku/mp3/trk05.mp3
/game/kichiku/mp3/trk06.mp3
というようなファイルを用意します。
1行目はプレーヤーとそのオプション
2行目以降はトラック2から順にファイルをならべます。(フルパスで指定します)
*) 適切に外部プレイヤーと演奏ファイルを用意すれば、データ形式は問いません。
3a) xsystem35 へのリダイレクト(オプション)
mpg123 などのプレイヤーのPCM 出力を xsystem35 へとリダイレクトして
xsystem35 側で管理しているPCM デバイスに流す事が出来ます。
上の kichiku.playlist ファイルのプレイヤの設定で先頭に '-' をつけて
ください。
(例)
-mpg123 -q -s
この場合 mpg123 の出力は 44.1kHz, Stereo, 16bit 固定です。
4) 実行時オプションに -devcd /game/kichiku.playlist と上で作成したファイル
を指定します。
CD-ROM に関する .xsys35rc の設定項目(A) と コマンドラインオプション(B) を
まとめます。
1) CD 出力方法の選択
(A) ----> cdrom_device: ???
(B) ----> -devcd ????
MP3 出力 => ???? にプレイリストを指定
CD-ROM => ???? にデバイスファイルを指定
2) CD-ROM デバイスファイルの設定 (defult /dev/cdrom)
(A) ----> cdrom_device: ???
(B) ----> -devcd: ????
4. PCM & MIDI(timidity) & CD-ROM(MP3) を1枚のサウンドカードで同時に使う方法
(special thanks to Fumihiko Murata)
サウンドカードを選ばない方法としては esd を使うことです。esd は対応した複数
のプログラムの音の出力を合成してサウンドカードに出力するプログラムです。
xsystem35/timidity/mp3 player を esd 対応にコンパイルすることで合成が可能
です。
また、Trident 4DWave DX/NX、SoundBlaster Live/ YAMAHA YMF724以降 などのサウ
ンドカードは PCM チャンネルを複数持っていて、対応のサウンドドライバーがあれば
PCMとMIDI(SoftwareMIDI)とMP3 を同時に鳴らすことが出来ます。たとえば
SoundBlaster Live + ALSA では
$ cat /proc/asound/pcm
00-00: emu10k1 : EMU10K1 : playback 32 : capture 1
00-01: emu10k1 mic : EMU10K1 MIC : capture 1
00-02: emu10k1 efx : EMU10K1 EFX : capture 1
のように PCM を 32 チャンネル持っていることが分かります。これは OSS でいうと
ころの /dev/dspN に最大 32 の PCM がぶら下がっているように見え、同時に 32 回
/dev/dspN を開くことが出来ます。
また Trident 4DWave DX/NX + ALSA では全部で64chあり、最大で32chを PCM playback
に割り当てる事ができます。最大チャンネルはモジュールロード時に 設定され、設定
数を使いきるまで同時に /dev/dspN を開く事ができます。
残りの 32ch は MIDI 用に設けられていて、PCM と MIDI の2つのバンクに分ける事
ができます。個々のチャンネルには PCM front volume がありますが、2つのバンク
をそれぞれ統括する Wave/Music Volume があり さらにそれらを合わせる PCM volume
があります。(最後に Master Volume)
図にすると次のようになります。
PCM Volume + - Wave Volume + - front volume- PCM Playback 0
| + - .. - PCM Playback 1
| :
| + - .. - PCM Playback 31
|
+ - Music Volume + - .. - PCM Playback 32
:
+ - .. - PCM Playback 63
ES1370/1371 でも PCM 用 と MIDI 用に 2 チャンネルの PCM 出力があります。
ALSA では
$ cat /proc/asound/pcm
00-00: ES1371/1 : ES1371 DAC2/ADC : playback 1 : capture 1
00-01: ES1371/2 : ES1371 DAC1 : playback 1
のように 0:0 と 0:1 のデバイスが再生用として使う事が出来ます。timidity 用に
0:1 のデバイスを使うと良いでしょう。OSS では /dev/dsp0 と /dev/dsp1 に割り当
てられ、 /dev/dsp1 を timidity で使います。
またその他のカードでも多チャンネル出力を持っているものもありますので、
ドライバーのドキュメントを御覧下さい。
(2003.1.23 追記)
追記を書いている時点で手に入りやすい多チャンネルPCM出力をもつ音源カード
としては SoundBlaster Live と YMF7xx くらいでしょうか。
-57
View File
@@ -1,57 +0,0 @@
TODO (順番は特に無し)
* メンテナンス
-- obsolete
* TODOを増やさない
* SYSTEM3の3.5への移植ものや、ネット上にあるSYSTEM3.5のデータへの対応
* system 3.9への対応
* Xのイベントハンドリングの改良
* oringinal の savedata(v1/v2/v3?) を convert する tool
* savedata を lt/bg でどっちでも読めるようにする
* XIM 対応?
* 関数/変数名の統一
* 技術情報のドキュメント化
* GUI付 installer (っていうか、CD-ROMの中の setup.infを直接使う)
* 異常終了時に出来るだけプロセスが残らないようにする
* global変数を減らす
* 意図的な異常シナリオデータでもsegv.らないよう努力する
* Tab/Spaceの混在などソースの見直し(随時)
* CEの残りのコマンドをさっさと実装する
* SDL を理解して cleanup
* キー入力まわりの cleanup
* UNIX+X 以外の環境へ移植しやすくする
* 王子様1/16
+ スケジュールを組む時に「もどる」「クリア」「OK!」の選択がうまくで
きない。
* ランス4
+ プチハニーの爆風に巻き込まれると、キャラの上に「防」マークがつきっぱ
なしになる。
+ 戦闘シーンでたまに左上にモンスターのかけらが表示されることがある。
DONE
* configure 化
* gtk_setup.c rewrite
* keyboard操作対応
* cd/mp3の切替えをオプションで切替えられるようにする
* packed 24bpp対応 (rewrite xcore.c)
* music server cleanup
* dri mmap化
* 汎用 data cache 処理を作る。TTF フォントと展開済み CG で使おうか。
* alphabelnd asm化
* imgae.c をもうちょっとすっきりと。(depthで関数のテーブル化
* ecopy のタイミングの最適化
* wav が鳴らない事がしばしばある(open err)のを調査&修正
* *.h の依存関係 cleanup, 特に xsystem35.h
* xcore/imageの統合とcleanup
* MIDIの自前のハンドリング(/dev/sequener ?)
* FullScreen対応(with DGA)
* 古いドキュメントをなんとかする。(FAQ/BUGS etc)
* 大悪司
+ SDLの時、MAP選択が正常に動かない。
+149
View File
@@ -0,0 +1,149 @@
= xsystem35(6)
:doctype: manpage
:manmanual: xsystem35 manual
:mansource: xsystem35 {xsystem35-version}
== Name
xsystem35 - play System 3.x games
== SYNOPSIS
*xsystem35* [_OPTION_]...
== DESCRIPTION
This man page describes *xsystem35-sdl2*, a multi-platform port of the
AliceSoft's System3.5/3.6/3.8/3.9 game engine derived from the original
*xsystem35*.
`xsystem35` reads the game resource file from the path specified by the
`-gamefile` option, or from `xsystem35.gr` in the current directory if the
option is not specified. If the game resource file is not found, `xsystem35`
finds System 3.x game files (*.ALD) from the current directory.
== OPTIONS
*-gamefile* _file_::
Load game resouce file from _file_. See <<FILES>> section for details.
*-game* _game_::
Enables game-specific hacks. Usually auto-detected, but must be specified for
games with modified / translated titles. Possible values are: `toushin2`,
`rance3_eng`, `rance4_eng`, `rance4_v2`, `persiom`, `agake`.
*-savedir* _dir_::
Directory to save game state files. If _dir_ begins with '~', it is expanded
to the user's home directory (`$HOME`).
*-saveformat* _fmt_::
The format when writing save files. Possible values are: `xsystem35`,
`system36`, `system39` (default).
*-texthook* _mode_::
Set the text hook mode. Possible values are: `none` (default), `print` (print
text to console), `copy` (copy text to clipboard).
*-texthook_suppress* _list_::
Suppress text hook on specified scenario pages. _list_ is a comma-separated
list of page numbers. Used to suppress system messages, etc.
*-renderer* _name_::
Use the SDL rendering driver named _name_.
*-playlist* _file_::
Load the CD playlist from _file_. The playlist is a text file with one
filename per line, in the order of CD tracks. See <<FILES>> section for details.
*-Me*::
Use SDL_mixer for MIDI playback.
**-Mp**_device_number_::
Use ALSA (via PortMidi) for MIDI playback.
*-M0*::
Disable MIDI playback.
*-devjoy* _device_index_::
Use the joystick device with the given index.
*-ttfont_mincho* _file_::
Use the given TrueType or OpenType font file for mincho (serif) text.
*-ttfont_gothic* _file_::
Use the given TrueType or OpenType font file for gothic (sans-serif) text.
*-debuglv* _level_::
Set the debug level to _level_. The higher the level, the more verbose
the debug output.
*-debug*::
Start with the debugger enabled.
*-noantialias*::
Disable text antialiasing.
*-fullscreen*::
Start in fullscreen mode.
*-integerscale*::
Use integer scaling for the window.
*-noimagecursor*::
Disable custom mouse cursor images.
*-version*::
Print the version number and exit.
*-h, --help*::
Print a help message and exit.
== FILES
*.xsys35rc*::
`xsystem35` reads its configuration from `${HOME}/.xsys35rc` and `.xsys35rc`
in the game directory. The latter takes precedence over the former, so you
can put general settings in `${HOME}/.xsys35rc` and game-specific settings in
`.xsys35rc` in the game directory. Options specified on the command line
override both. See xsys35rc.sample for the format of the configuration file.
*playlist.txt*::
`xsystem35` does not support playing BGM directly from a CD. Instead, it
supports playing BGM from audio files on your filesystem. `xsystem35` reads
the playlist from a file specified by the `-playlist` option, or from
`playlist.txt` in the game directory. The first line is the path to the audio
file for track 1, the second line is the path to the audio file for track 2,
and so on. The first line is usually empty, because track 1 is not an audio
track but a data track.
*xsystem35.gr*::
Game resource file which lists the locations of various files needed to run
a game. This is optional; `xsystem35` can automatically find the files it
needs when run inside a game directory. See
xref:xsystem35.gr.adoc[*xsystem35.gr(5)*] for the format of the game resource
file.
== KEYBOARD SHORTCUTS
System 3.x games basically only use the UP, DOWN, LEFT, RIGHT, SPACE, RET, ESC,
and TAB keys (some games use other keys). `xsystem35` uses the following
special key assignments:
*F1*::
Toggle message skip mode.
*F4*::
Toggle fullscreen mode.
Also, in some platforms, the middle mouse button opens the menu.
== HISTORY
*xsystem35* was originally developed by Masaki Chikama (Wren)
<masaki-c@is.aist-nara.ac.jp> between 1998 and 2006. The project was later
forked by Kichikuou <KichikuouChrome@gmail.com> as *xsystem35-sdl2* and ported
to SDL2.
== SEE ALSO
xsystem35-sdl2 project page: https://github.com/kichikuou/xsystem35-sdl2
+103
View File
@@ -0,0 +1,103 @@
= xsystem35.gr(5)
:doctype: manpage
:manmanual: xsystem35 manual
:mansource: xsystem35 {xsystem35-version}
== Name
xsystem35.gr - game resource file for xsystem35
== DESCRIPTION
Game resource file is a plain text file that defines the locations of the
various game data files for xsystem35. This file is only needed if you want to
place game data files in a location other than the current directory.
The path to the game resource file is specified with the `-gamefile` option of
xref:xsystem35.adoc[*xsystem35(6)*]. If it is not specified, xsystem35 reads
`xsystem35.gr` in the current directory.
Each line of the file specifies a single data file and follows the format:
_keyword_ _path-to-data_
If multiple files of the same type exist, suffixes `A`, `B`, `C`... are
appended to the _keyword_.
Comments can be added by starting the line with `#`. Blank lines are ignored.
== KEYWORDS
*Scenario*::
Scenario files (`*S?.ALD`).
*Graphics*::
Graphic files (`*G?.ALD`).
*Wave*::
PCM data files (`*W?.ALD`).
*Midi*::
MIDI data files (`*M?.ALD`).
*Data*::
Miscellaneous data files (`*D?.ALD`).
*Resource*::
Resource files (`*R?.ALD`).
*BGM*::
BGM files (`*B?.ALD`).
*Save*::
Save files (`*S?.ASD`). If the path begins with '`~`', it is expanded to the
user's home directory (`$HOME`).
*Ain*::
The `System39.ain` file.
*WAI*::
Additional information for PCM data (`*WA.WAI`)
*BGI*::
Additional information for BGM data (`*BA.BGI`)
*SACT01*::
Data for SACT.DLL (`SACTEFAM.KLD`)
*ALK01* - *ALK09*::
Archive files for demo data (`*1.ALK` - `*9.ALK`)
*Init*::
The `System39.ini` file.
== NOTES
Data files not categorized under the above keywords (e.g., map files for
Kaeru nyo Panyon) should not be listed in the game resource file, and should be
placed in the same directory as the save files.
== EXAMPLES
The following is a game resource file for the English translation of Kichikuou
Rance.
ScenarioA KICHIKUSA.ALD
GraphicsA KICHIKUGA.ALD
GraphicsB KICHIKUGB.ALD
WaveA KICHIKUWA.ALD
Ain System39.ain
SaveA ~/.xsys35/saves/kichikuou/KICHIKUSA.ASD
SaveB ~/.xsys35/saves/kichikuou/KICHIKUSB.ASD
SaveC ~/.xsys35/saves/kichikuou/KICHIKUSC.ASD
SaveD ~/.xsys35/saves/kichikuou/KICHIKUSD.ASD
SaveE ~/.xsys35/saves/kichikuou/KICHIKUSE.ASD
SaveF ~/.xsys35/saves/kichikuou/KICHIKUSF.ASD
SaveG ~/.xsys35/saves/kichikuou/KICHIKUSG.ASD
SaveH ~/.xsys35/saves/kichikuou/KICHIKUSH.ASD
SaveI ~/.xsys35/saves/kichikuou/KICHIKUSI.ASD
SaveJ ~/.xsys35/saves/kichikuou/KICHIKUSJ.ASD
== SEE ALSO
xref:xsystem35.adoc[*xsystem35(6)*]
+10 -10
View File
@@ -4,12 +4,12 @@ Game Compatibility
| Game | Status | Notes |
| ------------------------------------------- | ----------- | ----- |
| 鬼畜王ランス | Supported | |
| Kichikuou Rance (EN) | Supported | |
| RanceIV -教団の遺産- | Supported | Win95 edition, [Ver2.05](https://hannylaboratory.blogspot.com/2023/01/blog-post_26.html) |
| Rance4 -Legacy of the Sect- (EN) | Supported | |
| 兰斯IV -教团的遗产- (CN) | Supported | |
| ランス4.1 | Supported | [Ver1.05](https://hannylaboratory.blogspot.com/2023/02/blog-post_9.html) |
| ランス4.2 | Supported | [Ver1.05](https://hannylaboratory.blogspot.com/2023/02/blog-post_9.html) |
| Kichikuou Rance (EN) | Supported | Fan translation |
| RanceIV -教団の遺産- | Supported | Win95 edition and [Ver2.05](https://hannylaboratory.blogspot.com/2023/01/blog-post_26.html) |
| Rance4 -Legacy of the Sect- (EN) | Supported | Fan translation |
| 兰斯IV -教团的遗产- (CN) | Supported | Fan translation |
| ランス4.1 | Supported | [Ver1.05](https://hannylaboratory.blogspot.com/2023/02/blog-post_9.html). Use system3-sdl2 for older versions |
| ランス4.2 | Supported | [Ver1.05](https://hannylaboratory.blogspot.com/2023/02/blog-post_9.html). Use system3-sdl2 for older versions |
| いけないかつみ先生 | Supported | Emojis are not supported |
| 闘神都市II | Supported | Win95 edition |
| かえるにょ・ぱにょ~ん | Supported | Normal / Low-priced edition |
@@ -52,10 +52,10 @@ Game Compatibility
| 妻みぐい | Supported | Opening demo is not supported |
| 超昂天使エスカレイヤー | Supported | Opening demo is not supported |
| ランス5D | Supported | |
| Rance 5D - The Lonely Girl (MangaGamer) | Supported | |
| 俺の下であがけ | Unknown | |
| 楽園行 | Unknown | |
| 妻みぐい2 | Supported | Opening demo is not supported |
| Rance 5D - The Lonely Girl (EN) | Supported | MangaGamer version |
| 俺の下であがけ | Supported | |
| 楽園行 | Supported | |
| 妻みぐい2 | Supported | |
| シェル・クレイル | Supported | |
| ナイトデーモン | Supported | |
| 学園KING | Supported | From アリスCD |
+3 -3
View File
@@ -16,21 +16,21 @@ static void Init() {
*var = 1;
DEBUG_COMMAND_YET("AliceLogo.Init %d,%d,%d,%p:", p1, p2, p3, var);
TRACE_UNIMPLEMENTED("AliceLogo.Init %d,%d,%d,%p:", p1, p2, p3, var);
}
static void SetWaveNum() {
int p1 = getCaliValue();
int p2 = getCaliValue();
DEBUG_COMMAND_YET("AliceLogo.SetWaveNum %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("AliceLogo.SetWaveNum %d,%d:", p1, p2);
}
static void Run() {
int p1 = getCaliValue();
int p2 = getCaliValue();
DEBUG_COMMAND_YET("AliceLogo.Run %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("AliceLogo.Run %d,%d:", p1, p2);
}
static const ModuleFunc functions[] = {
+1
View File
@@ -23,6 +23,7 @@ add_library(modules STATIC
NIGHTDLL/nt_sound.c
NightDemonDemo/NightDemonDemo.c
RandMT/RandMT.c
S3xMusic/S3xMusic.c
SACT/SACT.c
SACT/sactcg.c
SACT/sactsound.c
+4 -4
View File
@@ -10,7 +10,7 @@
static void Init() {
int p1 = getCaliValue();
DEBUG_COMMAND_YET("Confirm.Init %d:", p1);
TRACE_UNIMPLEMENTED("Confirm.Init %d:", p1);
}
static void ExistKeyFile() {
@@ -20,7 +20,7 @@ static void ExistKeyFile() {
*var = 1;
DEBUG_COMMAND_YET("Confirm.ExistKeyFile %s,%p,%p:",p1, p2, var);
TRACE_UNIMPLEMENTED("Confirm.ExistKeyFile %s,%p,%p:",p1, p2, var);
}
static void CheckProtectFile() {
@@ -30,7 +30,7 @@ static void CheckProtectFile() {
*var = 1;
DEBUG_COMMAND_YET("Confirm.CheckProtectFile %s,%p,%p:", p1,p2,var);
TRACE_UNIMPLEMENTED("Confirm.CheckProtectFile %s,%p,%p:", p1,p2,var);
}
static void CreateKeyFile() {
@@ -40,7 +40,7 @@ static void CreateKeyFile() {
*var = 1;
DEBUG_COMMAND_YET("Confirm.CreateKeyFile %s,%p,%p:", p1,p2,var);
TRACE_UNIMPLEMENTED("Confirm.CreateKeyFile %s,%p,%p:", p1,p2,var);
}
static const ModuleFunc functions[] = {
+100 -111
View File
@@ -136,7 +136,7 @@ static void Init() {
// surface0 を pre_freesurfno として返さないように。
pre_freesurfno = 1;
DEBUG_COMMAND("Gpx.Init %d:", p1);
TRACE("Gpx.Init %d:", p1);
}
static void Gpx_reset(void) {
@@ -171,7 +171,7 @@ static void Create() {
suf[no] = s;
}
DEBUG_COMMAND("Gpx.Create %p,%d,%d,%d:", var, width, height, bpp);
TRACE("Gpx.Create %p,%d,%d,%d:", var, width, height, bpp);
}
static void CreatePixelOnly() {
@@ -199,7 +199,7 @@ static void CreatePixelOnly() {
suf[no] = s;
}
DEBUG_COMMAND("Gpx.CreatePixelOnly %d,%d,%d,%d:", *var, width, height, bpp);
TRACE("Gpx.CreatePixelOnly %d,%d,%d,%d:", *var, width, height, bpp);
}
static void CreateAMapOnly() {
@@ -225,30 +225,22 @@ static void CreateAMapOnly() {
suf[no] = s;
}
DEBUG_COMMAND("Gpx.CreateAMapOnly %p,%d,%d:", var, width, height);
TRACE("Gpx.CreateAMapOnly %p,%d,%d:", var, width, height);
}
static void IsSurface() {
/*
Gpx.IsSurface(): 指定の番号の surface が surface かどうか
(pixel と alpha の両方のデータを持つ)を調べる
Gpx.IsSurface(): 指定の番号が surface かどうかを調べる
p1 : surface 番号
var : 結果を返す変数。surface ならば 1, !surface ならば 0
*/
int p1 = getCaliValue();
int *var = getCaliVariable();
surface_t *s;
s = sf_get(p1);
if (s == NULL) {
*var = 0;
} else {
*var = (s->alpha && s->pixel) ? 1 : 0;
}
DEBUG_COMMAND("Gpx.IsSurface %d,%p:", p1, var);
*var = sf_get(p1) ? 1 : 0;
TRACE("Gpx.IsSurface %d,%p:", p1, var);
}
static void IsPixel() {
@@ -270,7 +262,7 @@ static void IsPixel() {
*var = s->pixel ? 1 : 0;
}
DEBUG_COMMAND("Gpx.IsPixel %d,%p:", p1, var);
TRACE("Gpx.IsPixel %d,%p:", p1, var);
}
static void IsAlpha() {
@@ -292,7 +284,7 @@ static void IsAlpha() {
*var = s->alpha ? 1 : 0;
}
DEBUG_COMMAND("Gpx.IsAlpha %d,%p:", p1, var);
TRACE("Gpx.IsAlpha %d,%p:", p1, var);
}
static void GetWidth() {
@@ -314,7 +306,7 @@ static void GetWidth() {
*var = s->width;
}
DEBUG_COMMAND("Gpx.GetWidth %d,%d:", p1, *var);
TRACE("Gpx.GetWidth %d,%d:", p1, *var);
}
static void GetHeight() {
@@ -336,13 +328,13 @@ static void GetHeight() {
*var = s->height;
}
DEBUG_COMMAND("Gpx.GetHeight %d,%d:", p1, *var);
TRACE("Gpx.GetHeight %d,%d:", p1, *var);
}
static void GetCreatedSurface() { /* not used ? */
int *var = getCaliVariable();
DEBUG_COMMAND_YET("Gpx.GetCreatedSurface %p:", var);
TRACE_UNIMPLEMENTED("Gpx.GetCreatedSurface %p:", var);
}
static void LoadCG() {
@@ -357,21 +349,21 @@ static void LoadCG() {
*var = load_cg_main(p1 -1);
DEBUG_COMMAND("Gpx.LoadCG %p,%d (%d):", var, p1, *var);
TRACE("Gpx.LoadCG %p,%d (%d):", var, p1, *var);
}
static void GetCGPosX() { /* not useed ? */
int *var = getCaliVariable();
int p1 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.GetCgPosX %p,%d:", var, p1);
TRACE_UNIMPLEMENTED("Gpx.GetCgPosX %p,%d:", var, p1);
}
static void GetCGPosY() { /* not useed ? */
int *var = getCaliVariable();
int p1 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.GetCgPosY %p,%d:", var, p1);
TRACE_UNIMPLEMENTED("Gpx.GetCgPosY %p,%d:", var, p1);
}
static void Free() {
@@ -382,7 +374,7 @@ static void Free() {
*/
int p1 = getCaliValue();
DEBUG_COMMAND("Gpx.Free %d:", p1);
TRACE("Gpx.Free %d:", p1);
if (p1 != 0) {
sf_free_one(p1);
@@ -395,7 +387,7 @@ static void FreeAll() {
*/
sf_free_all();
DEBUG_COMMAND("Gpx.FreeAll:");
TRACE("Gpx.FreeAll:");
}
static void Copy() {
@@ -421,25 +413,29 @@ static void Copy() {
int sh = getCaliValue();
surface_t *src, *dst;
DEBUG_COMMAND("Gpx.Copy %d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss, sx, sy, sw, sh);
TRACE("Gpx.Copy %d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss, sx, sy, sw, sh);
src = sf_get(ss);
dst = sf_get(ds);
gr_copy(dst, dx, dy, src, sx, sy, sw, sh);
}
static void CopyBright() { /* not used ? */
int p1 = getCaliValue();
int p2 = getCaliValue();
int p3 = getCaliValue();
int p4 = getCaliValue();
int p5 = getCaliValue();
int p6 = getCaliValue();
int p7 = getCaliValue();
int p8 = getCaliValue();
int p9 = getCaliValue();
static void CopyBright(void) {
int ds = getCaliValue();
int dx = getCaliValue();
int dy = getCaliValue();
int ss = getCaliValue();
int sx = getCaliValue();
int sy = getCaliValue();
int w = getCaliValue();
int h = getCaliValue();
int lv = getCaliValue();
DEBUG_COMMAND_YET("Gpx.CopyBright %d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9);
surface_t *dst = sf_get(ds);
surface_t *src = sf_get(ss);
gr_copy_bright(dst, dx, dy, src, sx, sy, w, h, lv);
TRACE("Gpx.CopyBright %d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss, sx, sy, w, h, lv);
}
static void CopyAMap() {
@@ -465,25 +461,29 @@ static void CopyAMap() {
int sh = getCaliValue();
surface_t *src, *dst;
DEBUG_COMMAND("Gpx.CopyAMap %d,%d,%d,%d,%d,%d,%d,%d:", da, dx, dy, sa, sx, sy, sw, sh);
TRACE("Gpx.CopyAMap %d,%d,%d,%d,%d,%d,%d,%d:", da, dx, dy, sa, sx, sy, sw, sh);
src = sf_get(sa);
dst = sf_get(da);
gr_copy_alpha_map(dst, dx, dy, src, sx, sy, sw, sh);
}
static void Blend() { /* not used ? */
int p1 = getCaliValue();
int p2 = getCaliValue();
int p3 = getCaliValue();
int p4 = getCaliValue();
int p5 = getCaliValue();
int p6 = getCaliValue();
int p7 = getCaliValue();
int p8 = getCaliValue();
int p9 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.Blend %d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9);
static void Blend(void) {
int ds = getCaliValue();
int dx = getCaliValue();
int dy = getCaliValue();
int ss = getCaliValue();
int sx = getCaliValue();
int sy = getCaliValue();
int w = getCaliValue();
int h = getCaliValue();
int lv = getCaliValue();
surface_t *dst = sf_get(ds);
surface_t *src = sf_get(ss);
gr_blend(dst, dx, dy, src, sx, sy, w, h, lv);
TRACE("Gpx.Blend %d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss, sx, sy, w, h, lv);
}
static void BlendSrcBright() { /* not used ? */
@@ -498,7 +498,7 @@ static void BlendSrcBright() { /* not used ? */
int p9 = getCaliValue();
int p10 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendSrcBright %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
TRACE_UNIMPLEMENTED("Gpx.BlendSrcBright %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
}
static void BlendAddSatur() { /* not used ? */
@@ -511,7 +511,7 @@ static void BlendAddSatur() { /* not used ? */
int p7 = getCaliValue();
int p8 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendAddStatur %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
TRACE_UNIMPLEMENTED("Gpx.BlendAddStatur %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
}
static void BlendAMap() {
@@ -537,7 +537,7 @@ static void BlendAMap() {
int sh = getCaliValue();
surface_t *src, *dst;
DEBUG_COMMAND("Gpx.BlendAMap %d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss, sx, sy, sw, sh);
TRACE("Gpx.BlendAMap %d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss, sx, sy, sw, sh);
src = sf_get(ss);
dst = sf_get(ds);
@@ -554,7 +554,7 @@ static void BlendAMapSrcOnly() { /* not used ? */
int p7 = getCaliValue();
int p8 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendAMapSrcOnly %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
TRACE_UNIMPLEMENTED("Gpx.BlendAMapSrcOnly %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
}
static void BlendAMapColor() { /* not used ? */
@@ -570,7 +570,7 @@ static void BlendAMapColor() { /* not used ? */
int p10 = getCaliValue();
int p11 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendAMapColor %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
TRACE_UNIMPLEMENTED("Gpx.BlendAMapColor %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
}
static void BlendAMapColorAlpha() { /* not used ? */
@@ -587,7 +587,7 @@ static void BlendAMapColorAlpha() { /* not used ? */
int p11 = getCaliValue();
int p12 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendAMapColorAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
TRACE_UNIMPLEMENTED("Gpx.BlendAMapColorAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
}
static void BlendAMapAlpha() { /* not used ? */
@@ -601,7 +601,7 @@ static void BlendAMapAlpha() { /* not used ? */
int p8 = getCaliValue();
int p9 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendAMapAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9);
TRACE_UNIMPLEMENTED("Gpx.BlendAMapAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9);
}
static void BlendAMapBright() { /* not used ? */
@@ -615,7 +615,7 @@ static void BlendAMapBright() { /* not used ? */
int p8 = getCaliValue();
int p9 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendAMapBright %d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9);
TRACE_UNIMPLEMENTED("Gpx.BlendAMapBright %d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9);
}
static void BlendAMapAlphaSrcBright() { /* not used ? */
@@ -630,7 +630,7 @@ static void BlendAMapAlphaSrcBright() { /* not used ? */
int p9 = getCaliValue();
int p10 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendAMapBright %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
TRACE_UNIMPLEMENTED("Gpx.BlendAMapBright %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
}
static void BlendUseAMapColor() { /* not used ? */
@@ -647,7 +647,7 @@ static void BlendUseAMapColor() { /* not used ? */
int p11 = getCaliValue();
int p12 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendUseAMapColor %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
TRACE_UNIMPLEMENTED("Gpx.BlendUseAMapColor %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
}
static void BlendScreen() { /* not used ? */
@@ -660,7 +660,7 @@ static void BlendScreen() { /* not used ? */
int p7 = getCaliValue();
int p8 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendScreen %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
TRACE_UNIMPLEMENTED("Gpx.BlendScreen %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
}
static void BlendMultiply() { /* not used ? */
@@ -673,7 +673,7 @@ static void BlendMultiply() { /* not used ? */
int p7 = getCaliValue();
int p8 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendMultiply %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
TRACE_UNIMPLEMENTED("Gpx.BlendMultiply %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
}
static void BlendScreenAlpha() { /* not used ? */
@@ -687,7 +687,7 @@ static void BlendScreenAlpha() { /* not used ? */
int p8 = getCaliValue();
int p9 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.BlendScreenAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9);
TRACE_UNIMPLEMENTED("Gpx.BlendScreenAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9);
}
static void Fill() {
@@ -713,7 +713,7 @@ static void Fill() {
int b = getCaliValue();
surface_t *dst;
DEBUG_COMMAND("Gpx.Fill %d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, r, g, b);
TRACE("Gpx.Fill %d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, r, g, b);
dst = sf_get(ds);
gr_fill(dst, dx, dy, dw, dh, r, g, b);
@@ -731,21 +731,24 @@ static void FillAlphaColor() { /* not used ? */
int lv = getCaliValue();
surface_t *dst;
DEBUG_COMMAND_YET("Gpx.FillAlphaColor %d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, r, g, b, lv);
TRACE("Gpx.FillAlphaColor %d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, r, g, b, lv);
dst = sf_get(ds);
gr_fill_alpha_color(dst, dx, dy, dw, dh, r, g, b, lv);
}
static void FillAMap() { /* not used ? */
int p1 = getCaliValue();
int p2 = getCaliValue();
int p3 = getCaliValue();
int p4 = getCaliValue();
int p5 = getCaliValue();
int p6 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.FillAMap %d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6);
static void FillAMap(void) {
int ds = getCaliValue();
int x = getCaliValue();
int y = getCaliValue();
int w = getCaliValue();
int h = getCaliValue();
int lv = getCaliValue();
surface_t *dst = sf_get(ds);
gr_fill_alpha_map(dst, x, y, w, h, lv);
TRACE("Gpx.FillAMap %d,%d,%d,%d,%d,%d:", ds, x, y, w, h, lv);
}
static void FillAMapOverBorder() {
@@ -770,7 +773,7 @@ static void FillAMapOverBorder() {
int d = getCaliValue();
surface_t *dst;
DEBUG_COMMAND("Gpx.FillAMapOverBorder %d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, s, d);
TRACE("Gpx.FillAMapOverBorder %d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, s, d);
dst = sf_get(ds);
gr_fill_alpha_overborder(dst, dx, dy, dw, dh, s, d);
@@ -785,7 +788,7 @@ static void FillAMapUnderBorder() { /* not used ? */
int p6 = getCaliValue();
int p7 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.FillAMapUnderBorder %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7);
TRACE_UNIMPLEMENTED("Gpx.FillAMapUnderBorder %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7);
}
static void SaturDP_DPxSA() { /* not used ? */
@@ -798,7 +801,7 @@ static void SaturDP_DPxSA() { /* not used ? */
int p7 = getCaliValue();
int p8 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.SaturDP_DPxSA %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
TRACE_UNIMPLEMENTED("Gpx.SaturDP_DPxSA %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
}
static void ScreenDA_DAxSA() { /* not used ? */
@@ -811,7 +814,7 @@ static void ScreenDA_DAxSA() { /* not used ? */
int p7 = getCaliValue();
int p8 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.ScreenDA_DAxSA %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
TRACE_UNIMPLEMENTED("Gpx.ScreenDA_DAxSA %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
}
static void AddDA_DAxSA() { /* not used ? */
@@ -824,7 +827,7 @@ static void AddDA_DAxSA() { /* not used ? */
int p7 = getCaliValue();
int p8 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.AddDA_DAxSA %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
TRACE_UNIMPLEMENTED("Gpx.AddDA_DAxSA %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
}
static void SpriteCopyAMap() {
@@ -852,7 +855,7 @@ static void SpriteCopyAMap() {
int cl = getCaliValue();
surface_t *src, *dst;
DEBUG_COMMAND("Gpx.SpriteCopyAMap %d,%d,%d,%d,%d,%d,%d,%d,%d:", da, dx, dy, sa, sx, sy, sw, sh, cl);
TRACE("Gpx.SpriteCopyAMap %d,%d,%d,%d,%d,%d,%d,%d,%d:", da, dx, dy, sa, sx, sy, sw, sh, cl);
src = sf_get(sa);
dst = sf_get(da);
@@ -879,7 +882,7 @@ static void BrightDestOnly() {
int r = getCaliValue();
surface_t *dst;
DEBUG_COMMAND("Gpx.BrightDestOnly %d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, r);
TRACE("Gpx.BrightDestOnly %d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, r);
dst = sf_get(ds);
@@ -900,7 +903,7 @@ static void CopyTextureWrap() { /* not used ? */
int p11 = getCaliValue();
int p12 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.CopyTextureWrap %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
TRACE_UNIMPLEMENTED("Gpx.CopyTextureWrap %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
}
static void CopyTextureWrapAlpha() { /* not used ? */
@@ -918,7 +921,7 @@ static void CopyTextureWrapAlpha() { /* not used ? */
int p12 = getCaliValue();
int p13 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.CopyTextureWrapAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
TRACE_UNIMPLEMENTED("Gpx.CopyTextureWrapAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
}
static void CopyStretch() {
@@ -948,7 +951,7 @@ static void CopyStretch() {
int sh = getCaliValue();
surface_t *src, *dst;
DEBUG_COMMAND_YET("Gpx.CopyStretch %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, ss, sx, sy, sw, sh);
TRACE("Gpx.CopyStretch %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, ss, sx, sy, sw, sh);
src = sf_get(ss);
dst = sf_get(ds);
@@ -968,7 +971,7 @@ static void CopyStretchBlend() { /* not used ? */
int p10 = getCaliValue();
int p11 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.CopyStretchBlend %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
TRACE_UNIMPLEMENTED("Gpx.CopyStretchBlend %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
}
static void CopyStretchBlendAMap() {
@@ -998,7 +1001,7 @@ static void CopyStretchBlendAMap() {
int sh = getCaliValue();
surface_t *src, *dst;
DEBUG_COMMAND("Gpx.CopyStretchBlendAMap %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, ss, sx, sy, sw, sh);
TRACE("Gpx.CopyStretchBlendAMap %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, dw, dh, ss, sx, sy, sw, sh);
src = sf_get(ss);
dst = sf_get(ds);
@@ -1015,7 +1018,7 @@ static void StretchBlendScreen2x2() { /* not used ? */
int p7 = getCaliValue();
int p8 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.StretchBlendScreen2x2 %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
TRACE_UNIMPLEMENTED("Gpx.StretchBlendScreen2x2 %d,%d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7, p8);
}
@@ -1049,7 +1052,7 @@ static void StretchBlendScreen2x2WDS() {
int sh = getCaliValue();
surface_t *src1, *src2, *dst;
DEBUG_COMMAND("Gpx.StretchBlendScreen2x2WDS %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh);
TRACE("Gpx.StretchBlendScreen2x2WDS %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh);
src1 = sf_get(ss1);
src2 = sf_get(ss2);
@@ -1086,7 +1089,7 @@ static void BlendScreenWDS() {
int sh = getCaliValue();
surface_t *src1, *src2, *dst;
DEBUG_COMMAND("Gpx.BlendScreenWDS %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh);
TRACE("Gpx.BlendScreenWDS %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:", ds, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh);
src1 = sf_get(ss1);
src2 = sf_get(ss2);
@@ -1137,25 +1140,11 @@ static void EffectCopy() {
int sh = getCaliValue();
int time = getCaliValue();
int *var = getCaliVariable();
surface_t *dib, *dst, *src;
switch(no) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 7:
case 11:
case 12:
case 13:
DEBUG_COMMAND("Gpx.EffectCopy %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%p:", no, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh, time, var);
break;
default:
DEBUG_COMMAND_YET("Gpx.EffectCopy %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%p:", no, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh, time, var);
}
dst = sf_get(ss1);
src = sf_get(ss2);
TRACE("Gpx.EffectCopy %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%p:", no, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh, time, var);
surface_t *dst = sf_get(ss1);
surface_t *src = sf_get(ss2);
gpx_effect(no, dx, dy, dst, sx1, sy1, src, sx2, sy2, sw, sh, time, var);
}
@@ -1163,7 +1152,7 @@ static void EffectCopy() {
static void SetClickCancelFlag() { /* not used ? */
int p1 = getCaliValue();
DEBUG_COMMAND_YET("Gpx.SetClikCancelFlag %d:", p1);
TRACE_UNIMPLEMENTED("Gpx.SetClikCancelFlag %d:", p1);
}
static const ModuleFunc functions[] = {
+4 -4
View File
@@ -42,7 +42,7 @@ static void RandMTInit() {
*/
int p1 = getCaliValue(); /* ITimer */
DEBUG_COMMAND("Math.RandMTInit %d:", p1);
TRACE("Math.RandMTInit %d:", p1);
}
static void RandMTGet() {
@@ -61,7 +61,7 @@ static void RandMTGet() {
*var = (int)(genrand() * num) + 1;
}
DEBUG_COMMAND("Math.RandMTGet %d,%p:", num, var);
TRACE("Math.RandMTGet %d,%p:", num, var);
}
static void RandMTMakeNumTable() {
@@ -74,7 +74,7 @@ static void RandMTMakeNumTable() {
numtblmax = p1;
DEBUG_COMMAND("Math.RandMTMakeNumTable %d:", p1);
TRACE("Math.RandMTMakeNumTable %d:", p1);
}
static void RandMTGetNumTable() {
@@ -87,7 +87,7 @@ static void RandMTGetNumTable() {
*var = (int)(genrand() * numtblmax) + 1;
DEBUG_COMMAND("Math.RandMTGetNumTable %d:", *var);
TRACE("Math.RandMTGetNumTable %d:", *var);
}
static const ModuleFunc functions[] = {
+8 -8
View File
@@ -26,7 +26,7 @@ static void Init() {
valid = true;
*p1 = 0;
DEBUG_COMMAND("MsgSkip.Init %p,%d,%d,%d:", p1, p2, p3, p4);
TRACE("MsgSkip.Init %p,%d,%d,%d:", p1, p2, p3, p4);
}
static void Start() {
@@ -39,7 +39,7 @@ static void Start() {
free(path);
free(fname_utf8);
DEBUG_COMMAND("MsgSkip.Start %p,%d:", p1, p2);
TRACE("MsgSkip.Start %p,%d:", p1, p2);
}
static void SetValid() {
@@ -48,7 +48,7 @@ static void SetValid() {
valid = p1;
msgskip_pause(!valid);
DEBUG_COMMAND("MsgSkip.SetValid %d:", p1);
TRACE("MsgSkip.SetValid %d:", p1);
}
static void GetValid() {
@@ -56,7 +56,7 @@ static void GetValid() {
*p1 = valid;
DEBUG_COMMAND("MsgSkip.GetValid %p:", p1);
TRACE("MsgSkip.GetValid %p:", p1);
}
static void SetAction() {
@@ -64,7 +64,7 @@ static void SetAction() {
action = p1;
DEBUG_COMMAND("MsgSkip.SetAcion %d:", p1);
TRACE("MsgSkip.SetAcion %d:", p1);
}
static void GetAction() {
@@ -72,19 +72,19 @@ static void GetAction() {
*p1 = action;
DEBUG_COMMAND("MsgSkip.GetAcion %p:", p1);
TRACE("MsgSkip.GetAcion %p:", p1);
}
static void PushStr() {
int p1 = getCaliValue();
DEBUG_COMMAND_YET("MsgSkip.PushStr %d:", p1);
TRACE_UNIMPLEMENTED("MsgSkip.PushStr %d:", p1);
}
static void PopStr() {
int p1 = getCaliValue();
DEBUG_COMMAND_YET("MsgSkip.PopStr %d:", p1);
TRACE_UNIMPLEMENTED("MsgSkip.PopStr %d:", p1);
}
static const ModuleFunc functions[] = {
+68 -68
View File
@@ -36,7 +36,7 @@ static void Init(void) { /* 0 */
*var = 1;
DEBUG_COMMAND_YET("NIGHTDLL.Init %p:", var);
TRACE_UNIMPLEMENTED("NIGHTDLL.Init %p:", var);
}
static void NIGHTDLL_reset(void) {
@@ -62,7 +62,7 @@ static void InitGame() { /* 1 */
ntmsg_init();
nt_sstr_init();
DEBUG_COMMAND_YET("NIGHTDLL.InitGame:");
TRACE_UNIMPLEMENTED("NIGHTDLL.InitGame:");
}
// メッセージの枠の表示
@@ -71,7 +71,7 @@ static void SetMsgFrame() { /* 2 */
ntmsg_set_frame(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetMsgFram %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetMsgFram %d:", p1);
}
// メッセージの表示位置の設定
@@ -80,21 +80,21 @@ static void SetMsgPlaceMethod(void) { /* 3 */
// 2=メッセージ枠+顔つき
ntmsg_set_place(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetMsgPlaceMethod %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetMsgPlaceMethod %d:", p1);
}
// 未実装?
static void SetMsgDrawEffect(void) { /* 4 */
int p1 = getCaliValue(); // 0, 1, 2, 3 (実際にはどれも機能しない?)
DEBUG_COMMAND_YET("NIGHTDLL.SetMsgDrawEffect %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetMsgDrawEffect %d:", p1);
}
// 未実装?
static void SetMsgClearEffect(void) { /* 5 */
int p1 = getCaliValue(); // 0, 1, 2, 4 (実際にはどれも機能しない?)
DEBUG_COMMAND_YET("NIGHTDLL.SetMsgClearEffect %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetMsgClearEffect %d:", p1);
}
// 壁紙CGの設定
@@ -103,7 +103,7 @@ static void SetWallPaper(void) { /* 6 */
nt_gr_set_wallpaper(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetWallPaper %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetWallPaper %d:", p1);
}
// 背景CGの設定
@@ -112,7 +112,7 @@ static void SetScenery(void) { /* 7 */
nt_gr_set_scenery(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetScenery %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetScenery %d:", p1);
}
// 顔CGの設定
@@ -121,7 +121,7 @@ static void SetFace(void) { /* 8 */
nt_gr_set_face(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetFace %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetFace %d:", p1);
}
// 立ち絵左の設定
@@ -130,7 +130,7 @@ static void SetSpriteL(void) { /* 9 */
nt_gr_set_spL(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetSpriteL %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetSpriteL %d:", p1);
}
// 立ち絵中央の設定
@@ -139,7 +139,7 @@ static void SetSpriteM(void) { /* 10 */
nt_gr_set_spM(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetSpriteM %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetSpriteM %d:", p1);
}
// 立ち絵右の設定
@@ -148,7 +148,7 @@ static void SetSpriteR(void) { /* 11 */
nt_gr_set_spR(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetSpriteR %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetSpriteR %d:", p1);
}
// 立ち絵左の設定(季節違い?)
@@ -157,7 +157,7 @@ static void SetSpriteSeasonL(void) { /* 12 */
nt_gr_set_spsL(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetSpriteSeasonL %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetSpriteSeasonL %d:", p1);
}
// 立ち絵中央の設定(季節違い?)
@@ -166,7 +166,7 @@ static void SetSpriteSeasonM(void) { /* 13 */
nt_gr_set_spM(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetSpriteSeasonM %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetSpriteSeasonM %d:", p1);
}
// 立ち絵右の設定(季節違い?)
@@ -175,14 +175,14 @@ static void SetSpriteSeasonR(void) { /* 14 */
nt_gr_set_spsR(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetSpriteSeasonR %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetSpriteSeasonR %d:", p1);
}
// 改行
static void StartNewLine(void) { /* 15 */
ntmsg_newline();
DEBUG_COMMAND_YET("NIGHTDLL.StartNewLine:");
TRACE_UNIMPLEMENTED("NIGHTDLL.StartNewLine:");
}
// メッセージフォントサイズの設定
@@ -191,7 +191,7 @@ static void SetFontSize(void) { /* 16 */
night.fontsize = p1;
DEBUG_COMMAND_YET("NIGHTDLL.SetFontSize %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetFontSize %d:", p1);
}
// フォントの種類の設定
@@ -200,7 +200,7 @@ static void SetFont(void) { /* 17 */
night.fonttype = p1;
DEBUG_COMMAND_YET("NIGHTDLL.SetFont %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetFont %d:", p1);
}
// 選択肢モード ON
@@ -209,7 +209,7 @@ static void SetSelMode(void) { /* 18 */
night.selmode = p1;
DEBUG_COMMAND_YET("NIGHTDLL.SetSelMode %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetSelMode %d:", p1);
}
// キー入力待ち後、改ページ
@@ -218,7 +218,7 @@ static void AnalyzeMessage(void) { /* 19 */
*var = ntmsg_ana();
DEBUG_COMMAND_YET("NIGHTDLL.AnalyzeMessage %p:", var);
TRACE_UNIMPLEMENTED("NIGHTDLL.AnalyzeMessage %p:", var);
}
// ~DRAWの効果時間
@@ -227,7 +227,7 @@ static void SetDrawTime(void) { /* 20 */
nt_gr_set_drawtime(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetDrawTime %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetDrawTime %d:", p1);
}
// 効果つき画面更新
@@ -236,7 +236,7 @@ static void Draw(void) { /* 21 */
nt_gr_draw(p1);
DEBUG_COMMAND_YET("NIGHTDLL.Draw %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.Draw %d:", p1);
}
// 音声データを再生
@@ -245,21 +245,21 @@ static void SetVoice(void) { /* 22 */
nt_voice_set(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SetVoice %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetVoice %d:", p1);
}
// 未使用
static void WaitKey(void) { /* 23 */
int p1 = getCaliValue(); //
DEBUG_COMMAND_YET("NIGHTDLL.WaitKey %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.WaitKey %d:", p1);
}
static void AddFeeling(void) { /* 24 */
int p1 = getCaliValue(); // person(1:新開,2:星川,3:百瀬,4:いずみ,5:鏡花,6:真言美,7:マコト
int p2 = getCaliValue(); // val
DEBUG_COMMAND_YET("NIGHTDLL.AddFeeling %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.AddFeeling %d:", p1);
}
@@ -267,7 +267,7 @@ static void SubFeeling(void) { /* 25 */
int p1 = getCaliValue(); // person
int p2 = getCaliValue(); // val
DEBUG_COMMAND_YET("NIGHTDLL.SubFeeling %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SubFeeling %d:", p1);
}
static void CallEvent(void) { /* 26 */
@@ -275,7 +275,7 @@ static void CallEvent(void) { /* 26 */
nt_sco_callevent(p1);
DEBUG_COMMAND_YET("NIGHTDLL.CallEvent %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.CallEvent %d:", p1);
}
static void ScreenCG(void) { /* 27 */
@@ -294,7 +294,7 @@ static void ScreenCG(void) { /* 27 */
nt_gr_screencg(no, x, y);
DEBUG_COMMAND_YET("NIGHTDLL.ScreenCG %d,%d,%d:", x, y, no);
TRACE_UNIMPLEMENTED("NIGHTDLL.ScreenCG %d,%d,%d:", x, y, no);
}
static void RunGameMain(void) { /* 28 */
@@ -310,7 +310,7 @@ static void RunGameMain(void) { /* 28 */
*p1 = nt_sco_main(p5);
DEBUG_COMMAND_YET("NIGHTDLL.RunGameMain %p,%d,%d,%d,%d:", p1, p2, p3, p4, p5);
TRACE_UNIMPLEMENTED("NIGHTDLL.RunGameMain %p,%d,%d,%d,%d:", p1, p2, p3, p4, p5);
}
static void CheckNewGame(void) { /* 29 */
@@ -318,21 +318,21 @@ static void CheckNewGame(void) { /* 29 */
*p1 = 0;
DEBUG_COMMAND_YET("NIGHTDLL.CheckNewGame %p:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.CheckNewGame %p:", p1);
}
static void SaveStartData(void) { /* 30 */
DEBUG_COMMAND_YET("NIGHTDLL.SaveStartData:");
TRACE_UNIMPLEMENTED("NIGHTDLL.SaveStartData:");
}
static void PrintExitSystem(void) { /* 31 */
DEBUG_COMMAND_YET("NIGHTDLL.PrintExitSystem:");
TRACE_UNIMPLEMENTED("NIGHTDLL.PrintExitSystem:");
}
static void SetCalendar(void) { /* 32 */
int p1 = getCaliValue(); // 0, 1, 2
DEBUG_COMMAND_YET("NIGHTDLL.SetCalendar %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetCalendar %d:", p1);
}
static void SetDate(void) { /* 33 */
@@ -344,7 +344,7 @@ static void SetDate(void) { /* 33 */
night.Day = p2;
night.DayOfWeek = p3;
DEBUG_COMMAND_YET("NIGHTDLL.SetDate %d,%d,%d:", p1, p2, p3);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetDate %d,%d,%d:", p1, p2, p3);
}
static void GetDate(void) { /* 34 */
@@ -356,11 +356,11 @@ static void GetDate(void) { /* 34 */
*p2 = night.Day;
*p3 = night.DayOfWeek;
DEBUG_COMMAND_YET("NIGHTDLL.GetDate %p,%p,%p:", p1, p2, p3);
TRACE_UNIMPLEMENTED("NIGHTDLL.GetDate %p,%p,%p:", p1, p2, p3);
}
static void SelectGameLevel(void) { /* 35 */
DEBUG_COMMAND_YET("NIGHTDLL.SelectGameLevel:");
TRACE_UNIMPLEMENTED("NIGHTDLL.SelectGameLevel:");
}
static void RunEventDungeon(void) { /* 36 */
@@ -369,13 +369,13 @@ static void RunEventDungeon(void) { /* 36 */
*p1 = 1;
DEBUG_COMMAND_YET("NIGHTDLL.RunEventDungeon %p,%d:", p1, p2);
TRACE_UNIMPLEMENTED("NIGHTDLL.RunEventDungeon %p,%d:", p1, p2);
}
static void RunEventBattle(void) { /* 37 */
int p1 = getCaliValue(); // 実際には機能しない?
DEBUG_COMMAND_YET("NIGHTDLL.RunEventBattle %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.RunEventBattle %d:", p1);
}
// CD再生開始
@@ -384,7 +384,7 @@ static void CDPlay(void) { /* 38 */
nt_cd_play(p1);
DEBUG_COMMAND_YET("NIGHTDLL.CDPlay %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.CDPlay %d:", p1);
}
// CD再生停止
@@ -393,7 +393,7 @@ static void CDStop(void) { /* 39 */
nt_cd_stop(p1);
DEBUG_COMMAND_YET("NIGHTDLL.CDStop %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.CDStop %d:", p1);
}
// CDのmute
@@ -402,7 +402,7 @@ static void CDMute(void) { /* 40 */
nt_cd_mute(p1 == 0 ? FALSE : TRUE);
DEBUG_COMMAND_YET("NIGHTDLL.CDMute %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.CDMute %d:", p1);
}
// ch に効果音番号をセット
@@ -412,7 +412,7 @@ static void SoundEffectSetWave(void) { /* 41 */
nt_snd_setwave(p1, p2);
DEBUG_COMMAND_YET("NIGHTDLL.SoundEffectSetWave %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("NIGHTDLL.SoundEffectSetWave %d,%d:", p1, p2);
}
// ch にくり返し数をセット
@@ -422,7 +422,7 @@ static void SoundEffectSetLoop(void) { /* 42 */
nt_snd_setloop(p1, p2);
DEBUG_COMMAND_YET("NIGHTDLL.SoundEffectSetLoop %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("NIGHTDLL.SoundEffectSetLoop %d,%d:", p1, p2);
}
// ch に音量をセット
@@ -432,7 +432,7 @@ static void SoundEffectSetVolume(void) { /* 43 */
nt_snd_setvol(p1, p2);
DEBUG_COMMAND_YET("NIGHTDLL.SoundEffectSetVolue %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("NIGHTDLL.SoundEffectSetVolue %d,%d:", p1, p2);
}
// 効果音の再生を終るまで待つか待たないか?
@@ -442,7 +442,7 @@ static void SoundEffectSetSyncFlag(void) { /* 44 */
nt_snd_waitend(p1, p2 == 0 ? FALSE : TRUE);
DEBUG_COMMAND_YET("NIGHTDLL.SoundEffectSetSyncFlag %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("NIGHTDLL.SoundEffectSetSyncFlag %d,%d:", p1, p2);
}
// ch の効果音を再生
@@ -451,7 +451,7 @@ static void SoundEffectPlay(void) { /* 45 */
nt_snd_play(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SoundEffectPlay %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SoundEffectPlay %d:", p1);
}
// ch の効果音を停止
@@ -461,7 +461,7 @@ static void SoundEffectStop(void) { /* 46 */
nt_snd_stop(p1, p2);
DEBUG_COMMAND_YET("NIGHTDLL.SoundEffectStop %d,%d:", p1,p2);
TRACE_UNIMPLEMENTED("NIGHTDLL.SoundEffectStop %d,%d:", p1,p2);
}
// 全てのチャンネルの再生を停止
@@ -470,86 +470,86 @@ static void SoundEffectStopAll(void) { /* 47 */
nt_snd_stopall(p1);
DEBUG_COMMAND_YET("NIGHTDLL.SoundEffectStopAll %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SoundEffectStopAll %d:", p1);
}
static void RunSoundMode(void) { /* 48 */
DEBUG_COMMAND_YET("NIGHTDLL.RunSoundMode:");
TRACE_UNIMPLEMENTED("NIGHTDLL.RunSoundMode:");
}
static void RunMapEditor(void) { /* 49 */
int *p1 = getCaliVariable();
DEBUG_COMMAND_YET("NIGHTDLL.RunMapEditor %p:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.RunMapEditor %p:", p1);
}
static void VisualListClear(void) { /* 50 */
DEBUG_COMMAND_YET("NIGHTDLL.VisualListClear:");
TRACE_UNIMPLEMENTED("NIGHTDLL.VisualListClear:");
}
static void VisualListAdd(void) { /* 51 */
int p1 = getCaliValue();
DEBUG_COMMAND_YET("NIGHTDLL.VisualListAdd %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.VisualListAdd %d:", p1);
}
static void GetLocalCountCG(void) { /* 52 */
int *p1 = getCaliVariable();
int p2 = getCaliValue();
DEBUG_COMMAND_YET("NIGHTDLL.GetLocalCountCG %p,%d:", p1, p2);
TRACE_UNIMPLEMENTED("NIGHTDLL.GetLocalCountCG %p,%d:", p1, p2);
}
static void PlayMemory(void) { /* 53 */
int *p1 = getCaliVariable(); // 回想ページ
int *p2 = getCaliVariable(); // 回想RESULT
DEBUG_COMMAND_YET("NIGHTDLL.PlayMemory %p,%p:", p1, p2);
TRACE_UNIMPLEMENTED("NIGHTDLL.PlayMemory %p,%p:", p1, p2);
}
static void GetEventFlagTotal(void) { /* 54 */
int *p1 = getCaliVariable();
int p2 = getCaliValue();
DEBUG_COMMAND_YET("NIGHTDLL.GetEventFlagTotal %p,%d:", p1, p2);
TRACE_UNIMPLEMENTED("NIGHTDLL.GetEventFlagTotal %p,%d:", p1, p2);
}
static void SetPlayerName(void) { /* 55 */
int p1 = getCaliValue();
DEBUG_COMMAND_YET("NIGHTDLL.SetPlayerName %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetPlayerName %d:", p1);
}
static void GetPlayerName(void) { /* 56 */
int p1 = getCaliValue();
DEBUG_COMMAND_YET("NIGHTDLL.GetPlayerName %d:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.GetPlayerName %d:", p1);
}
static void SaveGame(void) { /* 57 */
int *p1 = getCaliVariable();
DEBUG_COMMAND_YET("NIGHTDLL.SaveGame %p:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.SaveGame %p:", p1);
}
static void LoadGame(void) { /* 58 */
int *p1 = getCaliVariable();
DEBUG_COMMAND_YET("NIGHTDLL.LoadGame %p:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.LoadGame %p:", p1);
}
static void ExistSaveData(void) { /* 59 */
int *p1 = getCaliVariable();
DEBUG_COMMAND_YET("NIGHTDLL.ExistSaveData %p:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.ExistSaveData %p:", p1);
}
static void ExistStartData(void) { /* 60 */
int *p1 = getCaliVariable();
DEBUG_COMMAND_YET("NIGHTDLL.ExistStartData %p:", p1);
TRACE_UNIMPLEMENTED("NIGHTDLL.ExistStartData %p:", p1);
}
static void SetAreaData(void) { /* 61 */
@@ -557,27 +557,27 @@ static void SetAreaData(void) { /* 61 */
int p2 = getCaliValue();
int p3 = getCaliValue();
DEBUG_COMMAND_YET("NIGHTDLL.SetAreaData %d,%d,%d:", p1, p2, p3);
TRACE_UNIMPLEMENTED("NIGHTDLL.SetAreaData %d,%d,%d:", p1, p2, p3);
}
static void RunBattleTest(void) { /* 62 */
DEBUG_COMMAND_YET("NIGHTDLL.RunBattleTest:");
TRACE_UNIMPLEMENTED("NIGHTDLL.RunBattleTest:");
}
static void RunTrainingTest(void) { /* 63 */
DEBUG_COMMAND_YET("NIGHTDLL.RunTrainingTest:");
TRACE_UNIMPLEMENTED("NIGHTDLL.RunTrainingTest:");
}
static void TestEventCall(void) { /* 64 */
DEBUG_COMMAND_YET("NIGHTDLL.TestEventCall:");
TRACE_UNIMPLEMENTED("NIGHTDLL.TestEventCall:");
}
static void Test(void) { /* 65 */
DEBUG_COMMAND_YET("NIGHTDLL.Test:");
TRACE_UNIMPLEMENTED("NIGHTDLL.Test:");
}
static void DebugScenario(void) { /* 66 */
DEBUG_COMMAND_YET("NIGHTDLL.DebugScenario:");
TRACE_UNIMPLEMENTED("NIGHTDLL.DebugScenario:");
}
static void GetDLLTime(void) { /* 67 */
@@ -589,7 +589,7 @@ static void GetDLLTime(void) { /* 67 */
int *p6 = getCaliVariable();
int *p7 = getCaliVariable();
DEBUG_COMMAND_YET("NIGHTDLL.GetDLLTime %p,%p,%p,%p,%p,%p,%p:", p1, p2, p3, p4, p5, p6, p7);
TRACE_UNIMPLEMENTED("NIGHTDLL.GetDLLTime %p,%p,%p,%p,%p,%p,%p:", p1, p2, p3, p4, p5, p6, p7);
}
static const ModuleFunc functions[] = {
+4 -4
View File
@@ -9,6 +9,7 @@
#include "system.h"
#include "input.h"
#include "sdl_core.h"
#include "scheduler.h"
#include "xsystem35.h"
#include "nact.h"
#include "scenario.h"
@@ -52,7 +53,8 @@ static void ntmain(struct _scoadr inadr) {
struct _scoadr curadr;
while (!nact->is_quit) {
for (int cnt = 0; !nact->is_quit && !nact->wait_vsync && cnt < 10000; cnt++) {
while (!nact->is_quit && !is_yield_requested()) {
scheduler_on_command();
//SACT_DEBUG("%d:%x", sl_getPage(), sl_getIndex());
if (!nact->popupmenu_opened) {
exec_command();
@@ -71,9 +73,7 @@ static void ntmain(struct _scoadr inadr) {
nact->callback();
}
sys_getInputInfo();
sdl_wait_vsync();
nact->frame_count++;
nact->wait_vsync = FALSE;
scheduler_yield();
}
}
+4 -4
View File
@@ -57,15 +57,15 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
#define SCALEDCOPYAREA(type) { \
int x, y; \
type *sl, *dl; \
uint8_t *_sl, *_dl; \
uint8_t *_sl, *_dl; \
for (y = 0; y < dh; y++) { \
sl = (type *)(sdata + *(y + col) * src->bytes_per_line);\
dl = (type *)(ddata + y * dst->bytes_per_line);\
for (x = 0; x < dw; x++) { \
*(dl + x) = *(sl + *(row + x)); \
} \
_dl = (uint8_t *)dl; \
while(*(col + y) == *(col + y + 1)) { \
_dl = (uint8_t *)dl; \
while (y < dh - 1 && *(col + y) == *(col + y + 1)) { \
_sl = _dl; \
_dl += dst->bytes_per_line; \
memcpy(_dl, _sl, dw * sizeof(type)); \
@@ -98,7 +98,7 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
*(dl + x) = *(sl + *(row + x));
}
_dl = (uint8_t *)dl;
while(*(col + y) == *(col + y + 1)) {
while (y < dh - 1 && *(col + y) == *(col + y + 1)) {
_sl = _dl;
_dl += dst->width;
memcpy(_dl, _sl, dw);
+1 -1
View File
@@ -58,7 +58,7 @@ int nt_sp_eupdate(int no, int time, int cancel) {
int edtime = curtime + time;
while ((curtime = sdl_getTicks()) < edtime) {
sdl_effect_step(eff, (double)(curtime - sttime) / (edtime - sttime));
sdl_effect_step(eff, (float)(curtime - sttime) / (edtime - sttime));
int rest = 16 - (sdl_getTicks() - curtime);
int key = sys_keywait(rest, cancel ? KEYWAIT_CANCELABLE : KEYWAIT_NONCANCELABLE);
if (cancel && key)
+4 -3
View File
@@ -51,7 +51,7 @@ static void ndd_run(int demonum) {
int mus = ndemo_mus[demonum];
if (mus)
musbgm_play(mus, 0, 100);
musbgm_play(mus, 0, 100, 0);
uint32_t start = sdl_getTicks();
while (!nact->is_quit) {
@@ -73,6 +73,7 @@ static void ndd_run(int demonum) {
if (sys_keywait(wait_ms, KEYWAIT_CANCELABLE))
break;
} else {
sdl_updateScreen();
if (sys_getInputInfo())
break;
}
@@ -92,7 +93,7 @@ static void Init() {
*var = 1;
DEBUG_COMMAND("NightDemonDemo.Init %d,%d,%d,%p:", p1, p2, p3, var);
TRACE("NightDemonDemo.Init %d,%d,%d,%p:", p1, p2, p3, var);
}
static void Run() {
@@ -101,7 +102,7 @@ static void Run() {
ndd_run(p1);
DEBUG_COMMAND("NightDemonDemo.Run %d,%d:", p1, p2);
TRACE("NightDemonDemo.Run %d,%d:", p1, p2);
}
static const ModuleFunc functions[] = {
+3 -3
View File
@@ -40,7 +40,7 @@ static void Init() {
*/
int p1 = getCaliValue(); /* ITimer */
DEBUG_COMMAND_YET("RandMT.Init %p:", p1);
TRACE_UNIMPLEMENTED("RandMT.Init %p:", p1);
}
static void Get() {
@@ -59,7 +59,7 @@ static void Get() {
*var = (int)(genrand() * num) + 1;
}
DEBUG_COMMAND("RandMT.Get %d,%p:", num, var);
TRACE("RandMT.Get %d,%p:", num, var);
}
static void GetNoOverlap() {
@@ -69,7 +69,7 @@ static void GetNoOverlap() {
*var = (int)(genrand() * n) + min;
DEBUG_COMMAND("RandMT.GetNoOverlap %d,%d,%p:", min, n, var);
TRACE("RandMT.GetNoOverlap %d,%d,%p:", min, n, var);
}
static const ModuleFunc functions[] = {
+238
View File
@@ -0,0 +1,238 @@
/*
* Copyright (C) 2025 <KichikuouChrome@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "config.h"
#include "modules.h"
#include "nact.h"
#include "bgm.h"
#include "music.h"
#include "music_pcm.h"
#define SLOT 128
static int current_no = 0;
static void Init(void) {
int isys3x = getCaliValue();
TRACE("S3xMusic.Init %d:", isys3x);
}
static void CreateChannel(void) {
int nr_channels = getCaliValue();
if (nr_channels != 2)
SYSERROR("Unsupported number of channels: %d", nr_channels);
TRACE("S3xMusic.CreateChannel %d:", nr_channels);
}
static void Prepare(void) {
int ch = getCaliValue();
int no = getCaliValue();
int *result = getCaliVariable();
if (ch == 0) {
current_no = no;
*result = 1;
} else {
*result = muspcm_load_bgm(SLOT, no) == OK;
}
TRACE("S3xMusic.Prepare %d, %d => %d:", ch, no, *result);
}
static void Unprepare(void) {
int ch = getCaliValue();
if (ch == 0) {
if (current_no) {
musbgm_stop(current_no, 0);
current_no = 0;
}
} else {
muspcm_unload(SLOT);
}
TRACE("S3xMusic.Unprepare %d:", ch);
}
static void Play(void) {
int p1 = getCaliValue();
int p2 = getCaliValue();
TRACE_UNIMPLEMENTED("S3xMusic.Play %d, %d:", p1, p2);
}
static void FadePlay(void) {
int ch = getCaliValue();
int fadein_time = getCaliValue();
int volume = getCaliValue();
int loop_count = getCaliValue(); // 0 = infinite
if (ch == 0) {
musbgm_play(current_no, fadein_time, volume, loop_count);
} else {
muspcm_start(SLOT, loop_count == 0 ? -1 : loop_count);
}
TRACE("S3xMusic.FadePlay %d, %d, %d, %d:", ch, fadein_time, volume, loop_count);
}
static void PlayPosSample(void) {
int p1 = getCaliValue();
int p2 = getCaliValue();
int p3 = getCaliValue();
int p4 = getCaliValue();
TRACE_UNIMPLEMENTED("S3xMusic.PlayPosSample %d, %d, %d, %d:", p1, p2, p3, p4);
}
static void IsPlay(void) {
int ch = getCaliValue();
int *result = getCaliVariable();
if (ch == 0) {
*result = current_no && musbgm_isplaying(current_no);
} else {
*result = muspcm_isplaying(SLOT);
}
TRACE("S3xMusic.IsPlay %d => %d:", ch, *result);
}
static void Stop(void) {
int ch = getCaliValue();
if (ch == 0) {
if (current_no)
musbgm_stop(current_no, 0);
current_no = 0;
} else {
muspcm_stop(SLOT);
}
TRACE("S3xMusic.Stop %d:", ch);
}
static void Restart(void) {
int p1 = getCaliValue();
TRACE_UNIMPLEMENTED("S3xMusic.Restart %d:", p1);
}
static void GetPlayPos(void) {
int ch = getCaliValue();
int *hour = getCaliVariable();
int *min = getCaliVariable();
int *sec = getCaliVariable();
int *msec = getCaliVariable();
if (ch == 0) {
int time = musbgm_getpos(current_no);
*hour = time / 360000;
*min = (time / 6000) % 60;
*sec = (time / 100) % 60;
*msec = (time % 100) * 10;
} else {
// not implemented
*hour = 0;
*min = 0;
*sec = 0;
*msec = 0;
}
TRACE("S3xMusic.GetPlayPos %d => %d, %d, %d, %d:", ch, *hour, *min, *sec, *msec);
}
static void GetPlayPosSample(void) {
int p1 = getCaliValue();
int *var1 = getCaliVariable();
int *var2 = getCaliVariable();
TRACE_UNIMPLEMENTED("S3xMusic.GetPlayPosSample %d, %p, %p:", p1, var1, var2);
}
static void SetRepeatStart(void) {
int p1 = getCaliValue();
int p2 = getCaliValue();
int p3 = getCaliValue();
TRACE_UNIMPLEMENTED("S3xMusic.SetRepeatStart %d, %d, %d:", p1, p2, p3);
}
static void SetRepeatEnd(void) {
int p1 = getCaliValue();
int p2 = getCaliValue();
int p3 = getCaliValue();
TRACE_UNIMPLEMENTED("S3xMusic.SetRepeatEnd %d, %d, %d:", p1, p2, p3);
}
static void FadeVolume(void) {
int ch = getCaliValue();
int time = getCaliValue();
int volume = getCaliValue();
int stop_after_fade = getCaliValue();
if (ch == 0) {
if (stop_after_fade) {
musbgm_stop(current_no, time / 10);
} else {
musbgm_fade(current_no, time / 10, volume);
}
} else {
if (stop_after_fade) {
muspcm_fadeout(SLOT, time);
} else {
muspcm_setvol(SLOT, volume);
}
}
TRACE("S3xMusic.FadeVolume %d, %d, %d, %d:", ch, time, volume, stop_after_fade);
}
static void IsFade(void) {
int ch = getCaliValue();
int *result = getCaliVariable();
*result = 0;
TRACE_UNIMPLEMENTED("S3xMusic.IsFade %d => %d:", ch, *result);
}
static void StopFade(void) {
int ch = getCaliValue();
TRACE_UNIMPLEMENTED("S3xMusic.StopFade %d:", ch);
}
static void WaitEnd(void) {
int p1 = getCaliValue();
int p2 = getCaliValue(); // IWinMsg
TRACE_UNIMPLEMENTED("S3xMusic.WaitEnd %d, %d:", p1, p2);
}
static void sleep(void) {
int p1 = getCaliValue(); // IWinMsg
TRACE_UNIMPLEMENTED("S3xMusic.sleep %d:", p1);
}
static const ModuleFunc functions[] = {
{"CreateChannel", CreateChannel},
{"FadePlay", FadePlay},
{"FadeVolume", FadeVolume},
{"GetPlayPos", GetPlayPos},
{"GetPlayPosSample", GetPlayPosSample},
{"Init", Init},
{"IsFade", IsFade},
{"IsPlay", IsPlay},
{"Play", Play},
{"PlayPosSample", PlayPosSample},
{"Prepare", Prepare},
{"Restart", Restart},
{"SetRepeatEnd", SetRepeatEnd},
{"SetRepeatStart", SetRepeatStart},
{"Stop", Stop},
{"StopFade", StopFade},
{"Unprepare", Unprepare},
{"WaitEnd", WaitEnd},
{"sleep", sleep},
};
const Module module_S3xMusic = {"S3xMusic", functions, sizeof(functions) / sizeof(ModuleFunc)};
+138 -139
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -57,15 +57,15 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
#define SCALEDCOPYAREA(type) { \
int x, y; \
type *sl, *dl; \
uint8_t *_sl, *_dl; \
uint8_t *_sl, *_dl; \
for (y = 0; y < dh; y++) { \
sl = (type *)(sdata + *(y + col) * src->bytes_per_line);\
dl = (type *)(ddata + y * dst->bytes_per_line);\
for (x = 0; x < dw; x++) { \
*(dl + x) = *(sl + *(row + x)); \
} \
_dl = (uint8_t *)dl; \
while(*(col + y) == *(col + y + 1)) { \
_dl = (uint8_t *)dl; \
while (y < dh - 1 && *(col + y) == *(col + y + 1)) { \
_sl = _dl; \
_dl += dst->bytes_per_line; \
memcpy(_dl, _sl, dw * sizeof(type)); \
@@ -98,7 +98,7 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
*(dl + x) = *(sl + *(row + x));
}
_dl = (uint8_t *)dl;
while(*(col + y) == *(col + y + 1)) {
while (y < dh - 1 && *(col + y) == *(col + y + 1)) {
_sl = _dl;
_dl += dst->width;
memcpy(_dl, _sl, dw);
+10 -8
View File
@@ -39,10 +39,12 @@
#include "sdl_core.h"
#include "randMT.h"
typedef void entrypoint (double step, int p1, int p2, int *retx, int *rety);
#define M_PIf ((float)M_PI)
typedef void entrypoint (float step, int p1, int p2, int *retx, int *rety);
// 上下左右方向の揺らし
static void quake0(double step, int ampx, int ampy, int *adjx, int *adjy) {
static void quake0(float step, int ampx, int ampy, int *adjx, int *adjy) {
static int i = 0;
*adjx = (int)(genrand() * ampx/2);
@@ -53,12 +55,12 @@ static void quake0(double step, int ampx, int ampy, int *adjx, int *adjy) {
}
// 回転の揺らし
static void quake1(double curstep, int diam, int round, int *adjx, int *adjy) {
double R = (1 - curstep) * diam / 2;
double th = curstep * 2 * M_PI * round;
static void quake1(float curstep, int diam, int round, int *adjx, int *adjy) {
float R = (1 - curstep) * diam / 2;
float th = curstep * 2 * M_PIf * round;
*adjx = (int)(R * cos(th));
*adjy = (int)(R * sin(th));
*adjx = (int)(R * cosf(th));
*adjy = (int)(R * sinf(th));
}
/*
@@ -83,7 +85,7 @@ int sp_quake_screen(int type, int p1, int p2, int time, int cancel) {
while ((curtime = sdl_getTicks()) < edtime) {
int adjx, adjy;
cb[type]((double)(curtime - sttime)/(edtime - sttime), p1, p2, &adjx, &adjy);
cb[type]((float)(curtime - sttime)/(edtime - sttime), p1, p2, &adjx, &adjy);
ags_setViewArea(adjx, adjy, sf0->width, sf0->height);
ags_updateFull();
+5 -4
View File
@@ -586,10 +586,11 @@ int sp_query_size(int wNum, int *vw, int *vh) {
// テキストスプライトの現在の文字表示位置の取得
int sp_query_textpos(int wNum, int *vx, int *vy) {
if (wNum >= SPRITEMAX) goto errexit;
if (sact.sp[wNum]->type != SPRITE_MSG) goto errexit;
*vx = sact.sp[wNum]->u.msg.dspcur.x;
*vy = sact.sp[wNum]->u.msg.dspcur.y;
sprite_t *sp = sact.sp[wNum];
if (sp->type != SPRITE_MSG) goto errexit;
*vx = sp->u.msg.dspcur.x + sp->loc.x;
*vy = sp->u.msg.dspcur.y + sp->loc.y;
return OK;
errexit:
+1
View File
@@ -89,6 +89,7 @@ extern void smsg_newline(int wNum, int size);
extern void smsg_out(int wNum, int wSize, int wColorR, int wColorG, int wColorB, int wFont, int wSpeed, int wLineSpace, int wAlign, int wRSize, int wRFont, int wRLineSpace, int *wLength);
extern void smsg_clear(int wNum);
extern int smsg_is_empty();
extern int smsg_peek(int nTopStringNum);
extern int smsg_keywait(int sp1, int sp2, int timeout);
extern int smsg_update(sprite_t *sp);
+1 -1
View File
@@ -59,7 +59,7 @@ int sp_eupdate(int type, int time, int cancel) {
int edtime = curtime + time * 10;
while ((curtime = sdl_getTicks()) < edtime) {
sdl_effect_step(eff, (double)(curtime - sttime) / (edtime - sttime));
sdl_effect_step(eff, (float)(curtime - sttime) / (edtime - sttime));
int rest = 16 - (sdl_getTicks() - curtime);
int key = sys_keywait(rest, cancel ? KEYWAIT_CANCELABLE : KEYWAIT_NONCANCELABLE);
if (cancel && key)
+1 -1
View File
@@ -129,7 +129,7 @@ void spev_move_setup(void* data, void* userdata) {
// speed から timeへ
int dx = sp->move.to.x - sp->loc.x;
int dy = sp->move.to.y - sp->loc.y;
int d = (int)sqrt(dx*dx+dy*dy);
int d = (int)sqrtf(dx*dx+dy*dy);
sp->move.time = d * 100 / sp->move.speed;
}
+19
View File
@@ -385,6 +385,25 @@ int smsg_is_empty() {
return (sact.msgbuf[0] == '\0');
}
int smsg_peek(int nTopStringNum) {
char *p = sact.msgbuf;
int i;
for (i = 0; *p; i++) {
char *q = strchr(p, '\n');
if (q)
*q = '\0';
svar_set(nTopStringNum + i, p);
if (q) {
*q = '\n';
p = q + 2;
} else {
i++;
break;
}
}
return i;
}
/*
メッセージキー入力待ち
@param wNum1: スプライト番号1(アニメーションスプライト)
+54 -54
View File
@@ -49,7 +49,7 @@ static void GetAtArray(void) { /* 0 */
int *vResult = getCaliVariable();
int i, j;
DEBUG_COMMAND("ShArray.GetAtArray %p,%d,%d,%p:", vAry, cnt, type, vResult);
TRACE("ShArray.GetAtArray %p,%d,%d,%p:", vAry, cnt, type, vResult);
j = *vAry; vAry++;
for (i = 1; i < cnt; i++) {
@@ -93,7 +93,7 @@ static void AddAtArray(void) { /* 1 */
int cnt = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.AddAtArray %p,%p,%d:", vAry1, vAry2, cnt);
TRACE("ShArray.AddAtArray %p,%p,%d:", vAry1, vAry2, cnt);
for (i = 0; i < cnt; i++) {
int result = (*vAry1) + (*vAry2);
@@ -119,7 +119,7 @@ static void SubAtArray(void) { /* 2 */
int cnt = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.SubAtArray %p,%p,%d:", vAry1, vAry2, cnt);
TRACE("ShArray.SubAtArray %p,%p,%d:", vAry1, vAry2, cnt);
for (i = 0; i < cnt; i++) {
int result = (*vAry1) - (*vAry2);
@@ -145,7 +145,7 @@ static void MulAtArray(void) { /* 3 */
int cnt = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.MulAtArray %p,%p,%d:", vAry1, vAry2, cnt);
TRACE("ShArray.MulAtArray %p,%p,%d:", vAry1, vAry2, cnt);
for (i = 0; i < cnt; i++) {
int result = (*vAry1) * (*vAry2);
@@ -171,7 +171,7 @@ static void DivAtArray(void) { /* 4 */
int cnt = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.DivAtArray: %d,%d,%d:", vAry1, vAry2, cnt);
TRACE("ShArray.DivAtArray: %d,%d,%d:", vAry1, vAry2, cnt);
for (i = 0; i < cnt; i++) {
if (*vAry2 == 0) {
@@ -201,7 +201,7 @@ static void MinAtArray(void) { /* 5 */
int cnt = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.MinAtArray: %d,%d,%d:", vAry1, vAry2, cnt);
TRACE("ShArray.MinAtArray: %d,%d,%d:", vAry1, vAry2, cnt);
for (i = 0; i < cnt; i++) {
if (*vAry1 < *vAry2) {
@@ -224,7 +224,7 @@ static void MaxAtArray(void) { /* 6 */
int cnt = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.MaxAtArray: %d,%d,%d:", vAry1, vAry2, cnt);
TRACE("ShArray.MaxAtArray: %d,%d,%d:", vAry1, vAry2, cnt);
for (i = 0; i < cnt; i++) {
if (*vAry1 > *vAry2) {
@@ -247,7 +247,7 @@ static void AndNumArray(void) { /* 7 */
int val = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.AndNumArray: %p,%d,%d:", vAry, cnt, val);
TRACE("ShArray.AndNumArray: %p,%d,%d:", vAry, cnt, val);
for (i = 0; i < cnt; i++) {
(*vAry) &= val;
@@ -268,7 +268,7 @@ static void OrNumArray(void) { /* 8 */
int val = getCaliValue();
int i;
DEBUG_COMMAND_YET("ShArray.OrNumArray: %p,%d,%d:", vAry, cnt, val);
TRACE("ShArray.OrNumArray: %p,%d,%d:", vAry, cnt, val);
for (i = 0; i < cnt; i++) {
(*vAry) |= val;
@@ -289,7 +289,7 @@ static void XorNumArray(void) { /* 9 */
int val = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.XorNumArray %p,%d,%d:", vAry, cnt, val);
TRACE("ShArray.XorNumArray %p,%d,%d:", vAry, cnt, val);
for (i = 0; i < cnt; i++) {
(*vAry) ^= val;
@@ -313,7 +313,7 @@ static void SetEquArray(void) { /* 10 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.SetEquArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
TRACE("ShArray.SetEquArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
for (i = 0; i < cnt; i++) {
*vResults = (*vAry == val) ? 1 : 0;
@@ -337,7 +337,7 @@ static void SetNotArray(void) { /* 11 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.SetNotArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
TRACE("ShArray.SetNotArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
for (i = 0; i < cnt; i++) {
*vResults = (*vAry != val) ? 1 : 0;
@@ -360,7 +360,7 @@ static void SetLowArray(void) { /* 12 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.SetLowArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
TRACE("ShArray.SetLowArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
for (i = 0; i < cnt; i++) {
(*vResults) = ((*vAry < val) ? 1 : 0);
@@ -383,7 +383,7 @@ static void SetHighArray(void) { /* 13 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.SetHighArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
TRACE("ShArray.SetHighArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
for (i = 0; i < cnt; i++) {
(*vResults) = ((*vAry > val) ? 1 : 0);
@@ -410,7 +410,7 @@ static void SetRangeArray(void) { /* 14 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.SetRangeArray %p,%d,%d,%d,%p:", vAry, cnt, min, max, vResults);
TRACE("ShArray.SetRangeArray %p,%d,%d,%d,%p:", vAry, cnt, min, max, vResults);
for (i = 0; i < cnt; i++) {
*vResults = ((*vAry > min) && (*vAry < max)) ? 1 : 0;
@@ -437,7 +437,7 @@ static void SetAndEquArray(void) { /* 15 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.SetAndEquArray: %p,%d,%d,%d,%p:", vAry, mask, cnt, val, vResults);
TRACE("ShArray.SetAndEquArray: %p,%d,%d,%d,%p:", vAry, mask, cnt, val, vResults);
for (i = 0; i < cnt; i++) {
*vResults = ((*vAry & mask) == val) ? 1 : 0;
@@ -461,7 +461,7 @@ static void AndEquArray(void) { /* 16 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.AndEquArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
TRACE("ShArray.AndEquArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
for (i = 0; i < cnt; i++) {
*vResults &= ((*vAry == val) ? 1 : 0);
@@ -485,7 +485,7 @@ static void AndNotArray(void) { /* 17 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.AndNotArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
TRACE("ShArray.AndNotArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
for (i = 0; i < cnt; i++) {
*vResults &= ((*vAry != val) ? 1 : 0);
@@ -509,7 +509,7 @@ static void AndLowArray(void) { /* 18 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.AndLowArray: %d,%d,%d,%d:", vAry, cnt, min, vResults);
TRACE("ShArray.AndLowArray: %d,%d,%d,%d:", vAry, cnt, min, vResults);
for (i = 0; i < cnt; i++) {
*vResults &= ((*vAry < min) ? 1 : 0);
@@ -533,7 +533,7 @@ static void AndHighArray(void) { /* 19 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.AndHighArray: %p,%d,%d,%p:", vAry, cnt, max, vResults);
TRACE("ShArray.AndHighArray: %p,%d,%d,%p:", vAry, cnt, max, vResults);
for (i = 0; i < cnt; i++) {
*vResults &= ((*vAry > max) ? 1 : 0);
@@ -559,7 +559,7 @@ static void AndRangeArray(void) { /* 20 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.AndRangeArray %d,%d,%d,%d,%d:", vAry, cnt, min, max, vResults);
TRACE("ShArray.AndRangeArray %d,%d,%d,%d,%d:", vAry, cnt, min, max, vResults);
for (i = 0; i < cnt; i++) {
*vResults &= (((*vAry > min) && (*vAry < max)) ? 1 : 0);
@@ -586,7 +586,7 @@ static void AndAndEquArray(void) { /* 21 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.AndAndEquArray: %d,%d,%d,%d,%d:", vAry, mask, cnt, val, vResults);
TRACE("ShArray.AndAndEquArray: %d,%d,%d,%d,%d:", vAry, mask, cnt, val, vResults);
for (i = 0; i < cnt; i++) {
(*vResults) &= (((*vAry & mask) == val) ? 1 : 0);
@@ -600,7 +600,7 @@ static void OrEquArray(void) { /* 22 */
int p3 = getCaliValue();
int p4 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.OrEquArray: %d,%d,%d,%d:", p1, p2, p3, p4);
TRACE_UNIMPLEMENTED("ShArray.OrEquArray: %d,%d,%d,%d:", p1, p2, p3, p4);
}
static void OrNotArray(void) { /* 23 */
@@ -618,7 +618,7 @@ static void OrNotArray(void) { /* 23 */
int *vResults = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.OrNotArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
TRACE("ShArray.OrNotArray %p,%d,%d,%p:", vAry, cnt, val, vResults);
for (i = 0; i < cnt; i++) {
// if (*vAry != val) *vResults = 1;
@@ -633,7 +633,7 @@ static void OrLowArray(void) { /* 24 */
int p3 = getCaliValue();
int p4 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.OrLowArray: %d,%d,%d,%d:", p1, p2, p3, p4);
TRACE_UNIMPLEMENTED("ShArray.OrLowArray: %d,%d,%d,%d:", p1, p2, p3, p4);
}
static void OrHighArray(void) { /* 25 */
@@ -642,7 +642,7 @@ static void OrHighArray(void) { /* 25 */
int p3 = getCaliValue();
int p4 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.OrHighArray: %d,%d,%d,%d:", p1, p2, p3, p4);
TRACE_UNIMPLEMENTED("ShArray.OrHighArray: %d,%d,%d,%d:", p1, p2, p3, p4);
}
static void OrRangeArray(void) { /* 26 */
@@ -652,7 +652,7 @@ static void OrRangeArray(void) { /* 26 */
int p4 = getCaliValue();
int p5 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.OrRangeArray: %d,%d,%d,%d,%d:", p1, p2, p3, p4,p5);
TRACE_UNIMPLEMENTED("ShArray.OrRangeArray: %d,%d,%d,%d,%d:", p1, p2, p3, p4,p5);
}
static void OrAndEquArray(void) { /* 27 */
@@ -662,7 +662,7 @@ static void OrAndEquArray(void) { /* 27 */
int p4 = getCaliValue();
int p5 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.OrAndEquArray: %d,%d,%d,%d,%d:", p1, p2, p3, p4,p5);
TRACE_UNIMPLEMENTED("ShArray.OrAndEquArray: %d,%d,%d,%d,%d:", p1, p2, p3, p4,p5);
}
static void EnumEquArray(void) { /* 28 */
@@ -680,7 +680,7 @@ static void EnumEquArray(void) { /* 28 */
int *vResult = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.EnumEquArray %p,%d,%d,%p:", vAry, cnt, val, vResult);
TRACE("ShArray.EnumEquArray %p,%d,%d,%p:", vAry, cnt, val, vResult);
*vResult = 0;
@@ -698,7 +698,7 @@ static void EnumEquArray2(void) { /* 29 */
int p5 = getCaliValue();
int p6 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.EnumEquArray2: %d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6);
TRACE_UNIMPLEMENTED("ShArray.EnumEquArray2: %d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6);
}
static void EnumEquNotArray2(void) { /* 30 */
@@ -721,7 +721,7 @@ static void EnumEquNotArray2(void) { /* 30 */
int *vResult = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.EnumEquNotArray2 %p,%p,%d,%d,%d,%p:", vAry1, vAry2, cnt, val1, val2, vResult);
TRACE("ShArray.EnumEquNotArray2 %p,%p,%d,%d,%d,%p:", vAry1, vAry2, cnt, val1, val2, vResult);
*vResult = 0;
@@ -748,7 +748,7 @@ static void EnumNotArray(void) { /* 31 */
int *vResult = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.EnumNotArray %p, %d, %d, %p:", vAry, cnt, val, vResult);
TRACE("ShArray.EnumNotArray %p, %d, %d, %p:", vAry, cnt, val, vResult);
*vResult = 0;
@@ -768,7 +768,7 @@ static void EnumNotArray2(void) { /* 32 */
int p5 = getCaliValue();
int p6 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.EnumNotArray2: %d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6);
TRACE_UNIMPLEMENTED("ShArray.EnumNotArray2: %d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6);
}
static void EnumLowArray(void) { /* 33 */
@@ -777,7 +777,7 @@ static void EnumLowArray(void) { /* 33 */
int p3 = getCaliValue();
int p4 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.EnumLowArray: %d,%d,%d,%d:", p1, p2, p3, p4);
TRACE_UNIMPLEMENTED("ShArray.EnumLowArray: %d,%d,%d,%d:", p1, p2, p3, p4);
}
static void EnumHighArray(void) { /* 34 */
@@ -786,7 +786,7 @@ static void EnumHighArray(void) { /* 34 */
int p3 = getCaliValue();
int p4 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.EnumHighArray: %d,%d,%d,%d:", p1, p2, p3, p4);
TRACE_UNIMPLEMENTED("ShArray.EnumHighArray: %d,%d,%d,%d:", p1, p2, p3, p4);
}
static void EnumRangeArray(void) { /* 35 */
@@ -806,7 +806,7 @@ static void EnumRangeArray(void) { /* 35 */
int *vResult = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.EnumRangeArray %d,%d,%d,%d,%d:", vAry, cnt, min, max, vResult);
TRACE("ShArray.EnumRangeArray %d,%d,%d,%d,%d:", vAry, cnt, min, max, vResult);
*vResult = 0;
@@ -837,7 +837,7 @@ static void GrepEquArray(void) { /* 36 */
int *vResult = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.GrepEquArray %p,%d,%d,%p,%p:", vAry, cnt, val, vMatch, vResult);
TRACE("ShArray.GrepEquArray %p,%d,%d,%p,%p:", vAry, cnt, val, vMatch, vResult);
*vResult = 0;
@@ -869,7 +869,7 @@ static void GrepNotArray(void) { /* 37 */
int *vResult = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.GrepNotArray %p,%d,%d,%p,%p:", vAry, cnt, val, vMatch, vResult);
TRACE("ShArray.GrepNotArray %p,%d,%d,%p,%p:", vAry, cnt, val, vMatch, vResult);
*vResult = 0;
@@ -892,7 +892,7 @@ static void GrepEquArray2(void) { /* 38 */
int p6 = getCaliValue();
int p7 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.GrepEquArray2: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7);
TRACE_UNIMPLEMENTED("ShArray.GrepEquArray2: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7);
}
static void GrepNotArray2(void) { /* 39 */
@@ -904,7 +904,7 @@ static void GrepNotArray2(void) { /* 39 */
int p6 = getCaliValue();
int p7 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.GrepNotArray2: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7);
TRACE_UNIMPLEMENTED("ShArray.GrepNotArray2: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7);
}
static void GrepEquNotArray2(void) { /* 40 */
@@ -916,7 +916,7 @@ static void GrepEquNotArray2(void) { /* 40 */
int p6 = getCaliValue();
int p7 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.GrepEquNotArray2: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7);
TRACE_UNIMPLEMENTED("ShArray.GrepEquNotArray2: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6, p7);
}
static void GrepLowArray(void) { /* 41 */
@@ -937,7 +937,7 @@ static void GrepLowArray(void) { /* 41 */
int *vResult = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.GrepLowArray: %p,%d,%d,%p,%p:", vAry, cnt, min, vMatch, vResult);
TRACE("ShArray.GrepLowArray: %p,%d,%d,%p,%p:", vAry, cnt, min, vMatch, vResult);
*vResult = 0;
@@ -969,7 +969,7 @@ static void GrepHighArray(void) { /* 42 */
int *vResult = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.GrepHighArray: %p,%d,%d,%p,%p:", vAry, cnt, max, vMatch, vResult);
TRACE("ShArray.GrepHighArray: %p,%d,%d,%p,%p:", vAry, cnt, max, vMatch, vResult);
*vResult = 0;
@@ -1003,7 +1003,7 @@ static void GrepRangeArray(void) { /* 43 */
int *vResult = getCaliVariable();
int i;
DEBUG_COMMAND("ShArray.GrepRangeArray %p,%d,%d,%d,%p,%p:", vAry, cnt, max, min, vMatch, vResult);
TRACE("ShArray.GrepRangeArray %p,%d,%d,%d,%p,%p:", vAry, cnt, max, min, vMatch, vResult);
*vResult = 0;
@@ -1040,7 +1040,7 @@ static void GrepLowOrderArray(void) { /* 44 */
int *vResult = getCaliVariable();
int i, j, k = 0;
DEBUG_COMMAND("ShArray.GrepLowOrderArray %p,%d,%d,%d,%p,%p,%p:", vAry, cnt, min, max, v1, vLastMatch, vResult);
TRACE("ShArray.GrepLowOrderArray %p,%d,%d,%d,%p,%p,%p:", vAry, cnt, min, max, v1, vLastMatch, vResult);
*vResult = 0;
for (i = 0; i < cnt; i++) {
@@ -1091,7 +1091,7 @@ static void GrepHighOrderArray(void) { /* 45 */
int *vResult = getCaliVariable();
int i, j, k = 0;
DEBUG_COMMAND("ShArray.GrepHighOrderArray %p,%d,%d,%d,%p,%p,%p:", vAry, cnt, min, max, v1, vLastMatch, vResult);
TRACE("ShArray.GrepHighOrderArray %p,%d,%d,%d,%p,%p,%p:", vAry, cnt, min, max, v1, vLastMatch, vResult);
*vResult = 0;
for (i = 0; i < cnt; i++) {
@@ -1125,7 +1125,7 @@ static void ChangeEquArray(void) { /* 46 */
int dst = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.ChangeEquArray: %d,%d,%d,%d:", vAry, cnt, src, dst);
TRACE("ShArray.ChangeEquArray: %d,%d,%d,%d:", vAry, cnt, src, dst);
for (i = 0; i < cnt; i++) {
if (*vAry == src) {
@@ -1141,7 +1141,7 @@ static void ChangeNotArray(void) { /* 47 */
int p3 = getCaliValue();
int p4 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.ChangeNotArray: %d,%d,%d,%d:", p1, p2, p3, p4);
TRACE_UNIMPLEMENTED("ShArray.ChangeNotArray: %d,%d,%d,%d:", p1, p2, p3, p4);
}
static void ChangeLowArray(void) { /* 48 */
@@ -1150,7 +1150,7 @@ static void ChangeLowArray(void) { /* 48 */
int p3 = getCaliValue();
int p4 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.ChangeLowArray: %d,%d,%d,%d:", p1, p2, p3, p4);
TRACE_UNIMPLEMENTED("ShArray.ChangeLowArray: %d,%d,%d,%d:", p1, p2, p3, p4);
}
static void ChangeHighArray(void) { /* 49 */
@@ -1159,7 +1159,7 @@ static void ChangeHighArray(void) { /* 49 */
int p3 = getCaliValue();
int p4 = getCaliValue();
DEBUG_COMMAND_YET("ShArray.ChangeHighArray: %d,%d,%d,%d:", p1, p2, p3, p4);
TRACE_UNIMPLEMENTED("ShArray.ChangeHighArray: %d,%d,%d,%d:", p1, p2, p3, p4);
}
static void ChangeRangeArray(void) { /* 50 */
@@ -1179,7 +1179,7 @@ static void ChangeRangeArray(void) { /* 50 */
int val = getCaliValue();
int i;
DEBUG_COMMAND("ShArray.ChangeRangeArray %p,%d,%d,%d,%d:", vAry, cnt, min, max, val);
TRACE("ShArray.ChangeRangeArray %p,%d,%d,%d,%d:", vAry, cnt, min, max, val);
for (i = 0; i < cnt; i++) {
if ((*vAry > min) && (*vAry < max)) {
@@ -1212,7 +1212,7 @@ static void CopyArrayToRect(void) { /* 51 */
int dh = getCaliValue();
int x, y;
DEBUG_COMMAND("ShArray.CopyArrayToRect %p,%d,%d,%d,%d,%p,%d,%d:", vSrc, sw, sh, sx, sy, vDst, dw, dh);
TRACE("ShArray.CopyArrayToRect %p,%d,%d,%d,%d,%p,%d,%d:", vSrc, sw, sh, sx, sy, vDst, dw, dh);
vSrc += (sy * sw + sx);
for (y = 0; y < dh; y++) {
@@ -1246,7 +1246,7 @@ static void CopyRectToArray(void) { /* 52 */
int dy = getCaliValue();
int x, y;
DEBUG_COMMAND("ShArray.CopyRectToArray %p,%d,%d,%p,%d,%d,%d,%d:", vSrc, sw, sh, vDst, dw, dh, dx, dy);
TRACE("ShArray.CopyRectToArray %p,%d,%d,%p,%d,%d,%d,%d:", vSrc, sw, sh, vDst, dw, dh, dx, dy);
vDst += (dy * dw + dx);
for (y = 0; y < sh; y++) {
@@ -1272,7 +1272,7 @@ static void ChangeSecretArray(void) { /* 53 */
int *vResult = getCaliVariable();
static uint16_t key[4] = { 0x7A7A, 0xADAD, 0xBCBC, 0xCECE }; /* key */
DEBUG_COMMAND("ShArray.ChangeSecretArray %p,%d,%d,%p:", vAry, cnt, type, vResult);
TRACE("ShArray.ChangeSecretArray %p,%d,%d,%p:", vAry, cnt, type, vResult);
*vResult = 0;
+68 -44
View File
@@ -38,9 +38,7 @@
#include "randMT.h"
static int numbase;
static int64_t l_1000A0C8;
static int64_t l_1000A0D0;
static int64_t l_1000A0D8;
static int64_t accumulator;
static int64_t mul64(int64_t a1, int64_t a2) {
return a1 * a2;
@@ -52,6 +50,10 @@ static int64_t div64(int64_t a1, int64_t a2) {
return a1 / a2;
}
static int64_t get32(int *var) {
return var[0] + mul64(var[1], 0x10000);
}
static void SetIntNumBase(void) { /* 0 */
/*
64 bit 演算のための倍数をセット
@@ -62,7 +64,7 @@ static void SetIntNumBase(void) { /* 0 */
numbase = base;
DEBUG_COMMAND("ShCalc.SetIntNumBase %d:", base);
TRACE("ShCalc.SetIntNumBase %d:", base);
}
@@ -74,15 +76,17 @@ static void SetIntNum16(void) { /* 1 */
*/
int *var = getCaliVariable();
l_1000A0D8 = mul64(*var, numbase);
accumulator = mul64(*var, numbase);
DEBUG_COMMAND("ShCalc.SetIntNum16 %p:", var);
TRACE("ShCalc.SetIntNum16 %p:", var);
}
static void SetIntNum32(void) { /* 2 */
int p1 = getCaliValue();
int *var = getCaliVariable();
accumulator = mul64(get32(var), numbase);
DEBUG_COMMAND_YET("ShCalc.SetIntNum32: %d:", p1);
TRACE("ShCalc.SetIntNum32: %p:", var);
}
static void GetIntNum16(void) { /* 3 */
@@ -94,21 +98,26 @@ static void GetIntNum16(void) { /* 3 */
int *var = getCaliVariable();
int64_t i;
i = div64(l_1000A0D8, numbase);
i = div64(accumulator, numbase);
if (i > 65535) {
i = l_1000A0C8 = 65535;
i = 65535;
}
*var = i;
DEBUG_COMMAND("ShCalc.GetIntNum16 %d:", var);
TRACE("ShCalc.GetIntNum16 %d:", var);
}
static void GetIntNum32(void) { /* 4 */
int p1 = getCaliValue();
int *var = getCaliVariable();
int64_t i = div64(accumulator, numbase);
DEBUG_COMMAND_YET("ShCalc.GetIntNum32: %d:", p1);
var[0] = i & 0xFFFF;
i >>= 16;
var[1] = i > 0xFFFF ? 0xFFFF : i;
TRACE("ShCalc.GetIntNum32: %p:", var);
}
static void AddIntNum16(void) { /* 5 */
@@ -119,27 +128,31 @@ static void AddIntNum16(void) { /* 5 */
*/
int *var = getCaliVariable();
l_1000A0D8 += mul64(*var, numbase);
accumulator += mul64(*var, numbase);
DEBUG_COMMAND("ShCalc.AddIntNum16 %p:", var);
TRACE("ShCalc.AddIntNum16 %p:", var);
}
static void AddIntNum32(void) { /* 6 */
int p1 = getCaliValue();
DEBUG_COMMAND_YET("ShCalc.AddIntNum32: %d:", p1);
int *var = getCaliVariable();
accumulator += mul64(get32(var), numbase);
TRACE("ShCalc.AddIntNum32: %p:", var);
}
static void SubIntNum16(void) { /* 7 */
int p1 = getCaliValue();
DEBUG_COMMAND_YET("ShCalc.SubIntNum16: %d:", p1);
TRACE_UNIMPLEMENTED("ShCalc.SubIntNum16: %d:", p1);
}
static void SubIntNum32(void) { /* 8 */
int p1 = getCaliValue();
DEBUG_COMMAND_YET("ShCalc.SubIntNum32: %d:", p1);
int *var = getCaliVariable();
accumulator -= mul64(get32(var), numbase);
TRACE("ShCalc.SubIntNum32: %p:", var);
}
static void MulIntNum16(void) { /* 9 */
@@ -150,15 +163,15 @@ static void MulIntNum16(void) { /* 9 */
*/
int *var = getCaliVariable();
l_1000A0D8 *= mul64(*var, numbase);
accumulator *= mul64(*var, numbase);
DEBUG_COMMAND("ShCalc.MulIntNum16: %p:", var);
TRACE("ShCalc.MulIntNum16: %p:", var);
}
static void MulIntNum32(void) { /* 10 */
int p1 = getCaliValue();
DEBUG_COMMAND_YET("ShCalc.MulIntNum32: %d:", p1);
TRACE_UNIMPLEMENTED("ShCalc.MulIntNum32: %d:", p1);
}
static void DivIntNum16(void) { /* 11 */
@@ -170,18 +183,16 @@ static void DivIntNum16(void) { /* 11 */
int *var = getCaliVariable();
int64_t i;
l_1000A0C8 = *var;
i = mul64(*var, numbase);
accumulator = div64(accumulator, i);
i = mul64(l_1000A0C8, numbase);
l_1000A0D8 = div64(l_1000A0D8, i);
DEBUG_COMMAND("ShCalc.DivIntNum16 %p:", var);
TRACE("ShCalc.DivIntNum16 %p:", var);
}
static void DivIntNum32(void) { /* 12 */
int p1 = getCaliValue();
DEBUG_COMMAND_YET("ShCalc.DivIntNum32: %d:", p1);
TRACE_UNIMPLEMENTED("ShCalc.DivIntNum32: %d:", p1);
}
static void CmpIntNum16(void) { /* 13 */
@@ -189,15 +200,28 @@ static void CmpIntNum16(void) { /* 13 */
int p2 = getCaliValue();
int p3 = getCaliValue();
DEBUG_COMMAND_YET("ShCalc.CmpIntNum16: %d,%d,%d:", p1, p2, p3);
TRACE_UNIMPLEMENTED("ShCalc.CmpIntNum16: %d,%d,%d:", p1, p2, p3);
}
static void CmpIntNum32(void) { /* 14 */
int p1 = getCaliValue();
int p2 = getCaliValue();
int p3 = getCaliValue();
int *var = getCaliVariable();
int op = getCaliValue();
int *result = getCaliVariable();
DEBUG_COMMAND_YET("ShCalc.CmpIntNum32: %d,%d,%d:", p1, p2, p3);
int64_t val = mul64(get32(var), numbase);
switch (op) {
case 1: *result = val == accumulator; break;
case 2: *result = val > accumulator; break;
case 3: *result = val < accumulator; break;
case 4: *result = val >= accumulator; break;
case 5: *result = val <= accumulator; break;
default:
WARNING("ShCalc.CmpIntNum32: unknown operator %d", op);
break;
}
TRACE("ShCalc.CmpIntNum32: %p,%d,%p:", var, op, result);
}
static void GetLengthNum16(void) { /* 15 */
@@ -221,14 +245,14 @@ static void GetLengthNum16(void) { /* 15 */
*vResult = 1;
}
DEBUG_COMMAND("ShCalc.GetLengthNum16 %p,%p:", var, vResult);
TRACE("ShCalc.GetLengthNum16 %p,%p:", var, vResult);
}
static void GetLengthNum32(void) { /* 16 */
int p1 = getCaliValue();
int p2 = getCaliValue();
DEBUG_COMMAND_YET("ShCalc.GetLengthNum32: %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("ShCalc.GetLengthNum32: %d,%d:", p1, p2);
}
static void NumToRate(void) { /* 17 */
@@ -259,7 +283,7 @@ static void NumToRate(void) { /* 17 */
*vResult = i;
DEBUG_COMMAND("ShCalc.NumToRate %d,%d,%d,%d,%p:", p1, p2, p3, flag, vResult);
TRACE("ShCalc.NumToRate %d,%d,%d,%d,%p:", p1, p2, p3, flag, vResult);
}
@@ -291,7 +315,7 @@ static void NumToRateNum(void) { /* 18 */
*vResult = i;
DEBUG_COMMAND("ShCalc.NumToRateNum %d,%d,%d,%d,%p:", p1, p2, p3, flag, vResult);
TRACE("ShCalc.NumToRateNum %d,%d,%d,%d,%p:", p1, p2, p3, flag, vResult);
}
static void SetRandomSeed() {
@@ -304,7 +328,7 @@ static void SetRandomSeed() {
sgenrand(seed);
DEBUG_COMMAND("ShCalc.SetRandomSeed %d:", seed);
TRACE("ShCalc.SetRandomSeed %d:", seed);
}
static void GetRandomNumA() {
@@ -317,7 +341,7 @@ static void GetRandomNumA() {
*var = (int)(genrand() * num) + 1;
}
DEBUG_COMMAND("ShCalc.GetRandomNumA %d,%p:", num, var);
TRACE("ShCalc.GetRandomNumA %d,%p:", num, var);
}
static void NumToBit() {
@@ -339,7 +363,7 @@ static void NumToBit() {
*var = 0;
}
DEBUG_COMMAND("ShCalc.NumToBit %d,%p:", beki, var);
TRACE("ShCalc.NumToBit %d,%p:", beki, var);
}
static void BitToNum() {
@@ -358,7 +382,7 @@ static void BitToNum() {
int *var = getCaliVariable();
int i;
DEBUG_COMMAND("ShCalc.BitToNum %d,%p:", val, var);
TRACE("ShCalc.BitToNum %d,%p:", val, var);
if (val == 0) {
*var = 0;
+12 -12
View File
@@ -96,13 +96,13 @@ static void Init() {
*/
int p1 = getCaliValue(); /* ISurface */
DEBUG_COMMAND("ShGraph.Init %d:", p1);
TRACE("ShGraph.Init %d:", p1);
}
static void GetSurfaceData() {
int p1 = getCaliValue(); /* ISurface */
DEBUG_COMMAND_YET("ShGraph.GetSurfaceData %d:", p1);
TRACE_UNIMPLEMENTED("ShGraph.GetSurfaceData %d:", p1);
}
static void ChangeEquColor() {
@@ -114,7 +114,7 @@ static void ChangeEquColor() {
int *p6 = getCaliVariable();
int p7 = getCaliValue(); /* ISurface */
DEBUG_COMMAND_YET("ShGraph.ChangeEquColor %d,%d,%d,%d,%p,%p,%d:", p1, p2, p3, p4, p5, p6, p7);
TRACE_UNIMPLEMENTED("ShGraph.ChangeEquColor %d,%d,%d,%d,%p,%p,%d:", p1, p2, p3, p4, p5, p6, p7);
}
static void ChangeNotColor() {
@@ -139,7 +139,7 @@ static void ChangeNotColor() {
int x, y;
uint8_t *dp;
DEBUG_COMMAND("ShGraph.ChangeNotColor %d,%d,%d,%d,%p,%p,%d:", x0, y0, width, height, src, dst, p7);
TRACE("ShGraph.ChangeNotColor %d,%d,%d,%d,%p,%p,%d:", x0, y0, width, height, src, dst, p7);
ags_check_param(&x0, &y0, &width, &height);
@@ -222,7 +222,7 @@ static void ResetAnimeData() {
*/
int no = getCaliValue();
DEBUG_COMMAND("ShGraph.ResetAnimeData %d:", no);
TRACE("ShGraph.ResetAnimeData %d:", no);
if (no > 0 && no <= SLOT) {
memset(&src[no-1], 0, sizeof(struct animsrc));
@@ -262,7 +262,7 @@ static void SetAnimeSrc() {
int *pal = getCaliVariable();
int r, g, b;
DEBUG_COMMAND("ShGraph.SetAnimeSrc %d,%d,%d,%d,%d,%d,%d,%p:", no, x0, y0, w, h, uw, uh, pal);
TRACE("ShGraph.SetAnimeSrc %d,%d,%d,%d,%d,%d,%d,%p:", no, x0, y0, w, h, uw, uh, pal);
if (no <= 0 || no > SLOT) return;
@@ -302,7 +302,7 @@ static void SetAnimeDst() {
int p5 = getCaliValue();
int p6 = getCaliValue();
DEBUG_COMMAND("ShGraph.SetAnimeDst %d,%p,%p,%d,%d,%d,%d:", no, p1, p2, p3, p4, p5, p6);
TRACE("ShGraph.SetAnimeDst %d,%p,%p,%d,%d,%d,%d:", no, p1, p2, p3, p4, p5, p6);
if (no <= 0 || no > SLOT) return;
@@ -336,7 +336,7 @@ static void AddAnimeData() {
int p6 = getCaliValue();
int i;
DEBUG_COMMAND("ShGraph.AddAnimeData %d,%d,%d,%d,%p,%d:", no, p2, p3, p4, p5, p6);
TRACE("ShGraph.AddAnimeData %d,%d,%d,%d,%p,%d:", no, p2, p3, p4, p5, p6);
if (no <= 0 || no > SLOT) return;
@@ -370,7 +370,7 @@ static void AddAnimeRemain() {
int no = getCaliValue();
int i, _max = 0;
DEBUG_COMMAND("ShGraph.AddAnimeRemain %d:", no);
TRACE("ShGraph.AddAnimeRemain %d:", no);
if (no <= 0 || no > SLOT) return;
@@ -401,7 +401,7 @@ static void SetAnimeRect() {
int w = getCaliValue();
int h = getCaliValue();
DEBUG_COMMAND("ShGraph.SetAnimeRect %d,%d,%d,%d:", x, y, w, h);
TRACE("ShGraph.SetAnimeRect %d,%d,%d,%d:", x, y, w, h);
maprect.x = x;
maprect.y = y;
@@ -427,7 +427,7 @@ static void SetAnimeBack() {
int p5 = getCaliValue();
int p6 = getCaliValue();
DEBUG_COMMAND("ShGraph.SetAnimeBack %d,%d,%d,%d,%d,%d:", sx, sy, w, h, p5, p6);
TRACE("ShGraph.SetAnimeBack %d,%d,%d,%d,%d,%d:", sx, sy, w, h, p5, p6);
mapback.x = sx;
mapback.y = sy;
@@ -455,7 +455,7 @@ static void PlayAnimeData() {
boolean is_backcopied;
agsurface_t *dib;
DEBUG_COMMAND("ShGraph.PlayAnimeData %d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6);
TRACE("ShGraph.PlayAnimeData %d,%d,%d,%d,%d,%d:", p1, p2, p3, p4, p5, p6);
interval = p2 * 10;
+10 -11
View File
@@ -36,7 +36,6 @@
#include "xsystem35.h"
#include "modules.h"
#include "sdl_core.h"
#include "sdl_private.h"
#include "input.h"
#include "menu.h"
@@ -55,12 +54,12 @@ static void OutputMessageBox(void) { /* 0 */
char *title_utf8 = toUTF8(svar_get(title));
char *msg_utf8 = toUTF8(svar_get(msg));
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, title_utf8, msg_utf8, sdl_window);
sdl_showMessageBox(MESSAGEBOX_INFO, title_utf8, msg_utf8);
free(title_utf8);
free(msg_utf8);
DEBUG_COMMAND("ShPort.OutputMessageBox: %d,%d,%d,%d,%p,%d:", p1, p2, title, msg, res, ISys3xSystem);
TRACE("ShPort.OutputMessageBox: %d,%d,%d,%d,%p,%d:", p1, p2, title, msg, res, ISys3xSystem);
}
static void InputListNum(void) { /* 1 */
@@ -88,7 +87,7 @@ static void InputListNum(void) { /* 1 */
}
free(ni_param.title);
DEBUG_COMMAND("ShPort.InputListNum: %d,%d,%p,%d,%d,%p,%d:", flags, title, val, minval, maxval, res, ISys3xSystem);
TRACE("ShPort.InputListNum: %d,%d,%p,%d,%d,%p,%d:", flags, title, val, minval, maxval, res, ISys3xSystem);
}
/**
@@ -99,7 +98,7 @@ static void InputListNum(void) { /* 1 */
static void Init(void) {
int p1 = getCaliValue();
DEBUG_COMMAND_YET("ShPort.Init: %d:", p1);
TRACE_UNIMPLEMENTED("ShPort.Init: %d:", p1);
}
/**
@@ -121,7 +120,7 @@ static void InitKeyStatus(void) {
memset(keymap[no -1], 0, 256);
}
DEBUG_COMMAND("ShPort.InitKeyStatus: %d:", no);
TRACE("ShPort.InitKeyStatus: %d:", no);
}
/**
@@ -143,7 +142,7 @@ static void SetKeyStatus(void) {
keymap[no -1][key] = func;
DEBUG_COMMAND("ShPort.SetKeyStatus: %d,%d,%d:", no, key, func);
TRACE("ShPort.SetKeyStatus: %d,%d,%d:", no, key, func);
}
/**
@@ -167,7 +166,7 @@ static void GetKeyStatus(void) {
*var |= (keymap[no -1][i] * RawKeyInfo[i]);
}
DEBUG_COMMAND("ShPort.GetKeyStatus: %d,%p:", no, var);
TRACE("ShPort.GetKeyStatus: %d,%p:", no, var);
}
static void InputListString(void) {
@@ -179,7 +178,7 @@ static void InputListString(void) {
int p6 = getCaliValue();
int p7 = getCaliValue();
DEBUG_COMMAND_YET("ShPort.InputListString: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p3, p4, p5, p6, p7);
TRACE_UNIMPLEMENTED("ShPort.InputListString: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p3, p4, p5, p6, p7);
}
static void InputOpenFile(void) {
@@ -191,7 +190,7 @@ static void InputOpenFile(void) {
int p6 = getCaliValue();
int p7 = getCaliValue();
DEBUG_COMMAND_YET("ShPort.InputOpenFile: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p3, p4, p5, p6, p7);
TRACE_UNIMPLEMENTED("ShPort.InputOpenFile: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p3, p4, p5, p6, p7);
}
static void InputSaveFile(void) {
@@ -203,7 +202,7 @@ static void InputSaveFile(void) {
int p6 = getCaliValue();
int p7 = getCaliValue();
DEBUG_COMMAND_YET("ShPort.InputSaveFile: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p3, p4, p5, p6, p7);
TRACE_UNIMPLEMENTED("ShPort.InputSaveFile: %d,%d,%d,%d,%d,%d,%d:", p1, p2, p3, p3, p4, p5, p6, p7);
}
static const ModuleFunc functions[] = {
+16 -16
View File
@@ -54,7 +54,7 @@ static void Init() {
*/
int p1 = getCaliValue(); /* ISys3x */
DEBUG_COMMAND("ShSound.Init %d:", p1);
TRACE("ShSound.Init %d:", p1);
}
static void wavLoad() {
@@ -67,7 +67,7 @@ static void wavLoad() {
int slot = getCaliValue();
int no = getCaliValue();
DEBUG_COMMAND("ShSound.wavLoad %d,%d:", slot, no);
TRACE("ShSound.wavLoad %d,%d:", slot, no);
mus_wav_load(slot, no);
}
@@ -82,7 +82,7 @@ static void wavUnload() {
mus_wav_unload(slot);
DEBUG_COMMAND("ShSound.wavUnload %d:",slot);
TRACE("ShSound.wavUnload %d:",slot);
}
static void wavUnloadRange() {
@@ -100,7 +100,7 @@ static void wavUnloadRange() {
mus_wav_unload(i);
}
DEBUG_COMMAND("ShSound.wavUnloadRange %d,%d:", slot, range);
TRACE("ShSound.wavUnloadRange %d,%d:", slot, range);
}
static void wavUnloadAll() {
@@ -113,7 +113,7 @@ static void wavUnloadAll() {
mus_wav_unload(i);
}
DEBUG_COMMAND("ShSound.wavUnloadAll:");
TRACE("ShSound.wavUnloadAll:");
}
static void wavLoadMemory() {
@@ -142,7 +142,7 @@ static void wavLoadMemory() {
return;
}
DEBUG_COMMAND("ShSound.wavLoadMemory %d:", no);
TRACE("ShSound.wavLoadMemory %d:", no);
}
static void wavSendMemory() {
@@ -186,7 +186,7 @@ static void wavSendMemory() {
free_memory_wav();
free(wav_buf);
DEBUG_COMMAND("ShSound.wavSendMemory %d:", slot);
TRACE("ShSound.wavSendMemory %d:", slot);
}
static void wavFadeVolumeMemory() {
@@ -220,7 +220,7 @@ static void wavFadeVolumeMemory() {
// 残りは無音
memset(buf, 0, memwav.buf + memwav.len - (uint8_t*)buf);
DEBUG_COMMAND("ShSound.wavFadeVolumeMemory %d,%d:", start, range);
TRACE("ShSound.wavFadeVolumeMemory %d,%d:", start, range);
}
static void wavReversePanMemory() {
@@ -240,7 +240,7 @@ static void wavReversePanMemory() {
buf += 2;
}
DEBUG_COMMAND("ShSound.wavReversePanMemory:");
TRACE("ShSound.wavReversePanMemory:");
}
static void wavPlay() {
@@ -255,7 +255,7 @@ static void wavPlay() {
mus_wav_play(slot, loop == 0 ? 1 : -1);
DEBUG_COMMAND("ShSound.wavPlay %d, %d:", slot, loop);
TRACE("ShSound.wavPlay %d, %d:", slot, loop);
}
static void wavPlayRing() {
@@ -273,7 +273,7 @@ static void wavPlayRing() {
mus_wav_play(start + (*cur % cnt), 1);
*cur = (*cur + 1) % cnt;
DEBUG_COMMAND("ShSound.wavPlayRing %d,%d,%d:", start, cnt, *cur);
TRACE("ShSound.wavPlayRing %d,%d,%d:", start, cnt, *cur);
}
static void wavStop() {
@@ -284,7 +284,7 @@ static void wavStop() {
*/
int slot = getCaliValue();
DEBUG_COMMAND("ShSound.wavStop %d:", slot);
TRACE("ShSound.wavStop %d:", slot);
mus_wav_stop(slot);
}
@@ -299,7 +299,7 @@ static void wavStopAll() {
mus_wav_stop(i);
}
DEBUG_COMMAND("ShSound.wavStopAll:");
TRACE("ShSound.wavStopAll:");
}
static void wavPause() {
@@ -310,7 +310,7 @@ static void wavPause() {
*/
int slot = getCaliValue();
DEBUG_COMMAND_YET("ShSound.wavPause %d:", slot);
TRACE_UNIMPLEMENTED("ShSound.wavPause %d:", slot);
}
static void wavIsPlay() {
@@ -325,7 +325,7 @@ static void wavIsPlay() {
*result = mus_wav_get_playposition(slot);
DEBUG_COMMAND("ShSound.wavIsPlay %d,%p:", slot, result);
TRACE("ShSound.wavIsPlay %d,%p:", slot, result);
}
static void wavIsPlayRange() {
@@ -347,7 +347,7 @@ static void wavIsPlayRange() {
*result = ret;
DEBUG_COMMAND("ShSound.wavIsPlayRange %d,%d,%p:", slot, range, result);
TRACE("ShSound.wavIsPlayRange %d,%d,%p:", slot, range, result);
}
static const ModuleFunc functions[] = {
+10 -10
View File
@@ -46,35 +46,35 @@ static void ExchangeString(void) {
int pat = getCaliValue();
int patr = getCaliValue();
svar_replaceAll(target, pat, patr);
DEBUG_COMMAND("ShString.ExchangeString: %d,%d,%d:", target, pat, patr);
TRACE("ShString.ExchangeString: %d,%d,%d:", target, pat, patr);
}
static void SetNum16String(void) { /* 1 */
int p1 = getCaliValue();
int p2 = getCaliValue();
DEBUG_COMMAND_YET("ShString.SetNum16String: %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("ShString.SetNum16String: %d,%d:", p1, p2);
}
static void SetNum16HalfString(void) { /* 2 */
int p1 = getCaliValue();
int p2 = getCaliValue();
DEBUG_COMMAND_YET("ShString.SetNum16HalfString: %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("ShString.SetNum16HalfString: %d,%d:", p1, p2);
}
static void SetNum32String(void) { /* 3 */
int p1 = getCaliValue();
int p2 = getCaliValue();
DEBUG_COMMAND_YET("ShString.SetNum32String: %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("ShString.SetNum32String: %d,%d:", p1, p2);
}
static void SetNum32HalfString(void) { /* 4 */
int p1 = getCaliValue();
int p2 = getCaliValue();
DEBUG_COMMAND_YET("ShString.SetNum32HalfString: %d,%d:", p1, p2);
TRACE_UNIMPLEMENTED("ShString.SetNum32HalfString: %d,%d:", p1, p2);
}
static void GetArrayString(void) { /* 5 */
@@ -82,7 +82,7 @@ static void GetArrayString(void) { /* 5 */
int p2 = getCaliValue();
int p3 = getCaliValue();
DEBUG_COMMAND_YET("ShString.GetArrayString: %d,%d,%d:", p1, p2, p3);
TRACE_UNIMPLEMENTED("ShString.GetArrayString: %d,%d,%d:", p1, p2, p3);
}
static void SetWindowTitle(void) { /* 6 */
@@ -93,7 +93,7 @@ static void SetWindowTitle(void) { /* 6 */
ags_setWindowTitle(title_utf8);
free(title_utf8);
DEBUG_COMMAND("ShString.SetWindowTitle: %d,%d:", strno, p2);
TRACE("ShString.SetWindowTitle: %d,%d:", strno, p2);
}
static void FillString() {
@@ -115,7 +115,7 @@ static void FillString() {
svar_set(st + i, svar_get(src));
}
DEBUG_COMMAND("ShString.FillString: %d,%d,%d,%d:", st, cnt, src, p4);
TRACE("ShString.FillString: %d,%d,%d,%d:", st, cnt, src, p4);
}
static void SetStringNum16(void) {
@@ -132,7 +132,7 @@ static void SetStringNum16(void) {
char _dst[100];
char *dst = _dst;
DEBUG_COMMAND("ShString.SetStringNum16: %d,%p:", st, var);
TRACE("ShString.SetStringNum16: %d,%p:", st, var);
while(*str) {
@@ -162,7 +162,7 @@ static void SetStringNum32(void) {
int p1 = getCaliValue();
int *p2 = getCaliVariable();
DEBUG_COMMAND_YET("ShString.SetStringNum32: %d,%p:", p1, p2);
TRACE_UNIMPLEMENTED("ShString.SetStringNum32: %d,%p:", p1, p2);
}
static const ModuleFunc functions[] = {
+4 -4
View File
@@ -29,24 +29,24 @@ static void Init() {
dd.alk = alk_new("/home/masaki-c/game/daiakuji/dDemo.alk");
#endif
DEBUG_COMMAND_YET("dDemo.Init %d,%d,%d,%p:", p1, p2, p3, var);
TRACE_UNIMPLEMENTED("dDemo.Init %d,%d,%d,%p:", p1, p2, p3, var);
}
static void SetKeyCancelFlag() {
int cancelflag = getCaliValue();
DEBUG_COMMAND_YET("dDemo.SetKeyCancelFlag %d:", cancelflag);
TRACE_UNIMPLEMENTED("dDemo.SetKeyCancelFlag %d:", cancelflag);
}
static void SetLoopFlag() {
/* Loop Flag */
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
DEBUG_COMMAND_YET("dDemo.SetLoopFlag %d:", loopflag);
TRACE_UNIMPLEMENTED("dDemo.SetLoopFlag %d:", loopflag);
}
static void Run() {
DEBUG_COMMAND_YET("dDemo.Run:");
TRACE_UNIMPLEMENTED("dDemo.Run:");
#ifdef DDEMODEV
muscd_start(13, 1);
+5 -5
View File
@@ -17,31 +17,31 @@ static void Init() {
*var = 1;
DEBUG_COMMAND_YET("eDEMO.Init %d,%d,%d,%p:", p1, p2, p3, var);
TRACE_UNIMPLEMENTED("eDEMO.Init %d,%d,%d,%p:", p1, p2, p3, var);
}
static void SetKeyCancelFlag() {
int cancelflag = getCaliValue();
DEBUG_COMMAND_YET("eDEMO.SetKeyCancelFlag %d:", cancelflag);
TRACE_UNIMPLEMENTED("eDEMO.SetKeyCancelFlag %d:", cancelflag);
}
static void SetLoopFlag() {
/* Loop Flag */
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
DEBUG_COMMAND_YET("eDEMO.SetLoopFlag %d:", loopflag);
TRACE_UNIMPLEMENTED("eDEMO.SetLoopFlag %d:", loopflag);
}
static void SetDrawStaffFlag() {
/* Loop Flag */
int staffflag = getCaliValue();
DEBUG_COMMAND_YET("eDEMO.SetDrawStaffFlag %d:", staffflag);
TRACE_UNIMPLEMENTED("eDEMO.SetDrawStaffFlag %d:", staffflag);
}
static void Run() {
DEBUG_COMMAND_YET("eDEMO.Run:");
TRACE_UNIMPLEMENTED("eDEMO.Run:");
}
static const ModuleFunc functions[] = {
+4 -4
View File
@@ -17,26 +17,26 @@ static void Init() {
*var = 1;
DEBUG_COMMAND_YET("eeDEMO.Init %d,%d,%d,%p:", p1, p2, p3, var);
TRACE_UNIMPLEMENTED("eeDEMO.Init %d,%d,%d,%p:", p1, p2, p3, var);
}
static void SetKeyCancelFlag() {
int cancelflag = getCaliValue();
DEBUG_COMMAND_YET("eeDEMO.SetKeyCancelFlag %d:", cancelflag);
TRACE_UNIMPLEMENTED("eeDEMO.SetKeyCancelFlag %d:", cancelflag);
}
static void SetLoopFlag() {
/* Loop Flag */
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
DEBUG_COMMAND_YET("eeDEMO.SetLoopFlag %d:", loopflag);
TRACE_UNIMPLEMENTED("eeDEMO.SetLoopFlag %d:", loopflag);
}
static void Run() {
int p1 = getCaliValue();
DEBUG_COMMAND_YET("eeDEMO.Run %d:", p1);
TRACE_UNIMPLEMENTED("eeDEMO.Run %d:", p1);
}
static const ModuleFunc functions[] = {
+4 -4
View File
@@ -179,8 +179,8 @@ void gr_init() {
void gr_blend(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, int width, int height, int lv) {
if (!gr_clip(src, &sx, &sy, &width, &height, dst, &dx, &dy)) return;
gre_Blend(dst, dx, dy, dst, dx, dy, src, sx, sy, width, height, lv);
}
void gr_blend_src_bright(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, int width, int height, int alpha, int rate) {
@@ -284,7 +284,7 @@ void gr_copy_stretch_blend_alpha_map(surface_t *dst, int dx, int dy, int dw, int
for (x = 0; x < dw; x++) {
*(yld + x) = ALPHABLEND16(*(yls+ *(row + x)), *(yld+x), *(yla+*(row+x)));
}
while(*(col + y) == *(col + y + 1)) {
while (y < dh - 1 && *(col + y) == *(col + y + 1)) {
yld += dst->width;
for (x = 0; x < dw; x++) {
*(yld + x) = ALPHABLEND16(*(yls+ *(row+x)), *(yld+x), *(yla+*(row+x)));
@@ -307,7 +307,7 @@ void gr_copy_stretch_blend_alpha_map(surface_t *dst, int dx, int dy, int dw, int
for (x = 0; x < dw; x++) {
*(yld + x) = ALPHABLEND24(*(yls+ *(row + x)), *(yld+x), *(yla+*(row+x)));
}
while(*(col + y) == *(col + y + 1)) {
while (y < dh - 1 && *(col + y) == *(col + y + 1)) {
yld += dst->width;
for (x = 0; x < dw; x++) {
*(yld + x) = ALPHABLEND24(*(yls+ *(row+x)), *(yld+x), *(yla+*(row+x)));
+1
View File
@@ -6,6 +6,7 @@
extern void gr_init();
extern void gr_blend(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, int width, int height, int lv);
extern void gr_copy_stretch_blend_alpha_map(surface_t *dst, int dx, int dy, int dw, int dh, surface_t *src, int sx, int sy, int sw, int sh);
extern void gr_fill_alpha_overborder(surface_t *dst, int dx, int dy, int dw, int dh, int s, int d);
extern void gr_fill_alpha_underborder(surface_t *dst, int dx, int dy, int dw, int dh, int s, int d);
+2 -2
View File
@@ -50,7 +50,7 @@ void gr_copy_stretch(surface_t *dst, int dx, int dy, int dw, int dh, surface_t *
*(yld + x) = *(yls + *(row + x));
}
_yld = (uint8_t *)yld;
while(*(col + y) == *(col + y + 1)) {
while (y < dh - 1 && *(col + y) == *(col + y + 1)) {
_yls = _yld;
_yld += dst->bytes_per_line;
memcpy(_yld, _yls, dw * 2);
@@ -72,7 +72,7 @@ void gr_copy_stretch(surface_t *dst, int dx, int dy, int dw, int dh, surface_t *
*(yld + x) = *(yls+ *(row + x));
}
_yld = (uint8_t *)yld;
while(*(col + y) == *(col + y + 1)) {
while (y < dh - 1 && *(col + y) == *(col + y + 1)) {
_yls = _yld;
_yld += dst->bytes_per_line;
memcpy(_yld, _yls, dw * 4);
+1
View File
@@ -35,6 +35,7 @@ static const Module *modules[] = {
&module_NIGHTDLL,
&module_NightDemonDemo,
&module_RandMT,
&module_S3xMusic,
&module_SACT,
&module_ShArray,
&module_ShCalc,
+1
View File
@@ -42,6 +42,7 @@ extern const Module module_MsgSkip;
extern const Module module_NIGHTDLL;
extern const Module module_NightDemonDemo;
extern const Module module_RandMT;
extern const Module module_S3xMusic;
extern const Module module_SACT;
extern const Module module_ShArray;
extern const Module module_ShCalc;
+4 -4
View File
@@ -16,23 +16,23 @@ static void Init() {
*var = 0;
DEBUG_COMMAND_YET("nDEMO.Init %p:", var);
TRACE_UNIMPLEMENTED("nDEMO.Init %p:", var);
}
static void SetKeyCancelFlag() {
int p1 = getCaliValue();
DEBUG_COMMAND_YET("nDEMO.SetKeyCancelFlag %d:", p1);
TRACE_UNIMPLEMENTED("nDEMO.SetKeyCancelFlag %d:", p1);
}
static void SetLoopFlag() {
int p1 = getCaliValue();
DEBUG_COMMAND_YET("nDEMO.SetLoopFlag %d:", p1);
TRACE_UNIMPLEMENTED("nDEMO.SetLoopFlag %d:", p1);
}
static void Run() {
DEBUG_COMMAND_YET("nDEMO.Run:");
TRACE_UNIMPLEMENTED("nDEMO.Run:");
}
static const ModuleFunc functions[] = {
+3 -3
View File
@@ -14,17 +14,17 @@ static void Init() {
int p3 = getCaliValue();
int *var = getCaliVariable();
DEBUG_COMMAND_YET("nDEMOE.Init %p:", var);
TRACE_UNIMPLEMENTED("nDEMOE.Init %p:", var);
}
static void SetKeyCancelFlag() {
int p1 = getCaliValue();
DEBUG_COMMAND_YET("nDEMOE.SetKeyCancelFlag %d:", p1);
TRACE_UNIMPLEMENTED("nDEMOE.SetKeyCancelFlag %d:", p1);
}
static void Run() {
DEBUG_COMMAND_YET("nDEMOE.Run:");
TRACE_UNIMPLEMENTED("nDEMOE.Run:");
}
static const ModuleFunc functions[] = {
+4 -4
View File
@@ -17,24 +17,24 @@ static void Init() {
*var = 1;
DEBUG_COMMAND_YET("oDEMO.Init %d,%d,%d,%p:", p1, p2, p3, var);
TRACE_UNIMPLEMENTED("oDEMO.Init %d,%d,%d,%p:", p1, p2, p3, var);
}
static void SetKeyCancelFlag() {
int cancelflag = getCaliValue();
DEBUG_COMMAND_YET("oDEMO.SetKeyCancelFlag %d:", cancelflag);
TRACE_UNIMPLEMENTED("oDEMO.SetKeyCancelFlag %d:", cancelflag);
}
static void SetLoopFlag() {
/* Loop Flag */
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
DEBUG_COMMAND_YET("oDEMO.SetLoopFlag %d:", loopflag);
TRACE_UNIMPLEMENTED("oDEMO.SetLoopFlag %d:", loopflag);
}
static void Run() {
DEBUG_COMMAND_YET("oDEMO.Run:");
TRACE_UNIMPLEMENTED("oDEMO.Run:");
}
static const ModuleFunc functions[] = {
+12 -12
View File
@@ -54,7 +54,7 @@ static void MakeMapSetParam() {
window_height = p3;
map_width = p4;
DEBUG_COMMAND("oujimisc.MakeMapSetParam %d,%d,%d,%d:", p1,p2,p3,p4);
TRACE("oujimisc.MakeMapSetParam %d,%d,%d,%d:", p1,p2,p3,p4);
}
static void MakeMapSetChipParam() {
@@ -74,7 +74,7 @@ static void MakeMapSetChipParam() {
r->w = p3;
r->h = p4;
DEBUG_COMMAND("oujimisc.MakeMapSeChipParam %d,%d,%d,%d,%d:", p1,p2,p3,p4,p5);
TRACE("oujimisc.MakeMapSeChipParam %d,%d,%d,%d,%d:", p1,p2,p3,p4,p5);
}
static void MakeMapDraw() {
@@ -106,13 +106,13 @@ static void MakeMapDraw() {
}
}
DEBUG_COMMAND("oujimisc.MakeMapDraw %d,%d,%d,%d,%d,%p,%p,%p:", p1,dstX,dstY,posX,posY,a1,a2,a3);
TRACE("oujimisc.MakeMapDraw %d,%d,%d,%d,%d,%p,%p,%p:", p1,dstX,dstY,posX,posY,a1,a2,a3);
}
static void MakeMapInit() {
int p1 = getCaliValue(); /* ISys3x */
DEBUG_COMMAND_YET("oujimisc.MakeMapInit %d:", p1);
TRACE_UNIMPLEMENTED("oujimisc.MakeMapInit %d:", p1);
}
static void DrawNumber() {
@@ -137,7 +137,7 @@ static void DrawNumber() {
dstX += width;
}
DEBUG_COMMAND("oujimisc.DrawNumber %d,%d,%d,%d,%d,%d,%d,%d:", p1,srcX,srcY,width,height,dstX,dstY,num);
TRACE("oujimisc.DrawNumber %d,%d,%d,%d,%d,%d,%d,%d:", p1,srcX,srcY,width,height,dstX,dstY,num);
}
static void TempMapCreateShadow() {
@@ -153,14 +153,14 @@ static void TempMapCreateShadow() {
ald_freedata(dfile);
}
DEBUG_COMMAND("oujimisc.TempMapCreateShadow:");
TRACE("oujimisc.TempMapCreateShadow:");
}
static void TempMapInit() {
int p1 = getCaliValue(); /* ISys3x */
int p2 = getCaliValue();
DEBUG_COMMAND_YET("oujimisc.TempMapInit %d,%d:", p1,p2);
TRACE_UNIMPLEMENTED("oujimisc.TempMapInit %d,%d:", p1,p2);
}
static void TempMapLoadToShadow() {
@@ -189,7 +189,7 @@ static void TempMapLoadToShadow() {
for (int i = 0; i < size; i++)
*a3++ = SDL_SwapLE16(*p++);
DEBUG_COMMAND("oujimisc.TempMapLoadToShadow %d,%p,%p,%p,%d:", map,a1,a2,a3,size);
TRACE("oujimisc.TempMapLoadToShadow %d,%p,%p,%p,%d:", map,a1,a2,a3,size);
}
static void TempMapSaveToShadow() {
@@ -218,7 +218,7 @@ static void TempMapSaveToShadow() {
for (int i = 0; i < size; i++)
*p++ = SDL_SwapLE16(*a3++);
DEBUG_COMMAND("oujimisc.TempMapSaveToShadow %d,%p,%p,%p,%d:", map,a1,a2,a3,size);
TRACE("oujimisc.TempMapSaveToShadow %d,%p,%p,%p,%d:", map,a1,a2,a3,size);
}
static void TempMapFileSave() {
@@ -250,7 +250,7 @@ static void TempMapFileSave() {
}
fclose(fp);
DEBUG_COMMAND("oujimisc.TempMapFileSave %d:", p1);
TRACE("oujimisc.TempMapFileSave %d:", p1);
}
static void TempMapFileLoad() {
@@ -292,7 +292,7 @@ static void TempMapFileLoad() {
}
fclose(fp);
DEBUG_COMMAND("oujimisc.TempMapFileLoad %d:", p1);
TRACE("oujimisc.TempMapFileLoad %d:", p1);
}
static void CalcMoveDiffer() {
@@ -322,7 +322,7 @@ static void CalcMoveDiffer() {
*pt = t >= duration ? 1 : 0;
DEBUG_COMMAND("oujimisc.CalcMoveDiffer %p,%p,%d,%d,%d,%d,%p,%d:", dx,dy,moveL,moveU,moveR,moveD,pt,duration);
TRACE("oujimisc.CalcMoveDiffer %p,%p,%d,%d,%d,%d,%p,%d:", dx,dy,moveL,moveU,moveR,moveD,pt,duration);
}
static const ModuleFunc functions[] = {
+74 -4
View File
@@ -1,3 +1,23 @@
/*
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
* 1998- <masaki-c@is.aist-nara.ac.jp>
* 2024 kichikuou <KichikuouChrome@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "config.h"
#include <stdio.h>
@@ -7,6 +27,16 @@
#include "xsystem35.h"
#include "modules.h"
#include "nact.h"
#include "alk.h"
#include "input.h"
#include "bgm.h"
#include "sdl_core.h"
#include "ngraph.h"
#include "cg.h"
#include "jpeg.h"
#define TDEMO_MUSIC_NO 1
#define FPS 30
static void Init() {
int p1 = getCaliValue();
@@ -16,24 +46,64 @@ static void Init() {
*var = 1;
DEBUG_COMMAND_YET("tDemo.Init %d,%d,%d,%p:", p1, p2, p3, var);
TRACE("tDemo.Init %d,%d,%d,%p:", p1, p2, p3, var);
}
static void SetKeyCancelFlag() {
int cancelflag = getCaliValue();
DEBUG_COMMAND_YET("tDemo.SetKeyCancelFlag %d:", cancelflag);
TRACE_UNIMPLEMENTED("tDemo.SetKeyCancelFlag %d:", cancelflag);
}
static void SetLoopFlag() {
/* Loop Flag */
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
DEBUG_COMMAND_YET("tDemo.SetLoopFlag %d:", loopflag);
TRACE_UNIMPLEMENTED("tDemo.SetLoopFlag %d:", loopflag);
}
static void Run() {
DEBUG_COMMAND_YET("tDemo.Run:");
alk_t *alk = alk_new("tDEMO.alk");
if (!alk) {
WARNING("Cannot open tDEMO.alk");
return;
}
while (sys_getInputInfo()); // wait for key up
musbgm_play(TDEMO_MUSIC_NO, 0, 100, 0);
uint32_t start = sdl_getTicks();
while (!nact->is_quit) {
int i = (sdl_getTicks() - start) / (1000 / FPS);
if (i >= alk->datanum)
break;
cgdata *cg = jpeg_extract(alk->entries[i].data, alk->entries[i].size);
if (cg) {
gr_drawimage24(sf0, cg, 0, 0);
ags_updateFull();
cgdata_free(cg);
} else {
WARNING("Cannot decode CG %d", i);
}
int wait_ms = (i + 1) * (1000 / FPS) - (sdl_getTicks() - start);
if (wait_ms > 0) {
if (sys_keywait(wait_ms, KEYWAIT_CANCELABLE))
break;
} else {
sdl_updateScreen();
if (sys_getInputInfo())
break;
}
}
musbgm_stop(TDEMO_MUSIC_NO, 0);
alk_free(alk);
TRACE("tDemo.Run:");
}
static const ModuleFunc functions[] = {
+19 -13
View File
@@ -81,6 +81,7 @@ target_sources(xsystem35 PRIVATE
s39ain.c
savedata.c
scenario.c
scheduler.c
sdl_cursor.c
sdl_draw.c
sdl_effect.c
@@ -112,11 +113,8 @@ elseif (ANDROID)
target_sources(xsystem35 PRIVATE midi.android.c)
else()
target_sources(xsystem35 PRIVATE midi.sdlmixer.c)
if (ENABLE_MIDI_RAWMIDI)
target_sources(xsystem35 PRIVATE midi.rawmidi.c midifile.c)
endif()
if (ENABLE_MIDI_PORTMIDI)
target_sources(xsystem35 PRIVATE midi.portmidi.c)
target_sources(xsystem35 PRIVATE midi.portmidi.c midifile.c)
endif()
endif()
@@ -158,15 +156,23 @@ if (EMSCRIPTEN)
list(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG "-O1")
target_link_options(xsystem35 PRIVATE
"SHELL:-s ENVIRONMENT=web"
"SHELL:-s ASYNCIFY=1 -s ASYNCIFY_IGNORE_INDIRECT=1"
"SHELL:-s ASYNCIFY_REMOVE=SDL_Delay"
"SHELL:-s ASYNCIFY_IMPORTS=muspcm_load_no,muspcm_load_data,muspcm_load_mixlr,muspcm_waitend,wait_vsync,load_mincho_font"
"SHELL:-s ASYNCIFY_ADD=commands2F60,nact_main,send_agsevent,cb_waitkey_sprite"
"SHELL:-s ALLOW_MEMORY_GROWTH=1"
"SHELL:-s NO_EXIT_RUNTIME=1"
"SHELL:-s EXPORTED_FUNCTIONS=_main,_malloc"
"SHELL:-s EXPORTED_RUNTIME_METHODS=getValue,addRunDependency,removeRunDependency")
-sENVIRONMENT=web
-sMODULARIZE=1
-sEXPORT_ES6=1
-sASYNCIFY=1
-sASYNCIFY_IGNORE_INDIRECT=1
-sASYNCIFY_REMOVE=SDL_Delay
-sASYNCIFY_IMPORTS=wait_vsync
# Functions that call an asynchronous function via a function pointer must
# be added to ASYNCIFY_ADD, even if it had a direct call to another
# asynchronous function, so that the indirect call itself is instrumented.
-sASYNCIFY_ADD=commands2F60,nact_main,send_agsevent,cb_waitkey_sprite
-sALLOW_MEMORY_GROWTH=1
-sNO_EXIT_RUNTIME=1
-sEXPORTED_FUNCTIONS=_main,_malloc
-sEXPORTED_RUNTIME_METHODS=FS,IDBFS,getValue,addRunDependency,removeRunDependency,stringToUTF8OnStack
--emit-tsd=xsystem35.d.ts
)
elseif (ANDROID)
target_link_libraries(xsystem35 PRIVATE ${ndk_log})
+17 -28
View File
@@ -370,15 +370,6 @@ void ags_putRegion(void *region, int x, int y) {
sdl_putRegion(region, x, y);
}
void ags_copyRegion(void *region, int sx, int sy , int w, int h, int dx, int dy) {
if (region == NULL) return;
if (!ags_check_param_xy(&dx, &dy)) return;
if (!ags_check_param(&dx, &dy, &w, &h)) return;
sdl_CopyRegion(region, sx, sy, w, h, dx, dy);
}
void ags_delRegion(void *region) {
if (region == NULL) return;
@@ -552,7 +543,7 @@ void ags_runEffect(int duration_ms, boolean cancelable, ags_EffectStepFunc step,
unsigned wflags = cancelable ? KEYWAIT_CANCELABLE : KEYWAIT_NONCANCELABLE;
int start = sdl_getTicks();
for (int t = 0; t < duration_ms; t = sdl_getTicks() - start) {
step(arg, (double)t / duration_ms);
step(arg, (float)t / duration_ms);
int key = sys_keywait(start + t + 16 - sdl_getTicks(), wflags);
if (cancelable && key) {
nact->waitcancel_key = key;
@@ -575,27 +566,26 @@ static void fade(int duration, boolean cancelable, enum sdl_effect_type type) {
}
void ags_fadeIn(int rate, boolean flag) {
int duration = rate * 16 * 1000 / 60;
if (!need_update)
duration = 0;
fade_outed = FALSE;
if (nact->ags.world_depth == 8)
sdl_setPalette(nact->ags.pal, 0, 256);
if (!need_update)
return;
int duration = rate * 16 * 1000 / 60;
fade(duration, flag, nact->ags.world_depth == 8 ? EFFECT_FADEIN : EFFECT_DITHERING_FADEIN);
sdl_updateAll(&nact->ags.view_area);
}
void ags_fadeOut(int rate, boolean flag) {
int duration = rate * 16 * 1000 / 60;
if (!need_update || fade_outed)
duration = 0;
if (need_update && !fade_outed) {
int duration = rate * 16 * 1000 / 60;
fade(duration, flag, nact->ags.world_depth == 8 ? EFFECT_FADEOUT : EFFECT_DITHERING_FADEOUT);
}
fade_outed = TRUE;
fade(duration, flag, nact->ags.world_depth == 8 ? EFFECT_FADEOUT : EFFECT_DITHERING_FADEOUT);
if (nact->ags.world_depth == 8) {
Color pal[256];
memset(&pal, 0, sizeof(pal));
@@ -604,27 +594,26 @@ void ags_fadeOut(int rate, boolean flag) {
}
void ags_whiteIn(int rate, boolean flag) {
int duration = rate * 16 * 1000 / 60;
if (!need_update)
duration = 0;
fade_outed = FALSE;
if (nact->ags.world_depth == 8)
sdl_setPalette(nact->ags.pal, 0, 256);
if (!need_update)
return;
int duration = rate * 16 * 1000 / 60;
fade(duration, flag, nact->ags.world_depth == 8 ? EFFECT_WHITEIN : EFFECT_DITHERING_WHITEIN);
sdl_updateAll(&nact->ags.view_area);
}
void ags_whiteOut(int rate, boolean flag) {
int duration = rate * 16 * 1000 / 60;
if (!need_update || fade_outed)
duration = 0;
if (need_update && !fade_outed) {
int duration = rate * 16 * 1000 / 60;
fade(duration, flag, nact->ags.world_depth == 8 ? EFFECT_WHITEIN : EFFECT_DITHERING_WHITEOUT);
}
fade_outed = TRUE;
fade(duration, flag, nact->ags.world_depth == 8 ? EFFECT_WHITEIN : EFFECT_DITHERING_WHITEOUT);
if (nact->ags.world_depth == 8) {
Color pal[256];
memset(&pal, 255, sizeof(pal));
+3 -3
View File
@@ -167,7 +167,6 @@ extern void ags_changeColorArea(int x, int y, int w, int h, int dst, int src, in
extern void* ags_saveRegion(int x, int y, int w, int h);
extern void ags_restoreRegion(void *region, int x, int y);
extern void ags_putRegion(void *region, int x, int y);
extern void ags_copyRegion(void *region, int sx, int sy, int w,int h,int dx,int dy);
extern void ags_delRegion(void *region);
extern MyRectangle ags_drawString(int x, int y, const char *src, int col);
@@ -178,7 +177,8 @@ extern void ags_copyArea_transparent(int sx, int sy, int w, int h, int dx, int d
extern void ags_copyArea_alphaLevel(int sx, int sy, int w, int h, int dx, int dy, int lv);
extern void ags_copyArea_alphaBlend(int sx, int sy, int w, int h, int dx, int dy, int lv);
extern MyRectangle ags_floodFill(int x, int y, int col);
extern void ags_eCopyArea(int sx, int sy, int w, int h, int dx, int dy, int type, int opt, boolean flg, int spCol);
extern void ags_eCopyArea(int sx, int sy, int w, int h, int dx, int dy, int sw, int opt, bool cancel);
extern void ags_eSpriteCopyArea(int sx, int sy, int w, int h, int dx, int dy, int sw, int opt, bool cancel, int spCol);
/* alpha channel 操作 */
extern void ags_copyFromAlpha(int sx, int sy, int w, int h, int dx, int dy, ALPHA_DIB_COPY_TYPE flg);
@@ -217,7 +217,7 @@ extern void ags_setAntialiasedStringMode(boolean mode);
extern boolean ags_getAntialiasedStringMode();
extern void ags_autorepeat(boolean enable);
typedef void (*ags_EffectStepFunc)(void *, double);
typedef void (*ags_EffectStepFunc)(void *, float);
void ags_runEffect(int duration_ms, boolean cancelable, ags_EffectStepFunc step, void *arg);
#define RMASK16 0xf800
+12
View File
@@ -45,6 +45,18 @@ static void ald_free(dridata *dfile) {
free(dfile);
}
bool ald_is_linked(DRIFILETYPE type, int no) {
if (type >= DRIFILETYPEMAX || !dri[type])
return false;
return dri_is_linked(dri[type], no);
}
bool ald_exists(DRIFILETYPE type, int no) {
if (type >= DRIFILETYPEMAX || !dri[type])
return false;
return dri_exists(dri[type], no);
}
/*
* load dri data
* type: data type
+2
View File
@@ -39,6 +39,8 @@ typedef enum {
} DRIFILETYPE;
void ald_init(int type, const char **file, int cnt, boolean use_mmap);
bool ald_is_linked(DRIFILETYPE type, int no);
bool ald_exists(DRIFILETYPE type, int no);
dridata *ald_getdata(DRIFILETYPE type, int no);
void ald_freedata(dridata *data);
int ald_get_maxno(DRIFILETYPE type);
+2 -2
View File
@@ -44,9 +44,9 @@ int musbgm_reset(void) {
return OK;
}
EM_JS(int, musbgm_play, (int no, int time, int vol), {
EM_JS(int, musbgm_play, (int no, int time, int vol, int loop_count), {
xsystem35.cdPlayer.fade(time * 10, vol / 100);
xsystem35.cdPlayer.play(no, 1);
xsystem35.cdPlayer.play(no, loop_count == 0);
return xsystem35.Status.OK;
});
+1 -1
View File
@@ -24,7 +24,7 @@
int musbgm_init(DRIFILETYPE type, int base_no);
int musbgm_exit(void);
int musbgm_reset(void);
int musbgm_play(int no, int time, int vol);
int musbgm_play(int no, int time, int vol, int loop_count);
int musbgm_stop(int no, int time);
int musbgm_fade(int no, int time, int vol);
int musbgm_getpos(int no);
+2 -2
View File
@@ -96,7 +96,7 @@ int musbgm_reset(void) {
return OK;
}
int musbgm_play(int no, int time, int vol) {
int musbgm_play(int no, int time, int vol, int loop_count) {
if (current_no)
musbgm_stop(current_no, 0);
@@ -107,7 +107,7 @@ int musbgm_play(int no, int time, int vol) {
// understands loop info in the WAVE's "smpl" chunk.
Mix_VolumeMusic(vol * MIX_MAX_VOLUME / 100);
if (Mix_FadeInMusic(mix_music, -1, time * 10) != 0) {
if (Mix_FadeInMusic(mix_music, loop_count == 0 ? -1 : loop_count, time * 10) != 0) {
free_music();
return NG;
}
-12
View File
@@ -1,12 +0,0 @@
#define curbm0_width 32
#define curbm0_height 32
static char curbm0_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x88,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x08,0x02,0x00,0x00,0x08,0x04,0x00,
0x00,0x08,0x08,0x00,0x00,0x08,0x10,0x00,0x00,0x08,0x3e,0x00,0x00,0x48,0x02,
0x00,0x00,0xa8,0x04,0x00,0x00,0x98,0x04,0x00,0x00,0x08,0x09,0x00,0x00,0x00,
0x09,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x0c,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-12
View File
@@ -1,12 +0,0 @@
#define curbm1_width 32
#define curbm1_height 32
static char curbm1_bits[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xf3,0x9f,0xff,0xff,0xf5,0x5f,0xff,0xff,0xf6,0xdf,0xfe,
0x7f,0x07,0xc0,0xfd,0xbf,0xff,0xff,0xfb,0x7f,0x07,0xc0,0xfd,0xff,0xf6,0xdf,
0xfe,0xff,0xf5,0x5f,0xff,0xff,0xf3,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
-12
View File
@@ -1,12 +0,0 @@
#define curbm2_width 32
#define curbm2_height 32
static char curbm2_bits[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
0xff,0xff,0xff,0xbf,0xfe,0xff,0xff,0xdf,0xfd,0xff,0xff,0xef,0xfb,0xff,0xff,
0xf7,0xf7,0xff,0xff,0x87,0xf0,0xff,0xff,0xbf,0xfe,0xff,0xff,0xbf,0xfe,0xff,
0xff,0xbf,0xfe,0xff,0xff,0xbf,0xfe,0xff,0xff,0xbf,0xfe,0xff,0xff,0xbf,0xfe,
0xff,0xff,0xbf,0xfe,0xff,0xff,0xbf,0xfe,0xff,0xff,0x87,0xf0,0xff,0xff,0xf7,
0xf7,0xff,0xff,0xef,0xfb,0xff,0xff,0xdf,0xfd,0xff,0xff,0xbf,0xfe,0xff,0xff,
0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
-12
View File
@@ -1,12 +0,0 @@
#define curbm3_width 32
#define curbm3_height 32
static char curbm3_bits[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xff,0xff,0xff,0x7d,0xff,0xff,0xff,
0xbd,0xff,0xff,0xff,0xdd,0xff,0xff,0xff,0xad,0xff,0xff,0xff,0x55,0xff,0xff,
0xff,0xb9,0xfe,0xff,0xff,0x7f,0xfd,0xff,0xff,0xff,0x3a,0xff,0xff,0xff,0x55,
0xff,0xff,0xff,0x6b,0xff,0xff,0xff,0x77,0xff,0xff,0xff,0x7b,0xff,0xff,0xff,
0x7d,0xff,0xff,0xff,0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
-12
View File
@@ -1,12 +0,0 @@
#define curbm4_width 32
#define curbm4_height 32
static char curbm4_bits[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0xff,0xff,0xff,0xbe,0xff,0xff,
0xff,0xbd,0xff,0xff,0xff,0xbb,0xff,0xff,0xff,0xb5,0xff,0xff,0xff,0xaa,0xff,
0xff,0x7f,0x9d,0xff,0xff,0xbf,0xfe,0xff,0xff,0x5c,0xff,0xff,0xff,0xaa,0xff,
0xff,0xff,0xd6,0xff,0xff,0xff,0xee,0xff,0xff,0xff,0xde,0xff,0xff,0xff,0xbe,
0xff,0xff,0xff,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
-12
View File
@@ -1,12 +0,0 @@
#define curbm5_width 32
#define curbm5_height 32
static char curbm5_bits[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0x00,0x80,0xff,0xff,0xfe,0xbf,0xff,0xff,0x06,0xb0,0xff,0xff,0xfe,
0xbf,0xff,0xff,0x05,0xd0,0xff,0xff,0x05,0xd0,0xff,0xff,0xa5,0xd2,0xff,0xff,
0x45,0xd1,0xff,0xff,0x8d,0xd8,0xff,0xff,0x1b,0xec,0xff,0xff,0xb7,0xf6,0xff,
0xff,0x6f,0xfb,0xff,0xff,0x6f,0xfb,0xff,0xff,0x37,0xf6,0xff,0xff,0x9b,0xec,
0xff,0xff,0x0d,0xd8,0xff,0xff,0x85,0xd0,0xff,0xff,0x45,0xd1,0xff,0xff,0xa5,
0xd2,0xff,0xff,0x55,0xd5,0xff,0xff,0xfe,0xbf,0xff,0xff,0x06,0xb0,0xff,0xff,
0xfe,0xbf,0xff,0xff,0x00,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
-12
View File
@@ -1,12 +0,0 @@
#define curbm6_width 32
#define curbm6_height 32
static char curbm6_bits[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xfe,0xff,0xff,0x7f,0xfd,0xff,0xff,0xbf,0xfb,0xff,0xff,0xdf,
0xf7,0xff,0xff,0xef,0xef,0xff,0xff,0x0f,0xe0,0xff,0xff,0x7f,0xfd,0xff,0xff,
0x7f,0xfd,0xff,0xff,0x7c,0x7d,0xfe,0x7f,0x7d,0x7d,0xfd,0xbf,0x7d,0x7d,0xfb,
0xdf,0x01,0x01,0xf7,0xef,0xfd,0x7f,0xef,0xdf,0x01,0x01,0xf7,0xbf,0x7d,0x7d,
0xfb,0x7f,0x7d,0x7d,0xfd,0xff,0x7c,0x7d,0xfe,0xff,0x7f,0xfd,0xff,0xff,0x7f,
0xfd,0xff,0xff,0x0f,0xe0,0xff,0xff,0xef,0xef,0xff,0xff,0xdf,0xf7,0xff,0xff,
0xbf,0xfb,0xff,0xff,0x7f,0xfd,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
-43
View File
@@ -1,43 +0,0 @@
/* XPM */
static const char *cursor_arrow[] = {
/* width height num_colors chars_per_pixel */
" 32 32 3 1",
/* colors */
"X c #000000",
". c #ffffff",
" c None",
/* pixels */
"X ",
"XX ",
"X.X ",
"X..X ",
"X...X ",
"X....X ",
"X.....X ",
"X......X ",
"X.......X ",
"X........X ",
"X.....XXXXX ",
"X..X..X ",
"X.X X..X ",
"XX X..X ",
"X X..X ",
" X..X ",
" X..X ",
" X..X ",
" XX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"0,0"
};
-42
View File
@@ -1,42 +0,0 @@
/* XPM */
static const char *cursor_busy[] = {
/* columns rows colors chars-per-pixel */
"32 32 3 1",
"X c #ffffff",
". c #000000",
" c None",
/* pixels */
" ",
" ",
" ",
" XXXXXXXXXXXXXXXXX ",
" X...............X ",
" X.XXXXXXXXXXXXX.X ",
" X.XX.........XX.X ",
" X.XXXXXXXXXXXXX.X ",
" X.X.........X.X ",
" X.X.........X.X ",
" X.X..X.X.X..X.X ",
" X.X...X.X...X.X ",
" X.XX...X...XX.X ",
" X.XX.....XX.X ",
" X.XX.X.XX.X ",
" X.XX.XX.X ",
" X.XX.XX.X ",
" X.XX...XX.X ",
" X.XX..X..XX.X ",
" X.XX.......XX.X ",
" X.X....X....X.X ",
" X.X...X.X...X.X ",
" X.X..X.X.X..X.X ",
" X.X.X.X.X.X.X.X ",
" X.XXXXXXXXXXXXX.X ",
" X.XX.........XX.X ",
" X.XXXXXXXXXXXXX.X ",
" X...............X ",
" XXXXXXXXXXXXXXXXX ",
" ",
" ",
" ",
"15,15"
};
-43
View File
@@ -1,43 +0,0 @@
/* XPM */
static const char *cursor_cross[] = {
/* width height num_colors chars_per_pixel */
" 32 32 3 1",
/* colors */
"X c #000000",
". c #ffffff",
" c None",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" XXXX ",
" X..X ",
" X..X ",
" X..X ",
" X..X ",
" X..X ",
" X..X ",
" X..X ",
" XXXXXXXXX..XXXXXXXXX ",
" X..................X ",
" X..................X ",
" XXXXXXXXX..XXXXXXXXX ",
" X..X ",
" X..X ",
" X..X ",
" X..X ",
" X..X ",
" X..X ",
" X..X ",
" XXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"15,15"
};
-43
View File
@@ -1,43 +0,0 @@
/* XPM */
static const char *cursor_ibeam[] = {
/* width height num_colors chars_per_pixel */
" 32 32 3 1",
/* colors */
". c #000000",
"X c #ffffff",
" c None",
/* pixels */
" XXX XXX ",
" XXX ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" XXX ",
" XXX XXX ",
" ",
"15,15"
};
-42
View File
@@ -1,42 +0,0 @@
/* XPM */
static const char *cursor_move[] = {
/* columns rows colors chars-per-pixel */
"32 32 3 1",
"X c #ffffff",
". c #000000",
" c None",
/* pixels */
" ",
" ",
" ",
" ",
" X ",
" X.X ",
" X...X ",
" X.....X ",
" X.......X ",
" XXXXXXXXX ",
" X.X ",
" X.X ",
" XX X.X XX ",
" X.X X.X X.X ",
" X..X X.X X..X ",
" X...XXXXXXX.XXXXXXX...X ",
" X....X.............X....X ",
" X...XXXXXXX.XXXXXXX...X ",
" X..X X.X X..X ",
" X.X X.X X.X ",
" XX X.X XX ",
" X.X ",
" X.X ",
" XXXXXXXXX ",
" X.......X ",
" X.....X ",
" X...X ",
" X.X ",
" X ",
" ",
" ",
" ",
"15,15"
};
-42
View File
@@ -1,42 +0,0 @@
/* XPM */
static const char *cursor_no[] = {
/* columns rows colors chars-per-pixel */
"32 32 3 1",
"X c #ffffff",
". c #000000",
" c None",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ...... ",
" ..XXXXXX.. ",
" .XXXXXXXXX . ",
" .XXXX....XXX . ",
" .XXX.. ..XXX. ",
" .XXXXX. .XXX. ",
" .XX.XXX. .XX. ",
" .XXX..XXX. .XXX. ",
" .XX. .XXX. .XX. ",
" .XX. .XXX. .XX. ",
" .XX. .XXX. .XX. ",
" .XX. .XXX. .XX. ",
" .XXX. .XXX..XXX. ",
" .XX . .XX.XX. ",
" .XXX. .XXXXX. ",
" .XXX.. ..XXX. ",
" .XXXX....XXXX. ",
" .XXXXXXXXXX. ",
" ..XXXXXX.. ",
" ...... ",
" ",
" ",
" ",
" ",
" ",
" ",
"16,16"
};
-42
View File
@@ -1,42 +0,0 @@
/* XPM */
static const char *cursor_size_h[] = {
/* columns rows colors chars-per-pixel */
"32 32 3 1",
". c #000000",
"X c #ffffff",
" c None",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XX XX ",
" X.X X.X ",
" X..X X..X ",
" X...XXXXXXXXXXX...X ",
" X...................X ",
" X...XXXXXXXXXXX...X ",
" X..X X..X ",
" X.X X.X ",
" XX XX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"15,15"
};
-42
View File
@@ -1,42 +0,0 @@
/* XPM */
static const char *cursor_size_l[] = {
/* columns rows colors chars-per-pixel */
"32 32 3 1",
". c #000000",
"X c #ffffff",
" c None",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXX ",
" X.....X ",
" X....X ",
" X...X ",
" X..X.X ",
" X.X X.X ",
" XX X.X ",
" X.X ",
" X.X XX ",
" X.X X.X ",
" X.X..X ",
" X...X ",
" X....X ",
" X.... X ",
" XXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"15,15"
};
-42
View File
@@ -1,42 +0,0 @@
/* XPM */
static const char *cursor_size_r[] = {
/* columns rows colors chars-per-pixel */
"32 32 3 1",
". c #000000",
"X c #ffffff",
" c None",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" XXXXXXX ",
" X.....X ",
" X....X ",
" X...X ",
" X.X..X ",
" X.X X.X ",
" X.X XX ",
" X.X ",
" XX X.X ",
" X.X X.X ",
" X..X.X ",
" X...X ",
" X....X ",
" X.....X ",
" XXXXXXX ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"15,15"
};
-42
View File
@@ -1,42 +0,0 @@
/* XPM */
static const char *cursor_size_v[] = {
/* columns rows colors chars-per-pixel */
"32 32 3 1",
". c #000000",
"X c #ffffff",
" c None",
/* pixels */
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" X ",
" X.X ",
" X...X ",
" X.....X ",
" X.......X ",
" XXXX.XXXX ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" X.X ",
" XXXX XXXX ",
" X.......X ",
" X.....X ",
" X...X ",
" X/X ",
" X ",
" ",
" ",
" ",
" ",
" ",
"15,15"
};
-12
View File
@@ -1,12 +0,0 @@
#define maskbm0_width 32
#define maskbm0_height 32
static char maskbm0_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x78,0x00,0x00,0x00,
0xf8,0x00,0x00,0x00,0xf8,0x01,0x00,0x00,0xf8,0x03,0x00,0x00,0xf8,0x07,0x00,
0x00,0xf8,0x0f,0x00,0x00,0xf8,0x1f,0x00,0x00,0xf8,0x3f,0x00,0x00,0xf8,0x03,
0x00,0x00,0xb8,0x07,0x00,0x00,0x98,0x07,0x00,0x00,0x08,0x0f,0x00,0x00,0x00,
0x0f,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x0c,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-12
View File
@@ -1,12 +0,0 @@
#define maskbm1_width 32
#define maskbm1_height 32
static char maskbm1_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x0c,0x60,0x00,0x00,0x0e,0xe0,0x00,0x00,0x0f,0xe0,0x01,
0x80,0xff,0xff,0x03,0xc0,0xff,0xff,0x07,0x80,0xff,0xff,0x03,0x00,0x0f,0xe0,
0x01,0x00,0x0e,0xe0,0x00,0x00,0x0c,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-12
View File
@@ -1,12 +0,0 @@
#define maskbm2_width 32
#define maskbm2_height 32
static char maskbm2_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0xe0,0x03,0x00,0x00,0xf0,0x07,0x00,0x00,
0xf8,0x0f,0x00,0x00,0xf8,0x0f,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,
0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,
0x00,0x00,0xc0,0x01,0x00,0x00,0xc0,0x01,0x00,0x00,0xf8,0x0f,0x00,0x00,0xf8,
0x0f,0x00,0x00,0xf0,0x07,0x00,0x00,0xe0,0x03,0x00,0x00,0xc0,0x01,0x00,0x00,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-12
View File
@@ -1,12 +0,0 @@
#define maskbm3_width 32
#define maskbm3_height 32
static char maskbm3_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,
0x7e,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0xee,0x00,0x00,
0x00,0xc6,0x01,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0xc7,0x00,0x00,0x00,0xee,
0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,
0xfe,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-12
View File
@@ -1,12 +0,0 @@
#define maskbm4_width 32
#define maskbm4_height 32
static char maskbm4_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x7f,0x00,0x00,
0x00,0x7e,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x77,0x00,
0x00,0x80,0x63,0x00,0x00,0xc0,0x01,0x00,0x00,0xe3,0x00,0x00,0x00,0x77,0x00,
0x00,0x00,0x3f,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x7f,
0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
-12
View File
@@ -1,12 +0,0 @@
#define maskbm5_width 32
#define maskbm5_height 32
static char maskbm5_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0xff,
0x7f,0x00,0x00,0xfe,0x3f,0x00,0x00,0xfe,0x3f,0x00,0x00,0xfe,0x3f,0x00,0x00,
0xfe,0x3f,0x00,0x00,0xfe,0x3f,0x00,0x00,0xfc,0x1f,0x00,0x00,0xf8,0x0f,0x00,
0x00,0xf0,0x07,0x00,0x00,0xf0,0x07,0x00,0x00,0xf8,0x0f,0x00,0x00,0xfc,0x1f,
0x00,0x00,0xfe,0x3f,0x00,0x00,0xfe,0x3f,0x00,0x00,0xfe,0x3f,0x00,0x00,0xfe,
0x3f,0x00,0x00,0xfe,0x3f,0x00,0x00,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,
0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

Some files were not shown because too many files have changed in this diff Show More