mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
Compare commits
269
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
782a9e5925 | ||
|
|
c8f1ef2b9e | ||
|
|
6184e93965 | ||
|
|
3377441caf | ||
|
|
d243358b48 | ||
|
|
9e82445ace | ||
|
|
a6109b6210 | ||
|
|
901a3bb28c | ||
|
|
f1b80d7086 | ||
|
|
f1fb50841c | ||
|
|
f97259bc30 | ||
|
|
3eccaa6165 | ||
|
|
42b9d43a70 | ||
|
|
a7800e652c | ||
|
|
1c2e395e88 | ||
|
|
c67198cc0e | ||
|
|
fc80275944 | ||
|
|
76db37756b | ||
|
|
4c022cf505 | ||
|
|
1c3dccb349 | ||
|
|
63c456329f | ||
|
|
141b754340 | ||
|
|
45612feb79 | ||
|
|
605de284e9 | ||
|
|
0b71a84bb0 | ||
|
|
933cf5b6a3 | ||
|
|
c15e7233b4 | ||
|
|
bad6b90e23 | ||
|
|
83989f1a0e | ||
|
|
cc9aa1e7c0 | ||
|
|
d1d943d2a5 | ||
|
|
6c59122c59 | ||
|
|
a6cbf243c7 | ||
|
|
a89ed4ba29 | ||
|
|
135cd6b8c4 | ||
|
|
b6a69deab7 | ||
|
|
eea1f9c93a | ||
|
|
47d23d4ee7 | ||
|
|
10b414fb4e | ||
|
|
49e707e40e | ||
|
|
9655a9106d | ||
|
|
d35a24f142 | ||
|
|
d945dfe77d | ||
|
|
a224d89233 | ||
|
|
debabaf686 | ||
|
|
bc97e4c826 | ||
|
|
c4d74d659a | ||
|
|
4daaa5ede5 | ||
|
|
9ea1a81cc1 | ||
|
|
0a1d0a5a76 | ||
|
|
5fefd74d4a | ||
|
|
d03568c3ff | ||
|
|
8dc49fee71 | ||
|
|
1b907e904f | ||
|
|
82963e8293 | ||
|
|
3ccf59a94e | ||
|
|
2f9ce8cec8 | ||
|
|
3ff022c73e | ||
|
|
9ad1059ced | ||
|
|
2d026c6122 | ||
|
|
b68c217554 | ||
|
|
7e09c14660 | ||
|
|
2db403a692 | ||
|
|
850fa96933 | ||
|
|
e1e1e5cacc | ||
|
|
d7dd98a8ca | ||
|
|
f11dbc7400 | ||
|
|
3b52efb752 | ||
|
|
93f01efdb5 | ||
|
|
3012412a5d | ||
|
|
91fa4284c4 | ||
|
|
93d29b5f87 | ||
|
|
b6cdba145f | ||
|
|
38a40e82f3 | ||
|
|
d29a764de2 | ||
|
|
0d74454355 | ||
|
|
1a248ea897 | ||
|
|
556b9687ca | ||
|
|
8be63b7f11 | ||
|
|
8c963f4dcf | ||
|
|
87316495e8 | ||
|
|
45b50fe78a | ||
|
|
c31da0fe10 | ||
|
|
0d376a3d35 | ||
|
|
ff9710426f | ||
|
|
aa537687c4 | ||
|
|
ae30b73333 | ||
|
|
28ac087bca | ||
|
|
fc3d66195f | ||
|
|
f7ca54104b | ||
|
|
d8513d78e4 | ||
|
|
d0ad06e7c5 | ||
|
|
cae31a72d1 | ||
|
|
1405c8693b | ||
|
|
5c5a71237c | ||
|
|
0a82376cfd | ||
|
|
e08ba5fb03 | ||
|
|
ca1e47c093 | ||
|
|
0bbb6fbeae | ||
|
|
f9d753d46a | ||
|
|
117b81bf86 | ||
|
|
f311ccb15e | ||
|
|
fd4c8fb4d3 | ||
|
|
4832b0ab84 | ||
|
|
69f5e8f538 | ||
|
|
7cb8896685 | ||
|
|
0ecc4edb43 | ||
|
|
162bf8dc25 | ||
|
|
7f6ab44e96 | ||
|
|
e9abf1f4d8 | ||
|
|
828cb047ba | ||
|
|
bc06099e01 | ||
|
|
6c87a9155b | ||
|
|
8e4070e91e | ||
|
|
78cc181271 | ||
|
|
af256b8a83 | ||
|
|
0e3ea590c6 | ||
|
|
2936212967 | ||
|
|
e83f4da24f | ||
|
|
066295df2f | ||
|
|
40a4d8b2f6 | ||
|
|
0793b57e3c | ||
|
|
089520ec55 | ||
|
|
4bea33d852 | ||
|
|
6930acd3b1 | ||
|
|
f9a3ef8606 | ||
|
|
841deb6f81 | ||
|
|
d713e1470e | ||
|
|
6268cb6a9b | ||
|
|
a5aa8d0672 | ||
|
|
f8b7adf3d0 | ||
|
|
3e46c54ce6 | ||
|
|
0925ee86e0 | ||
|
|
7a77470a19 | ||
|
|
068a2910b5 | ||
|
|
6ef699e87d | ||
|
|
d6dd7d34b7 | ||
|
|
a4f0e18d70 | ||
|
|
80bd68214b | ||
|
|
4143cfc83b | ||
|
|
541cd22e56 | ||
|
|
d82175c9f5 | ||
|
|
21e43b5cc7 | ||
|
|
5283a0aa5d | ||
|
|
91d30c9b13 | ||
|
|
f66ebff002 | ||
|
|
98e1355461 | ||
|
|
35b1b12ab6 | ||
|
|
1e2ea9821c | ||
|
|
e5fab0f198 | ||
|
|
2e2fbbaa1b | ||
|
|
fb44e5b1e3 | ||
|
|
6690687d0f | ||
|
|
26c9f663ca | ||
|
|
d5a7040b54 | ||
|
|
3280d6073b | ||
|
|
ca09dc7413 | ||
|
|
cc60fdfb7d | ||
|
|
ac703b3448 | ||
|
|
2c6a66af8f | ||
|
|
fdcc3de352 | ||
|
|
dda7d7f077 | ||
|
|
a159e7cb24 | ||
|
|
785f46be2a | ||
|
|
7ca3f2527e | ||
|
|
f6221a04ba | ||
|
|
7069343e57 | ||
|
|
9be7b0ab68 | ||
|
|
8779763615 | ||
|
|
869e2e34dd | ||
|
|
c0daba25a5 | ||
|
|
9775c4569d | ||
|
|
21444ac1c0 | ||
|
|
d61ce9a18e | ||
|
|
04c3e22339 | ||
|
|
92f8120e4a | ||
|
|
3613358b7b | ||
|
|
fc6651642d | ||
|
|
0b15fa3506 | ||
|
|
2f8dd2d6a5 | ||
|
|
4e2d81cf47 | ||
|
|
29c85aad36 | ||
|
|
cd77cbfbf1 | ||
|
|
e18bb6cb75 | ||
|
|
34e2d60ab4 | ||
|
|
8894dd40fa | ||
|
|
2529a5b61b | ||
|
|
ca41501f6d | ||
|
|
36a0e01dcd | ||
|
|
81906641e1 | ||
|
|
da1c136b39 | ||
|
|
9878f5ca74 | ||
|
|
6da3dfef55 | ||
|
|
be1f048b33 | ||
|
|
6d5831c4e8 | ||
|
|
5ec0c0a7be | ||
|
|
4b002c676c | ||
|
|
f0bd336da1 | ||
|
|
704cfda6ef | ||
|
|
c0de87d0d8 | ||
|
|
3964a1bc27 | ||
|
|
b765332c27 | ||
|
|
9f9805128f | ||
|
|
ba0d59d5a4 | ||
|
|
d531fa3994 | ||
|
|
4d5fd5efca | ||
|
|
89a4ba2bd2 | ||
|
|
163c23af81 | ||
|
|
48d937a0c3 | ||
|
|
4aff7a1df7 | ||
|
|
303510e5c0 | ||
|
|
c7263a3082 | ||
|
|
aea53c1079 | ||
|
|
32f1e1ef8a | ||
|
|
500fffaee2 | ||
|
|
ebe3762809 | ||
|
|
4fd00a9088 | ||
|
|
44d0ddcec7 | ||
|
|
9541f3f85a | ||
|
|
b5c8b158c6 | ||
|
|
8d91657c14 | ||
|
|
ebb249cd47 | ||
|
|
379ca744d5 | ||
|
|
b892189f8b | ||
|
|
f1b4c2550b | ||
|
|
79c9bfc85a | ||
|
|
042f333564 | ||
|
|
417baec290 | ||
|
|
ec270f2378 | ||
|
|
55837e5115 | ||
|
|
97b8bcb22a | ||
|
|
862f639e2e | ||
|
|
316a06a168 | ||
|
|
c9ec20dcc8 | ||
|
|
023b8cd455 | ||
|
|
335681863c | ||
|
|
ecba592d82 | ||
|
|
dbac18c260 | ||
|
|
ed8f610f80 | ||
|
|
f753cf8670 | ||
|
|
c3cc4f3e44 | ||
|
|
e57913bfc6 | ||
|
|
f941916fb2 | ||
|
|
f5248bda8a | ||
|
|
988a072964 | ||
|
|
775b34cf1a | ||
|
|
5455bce8d6 | ||
|
|
5e5defb6bc | ||
|
|
05cca544c6 | ||
|
|
38758569bb | ||
|
|
e417811a94 | ||
|
|
b509be2b64 | ||
|
|
fa845a6439 | ||
|
|
b3cb185a35 | ||
|
|
87413d54dc | ||
|
|
440fb93b08 | ||
|
|
6d1ef1ba6f | ||
|
|
dd1f0fd230 | ||
|
|
15fb122148 | ||
|
|
91a6cf7e67 | ||
|
|
dc8025469a | ||
|
|
0bbace898d | ||
|
|
c4e5ef3c36 | ||
|
|
e039fb3193 | ||
|
|
e547c153fc | ||
|
|
fef74da3dd | ||
|
|
7baab6b616 | ||
|
|
54b219e435 | ||
|
|
a20363b901 |
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve xsystem35
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
### Environment
|
||||
- xsystem35 version:
|
||||
- OS:
|
||||
|
||||
### Steps to reproduce the behavior
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
### Expected behavior
|
||||
|
||||
### Actual behavior
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
|
||||
### Additional context
|
||||
@@ -11,15 +11,10 @@ jobs:
|
||||
- name: Install Deps
|
||||
run: sudo apt install ninja-build
|
||||
|
||||
- name: set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd android
|
||||
./gradlew assembleRelease
|
||||
ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk-bundle ./gradlew assembleRelease
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
|
||||
@@ -2,7 +2,8 @@ name: Emscripten Build
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
emscripten-version: 1.40.1
|
||||
EM_VERSION: 3.1.2
|
||||
EM_CACHE_FOLDER: 'emsdk-cache'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -11,24 +12,21 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Cache .emscripten_cache
|
||||
- name: Setup cache
|
||||
id: cache-system-libraries
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: emscripten-cache
|
||||
key: emscripten-cache-${{ env.emscripten-version }}
|
||||
path: ${{env.EM_CACHE_FOLDER}}
|
||||
key: ${{env.EM_VERSION}}-${{ runner.os }}
|
||||
|
||||
- name: Setup Emscripten toolchain
|
||||
uses: mymindstorm/setup-emsdk@v6
|
||||
uses: mymindstorm/setup-emsdk@v10
|
||||
with:
|
||||
version: ${{ env.emscripten-version }}
|
||||
actions-cache-folder: emsdk-cache
|
||||
version: ${{ env.EM_VERSION }}
|
||||
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
EM_CACHE: ${{ github.workspace }}/emscripten-cache/cache
|
||||
EM_PORTS: ${{ github.workspace }}/emscripten-cache/ports
|
||||
run: |
|
||||
mkdir -p emscripten-cache
|
||||
mkdir -p out/wasm
|
||||
cd out/wasm
|
||||
emcmake cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../../
|
||||
|
||||
@@ -15,33 +15,15 @@ jobs:
|
||||
- name: Install Deps
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
||||
sudo apt install libgtk-3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libwebp-dev libportmidi-dev libcjson-dev
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p out/${{ matrix.build-type }}
|
||||
cd out/${{ matrix.build-type }}
|
||||
cmake -DENABLE_X11=NO -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} ../../
|
||||
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} ../../
|
||||
make
|
||||
|
||||
- name: Test
|
||||
run: ctest --output-on-failure
|
||||
working-directory: out/${{ matrix.build-type }}
|
||||
|
||||
build-x11:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: Linux X11
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir -p out
|
||||
cd out
|
||||
cmake ../
|
||||
make
|
||||
|
||||
- name: Test
|
||||
run: ctest --output-on-failure
|
||||
working-directory: out
|
||||
|
||||
@@ -3,37 +3,34 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
mingw: ["MINGW32", "MINGW64"]
|
||||
include:
|
||||
- mingw: "MINGW32"
|
||||
package: "mingw-w64-i686"
|
||||
installer: "xsystem35-32bit"
|
||||
- mingw: "MINGW64"
|
||||
package: "mingw-w64-x86_64"
|
||||
installer: "xsystem35-64bit"
|
||||
- { sys: MINGW32, installer: "xsystem35-32bit" }
|
||||
- { sys: MINGW64, installer: "xsystem35-64bit" }
|
||||
defaults:
|
||||
run:
|
||||
shell: bash.exe --login -eo pipefail "{0}"
|
||||
env:
|
||||
MSYSTEM: ${{ matrix.mingw }}
|
||||
CHERE_INVOKING: 1
|
||||
name: MSYS2 ${{ matrix.mingw }}
|
||||
shell: msys2 {0}
|
||||
name: MSYS2 ${{ matrix.sys }}
|
||||
steps:
|
||||
|
||||
- name: Set up shell
|
||||
run: echo ::add-path::C:\msys64\usr\bin\
|
||||
shell: pwsh
|
||||
|
||||
- name: Print system version
|
||||
run: |
|
||||
uname
|
||||
echo PATH: $PATH
|
||||
|
||||
- name: Install Deps
|
||||
run: pacman -S --noconfirm ${{ matrix.package }}-SDL2 ${{ matrix.package }}-SDL2_ttf ${{ matrix.package }}-SDL2_mixer ${{ matrix.package }}-libjpeg-turbo ${{ matrix.package }}-nsis ${{ matrix.package }}-ntldd-git
|
||||
- name: Set up MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
pacboy: >-
|
||||
gcc:p
|
||||
cmake:p
|
||||
ninja:p
|
||||
SDL2:p
|
||||
SDL2_ttf:p
|
||||
SDL2_mixer:p
|
||||
libjpeg-turbo:p
|
||||
libwebp:p
|
||||
cjson:p
|
||||
nsis:p
|
||||
ntldd-git:p
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@@ -42,19 +39,19 @@ jobs:
|
||||
run: |
|
||||
mkdir -p out/release
|
||||
cd out/release
|
||||
cmake -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release ../../
|
||||
make
|
||||
cmake -G"Ninja" -DCMAKE_BUILD_TYPE=Release ../../
|
||||
ninja
|
||||
|
||||
- name: Test
|
||||
run: ctest --output-on-failure
|
||||
working-directory: out/release
|
||||
|
||||
- name: Package
|
||||
working-directory: installer
|
||||
run: ./make-installer.sh ../out/release ${{ matrix.installer }}.nsi
|
||||
working-directory: tools/installer
|
||||
run: ./make-installer.sh ../../out/release ${{ matrix.installer }}.nsi
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.installer }}
|
||||
path: installer/${{ matrix.installer }}.exe
|
||||
path: tools/installer/${{ matrix.installer }}.exe
|
||||
|
||||
@@ -3,3 +3,7 @@ android/.gradle
|
||||
android/app/.externalNativeBuild
|
||||
android/app/build
|
||||
android/build
|
||||
.ccls-cache
|
||||
.dir-locals.el
|
||||
compile_commands.json
|
||||
build
|
||||
|
||||
+43
-102
@@ -14,14 +14,6 @@ if (MSYS)
|
||||
list(APPEND CMAKE_LIBRARY_PATH $ENV{MINGW_PREFIX}/$ENV{MINGW_CHOST}/lib)
|
||||
endif ()
|
||||
|
||||
# A wrapper around find_package() that skips the check if ENABLE_<package> is false
|
||||
macro (optional_find_package package)
|
||||
option(ENABLE_${package} "Use ${package} if available" ON)
|
||||
if (ENABLE_${package})
|
||||
find_package(${package} ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# A wrapper around pkg_check_modules() that skips the check if ENABLE_<prefix> is false
|
||||
macro (optional_pkg_check_modules prefix)
|
||||
option(ENABLE_${prefix} "Use ${prefix} if available" ON)
|
||||
@@ -36,59 +28,63 @@ check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
||||
check_symbol_exists(uname "sys/utsname.h" HAVE_UNAME)
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
set(SDL2_FOUND 1)
|
||||
set(FREETYPE_FOUND 1)
|
||||
set(HAVE_JPEG 1)
|
||||
set(DEFAULT_FONT_PATH /fonts/)
|
||||
elseif (ANDROID)
|
||||
if (NOT DEFINED ENABLE_MODULES)
|
||||
set(ENABLE_MODULES 1)
|
||||
endif()
|
||||
set(SDL2_FOUND 1)
|
||||
set(SDL2MIXER_FOUND 1)
|
||||
set(SDL2TTF_FOUND 1)
|
||||
find_library(ndk_zlib z)
|
||||
find_library(ndk_log log)
|
||||
else()
|
||||
include(TestBigEndian)
|
||||
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
|
||||
|
||||
if (NOT DEFINED ENABLE_MODULES)
|
||||
set(ENABLE_MODULES 1)
|
||||
endif()
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
optional_find_package(X11)
|
||||
if (X11_xf86vmode_FOUND)
|
||||
set(HAVE_XF86VMODE 1)
|
||||
endif()
|
||||
|
||||
optional_find_package(GTK2 COMPONENTS gtk)
|
||||
if (GTK2_FOUND)
|
||||
include(FindPkgConfig)
|
||||
optional_pkg_check_modules(GTK3 IMPORTED_TARGET gtk+-3.0)
|
||||
if (GTK3_FOUND)
|
||||
set(ENABLE_GTK 1)
|
||||
endif()
|
||||
|
||||
optional_find_package(Freetype)
|
||||
|
||||
include(FindPkgConfig)
|
||||
optional_pkg_check_modules(SDL2 IMPORTED_TARGET sdl2)
|
||||
pkg_check_modules(SDL2 IMPORTED_TARGET sdl2)
|
||||
pkg_check_modules(SDL2TTF IMPORTED_TARGET SDL2_ttf)
|
||||
optional_pkg_check_modules(SDL2MIXER IMPORTED_TARGET SDL2_mixer)
|
||||
optional_pkg_check_modules(SDL2TTF IMPORTED_TARGET SDL2_ttf)
|
||||
|
||||
option(ENABLE_DEBUGGER "Enable built-in debugger" ON)
|
||||
if (ENABLE_DEBUGGER)
|
||||
pkg_check_modules(cJSON IMPORTED_TARGET libcjson)
|
||||
if (NOT cJSON_FOUND)
|
||||
# libcjson-dev of Debian buster / Ubuntu 20.04 does not install pkgconfig files.
|
||||
find_library(cJSON cjson)
|
||||
if (NOT cJSON)
|
||||
message(FATAL_ERROR "libcjson is required but not found.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindJPEG)
|
||||
if (JPEG_FOUND)
|
||||
set(HAVE_JPEG 1)
|
||||
endif()
|
||||
|
||||
optional_pkg_check_modules(WEBP IMPORTED_TARGET libwebp)
|
||||
if (WEBP_FOUND)
|
||||
set(HAVE_WEBP 1)
|
||||
endif()
|
||||
|
||||
find_library(PORTMIDI portmidi)
|
||||
if (PORTMIDI)
|
||||
set(HAVE_PORTMIDI 1)
|
||||
set(ENABLE_MIDI_PORTMIDI 1)
|
||||
endif()
|
||||
|
||||
set(DEFAULT_FONT_PATH ${CMAKE_INSTALL_PREFIX}/share/xsystem35/fonts/)
|
||||
endif()
|
||||
|
||||
|
||||
# Menu
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
set(SRC_MENU menu_emscripten.c)
|
||||
elseif (GTK2_FOUND)
|
||||
elseif (ANDROID)
|
||||
set(SRC_MENU menu_android.c)
|
||||
elseif (ENABLE_GTK)
|
||||
set(SRC_MENU menu.c menu_callback.c menu_gui.c s39init.c)
|
||||
|
||||
# i18n support (currently only menus are translated)
|
||||
@@ -100,31 +96,18 @@ elseif (GTK2_FOUND)
|
||||
include_directories(${Intl_INCLUDE_DIRS})
|
||||
link_libraries(${Intl_LIBRARIES})
|
||||
endif()
|
||||
else()
|
||||
set(SRC_MENU menu_null.c)
|
||||
endif()
|
||||
|
||||
# Graphics
|
||||
|
||||
if (X11_FOUND)
|
||||
set(SRC_GRAPHDEV xcore_draw.c xcore_video.c xcore_mode.c xcore_event.c xcore_cursor.c xcore_maskupdate.c image.c xcore_image.c)
|
||||
set(SUMMARY_GRAPHDEV "X11")
|
||||
elseif (SDL2_FOUND)
|
||||
set(SRC_GRAPHDEV sdl_video.c sdl_mode.c sdl_draw.c sdl_event.c sdl_image.c sdl_cursor.c image.c)
|
||||
set(SUMMARY_GRAPHDEV "SDL2")
|
||||
set(ENABLE_SDL 1)
|
||||
else()
|
||||
message(FATAL_ERROR "*** No graphic device available ***")
|
||||
else ()
|
||||
set(SRC_MENU menu_sdl.c sdl_input.c)
|
||||
endif()
|
||||
|
||||
# PCM audio
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
list(APPEND SRC_AUDIO)
|
||||
list(APPEND SRC_AUDIO pcm.emscripten.c bgm.dummy.c)
|
||||
list(APPEND SRC_AUDIO pcm.emscripten.c bgm.emscripten.c bgi.c)
|
||||
list(APPEND SUMMARY_AUDIO "Emscripten")
|
||||
elseif (SDL2MIXER_FOUND)
|
||||
list(APPEND SRC_AUDIO pcm.sdlmixer.c bgm.sdlmixer.c)
|
||||
list(APPEND SRC_AUDIO pcm.sdlmixer.c bgm.sdlmixer.c bgi.c)
|
||||
list(APPEND SUMMARY_AUDIO "SDL_mixer")
|
||||
set(ENABLE_SDLMIXER 1)
|
||||
else()
|
||||
@@ -173,7 +156,6 @@ else()
|
||||
list(APPEND SUMMARY_MIDI "raw")
|
||||
set(MIDI_DEVICE "/dev/midi" CACHE STRING "midi device")
|
||||
set(ENABLE_MIDI_RAWMIDI 1)
|
||||
option(QUIET_MIDI "No display midi stdout" OFF)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
@@ -183,6 +165,7 @@ else()
|
||||
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")
|
||||
@@ -193,50 +176,13 @@ else()
|
||||
list(APPEND SUMMARY_MIDI "SDL_mixer")
|
||||
set(ENABLE_MIDI_SDLMIXER 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Joystick
|
||||
|
||||
if (EMSCRIPTEN OR ANDROID)
|
||||
set(SRC_JOYSTICK joystick_dmy.c)
|
||||
elseif (ENABLE_SDL)
|
||||
set(SRC_JOYSTICK joystick_sdl.c)
|
||||
set(SUMMARY_JOYSTICK "SDL")
|
||||
set(HAVE_SDLJOY 1)
|
||||
else()
|
||||
check_include_file(linux/joystick.h HAVE_LINUX_JOYSTICK_H)
|
||||
if (HAVE_LINUX_JOYSTICK_H)
|
||||
set(SRC_JOYSTICK joystick_linux.c)
|
||||
set(SUMMARY_JOYSTICK "Linux ioctl")
|
||||
set(JOY_DEVICE "/dev/js0" CACHE STRING "joystick device")
|
||||
else ()
|
||||
set(SRC_JOYSTICK joystick_dmy.c)
|
||||
endif ()
|
||||
if (HAVE_PORTMIDI AND ENABLE_MIDI_PORTMIDI)
|
||||
list(APPEND SRC_MIDI midi.portmidi.c)
|
||||
list(APPEND SUMMARY_MIDI "PortMidi")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Font
|
||||
|
||||
if (X11_FOUND)
|
||||
list(APPEND SRC_FONT font_x11.c)
|
||||
list(APPEND SUMMARY_FONT "x11")
|
||||
set(ENABLE_X11FONT 1)
|
||||
endif()
|
||||
if (FREETYPE_FOUND)
|
||||
list(APPEND SRC_FONT font_freetype2.c)
|
||||
list(APPEND SUMMARY_FONT "freetype2")
|
||||
set(ENABLE_FT2 1)
|
||||
endif()
|
||||
if (NOT X11_FOUND AND SDL2TTF_FOUND)
|
||||
list(APPEND SRC_FONT font_sdlttf.c)
|
||||
list(APPEND SUMMARY_FONT "SDL_ttf")
|
||||
set(ENABLE_SDLTTF 1)
|
||||
endif()
|
||||
if (NOT SRC_FONT)
|
||||
message(FATAL_ERROR "*** No font device available ***")
|
||||
endif()
|
||||
|
||||
# TODO: MMX
|
||||
|
||||
function (print_summary name)
|
||||
if (ARGN)
|
||||
list(JOIN ARGN ", " MSG)
|
||||
@@ -248,12 +194,9 @@ endfunction()
|
||||
|
||||
message("xsystem35 summary:")
|
||||
message("------------------")
|
||||
print_summary(graphics ${SUMMARY_GRAPHDEV})
|
||||
print_summary(audio ${SUMMARY_AUDIO})
|
||||
print_summary(cdrom ${SUMMARY_CDROM})
|
||||
print_summary(midi ${SUMMARY_MIDI})
|
||||
print_summary(font ${SUMMARY_FONT})
|
||||
print_summary(joystick ${SUMMARY_JOYSTICK})
|
||||
message("------------------")
|
||||
|
||||
set(PACKAGE ${PROJECT_NAME})
|
||||
@@ -269,7 +212,5 @@ if (ENABLE_NLS)
|
||||
add_subdirectory(po)
|
||||
endif()
|
||||
|
||||
if (ENABLE_MODULES)
|
||||
add_subdirectory(modules)
|
||||
target_link_libraries(xsystem35 PRIVATE modules)
|
||||
endif()
|
||||
add_subdirectory(modules)
|
||||
target_link_libraries(xsystem35 PRIVATE modules)
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
|
||||
System 3.5 for X Window System Version 1.7 (開発版)
|
||||
|
||||
インストールドキュメント
|
||||
|
||||
|
||||
0. 目次
|
||||
|
||||
1. 必要環境と対応機能
|
||||
2. コンパイルとインストール
|
||||
3. コンパイル時のオプション
|
||||
4. サポート
|
||||
|
||||
|
||||
1. 必要環境と対応機能
|
||||
|
||||
1.1 必要環境
|
||||
* X11R6
|
||||
* gtk+ 2.0.0 以上
|
||||
* SYSV IPC in kernel
|
||||
* zlib
|
||||
* Ogg Vorbis library (libvorbis)
|
||||
|
||||
1.2 推奨環境
|
||||
* スケーラブルフォント(例えば X-TT など)
|
||||
(http://X-TT.dsl.gr.jp/index-ja.html)
|
||||
* MIT-SHM extension をサポートした X Server。次のようにチェックします。
|
||||
$ xdpyinfo | grep MIT-SHM
|
||||
* MMX Pentinum 以降 (for IA32 platform)
|
||||
|
||||
1.3 対応機能
|
||||
* ALSA (for Linux) 0.9.x 以上
|
||||
(http://www.alsa-project.org/)
|
||||
* ESD (Esound) 0.2.8 以上
|
||||
(http://www.tux.org/~ricdude/EsounD.html)
|
||||
(ftp://ftp.gnome.org/pub/GNOME/stable/sources/esound/ or mirrors)
|
||||
* Joystick (for Linux kernel 2.2.x)
|
||||
* SDL(Simple DirectMedia Layer) 1.0.x 以上
|
||||
(http://www.devolution.com/~slouken/SDL)
|
||||
* FreeType Library 2.0 以上
|
||||
(http://www.freetype.org/)
|
||||
* midi デバイス(OSS /dev/midi, /dev/sequencer)を介した外部/仮想MIDI音源
|
||||
|
||||
1.4 注意点
|
||||
* コンパイルには GNU Make (gmake) と gtk-config と nasm (assembler)
|
||||
が必要です。(nasm は IA-32 platform のみ)
|
||||
* また gcc 以外でのコンパイルは多分出来ないと思います。標準 cc でコンパイル
|
||||
を通すためのパッチは大歓迎です。
|
||||
|
||||
|
||||
2. コンパイルとインストール
|
||||
|
||||
2.1 プログラムのコンパイルとインストール
|
||||
|
||||
$ tar xvfz xsystem35-(version).tar.gz # ソースコードの展開
|
||||
$ cd xsystem35-(version) # xsystem35 のトップディレクトリに移動
|
||||
$ cp src/xsys35rc.sample ~/.xsys35rc # 設定ファイルのコピー
|
||||
$ ./configure # `configure' スクリプトの実行
|
||||
$ make # xsystem35 のコンパイル
|
||||
[必要なら root になる]
|
||||
# make install # xsystem35 のインストール
|
||||
|
||||
default では make install で /usr/local/bin にインストールされます。
|
||||
|
||||
2.2 ゲームデータのインストール
|
||||
|
||||
contrib ディレクトリにゲームデータをインストールするプログラムが入っています。
|
||||
/cdromにCD-ROMをマウントした後、
|
||||
|
||||
$ cd ./contrib
|
||||
$ ./instgame kichiku.inf
|
||||
|
||||
のようにしてインストールします。 詳しくは contrib/README.TXTを御覧下さい。
|
||||
|
||||
|
||||
3. コンパイル時のオプション
|
||||
|
||||
$ ./configure --help
|
||||
で使用可能なオプションの一覧がでます。
|
||||
|
||||
* audio 関連
|
||||
|
||||
--enable-audio=xxx
|
||||
オーディオデバイスのうち xxx を有効にしてコンパイルします。xxx には今の所
|
||||
oss, alsa, esd が使えます。カンマで区切って並べて指定する事で複数のデバイ
|
||||
スをゲーム起動時に選択できます。(ex. --enable-audio=oss,alsa,esd)
|
||||
このオプションを指定しない時は OS ごとに適切なデバイスが組み込まれます。
|
||||
|
||||
--with-default-output=xxx
|
||||
--enable-audioで複数のデバイスを選択した時、デフォルトのデバイスをこの
|
||||
オプションで指定できます。指定しない場合は使用可能なデバイスのうち任意の
|
||||
デバイスを使用します。
|
||||
|
||||
--with-oss-audiodev=xxx
|
||||
OSS での DSP デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/dsp です。(*1)
|
||||
|
||||
--with-oss-mixerdev=xxx
|
||||
OSS での MIXER デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/mixer です。(*1)
|
||||
|
||||
--enable-cdrom=xxx
|
||||
CD-ROM デバイスのうち xxx を有効にしてコンパイルします。CD-DA の代わりに
|
||||
MP3などを外部プレイヤを使って演奏することも出来ます。xxx には linux,bsd,
|
||||
mp3 が使えます。
|
||||
カンマで区切って並べて指定することで複数のデバイスをゲーム起動時に選択
|
||||
できます。(ex. --enable-cdrom=linux,mp3)
|
||||
CD-DA を使うか MP3 を使うかの指定については README.music を御覧下さい。
|
||||
このオプションを指定しない時は OS ごとに適切なデバイスが組み込まれます。
|
||||
|
||||
--with-cdromdev=xxx
|
||||
CD-ROM デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/cdrom です。(*1)
|
||||
|
||||
--enable-midi=xxx
|
||||
MIDI デバイスのうち xxx を有効にしてコンパイルします。xxx にはいまのところ
|
||||
extp,raw,seq が使えます。extp は外部プレイヤを使って MIDI を演奏します。
|
||||
raw は Raw midi デバイス (/dev/midiなど)を通して外部MIDI機器を接続している
|
||||
場合に使います。seq は OSS sequencer device (/dev/sequencer) を通して MIDI
|
||||
機器を接続している場合に使います。カンマで区切って並べて指定することで複数
|
||||
のデバイスをゲーム起動時に選択できます。(ex. --enable-midi=extp,raw,seq)
|
||||
|
||||
--with-mididev=xxx
|
||||
Raw MIDI デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/midi です。(*1)
|
||||
|
||||
--with-seqdev=xxx
|
||||
Sequencer MIDI デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/sequencer です。(*1)
|
||||
|
||||
--with-midiplayer=xxx
|
||||
外部 MIDI プレイヤを指定します。デフォルトは midiplay -4 です。(*1)
|
||||
|
||||
--enable-qmidi
|
||||
外部 MIDI プレイヤを実行する際に、プレイヤーの実行時メッセージを抑止
|
||||
します。
|
||||
|
||||
|
||||
* graphics 関連
|
||||
|
||||
--enable-sdl
|
||||
SDL を有効にしてコンパイルします。
|
||||
|
||||
--enable-bgr
|
||||
X server の color order が BGR の時指定します。SunとSGIのプラットフォーム
|
||||
ではデフォルトでこの指定が有効になっています。それ以外のプラットフォーム
|
||||
では不要です。ただし、sgi O2 および、Sun sparc のマシンの中には RGB の
|
||||
並びのものもあるので、その場合は --enable-bgr=no あるいは --disable-bgr
|
||||
としてください。詳しくは doc/README.color を御覧下さい。
|
||||
|
||||
|
||||
* その他
|
||||
|
||||
--enable-joy
|
||||
Joystic support を有効にしてコンパイルします。Linux kernel 2.2 以降に
|
||||
対応しています。
|
||||
|
||||
--with-joydev=xxx
|
||||
Joystick デバイスのデバイスファイルを xxx で指定します。デフォルトは
|
||||
/dev/js0 です。(*1)
|
||||
|
||||
--with-locale=xxxx
|
||||
X の locale 機構を使う場合に指定します。Linux libc5 System 等では通常
|
||||
使用している locale を指定して下さい。(ex. --with-locale=ja_JP.ujis)
|
||||
それ以外では必要無いと思います。
|
||||
|
||||
--with-cachesize=xxxx
|
||||
データキャッシュの大きさを指定します。単位は MB で、デフォルトは 20MB
|
||||
です。データのほとんどは展開済み CG のキャッシュに使われます。シナリオ
|
||||
などのデータは mmap を使っていますので、キャッシングは xsystem35 の管理
|
||||
外です。
|
||||
|
||||
--enable-mmx
|
||||
IA32 プラットフォームで MMX を使うようにします。nasm というアセンブラが
|
||||
必要になります。IA32 ではデフォルトで有効にします。無効にする場合は =no
|
||||
を指定して下さい。実行時に MMX 命令が使用可能かどうかチェックしますので、
|
||||
MMX 命令を持たないCPUでも有効のままでかまいません。
|
||||
|
||||
--enable-debug
|
||||
debuging を有効にします。
|
||||
有効にしてコンパイルすると -debuglv # オプションが使えるようになります。
|
||||
debug level に関しては src/xsystem35.h を参照して下さい。
|
||||
|
||||
## (*1) 実行時に読み込む設定ファイル ~/.xsys35rc でも指定できます。
|
||||
|
||||
|
||||
参考: 私の開発時の configure オプション(実際には1行です)
|
||||
|
||||
./configure --enable-midi=extp,raw,seq --enable-audio=oss,alsa,esd
|
||||
--enable-cdrom=linux,mp3 --enable-debug
|
||||
|
||||
4. サポート
|
||||
|
||||
http://www.aist-nara.ac.jp/~masaki-c/private/unitbase/xsys35/index.html
|
||||
または READMEの 8. サポートの項を御覧下さい。
|
||||
@@ -1,26 +1,87 @@
|
||||
# xsytem35-sdl2
|
||||
|
||||
This is a multi-platform port of xsystem35, a free implementation of AriceSoft's System3.x game engine.
|
||||
This is a multi-platform port of `xsystem35`, a free implementation of
|
||||
AliceSoft's System 3.x game engine.
|
||||
|
||||
## Download
|
||||
Prebuilt binaries for Windows and Android can be downloaded from the [Releases](https://github.com/kichikuou/xsystem35-sdl2/releases) page.
|
||||
## Unique Features
|
||||
|
||||
## Build
|
||||
In addition to the original System 3.x's functionalities, xsystem35-sdl2 has
|
||||
the following features.
|
||||
|
||||
### Playing audio files as fake CD music
|
||||
|
||||
Many System 3.x games had music as audio tracks on the CD-ROM. Xsystem35 can
|
||||
play music from audio files instead, to avoid the hassle of inserting CDs. To
|
||||
use ripped audio files, create a file named `playlist.txt` in the game
|
||||
directory, and enter the paths to your tracks, one per line. For example:
|
||||
|
||||
```
|
||||
# The first line is not used
|
||||
BGM/track02.mp3
|
||||
BGM/track03.mp3
|
||||
...
|
||||
```
|
||||
|
||||
The first line is not used, because track 1 of game CD is usually a data track.
|
||||
|
||||
### Unicode translation support
|
||||
|
||||
The original System 3.x only supported Shift_JIS (a Japanese character
|
||||
encoding), but xsystem35 supports Unicode and is able to run games translated
|
||||
into languages other than Japanese and English.
|
||||
|
||||
See [xsys35c](https://github.com/kichikuou/xsys35c)'s document for how to
|
||||
build a game with Unicode mode.
|
||||
|
||||
### Debugging
|
||||
|
||||
Xsystem35 has a built-in debugger that allows you to step through the game and
|
||||
examine / modify variables in the game. There are two ways to use the debugger:
|
||||
|
||||
- Through [Visual Studio Code](https://code.visualstudio.com/) (recommended):
|
||||
The [vscode-system3x](https://github.com/kichikuou/vscode-system3x) extension
|
||||
provides graphical debugging interface for System 3.x.
|
||||
- Using CUI debugger: Running xsystem35 with `-debugger` option will start the
|
||||
debugger with console interface. Type `help` to see a list of available
|
||||
commands.
|
||||
|
||||
## Installing
|
||||
|
||||
Prebuilt packages for Windows and Android can be downloaded from the
|
||||
[Releases](https://github.com/kichikuou/xsystem35-sdl2/releases) page. For
|
||||
other platforms, see the [Building](#building) section.
|
||||
|
||||
## Running
|
||||
### Windows
|
||||
|
||||
Execute `xsytem35`, and it will show a dialog to select a folder. Select the
|
||||
game folder (where the ALD files are located).
|
||||
|
||||
### Android
|
||||
|
||||
See [android/README.md](https://github.com/kichikuou/xsystem35-sdl2/blob/master/android/README.md#use).
|
||||
|
||||
### Other Platforms
|
||||
|
||||
Run xsystem35 from within the game directory.
|
||||
|
||||
cd /path/to/game_directory
|
||||
xsystem35
|
||||
|
||||
## Building
|
||||
### Linux (Debian / Ubuntu)
|
||||
|
||||
$ sudo apt install build-essential cmake libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
||||
$ sudo apt install build-essential cmake libgtk-3-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libwebp-dev libcjson-dev
|
||||
$ mkdir -p out/debug
|
||||
$ cd out/debug
|
||||
$ cmake -DCMAKE_BUILD_TYPE=Debug ../../
|
||||
$ make && make install
|
||||
|
||||
You can choose between X11 and SDL2 as the graphics backend. If both libraries are found, X11 is used by default, but if `-DENABLE_X11=NO` flag is given to the `cmake` invocation, then SDL2 will be used.
|
||||
|
||||
### MacOS
|
||||
|
||||
[Homebrew](https://brew.sh/index_ja) is needed.
|
||||
|
||||
$ brew install cmake pkg-config sdl2 sdl2_mixer freetype libjpeg
|
||||
$ brew install cmake pkg-config sdl2 sdl2_mixer sdl2_ttf libjpeg webp cjson
|
||||
$ mkdir -p out/debug
|
||||
$ cd out/debug
|
||||
$ cmake -DCMAKE_BUILD_TYPE=Debug ../../
|
||||
@@ -30,7 +91,7 @@ You can choose between X11 and SDL2 as the graphics backend. If both libraries a
|
||||
|
||||
[MSYS2](https://www.msys2.org) is needed.
|
||||
|
||||
$ pacman -S cmake mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-libjpeg-turbo
|
||||
$ pacman -S cmake mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libwebp mingw-w64-x86_64-cjson
|
||||
$ mkdir -p out/debug
|
||||
$ cd out/debug
|
||||
$ cmake -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug ../../
|
||||
@@ -43,7 +104,9 @@ You can choose between X11 and SDL2 as the graphics backend. If both libraries a
|
||||
$ emcmake cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../../
|
||||
$ make
|
||||
|
||||
To use the generated binary, checkout [Kichikuou on Web](https://github.com/kichikuou/web) and copy `out/xsystem35.*` into its `docs` directory.
|
||||
To use the generated binary, checkout
|
||||
[Kichikuou on Web](https://github.com/kichikuou/web) and copy `out/xsystem35.*`
|
||||
into its `docs` directory.
|
||||
|
||||
### Android
|
||||
|
||||
|
||||
+12
-11
@@ -5,8 +5,8 @@ Prebuilt APKs are [here](https://github.com/kichikuou/xsystem35-sdl2/releases).
|
||||
|
||||
## Build
|
||||
Prerequisites:
|
||||
- CMake >=3.13
|
||||
- Android SDK >=26
|
||||
- CMake >=3.20
|
||||
- Android SDK >=28
|
||||
- Android NDK >=r15c
|
||||
|
||||
### Using Android Studio
|
||||
@@ -15,20 +15,21 @@ Open this directory as an Android Studio project.
|
||||
### Command line build
|
||||
Configure environment variables and run the `gradlew` script in this folder.
|
||||
|
||||
Example build instructions (for Debian Stretch):
|
||||
Example build instructions (for Debian bullseye):
|
||||
```sh
|
||||
# Install necessary packages
|
||||
sudo apt install git wget unzip default-jdk-headless ninja-build
|
||||
sudo apt -t stretch-backports install cmake
|
||||
sudo apt install -t bullseye-backports cmake
|
||||
|
||||
# Install Android SDK / NDK
|
||||
export ANDROID_HOME=$HOME/android-sdk
|
||||
export PATH=$PATH:$ANDROID_HOME/tools
|
||||
export PATH=$PATH:$ANDROID_HOME/platform-tools
|
||||
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
|
||||
unzip sdk-tools-linux-4333796.zip -d $ANDROID_HOME
|
||||
yes |$ANDROID_HOME/tools/bin/sdkmanager --licenses
|
||||
$ANDROID_HOME/tools/bin/sdkmanager ndk-bundle
|
||||
export ANDROID_SDK_ROOT=$HOME/android-sdk
|
||||
mkdir -p $ANDROID_SDK_ROOT/cmdline-tools
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
|
||||
unzip commandlinetools-linux-7583922_latest.zip -d $ANDROID_SDK_ROOT/cmdline-tools
|
||||
mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/tools
|
||||
yes |$ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager --licenses
|
||||
$ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager ndk-bundle
|
||||
export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk-bundle
|
||||
|
||||
# Check out and build xsystem35
|
||||
git clone https://github.com/kichikuou/xsystem35-sdl2.git
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
|
||||
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY')
|
||||
def buildAsApplication = !buildAsLibrary
|
||||
if (buildAsApplication) {
|
||||
apply plugin: 'com.android.application'
|
||||
@@ -9,15 +9,15 @@ else {
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
compileSdkVersion 31
|
||||
defaultConfig {
|
||||
if (buildAsApplication) {
|
||||
applicationId "io.github.kichikuou.xsystem35"
|
||||
}
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 26
|
||||
versionCode 4
|
||||
versionName "0.2.1"
|
||||
targetSdkVersion 31
|
||||
versionCode 7
|
||||
versionName "2.3.0"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static"
|
||||
|
||||
@@ -2,28 +2,22 @@ cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
project(GAME)
|
||||
|
||||
# armeabi-v7a requires cpufeatures library
|
||||
# include(AndroidNdkModules)
|
||||
# android_ndk_import_module_cpufeatures()
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
SDL
|
||||
URL http://libsdl.org/release/SDL2-2.0.12.tar.gz
|
||||
URL_HASH SHA1=e8ba91bf5eb438dbcf1fedf0530a1bcbe30d3bb6
|
||||
PATCH_COMMAND patch -p1 -i ${CMAKE_CURRENT_LIST_DIR}/SDL.patch
|
||||
URL https://libsdl.org/release/SDL2-2.0.20.tar.gz
|
||||
URL_HASH SHA1=18ce006cbf07502f48abfedc088c14404091f3d3
|
||||
)
|
||||
# TODO: Use SDL2_ttf 2.0.16 once released
|
||||
FetchContent_Declare(
|
||||
SDL_ttf
|
||||
URL https://hg.libsdl.org/SDL_ttf/archive/d56d67db41d8.tar.gz # rev 420
|
||||
URL_HASH SHA1=143089a2b2973a5baeee0914af43608cfe8e1d87
|
||||
URL https://github.com/libsdl-org/SDL_ttf/archive/refs/tags/release-2.0.18.tar.gz
|
||||
URL_HASH SHA1=6fc5130757b447d46c3da6abd58687e8576de8b8
|
||||
)
|
||||
# TODO: Use SDL2_mixer 2.0.5 once released
|
||||
FetchContent_Declare(
|
||||
SDL_mixer
|
||||
URL https://hg.libsdl.org/SDL_mixer/archive/d2686bcfcba2.tar.gz # rev 1127
|
||||
URL_HASH SHA1=4e62e29bd5628b262b3ffb6d5d29861c76a1500e
|
||||
GIT_REPOSITORY https://github.com/libsdl-org/SDL_mixer.git
|
||||
GIT_TAG 6845d9f3cb3f35542f1ec7e74dba6b30bf968959
|
||||
)
|
||||
|
||||
# Compilation of SDL and companion libraries
|
||||
@@ -42,10 +36,6 @@ if(NOT sdl_mixer_POPULATED)
|
||||
FetchContent_Populate(SDL_mixer)
|
||||
SET(SUPPORT_OGG ON CACHE BOOL "Enable OGG support in SDL_mixer" FORCE)
|
||||
add_subdirectory(${sdl_mixer_SOURCE_DIR} ${sdl_mixer_BINARY_DIR})
|
||||
# Workaround for CMakeLists.txt bugs of SDL_mixer.
|
||||
# TODO: Fix these in upstream
|
||||
add_library(vorbisfile INTERFACE)
|
||||
target_include_directories(SDL2_mixer PUBLIC ${sdl_mixer_SOURCE_DIR}/include)
|
||||
target_compile_definitions(SDL2_mixer PRIVATE MUSIC_WAV)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e7ab00feb..d86f0087a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2053,6 +2053,12 @@ if(SDL_SHARED)
|
||||
set_property(TARGET SDL2 APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc")
|
||||
target_compile_definitions(SDL2 PRIVATE IOS_DYLIB=1)
|
||||
endif()
|
||||
+ if (ANDROID)
|
||||
+ # Link the cpufeatures library in Android NDK.
|
||||
+ # Since we don't use a SDK-bundled CMAKE, AndroidNdkModules module cannot be used.
|
||||
+ target_include_directories(SDL2 PRIVATE ${ANDROID_NDK}/sources/android/cpufeatures)
|
||||
+ target_sources(SDL2 PRIVATE ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
@@ -37,10 +37,14 @@
|
||||
android:name="android.hardware.microphone"
|
||||
android:required="false" /> -->
|
||||
|
||||
<!-- Allow writing to external storage -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<!-- Allow downloading to the external storage on Android 5.1 and older -->
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="22" /> -->
|
||||
|
||||
<!-- Allow access to Bluetooth devices -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH" /> -->
|
||||
<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /> -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> -->
|
||||
|
||||
<!-- Allow access to the vibrator -->
|
||||
<!-- <uses-permission android:name="android.permission.VIBRATE" /> -->
|
||||
|
||||
@@ -64,7 +68,9 @@
|
||||
<meta-data android:name="SDL_ENV.SDL_ACCELEROMETER_AS_JOYSTICK" android:value="0"/>
|
||||
-->
|
||||
|
||||
<activity android:name=".LauncherActivity">
|
||||
<activity android:name=".LauncherActivity"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
@@ -74,7 +80,7 @@
|
||||
<activity android:name=".GameActivity"
|
||||
android:label="@string/app_name"
|
||||
android:alwaysRetainTaskState="true"
|
||||
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:hardwareAccelerated="true"
|
||||
>
|
||||
|
||||
@@ -17,9 +17,13 @@
|
||||
*/
|
||||
package io.github.kichikuou.xsystem35
|
||||
|
||||
import android.app.AlertDialog
|
||||
import android.media.MediaPlayer
|
||||
import android.os.Bundle
|
||||
import android.text.InputType
|
||||
import android.util.Log
|
||||
import android.widget.EditText
|
||||
import android.widget.NumberPicker
|
||||
import org.libsdl.app.SDLActivity
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
@@ -38,7 +42,7 @@ class GameActivity : SDLActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
gameRoot = File(intent.getStringExtra(EXTRA_GAME_ROOT))
|
||||
gameRoot = File(intent.getStringExtra(EXTRA_GAME_ROOT)!!)
|
||||
cdda = CddaPlayer(File(gameRoot, Launcher.PLAYLIST_FILE))
|
||||
}
|
||||
|
||||
@@ -55,11 +59,11 @@ class GameActivity : SDLActivity() {
|
||||
}
|
||||
|
||||
override fun getLibraries(): Array<String> {
|
||||
return arrayOf("hidapi", "SDL2", "xsystem35")
|
||||
return arrayOf("SDL2", "xsystem35")
|
||||
}
|
||||
|
||||
override fun getArguments(): Array<String> {
|
||||
return arrayOf("-gamedir", intent.getStringExtra(EXTRA_GAME_ROOT))
|
||||
return arrayOf("-gamedir", intent.getStringExtra(EXTRA_GAME_ROOT)!!)
|
||||
}
|
||||
|
||||
override fun setTitle(title: CharSequence?) {
|
||||
@@ -74,13 +78,82 @@ class GameActivity : SDLActivity() {
|
||||
Launcher.updateGameList()
|
||||
}
|
||||
|
||||
// These functions are called in the SDL thread by JNI.
|
||||
private fun textInputDialog(msg: String, oldVal: String, maxLen: Int, result: Array<String?>) {
|
||||
val input = EditText(this)
|
||||
input.inputType = InputType.TYPE_CLASS_TEXT
|
||||
input.setText(oldVal)
|
||||
AlertDialog.Builder(this)
|
||||
.setMessage(msg)
|
||||
.setView(input)
|
||||
.setPositiveButton(R.string.ok) {_, _ ->
|
||||
val s = input.text.toString()
|
||||
result[0] = if (s.length <= maxLen) s else s.substring(0, maxLen)
|
||||
}
|
||||
.setNegativeButton(R.string.cancel) {_, _ -> }
|
||||
.setOnDismissListener {
|
||||
synchronized(result) {
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (result as Object).notify()
|
||||
}
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun numberInputDialog(msg: String, min: Int, max: Int, initial: Int, result: IntArray) {
|
||||
val input = NumberPicker(this)
|
||||
input.minValue = min
|
||||
input.maxValue = max
|
||||
input.value = initial
|
||||
AlertDialog.Builder(this)
|
||||
.setMessage(msg)
|
||||
.setView(input)
|
||||
.setPositiveButton(R.string.ok) {_, _ ->
|
||||
input.clearFocus()
|
||||
result[0] = input.value
|
||||
}
|
||||
.setNegativeButton(R.string.cancel) {_, _ -> }
|
||||
.setOnDismissListener {
|
||||
synchronized(result) {
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (result as Object).notify()
|
||||
}
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
// The functions below are called in the SDL thread by JNI.
|
||||
@Suppress("unused") fun cddaStart(track: Int, loop: Boolean) = cdda.start(track, loop)
|
||||
@Suppress("unused") fun cddaStop() = cdda.stop()
|
||||
@Suppress("unused") fun cddaCurrentPosition() = cdda.currentPosition()
|
||||
@Suppress("unused") fun midiStart(path: String, loop: Boolean) = midi.start(path, loop)
|
||||
@Suppress("unused") fun midiStop() = midi.stop()
|
||||
@Suppress("unused") fun midiCurrentPosition() = midi.currentPosition()
|
||||
|
||||
@Suppress("unused") fun inputString(msg: String, oldVal: String, maxLen: Int): String? {
|
||||
val result = arrayOfNulls<String?>(1)
|
||||
runOnUiThread { textInputDialog(msg, oldVal, maxLen, result) }
|
||||
// Block the calling thread.
|
||||
synchronized(result) {
|
||||
try {
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (result as Object).wait()
|
||||
} catch (ex: InterruptedException) {
|
||||
ex.printStackTrace()
|
||||
}
|
||||
}
|
||||
return result[0]
|
||||
}
|
||||
|
||||
@Suppress("unused") fun inputNumber(msg: String, min: Int, max: Int, initial: Int): Int {
|
||||
val result = intArrayOf(-1)
|
||||
runOnUiThread { numberInputDialog(msg, min, max, initial, result) }
|
||||
// Block the calling thread.
|
||||
synchronized(result) {
|
||||
try {
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (result as Object).wait()
|
||||
} catch (ex: InterruptedException) {
|
||||
ex.printStackTrace()
|
||||
}
|
||||
}
|
||||
return result[0]
|
||||
}
|
||||
}
|
||||
|
||||
private class CddaPlayer(private val playlistPath: File) {
|
||||
@@ -89,14 +162,14 @@ private class CddaPlayer(private val playlistPath: File) {
|
||||
playlistPath.readLines()
|
||||
} catch (e: IOException) {
|
||||
Log.e("loadPlaylist", "Cannot load $playlistPath", e)
|
||||
emptyList<String>()
|
||||
emptyList()
|
||||
}
|
||||
private var currentTrack = 0
|
||||
private val player = MediaPlayer()
|
||||
private var playerPaused = false
|
||||
|
||||
fun start(track: Int, loop: Boolean) {
|
||||
val f = playlist.elementAtOrNull(track)
|
||||
val f = playlist.elementAtOrNull(track - 1)
|
||||
if (f.isNullOrEmpty()) {
|
||||
Log.w("cddaStart", "No playlist entry for track $track")
|
||||
return
|
||||
|
||||
@@ -47,7 +47,8 @@ private const val FAILURE = 2
|
||||
class Launcher private constructor(private val rootDir: File) {
|
||||
companion object {
|
||||
const val TITLE_FILE = "title.txt"
|
||||
const val PLAYLIST_FILE = "playlist.txt"
|
||||
const val PLAYLIST_FILE = "playlist2.txt"
|
||||
const val OLD_PLAYLIST_FILE = "playlist.txt"
|
||||
|
||||
fun getInstance(rootDir: File): Launcher {
|
||||
if (gLauncher == null) {
|
||||
@@ -109,7 +110,7 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
private fun updateGameList() {
|
||||
var saveDirFound = false
|
||||
games.clear()
|
||||
for (path in rootDir.listFiles()) {
|
||||
for (path in rootDir.listFiles() ?: emptyArray()) {
|
||||
if (!path.isDirectory)
|
||||
continue
|
||||
if (path.name == SAVE_DIR) {
|
||||
@@ -120,6 +121,7 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
val titleFile = File(path, TITLE_FILE)
|
||||
val title = titleFile.readText()
|
||||
games.add(Entry(path, title, titleFile.lastModified()))
|
||||
migratePlaylist(path)
|
||||
} catch (e: IOException) {
|
||||
// Incomplete game installation. Delete it.
|
||||
path.deleteRecursively()
|
||||
@@ -144,7 +146,7 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
// Throws IOException
|
||||
fun exportSaveData(output: OutputStream) {
|
||||
ZipOutputStream(output.buffered()).use { zip ->
|
||||
for (path in File(rootDir, SAVE_DIR).listFiles()) {
|
||||
for (path in File(rootDir, SAVE_DIR).listFiles() ?: emptyArray()) {
|
||||
if (path.isDirectory || path.name.endsWith(".asd."))
|
||||
continue
|
||||
val pathInZip = "${SAVE_DIR}/${path.name}"
|
||||
@@ -189,7 +191,7 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
val path = File(outDir, zipEntry.name)
|
||||
if (zipEntry.isDirectory)
|
||||
return@forEachZipEntry
|
||||
path.parentFile.mkdirs()
|
||||
path.parentFile?.mkdirs()
|
||||
handler.sendMessage(handler.obtainMessage(PROGRESS, zipEntry.name))
|
||||
FileOutputStream(path).buffered().use {
|
||||
zip.copyTo(it)
|
||||
@@ -209,6 +211,20 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
}
|
||||
}
|
||||
|
||||
// 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.
|
||||
private fun migratePlaylist(dir: File) {
|
||||
val oldPlaylist = File(dir, OLD_PLAYLIST_FILE)
|
||||
if (!oldPlaylist.exists())
|
||||
return
|
||||
var tracks = oldPlaylist.readLines()
|
||||
if (!tracks.isEmpty())
|
||||
tracks = tracks.subList(1, tracks.size)
|
||||
File(dir, PLAYLIST_FILE).writeText(tracks.joinToString("\n"))
|
||||
oldPlaylist.delete()
|
||||
}
|
||||
|
||||
// A helper class which generates xsystem35.gr and playlist.txt in the game root directory.
|
||||
private class GameConfigWriter {
|
||||
private val grb = StringBuilder()
|
||||
@@ -233,27 +249,27 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
fun maybeAdd(path: String) {
|
||||
val name = File(path).name
|
||||
|
||||
specialResources[name.toLowerCase(Locale.US)]?.let {
|
||||
grb.appendln("$it $path")
|
||||
specialResources[name.lowercase(Locale.US)]?.let {
|
||||
grb.appendLine("$it $path")
|
||||
return
|
||||
}
|
||||
aldRegex.matchEntire(name)?.let {
|
||||
val ext = it.groupValues[4].toUpperCase(Locale.US)
|
||||
val ext = it.groupValues[4].uppercase(Locale.US)
|
||||
val type = if (ext == "ALD") {
|
||||
aldType[it.groupValues[2].toLowerCase(Locale.US)]
|
||||
aldType[it.groupValues[2].lowercase(Locale.US)]
|
||||
} else {
|
||||
ext
|
||||
}
|
||||
val id = it.groupValues[3].toUpperCase(Locale.US)
|
||||
val id = it.groupValues[3].uppercase(Locale.US)
|
||||
if (type != null) {
|
||||
grb.appendln("$type$id $path")
|
||||
grb.appendLine("$type$id $path")
|
||||
basename = it.groupValues[1]
|
||||
}
|
||||
}
|
||||
audioRegex.matchEntire(name)?.let {
|
||||
val track = it.groupValues[1].toInt()
|
||||
if (track < audioFiles.size)
|
||||
audioFiles[track] = path
|
||||
if (0 < track && track <= audioFiles.size)
|
||||
audioFiles[track - 1] = path
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +277,7 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
|
||||
fun write(outDir: File) {
|
||||
for (id in 'A' .. 'Z') {
|
||||
grb.appendln("Save$id ../save/${basename}s${id.toLowerCase()}.asd")
|
||||
grb.appendLine("Save$id ../save/${basename}s${id.lowercase(Locale.US)}.asd")
|
||||
}
|
||||
val gr = grb.toString()
|
||||
Log.i("xsystem35.gr", gr)
|
||||
|
||||
@@ -25,8 +25,6 @@ import android.provider.OpenableColumns
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.ListView
|
||||
import android.widget.Toast
|
||||
@@ -37,12 +35,13 @@ private const val INSTALL_REQUEST = 1
|
||||
private const val SAVEDATA_EXPORT_REQUEST = 2
|
||||
private const val SAVEDATA_IMPORT_REQUEST = 3
|
||||
|
||||
class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, LauncherObserver {
|
||||
class LauncherActivity : Activity(), LauncherObserver {
|
||||
private lateinit var launcher: Launcher
|
||||
private var progressDialog: ProgressDialogFragment? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.launcher)
|
||||
|
||||
launcher = Launcher.getInstance(filesDir)
|
||||
launcher.observer = this
|
||||
@@ -51,7 +50,13 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
}
|
||||
|
||||
onGameListChange()
|
||||
listView.onItemLongClickListener = this
|
||||
val listView = findViewById<ListView>(R.id.list)
|
||||
listView.setOnItemClickListener { _, _, position, _ ->
|
||||
onListItemClick(position)
|
||||
}
|
||||
listView.setOnItemLongClickListener { _, _, position, _ ->
|
||||
onItemLongClick(position)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
@@ -59,8 +64,7 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
override fun onListItemClick(l: ListView?, v: View?, position: Int, id: Long) {
|
||||
super.onListItemClick(l, v, position, id)
|
||||
private fun onListItemClick(position: Int) {
|
||||
if (position < launcher.games.size) {
|
||||
startGame(launcher.games[position].path, null)
|
||||
} else {
|
||||
@@ -70,7 +74,7 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
}
|
||||
}
|
||||
|
||||
override fun onItemLongClick(a: AdapterView<*>?, v: View?, position: Int, id: Long): Boolean {
|
||||
private fun onItemLongClick(position: Int): Boolean {
|
||||
if (position < launcher.games.size) {
|
||||
AlertDialog.Builder(this).setTitle(R.string.uninstall_dialog_title)
|
||||
.setMessage(getString(R.string.uninstall_dialog_message, launcher.games[position].title))
|
||||
@@ -139,7 +143,8 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
override fun onGameListChange() {
|
||||
val items = launcher.titles.toMutableList()
|
||||
items.add(getString(R.string.install_from_zip))
|
||||
listAdapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, items)
|
||||
val listView = findViewById<ListView>(R.id.list)
|
||||
listView.adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, items)
|
||||
}
|
||||
|
||||
override fun onInstallProgress(path: String) {
|
||||
@@ -189,8 +194,11 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
val cursor = contentResolver.query(uri, null, null, null, null, null)
|
||||
cursor?.use {
|
||||
if (it.moveToFirst()) {
|
||||
val fname = it.getString(it.getColumnIndex(OpenableColumns.DISPLAY_NAME))
|
||||
return if (fname.endsWith(".zip", true)) fname.dropLast(4) else fname
|
||||
val column = it.getColumnIndex(OpenableColumns.DISPLAY_NAME)
|
||||
if (column >= 0) {
|
||||
val fname = it.getString(column)
|
||||
return if (fname.endsWith(".zip", true)) fname.dropLast(4) else fname
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
|
||||
@@ -564,10 +564,10 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
|
||||
return "Steam Controller";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public UsbDevice getDevice() {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open() {
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.bluetooth.BluetoothManager;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
@@ -104,36 +105,6 @@ public class HIDDeviceManager {
|
||||
private HIDDeviceManager(final Context context) {
|
||||
mContext = context;
|
||||
|
||||
// Make sure we have the HIDAPI library loaded with the native functions
|
||||
try {
|
||||
SDL.loadLibrary("hidapi");
|
||||
} catch (Throwable e) {
|
||||
Log.w(TAG, "Couldn't load hidapi: " + e.toString());
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setCancelable(false);
|
||||
builder.setTitle("SDL HIDAPI Error");
|
||||
builder.setMessage("Please report the following error to the SDL maintainers: " + e.getMessage());
|
||||
builder.setNegativeButton("Quit", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
try {
|
||||
// If our context is an activity, exit rather than crashing when we can't
|
||||
// call our native functions.
|
||||
Activity activity = (Activity)context;
|
||||
|
||||
activity.finish();
|
||||
}
|
||||
catch (ClassCastException cce) {
|
||||
// Context wasn't an activity, there's nothing we can do. Give up and return.
|
||||
}
|
||||
}
|
||||
});
|
||||
builder.show();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
HIDDeviceRegisterCallback();
|
||||
|
||||
mSharedPreferences = mContext.getSharedPreferences("hidapi", Context.MODE_PRIVATE);
|
||||
@@ -148,9 +119,6 @@ public class HIDDeviceManager {
|
||||
{
|
||||
mNextDeviceId = mSharedPreferences.getInt("next_device_id", 0);
|
||||
}
|
||||
|
||||
initializeUSB();
|
||||
initializeBluetooth();
|
||||
}
|
||||
|
||||
public Context getContext() {
|
||||
@@ -173,6 +141,9 @@ public class HIDDeviceManager {
|
||||
|
||||
private void initializeUSB() {
|
||||
mUsbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE);
|
||||
if (mUsbManager == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
// Logging
|
||||
@@ -275,6 +246,7 @@ public class HIDDeviceManager {
|
||||
0x15e4, // Numark
|
||||
0x162e, // Joytech
|
||||
0x1689, // Razer Onza
|
||||
0x1949, // Lab126, Inc.
|
||||
0x1bad, // Harmonix
|
||||
0x24c6, // PowerA
|
||||
};
|
||||
@@ -353,9 +325,18 @@ public class HIDDeviceManager {
|
||||
|
||||
private void connectHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
synchronized (this) {
|
||||
int interface_mask = 0;
|
||||
for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
|
||||
UsbInterface usbInterface = usbDevice.getInterface(interface_index);
|
||||
if (isHIDDeviceInterface(usbDevice, usbInterface)) {
|
||||
// Check to see if we've already added this interface
|
||||
// This happens with the Xbox Series X controller which has a duplicate interface 0, which is inactive
|
||||
int interface_id = usbInterface.getId();
|
||||
if ((interface_mask & (1 << interface_id)) != 0) {
|
||||
continue;
|
||||
}
|
||||
interface_mask |= (1 << interface_id);
|
||||
|
||||
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
|
||||
int id = device.getId();
|
||||
mDevicesById.put(id, device);
|
||||
@@ -368,11 +349,17 @@ public class HIDDeviceManager {
|
||||
private void initializeBluetooth() {
|
||||
Log.d(TAG, "Initializing Bluetooth");
|
||||
|
||||
if (mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
if (Build.VERSION.SDK_INT <= 30 &&
|
||||
mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE) || (Build.VERSION.SDK_INT < 18)) {
|
||||
Log.d(TAG, "Couldn't initialize Bluetooth, this version of Android does not support Bluetooth LE");
|
||||
return;
|
||||
}
|
||||
|
||||
// Find bonded bluetooth controllers and create SteamControllers for them
|
||||
mBluetoothManager = (BluetoothManager)mContext.getSystemService(Context.BLUETOOTH_SERVICE);
|
||||
if (mBluetoothManager == null) {
|
||||
@@ -555,6 +542,18 @@ public class HIDDeviceManager {
|
||||
////////// JNI interface functions
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public boolean initialize(boolean usb, boolean bluetooth) {
|
||||
Log.v(TAG, "initialize(" + usb + ", " + bluetooth + ")");
|
||||
|
||||
if (usb) {
|
||||
initializeUSB();
|
||||
}
|
||||
if (bluetooth) {
|
||||
initializeBluetooth();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean openDevice(int deviceID) {
|
||||
Log.v(TAG, "openDevice deviceID=" + deviceID);
|
||||
HIDDevice device = getDevice(deviceID);
|
||||
@@ -568,7 +567,14 @@ public class HIDDeviceManager {
|
||||
if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
|
||||
HIDDeviceOpenPending(deviceID);
|
||||
try {
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
|
||||
final int FLAG_MUTABLE = 0x02000000; // PendingIntent.FLAG_MUTABLE, but don't require SDK 31
|
||||
int flags;
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
flags = FLAG_MUTABLE;
|
||||
} else {
|
||||
flags = 0;
|
||||
}
|
||||
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);
|
||||
|
||||
@@ -53,7 +53,12 @@ class HIDDeviceUSB implements HIDDevice {
|
||||
public String getSerialNumber() {
|
||||
String result = null;
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
result = mDevice.getSerialNumber();
|
||||
try {
|
||||
result = mDevice.getSerialNumber();
|
||||
}
|
||||
catch (SecurityException exception) {
|
||||
//Log.w(TAG, "App permissions mean we cannot get serial number for device " + getDeviceName() + " message: " + exception.getMessage());
|
||||
}
|
||||
}
|
||||
if (result == null) {
|
||||
result = "";
|
||||
|
||||
@@ -2,7 +2,8 @@ package org.libsdl.app;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
import java.lang.Class;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
SDL library initialization
|
||||
@@ -51,16 +52,16 @@ 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 = 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");
|
||||
|
||||
// Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if
|
||||
// they've changed during updates.
|
||||
Method forceMethod = relinkClass.getDeclaredMethod("force");
|
||||
Object relinkInstance = forceMethod.invoke(null);
|
||||
Class relinkInstanceClass = relinkInstance.getClass();
|
||||
Class<?> relinkInstanceClass = relinkInstance.getClass();
|
||||
|
||||
// Actually load the library!
|
||||
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
|
||||
@@ -77,7 +78,7 @@ public class SDL {
|
||||
catch (final SecurityException se) {
|
||||
throw se;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected static Context mContext;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,10 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.media.*;
|
||||
import android.media.AudioFormat;
|
||||
import android.media.AudioManager;
|
||||
import android.media.AudioRecord;
|
||||
import android.media.AudioTrack;
|
||||
import android.media.MediaRecorder;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -43,6 +47,10 @@ public class SDLAudioManager
|
||||
if (desiredChannels > 2) {
|
||||
desiredChannels = 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* AudioTrack has sample rate limitation of 48000 (fixed in 5.0.2) */
|
||||
if (Build.VERSION.SDK_INT < 22) {
|
||||
if (sampleRate < 8000) {
|
||||
sampleRate = 8000;
|
||||
} else if (sampleRate > 48000) {
|
||||
@@ -199,7 +207,6 @@ public class SDLAudioManager
|
||||
results[0] = mAudioRecord.getSampleRate();
|
||||
results[1] = mAudioRecord.getAudioFormat();
|
||||
results[2] = mAudioRecord.getChannelCount();
|
||||
results[3] = desiredFrames;
|
||||
|
||||
} else {
|
||||
if (mAudioTrack == null) {
|
||||
@@ -223,8 +230,8 @@ public class SDLAudioManager
|
||||
results[0] = mAudioTrack.getSampleRate();
|
||||
results[1] = mAudioTrack.getAudioFormat();
|
||||
results[2] = mAudioTrack.getChannelCount();
|
||||
results[3] = desiredFrames;
|
||||
}
|
||||
results[3] = desiredFrames;
|
||||
|
||||
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", got " + results[3] + " frames of " + results[2] + " channel " + getAudioFormatString(results[1]) + " audio at " + results[0] + " Hz");
|
||||
|
||||
|
||||
@@ -6,9 +6,14 @@ import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.*;
|
||||
import android.view.*;
|
||||
import android.os.Build;
|
||||
import android.os.VibrationEffect;
|
||||
import android.os.Vibrator;
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
public class SDLControllerManager
|
||||
@@ -98,7 +103,7 @@ public class SDLControllerManager
|
||||
int sources = device.getSources();
|
||||
|
||||
/* This is called for every button press, so let's not spam the logs */
|
||||
/**
|
||||
/*
|
||||
if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " has class joystick.");
|
||||
}
|
||||
@@ -108,7 +113,7 @@ public class SDLControllerManager
|
||||
if ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
|
||||
Log.v(TAG, "Input device " + device.getName() + " is a gamepad.");
|
||||
}
|
||||
**/
|
||||
*/
|
||||
|
||||
return ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 ||
|
||||
((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
|
||||
@@ -167,7 +172,7 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private ArrayList<SDLJoystick> mJoysticks;
|
||||
private final ArrayList<SDLJoystick> mJoysticks;
|
||||
|
||||
public SDLJoystickHandler_API16() {
|
||||
|
||||
@@ -177,13 +182,14 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
||||
@Override
|
||||
public void pollInputDevices() {
|
||||
int[] deviceIds = InputDevice.getDeviceIds();
|
||||
for(int i=0; i < deviceIds.length; ++i) {
|
||||
SDLJoystick joystick = getJoystick(deviceIds[i]);
|
||||
if (joystick == null) {
|
||||
joystick = new SDLJoystick();
|
||||
InputDevice joystickDevice = InputDevice.getDevice(deviceIds[i]);
|
||||
if (SDLControllerManager.isDeviceSDLJoystick(deviceIds[i])) {
|
||||
joystick.device_id = deviceIds[i];
|
||||
|
||||
for (int device_id : deviceIds) {
|
||||
if (SDLControllerManager.isDeviceSDLJoystick(device_id)) {
|
||||
SDLJoystick joystick = getJoystick(device_id);
|
||||
if (joystick == null) {
|
||||
InputDevice joystickDevice = InputDevice.getDevice(device_id);
|
||||
joystick = new SDLJoystick();
|
||||
joystick.device_id = device_id;
|
||||
joystick.name = joystickDevice.getName();
|
||||
joystick.desc = getJoystickDescriptor(joystickDevice);
|
||||
joystick.axes = new ArrayList<InputDevice.MotionRange>();
|
||||
@@ -191,53 +197,57 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
||||
|
||||
List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
|
||||
Collections.sort(ranges, new RangeComparator());
|
||||
for (InputDevice.MotionRange range : ranges ) {
|
||||
for (InputDevice.MotionRange range : ranges) {
|
||||
if ((range.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
||||
if (range.getAxis() == MotionEvent.AXIS_HAT_X ||
|
||||
range.getAxis() == MotionEvent.AXIS_HAT_Y) {
|
||||
if (range.getAxis() == MotionEvent.AXIS_HAT_X || range.getAxis() == MotionEvent.AXIS_HAT_Y) {
|
||||
joystick.hats.add(range);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
joystick.axes.add(range);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mJoysticks.add(joystick);
|
||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc, getVendorId(joystickDevice), getProductId(joystickDevice), false, getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0);
|
||||
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc,
|
||||
getVendorId(joystickDevice), getProductId(joystickDevice), false,
|
||||
getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check removed devices */
|
||||
ArrayList<Integer> removedDevices = new ArrayList<Integer>();
|
||||
for(int i=0; i < mJoysticks.size(); i++) {
|
||||
int device_id = mJoysticks.get(i).device_id;
|
||||
int j;
|
||||
for (j=0; j < deviceIds.length; j++) {
|
||||
if (device_id == deviceIds[j]) break;
|
||||
ArrayList<Integer> removedDevices = null;
|
||||
for (SDLJoystick joystick : mJoysticks) {
|
||||
int device_id = joystick.device_id;
|
||||
int i;
|
||||
for (i = 0; i < deviceIds.length; i++) {
|
||||
if (device_id == deviceIds[i]) break;
|
||||
}
|
||||
if (j == deviceIds.length) {
|
||||
removedDevices.add(Integer.valueOf(device_id));
|
||||
if (i == deviceIds.length) {
|
||||
if (removedDevices == null) {
|
||||
removedDevices = new ArrayList<Integer>();
|
||||
}
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
}
|
||||
|
||||
for(int i=0; i < removedDevices.size(); i++) {
|
||||
int device_id = removedDevices.get(i).intValue();
|
||||
SDLControllerManager.nativeRemoveJoystick(device_id);
|
||||
for (int j=0; j < mJoysticks.size(); j++) {
|
||||
if (mJoysticks.get(j).device_id == device_id) {
|
||||
mJoysticks.remove(j);
|
||||
break;
|
||||
if (removedDevices != null) {
|
||||
for (int device_id : removedDevices) {
|
||||
SDLControllerManager.nativeRemoveJoystick(device_id);
|
||||
for (int i = 0; i < mJoysticks.size(); i++) {
|
||||
if (mJoysticks.get(i).device_id == device_id) {
|
||||
mJoysticks.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLJoystick getJoystick(int device_id) {
|
||||
for(int i=0; i < mJoysticks.size(); i++) {
|
||||
if (mJoysticks.get(i).device_id == device_id) {
|
||||
return mJoysticks.get(i);
|
||||
for (SDLJoystick joystick : mJoysticks) {
|
||||
if (joystick.device_id == device_id) {
|
||||
return joystick;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -248,25 +258,21 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
|
||||
if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) != 0) {
|
||||
int actionPointerIndex = event.getActionIndex();
|
||||
int action = event.getActionMasked();
|
||||
switch(action) {
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
SDLJoystick joystick = getJoystick(event.getDeviceId());
|
||||
if ( joystick != null ) {
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
InputDevice.MotionRange range = joystick.axes.get(i);
|
||||
/* Normalize the value to -1...1 */
|
||||
float value = ( event.getAxisValue( range.getAxis(), actionPointerIndex) - range.getMin() ) / range.getRange() * 2.0f - 1.0f;
|
||||
SDLControllerManager.onNativeJoy(joystick.device_id, i, value );
|
||||
}
|
||||
for (int i = 0; i < joystick.hats.size(); i+=2) {
|
||||
int hatX = Math.round(event.getAxisValue( joystick.hats.get(i).getAxis(), actionPointerIndex ) );
|
||||
int hatY = Math.round(event.getAxisValue( joystick.hats.get(i+1).getAxis(), actionPointerIndex ) );
|
||||
SDLControllerManager.onNativeHat(joystick.device_id, i/2, hatX, hatY );
|
||||
}
|
||||
if (action == MotionEvent.ACTION_MOVE) {
|
||||
SDLJoystick joystick = getJoystick(event.getDeviceId());
|
||||
if (joystick != null) {
|
||||
for (int i = 0; i < joystick.axes.size(); i++) {
|
||||
InputDevice.MotionRange range = joystick.axes.get(i);
|
||||
/* Normalize the value to -1...1 */
|
||||
float value = (event.getAxisValue(range.getAxis(), actionPointerIndex) - range.getMin()) / range.getRange() * 2.0f - 1.0f;
|
||||
SDLControllerManager.onNativeJoy(joystick.device_id, i, value);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
for (int i = 0; i < joystick.hats.size() / 2; i++) {
|
||||
int hatX = Math.round(event.getAxisValue(joystick.hats.get(2 * i).getAxis(), actionPointerIndex));
|
||||
int hatY = Math.round(event.getAxisValue(joystick.hats.get(2 * i + 1).getAxis(), actionPointerIndex));
|
||||
SDLControllerManager.onNativeHat(joystick.device_id, i, hatX, hatY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -432,13 +438,13 @@ class SDLHapticHandler_API26 extends SDLHapticHandler {
|
||||
|
||||
class SDLHapticHandler {
|
||||
|
||||
class SDLHaptic {
|
||||
static class SDLHaptic {
|
||||
public int device_id;
|
||||
public String name;
|
||||
public Vibrator vib;
|
||||
}
|
||||
|
||||
private ArrayList<SDLHaptic> mHaptics;
|
||||
private final ArrayList<SDLHaptic> mHaptics;
|
||||
|
||||
public SDLHapticHandler() {
|
||||
mHaptics = new ArrayList<SDLHaptic>();
|
||||
@@ -504,37 +510,41 @@ class SDLHapticHandler {
|
||||
}
|
||||
|
||||
/* Check removed devices */
|
||||
ArrayList<Integer> removedDevices = new ArrayList<Integer>();
|
||||
for(int i=0; i < mHaptics.size(); i++) {
|
||||
int device_id = mHaptics.get(i).device_id;
|
||||
int j;
|
||||
for (j=0; j < deviceIds.length; j++) {
|
||||
if (device_id == deviceIds[j]) break;
|
||||
ArrayList<Integer> removedDevices = null;
|
||||
for (SDLHaptic haptic : mHaptics) {
|
||||
int device_id = haptic.device_id;
|
||||
int i;
|
||||
for (i = 0; i < deviceIds.length; i++) {
|
||||
if (device_id == deviceIds[i]) break;
|
||||
}
|
||||
|
||||
if (device_id == deviceId_VIBRATOR_SERVICE && hasVibratorService) {
|
||||
// don't remove the vibrator if it is still present
|
||||
} else if (j == deviceIds.length) {
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
if (device_id != deviceId_VIBRATOR_SERVICE || !hasVibratorService) {
|
||||
if (i == deviceIds.length) {
|
||||
if (removedDevices == null) {
|
||||
removedDevices = new ArrayList<Integer>();
|
||||
}
|
||||
removedDevices.add(device_id);
|
||||
}
|
||||
} // else: don't remove the vibrator if it is still present
|
||||
}
|
||||
|
||||
for(int i=0; i < removedDevices.size(); i++) {
|
||||
int device_id = removedDevices.get(i);
|
||||
SDLControllerManager.nativeRemoveHaptic(device_id);
|
||||
for (int j=0; j < mHaptics.size(); j++) {
|
||||
if (mHaptics.get(j).device_id == device_id) {
|
||||
mHaptics.remove(j);
|
||||
break;
|
||||
if (removedDevices != null) {
|
||||
for (int device_id : removedDevices) {
|
||||
SDLControllerManager.nativeRemoveHaptic(device_id);
|
||||
for (int i = 0; i < mHaptics.size(); i++) {
|
||||
if (mHaptics.get(i).device_id == device_id) {
|
||||
mHaptics.remove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected SDLHaptic getHaptic(int device_id) {
|
||||
for(int i=0; i < mHaptics.size(); i++) {
|
||||
if (mHaptics.get(i).device_id == device_id) {
|
||||
return mHaptics.get(i);
|
||||
for (SDLHaptic haptic : mHaptics) {
|
||||
if (haptic.device_id == device_id) {
|
||||
return haptic;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -655,8 +665,7 @@ class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
|
||||
public float getEventX(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return event.getX(0);
|
||||
}
|
||||
}
|
||||
@@ -665,14 +674,12 @@ class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
|
||||
public float getEventY(MotionEvent event) {
|
||||
if (mRelativeModeEnabled) {
|
||||
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return event.getY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
||||
// Generic Motion (mouse hover, joystick...) events go here
|
||||
private boolean mRelativeModeEnabled;
|
||||
@@ -753,15 +760,12 @@ class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
|
||||
if (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)) {
|
||||
if (enabled) {
|
||||
SDLActivity.getContentView().requestPointerCapture();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
SDLActivity.getContentView().releasePointerCapture();
|
||||
}
|
||||
mRelativeModeEnabled = enabled;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ListView android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
@@ -1,13 +1,14 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.61'
|
||||
ext.kotlin_version = '1.6.20'
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
||||
// AGP 7.1.x cannot be used due to https://issuetracker.google.com/issues/206099937
|
||||
classpath 'com.android.tools.build:gradle:7.0.4'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
@@ -17,7 +18,7 @@ buildscript {
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
+3
-3
@@ -1,6 +1,6 @@
|
||||
#Mon Oct 23 13:51:26 PDT 2017
|
||||
#Thu Nov 11 18:20:34 PST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+4
-13
@@ -1,11 +1,8 @@
|
||||
#cmakedefine PACKAGE "@PACKAGE@"
|
||||
#define VERSION "1.7.3sdl2"
|
||||
#define VERSION "2.3.0"
|
||||
|
||||
#cmakedefine CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@"
|
||||
|
||||
#define RGB_ORDER 1
|
||||
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
|
||||
|
||||
#cmakedefine CACHE_TOTALSIZE @CACHE_TOTALSIZE@
|
||||
|
||||
#cmakedefine ENABLE_CDROM_ANDROID @ENABLE_CDROM_ANDROID@
|
||||
@@ -13,32 +10,26 @@
|
||||
#cmakedefine ENABLE_CDROM_EMSCRIPTEN @ENABLE_CDROM_EMSCRIPTEN@
|
||||
#cmakedefine ENABLE_CDROM_LINUX @ENABLE_CDROM_LINUX@
|
||||
#cmakedefine ENABLE_CDROM_MP3 @ENABLE_CDROM_MP3@
|
||||
#cmakedefine ENABLE_FT2 @ENABLE_FT2@
|
||||
#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_MODULES @ENABLE_MODULES@
|
||||
#cmakedefine ENABLE_MIDI_PORTMIDI @ENABLE_MIDI_PORTMIDI@
|
||||
#cmakedefine ENABLE_NLS @ENABLE_NLS@
|
||||
#cmakedefine ENABLE_SDL @ENABLE_SDL@
|
||||
#cmakedefine ENABLE_SDLMIXER @ENABLE_SDLMIXER@
|
||||
#cmakedefine ENABLE_SDLTTF @ENABLE_SDLTTF@
|
||||
#cmakedefine ENABLE_X11FONT @ENABLE_X11FONT@
|
||||
|
||||
#cmakedefine CDROM_DEVICE "@CDROM_DEVICE@"
|
||||
#cmakedefine JOY_DEVICE "@JOY_DEVICE@"
|
||||
#cmakedefine MIDI_DEVICE "@MIDI_DEVICE@"
|
||||
#cmakedefine SEQ_DEVICE "@SEQ_DEVICE@"
|
||||
|
||||
#cmakedefine QUIET_MIDI @QUIET_MIDI@
|
||||
|
||||
#cmakedefine HAVE_GETLOGIN @HAVE_GETLOGIN@
|
||||
#cmakedefine HAVE_JPEG @HAVE_JPEG@
|
||||
#cmakedefine HAVE_MMAP @HAVE_MMAP@
|
||||
#cmakedefine HAVE_SDLJOY @HAVE_SDLJOY@
|
||||
#cmakedefine HAVE_SIGACTION @HAVE_SIGACTION@
|
||||
#cmakedefine HAVE_UNAME @HAVE_UNAME@
|
||||
#cmakedefine HAVE_XF86VMODE @HAVE_XF86VMODE@
|
||||
#cmakedefine HAVE_WEBP @HAVE_WEBP@
|
||||
|
||||
#define DEFAULT_GOTHIC_TTF "@DEFAULT_FONT_PATH@MTLc3m.ttf"
|
||||
#define DEFAULT_MINCHO_TTF "@DEFAULT_FONT_PATH@mincho.otf"
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# 20世紀アリス これDPS? Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, 20cDPS_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, 20cDPS_ga.ald
|
||||
MidiA, gamedata/*MA.ald, 20cDPS_ma.ald
|
||||
SaveA, , 20cDPS_sa.asd
|
||||
Ain, gamedata/*.ain, system39.ain
|
||||
@@ -1,10 +0,0 @@
|
||||
# 20世紀アリス かえるにょ国にょアリス Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, 20cKaeru_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, 20cKaeru_ga.ald
|
||||
WaveA, gamedata/*WA.ald, 20cKaeru_wa.ald
|
||||
MidiA, gamedata/*MA.ald, 20cKaeru_ma.ald
|
||||
DataA, gamedata/*DA.ald, 20cKaeru_da.ald
|
||||
Ain, gamedata/*.ain, system39.ain
|
||||
SaveA, , 20cKaeru_sa.asd
|
||||
SaveZ, , 20cKaeru_sz.asd
|
||||
@@ -1,14 +0,0 @@
|
||||
# ATLACH-NACHA Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, atlach_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, atlach_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, atlach_gb.ald
|
||||
WaveA, gamedata/*wa.ald, atlach_wa.ald
|
||||
SaveA, , atlach_sa.asd
|
||||
SaveB, , atlach_sb.asd
|
||||
SaveC, , atlach_sc.asd
|
||||
SaveD, , atlach_sd.asd
|
||||
SaveE, , atlach_se.asd
|
||||
SaveF, , atlach_sf.asd
|
||||
SaveG, , atlach_sg.asd
|
||||
SaveH, , atlach_sh.asd
|
||||
@@ -1,6 +0,0 @@
|
||||
# Ningen Kari Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, ningen_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, ningen_ga.ald
|
||||
WaveA, gamedata/*wa.ald, ningen_wa.ald
|
||||
SaveA, , ningen_sa.asd
|
||||
@@ -1,12 +0,0 @@
|
||||
# Zero-shiki Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, zero_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, zero_ga.ald
|
||||
WaveA, gamedata/*wa.ald, zero_wa.ald
|
||||
SaveA, , zero_sa.asd
|
||||
SaveB, , zero_sb.asd
|
||||
SaveC, , zero_sc.asd
|
||||
SaveD, , zero_sd.asd
|
||||
SaveE, , zero_se.asd
|
||||
, gamedata/map_data.dat, MAP_DATA.DAT
|
||||
, gamedata/ur_data.dat, UR_DATA.DAT
|
||||
@@ -1,115 +0,0 @@
|
||||
ゲームデータインストール用スクリプト instgame の使い方について
|
||||
|
||||
スクリプト作成 奈良木 さん
|
||||
ドキュメント作成 近間@NAIST
|
||||
0. 目次
|
||||
|
||||
1. ファイルの説明
|
||||
2. 使い方
|
||||
3. その他の情報
|
||||
4. 著作権など
|
||||
5. 連絡先
|
||||
|
||||
|
||||
1. ファイルの説明
|
||||
|
||||
instgame スクリプト本体
|
||||
456atlach.inf ATLACH-NACHA 用設定ファイル (アリスの館456収録)
|
||||
456ningen.inf 人間狩り 用設定ファイル (アリスの館456収録
|
||||
456zero.inf 零式 用設定ファイル (アリスの館456収録)
|
||||
ambi.inf AmbivalenZ for WIN95 用設定ファイル
|
||||
atlach_new.inf ATLACH-NACHA (廉価版) 用設定ファイル
|
||||
darcrows.inf DARCROWS 用設定ファイル
|
||||
diabo.inf DiaboLiQue 用設定ファイル
|
||||
diabo_new.inf DiaboLiQue (廉価版) 用設定ファイル
|
||||
hushaby.inf HushaBy Baby 用設定ファイル
|
||||
katsumi.inf いけないかつみ先生 用設定ファイル
|
||||
kichiku.inf 鬼畜王ランス 用設定ファイル
|
||||
mamatoto.inf ママトト 用設定ファイル
|
||||
mamori.inf 守り神様 用設定ファイル
|
||||
miko.inf 戦巫女 用設定ファイル
|
||||
mugen.inf 無幻泡影 for WIN95 用設定ファイル
|
||||
oudou.inf 王道勇者 用設定ファイル
|
||||
panyo.inf かえるにょぱにょ〜ん 用設定ファイル
|
||||
panyo_new.inf かえるにょぱにょ〜ん(廉価版) 用設定ファイル
|
||||
pascha.inf ぱすてるチャイム 用設定ファイル
|
||||
persiom.inf PERSIOM 用設定ファイル
|
||||
progood.inf ぷろすちゅーでんとGOOD 用設定ファイル
|
||||
rance4.inf ランス4 forWIN 用設定ファイル
|
||||
seeinao.inf SeeIn青 用設定ファイル
|
||||
toushin2.inf 闘神都市II forWIN 用設定ファイル
|
||||
dalk.inf DALK 用設定ファイル (アリスの館456収録)
|
||||
drstop.inf Dr.Stop! 用設定ファイル (アリスの館456収録)
|
||||
rance1.inf Rance1 用設定ファイル (アリスの館456収録)
|
||||
rance2.inf Rance2 用設定ファイル (アリスの館456収録)
|
||||
rance3.inf Rance3 用設定ファイル (アリスの館456収録)
|
||||
toushin.inf 闘神都市 用設定ファイル (アリスの館456収録)
|
||||
zero_new.inf 零式 (廉価版) 用設定ファイル
|
||||
20cKaeru.inf 20世紀アリス かえるにょ国にょアリス 用設定ファイル
|
||||
20cDPS.inf 20世紀アリス これDPS? 用設定ファイル
|
||||
onlyyou_r.inf Only You リクルス 用設定ファイル
|
||||
daiakuji.inf 大悪司 用設定ファイル
|
||||
tsuma.inf 妻みぐい 用設定ファイル
|
||||
|
||||
2. 使い方
|
||||
|
||||
ゲームのCD-ROMをドライブに入れてマウントし、
|
||||
% ./instgame kichiku.inf
|
||||
のように実行します。
|
||||
|
||||
デフォルトではCDROMは/cdromにマウントされているものとしています。
|
||||
また、データのインストール先は ~/game/kichiku/ の下になります。
|
||||
|
||||
デフォルトでは設定用ファイルのファイル名が~/game/の下のディレクトリ名に
|
||||
なります。
|
||||
|
||||
これらのデフォルトの条件を変えるには以下のオプションを使います。
|
||||
|
||||
-c : CD-ROMのマウントされている位置を指定します(default: -c /cdrom)
|
||||
-d : ゲームデータのインストール先を指定します (default: -d ~/game/target>)
|
||||
|
||||
データが正常にコピーされると、~/game/の下にkichiku.grと言うファイルが作成
|
||||
されます。これはゲームデータの場所をプログラム(xsystem35)に知らせるためのも
|
||||
ので、
|
||||
% xsystem35 -gamefile ~/game/kichiku.gr
|
||||
のように指定するのに使います。(「ゲームリソースファイル」とでも呼んで下さい)
|
||||
|
||||
デフォルトでは、*.grというファイルも設定用ファイルのファイル名と同じ名前に
|
||||
なりますが、以下のオプションで変更可能です。
|
||||
|
||||
-g : ゲームリソースファイルのファイル名を指定します
|
||||
(default: -g ~/game/<target>.inf)
|
||||
|
||||
|
||||
3. その他の情報
|
||||
|
||||
その他のオプションに、指定のファイルはCD-ROMからコピーせずにリンクを張る、
|
||||
という指定が出来ます。
|
||||
|
||||
% ./instgame -k Graphics kichiku.inf
|
||||
|
||||
とすると、kichiku_ga.ald と kichiku_gb.ald のファイルはコピーされずに、
|
||||
CD-ROM上のデータへのシンボリックリンクになります。ただし、そうするとゲーム中
|
||||
はCD-ROMをマウントしておかなければならないので、CD-ROMをマウントしたまま
|
||||
CD-DAの演奏可能な一部のシステムでのみ可能です。
|
||||
|
||||
|
||||
このオプションはゲームデータのインストール時の動作を規定するものなので、
|
||||
自分でCD-ROMからファイルをコピーして、ゲームリソースファイルをエディタで
|
||||
編集すれば、全く自由にデータの配置を行なう事が出来ます。もちろん、ゲーム
|
||||
リソースファイルのファイル名や置き場所も自由にして出来ます。
|
||||
ゲームリソースファイルの書式については doc/GRFMT.TXT を御覧下さい。
|
||||
|
||||
|
||||
4. 著作権など
|
||||
|
||||
instgameは 奈良木 さんがつくられたものですので、著作権は奈良木さんに
|
||||
属します。奈良木さんの意向により、GPLに基づいて再配布可能です。
|
||||
|
||||
ドキュメントの不備は私(近間)までどうぞ。
|
||||
|
||||
|
||||
5. 連絡先
|
||||
|
||||
奈良木さん <naraki@debian.or.jp>
|
||||
近間@NAIST <masaki-c@is.aist-nara.ac.jp>
|
||||
@@ -1,18 +0,0 @@
|
||||
# AmbivalenZ Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, ambi_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, ambi_ga.ald
|
||||
SaveA, , ambi_sa.asd
|
||||
SaveB, , ambi_sb.asd
|
||||
SaveC, , ambi_sc.asd
|
||||
SaveD, , ambi_sd.asd
|
||||
SaveE, , ambi_se.asd
|
||||
SaveF, , ambi_sf.asd
|
||||
SaveG, , ambi_sg.asd
|
||||
SaveH, , ambi_sh.asd
|
||||
SaveI, , ambi_si.asd
|
||||
SaveJ, , ambi_sj.asd
|
||||
SaveK, , ambi_sk.asd
|
||||
SaveL, , ambi_sl.asd
|
||||
SaveM, , ambi_sm.asd
|
||||
SaveN, , ambi_sn.asd
|
||||
@@ -1,30 +0,0 @@
|
||||
# ATLACH-NACHA (low price version) Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, atlach_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, atlach_ga.ald
|
||||
WaveA, gamedata/*wa.ald, atlach_wa.ald
|
||||
SaveA, , atlach_sa.asd
|
||||
SaveB, , atlach_sb.asd
|
||||
SaveC, , atlach_sc.asd
|
||||
SaveD, , atlach_sd.asd
|
||||
SaveE, , atlach_se.asd
|
||||
SaveF, , atlach_sf.asd
|
||||
SaveG, , atlach_sg.asd
|
||||
SaveH, , atlach_sh.asd
|
||||
SaveI, , atlach_si.asd
|
||||
SaveJ, , atlach_sj.asd
|
||||
SaveK, , atlach_sk.asd
|
||||
SaveL, , atlach_sl.asd
|
||||
SaveM, , atlach_sm.asd
|
||||
SaveN, , atlach_sn.asd
|
||||
SaveO, , atlach_so.asd
|
||||
SaveP, , atlach_sp.asd
|
||||
SaveQ, , atlach_sq.asd
|
||||
SaveR, , atlach_sr.asd
|
||||
SaveS, , atlach_ss.asd
|
||||
SaveT, , atlach_st.asd
|
||||
SaveU, , atlach_su.asd
|
||||
SaveV, , atlach_sv.asd
|
||||
SaveW, , atlach_sw.asd
|
||||
SaveX, , atlach_sx.asd
|
||||
SaveY, , atlach_sy.asd
|
||||
@@ -1,37 +0,0 @@
|
||||
# シェル・クレイル Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, chairs_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ald, chairs_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ald, chairs_wa.ald
|
||||
BGMA, GAMEDATA/*BA.ald, chairs_ba.ald
|
||||
WAIA, GAMEDATA/*WA.wai, chairs_wa.wai
|
||||
BGIA, GAMEDATA/*BA.bgi, chairs_ba.bgi
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
Init, GAMEDATA/*.ini, system39.ini
|
||||
SACT01, GAMEDATA/SACTEFAM.KLD, SACTEFAM.KLD
|
||||
SaveA, , chairs_sa.asd
|
||||
SaveB, , chairs_sb.asd
|
||||
SaveC, , chairs_sc.asd
|
||||
SaveD, , chairs_sd.asd
|
||||
SaveE, , chairs_se.asd
|
||||
SaveF, , chairs_sf.asd
|
||||
SaveG, , chairs_sg.asd
|
||||
SaveH, , chairs_sh.asd
|
||||
SaveI, , chairs_si.asd
|
||||
SaveJ, , chairs_sj.asd
|
||||
SaveK, , chairs_sk.asd
|
||||
SaveL, , chairs_sl.asd
|
||||
SaveM, , chairs_sm.asd
|
||||
SaveN, , chairs_sn.asd
|
||||
SaveO, , chairs_so.asd
|
||||
SaveP, , chairs_sp.asd
|
||||
SaveQ, , chairs_sq.asd
|
||||
SaveR, , chairs_sr.asd
|
||||
SaveS, , chairs_ss.asd
|
||||
SaveT, , chairs_st.asd
|
||||
SaveU, , chairs_su.asd
|
||||
SaveV, , chairs_sv.asd
|
||||
SaveW, , chairs_sw.asd
|
||||
SaveX, , chairs_sx.asd
|
||||
SaveY, , chairs_sy.asd
|
||||
SaveZ, , chairs_sz.asd
|
||||
@@ -1,19 +0,0 @@
|
||||
# 大悪司 Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, daiakuji_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, daiakuji_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, daiakuji_wa.ald
|
||||
DataA, GAMEDATA/*DA.ALD, daiakuji_da.ald
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
SaveA, , daiakuji_sa.asd
|
||||
SaveB, , daiakuji_sb.asd
|
||||
SaveC, , daiakuji_sc.asd
|
||||
SaveD, , daiakuji_sd.asd
|
||||
SaveE, , daiakuji_se.asd
|
||||
SaveF, , daiakuji_sf.asd
|
||||
SaveG, , daiakuji_sg.asd
|
||||
SaveH, , daiakuji_sh.asd
|
||||
SaveI, , daiakuji_si.asd
|
||||
SaveJ, , daiakuji_sj.asd
|
||||
SaveK, , daiakuji_sk.asd
|
||||
SaveL, , daiakuji_sl.asd
|
||||
@@ -1,17 +0,0 @@
|
||||
# dalk Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, dalk/dalk_sa.ald, dalk_sa.ald
|
||||
GraphicsA, dalk/dalk_ga.ald, dalk_ga.ald
|
||||
MidiA, dalk/dalk_ma.ald, dalk_ma.ald
|
||||
WaveA, dalk/dalk_wa.ald, dalk_wa.ald
|
||||
DataA, dalk/dalk_da.ald, dalk_da.ald
|
||||
SaveA, , dalk_sa.asd
|
||||
SaveB, , dalk_sb.asd
|
||||
SaveC, , dalk_sc.asd
|
||||
SaveD, , dalk_sd.asd
|
||||
SaveE, , dalk_se.asd
|
||||
SaveF, , dalk_sf.asd
|
||||
SaveG, , dalk_sg.asd
|
||||
SaveH, , dalk_sh.asd
|
||||
SaveI, , dalk_si.asd
|
||||
SaveJ, , dalk_sj.asd
|
||||
@@ -1,35 +0,0 @@
|
||||
# DARCROWS Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ALD, hime_sa.ald
|
||||
GraphicsA, gamedata/*GA.ALD, hime_ga.ald
|
||||
GraphicsB, gamedata/*GB.ALD, hime_gb.ald
|
||||
WaveA, gamedata/*WA.ALD, hime_wa.ald
|
||||
WaveB, gamedata/*WB.ALD, hime_wb.ald
|
||||
MidiA, gamedata/*MA.ALD, hime_ma.ald
|
||||
ResourceA, gamedata/*RA.ALD, hime_ra.ald
|
||||
SaveA, , hime_sa.asd
|
||||
SaveB, , hime_sb.asd
|
||||
SaveC, , hime_sc.asd
|
||||
SaveD, , hime_sd.asd
|
||||
SaveE, , hime_se.asd
|
||||
SaveF, , hime_sf.asd
|
||||
SaveG, , hime_sg.asd
|
||||
SaveH, , hime_sh.asd
|
||||
SaveI, , hime_si.asd
|
||||
SaveJ, , hime_sj.asd
|
||||
SaveK, , hime_sk.asd
|
||||
SaveL, , hime_sl.asd
|
||||
SaveM, , hime_sm.asd
|
||||
SaveN, , hime_sn.asd
|
||||
SaveO, , hime_so.asd
|
||||
SaveP, , hime_sp.asd
|
||||
SaveQ, , hime_sq.asd
|
||||
SaveR, , hime_sr.asd
|
||||
SaveS, , hime_ss.asd
|
||||
SaveT, , hime_st.asd
|
||||
SaveU, , hime_su.asd
|
||||
SaveV, , hime_sv.asd
|
||||
SaveW, , hime_sw.asd
|
||||
SaveX, , hime_sx.asd
|
||||
SaveY, , hime_sy.asd
|
||||
SaveZ, , hime_sz.asd
|
||||
@@ -1,16 +0,0 @@
|
||||
# DiaboLiQue Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, diabo_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, diabo_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, diabo_gb.ald
|
||||
WaveA, gamedata/*wa.ald, diabo_wa.ald
|
||||
SaveA, , diabo_sa.asd
|
||||
SaveB, , diabo_sb.asd
|
||||
SaveC, , diabo_sc.asd
|
||||
SaveD, , diabo_sd.asd
|
||||
SaveE, , diabo_se.asd
|
||||
SaveF, , diabo_sf.asd
|
||||
SaveG, , diabo_sg.asd
|
||||
SaveH, , diabo_sh.asd
|
||||
SaveI, , diabo_si.asd
|
||||
SaveJ, , diabo_sj.asd
|
||||
@@ -1,30 +0,0 @@
|
||||
# DiaboLiQue (low price version) Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, diabo_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, diabo_ga.ald
|
||||
WaveA, gamedata/*wa.ald, diabo_wa.ald
|
||||
SaveA, , diabo_sa.asd
|
||||
SaveB, , diabo_sb.asd
|
||||
SaveC, , diabo_sc.asd
|
||||
SaveD, , diabo_sd.asd
|
||||
SaveE, , diabo_se.asd
|
||||
SaveF, , diabo_sf.asd
|
||||
SaveG, , diabo_sg.asd
|
||||
SaveH, , diabo_sh.asd
|
||||
SaveI, , diabo_si.asd
|
||||
SaveJ, , diabo_sj.asd
|
||||
SaveK, , diabo_sk.asd
|
||||
SaveL, , diabo_sl.asd
|
||||
SaveM, , diabo_sm.asd
|
||||
SaveN, , diabo_sn.asd
|
||||
SaveO, , diabo_so.asd
|
||||
SaveP, , diabo_sp.asd
|
||||
SaveQ, , diabo_sq.asd
|
||||
SaveR, , diabo_sr.asd
|
||||
SaveS, , diabo_ss.asd
|
||||
SaveT, , diabo_st.asd
|
||||
SaveU, , diabo_su.asd
|
||||
SaveV, , diabo_sv.asd
|
||||
SaveW, , diabo_sw.asd
|
||||
SaveX, , diabo_sx.asd
|
||||
SaveY, , diabo_sy.asd
|
||||
@@ -1,10 +0,0 @@
|
||||
# DrStop! Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, drstop\!/ds_sa.ald, ds_sa.ald
|
||||
GraphicsA, drstop\!/ds_ga.ald, ds_ga.ald
|
||||
MidiA, drstop\!/ds_ma.ald, ds_ma.ald
|
||||
SaveA, , ds_sa.asd
|
||||
SaveB, , ds_sb.asd
|
||||
SaveC, , ds_sc.asd
|
||||
SaveD, , ds_sd.asd
|
||||
SaveE, , ds_se.asd
|
||||
@@ -1,38 +0,0 @@
|
||||
# エスカレイヤー Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, esuka_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, esuka_ga.ald
|
||||
GraphicsB, GAMEDATA/*GB.ALD, esuka_gb.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, esuka_wa.ald
|
||||
WaveB, GAMEDATA/*WB.ALD, esuka_wb.ald
|
||||
BGMA, GAMEDATA/*BA.ALD, esuka_ba.ald
|
||||
WAIA, GAMEDATA/*WA.WAI, esuka_wa.wai
|
||||
BGIA, GAMEDATA/*BA.BGI, esuka_ba.bgi
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
Init, GAMEDATA/*.ini, system39.ini
|
||||
SaveA, , esuka_sa.asd
|
||||
SaveB, , esuka_sb.asd
|
||||
SaveC, , esuka_sc.asd
|
||||
SaveD, , esuka_sd.asd
|
||||
SaveE, , esuka_se.asd
|
||||
SaveF, , esuka_sf.asd
|
||||
SaveG, , esuka_sg.asd
|
||||
SaveH, , esuka_sh.asd
|
||||
SaveI, , esuka_si.asd
|
||||
SaveJ, , esuka_sj.asd
|
||||
SaveK, , esuka_sk.asd
|
||||
SaveL, , esuka_sl.asd
|
||||
SaveM, , esuka_sm.asd
|
||||
SaveN, , esuka_sn.asd
|
||||
SaveO, , esuka_so.asd
|
||||
SaveP, , esuka_sp.asd
|
||||
SaveQ, , esuka_sq.asd
|
||||
SaveR, , esuka_sr.asd
|
||||
SaveS, , esuka_ss.asd
|
||||
SaveT, , esuka_st.asd
|
||||
SaveU, , esuka_su.asd
|
||||
SaveV, , esuka_sv.asd
|
||||
SaveW, , esuka_sw.asd
|
||||
SaveX, , esuka_sx.asd
|
||||
SaveY, , esuka_sy.asd
|
||||
SaveZ, , esuka_sz.asd
|
||||
@@ -1,8 +0,0 @@
|
||||
# Hushaby Baby Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ALD, hushaby_sa.ald
|
||||
GraphicsA, gamedata/*GA.ALD, hushaby_ga.ald
|
||||
WaveA, gamedata/*WA.ALD, hushaby_wa.ald
|
||||
MidiA, gamedata/*MA.ALD, hushaby_ma.ald
|
||||
SaveA, , hushaby_sa.asd
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# instgame: xsystem3.5 data install script
|
||||
#
|
||||
# Author: Hiroshi Naraki<naraki@debian.or.jp>
|
||||
#
|
||||
# $Id: instgame,v 1.5 1999/05/18 21:52:02 chikama Exp $
|
||||
#
|
||||
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
# default value
|
||||
$cdrom_dir = "/cdrom";
|
||||
$dest_base_dir = "~/game";
|
||||
|
||||
# get program name
|
||||
($program) = ($0 =~ m%([^/]+)$%);
|
||||
|
||||
# get home directory
|
||||
$home = $ENV{'HOME'};
|
||||
|
||||
# show usage and exit
|
||||
sub usage {
|
||||
print "Usage: $program [options] <target>.inf \n";
|
||||
print " -c directory cdrom directory.(default: /cdrom) \n";
|
||||
print " -d directory destination game directory.(default: ~/game/<target>)\n";
|
||||
print " -g file game resource file name.(default: ~/game/<target>.gr)\n";
|
||||
print " -k tag keep the tagged file from copying.\n";
|
||||
}
|
||||
|
||||
;# parsing options
|
||||
while (@ARGV) {
|
||||
$_ = shift;
|
||||
s/^-// || do { $target = $_; last };
|
||||
$_ eq 'c' && @ARGV && do { $cdrom_dir = shift; next }; # install from
|
||||
$_ eq 'd' && @ARGV && do { $dest_base_dir = shift; next }; # install to
|
||||
$_ eq 'g' && @ARGV && do { $grfile = shift; next }; # gr-file to
|
||||
$_ eq 'k' && @ARGV && do { @keep_list = (@keep_list, shift); next }; # keep tag
|
||||
$_ eq 'v' && @ARGV && do { $debug = 1; next }; # debug
|
||||
&usage;
|
||||
exit;
|
||||
}
|
||||
|
||||
# nothing target
|
||||
if (! -f $target ) {
|
||||
&usage;
|
||||
exit;
|
||||
}
|
||||
# decide game resource file name
|
||||
$base = $target;
|
||||
$base =~ s%.*/%%;
|
||||
$base =~ s/\.inf//;
|
||||
$dest_dir = $dest_base_dir."/".$base;
|
||||
$grfile = $dest_base_dir."/".$base.".gr";
|
||||
|
||||
# expand directory name
|
||||
$dest_dir =~ s/~/$home/;
|
||||
$grfile =~ s/~/$home/;
|
||||
|
||||
# print variables if debug
|
||||
if ($debug) {
|
||||
print "cdrom_dir:$cdrom_dir\n";
|
||||
print "dest_dir:$dest_dir\n";
|
||||
print "grfile :$grfile\n";
|
||||
}
|
||||
|
||||
-d $cdrom_dir || die "$!:$cdrom_dir\n";
|
||||
|
||||
&make_dir($dest_dir);
|
||||
|
||||
open( DAT, $target) || die "Can't open $target:$!\n";
|
||||
|
||||
open( FILE, "> $grfile" ) || die "Can't create file $grfile:$!\n";
|
||||
print FILE "# System 3.5 GameResource File: [$target]\n";
|
||||
|
||||
while( $line = <DAT>) {
|
||||
$line =~ s/\#.*|\s//g;
|
||||
$line eq /^$/ && do { next };
|
||||
@data = split(/,/,$line);
|
||||
$tag = $data[0];
|
||||
$from = $data[1];
|
||||
$to = $data[2];
|
||||
|
||||
if( $to eq '' ) {
|
||||
&view_action("Ignore ", $tag, $from, $to);
|
||||
next;
|
||||
}
|
||||
$to = $dest_dir."/".$to;
|
||||
if( $tag eq '' ) {
|
||||
$keep = 0;
|
||||
} else {
|
||||
$keep = grep(/$tag*/, @keep_list );
|
||||
}
|
||||
if( $keep ) {
|
||||
$from = $cdrom_dir."/".$from ;
|
||||
&view_action("Linking", $tag, $from, $to);
|
||||
# symlink($from, $to) if !$debug;
|
||||
system("ln -s $from $to") if !$debug;
|
||||
} elsif( $from eq '' ) {
|
||||
# &view_action("Create ", $tag, $from, $to);
|
||||
# system("touch $to") if !$debug;
|
||||
&view_action("Skip ", $tag, $from, $to);
|
||||
} else {
|
||||
$from = $cdrom_dir."/".$from ;
|
||||
foreach ( <${from}>) {
|
||||
&view_action("Copying", $tag, $from, $to);
|
||||
system("cp $from $to") if !$debug;
|
||||
}
|
||||
}
|
||||
|
||||
# Create game resource file
|
||||
if( $tag ne '' ) {
|
||||
print "writing: $tag $to\n" if $debug;
|
||||
print FILE "$tag $to\n";
|
||||
}
|
||||
}
|
||||
close(FILE);
|
||||
close(DAT);
|
||||
exit;
|
||||
|
||||
sub view_action {
|
||||
local($action, $tag, $from, $to ) = @_;
|
||||
|
||||
print "$action $tag: $from -> $to\n";
|
||||
}
|
||||
|
||||
# mkdir destination directories.
|
||||
sub make_dir {
|
||||
local($target ) = @_;
|
||||
|
||||
@dest = split(/\//,$target);
|
||||
foreach $dir ( @dest ) {
|
||||
$work .= $dir.'/';
|
||||
print "checking $work\n" if $debug;
|
||||
if( !-d $work ) {
|
||||
print "mkdir $work\n" if $debug;
|
||||
mkdir( $work,0777) || die "Can't mkdir $work:$!\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
# kakurezuki Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, tsuki_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, tsuki_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, tsuki_wa.ald
|
||||
SaveA, , tsuki_sa.asd
|
||||
SaveB, , tsuki_sb.asd
|
||||
SaveC, , tsuki_sc.asd
|
||||
SaveD, , tsuki_sd.asd
|
||||
SaveE, , tsuki_se.asd
|
||||
SaveF, , tsuki_sf.asd
|
||||
SaveG, , tsuki_sg.asd
|
||||
SaveH, , tsuki_sh.asd
|
||||
SaveI, , tsuki_si.asd
|
||||
SaveJ, , tsuki_sj.asd
|
||||
SaveK, , tsuki_sk.asd
|
||||
@@ -1,17 +0,0 @@
|
||||
# Ikenai Katsumisensei Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, katsumi_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, katsumi_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, katsumi_gb.ald
|
||||
WaveA, gamedata/*wa.ald, katsumi_wa.ald
|
||||
SaveA, , katsumi_sa.asd
|
||||
SaveB, , katsumi_sb.asd
|
||||
SaveC, , katsumi_sc.asd
|
||||
SaveD, , katsumi_sd.asd
|
||||
SaveE, , katsumi_se.asd
|
||||
SaveF, , katsumi_sf.asd
|
||||
SaveG, , katsumi_sg.asd
|
||||
SaveH, , katsumi_sh.asd
|
||||
SaveI, , katsumi_si.asd
|
||||
SaveJ, , katsumi_sj.asd
|
||||
gamedata/gaiji.dat, gaiji.dat
|
||||
@@ -1,16 +0,0 @@
|
||||
# Kichikuoh Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, kichiku_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, kichiku_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, kichiku_gb.ald
|
||||
WaveA, gamedata/*wa.ald, kichiku_wa.ald
|
||||
SaveA, , kichiku_sa.asd
|
||||
SaveB, , kichiku_sb.asd
|
||||
SaveC, , kichiku_sc.asd
|
||||
SaveD, , kichiku_sd.asd
|
||||
SaveE, , kichiku_se.asd
|
||||
SaveF, , kichiku_sf.asd
|
||||
SaveG, , kichiku_sg.asd
|
||||
SaveH, , kichiku_sh.asd
|
||||
SaveI, , kichiku_si.asd
|
||||
SaveJ, , kichiku_sj.asd
|
||||
@@ -1,34 +0,0 @@
|
||||
# MAMATOTO Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, mamatoto_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, mamatoto_ga.ald
|
||||
GraphicsB, GAMEDATA/*GB.ALD, mamatoto_gb.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, mamatoto_wa.ald
|
||||
MidiA, GAMEDATA/*MA.ALD, mamatoto_ma.ald
|
||||
DataA, GAMEDATA/*DA.ALD, mamatoto_da.ald
|
||||
SaveA, , mamatoto_sa.asd
|
||||
SaveB, , mamatoto_sb.asd
|
||||
SaveC, , mamatoto_sc.asd
|
||||
SaveD, , mamatoto_sd.asd
|
||||
SaveE, , mamatoto_se.asd
|
||||
SaveF, , mamatoto_sf.asd
|
||||
SaveG, , mamatoto_sg.asd
|
||||
SaveH, , mamatoto_sh.asd
|
||||
SaveI, , mamatoto_si.asd
|
||||
SaveJ, , mamatoto_sj.asd
|
||||
SaveK, , mamatoto_sk.asd
|
||||
SaveL, , mamatoto_sl.asd
|
||||
SaveM, , mamatoto_sm.asd
|
||||
SaveN, , mamatoto_sn.asd
|
||||
SaveO, , mamatoto_so.asd
|
||||
SaveP, , mamatoto_sp.asd
|
||||
SaveQ, , mamatoto_sq.asd
|
||||
SaveR, , mamatoto_sr.asd
|
||||
SaveS, , mamatoto_ss.asd
|
||||
SaveT, , mamatoto_st.asd
|
||||
SaveU, , mamatoto_su.asd
|
||||
SaveV, , mamatoto_sv.asd
|
||||
SaveW, , mamatoto_sw.asd
|
||||
SaveX, , mamatoto_sx.asd
|
||||
SaveY, , mamatoto_sy.asd
|
||||
SaveZ, , mamatoto_sz.asd
|
||||
@@ -1,17 +0,0 @@
|
||||
# MamoriGami Sama Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, mamori_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, mamori_ga.ald
|
||||
GraphicsB, GAMEDATA/*GB.ALD, mamori_gb.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, mamori_wa.ald
|
||||
MidiA, GAMEDATA/*MA.ALD, mamori_ma.ald
|
||||
SaveA, , mamori_sa.asd
|
||||
SaveB, , mamori_sb.asd
|
||||
SaveC, , mamori_sc.asd
|
||||
SaveD, , mamori_sd.asd
|
||||
SaveE, , mamori_se.asd
|
||||
SaveF, , mamori_sf.asd
|
||||
SaveG, , mamori_sg.asd
|
||||
SaveH, , mamori_sh.asd
|
||||
SaveI, , mamori_si.asd
|
||||
SaveJ, , mamori_sj.asd
|
||||
@@ -1,9 +0,0 @@
|
||||
# Ikusa Miko Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, miko_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, miko_ga.ald
|
||||
WaveA, gamedata/*wa.ald, miko_wa.ald
|
||||
SaveA, , miko_sa.asd
|
||||
SaveB, , miko_sb.asd
|
||||
SaveC, , miko_sc.asd
|
||||
SaveJ, , miko_sj.asd
|
||||
@@ -1,7 +0,0 @@
|
||||
# mugen hoyo Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, mugen_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, mugen_ga.ald
|
||||
SaveA, , mugen_sa.asd
|
||||
SaveB, , mugen_sb.asd
|
||||
SaveC, , mugen_sc.asd
|
||||
@@ -1,41 +0,0 @@
|
||||
# Night Demon Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ald, nd_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ald, nd_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ald, nd_wa.ald
|
||||
BGMA, GAMEDATA/*BA.ald, nd_ba.ald
|
||||
WAIA, GAMEDATA/*WA.wai, nd_wa.wai
|
||||
BGIA, GAMEDATA/*BA.bgi, nd_ba.bgi
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
Init, GAMEDATA/*.ini, system39.ini
|
||||
SACT01, GAMEDATA/SACTEFAM.KLD, SACTEFAM.KLD
|
||||
ALK01, GAMEDATA/AliceLogo.alk, AliceLogo.alk
|
||||
ALK02, GAMEDATA/NightDemonDemo1.alk, NightDemonDemo1.alk
|
||||
ALK03, GAMEDATA/NightDemonDemo2.alk, NightDemonDemo2.alk
|
||||
ALK04, GAMEDATA/NightDemonDemo3.alk, NightDemonDemo3.alk
|
||||
SaveA, , nd_sa.asd
|
||||
SaveB, , nd_sb.asd
|
||||
SaveC, , nd_sc.asd
|
||||
SaveD, , nd_sd.asd
|
||||
SaveE, , nd_se.asd
|
||||
SaveF, , nd_sf.asd
|
||||
SaveG, , nd_sg.asd
|
||||
SaveH, , nd_sh.asd
|
||||
SaveI, , nd_si.asd
|
||||
SaveJ, , nd_sj.asd
|
||||
SaveK, , nd_sk.asd
|
||||
SaveL, , nd_sl.asd
|
||||
SaveM, , nd_sm.asd
|
||||
SaveN, , nd_sn.asd
|
||||
SaveO, , nd_so.asd
|
||||
SaveP, , nd_sp.asd
|
||||
SaveQ, , nd_sq.asd
|
||||
SaveR, , nd_sr.asd
|
||||
SaveS, , nd_ss.asd
|
||||
SaveT, , nd_st.asd
|
||||
SaveU, , nd_su.asd
|
||||
SaveV, , nd_sv.asd
|
||||
SaveW, , nd_sw.asd
|
||||
SaveX, , nd_sx.asd
|
||||
SaveY, , nd_sy.asd
|
||||
SaveZ, , nd_sz.asd
|
||||
@@ -1,32 +0,0 @@
|
||||
# Only You リクルス Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, onlyyou_r_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, onlyyou_r_ga.ald
|
||||
WaveA, gamedata/*WA.ald, onlyyou_r_wa.ald
|
||||
Ain, gamedata/*.ain, System39.ain
|
||||
SaveA, , onlyyou_r_sa.asd
|
||||
SaveB, , onlyyou_r_sb.asd
|
||||
SaveC, , onlyyou_r_sc.asd
|
||||
SaveD, , onlyyou_r_sd.asd
|
||||
SaveE, , onlyyou_r_se.asd
|
||||
SaveF, , onlyyou_r_sf.asd
|
||||
SaveG, , onlyyou_r_sg.asd
|
||||
SaveH, , onlyyou_r_sh.asd
|
||||
SaveI, , onlyyou_r_si.asd
|
||||
SaveJ, , onlyyou_r_sj.asd
|
||||
SaveK, , onlyyou_r_sk.asd
|
||||
SaveL, , onlyyou_r_sl.asd
|
||||
SaveM, , onlyyou_r_sm.asd
|
||||
SaveN, , onlyyou_r_sn.asd
|
||||
SaveO, , onlyyou_r_so.asd
|
||||
SaveP, , onlyyou_r_sp.asd
|
||||
SaveQ, , onlyyou_r_sq.asd
|
||||
SaveR, , onlyyou_r_sr.asd
|
||||
SaveS, , onlyyou_r_ss.asd
|
||||
SaveT, , onlyyou_r_st.asd
|
||||
SaveU, , onlyyou_r_su.asd
|
||||
SaveV, , onlyyou_r_sv.asd
|
||||
SaveW, , onlyyou_r_sw.asd
|
||||
SaveX, , onlyyou_r_sx.asd
|
||||
SaveY, , onlyyou_r_sy.asd
|
||||
SaveZ, , onlyyou_r_sz.asd
|
||||
@@ -1,16 +0,0 @@
|
||||
# Oudou Yusha Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, oudou_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, oudou_ga.ald
|
||||
GraphicsB, gamedata/*gb.ald, oudou_gb.ald
|
||||
WaveA, gamedata/*wa.ald, oudou_wa.ald
|
||||
SaveA, , oudou_sa.asd
|
||||
SaveB, , oudou_sb.asd
|
||||
SaveC, , oudou_sc.asd
|
||||
SaveD, , oudou_sd.asd
|
||||
SaveE, , oudou_se.asd
|
||||
SaveF, , oudou_sf.asd
|
||||
SaveG, , oudou_sg.asd
|
||||
SaveH, , oudou_sh.asd
|
||||
SaveI, , oudou_si.asd
|
||||
SaveJ, , oudou_sj.asd
|
||||
@@ -1,36 +0,0 @@
|
||||
# Kaerunyo Panyon Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, panyo_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, panyo_ga.ald
|
||||
WaveA, gamedata/*wa.ald, panyo_wa.ald
|
||||
SaveA, , panyo_sa.asd
|
||||
SaveB, , panyo_sb.asd
|
||||
SaveC, , panyo_sc.asd
|
||||
SaveD, , panyo_sd.asd
|
||||
SaveE, , panyo_se.asd
|
||||
SaveF, , panyo_sf.asd
|
||||
SaveG, , panyo_sg.asd
|
||||
SaveH, , panyo_sh.asd
|
||||
SaveI, , panyo_si.asd
|
||||
SaveJ, , panyo_sj.asd
|
||||
SaveK, , panyo_sk.asd
|
||||
SaveL, , panyo_sl.asd
|
||||
SaveM, , panyo_sm.asd
|
||||
SaveN, , panyo_sn.asd
|
||||
SaveO, , panyo_so.asd
|
||||
, gamedata/floor_1.map, floor_1.map
|
||||
, gamedata/floor_2.map, floor_2.map
|
||||
, gamedata/floor_3.map, floor_3.map
|
||||
, gamedata/floor_4.map, floor_4.map
|
||||
, gamedata/floor_5.map, floor_5.map
|
||||
, gamedata/floor_6.map, floor_6.map
|
||||
, gamedata/floor_7.map, floor_7.map
|
||||
, gamedata/floor_8.map, floor_8.map
|
||||
, gamedata/floor_9.map, floor_9.map
|
||||
, gamedata/floor_10.map, floor_10.map
|
||||
, gamedata/floor_11.map, floor_11.map
|
||||
, gamedata/floor_12.map, floor_12.map
|
||||
, gamedata/floor_13.map, floor_13.map
|
||||
, gamedata/floor_14.map, floor_14.map
|
||||
, gamedata/floor_15.map, floor_15.map
|
||||
, gamedata/floor_16.map, floor_16.map
|
||||
@@ -1,63 +0,0 @@
|
||||
# Kaerunyo Panyon (low price version) Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, panyo_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, panyo_ga.ald
|
||||
WaveA, gamedata/*wa.ald, panyo_wa.ald
|
||||
SaveA, , panyo_sa.asd
|
||||
SaveB, , panyo_sb.asd
|
||||
SaveC, , panyo_sc.asd
|
||||
SaveD, , panyo_sd.asd
|
||||
SaveE, , panyo_se.asd
|
||||
SaveF, , panyo_sf.asd
|
||||
SaveG, , panyo_sg.asd
|
||||
SaveH, , panyo_sh.asd
|
||||
SaveI, , panyo_si.asd
|
||||
SaveJ, , panyo_sj.asd
|
||||
SaveK, , panyo_sk.asd
|
||||
SaveL, , panyo_sl.asd
|
||||
SaveM, , panyo_sm.asd
|
||||
SaveN, , panyo_sn.asd
|
||||
SaveO, , panyo_so.asd
|
||||
SaveP, , panyo_sp.asd
|
||||
SaveQ, , panyo_sq.asd
|
||||
SaveR, , panyo_sr.asd
|
||||
SaveS, , panyo_ss.asd
|
||||
SaveT, , panyo_st.asd
|
||||
SaveU, , panyo_su.asd
|
||||
SaveV, , panyo_sv.asd
|
||||
SaveW, , panyo_sw.asd
|
||||
SaveX, , panyo_sx.asd
|
||||
SaveY, , panyo_sy.asd
|
||||
, gamedata/floor_1.map, floor_1.map
|
||||
, gamedata/floor_2.map, floor_2.map
|
||||
, gamedata/floor_3.map, floor_3.map
|
||||
, gamedata/floor_4.map, floor_4.map
|
||||
, gamedata/floor_5.map, floor_5.map
|
||||
, gamedata/floor_6.map, floor_6.map
|
||||
, gamedata/floor_7.map, floor_7.map
|
||||
, gamedata/floor_8.map, floor_8.map
|
||||
, gamedata/floor_9.map, floor_9.map
|
||||
, gamedata/floor_10.map, floor_10.map
|
||||
, gamedata/floor_11.map, floor_11.map
|
||||
, gamedata/floor_12.map, floor_12.map
|
||||
, gamedata/floor_13.map, floor_13.map
|
||||
, gamedata/floor_14.map, floor_14.map
|
||||
, gamedata/floor_15.map, floor_15.map
|
||||
, gamedata/floor_16.map, floor_16.map
|
||||
, gamedata/floor_17.map, floor_17.map
|
||||
, gamedata/floor_18.map, floor_18.map
|
||||
, gamedata/floor_19.map, floor_19.map
|
||||
, gamedata/floor_20.map, floor_20.map
|
||||
, gamedata/floor_21.map, floor_21.map
|
||||
, gamedata/floor_22.map, floor_22.map
|
||||
, gamedata/floor_23.map, floor_23.map
|
||||
, gamedata/floor_24.map, floor_24.map
|
||||
, gamedata/floor_25.map, floor_25.map
|
||||
, gamedata/floor_26.map, floor_26.map
|
||||
, gamedata/floor_27.map, floor_27.map
|
||||
, gamedata/floor_28.map, floor_28.map
|
||||
, gamedata/floor_29.map, floor_29.map
|
||||
, gamedata/floor_30.map, floor_30.map
|
||||
, gamedata/floor_31.map, floor_31.map
|
||||
, gamedata/floor_32.map, floor_32.map
|
||||
, gamedata/floor_33.map, floor_33.map
|
||||
@@ -1,33 +0,0 @@
|
||||
# PastelChime Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ALD, pascha_sa.ald
|
||||
GraphicsA, gamedata/*GA.ALD, pascha_ga.ald
|
||||
WaveA, gamedata/*WA.ALD, pascha_wa.ald
|
||||
MidiA, gamedata/*MA.ALD, pascha_ma.ald
|
||||
DataA, gamedata/*DA.ALD, pascha_da.ald
|
||||
SaveA, , pascha_sa.asd
|
||||
SaveB, , pascha_sb.asd
|
||||
SaveC, , pascha_sc.asd
|
||||
SaveD, , pascha_sd.asd
|
||||
SaveE, , pascha_se.asd
|
||||
SaveF, , pascha_sf.asd
|
||||
SaveG, , pascha_sg.asd
|
||||
SaveH, , pascha_sh.asd
|
||||
SaveI, , pascha_si.asd
|
||||
SaveJ, , pascha_sj.asd
|
||||
SaveK, , pascha_sk.asd
|
||||
SaveL, , pascha_sl.asd
|
||||
SaveM, , pascha_sm.asd
|
||||
SaveN, , pascha_sn.asd
|
||||
SaveO, , pascha_so.asd
|
||||
SaveP, , pascha_sp.asd
|
||||
SaveQ, , pascha_sq.asd
|
||||
SaveR, , pascha_sr.asd
|
||||
SaveS, , pascha_ss.asd
|
||||
SaveT, , pascha_st.asd
|
||||
SaveU, , pascha_su.asd
|
||||
SaveV, , pascha_sv.asd
|
||||
SaveW, , pascha_sw.asd
|
||||
SaveX, , pascha_sx.asd
|
||||
SaveY, , pascha_sy.asd
|
||||
SaveZ, , pascha_sz.asd
|
||||
@@ -1,20 +0,0 @@
|
||||
# Persiom Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, persiom_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, persiom_ga.ald
|
||||
GraphicsB, GAMEDATA/*GB.ALD, persiom_gb.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, persiom_wa.ald
|
||||
MidiA, GAMEDATA/*MA.ALD, persiom_ma.ald
|
||||
DataA, GAMEDATA/*DA.ALD, persiom_da.ald
|
||||
SaveA, , persiom_sa.asd
|
||||
SaveB, , persiom_sb.asd
|
||||
SaveC, , persiom_sc.asd
|
||||
SaveD, , persiom_sd.asd
|
||||
SaveE, , persiom_se.asd
|
||||
SaveF, , persiom_sf.asd
|
||||
SaveG, , persiom_sg.asd
|
||||
SaveH, , persiom_sh.asd
|
||||
SaveI, , persiom_si.asd
|
||||
SaveJ, , persiom_sj.asd
|
||||
SaveK, , persiom_sk.asd
|
||||
SaveL, , persiom_sl.asd
|
||||
@@ -1,17 +0,0 @@
|
||||
# prostudent good Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, progood_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, progood_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, progood_wa.ald
|
||||
DataA, GAMEDATA/*DA.ALD, progood_da.ald
|
||||
SaveA, , progood_sa.asd
|
||||
SaveB, , progood_sb.asd
|
||||
SaveC, , progood_sc.asd
|
||||
SaveD, , progood_sd.asd
|
||||
SaveE, , progood_se.asd
|
||||
SaveF, , progood_sf.asd
|
||||
SaveG, , progood_sg.asd
|
||||
SaveH, , progood_sh.asd
|
||||
SaveI, , progood_si.asd
|
||||
SaveJ, , progood_sj.asd
|
||||
SaveK, , progood_sk.asd
|
||||
@@ -1,20 +0,0 @@
|
||||
# Rance 1 Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, rance1/rancesa.ald, rance1_sa.ald
|
||||
GraphicsA, rance1/rancega.ald, rance1_ga.ald
|
||||
MidiA, rance1/rancema.ald, rance1_ma.ald
|
||||
WaveA, rance1/rancewa.ald, rance1_wa.ald
|
||||
SaveA, , rance1_sa.asd
|
||||
SaveB, , rance1_sb.asd
|
||||
SaveC, , rance1_sc.asd
|
||||
SaveD, , rance1_sd.asd
|
||||
SaveE, , rance1_se.asd
|
||||
SaveF, , rance1_sf.asd
|
||||
SaveG, , rance1_sg.asd
|
||||
SaveH, , rance1_sh.asd
|
||||
SaveI, , rance1_si.asd
|
||||
SaveJ, , rance1_sj.asd
|
||||
SaveK, , rance1_sk.asd
|
||||
SaveL, , rance1_sl.asd
|
||||
SaveM, , rance1_sm.asd
|
||||
SaveN, , rance1_sn.asd
|
||||
@@ -1,20 +0,0 @@
|
||||
# Rance 2 Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, rance2/rance2sa.ald, rance2_sa.ald
|
||||
GraphicsA, rance2/rance2ga.ald, rance2_ga.ald
|
||||
MidiA, rance2/rance2ma.ald, rance2_ma.ald
|
||||
WaveA, rance2/rance2wa.ald, rance2_wa.ald
|
||||
SaveA, , rance2_sa.asd
|
||||
SaveB, , rance2_sb.asd
|
||||
SaveC, , rance2_sc.asd
|
||||
SaveD, , rance2_sd.asd
|
||||
SaveE, , rance2_se.asd
|
||||
SaveF, , rance2_sf.asd
|
||||
SaveG, , rance2_sg.asd
|
||||
SaveH, , rance2_sh.asd
|
||||
SaveI, , rance2_si.asd
|
||||
SaveJ, , rance2_sj.asd
|
||||
SaveK, , rance2_sk.asd
|
||||
SaveL, , rance2_sl.asd
|
||||
SaveM, , rance2_sm.asd
|
||||
SaveN, , rance2_sn.asd
|
||||
@@ -1,15 +0,0 @@
|
||||
# Rance 3 Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, rance3/rance3sa.ald, rance3sa.ald
|
||||
GraphicsA, rance3/rance3ga.ald, rance3ga.ald
|
||||
WaveA, rance3/rance3wa.ald, rance3wa.ald
|
||||
MidiA, rance3/rance3ma.ald, rance3ma.ald
|
||||
DataA, rance3/rance3da.ald, rance3da.ald
|
||||
SaveA, , rance3sa.asd
|
||||
SaveB, , rance3sb.asd
|
||||
SaveC, , rance3sc.asd
|
||||
SaveD, , rance3sd.asd
|
||||
SaveE, , rance3se.asd
|
||||
SaveF, , rance3sf.asd
|
||||
SaveG, , rance3sg.asd
|
||||
SaveH, , rance3sh.asd
|
||||
@@ -1,15 +0,0 @@
|
||||
# Rance 4 Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, rance4_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, rance4_ga.ald
|
||||
WaveA, gamedata/*wa.ald, rance4_wa.ald
|
||||
SaveA, , rance4_sa.asd
|
||||
SaveB, , rance4_sb.asd
|
||||
SaveC, , rance4_sc.asd
|
||||
SaveD, , rance4_sd.asd
|
||||
SaveE, , rance4_se.asd
|
||||
SaveF, , rance4_sf.asd
|
||||
SaveG, , rance4_sg.asd
|
||||
SaveH, , rance4_sh.asd
|
||||
SaveI, , rance4_si.asd
|
||||
SaveJ, , rance4_sj.asd
|
||||
@@ -1,36 +0,0 @@
|
||||
# Rance5D Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, r5d_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, r5d_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, r5d_wa.ald
|
||||
BGMA, GAMEDATA/*BA.ALD, r5d_ba.ald
|
||||
BGIA, GAMEDATA/*BA.BGI, r5d_ba.bgi
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
Init, GAMEDATA/*.ini, system39.ini
|
||||
SACT01, GAMEDATA/SACTEFAM.KLD, SACTEFAM.KLD
|
||||
SaveA, , r5d_sa.asd
|
||||
SaveB, , r5d_sb.asd
|
||||
SaveC, , r5d_sc.asd
|
||||
SaveD, , r5d_sd.asd
|
||||
SaveE, , r5d_se.asd
|
||||
SaveF, , r5d_sf.asd
|
||||
SaveG, , r5d_sg.asd
|
||||
SaveH, , r5d_sh.asd
|
||||
SaveI, , r5d_si.asd
|
||||
SaveJ, , r5d_sj.asd
|
||||
SaveK, , r5d_sk.asd
|
||||
SaveL, , r5d_sl.asd
|
||||
SaveM, , r5d_sm.asd
|
||||
SaveN, , r5d_sn.asd
|
||||
SaveO, , r5d_so.asd
|
||||
SaveP, , r5d_sp.asd
|
||||
SaveQ, , r5d_sq.asd
|
||||
SaveR, , r5d_sr.asd
|
||||
SaveS, , r5d_ss.asd
|
||||
SaveT, , r5d_st.asd
|
||||
SaveU, , r5d_su.asd
|
||||
SaveV, , r5d_sv.asd
|
||||
SaveW, , r5d_sw.asd
|
||||
SaveX, , r5d_sx.asd
|
||||
SaveY, , r5d_sy.asd
|
||||
SaveZ, , r5d_sz.asd
|
||||
@@ -1,31 +0,0 @@
|
||||
# SeeInAO Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, seeinao_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, seeinao_ga.ald
|
||||
WaveA, gamedata/*WA.ald, seeinao_wa.ald
|
||||
MidiA, gamedata/*MA.ald, seeinao_ma.ald
|
||||
SaveA, , seeinao_sa.asd
|
||||
SaveB, , seeinao_sb.asd
|
||||
SaveC, , seeinao_sc.asd
|
||||
SaveD, , seeinao_sd.asd
|
||||
SaveE, , seeinao_se.asd
|
||||
SaveF, , seeinao_sf.asd
|
||||
SaveG, , seeinao_sg.asd
|
||||
SaveH, , seeinao_sh.asd
|
||||
SaveI, , seeinao_si.asd
|
||||
SaveJ, , seeinao_sj.asd
|
||||
SaveK, , seeinao_sk.asd
|
||||
SaveL, , seeinao_sl.asd
|
||||
SaveM, , seeinao_sm.asd
|
||||
SaveN, , seeinao_sn.asd
|
||||
SaveO, , seeinao_so.asd
|
||||
SaveP, , seeinao_sp.asd
|
||||
SaveQ, , seeinao_sq.asd
|
||||
SaveR, , seeinao_sr.asd
|
||||
SaveS, , seeinao_ss.asd
|
||||
SaveT, , seeinao_st.asd
|
||||
SaveU, , seeinao_su.asd
|
||||
SaveV, , seeinao_sv.asd
|
||||
SaveW, , seeinao_sw.asd
|
||||
SaveX, , seeinao_sx.asd
|
||||
SaveY, , seeinao_sy.asd
|
||||
@@ -1,16 +0,0 @@
|
||||
# Toushin Toshi Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, ???_?s?s/*_sa.ald, toushin_sa.ald
|
||||
GraphicsA, ???_?s?s/*_ga.ald, toushin_ga.ald
|
||||
MidiA, ???_?s?s/*_ma.ald, toushin_ma.ald
|
||||
WaveA, ???_?s?s/*_wa.ald, toushin_wa.ald
|
||||
DataA, ???_?s?s/*_da.ald, toushin_da.ald
|
||||
SaveA, , toushin_sa.asd
|
||||
SaveB, , toushin_sb.asd
|
||||
SaveC, , toushin_sc.asd
|
||||
SaveD, , toushin_sd.asd
|
||||
SaveE, , toushin_se.asd
|
||||
SaveF, , toushin_sf.asd
|
||||
SaveG, , toushin_sg.asd
|
||||
SaveH, , toushin_sh.asd
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# Toushintoshi2 Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, toushin2_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, toushin2_ga.ald
|
||||
WaveA, gamedata/*wa.ald, toushin2_wa.ald
|
||||
DataA, gamedata/*da.ald, toushin2_da.ald
|
||||
SaveA, , toushin2_sa.asd
|
||||
SaveB, , toushin2_sb.asd
|
||||
SaveC, , toushin2_sc.asd
|
||||
SaveD, , toushin2_sd.asd
|
||||
SaveE, , toushin2_se.asd
|
||||
SaveF, , toushin2_sf.asd
|
||||
SaveG, , toushin2_sg.asd
|
||||
SaveH, , toushin2_sh.asd
|
||||
SaveI, , toushin2_si.asd
|
||||
SaveJ, , toushin2_sj.asd
|
||||
@@ -1,32 +0,0 @@
|
||||
# 妻みぐい Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*SA.ald, tsuma_sa.ald
|
||||
GraphicsA, gamedata/*GA.ald, tsuma_ga.ald
|
||||
WaveA, gamedata/*WA.ald, tsuma_wa.ald
|
||||
Ain, gamedata/*.ain, system39.ain
|
||||
SaveA, , tsuma_sa.asd
|
||||
SaveB, , tsuma_sb.asd
|
||||
SaveC, , tsuma_sc.asd
|
||||
SaveD, , tsuma_sd.asd
|
||||
SaveE, , tsuma_se.asd
|
||||
SaveF, , tsuma_sf.asd
|
||||
SaveG, , tsuma_sg.asd
|
||||
SaveH, , tsuma_sh.asd
|
||||
SaveI, , tsuma_si.asd
|
||||
SaveJ, , tsuma_sj.asd
|
||||
SaveK, , tsuma_sk.asd
|
||||
SaveL, , tsuma_sl.asd
|
||||
SaveM, , tsuma_sm.asd
|
||||
SaveN, , tsuma_sn.asd
|
||||
SaveO, , tsuma_so.asd
|
||||
SaveP, , tsuma_sp.asd
|
||||
SaveQ, , tsuma_sq.asd
|
||||
SaveR, , tsuma_sr.asd
|
||||
SaveS, , tsuma_ss.asd
|
||||
SaveT, , tsuma_st.asd
|
||||
SaveU, , tsuma_su.asd
|
||||
SaveV, , tsuma_sv.asd
|
||||
SaveW, , tsuma_sw.asd
|
||||
SaveX, , tsuma_sx.asd
|
||||
SaveY, , tsuma_sy.asd
|
||||
SaveZ, , tsuma_sz.asd
|
||||
@@ -1,38 +0,0 @@
|
||||
# 妻みぐい2 Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, GAMEDATA/*SA.ALD, tsuma2_sa.ald
|
||||
GraphicsA, GAMEDATA/*GA.ALD, tsuma2_ga.ald
|
||||
WaveA, GAMEDATA/*WA.ALD, tsuma2_wa.ald
|
||||
WaveB, GAMEDATA/*WB.ALD, tsuma2_wb.ald
|
||||
BGMA, GAMEDATA/*BA.ALD, tsuma2_ba.ald
|
||||
WAIA, GAMEDATA/*WA.WAI, tsuma2_wa.wai
|
||||
BGIA, GAMEDATA/*BA.BGI, tsuma2_ba.bgi
|
||||
Ain, GAMEDATA/*.ain, system39.ain
|
||||
Init, GAMEDATA/*.ini, system39.ini
|
||||
SACT01, GAMEDATA/SACTEFAM.KLD, SACTEFAM.KLD
|
||||
SaveA, , tsuma2_sa.asd
|
||||
SaveB, , tsuma2_sb.asd
|
||||
SaveC, , tsuma2_sc.asd
|
||||
SaveD, , tsuma2_sd.asd
|
||||
SaveE, , tsuma2_se.asd
|
||||
SaveF, , tsuma2_sf.asd
|
||||
SaveG, , tsuma2_sg.asd
|
||||
SaveH, , tsuma2_sh.asd
|
||||
SaveI, , tsuma2_si.asd
|
||||
SaveJ, , tsuma2_sj.asd
|
||||
SaveK, , tsuma2_sk.asd
|
||||
SaveL, , tsuma2_sl.asd
|
||||
SaveM, , tsuma2_sm.asd
|
||||
SaveN, , tsuma2_sn.asd
|
||||
SaveO, , tsuma2_so.asd
|
||||
SaveP, , tsuma2_sp.asd
|
||||
SaveQ, , tsuma2_sq.asd
|
||||
SaveR, , tsuma2_sr.asd
|
||||
SaveS, , tsuma2_ss.asd
|
||||
SaveT, , tsuma2_st.asd
|
||||
SaveU, , tsuma2_su.asd
|
||||
SaveV, , tsuma2_sv.asd
|
||||
SaveW, , tsuma2_sw.asd
|
||||
SaveX, , tsuma2_sx.asd
|
||||
SaveY, , tsuma2_sy.asd
|
||||
SaveZ, , tsuma2_sz.asd
|
||||
@@ -1,32 +0,0 @@
|
||||
# Zero-shiki (low price version) Install infomation
|
||||
# Tag, #origin, #destination
|
||||
ScenarioA, gamedata/*sa.ald, zero_sa.ald
|
||||
GraphicsA, gamedata/*ga.ald, zero_ga.ald
|
||||
WaveA, gamedata/*wa.ald, zero_wa.ald
|
||||
SaveA, , zero_sa.asd
|
||||
SaveB, , zero_sb.asd
|
||||
SaveC, , zero_sc.asd
|
||||
SaveD, , zero_sd.asd
|
||||
SaveE, , zero_se.asd
|
||||
SaveF, , zero_sf.asd
|
||||
SaveG, , zero_sg.asd
|
||||
SaveH, , zero_sh.asd
|
||||
SaveI, , zero_si.asd
|
||||
SaveJ, , zero_sj.asd
|
||||
SaveK, , zero_sk.asd
|
||||
SaveL, , zero_sl.asd
|
||||
SaveM, , zero_sm.asd
|
||||
SaveN, , zero_sn.asd
|
||||
SaveO, , zero_so.asd
|
||||
SaveP, , zero_sp.asd
|
||||
SaveQ, , zero_sq.asd
|
||||
SaveR, , zero_sr.asd
|
||||
SaveS, , zero_ss.asd
|
||||
SaveT, , zero_st.asd
|
||||
SaveU, , zero_su.asd
|
||||
SaveV, , zero_sv.asd
|
||||
SaveW, , zero_sw.asd
|
||||
SaveX, , zero_sx.asd
|
||||
SaveY, , zero_sy.asd
|
||||
, gamedata/map_data.dat, MAP_DATA.DAT
|
||||
, gamedata/ur_data.dat, UR_DATA.DAT
|
||||
@@ -1,23 +0,0 @@
|
||||
BUG INFORMATION for
|
||||
System 3.5 for X Window System Version 1.7
|
||||
|
||||
|
||||
* いけないかつみ先生の外字はサポートしていません。
|
||||
|
||||
|
||||
* Ctrl+Cで強制終了したり、異常終了した場合 IPC Keyがまれに残る事があります。
|
||||
% ipcs
|
||||
でidを確認し、
|
||||
% ipcrm shm ???
|
||||
で消して下さい。(Linuxの場合。その他は man ipcrm してください)
|
||||
|
||||
|
||||
* SDL を有効にしてコンパイルしフルスクリーンで実行した場合、真中クリックに
|
||||
よるメニューが表示されません。その場合、F4 キーで一旦フルスクリーンを解除
|
||||
してください。
|
||||
|
||||
|
||||
* フルスクリーン実行中にマウスの真中ボタンクリックによるポップアップ
|
||||
メニューを出すと、マウスカーソルが画面の表示領域を超えて動いてしまいます。
|
||||
|
||||
[EOF]
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
Q. FreeBSD でコンパイルできない。make とするとエラーが出る。
|
||||
A. gmake (GNU make) を使ってください。
|
||||
|
||||
|
||||
Q. cant load font JISX0201.1976-0 と出て終了してしまう。
|
||||
A. ~/.xsys35rc に自分のシステムにインストールされているフォントを指定して
|
||||
いますか?
|
||||
|
||||
% xlsfonts | grep 0-0-0-0 | grep jisx0201.1976
|
||||
|
||||
とやって表示されるフォント名を ~/.xsys35rc の font_gothic と font_mincho
|
||||
に書きます。今の所この2つしか使用していません。
|
||||
@@ -3,7 +3,6 @@
|
||||
[鬼畜王ランス]
|
||||
|
||||
[ランス4(for Win95)]
|
||||
= マウスのクリック反応が悪い (fixed ?)
|
||||
|
||||
[闘神都市2(for Win95)]
|
||||
|
||||
@@ -101,7 +100,6 @@
|
||||
= 動きません
|
||||
|
||||
[王子さま Lv1]
|
||||
= 動きません
|
||||
|
||||
[Only You 〜リ・クルス〜]
|
||||
|
||||
|
||||
+1
-1
@@ -223,7 +223,7 @@
|
||||
-Ms? : Sequencer device (?:device number)
|
||||
-M0 : disable midi
|
||||
|
||||
-devjoy name : joystick のデバイス名を name にします
|
||||
-devjoy n : n 番目の joystick のデバイスを使用します。
|
||||
|
||||
-version : バージョン情報を表示します。
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
|
||||
色がおかしいぞ???
|
||||
|
||||
|
||||
起動してみて色がおかしいと思った方はこのドキュメントを読み進めて下さい。
|
||||
|
||||
|
||||
1. i386系
|
||||
|
||||
色がおかしいと言うことはまず無いと思いますが、ビデオカードの中には packed24
|
||||
と呼ばれる 1pixel につき 3byte を使って 1600万色モードを実現しているものが
|
||||
あります。例えば Matrox Mystique などがあります(通常は 1pixel につき 4byte
|
||||
を使って 1600万色モードを実現しています)。
|
||||
|
||||
xdpyinfo とやって supported pixmap formats のリストに
|
||||
depth 24, bits_per_pixel 24, scanline_pad 32
|
||||
とあれば packed24 です。
|
||||
|
||||
この packed24 にも対応していますが、速度の面から 16bpp または32bpp で X server
|
||||
を起動することを推奨します。
|
||||
|
||||
|
||||
2. PPC系
|
||||
|
||||
linuxPPCでは X server として Xpmac と XF68_FBDev のどちらかが使われて
|
||||
います。LinuxPPC R4 あたりの X Server では次のような不具合があるそうなの
|
||||
でうまく回避して下さい。
|
||||
|
||||
* Xpmac でアクセラレーションを有効にしたものを使うとXが固まるので、
|
||||
xsystem35 を -no-shm オプション付で実行して下さい。設定ファイル(.xsys35rc)
|
||||
に -no-shmに関する設定を書いておくこともできます。
|
||||
|
||||
|
||||
3. SGI系, Sparc系
|
||||
|
||||
これらの X Server は ピクセルのRGBのならびがi386系などとは逆になっています。
|
||||
行儀の良いアプリケーションは X Server から情報を取り出して適切に処理する事で
|
||||
どのようなRGBの並びにも対応できるはずなのですが、xsystem35は手抜きをしていて
|
||||
ハードコーディングしています。これは速度(?)と利用数の問題と言う事で.. (^^;;;
|
||||
|
||||
xdpyinfo として Visual のところで
|
||||
|
||||
class: TrueColor
|
||||
depth: 24 planes
|
||||
red, green, blue masks: 0xff, 0xff00, 0xff0000
|
||||
|
||||
のようになっていたら、BGR の並びと言うことになります。SGI 系と Sparc 系では
|
||||
これがデフォルトの動作ですが、sgi O2 や sparc の一部の機種では
|
||||
|
||||
class: TrueColor
|
||||
depth: 24 planes
|
||||
red, green, blue masks: 0xff0000, 0xff00, 0xff
|
||||
|
||||
となっている場合があります。この場合、configure に --disable-bgr をつけて
|
||||
コンパイルしてください。
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
|
||||
Joystick の使い方について
|
||||
|
||||
現在 linux の kernel 2.2.x 以降の Joystick インターフェイスに対応して
|
||||
います。対応環境をおもちの方は configure --enable-joy としてコンパイル
|
||||
コンパイルして下さい。
|
||||
|
||||
Joystick のデバイス名はデフォルトでは /dev/js0 で、実行時に -devjoy
|
||||
オプションで指定するか、.xsys35rc ファイルで joy_device のエントリー
|
||||
に加えて下さい。
|
||||
|
||||
他環境での動作報告、パッチなどお待ちしています。宛先は以下の両方に
|
||||
お願いします。
|
||||
|
||||
chikama (masaki-c@is.aist-nara.ac.jp)
|
||||
linux 版の作者の村田さん(fmurata@p1.tcnet.ne.jp)
|
||||
|
||||
+49
-49
@@ -84,7 +84,7 @@
|
||||
必要に応じてシナリオ内の変数に読み込みます。
|
||||
|
||||
f) リソースファイルは、マウスカーソルの形状とアニメーションマウスカーソルの
|
||||
データを格納しています。これまで DARCROW でのみ使用されました。
|
||||
データを格納しています。これまで DARCROWS でのみ使用されました。
|
||||
|
||||
g) セーブデータは、システム管理情報と数値変数、文字列変数のすべてを含んだ
|
||||
全セーブデータ(*.asd)と数値変数・文字列変数の一部を保存したデータの2種類が
|
||||
@@ -94,17 +94,17 @@
|
||||
h) その他のデータの範疇に入るものとしては外字ファイルとデータファイルがあり
|
||||
ます。
|
||||
外字ファイルは、PC9801の外字領域に16x16ドットのビットマップデータを並べた
|
||||
もので、オリジナルの外字を表示させるのに加えて、98機種依存文字の吸収も目指
|
||||
もので、オリジナルの外字を表示させるのに加えて、PC98機種依存文字の吸収も目指
|
||||
していたのですが、結局外字ファイルは「いけないかつみ先生」で使われたのみで、
|
||||
SYSTEM35.EXE Version 2.x 以降ではサポートすらされなくなりました。また、機種
|
||||
依存文字(まる文字やギリシャ数字など)はそれ以降のゲームでも機種存のコードで
|
||||
依存文字(まる文字やギリシャ数字など)はそれ以降のゲームでも機種依存のコードで
|
||||
継続して使われています。SYSTEM 3.9 では再び外字のサポートが復活するようです。
|
||||
|
||||
データファイルは、基本的には、シナリオ変数を外部に保存したものと考える事
|
||||
ができます。マップデータのようにあらかじめゲームに附属しているものもあれば、
|
||||
ゲームの途中経過を記録するために、ファイルに書き出す事もあります。
|
||||
かえるにょぱにょーんのマップデータ等のように e)のデータファイルで代用できる
|
||||
ものもあります。
|
||||
かえるにょ・ぱにょ〜んのマップデータ等のように e)のデータファイルで代用でき
|
||||
るものもあります。
|
||||
|
||||
3. データファイル (.ald) のフォーマット
|
||||
|
||||
@@ -143,15 +143,15 @@
|
||||
data そのものについても、ヘッダと実データに分ける事が出来ます。ヘッダは
|
||||
32バイト以上の長さで次のようになっています。
|
||||
|
||||
int32 prt;
|
||||
int32 ptr;
|
||||
int32 size;
|
||||
int32 time_l;
|
||||
int32 time_h;
|
||||
char name[?];
|
||||
|
||||
ptr は実際のデータへのヘッダからの相対アドレスです。size はデータの大きさを
|
||||
表します。 time_l と time_h は Windows 特有(?)の値で、データの作成時間をユリ
|
||||
ウス歴の最初の日付からの経過時間をナノ秒で表したものです。name はアーカイブ
|
||||
表します。 time_l と time_h は Windows の FILETIME 型の値で、データの作成時刻
|
||||
を1601-01-01からの100ナノ秒単位の経過時間で表したものです。name はアーカイブ
|
||||
する前のデータのファイル名で、16バイト以上の長さがあります。16バイト未満の時
|
||||
は0でパディングされます。またヘッダとデータを併せて 256バイト単位になるよう
|
||||
にデータの後ろは0でパディングされます。
|
||||
@@ -200,26 +200,26 @@
|
||||
int16 width;
|
||||
int16 height;
|
||||
int8 rsv;
|
||||
int8 pallet_bank;
|
||||
int8 palette_bank;
|
||||
int8 pal[3*16];
|
||||
|
||||
(x0,y0) は、CGを表示する位置を表します。シナリオから表示位置の指定のない場合
|
||||
この値を使います。x0 は 8で割った大きさになっていいますので、x0=10 とあった
|
||||
場合は実際には (80,y0) の位置に表示します。
|
||||
この値を使います。x0 は 8で割った大きさになっていますので、x0=10 とあった場
|
||||
合は実際には (80,y0) の位置に表示します。
|
||||
|
||||
(width, height) は CG の大きさを表します。widthは実際には8で割った大きさに
|
||||
なっています。これは、プレーン型のデータが元になっているためです。プレーン型
|
||||
のデータの場合、1バイトで表されるのは8ピクセル分だったため、width にいれる
|
||||
値は占めるバイト数を格納した方が有利だったんめと考えられます。よってCGの横の
|
||||
値は占めるバイト数を格納した方が有利だったためと考えられます。よってCGの横の
|
||||
サイズは常に8の倍数になります。8の倍数以外にしたい場合は、余る部分を透過
|
||||
パレット(スプライト)とする事で実現出来ます。
|
||||
|
||||
rsv は現在のところ、使われていません。
|
||||
|
||||
pallet_bank は、SYSTEM 3 の時代に 256色対応ゲームで、VSPファイルを読み込ませ
|
||||
palette_bank は、SYSTEM 3 の時代に 256色対応ゲームで、VSPファイルを読み込ませ
|
||||
るために、256個のパレットのどの場所に 16色分のパレットを置くかを決めます。
|
||||
bank=0 で 0-15, bank=1 で 16-31 となります。実装方法としては、plane->packed
|
||||
の変換の際に上位4bitにpalletを置いた場所の bitを立てます。bank=1 なら '| 0x10'
|
||||
の変換の際に上位4bitにpaletteを置いた場所の bitを立てます。bank=1 なら '| 0x10'
|
||||
という具合です。シナリオ側からパレットバンクを指定することもできます。しかし、
|
||||
シナリオ側から1度もパレットバンクの指定が無い場合はこのヘッダ内の情報が使用
|
||||
されます。(これは実装依存かもしれません)
|
||||
@@ -234,7 +234,7 @@
|
||||
です。
|
||||
|
||||
00, len;
|
||||
一つ上のプレーンと(len+1)の長さだけ同じ
|
||||
同じプレーンの一つ左の列と(len+1)の長さだけ同じ
|
||||
|
||||
01, len, pic;
|
||||
1バイト(pic)の繰り返し。長さは(len+1)
|
||||
@@ -277,32 +277,32 @@
|
||||
int8 bpp;
|
||||
int8 bppS;
|
||||
int8 trans_pal;
|
||||
int16 palett_bank;
|
||||
int32 rsv;
|
||||
int8 rsv1;
|
||||
int16 palette_bank;
|
||||
int32 rsv2;
|
||||
int32 x0;
|
||||
int32 y0;
|
||||
int32 width;
|
||||
int32 height;
|
||||
int32 data_ptr;
|
||||
int32 pallet_ptr;
|
||||
int32 palette_ptr;
|
||||
int32 comment_ptr;
|
||||
|
||||
sig はデータのマジックナンバーで 'PM' というデータが入っています。
|
||||
|
||||
ver はデータのバージョンで、現在は 1 が入っています。
|
||||
|
||||
bpp はデータの bit per pixel で 8または16です。256色データの場合は 8、64k色
|
||||
の場合は 16です。
|
||||
bpp はデータの bits per pixel で、256色データの場合は 8、64k色の場合は16です。
|
||||
|
||||
bppsはαチャンネルの bit per pixel で通常は8です。
|
||||
bppsはαチャンネルの bits per pixel で通常は8です。
|
||||
|
||||
trans_pal は透過するパレットの番号です。通常はシナリオから指定が来るので
|
||||
使用しません。
|
||||
|
||||
pallet_bank は データの中のパレットのどの部分をシステムに転送するかを
|
||||
palette_bank は データの中のパレットのどの部分をシステムに転送するかを
|
||||
表します。通常は 256個全部転送するのですが、CGデータがそれ以下しか色を使って
|
||||
ない場合には、一部のみ転送することができます。pallet_bank は 16bit の情報を
|
||||
持ち 256個を 16個づつに分割してどの部分を転送するかを指定します。bit-on で
|
||||
ない場合には、一部のみ転送することができます。palette_bank は 16bit の情報を
|
||||
持ち 256個を 16個ずつに分割してどの部分を転送するかを指定します。bit-on で
|
||||
転送です。LSB が0-15, MSB が 240-255 です。
|
||||
|
||||
(x0, y0) は CG の表示位置です。VSP と違って8で割った大きさではなく実際の
|
||||
@@ -312,10 +312,10 @@
|
||||
|
||||
data_ptr はデータ先頭からピクセルデータへの相対アドレスが入ります。
|
||||
|
||||
pallet_ptr は bppが8の場合にはパレットへの相対アドレスが入りますが、
|
||||
palette_ptr は bppが8の場合にはパレットへの相対アドレスが入りますが、
|
||||
16の場合にはαチャンネルデータへの相対アドレスが入ります。
|
||||
|
||||
comment_prt はデータにコメントをつける事ができて、そのデータへの相対アドレス
|
||||
comment_ptr はデータにコメントをつける事ができて、そのデータへの相対アドレス
|
||||
を指定します。
|
||||
|
||||
パレット
|
||||
@@ -333,31 +333,31 @@
|
||||
2つ上のラインと同じ。長さは (len+3:8bit, len+2:16bit)
|
||||
|
||||
0xfd, len, pic,
|
||||
1byte の picデータの連続。長さは (len+4:8bit, len+3:16bit)
|
||||
1ピクセルの picデータの連続。長さは (len+4:8bit, len+3:16bit)
|
||||
|
||||
0xfc, len, pic1, pic2
|
||||
2byte (pic1, pic2) データの連続。長さは ((len+3)*2:8bit, ((len+2)*2):16bit))
|
||||
2ピクセル (pic1, pic2) データの連続。長さは ((len+3)*2:8bit, (len+2)*2:16bit)
|
||||
|
||||
0xfb
|
||||
左上のデータと同じ。(PMS16専用)
|
||||
左上のピクセルと同じ。(PMS16専用)
|
||||
|
||||
0xfa
|
||||
右上のデータと同じ。(PMS16専用)
|
||||
右上のピクセルと同じ。(PMS16専用)
|
||||
|
||||
0xf9, len, pic_h, pic_l1, pic_l2, .... (PMS16専用)
|
||||
ピクセル間の色の差が小さいものの連続。長さは(len+1)
|
||||
各ピクセルのうち、R の上位 3bit, G の 2bit, B の 2bit が同じで、R の下位
|
||||
各ピクセルのうち、R の上位 3bit, G の 2bit, B の 3bit が同じで、R の下位
|
||||
2bit, G の 4bit, B の 2bit が異なるとき、下位の異なる部分のみを pic_l2,
|
||||
pic_l3... で表す。( RGB は 5bit, 6bit, 5bit で表される)
|
||||
pic_h, pic_l1 で最初のピクセルを構成し、ここから、RGB の上位が同じで、下位の
|
||||
異なる部分を pic_l2, pic_l3... で構成する
|
||||
異なる部分を pic_l2, pic_l3... で構成する。
|
||||
|
||||
0xf8, pic
|
||||
picそのもの。コードと同じピクセル用。8bit では pic は 1byte, 16bit では 2byte.
|
||||
|
||||
0xf7-0x00
|
||||
データそのもの 8bitでは 1byte, 16bit では 00-f7 の次のコードはすべて(00-ff)
|
||||
使用してピクセルを構成。
|
||||
データそのもの。 8bitでは 1byte, 16bit では次の 1byte と合わせてピクセルを
|
||||
構成。
|
||||
|
||||
|
||||
4.3 QNT フォーマット
|
||||
@@ -380,7 +380,7 @@
|
||||
int32 width;
|
||||
int32 height;
|
||||
int32 bpp;
|
||||
int32 rsv(?)
|
||||
int32 rsv; (?)
|
||||
int32 pixel_size;
|
||||
int32 alpha_size;
|
||||
|
||||
@@ -420,7 +420,7 @@
|
||||
header_size はヘッダの大きさをバイト数で表しています。Version 0 では 48
|
||||
バイト固定です。
|
||||
|
||||
(x0, y0) は CG の表示位置の指定です
|
||||
(x0, y0) は CG の表示位置の指定です。
|
||||
|
||||
(width, height) は CG の大きさの指定です。
|
||||
|
||||
@@ -472,8 +472,8 @@
|
||||
最新のものでは 'S380' となっています。途中混乱した時期があってこれと異なる
|
||||
場合もあります。
|
||||
|
||||
dat_prt は実際のシナリオデータの先頭への相対アドレスです。また、シナリオ中の
|
||||
ジャンプ命令のアドレスは、上のヘッダの最初からの相対アドレスを使用します。
|
||||
data_ptr は実際のシナリオデータの先頭のアドレスです。また、シナリオ中の
|
||||
ジャンプ命令のアドレスは、上のヘッダの先頭からの相対アドレスを使用します。
|
||||
|
||||
size はヘッダを含めたデータのサイズを示しています。
|
||||
|
||||
@@ -534,21 +534,21 @@
|
||||
04h 演算子(>= 以上)
|
||||
|
||||
数値は0から65535までの正の整数を扱えます。しかし、計算式上では word 定数は
|
||||
3FFFh しかあつかえませんので、それ以上の値を扱う場合は演算子を使います。
|
||||
3FFFh までしかあつかえませんので、それ以上の値を扱う場合は演算子を使います。
|
||||
65536 以上の数値を扱ったり、浮動小数を扱う場合は、64ビット変数を使用します。
|
||||
|
||||
配列を除く変数の最大は論理的には、16384 個ですが、実際には 2000 以下に実装上
|
||||
の限界があります。1000 以上になる場合は、配列変数を有効に使うと良いでしょう。
|
||||
配列を除く変数は論理的には最大 16384 個ですが、実際には 2000 以下に実装上の
|
||||
限界があります。1000 以上になる場合は、配列変数を有効に使うと良いでしょう。
|
||||
(xsystem35 の場合は 1024, 1.5.1pre1から 8192)
|
||||
|
||||
変数には、数値変数と配列変数があります。配列変数は、index 変数を用いた
|
||||
アクセス方法と、var[]のようなアクセス方法があります。var[]では上の 3.51拡張
|
||||
コードを使用して C0, 01, base_h, base_l, cali: というコーディングがなされま
|
||||
コードを使用して C0, 01, base_h, base_l, cali: というエンコードがなされま
|
||||
す。配列のベースとなる変数が (base_h << 8) + base_l で表され、インデックスは
|
||||
cali で指定されます。インデックスは配列変数も使用可能です。ex. var10[var20[5]]
|
||||
cali で指定されます。インデックスは配列参照も使用可能です。ex. var10[var20[5]]
|
||||
|
||||
計算式は逆ポーランド記述で格納されますので、基本的な処理はスタックから2つの
|
||||
数値または変数と1つの演算子を取り出して演算し、結果をスタックに戻します。
|
||||
計算式は逆ポーランド記述で格納されますので、基本的な処理はスタックから1つの
|
||||
演算子と2つの数値または変数を取り出して演算し、結果をスタックに戻します。
|
||||
この操作を 0x7f が出現するまで繰り返します。0x7f が来たら、スタックに残って
|
||||
いる数値を取り出します。コマンドの引数として変数を要求している場合の計算式
|
||||
は、変数へのポインタを返します。
|
||||
@@ -657,8 +657,8 @@
|
||||
|
||||
wav** など小文字系のコマンドはすべて 0x2f, 0x??, にエンコードされます。
|
||||
また引数として文字列を含むもの(ファイル名など)は、従来は ':' で終っていました
|
||||
が、system 3.8 以降では '\0' で終わるようになり、これらコマンドは新規に 0x2f
|
||||
コマンドとして新規に割り当てられました。
|
||||
が、system 3.8 以降では '\0' で終わるようになり、これらのコマンドは新規に
|
||||
0x2f コマンドとして割り当てられました。
|
||||
|
||||
0x2f, 0x0a, cali *2: [wavLoad]
|
||||
0x2f, 0x0b, cali *2: [wavPlay]
|
||||
@@ -807,7 +807,7 @@
|
||||
ここでは、コマンド表に載っていないけど、ゲームに出て来るものを紹介します。
|
||||
|
||||
5.8.1 VA
|
||||
* 機能: ユニットアニメーション (かえるにょ・ぱにょん初出)
|
||||
* 機能: ユニットアニメーション (かえるにょ・ぱにょ〜ん初出)
|
||||
* フォーマット: VA getd, cali, cali, cali:
|
||||
|
||||
* VA0 : 制御用コマンド
|
||||
@@ -821,7 +821,7 @@
|
||||
VA0, no, 1, num:
|
||||
no番のアニメーション開始。すぐに制御を戻す。
|
||||
numはコマ数, 0の場合と開始位置と終了位置が同じな時はアニメーションは
|
||||
動かずにコマ数だけが無限にされるカウント。
|
||||
動かずにコマ数だけが無限にカウントされる。
|
||||
|
||||
VA0, no, 2, num:
|
||||
no番のアニメーション開始。終るまで制御を戻さない。
|
||||
|
||||
@@ -10,12 +10,9 @@ find_program(PYFTSUBSET_FOUND pyftsubset)
|
||||
|
||||
if (PYFTSUBSET_FOUND)
|
||||
add_custom_target(fonts
|
||||
pyftsubset SourceHanSerifJP-Regular.otf --text-file=uchars.txt --output-file=${CMAKE_CURRENT_SOURCE_DIR}/mincho.otf
|
||||
DEPENDS uchars.txt SourceHanSerifJP-Regular.otf)
|
||||
|
||||
add_custom_command(OUTPUT uchars.txt
|
||||
COMMAND uchars > uchars.txt)
|
||||
|
||||
add_custom_command(OUTPUT SourceHanSerifJP-Regular.otf
|
||||
COMMAND wget -O SourceHanSerifJP-Regular.otf https://github.com/adobe-fonts/source-han-serif/blob/release/SubsetOTF/JP/SourceHanSerifJP-Regular.otf?raw=true)
|
||||
COMMAND uchars > uchars.txt
|
||||
COMMAND wget -O SourceHanSerifJP-Regular.otf https://github.com/adobe-fonts/source-han-serif/blob/release/SubsetOTF/JP/SourceHanSerifJP-Regular.otf?raw=true
|
||||
COMMAND pyftsubset SourceHanSerifJP-Regular.otf --text-file=uchars.txt --output-file=subset.otf
|
||||
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/adjust_metrics.py subset.otf ${CMAKE_CURRENT_SOURCE_DIR}/mincho.otf
|
||||
)
|
||||
endif()
|
||||
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
from fontTools.ttLib import TTFont
|
||||
|
||||
if len(sys.argv) != 3:
|
||||
print('Usage: adjust_metrics.py infile outfile')
|
||||
exit(1)
|
||||
|
||||
font = TTFont(sys.argv[1])
|
||||
|
||||
hhea = font['hhea']
|
||||
os2 = font['OS/2']
|
||||
|
||||
if hhea.ascent != os2.sTypoAscender:
|
||||
print(f'Changing hhea.ascent from {hhea.ascent} to {os2.sTypoAscender}')
|
||||
hhea.ascent = os2.sTypoAscender
|
||||
|
||||
if hhea.descent != os2.sTypoDescender:
|
||||
print(f'Changing hhea.descent from {hhea.descent} to {os2.sTypoDescender}')
|
||||
hhea.descent = os2.sTypoDescender
|
||||
|
||||
font.save(sys.argv[2])
|
||||
Binary file not shown.
+45
-12
@@ -1,7 +1,5 @@
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src)
|
||||
|
||||
add_subdirectory(lib)
|
||||
|
||||
add_library(modules STATIC
|
||||
modules.c
|
||||
AliceLogo/AliceLogo.c
|
||||
@@ -61,6 +59,29 @@ add_library(modules STATIC
|
||||
dDemo/dDemo.c
|
||||
eDemo/eDemo.c
|
||||
eeDemo/eeDemo.c
|
||||
lib/alk.c
|
||||
lib/drawtext.c
|
||||
lib/graph.c
|
||||
lib/list.c
|
||||
lib/surface.c
|
||||
lib/cg.c
|
||||
lib/graph_expandcolor_blend.c
|
||||
lib/graph_fillrect.c
|
||||
lib/graph_fillrect_amap.c
|
||||
lib/graph_fillrect_acolor.c
|
||||
lib/graph_rect.c
|
||||
lib/graph_copy.c
|
||||
lib/graph_copy_amap.c
|
||||
lib/graph_copy_bright.c
|
||||
lib/graph_blend_amap.c
|
||||
lib/graph_blend_screen.c
|
||||
lib/graph_saturadd_amap.c
|
||||
lib/graph_draw_amap.c
|
||||
lib/graph_stretch.c
|
||||
lib/graph_cg.c
|
||||
lib/gre_blend_useamap.c
|
||||
lib/gre_blend.c
|
||||
lib/gre_blend_screen.c
|
||||
nDEMO/nDEMO.c
|
||||
nDEMOE/nDEMOE.c
|
||||
oDEMO/oDEMO.c
|
||||
@@ -68,23 +89,35 @@ add_library(modules STATIC
|
||||
tDemo/tDemo.c
|
||||
)
|
||||
|
||||
target_include_directories(modules PUBLIC .)
|
||||
target_include_directories(modules PUBLIC . lib)
|
||||
|
||||
if (NOT ANDROID AND NOT EMSCRIPTEN)
|
||||
add_executable(modules_tests lib/list_test.c)
|
||||
target_link_libraries(modules_tests PRIVATE modules)
|
||||
add_test(NAME modules_tests COMMAND modules_tests)
|
||||
endif()
|
||||
|
||||
target_compile_options(modules PRIVATE -Wno-pointer-sign)
|
||||
target_link_libraries(modules PRIVATE graph alk drawtext list)
|
||||
|
||||
if (SDL2MIXER_FOUND)
|
||||
if (ANDROID)
|
||||
if (EMSCRIPTEN)
|
||||
set(LIBS
|
||||
"SHELL:-s USE_ZLIB=1"
|
||||
"SHELL:-s USE_LIBJPEG=1"
|
||||
"SHELL:-s USE_SDL=2")
|
||||
target_compile_options(modules PRIVATE ${LIBS})
|
||||
target_link_options(modules PRIVATE ${LIBS})
|
||||
elseif (ANDROID)
|
||||
target_link_libraries(modules PRIVATE ${ndk_zlib})
|
||||
if (SDL2MIXER_FOUND)
|
||||
target_link_libraries(modules PRIVATE SDL2 SDL2_mixer)
|
||||
else()
|
||||
endif()
|
||||
else()
|
||||
target_link_libraries(modules PRIVATE ZLIB::ZLIB)
|
||||
if (SDL2MIXER_FOUND)
|
||||
target_link_libraries(modules PRIVATE PkgConfig::SDL2MIXER)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (HAVE_JPEG)
|
||||
target_sources(modules PRIVATE
|
||||
NightDemonDemo/ndd.c
|
||||
NightDemonDemo/jpeg2surface.c
|
||||
)
|
||||
if (HAVE_JPEG AND NOT EMSCRIPTEN)
|
||||
target_link_libraries(modules PRIVATE JPEG::JPEG)
|
||||
endif()
|
||||
|
||||
@@ -14,7 +14,7 @@ static void Init() {
|
||||
}
|
||||
|
||||
static void ExistKeyFile() {
|
||||
char *p1 = sys_getString(0);
|
||||
const char *p1 = sl_getString(0);
|
||||
int *p2 = getCaliVariable();
|
||||
int *var = getCaliVariable();
|
||||
|
||||
@@ -24,7 +24,7 @@ static void ExistKeyFile() {
|
||||
}
|
||||
|
||||
static void CheckProtectFile() {
|
||||
char *p1 = sys_getString(0);
|
||||
const char *p1 = sl_getString(0);
|
||||
int *p2 = getCaliVariable();
|
||||
int *var = getCaliVariable();
|
||||
|
||||
@@ -34,7 +34,7 @@ static void CheckProtectFile() {
|
||||
}
|
||||
|
||||
static void CreateKeyFile() {
|
||||
char *p1 = sys_getString(0);
|
||||
const char *p1 = sl_getString(0);
|
||||
int *p2 = getCaliVariable();
|
||||
int *var = getCaliVariable();
|
||||
|
||||
|
||||
+9
-23
@@ -38,7 +38,6 @@
|
||||
#include "ags.h"
|
||||
#include "cg.h"
|
||||
#include "image.h"
|
||||
#include "counter.h"
|
||||
#include "input.h"
|
||||
// #include "alpha_plane.h"
|
||||
#include "surface.h"
|
||||
@@ -65,7 +64,7 @@ static int find_null_surface() {
|
||||
if (suf[i] == NULL) return i;
|
||||
}
|
||||
|
||||
SYSERROR("no free surface\n");
|
||||
SYSERROR("no free surface");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -120,10 +119,9 @@ static int load_cg_main(int no) {
|
||||
|
||||
sno = find_null_surface();
|
||||
|
||||
sf->no = sno;
|
||||
suf[sno] = sf;
|
||||
|
||||
return sf->no;
|
||||
return sno;
|
||||
}
|
||||
|
||||
static void Init() {
|
||||
@@ -165,7 +163,7 @@ static void Create() {
|
||||
*var = 0;
|
||||
} else {
|
||||
int no = find_null_surface();
|
||||
*var = s->no = no;
|
||||
*var = no;
|
||||
suf[no] = s;
|
||||
}
|
||||
|
||||
@@ -193,7 +191,7 @@ static void CreatePixelOnly() {
|
||||
*var = 0;
|
||||
} else {
|
||||
int no = find_null_surface();
|
||||
*var = s->no = no;
|
||||
*var = no;
|
||||
suf[no] = s;
|
||||
}
|
||||
|
||||
@@ -219,7 +217,7 @@ static void CreateAMapOnly() {
|
||||
*var = 0;
|
||||
} else {
|
||||
int no = find_null_surface();
|
||||
*var = s->no = no;
|
||||
*var = no;
|
||||
suf[no] = s;
|
||||
}
|
||||
|
||||
@@ -243,7 +241,7 @@ static void IsSurface() {
|
||||
if (s == NULL) {
|
||||
*var = 0;
|
||||
} else {
|
||||
*var = (s->has_alpha && s->has_pixel) ? 1 : 0;
|
||||
*var = (s->alpha && s->pixel) ? 1 : 0;
|
||||
}
|
||||
|
||||
DEBUG_COMMAND("Gpx.IsSurface %d,%p:\n", p1, var);
|
||||
@@ -265,7 +263,7 @@ static void IsPixel() {
|
||||
if (s == NULL) {
|
||||
*var = 0;
|
||||
} else {
|
||||
*var = s->has_pixel ? 1 : 0;
|
||||
*var = s->pixel ? 1 : 0;
|
||||
}
|
||||
|
||||
DEBUG_COMMAND("Gpx.IsPixel %d,%p:\n", p1, var);
|
||||
@@ -287,7 +285,7 @@ static void IsAlpha() {
|
||||
if (s == NULL) {
|
||||
*var = 0;
|
||||
} else {
|
||||
*var = s->has_alpha ? 1 : 0;
|
||||
*var = s->alpha ? 1 : 0;
|
||||
}
|
||||
|
||||
DEBUG_COMMAND("Gpx.IsAlpha %d,%p:\n", p1, var);
|
||||
@@ -421,7 +419,6 @@ static void Copy() {
|
||||
|
||||
DEBUG_COMMAND("Gpx.Copy %d,%d,%d,%d,%d,%d,%d,%d:\n", ds, dx, dy, ss, sx, sy, sw, sh);
|
||||
|
||||
ags_sync();
|
||||
src = sf_get(ss);
|
||||
dst = sf_get(ds);
|
||||
gr_copy(dst, dx, dy, src, sx, sy, sw, sh);
|
||||
@@ -466,7 +463,6 @@ static void CopyAMap() {
|
||||
|
||||
DEBUG_COMMAND("Gpx.CopyAMap %d,%d,%d,%d,%d,%d,%d,%d:\n", da, dx, dy, sa, sx, sy, sw, sh);
|
||||
|
||||
ags_sync();
|
||||
src = sf_get(sa);
|
||||
dst = sf_get(da);
|
||||
gr_copy_alpha_map(dst, dx, dy, src, sx, sy, sw, sh);
|
||||
@@ -539,7 +535,6 @@ static void BlendAMap() {
|
||||
|
||||
DEBUG_COMMAND("Gpx.BlendAMap %d,%d,%d,%d,%d,%d,%d,%d:\n", ds, dx, dy, ss, sx, sy, sw, sh);
|
||||
|
||||
ags_sync();
|
||||
src = sf_get(ss);
|
||||
dst = sf_get(ds);
|
||||
gr_blend_alpha_map(dst, dx, dy, src, sx, sy, sw, sh);
|
||||
@@ -716,7 +711,6 @@ static void Fill() {
|
||||
|
||||
DEBUG_COMMAND("Gpx.Fill %d,%d,%d,%d,%d,%d,%d,%d:\n", ds, dx, dy, dw, dh, r, g, b);
|
||||
|
||||
ags_sync();
|
||||
dst = sf_get(ds);
|
||||
gr_fill(dst, dx, dy, dw, dh, r, g, b);
|
||||
}
|
||||
@@ -735,7 +729,6 @@ static void FillAlphaColor() { /* not used ? */
|
||||
|
||||
DEBUG_COMMAND_YET("Gpx.FillAlphaColor %d,%d,%d,%d,%d,%d,%d,%d,%d:\n", ds, dx, dy, dw, dh, r, g, b, lv);
|
||||
|
||||
ags_sync();
|
||||
dst = sf_get(ds);
|
||||
gr_fill_alpha_color(dst, dx, dy, dw, dh, r, g, b, lv);
|
||||
}
|
||||
@@ -857,7 +850,6 @@ static void SpriteCopyAMap() {
|
||||
|
||||
DEBUG_COMMAND("Gpx.SpriteCopyAMap %d,%d,%d,%d,%d,%d,%d,%d,%d:\n", da, dx, dy, sa, sx, sy, sw, sh, cl);
|
||||
|
||||
ags_sync();
|
||||
src = sf_get(sa);
|
||||
dst = sf_get(da);
|
||||
gr_copy_alpha_map_sprite(dst, dx, dy, src, sx, sy, sw, sh, cl);
|
||||
@@ -885,7 +877,6 @@ static void BrightDestOnly() {
|
||||
|
||||
DEBUG_COMMAND("Gpx.BrightDestOnly %d,%d,%d,%d,%d,%d:\n", ds, dx, dy, dw, dh, r);
|
||||
|
||||
ags_sync();
|
||||
dst = sf_get(ds);
|
||||
|
||||
gr_bright_dst_only(dst, dx, dy, dw, dh, r);
|
||||
@@ -1005,7 +996,6 @@ static void CopyStretchBlendAMap() {
|
||||
|
||||
DEBUG_COMMAND("Gpx.CopyStretchBlendAMap %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", ds, dx, dy, dw, dh, ss, sx, sy, sw, sh);
|
||||
|
||||
ags_sync();
|
||||
src = sf_get(ss);
|
||||
dst = sf_get(ds);
|
||||
gr_copy_stretch_blend_alpha_map(dst, dx, dy, dw, dh, src, sx, sy, sw, sh);
|
||||
@@ -1057,7 +1047,6 @@ static void StretchBlendScreen2x2WDS() {
|
||||
|
||||
DEBUG_COMMAND("Gpx.StretchBlendScreen2x2WDS %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", ds, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh);
|
||||
|
||||
ags_sync();
|
||||
src1 = sf_get(ss1);
|
||||
src2 = sf_get(ss2);
|
||||
dst = sf_get(ds);
|
||||
@@ -1095,7 +1084,6 @@ static void BlendScreenWDS() {
|
||||
|
||||
DEBUG_COMMAND("Gpx.BlendScreenWDS %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", ds, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh);
|
||||
|
||||
ags_sync();
|
||||
src1 = sf_get(ss1);
|
||||
src2 = sf_get(ss2);
|
||||
dst = sf_get(ds);
|
||||
@@ -1162,11 +1150,9 @@ static void EffectCopy() {
|
||||
default:
|
||||
DEBUG_COMMAND_YET("Gpx.EffectCopy %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%p:\n", no, dx, dy, ss1, sx1, sy1, ss2, sx2, sy2, sw, sh, time, var);
|
||||
}
|
||||
ags_sync();
|
||||
dib = sf_get(0);
|
||||
dst = sf_get(ss1);
|
||||
src = sf_get(ss2);
|
||||
gpx_effect(no, dib, dx, dy, dst, sx1, sy1, src, sx2, sy2, sw, sh, time, var);
|
||||
gpx_effect(no, dx, dy, dst, sx1, sy1, src, sx2, sy2, sw, sh, time, var);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+24
-395
@@ -5,418 +5,47 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "surface.h"
|
||||
// #include "gleffectcopy.h"
|
||||
#include "counter.h"
|
||||
#include "sdl_core.h"
|
||||
#include "ags.h"
|
||||
#include "input.h"
|
||||
#include "graph.h"
|
||||
#include "ngraph.h"
|
||||
|
||||
/* saved parameter */
|
||||
struct ecopyparam {
|
||||
surface_t *src;
|
||||
int sx;
|
||||
int sy;
|
||||
surface_t *dst;
|
||||
int dx;
|
||||
int dy;
|
||||
int w;
|
||||
int h;
|
||||
surface_t *write;
|
||||
int wx;
|
||||
int wy;
|
||||
int time;
|
||||
boolean cancel;
|
||||
int spCol;
|
||||
int extp[10];
|
||||
|
||||
// for ec11
|
||||
surface_t *ss[8];
|
||||
surface_t *sd[8];
|
||||
};
|
||||
typedef struct ecopyparam ecopyparam_t;
|
||||
static ecopyparam_t ecp;
|
||||
|
||||
|
||||
|
||||
#define ECA7_D 16
|
||||
#define ECA12_D 256
|
||||
|
||||
static void ec1_cb(int step);
|
||||
static void ec2_cb(int step);
|
||||
static void ec3_cb(int step);
|
||||
static void ec4_cb(int step);
|
||||
static void ec5_cb(int step);
|
||||
static void ec7_cb();
|
||||
static void ec11_cb(int step);
|
||||
static void ec11_prepare(void);
|
||||
static void ec12_cb(int step);
|
||||
static void ec13_cb(int step);
|
||||
|
||||
static int get_ecounter(void) {
|
||||
return get_high_counter(SYSTEMCOUNTER_MSEC);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void gle_set_check_clik() {
|
||||
}
|
||||
void gle_set_itimer() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void gpx_effect(int no,
|
||||
surface_t *write, int wx, int wy,
|
||||
int wx, int wy,
|
||||
surface_t *dst, int dx, int dy,
|
||||
surface_t *src, int sx, int sy,
|
||||
int width, int height,
|
||||
int time,
|
||||
int *endtype) {
|
||||
|
||||
ags_faderinfo_t i;
|
||||
|
||||
surface_t *write = nact->ags.dib;
|
||||
if (!gr_clip(dst, &dx, &dy, &width, &height, write, &wx, &wy)) return;
|
||||
if (!gr_clip(src, &sx, &sy, &width, &height, write, &wx, &wy)) return;
|
||||
|
||||
ecp.write = write;
|
||||
ecp.wx = wx;
|
||||
ecp.wy = wy;
|
||||
ecp.dst = dst;
|
||||
ecp.dx = dx;
|
||||
ecp.dy = dy;
|
||||
ecp.src = src;
|
||||
ecp.sx = sx;
|
||||
ecp.sy = sy;
|
||||
ecp.w = width;
|
||||
ecp.h = height;
|
||||
ecp.time = time;
|
||||
|
||||
switch(no) {
|
||||
case 1:
|
||||
i.step_max = 64;
|
||||
i.effect_time = time == 0 ? 2700 : time;
|
||||
i.cancel = FALSE;
|
||||
i.callback = ec1_cb;
|
||||
ags_fader(&i);
|
||||
|
||||
*endtype = 0;
|
||||
|
||||
enum sdl_effect_type type = from_sact_effect(no);
|
||||
if (type == EFFECT_INVALID) {
|
||||
WARNING("Unimplemented effect %d\n", no);
|
||||
type = EFFECT_CROSSFADE;
|
||||
}
|
||||
SDL_Rect rect = { wx, wy, width, height };
|
||||
struct sdl_effect *eff = sdl_effect_init(&rect, dst, dx, dy, src, sx, sy, type);
|
||||
if (!time)
|
||||
time = (no == SACT_EFFECT_CROSSFADE_DOWN || no == SACT_EFFECT_CROSSFADE_UP) ? 1150 : 2700;
|
||||
ags_runEffect(time, FALSE, (ags_EffectStepFunc)sdl_effect_step, eff);
|
||||
sdl_effect_finish(eff);
|
||||
|
||||
switch (no) {
|
||||
case SACT_EFFECT_FADEOUT:
|
||||
gr_fill(write, wx, wy, width, height, 0, 0, 0);
|
||||
break;
|
||||
case 2:
|
||||
i.step_max = 64;
|
||||
i.effect_time = time == 0 ? 2700 : time;
|
||||
i.cancel = FALSE;
|
||||
i.callback = ec2_cb;
|
||||
ags_fader(&i);
|
||||
break;
|
||||
case 3:
|
||||
i.step_max = 64;
|
||||
i.effect_time = time == 0 ? 2700 : time;
|
||||
i.cancel = FALSE;
|
||||
i.callback = ec3_cb;
|
||||
ags_fader(&i);
|
||||
break;
|
||||
case 4:
|
||||
i.step_max = 64;
|
||||
i.effect_time = time == 0 ? 2700 : time;
|
||||
i.cancel = FALSE;
|
||||
i.callback = ec4_cb;
|
||||
ags_fader(&i);
|
||||
break;
|
||||
case 5:
|
||||
i.step_max = 64;
|
||||
i.effect_time = time == 0 ? 2700 : time;
|
||||
i.cancel = FALSE;
|
||||
i.callback = ec5_cb;
|
||||
ags_fader(&i);
|
||||
break;
|
||||
case 7:
|
||||
ec7_cb();
|
||||
break;
|
||||
case 11:
|
||||
ec11_prepare();
|
||||
i.step_max = 6;
|
||||
i.effect_time = time == 0 ? 2700 : time;
|
||||
i.cancel = FALSE;
|
||||
i.callback = ec11_cb;
|
||||
ags_fader(&i);
|
||||
break;
|
||||
case 12:
|
||||
i.step_max = ECA12_D + ecp.h;
|
||||
i.effect_time = time == 0 ? 1150 : time;
|
||||
i.cancel = FALSE;
|
||||
i.callback = ec12_cb;
|
||||
ags_fader(&i);
|
||||
break;
|
||||
case 13:
|
||||
i.step_max = ECA12_D + ecp.h;
|
||||
i.effect_time = time == 0 ? 1150 : time;
|
||||
i.cancel = FALSE;
|
||||
i.callback = ec13_cb;
|
||||
ags_fader(&i);
|
||||
case SACT_EFFECT_WHITEOUT:
|
||||
gr_fill(write, wx, wy, width, height, 255, 255, 255);
|
||||
break;
|
||||
default:
|
||||
gr_copy(write, wx, wy, src, sx, sy, width, height);
|
||||
ags_updateArea(wx, wy, width, height);
|
||||
}
|
||||
|
||||
*endtype = 0;
|
||||
|
||||
}
|
||||
|
||||
void sf_blend_white_level(surface_t *dst, int dx, int dy, surface_t *src, int sx, int sy, int sw, int sh, int lv) {
|
||||
|
||||
int x, y;
|
||||
BYTE *sp, *dp;
|
||||
|
||||
sp = GETOFFSET_PIXEL(src, sx, sy);
|
||||
dp = GETOFFSET_PIXEL(dst, dx, dy);
|
||||
|
||||
switch(dst->depth) {
|
||||
case 15:
|
||||
{
|
||||
WORD *yls, *yld;
|
||||
|
||||
for (y = 0; y < sh; y++) {
|
||||
yls = (WORD *)(sp + y * src->bytes_per_line);
|
||||
yld = (WORD *)(dp + y * dst->bytes_per_line);
|
||||
|
||||
for (x = 0; x < sw; x++) {
|
||||
*yld = WHITELEVEL15(*yls, lv);
|
||||
yls++; yld++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 16:
|
||||
{
|
||||
WORD *yls, *yld;
|
||||
|
||||
for (y = 0; y < sh; y++) {
|
||||
yls = (WORD *)(sp + y * src->bytes_per_line);
|
||||
yld = (WORD *)(dp + y * dst->bytes_per_line);
|
||||
|
||||
for (x = 0; x < sw; x++) {
|
||||
*yld = WHITELEVEL16(*yls, lv);
|
||||
yls++; yld++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 24:
|
||||
case 32:
|
||||
{
|
||||
DWORD *yls, *yld;
|
||||
|
||||
for (y = 0; y < sh; y++) {
|
||||
yls = (DWORD *)(sp + y * src->bytes_per_line);
|
||||
yld = (DWORD *)(dp + y * dst->bytes_per_line);
|
||||
|
||||
for (x = 0; x < sw; x++) {
|
||||
*yld = WHITELEVEL24(*yls, lv);
|
||||
yls++; yld++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void ec1_cb(int step) {
|
||||
if (step == 64) {
|
||||
gr_copy(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h);
|
||||
} else {
|
||||
gre_Blend(ecp.write, ecp.wx, ecp.wy, ecp.dst, ecp.dx, ecp.dy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h, step * 4);
|
||||
}
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
}
|
||||
|
||||
static void ec2_cb(int step) {
|
||||
if (step == 0) {
|
||||
gr_copy_bright(ecp.write, ecp.wx, ecp.wy, ecp.dst, ecp.dx, ecp.dy, ecp.w, ecp.h, 255);
|
||||
} else if (step == 64) {
|
||||
gr_copy_bright(ecp.write, ecp.wx, ecp.wy, ecp.dst, ecp.dx, ecp.dy, ecp.w, ecp.h, 0);
|
||||
} else {
|
||||
gr_copy_bright(ecp.write, ecp.wx, ecp.wy, ecp.dst, ecp.dx, ecp.dy, ecp.w, ecp.h, 255 - step * 4);
|
||||
}
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
}
|
||||
|
||||
static void ec3_cb(int step) {
|
||||
if (step != 64) {
|
||||
gr_copy_bright(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h, step * 4);
|
||||
} else {
|
||||
gr_copy_bright(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h, 255);
|
||||
}
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
}
|
||||
|
||||
static void ec4_cb(int step) {
|
||||
if (step != 64) {
|
||||
sf_blend_white_level(ecp.write, ecp.wx, ecp.wy, ecp.dst, ecp.dx, ecp.dy, ecp.w, ecp.h, step * 4);
|
||||
} else {
|
||||
sf_blend_white_level(ecp.write, ecp.wx, ecp.wy, ecp.dst, ecp.dx, ecp.dy, ecp.w, ecp.h, 255);
|
||||
}
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
}
|
||||
|
||||
static void ec5_cb(int step) {
|
||||
if (step == 0) {
|
||||
sf_blend_white_level(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h, 255);
|
||||
} else if (step == 64) {
|
||||
sf_blend_white_level(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h, 0);
|
||||
} else {
|
||||
sf_blend_white_level(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h, 255 - step * 4);
|
||||
}
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
}
|
||||
|
||||
#define EC_WAIT \
|
||||
if ((key |= sys_getInputInfo()) && ecp.cancel) break; \
|
||||
key = sys_keywait(cnt - get_ecounter(), ecp.cancel);
|
||||
|
||||
static void ec7_cb() {
|
||||
int i, j, y, key = 0, cnt;
|
||||
int waitcnt = ecp.time == 0 ? 40 : (ecp.time/60);
|
||||
|
||||
cnt = get_ecounter();
|
||||
for (i = 0; i < ECA7_D + ecp.h / ECA7_D -1; i++) {
|
||||
cnt += waitcnt;
|
||||
for (j = 0; j < min(i + 1, ECA7_D); j++) {
|
||||
y = j + ECA7_D * (i-j);
|
||||
if (y < 0 || y >= ecp.h) continue;
|
||||
gr_copy(ecp.write, ecp.wx, ecp.wy + y, ecp.src, ecp.sx, ecp.sy + y, ecp.w, 1);
|
||||
}
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
EC_WAIT;
|
||||
}
|
||||
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
}
|
||||
|
||||
static void ec11_prepare() {
|
||||
int i;
|
||||
|
||||
ecp.ss[0] = sf_create_surface(ecp.w, ecp.h, ecp.write->depth);
|
||||
ecp.sd[0] = sf_create_surface(ecp.w, ecp.h, ecp.write->depth);
|
||||
gr_buller(ecp.ss[0], 0, 0, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h, 1 << 2);
|
||||
gr_buller(ecp.sd[0], 0, 0, ecp.dst, ecp.dx, ecp.dy, ecp.w, ecp.h, 1 << 2);
|
||||
|
||||
for (i = 1; i < 6; i++) {
|
||||
ecp.ss[i] = sf_create_surface(ecp.w, ecp.h, ecp.write->depth);
|
||||
ecp.sd[i] = sf_create_surface(ecp.w, ecp.h, ecp.write->depth);
|
||||
gr_buller(ecp.ss[i], 0, 0, ecp.ss[i-1], 0, 0, ecp.w, ecp.h, 1 << (i+2));
|
||||
gr_buller(ecp.sd[i], 0, 0, ecp.sd[i-1], 0, 0, ecp.w, ecp.h, 1 << (i+2));
|
||||
}
|
||||
}
|
||||
|
||||
static void ec11_cb(int step) {
|
||||
int i;
|
||||
|
||||
if (step == 6) {
|
||||
for (i = 0; i < 6; i++) {
|
||||
sf_free(ecp.ss[i]);
|
||||
sf_free(ecp.sd[i]);
|
||||
}
|
||||
gr_copy(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h);
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
return;
|
||||
}
|
||||
|
||||
gre_Blend(ecp.write, ecp.wx, ecp.wy, ecp.sd[step], 0, 0, ecp.ss[5-step], 0, 0, ecp.w, ecp.h, ((step+1)*256)/7);
|
||||
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void ec11_cb(int step) {
|
||||
static surface_t *ss;
|
||||
static surface_t *sd;
|
||||
|
||||
if (step == 0) {
|
||||
ss = sf_create_surface(ecp.w, ecp.h, ecp.write->depth);
|
||||
sd = sf_create_surface(ecp.w, ecp.h, ecp.write->depth);
|
||||
gr_copy(ss, 0, 0, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h);
|
||||
gr_copy(sd, 0, 0, ecp.dst, ecp.dx, ecp.dy, ecp.w, ecp.h);
|
||||
return;
|
||||
}
|
||||
if (step == 6) {
|
||||
sf_free(ss);
|
||||
sf_free(sd);
|
||||
gr_copy(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h);
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
return;
|
||||
}
|
||||
|
||||
gr_buller(ss, 0, 0, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h, 1 << (7-step));
|
||||
gr_buller(sd, 0, 0, ecp.dst, ecp.dx, ecp.dy, ecp.w, ecp.h, 1 << (step+1));
|
||||
gre_Blend(ecp.write, ecp.wx, ecp.wy, sd, 0, 0, ss, 0, 0, ecp.w, ecp.h, (step*256)/6);
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void ec12_cb(int step) {
|
||||
int j, l;
|
||||
int st_i, ed_i;
|
||||
static int last_i = 0;
|
||||
|
||||
if (step == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (step == ECA12_D + ecp.h) {
|
||||
gr_copy(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h);
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
return;
|
||||
}
|
||||
|
||||
st_i = max(0, step - ECA12_D + 1);
|
||||
ed_i = min(ecp.h - 1, step);
|
||||
l = ed_i - st_i + 1;
|
||||
|
||||
for (j = st_i; j < ed_i; j++) {
|
||||
gre_Blend(ecp.write, ecp.wx, ecp.wy + j, ecp.dst, ecp.dx, ecp.dy + j, ecp.src, ecp.sx, ecp.sy + j, ecp.w, 1, step - j);
|
||||
}
|
||||
|
||||
if ((st_i - last_i) > 1) {
|
||||
gr_copy(ecp.write, ecp.wx, ecp.wy + last_i, ecp.src, ecp.sx, ecp.sy+last_i, ecp.w, st_i - last_i);
|
||||
ags_updateArea(ecp.wx, ecp.wy + last_i, ecp.w, st_i - last_i);
|
||||
}
|
||||
|
||||
ags_updateArea(ecp.wx, ecp.wy + st_i, ecp.w, l);
|
||||
|
||||
last_i = st_i;
|
||||
}
|
||||
|
||||
static void ec13_cb(int step) {
|
||||
int j, l;
|
||||
int st_i,ed_i;
|
||||
static int last_i = 0;
|
||||
int syy1 = ecp.dy + ecp.h -1;
|
||||
int syy2 = ecp.sy + ecp.h -1;
|
||||
int dyy = ecp.wy + ecp.h -1;
|
||||
|
||||
if (step == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (step == ECA12_D + ecp.h) {
|
||||
gr_copy(ecp.write, ecp.wx, ecp.wy, ecp.src, ecp.sx, ecp.sy, ecp.w, ecp.h);
|
||||
ags_updateArea(ecp.wx, ecp.wy, ecp.w, ecp.h);
|
||||
return;
|
||||
}
|
||||
|
||||
st_i = max(0, step - ECA12_D + 1);
|
||||
ed_i = min(ecp.h -1, step);
|
||||
l = ed_i - st_i+1;
|
||||
|
||||
for (j = st_i; j <= ed_i; j++) {
|
||||
gre_Blend(ecp.write, ecp.wx, dyy - j, ecp.dst, ecp.dx, syy1 - j, ecp.src, ecp.sx, syy2 - j, ecp.w, 1, step - j);
|
||||
}
|
||||
|
||||
if ((st_i - last_i) > 1) {
|
||||
gr_copy(ecp.write, ecp.wx, dyy - st_i + 1, ecp.src, ecp.sx, syy2 - st_i + 1, ecp.w, st_i - last_i);
|
||||
ags_updateArea(ecp.wx, dyy - st_i + 1, ecp.w, st_i - last_i);
|
||||
}
|
||||
|
||||
ags_updateArea(ecp.wx, dyy-ed_i, ecp.w, l);
|
||||
|
||||
last_i = st_i;
|
||||
ags_updateArea(wx, wy, width, height);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "surface.h"
|
||||
|
||||
extern void gpx_effect(int no,
|
||||
surface_t *write, int wx, int wy,
|
||||
int wx, int wy,
|
||||
surface_t *dst, int dx, int dy,
|
||||
surface_t *src, int sx, int sy,
|
||||
int width, int height,
|
||||
|
||||
+44
-25
@@ -1,69 +1,88 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "filecheck.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
#include "message.h"
|
||||
#include "msgskip.h"
|
||||
#include "utfsjis.h"
|
||||
|
||||
static char *msgskipfile;
|
||||
static boolean valid;
|
||||
static int action;
|
||||
|
||||
static void Init() {
|
||||
int *p1 = getCaliVariable();
|
||||
int p2 = getCaliValue(); /* ISys3x */
|
||||
int p3 = getCaliValue();
|
||||
int p4 = getCaliValue();
|
||||
int *p1 = getCaliVariable();
|
||||
int p2 = getCaliValue(); /* ISys3x */
|
||||
int p3 = getCaliValue();
|
||||
int p4 = getCaliValue();
|
||||
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.Init %p,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
action = p3;
|
||||
valid = true;
|
||||
*p1 = 0;
|
||||
|
||||
DEBUG_COMMAND("MsgSkip.Init %p,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
static void Start() {
|
||||
int *p1 = getCaliVariable();
|
||||
int p2 = getCaliValue();
|
||||
int *p1 = getCaliVariable();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
msgskipfile = strdup(v_str(p2 -1));
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.Start %p,%d:\n", p1, p2);
|
||||
char *fname_utf8 = sjis2utf(svar_get(p2));
|
||||
char *path = fc_get_path(fname_utf8);
|
||||
msgskip_init(path);
|
||||
free(path);
|
||||
free(fname_utf8);
|
||||
|
||||
DEBUG_COMMAND("MsgSkip.Start %p,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
static void SetValid() {
|
||||
int p1 = getCaliValue();
|
||||
int p1 = getCaliValue();
|
||||
|
||||
valid = p1;
|
||||
msgskip_pause(!valid);
|
||||
|
||||
|
||||
DEBUG_COMMAND("MsgSkip.SetValid %d:\n", p1);
|
||||
}
|
||||
|
||||
static void GetValid() {
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.GetValid %p:\n", p1);
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
*p1 = valid;
|
||||
|
||||
DEBUG_COMMAND("MsgSkip.GetValid %p:\n", p1);
|
||||
}
|
||||
|
||||
static void SetAction() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
int p1 = getCaliValue();
|
||||
|
||||
action = p1;
|
||||
|
||||
DEBUG_COMMAND("MsgSkip.SetAcion %d:\n", p1);
|
||||
}
|
||||
|
||||
static void GetAction() {
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.GetAcion %p:\n", p1);
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
*p1 = action;
|
||||
|
||||
DEBUG_COMMAND("MsgSkip.GetAcion %p:\n", p1);
|
||||
}
|
||||
|
||||
static void PushStr() {
|
||||
int p1 = getCaliValue();
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.PushStr %d:\n", p1);
|
||||
}
|
||||
|
||||
static void PopStr() {
|
||||
int p1 = getCaliValue();
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.PopStr %d:\n", p1);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "counter.h"
|
||||
#include "menu.h"
|
||||
#include "input.h"
|
||||
#include "nact.h"
|
||||
|
||||
@@ -193,8 +193,6 @@ void nt_gr_draw(int effectno) {
|
||||
void nt_gr_screencg(int no, int x, int y) {
|
||||
surface_t *sf;
|
||||
|
||||
ags_sync();
|
||||
|
||||
sf = sf_loadcg_no(no -1);
|
||||
|
||||
gre_BlendScreen(sf0, x, y, sf0, x, y, sf, 0, 0, sf->width, sf->height);
|
||||
|
||||
+18
-22
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "counter.h"
|
||||
#include "sdl_core.h"
|
||||
#include "utfsjis.h"
|
||||
#include "ags.h"
|
||||
#include "nact.h"
|
||||
@@ -241,7 +241,7 @@ static void ntmsg_out(int wNum, int wSize, int wColorR, int wColorG, int wColorB
|
||||
char mbuf[20];
|
||||
int cw, delta, wcnt;
|
||||
|
||||
wcnt = get_high_counter(SYSTEMCOUNTER_MSEC);
|
||||
wcnt = sdl_getTicks();
|
||||
|
||||
mbuf[0] = '\0';
|
||||
msg = get_char(msg, mbuf, sizeof(mbuf) -1);
|
||||
@@ -272,9 +272,9 @@ static void ntmsg_out(int wNum, int wSize, int wColorR, int wColorG, int wColorB
|
||||
needupdate = FALSE;
|
||||
|
||||
// keywait
|
||||
delta = get_high_counter(SYSTEMCOUNTER_MSEC) - wcnt;
|
||||
delta = sdl_getTicks() - wcnt;
|
||||
if (delta < wSpeed) {
|
||||
if (sys_keywait(wSpeed - delta, FALSE)) {
|
||||
if (sys_keywait(wSpeed - delta, KEYWAIT_NONCANCELABLE)) {
|
||||
|
||||
wSpeed = 0;
|
||||
}
|
||||
@@ -289,9 +289,9 @@ static void ntmsg_out(int wNum, int wSize, int wColorR, int wColorG, int wColorB
|
||||
|
||||
// Waitなしの出力は最後にupdate
|
||||
if (needupdate) {
|
||||
uparea.width = sp->cursize.width;
|
||||
uparea.height = min(sp->cursize.height, uparea.y - sp->u.msg.dspcur.y + wLineSpace + wLineSpace);
|
||||
nt_sp_updateme_part(sp, uparea.x, uparea.y, uparea.width, uparea.height);
|
||||
uparea.w = sp->cursize.width;
|
||||
uparea.h = min(sp->cursize.height, uparea.y - sp->u.msg.dspcur.y + wLineSpace + wLineSpace);
|
||||
nt_sp_updateme_part(sp, uparea.x, uparea.y, uparea.w, uparea.h);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -304,7 +304,10 @@ static void ntmsg_out(int wNum, int wSize, int wColorR, int wColorG, int wColorB
|
||||
static int ntmsg_keywait() {
|
||||
int i = 0;
|
||||
|
||||
if (night.waitskiplv > 0) return 0;
|
||||
if (night.waitskiplv > 0) {
|
||||
sys_getInputInfo();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// アニメパターンの初期化
|
||||
setup_hakanim();
|
||||
@@ -312,15 +315,15 @@ static int ntmsg_keywait() {
|
||||
night.waittype = KEYWAIT_MESSAGE;
|
||||
night.waitkey = -1;
|
||||
|
||||
while (night.waitkey == -1) {
|
||||
int st = get_high_counter(SYSTEMCOUNTER_MSEC);
|
||||
while (night.waitkey == -1 && !nact->is_quit) {
|
||||
int st = sdl_getTicks();
|
||||
int interval = 25;
|
||||
|
||||
if (!night.zhiding) {
|
||||
interval = night.sp[SPNO_MSG_KEYANIM]->u.anime.interval;
|
||||
hakanim(i++);
|
||||
}
|
||||
sys_keywait(interval - (get_high_counter(SYSTEMCOUNTER_MSEC) - st), FALSE);
|
||||
sys_keywait(interval - (sdl_getTicks() - st), KEYWAIT_NONCANCELABLE);
|
||||
}
|
||||
|
||||
night.waittype = KEYWAIT_NONE;
|
||||
@@ -369,22 +372,15 @@ static void set_align(char *msg, sprite_t *sp, int wSize) {
|
||||
}
|
||||
|
||||
static BYTE *get_char(BYTE *msg, char *mbuf, int bufmax) {
|
||||
int c1;
|
||||
|
||||
// 改行
|
||||
if (msg[0] == '\n') {
|
||||
mbuf[0] = '\n';
|
||||
mbuf[1] = '\0';
|
||||
return msg +1;
|
||||
}
|
||||
|
||||
c1 = *msg++;
|
||||
|
||||
*mbuf++ = c1;
|
||||
|
||||
if ((c1 >= 0x81 && c1 < 0xa0) || (c1 >= 0xe0 && c1 <= 0xee)) {
|
||||
BYTE *p = advance_char(msg, nact->encoding);
|
||||
while (msg < p)
|
||||
*mbuf++ = *msg++;
|
||||
}
|
||||
*mbuf = '\0';
|
||||
|
||||
return msg;
|
||||
@@ -459,8 +455,8 @@ int ntmsg_update(sprite_t *sp, MyRectangle *r) {
|
||||
// -> 説明スプライトのように、SetShowされたときに対応できないからだめ
|
||||
//if (sact.msgbufempty) return OK;
|
||||
|
||||
update.width = r->width;
|
||||
update.height = r->height;
|
||||
update.width = r->w;
|
||||
update.height = r->h;
|
||||
|
||||
dx = sp->cur.x - r->x;
|
||||
dy = sp->cur.y - r->y;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "counter.h"
|
||||
#include "input.h"
|
||||
#include "sdl_core.h"
|
||||
#include "xsystem35.h"
|
||||
#include "nact.h"
|
||||
#include "scenario.h"
|
||||
@@ -16,9 +16,6 @@
|
||||
#include "night.h"
|
||||
#include "nt_msg.h"
|
||||
|
||||
/* defined by cmd_check.c */
|
||||
extern void check_command(int c0);
|
||||
|
||||
#define MAINLOOP_EVENTCHECK_INTERVAL 16 /* 16 msec */
|
||||
|
||||
|
||||
@@ -56,10 +53,9 @@ static void ntmain(struct _scoadr inadr) {
|
||||
|
||||
while (!nact->is_quit) {
|
||||
for (int cnt = 0; !nact->wait_vsync && cnt < 10000; cnt++) {
|
||||
DEBUG_MESSAGE("%d:%x\n", sl_getPage(), sl_getIndex());
|
||||
//SACT_DEBUG("%d:%x\n", sl_getPage(), sl_getIndex());
|
||||
if (!nact->popupmenu_opened) {
|
||||
check_command(sl_getc());
|
||||
exec_command();
|
||||
if (sl_getPage() == inadr.page &&
|
||||
sl_getIndex() == inadr.index) {
|
||||
// ~E%05dからの戻り
|
||||
@@ -77,7 +73,7 @@ static void ntmain(struct _scoadr inadr) {
|
||||
if (!nact->is_message_locked) {
|
||||
sys_getInputInfo();
|
||||
}
|
||||
WaitVsync();
|
||||
sdl_wait_vsync();
|
||||
nact->frame_count++;
|
||||
nact->wait_vsync = FALSE;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
int ntsel_dosel(int mode) {
|
||||
int ntsel_dosel(void) {
|
||||
// 選択肢を描画
|
||||
//
|
||||
return 0;
|
||||
|
||||
+107
-254
@@ -48,7 +48,19 @@ static cginfo_t *cgs[CGMAX];
|
||||
return NG; \
|
||||
} \
|
||||
|
||||
|
||||
static cginfo_t *nt_scg_new(enum cgtype type, int no, surface_t *sf) {
|
||||
cginfo_t *info = calloc(1, sizeof(cginfo_t));
|
||||
info->type = type;
|
||||
info->no = no;
|
||||
info->sf = sf;
|
||||
info->refcnt = 1;
|
||||
|
||||
nt_scg_free(no);
|
||||
cgs[no] = info;
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
/*
|
||||
cgの読み込み
|
||||
|
||||
@@ -56,154 +68,96 @@ static cginfo_t *cgs[CGMAX];
|
||||
CG_xxxで作成したCGを参照する
|
||||
|
||||
@param no: 読み込むCG番号
|
||||
@param refinc: 参照カウンタを増やすかどうか。
|
||||
spriteから参照されるときは増やし、CG_xxxを作る時に
|
||||
参照されるときは増やさない。
|
||||
*/
|
||||
cginfo_t *nt_scg_loadcg_no(int no, boolean refinc) {
|
||||
cginfo_t *i;
|
||||
|
||||
static cginfo_t *nt_scg_get(int no) {
|
||||
if (no >= (CGMAX -1)) {
|
||||
WARNING("no is too large (should be %d < %d)\n", (no), CGMAX);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// すでに ロードされているか、CG_xxx で作成ずみの場合は
|
||||
// 参照カウンタを増やす
|
||||
if (cgs[no] != NULL) {
|
||||
if (refinc) {
|
||||
cgs[no]->refcnt++;
|
||||
}
|
||||
if (cgs[no] != NULL)
|
||||
return cgs[no];
|
||||
}
|
||||
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_LINKED;
|
||||
i->no = no;
|
||||
i->refcnt = (refinc ? 1 : 0);
|
||||
i->sf = sf_loadcg_no(no -1);
|
||||
if (i->sf == NULL) {
|
||||
|
||||
surface_t *sf = sf_loadcg_no(no - 1);
|
||||
if (!sf) {
|
||||
WARNING("load fail (%d)\n", no -1);
|
||||
free(i);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cgs[no] = i;
|
||||
|
||||
return i;
|
||||
return nt_scg_new(CG_LINKED, no, sf);
|
||||
}
|
||||
|
||||
cginfo_t *nt_scg_addref(int no) {
|
||||
cginfo_t *info = nt_scg_get(no);
|
||||
if (info)
|
||||
info->refcnt++;
|
||||
return info;
|
||||
}
|
||||
|
||||
void nt_scg_deref(cginfo_t *cg) {
|
||||
if (--cg->refcnt > 0)
|
||||
return;
|
||||
|
||||
if (cg->sf)
|
||||
sf_free(cg->sf);
|
||||
free(cg);
|
||||
}
|
||||
|
||||
// 指定の大きさ、色の矩形の CG を作成
|
||||
int nt_scg_create(int wNumCG, int wWidth, int wHeight, int wR, int wG, int wB, int wBlendRate) {
|
||||
cginfo_t *i;
|
||||
|
||||
spcg_assert_no(wNumCG);
|
||||
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_SET;
|
||||
i->no = wNumCG;
|
||||
i->refcnt = 1;
|
||||
i->sf = sf_create_surface(wWidth, wHeight, sf0->depth);
|
||||
gr_fill(i->sf, 0, 0, wWidth, wHeight, wR, wG, wB);
|
||||
gr_fill_alpha_map(i->sf, 0, 0, wWidth, wHeight, wBlendRate);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
|
||||
surface_t *sf = sf_create_surface(wWidth, wHeight, sf0->depth);
|
||||
gr_fill(sf, 0, 0, wWidth, wHeight, wR, wG, wB);
|
||||
gr_fill_alpha_map(sf, 0, 0, wWidth, wHeight, wBlendRate);
|
||||
nt_scg_new(CG_SET, wNumCG, sf);
|
||||
return OK;
|
||||
}
|
||||
|
||||
// 指定のCGを反転させたCGを作成
|
||||
int nt_scg_create_reverse(int wNumCG, int wNumSrcCG, int wReverseX, int wReverseY) {
|
||||
cginfo_t *i, *srccg;
|
||||
surface_t *src;
|
||||
|
||||
spcg_assert_no(wNumCG);
|
||||
spcg_assert_no(wNumSrcCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
cginfo_t *src = nt_scg_get(wNumSrcCG);
|
||||
if (!src)
|
||||
return NG;
|
||||
}
|
||||
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_REVERSE;
|
||||
i->no = wNumCG;
|
||||
i->refcnt = 0;
|
||||
|
||||
src = srccg->sf;
|
||||
i->sf = stretch(src, src->width, src->height, (wReverseX << 1) | wReverseY);
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
|
||||
surface_t *sf = stretch(src->sf, src->sf->width, src->sf->height, (wReverseX << 1) | wReverseY);
|
||||
nt_scg_new(CG_REVERSE, wNumCG, sf);
|
||||
return OK;
|
||||
}
|
||||
|
||||
// 指定のCGを拡大/縮小したCGを作成
|
||||
int nt_scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG) {
|
||||
cginfo_t *i, *srccg;
|
||||
surface_t *src;
|
||||
|
||||
spcg_assert_no(wNumCG);
|
||||
spcg_assert_no(wNumSrcCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
cginfo_t *src = nt_scg_get(wNumSrcCG);
|
||||
if (!src)
|
||||
return NG;
|
||||
}
|
||||
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_STRETCH;
|
||||
i->no = wNumCG;
|
||||
i->refcnt = 0;
|
||||
|
||||
src = srccg->sf;
|
||||
i->sf = stretch(src, wWidth, wHeight, 0);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
surface_t *sf = stretch(src->sf, wWidth, wHeight, 0);
|
||||
nt_scg_new(CG_STRETCH, wNumCG, sf);
|
||||
return OK;
|
||||
}
|
||||
|
||||
// ベースCGの上にブレンドCGを重ねた CG を作成
|
||||
int nt_scg_create_blend(int wNumDstCG, int wNumBaseCG, int wX, int wY, int wNumBlendCG, int wAlphaMapMode) {
|
||||
cginfo_t *i, *basecg, *blendcg;
|
||||
|
||||
spcg_assert_no(wNumDstCG);
|
||||
spcg_assert_no(wNumBaseCG);
|
||||
spcg_assert_no(wNumBlendCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
basecg = nt_scg_loadcg_no(wNumBaseCG, FALSE);
|
||||
blendcg = nt_scg_loadcg_no(wNumBlendCG, FALSE);
|
||||
if (basecg == NULL || blendcg == NULL) return NG;
|
||||
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_SET;
|
||||
i->no = wNumDstCG;
|
||||
i->refcnt = 0;
|
||||
|
||||
i->sf = blend(basecg->sf, wX , wY, blendcg->sf, wAlphaMapMode);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
nt_scg_free(wNumDstCG);
|
||||
|
||||
cgs[wNumDstCG] = i;
|
||||
|
||||
|
||||
cginfo_t *basecg = nt_scg_get(wNumBaseCG);
|
||||
cginfo_t *blendcg = nt_scg_get(wNumBlendCG);
|
||||
if (!basecg || !blendcg) return NG;
|
||||
|
||||
surface_t *sf = blend(basecg->sf, wX, wY, blendcg->sf, wAlphaMapMode);
|
||||
nt_scg_new(CG_SET, wNumDstCG, sf);
|
||||
return OK;
|
||||
}
|
||||
|
||||
// 指定の文字列のCGを作成
|
||||
int nt_scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, char *cText) {
|
||||
cginfo_t *i;
|
||||
|
||||
spcg_assert_no(wNumCG);
|
||||
|
||||
// 勝手に出ていいのかな?
|
||||
@@ -211,30 +165,20 @@ int nt_scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, char *cTex
|
||||
|
||||
ags_setFont(FONT_GOTHIC, wSize);
|
||||
agsurface_t *glyph = ags_drawStringToSurface(cText);
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_SET;
|
||||
i->no = wNumCG;
|
||||
i->refcnt = 0;
|
||||
|
||||
i->sf = sf_create_surface(glyph->width, wSize, nact->ags.dib->depth);
|
||||
gr_fill(i->sf, 0, 0, glyph->width, wSize, wR, wG, wB);
|
||||
gr_draw_amap(i->sf, 0, 0, glyph->pixel, glyph->width, wSize, glyph->bytes_per_line);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
|
||||
surface_t *sf = sf_create_surface(glyph->width, wSize, nact->ags.dib->depth);
|
||||
gr_fill(sf, 0, 0, glyph->width, wSize, wR, wG, wB);
|
||||
gr_draw_amap(sf, 0, 0, glyph->pixel, glyph->width, wSize, glyph->bytes_per_line);
|
||||
|
||||
nt_scg_new(CG_SET, wNumCG, sf);
|
||||
return OK;
|
||||
}
|
||||
|
||||
// 数字文字列のCGを作成
|
||||
int nt_scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFigs, int wZeroPadding, int wValue) {
|
||||
cginfo_t *i;
|
||||
char s[256], ss[256];
|
||||
|
||||
spcg_assert_no(wNumCG);
|
||||
|
||||
|
||||
char s[256], ss[256];
|
||||
if (wZeroPadding) {
|
||||
char *sss = "%%0%dd";
|
||||
sprintf(ss, sss, wFigs);
|
||||
@@ -247,129 +191,72 @@ int nt_scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFi
|
||||
ags_setFont(FONT_GOTHIC, wSize);
|
||||
agsurface_t *glyph = ags_drawStringToSurface(s);
|
||||
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_SET;
|
||||
i->no = wNumCG;
|
||||
i->refcnt = 0;
|
||||
i->sf = sf_create_surface(glyph->width, wSize, nact->ags.dib->depth);
|
||||
gr_fill(i->sf, 0, 0, glyph->width, wSize, wR, wG, wB);
|
||||
gr_draw_amap(i->sf, 0, 0, glyph->pixel, glyph->width, wSize, glyph->bytes_per_line);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
surface_t *sf = sf_create_surface(glyph->width, wSize, nact->ags.dib->depth);
|
||||
gr_fill(sf, 0, 0, glyph->width, wSize, wR, wG, wB);
|
||||
gr_draw_amap(sf, 0, 0, glyph->pixel, glyph->width, wSize, glyph->bytes_per_line);
|
||||
|
||||
nt_scg_new(CG_SET, wNumCG, sf);
|
||||
return OK;
|
||||
}
|
||||
|
||||
// CGを複製
|
||||
int nt_scg_copy(int wNumDstCG, int wNumSrcCG) {
|
||||
cginfo_t *i, *srccg;
|
||||
|
||||
spcg_assert_no(wNumDstCG);
|
||||
spcg_assert_no(wNumSrcCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
|
||||
cginfo_t *src = nt_scg_get(wNumSrcCG);
|
||||
if (!src)
|
||||
return NG;
|
||||
}
|
||||
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_SET;
|
||||
i->no = wNumDstCG;
|
||||
i->refcnt = 0;
|
||||
i->sf = sf_dup(srccg->sf);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
nt_scg_free(wNumDstCG);
|
||||
|
||||
cgs[wNumDstCG] = i;
|
||||
|
||||
|
||||
nt_scg_new(CG_SET, wNumDstCG, sf_dup(src->sf));
|
||||
return OK;
|
||||
}
|
||||
|
||||
// CGの一部を切りぬいたCGを作成
|
||||
int nt_scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight) {
|
||||
cginfo_t *i, *srccg;
|
||||
surface_t *dst, *src;
|
||||
|
||||
spcg_assert_no(wNumDstCG);
|
||||
spcg_assert_no(wNumSrcCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
|
||||
cginfo_t *src = nt_scg_get(wNumSrcCG);
|
||||
if (!src)
|
||||
return NG;
|
||||
}
|
||||
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_SET;
|
||||
i->no = wNumDstCG;
|
||||
i->refcnt = 0;
|
||||
|
||||
src = srccg->sf;
|
||||
if (src->has_alpha) {
|
||||
dst = sf_create_surface(wWidth, wHeight, src->depth);
|
||||
} else {
|
||||
dst = sf_create_pixel(wWidth, wHeight, src->depth);
|
||||
}
|
||||
if (src->has_pixel) {
|
||||
gr_copy(dst, 0, 0, src, wX, wY, wWidth, wHeight);
|
||||
}
|
||||
if (src->has_alpha) {
|
||||
gr_copy_alpha_map(dst, 0, 0, src, wX, wY, wWidth, wHeight);
|
||||
}
|
||||
|
||||
i->sf = dst;
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
nt_scg_free(wNumDstCG);
|
||||
|
||||
cgs[wNumDstCG] = i;
|
||||
|
||||
|
||||
surface_t *sf = src->sf->alpha
|
||||
? sf_create_surface(wWidth, wHeight, src->sf->depth)
|
||||
: sf_create_pixel(wWidth, wHeight, src->sf->depth);
|
||||
|
||||
if (src->sf->pixel)
|
||||
gr_copy(sf, 0, 0, src->sf, wX, wY, wWidth, wHeight);
|
||||
if (src->sf->alpha)
|
||||
gr_copy_alpha_map(sf, 0, 0, src->sf, wX, wY, wWidth, wHeight);
|
||||
|
||||
nt_scg_new(CG_SET, wNumDstCG, sf);
|
||||
return OK;
|
||||
}
|
||||
|
||||
// 元のCGの一部を切りぬいたCGを作成
|
||||
int nt_scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight) {
|
||||
cginfo_t *i, *srccg;
|
||||
surface_t *dst, *src;
|
||||
|
||||
spcg_assert_no(wNumDstCG);
|
||||
spcg_assert_no(wNumSrcCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
return NG;
|
||||
}
|
||||
|
||||
i = malloc(sizeof(cginfo_t));
|
||||
i->type = CG_SET;
|
||||
i->no = wNumDstCG;
|
||||
i->refcnt = 0;
|
||||
|
||||
src = srccg->sf;
|
||||
if (src->has_alpha) {
|
||||
dst = sf_create_surface(src->width, src->height, src->depth);
|
||||
gr_fill_alpha_map(dst, 0, 0, src->width, src->height, 255);
|
||||
cginfo_t *src = nt_scg_get(wNumSrcCG);
|
||||
if (!src)
|
||||
return NG;
|
||||
|
||||
surface_t *sf;
|
||||
if (src->sf->alpha) {
|
||||
sf = sf_create_surface(src->sf->width, src->sf->height, src->sf->depth);
|
||||
gr_fill_alpha_map(sf, 0, 0, src->sf->width, src->sf->height, 255);
|
||||
} else {
|
||||
dst = sf_create_pixel(src->width, src->height, src->depth);
|
||||
sf = sf_create_pixel(src->sf->width, src->sf->height, src->sf->depth);
|
||||
}
|
||||
|
||||
if (src->has_pixel) {
|
||||
gr_copy(dst, wX, wY, src, wX, wY, wWidth, wHeight);
|
||||
}
|
||||
if (src->has_alpha) {
|
||||
gr_copy_alpha_map(dst, wX, wY, src, wX, wY, wWidth, wHeight);
|
||||
}
|
||||
|
||||
i->sf = dst;
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
nt_scg_free(wNumDstCG);
|
||||
|
||||
cgs[wNumDstCG] = i;
|
||||
|
||||
if (src->sf->pixel)
|
||||
gr_copy(sf, wX, wY, src->sf, wX, wY, wWidth, wHeight);
|
||||
if (src->sf->alpha)
|
||||
gr_copy_alpha_map(sf, wX, wY, src->sf, wX, wY, wWidth, wHeight);
|
||||
|
||||
nt_scg_new(CG_SET, wNumDstCG, sf);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -388,51 +275,17 @@ int nt_scg_freeall() {
|
||||
* されていない(参照数が0の)場合のみ、オブジェクトを削除
|
||||
*/
|
||||
int nt_scg_free(int no) {
|
||||
cginfo_t *cg;
|
||||
|
||||
spcg_assert_no(no);
|
||||
|
||||
if (NULL == (cg = cgs[no])) return NG;
|
||||
cginfo_t *cg = cgs[no];
|
||||
if (!cg) return NG;
|
||||
|
||||
// 参照数が0の時のみオブジェクトを開放
|
||||
if (cg->refcnt == 0) {
|
||||
nt_scg_free_cgobj(cg);
|
||||
}
|
||||
|
||||
// 番号で消したときはオブジェクトが開放されなくても
|
||||
// オブジェクトリストから削除
|
||||
nt_scg_deref(cg);
|
||||
cgs[no] = NULL;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* CG オブジェクトの開放
|
||||
*/
|
||||
int nt_scg_free_cgobj(cginfo_t *cg) {
|
||||
if (cg == NULL) return NG;
|
||||
|
||||
(cg->refcnt)--;
|
||||
// 他でまだ参照していれば開放しない
|
||||
if (cg->refcnt > 0) {
|
||||
return NG;
|
||||
}
|
||||
|
||||
// CG本体の開放
|
||||
if (cg->sf) {
|
||||
sf_free(cg->sf);
|
||||
}
|
||||
|
||||
// 削除するオブジェクトを参照しているオブジェクトリストも削除
|
||||
if (cg == cgs[cg->no]) {
|
||||
cgs[cg->no] = NULL;
|
||||
}
|
||||
|
||||
free(cg);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
// CGの種類を取得
|
||||
int nt_scg_querytype(int wNumCG, int *ret) {
|
||||
if (wNumCG >= (CGMAX -1)) goto errexit;
|
||||
@@ -484,7 +337,7 @@ int nt_scg_existalphamap(int wNumCG, int *ret) {
|
||||
if (cgs[wNumCG] == NULL) goto errexit;
|
||||
if (cgs[wNumCG]->sf == NULL) goto errexit;
|
||||
|
||||
*ret = cgs[wNumCG]->sf->has_alpha ? 1 : 0;
|
||||
*ret = cgs[wNumCG]->sf->alpha ? 1 : 0;
|
||||
|
||||
errexit:
|
||||
*ret = 0;
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
#include "portab.h"
|
||||
#include "night.h"
|
||||
|
||||
extern cginfo_t *nt_scg_loadcg_no(int no, boolean refinc);
|
||||
extern cginfo_t *nt_scg_addref(int no);
|
||||
extern void nt_scg_deref(cginfo_t *cg);
|
||||
extern int nt_scg_create(int wNumCG, int wWidth, int wHeight, int wR, int wG, int wB, int wBlendRate);
|
||||
extern int nt_scg_create_reverse(int NumCG, int wNumSrcCG, int wReverseX, int wReverseY);
|
||||
extern int nt_scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG);
|
||||
@@ -39,7 +40,6 @@ extern int nt_scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth,
|
||||
extern int nt_scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight);
|
||||
extern int nt_scg_freeall();
|
||||
extern int nt_scg_free(int cg);
|
||||
extern int nt_scg_free_cgobj(cginfo_t *cg);
|
||||
extern int nt_scg_querytype(int wNumCG, int *ret);
|
||||
extern int nt_scg_querysize(int wNumCG, int *w, int *h);
|
||||
extern int nt_scg_querybpp(int wNumCG, int *ret);
|
||||
|
||||
@@ -4,7 +4,7 @@ static surface_t *blend(surface_t *base, int x, int y, surface_t *blend, int mod
|
||||
|
||||
gr_copy(dst, 0, 0, base, 0, 0, base->width, base->height);
|
||||
|
||||
if (base->has_alpha) {
|
||||
if (base->alpha) {
|
||||
// ベースに alpha map がある場合はそれをコピー
|
||||
gr_copy_alpha_map(dst, 0, 0, base, 0, 0, base->width, base->height);
|
||||
} else {
|
||||
@@ -12,7 +12,7 @@ static surface_t *blend(surface_t *base, int x, int y, surface_t *blend, int mod
|
||||
gr_fill_alpha_map(dst, 0, 0, base->width, base->height, 255);
|
||||
}
|
||||
|
||||
if (blend->has_alpha) {
|
||||
if (blend->alpha) {
|
||||
// 重ね合わせ先の alpha map があるときはそれを使う
|
||||
gre_BlendUseAMap(dst, x, y, base, x, y, blend, 0, 0, blend->width, blend->height, blend, 0, 0, 255);
|
||||
} else {
|
||||
|
||||
@@ -12,13 +12,11 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
|
||||
dst->depth = src->depth;
|
||||
dst->bytes_per_line = dw * src->bytes_per_pixel;
|
||||
dst->bytes_per_pixel = src->bytes_per_pixel;
|
||||
dst->has_pixel = src->has_pixel;
|
||||
dst->has_alpha = src->has_alpha;
|
||||
|
||||
if (src->has_pixel) {
|
||||
if (src->pixel) {
|
||||
dst->pixel = malloc(dh * dst->bytes_per_line);
|
||||
}
|
||||
if (src->has_alpha) {
|
||||
if (src->alpha) {
|
||||
dst->alpha = malloc(dw * dh);
|
||||
}
|
||||
|
||||
@@ -78,7 +76,6 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
|
||||
switch(dst->depth) {
|
||||
case 8:
|
||||
SCALEDCOPYAREA(BYTE); break;
|
||||
case 15:
|
||||
case 16:
|
||||
SCALEDCOPYAREA(WORD); break;
|
||||
case 24:
|
||||
@@ -88,7 +85,7 @@ static surface_t *stretch(surface_t *src, int dw, int dh, int mirror) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (src->has_alpha) {
|
||||
if (src->alpha) {
|
||||
int x, y;
|
||||
BYTE *sl, *dl;
|
||||
BYTE *_sl, *_dl;
|
||||
|
||||
@@ -118,7 +118,7 @@ int nt_sstr_num2str(int strno, int fig, int nzeropad, int num) {
|
||||
}
|
||||
|
||||
sprintf(s, ss, num);
|
||||
v_strcpy(strno -1, s);
|
||||
svar_set(strno, s);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
+10
-15
@@ -17,9 +17,9 @@ sprite_t *nt_sp_new(int no, int cg1, int cg2, int cg3, int type) {
|
||||
sp->no = no;
|
||||
sp->type = type;
|
||||
|
||||
if (cg1) sp->cg1 = nt_scg_loadcg_no(cg1, TRUE); else sp->cg1 = NULL;
|
||||
if (cg2) sp->cg2 = nt_scg_loadcg_no(cg2, TRUE); else sp->cg2 = NULL;
|
||||
if (cg3) sp->cg3 = nt_scg_loadcg_no(cg3, TRUE); else sp->cg3 = NULL;
|
||||
sp->cg1 = cg1 ? nt_scg_addref(cg1) : NULL;
|
||||
sp->cg2 = cg2 ? nt_scg_addref(cg2) : NULL;
|
||||
sp->cg3 = cg3 ? nt_scg_addref(cg3) : NULL;
|
||||
|
||||
sp->curcg = sp->cg1;
|
||||
sp->show = TRUE;
|
||||
@@ -72,9 +72,9 @@ sprite_t *nt_sp_msg_new(int no, int x, int y, int width, int height) {
|
||||
void nt_sp_free(sprite_t *sp) {
|
||||
if (sp == NULL) return;
|
||||
|
||||
if (sp->cg1) nt_scg_free_cgobj(sp->cg1);
|
||||
if (sp->cg2) nt_scg_free_cgobj(sp->cg2);
|
||||
if (sp->cg3) nt_scg_free_cgobj(sp->cg3);
|
||||
if (sp->cg1) nt_scg_deref(sp->cg1);
|
||||
if (sp->cg2) nt_scg_deref(sp->cg2);
|
||||
if (sp->cg3) nt_scg_deref(sp->cg3);
|
||||
|
||||
if (sp->type == SPRITE_MSG) {
|
||||
sf_free(sp->u.msg.canvas);
|
||||
@@ -102,15 +102,10 @@ void nt_sp_set_cg(sprite_t *sp, int no) {
|
||||
|
||||
if (sp == NULL) return;
|
||||
|
||||
if (sp->curcg) {
|
||||
nt_scg_free_cgobj(sp->curcg);
|
||||
}
|
||||
|
||||
if (no) {
|
||||
cg = nt_scg_loadcg_no(no, TRUE);
|
||||
} else {
|
||||
cg = NULL;
|
||||
}
|
||||
if (sp->curcg)
|
||||
nt_scg_deref(sp->curcg);
|
||||
|
||||
cg = no ? nt_scg_addref(no) : NULL;
|
||||
|
||||
if (cg == NULL) {
|
||||
sp->cursize.width = 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user