mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09e89e794d | ||
|
|
3fd7a58544 | ||
|
|
f0ccdcf40a | ||
|
|
1a6b7b33b9 | ||
|
|
7240971beb | ||
|
|
250fbd30a0 | ||
|
|
d3579186c6 | ||
|
|
54dcd8c5fc | ||
|
|
5c81929461 | ||
|
|
dbc15ca3b4 | ||
|
|
9a1f1c77a6 | ||
|
|
0fe5cb60a3 | ||
|
|
3e2c226866 | ||
|
|
0351f4cbcd | ||
|
|
f1eed8f2af | ||
|
|
9020e5ab1d | ||
|
|
697c15854a | ||
|
|
70a03ff02f | ||
|
|
d50e7ac150 | ||
|
|
ea5776108a | ||
|
|
8d72775daa | ||
|
|
73216073af |
@@ -1,3 +0,0 @@
|
||||
((nil . ((indent-tabs-mode . t)
|
||||
(c-basic-offset . 4)
|
||||
(tab-width . 4))))
|
||||
@@ -0,0 +1,13 @@
|
||||
# https://EditorConfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
|
||||
[*.{h,c}]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[CMakeLists.txt]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -2,7 +2,7 @@ name: Emscripten Build
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
emscripten-version: 1.39.8
|
||||
emscripten-version: 1.39.16
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -9,7 +9,9 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Deps
|
||||
run: sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
+29
-27
@@ -18,7 +18,7 @@ endif ()
|
||||
macro (optional_find_package package)
|
||||
option(ENABLE_${package} "Use ${package} if available" ON)
|
||||
if (ENABLE_${package})
|
||||
find_package(${package} ${ARGN})
|
||||
find_package(${package} ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -26,7 +26,7 @@ endmacro()
|
||||
macro (optional_pkg_check_modules prefix)
|
||||
option(ENABLE_${prefix} "Use ${prefix} if available" ON)
|
||||
if (ENABLE_${prefix})
|
||||
pkg_check_modules(${prefix} ${ARGN})
|
||||
pkg_check_modules(${prefix} ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -38,7 +38,11 @@ check_symbol_exists(uname "sys/utsname.h" HAVE_UNAME)
|
||||
if (EMSCRIPTEN)
|
||||
set(SDL2_FOUND 1)
|
||||
set(FREETYPE_FOUND 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)
|
||||
@@ -49,29 +53,26 @@ else()
|
||||
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
|
||||
|
||||
if (NOT DEFINED ENABLE_MODULES)
|
||||
check_library_exists(dl dlopen "" ENABLE_MODULES)
|
||||
endif()
|
||||
if (ENABLE_MODULES)
|
||||
link_libraries(dl)
|
||||
set(ENABLE_MODULES 1)
|
||||
endif()
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
optional_find_package(X11)
|
||||
if (X11_xf86vmode_FOUND)
|
||||
set(HAVE_XF86VMODE 1)
|
||||
set(HAVE_XF86VMODE 1)
|
||||
endif()
|
||||
|
||||
optional_find_package(GTK2 COMPONENTS gtk)
|
||||
if (GTK2_FOUND)
|
||||
set(ENABLE_GTK 1)
|
||||
set(ENABLE_GTK 1)
|
||||
endif()
|
||||
|
||||
optional_find_package(Freetype)
|
||||
|
||||
include(FindPkgConfig)
|
||||
if (NOT X11_FOUND)
|
||||
optional_pkg_check_modules(SDL2 IMPORTED_TARGET sdl2)
|
||||
optional_pkg_check_modules(SDL2 IMPORTED_TARGET sdl2)
|
||||
endif()
|
||||
|
||||
optional_pkg_check_modules(SDL2MIXER IMPORTED_TARGET SDL2_mixer)
|
||||
@@ -92,10 +93,10 @@ elseif (GTK2_FOUND)
|
||||
include(FindIntl)
|
||||
include(FindGettext)
|
||||
if (Intl_FOUND AND GETTEXT_FOUND)
|
||||
set(ENABLE_NLS 1)
|
||||
add_compile_definitions(LOCALEDIR="${CMAKE_INSTALL_PREFIX}/share/locale")
|
||||
include_directories(${Intl_INCLUDE_DIRS})
|
||||
link_libraries(${Intl_LIBRARIES})
|
||||
set(ENABLE_NLS 1)
|
||||
add_compile_definitions(LOCALEDIR="${CMAKE_INSTALL_PREFIX}/share/locale")
|
||||
include_directories(${Intl_INCLUDE_DIRS})
|
||||
link_libraries(${Intl_LIBRARIES})
|
||||
endif()
|
||||
else()
|
||||
set(SRC_MENU menu_null.c)
|
||||
@@ -174,21 +175,21 @@ else()
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
check_symbol_exists(SNDCTL_SEQ_NRSYNTHS "machine/soundcard.h" ENABLE_MIDI_SEQMIDI)
|
||||
check_symbol_exists(SNDCTL_SEQ_NRSYNTHS "machine/soundcard.h" ENABLE_MIDI_SEQMIDI)
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "(NetBSD|OpenBSD)")
|
||||
check_symbol_exists(SNDCTL_SEQ_NRSYNTHS "soundcard.h" ENABLE_MIDI_SEQMIDI)
|
||||
check_symbol_exists(SNDCTL_SEQ_NRSYNTHS "soundcard.h" ENABLE_MIDI_SEQMIDI)
|
||||
else ()
|
||||
check_symbol_exists(SNDCTL_SEQ_NRSYNTHS "sys/soundcard.h" ENABLE_MIDI_SEQMIDI)
|
||||
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")
|
||||
list(APPEND SUMMARY_MIDI "OSS sequencer")
|
||||
set(SEQ_DEVICE "/dev/sequencer" CACHE STRING "sequencer device")
|
||||
endif()
|
||||
|
||||
if (SDL2MIXER_FOUND)
|
||||
list(APPEND SRC_MIDI midi.sdlmixer.c)
|
||||
list(APPEND SUMMARY_MIDI "SDL_mixer")
|
||||
set(ENABLE_MIDI_SDLMIXER 1)
|
||||
list(APPEND SRC_MIDI midi.sdlmixer.c)
|
||||
list(APPEND SUMMARY_MIDI "SDL_mixer")
|
||||
set(ENABLE_MIDI_SDLMIXER 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -203,11 +204,11 @@ elseif (SDL2_FOUND)
|
||||
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")
|
||||
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)
|
||||
set(SRC_JOYSTICK joystick_dmy.c)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
@@ -236,9 +237,9 @@ endif()
|
||||
|
||||
function (print_summary name)
|
||||
if (ARGN)
|
||||
list(JOIN ARGN ", " MSG)
|
||||
list(JOIN ARGN ", " MSG)
|
||||
else()
|
||||
set(MSG "none")
|
||||
set(MSG "none")
|
||||
endif()
|
||||
message(" ${name}: ${MSG}")
|
||||
endfunction()
|
||||
@@ -268,4 +269,5 @@ endif()
|
||||
|
||||
if (ENABLE_MODULES)
|
||||
add_subdirectory(modules)
|
||||
target_link_libraries(xsystem35 PRIVATE modules)
|
||||
endif()
|
||||
|
||||
+1
-2
@@ -44,7 +44,7 @@ cd xsystem35-sdl2/android
|
||||
4. The game starts. Two-finger touch is treated as a right click.
|
||||
|
||||
### Preparing a ZIP
|
||||
- Include all `.ALD` files and `.ain` files if any.
|
||||
- Include all files in the `GAMEDATA` folder (`.ALD` files and others). `.EXE` and `.DLL` are not really needed, but you can include them as well.
|
||||
- Music files (`.mp3`, `.ogg` or `.wav`) whose file names end with a number are recognized as BGM files. For example:
|
||||
- `Track2.mp3`
|
||||
- `15.ogg`
|
||||
@@ -58,4 +58,3 @@ Note: This form of ZIP can be used in [Kichikuou on Web](http://kichikuou.github
|
||||
|
||||
## Known Issues
|
||||
- Android versions older than 7.0 cannot handle ZIPs containing Shift-JIS file names. This is the case with some ZIPs distributed on [retroc.net](http://retropc.net/alice/). If you get the error "This type of ZIP is not supported.", unzip the ZIP file on your PC and re-archive it with a modern ZIP creation software.
|
||||
- DLL modules used in System3.9 games (大悪司 and later) are not supported yet.
|
||||
|
||||
@@ -16,8 +16,8 @@ android {
|
||||
}
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 26
|
||||
versionCode 2
|
||||
versionName "0.1.1"
|
||||
versionCode 4
|
||||
versionName "0.2.1"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static"
|
||||
|
||||
@@ -7,11 +7,10 @@ project(GAME)
|
||||
# android_ndk_import_module_cpufeatures()
|
||||
|
||||
include(FetchContent)
|
||||
# TODO: Use SDL2 2.0.11 once released
|
||||
FetchContent_Declare(
|
||||
SDL
|
||||
URL https://hg.libsdl.org/SDL/archive/a5f93b21dfe0.tar.gz # rev 13383
|
||||
URL_HASH SHA1=a7e9696f7ef8af7c4b89671b096c38d1a4cbf90c
|
||||
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
|
||||
)
|
||||
# TODO: Use SDL2_ttf 2.0.16 once released
|
||||
@@ -41,11 +40,13 @@ endif()
|
||||
FetchContent_GetProperties(SDL_mixer)
|
||||
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()
|
||||
|
||||
# The main CMakeLists.txt of xsystem35
|
||||
|
||||
@@ -16,17 +16,31 @@
|
||||
android:required="false" />
|
||||
|
||||
<!-- Game controller support -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.bluetooth"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.gamepad"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.usb.host"
|
||||
android:required="false" />
|
||||
|
||||
<!-- External mouse input events -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.type.pc"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Allow reading from external storage -->
|
||||
<!-- Audio recording support -->
|
||||
<!-- if you want to capture audio, uncomment this. -->
|
||||
<!-- <uses-feature
|
||||
android:name="android.hardware.microphone"
|
||||
android:required="false" /> -->
|
||||
|
||||
<!-- Allow writing to external storage -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<!-- Allow access to Bluetooth devices -->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH" /> -->
|
||||
<!-- Allow access to the vibrator -->
|
||||
<!-- <uses-permission android:name="android.permission.VIBRATE" /> -->
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import java.io.IOException
|
||||
class GameActivity : SDLActivity() {
|
||||
companion object {
|
||||
const val EXTRA_GAME_ROOT = "GAME_ROOT"
|
||||
const val EXTRA_ARCHIVE_NAME = "ARCHIVE_NAME"
|
||||
}
|
||||
|
||||
private lateinit var gameRoot: File
|
||||
@@ -63,9 +64,12 @@ class GameActivity : SDLActivity() {
|
||||
|
||||
override fun setTitle(title: CharSequence?) {
|
||||
super.setTitle(title)
|
||||
val str = title?.toString()?.substringAfter(':', "")
|
||||
if (str.isNullOrEmpty())
|
||||
return
|
||||
var str = title?.toString()?.substringAfter(':', "")
|
||||
if (str.isNullOrEmpty()) {
|
||||
str = intent.getStringExtra(EXTRA_ARCHIVE_NAME)
|
||||
if (str == null)
|
||||
return
|
||||
}
|
||||
File(gameRoot, Launcher.TITLE_FILE).writeText(str)
|
||||
Launcher.updateGameList()
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ private var gLauncher: Launcher? = null
|
||||
interface LauncherObserver {
|
||||
fun onGameListChange()
|
||||
fun onInstallProgress(path: String)
|
||||
fun onInstallSuccess(path: File)
|
||||
fun onInstallSuccess(path: File, archiveName: String?)
|
||||
fun onInstallFailure(msgId: Int)
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
updateGameList()
|
||||
}
|
||||
|
||||
fun install(input: InputStream) {
|
||||
fun install(input: InputStream, archiveName: String?) {
|
||||
val dir = createDirForGame()
|
||||
@SuppressLint("HandlerLeak")
|
||||
val handler = object : Handler() {
|
||||
@@ -84,7 +84,7 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
}
|
||||
SUCCESS -> {
|
||||
isInstalling = false
|
||||
observer?.onInstallSuccess(msg.obj as File)
|
||||
observer?.onInstallSuccess(msg.obj as File, archiveName)
|
||||
}
|
||||
FAILURE -> {
|
||||
isInstalling = false
|
||||
@@ -213,27 +213,37 @@ class Launcher private constructor(private val rootDir: File) {
|
||||
private class GameConfigWriter {
|
||||
private val grb = StringBuilder()
|
||||
private var basename: String? = null
|
||||
private val aldRegex = """(.*?)([a-z])([a-z])\.ald""".toRegex(RegexOption.IGNORE_CASE)
|
||||
private val resourceType = mapOf(
|
||||
private val aldRegex = """(.*?)([a-z])([a-z])\.(ald|wai|bgi)""".toRegex(RegexOption.IGNORE_CASE)
|
||||
private val aldType = mapOf(
|
||||
"b" to "BGM",
|
||||
"d" to "Data",
|
||||
"g" to "Graphics",
|
||||
"m" to "Midi",
|
||||
"r" to "Resource",
|
||||
"s" to "Scenario",
|
||||
"w" to "Wave")
|
||||
|
||||
private val specialResources = mapOf(
|
||||
"system39.ain" to "Ain",
|
||||
"system39.ini" to "Init",
|
||||
"sactefam.kld" to "SACT01"
|
||||
)
|
||||
private val audioRegex = """.*?(\d+)\.(wav|mp3|ogg)""".toRegex(RegexOption.IGNORE_CASE)
|
||||
private val audioFiles: Array<String?> = arrayOfNulls(100)
|
||||
|
||||
fun maybeAdd(path: String) {
|
||||
val name = File(path).name
|
||||
|
||||
if (name.toLowerCase(Locale.US) == "system39.ain") {
|
||||
grb.appendln("Ain $path")
|
||||
specialResources[name.toLowerCase(Locale.US)]?.let {
|
||||
grb.appendln("$it $path")
|
||||
return
|
||||
}
|
||||
aldRegex.matchEntire(name)?.let {
|
||||
val type = resourceType[it.groupValues[2].toLowerCase(Locale.US)]
|
||||
val ext = it.groupValues[4].toUpperCase(Locale.US)
|
||||
val type = if (ext == "ALD") {
|
||||
aldType[it.groupValues[2].toLowerCase(Locale.US)]
|
||||
} else {
|
||||
ext
|
||||
}
|
||||
val id = it.groupValues[3].toUpperCase(Locale.US)
|
||||
if (type != null) {
|
||||
grb.appendln("$type$id $path")
|
||||
|
||||
@@ -19,7 +19,9 @@ package io.github.kichikuou.xsystem35
|
||||
|
||||
import android.app.*
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.provider.OpenableColumns
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
@@ -60,7 +62,7 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
override fun onListItemClick(l: ListView?, v: View?, position: Int, id: Long) {
|
||||
super.onListItemClick(l, v, position, id)
|
||||
if (position < launcher.games.size) {
|
||||
startGame(launcher.games[position].path)
|
||||
startGame(launcher.games[position].path, null)
|
||||
} else {
|
||||
val i = Intent(Intent.ACTION_GET_CONTENT)
|
||||
i.type = CONTENT_TYPE_ZIP
|
||||
@@ -112,7 +114,7 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
INSTALL_REQUEST -> {
|
||||
val input = contentResolver.openInputStream(uri) ?: return
|
||||
showProgressDialog()
|
||||
launcher.install(input)
|
||||
launcher.install(input, getArchiveName(uri))
|
||||
}
|
||||
SAVEDATA_EXPORT_REQUEST -> try {
|
||||
launcher.exportSaveData(contentResolver.openOutputStream(uri)!!)
|
||||
@@ -144,9 +146,9 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
progressDialog?.setProgress(getString(R.string.install_progress, path))
|
||||
}
|
||||
|
||||
override fun onInstallSuccess(path: File) {
|
||||
override fun onInstallSuccess(path: File, archiveName: String?) {
|
||||
dismissProgressDialog()
|
||||
startGame(path)
|
||||
startGame(path, archiveName)
|
||||
}
|
||||
|
||||
override fun onInstallFailure(msgId: Int) {
|
||||
@@ -154,10 +156,11 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
errorDialog(msgId)
|
||||
}
|
||||
|
||||
private fun startGame(path: File) {
|
||||
private fun startGame(path: File, archiveName: String?) {
|
||||
val i = Intent()
|
||||
i.setClass(applicationContext, GameActivity::class.java)
|
||||
i.putExtra(GameActivity.EXTRA_GAME_ROOT, path.path)
|
||||
i.putExtra(GameActivity.EXTRA_ARCHIVE_NAME, archiveName)
|
||||
startActivity(i)
|
||||
}
|
||||
|
||||
@@ -181,6 +184,17 @@ class LauncherActivity : ListActivity(), AdapterView.OnItemLongClickListener, La
|
||||
.setPositiveButton(R.string.ok) {_, _ -> }
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun getArchiveName(uri: Uri): String? {
|
||||
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
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION") // for ProgressDialog
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package org.libsdl.app;
|
||||
|
||||
import android.hardware.usb.UsbDevice;
|
||||
|
||||
interface HIDDevice
|
||||
{
|
||||
public int getId();
|
||||
@@ -9,6 +11,7 @@ interface HIDDevice
|
||||
public int getVersion();
|
||||
public String getManufacturerName();
|
||||
public String getProductName();
|
||||
public UsbDevice getDevice();
|
||||
public boolean open();
|
||||
public int sendFeatureReport(byte[] report);
|
||||
public int sendOutputReport(byte[] report);
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.bluetooth.BluetoothGattDescriptor;
|
||||
import android.bluetooth.BluetoothManager;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.bluetooth.BluetoothGattService;
|
||||
import android.hardware.usb.UsbDevice;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
@@ -165,13 +166,13 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
|
||||
mHandler = new Handler(Looper.getMainLooper());
|
||||
|
||||
mGatt = connectGatt();
|
||||
final HIDDeviceBLESteamController finalThis = this;
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
finalThis.checkConnectionForChromebookIssue();
|
||||
}
|
||||
}, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
|
||||
// final HIDDeviceBLESteamController finalThis = this;
|
||||
// mHandler.postDelayed(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// finalThis.checkConnectionForChromebookIssue();
|
||||
// }
|
||||
// }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
@@ -469,7 +470,7 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
|
||||
// Only register controller with the native side once it has been fully configured
|
||||
if (!isRegistered()) {
|
||||
Log.v(TAG, "Registering Steam Controller with ID: " + getId());
|
||||
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0);
|
||||
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0, 0, 0, 0);
|
||||
setRegistered();
|
||||
}
|
||||
}
|
||||
@@ -563,6 +564,11 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
|
||||
return "Steam Controller";
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsbDevice getDevice() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open() {
|
||||
return true;
|
||||
|
||||
@@ -19,8 +19,9 @@ import android.hardware.usb.*;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class HIDDeviceManager {
|
||||
@@ -50,7 +51,6 @@ public class HIDDeviceManager {
|
||||
|
||||
private Context mContext;
|
||||
private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>();
|
||||
private HashMap<UsbDevice, HIDDeviceUSB> mUSBDevices = new HashMap<UsbDevice, HIDDeviceUSB>();
|
||||
private HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>();
|
||||
private int mNextDeviceId = 0;
|
||||
private SharedPreferences mSharedPreferences = null;
|
||||
@@ -241,17 +241,7 @@ public class HIDDeviceManager {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); ++interface_number) {
|
||||
if (isHIDDeviceInterface(usbDevice, interface_number)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isHIDDeviceInterface(UsbDevice usbDevice, int interface_number) {
|
||||
UsbInterface usbInterface = usbDevice.getInterface(interface_number);
|
||||
private boolean isHIDDeviceInterface(UsbDevice usbDevice, UsbInterface usbInterface) {
|
||||
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) {
|
||||
return true;
|
||||
}
|
||||
@@ -331,45 +321,45 @@ public class HIDDeviceManager {
|
||||
}
|
||||
|
||||
private void handleUsbDeviceAttached(UsbDevice usbDevice) {
|
||||
if (isHIDDeviceUSB(usbDevice)) {
|
||||
connectHIDDeviceUSB(usbDevice);
|
||||
}
|
||||
connectHIDDeviceUSB(usbDevice);
|
||||
}
|
||||
|
||||
private void handleUsbDeviceDetached(UsbDevice usbDevice) {
|
||||
HIDDeviceUSB device = mUSBDevices.get(usbDevice);
|
||||
if (device == null)
|
||||
return;
|
||||
|
||||
int id = device.getId();
|
||||
mUSBDevices.remove(usbDevice);
|
||||
mDevicesById.remove(id);
|
||||
device.shutdown();
|
||||
HIDDeviceDisconnected(id);
|
||||
List<Integer> devices = new ArrayList<Integer>();
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
if (usbDevice.equals(device.getDevice())) {
|
||||
devices.add(device.getId());
|
||||
}
|
||||
}
|
||||
for (int id : devices) {
|
||||
HIDDevice device = mDevicesById.get(id);
|
||||
mDevicesById.remove(id);
|
||||
device.shutdown();
|
||||
HIDDeviceDisconnected(id);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) {
|
||||
HIDDeviceUSB device = mUSBDevices.get(usbDevice);
|
||||
if (device == null)
|
||||
return;
|
||||
|
||||
boolean opened = false;
|
||||
if (permission_granted) {
|
||||
opened = device.open();
|
||||
for (HIDDevice device : mDevicesById.values()) {
|
||||
if (usbDevice.equals(device.getDevice())) {
|
||||
boolean opened = false;
|
||||
if (permission_granted) {
|
||||
opened = device.open();
|
||||
}
|
||||
HIDDeviceOpenResult(device.getId(), opened);
|
||||
}
|
||||
}
|
||||
HIDDeviceOpenResult(device.getId(), opened);
|
||||
}
|
||||
|
||||
private void connectHIDDeviceUSB(UsbDevice usbDevice) {
|
||||
synchronized (this) {
|
||||
for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); interface_number++) {
|
||||
if (isHIDDeviceInterface(usbDevice, interface_number)) {
|
||||
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_number);
|
||||
for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
|
||||
UsbInterface usbInterface = usbDevice.getInterface(interface_index);
|
||||
if (isHIDDeviceInterface(usbDevice, usbInterface)) {
|
||||
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
|
||||
int id = device.getId();
|
||||
mUSBDevices.put(usbDevice, device);
|
||||
mDevicesById.put(id, device);
|
||||
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), interface_number);
|
||||
break;
|
||||
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), usbInterface.getId(), usbInterface.getInterfaceClass(), usbInterface.getInterfaceSubclass(), usbInterface.getInterfaceProtocol());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -566,33 +556,27 @@ public class HIDDeviceManager {
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public boolean openDevice(int deviceID) {
|
||||
Log.v(TAG, "openDevice deviceID=" + deviceID);
|
||||
HIDDevice device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Look to see if this is a USB device and we have permission to access it
|
||||
for (HIDDeviceUSB device : mUSBDevices.values()) {
|
||||
if (deviceID == device.getId()) {
|
||||
UsbDevice usbDevice = device.getDevice();
|
||||
if (!mUsbManager.hasPermission(usbDevice)) {
|
||||
HIDDeviceOpenPending(deviceID);
|
||||
try {
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
|
||||
} catch (Exception e) {
|
||||
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
||||
HIDDeviceOpenResult(deviceID, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
UsbDevice usbDevice = device.getDevice();
|
||||
if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
|
||||
HIDDeviceOpenPending(deviceID);
|
||||
try {
|
||||
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
|
||||
} catch (Exception e) {
|
||||
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
|
||||
HIDDeviceOpenResult(deviceID, false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
Log.v(TAG, "openDevice deviceID=" + deviceID);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
HIDDeviceDisconnected(deviceID);
|
||||
return false;
|
||||
}
|
||||
|
||||
return device.open();
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
|
||||
@@ -602,7 +586,7 @@ public class HIDDeviceManager {
|
||||
|
||||
public int sendOutputReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
|
||||
//Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
@@ -619,7 +603,7 @@ public class HIDDeviceManager {
|
||||
|
||||
public int sendFeatureReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
|
||||
//Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
@@ -636,7 +620,7 @@ public class HIDDeviceManager {
|
||||
|
||||
public boolean getFeatureReport(int deviceID, byte[] report) {
|
||||
try {
|
||||
Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
|
||||
//Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
|
||||
HIDDevice device;
|
||||
device = getDevice(deviceID);
|
||||
if (device == null) {
|
||||
@@ -675,7 +659,7 @@ public class HIDDeviceManager {
|
||||
private native void HIDDeviceRegisterCallback();
|
||||
private native void HIDDeviceReleaseCallback();
|
||||
|
||||
native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number);
|
||||
native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number, int interface_class, int interface_subclass, int interface_protocol);
|
||||
native void HIDDeviceOpenPending(int deviceID);
|
||||
native void HIDDeviceOpenResult(int deviceID, boolean opened);
|
||||
native void HIDDeviceDisconnected(int deviceID);
|
||||
|
||||
@@ -11,6 +11,7 @@ class HIDDeviceUSB implements HIDDevice {
|
||||
|
||||
protected HIDDeviceManager mManager;
|
||||
protected UsbDevice mDevice;
|
||||
protected int mInterfaceIndex;
|
||||
protected int mInterface;
|
||||
protected int mDeviceId;
|
||||
protected UsbDeviceConnection mConnection;
|
||||
@@ -20,16 +21,17 @@ class HIDDeviceUSB implements HIDDevice {
|
||||
protected boolean mRunning;
|
||||
protected boolean mFrozen;
|
||||
|
||||
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_number) {
|
||||
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_index) {
|
||||
mManager = manager;
|
||||
mDevice = usbDevice;
|
||||
mInterface = interface_number;
|
||||
mInterfaceIndex = interface_index;
|
||||
mInterface = mDevice.getInterface(mInterfaceIndex).getId();
|
||||
mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier());
|
||||
mRunning = false;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return String.format("%s/%x/%x", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId());
|
||||
return String.format("%s/%x/%x/%d", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId(), mInterfaceIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,6 +90,7 @@ class HIDDeviceUSB implements HIDDevice {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsbDevice getDevice() {
|
||||
return mDevice;
|
||||
}
|
||||
@@ -104,19 +107,15 @@ class HIDDeviceUSB implements HIDDevice {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Force claim all interfaces
|
||||
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
|
||||
UsbInterface iface = mDevice.getInterface(i);
|
||||
|
||||
if (!mConnection.claimInterface(iface, true)) {
|
||||
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
// Force claim our interface
|
||||
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
|
||||
if (!mConnection.claimInterface(iface, true)) {
|
||||
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Find the endpoints
|
||||
UsbInterface iface = mDevice.getInterface(mInterface);
|
||||
for (int j = 0; j < iface.getEndpointCount(); j++) {
|
||||
UsbEndpoint endpt = iface.getEndpoint(j);
|
||||
switch (endpt.getDirection()) {
|
||||
@@ -166,7 +165,7 @@ class HIDDeviceUSB implements HIDDevice {
|
||||
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT,
|
||||
0x09/*HID set_report*/,
|
||||
(3/*HID feature*/ << 8) | report_number,
|
||||
0,
|
||||
mInterface,
|
||||
report, offset, length,
|
||||
1000/*timeout millis*/);
|
||||
|
||||
@@ -210,7 +209,7 @@ class HIDDeviceUSB implements HIDDevice {
|
||||
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN,
|
||||
0x01/*HID get_report*/,
|
||||
(3/*HID feature*/ << 8) | report_number,
|
||||
0,
|
||||
mInterface,
|
||||
report, offset, length,
|
||||
1000/*timeout millis*/);
|
||||
|
||||
@@ -250,10 +249,8 @@ class HIDDeviceUSB implements HIDDevice {
|
||||
mInputThread = null;
|
||||
}
|
||||
if (mConnection != null) {
|
||||
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
|
||||
UsbInterface iface = mDevice.getInterface(i);
|
||||
mConnection.releaseInterface(iface);
|
||||
}
|
||||
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
|
||||
mConnection.releaseInterface(iface);
|
||||
mConnection.close();
|
||||
mConnection = null;
|
||||
}
|
||||
|
||||
@@ -283,10 +283,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
return;
|
||||
}
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(true);
|
||||
}
|
||||
|
||||
SDLActivity.handleNativeState();
|
||||
}
|
||||
|
||||
@@ -298,10 +294,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
return;
|
||||
}
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(false);
|
||||
}
|
||||
|
||||
SDLActivity.handleNativeState();
|
||||
}
|
||||
|
||||
@@ -310,6 +302,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
protected void onPause() {
|
||||
Log.v(TAG, "onPause()");
|
||||
super.onPause();
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(true);
|
||||
}
|
||||
if (!mHasMultiWindow) {
|
||||
pauseNativeThread();
|
||||
}
|
||||
@@ -319,6 +315,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
protected void onResume() {
|
||||
Log.v(TAG, "onResume()");
|
||||
super.onResume();
|
||||
|
||||
if (mHIDDeviceManager != null) {
|
||||
mHIDDeviceManager.setFrozen(false);
|
||||
}
|
||||
if (!mHasMultiWindow) {
|
||||
resumeNativeThread();
|
||||
}
|
||||
@@ -730,7 +730,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
}
|
||||
}
|
||||
|
||||
if (bShouldWait) {
|
||||
if (bShouldWait && (SDLActivity.getContext() != null)) {
|
||||
// We'll wait for the surfaceChanged() method, which will notify us
|
||||
// when called. That way, we know our current size is really the
|
||||
// size we need, instead of grabbing a size that's still got
|
||||
@@ -783,6 +783,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
public static native void nativeSetenv(String name, String value);
|
||||
public static native void onNativeOrientationChanged(int orientation);
|
||||
public static native void nativeAddTouch(int touchId, String name);
|
||||
public static native void nativePermissionResult(int requestCode, boolean result);
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
@@ -817,39 +818,62 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
*/
|
||||
public void setOrientationBis(int w, int h, boolean resizable, String hint)
|
||||
{
|
||||
int orientation = -1;
|
||||
int orientation_landscape = -1;
|
||||
int orientation_portrait = -1;
|
||||
|
||||
/* If set, hint "explicitly controls which UI orientations are allowed". */
|
||||
if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
} else if (hint.contains("LandscapeRight")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
|
||||
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
|
||||
} else if (hint.contains("LandscapeLeft")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
|
||||
} else if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
|
||||
} else if (hint.contains("Portrait")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||
} else if (hint.contains("PortraitUpsideDown")) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
|
||||
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
|
||||
}
|
||||
|
||||
/* no valid hint */
|
||||
if (orientation == -1) {
|
||||
if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
|
||||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
|
||||
} else if (hint.contains("Portrait")) {
|
||||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
|
||||
} else if (hint.contains("PortraitUpsideDown")) {
|
||||
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
|
||||
}
|
||||
|
||||
boolean is_landscape_allowed = (orientation_landscape == -1 ? false : true);
|
||||
boolean is_portrait_allowed = (orientation_portrait == -1 ? false : true);
|
||||
int req = -1; /* Requested orientation */
|
||||
|
||||
/* No valid hint, nothing is explicitly allowed */
|
||||
if (!is_portrait_allowed && !is_landscape_allowed) {
|
||||
if (resizable) {
|
||||
/* no fixed orientation */
|
||||
/* All orientations are allowed */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
} else {
|
||||
if (w > h) {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
/* Fixed window and nothing specified. Get orientation from w/h of created window */
|
||||
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
||||
}
|
||||
} else {
|
||||
/* At least one orientation is allowed */
|
||||
if (resizable) {
|
||||
if (is_portrait_allowed && is_landscape_allowed) {
|
||||
/* hint allows both landscape and portrait, promote to full sensor */
|
||||
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
|
||||
} else {
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
|
||||
/* Use the only one allowed "orientation" */
|
||||
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
||||
}
|
||||
} else {
|
||||
/* Fixed window and both orientations are allowed. Choose one. */
|
||||
if (is_portrait_allowed && is_landscape_allowed) {
|
||||
req = (w > h ? orientation_landscape : orientation_portrait);
|
||||
} else {
|
||||
/* Use the only one allowed "orientation" */
|
||||
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log.v("SDL", "setOrientation() orientation=" + orientation + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
|
||||
if (orientation != -1) {
|
||||
mSingleton.setRequestedOrientation(orientation);
|
||||
}
|
||||
Log.v("SDL", "setOrientation() requestedOrientation=" + req + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
|
||||
mSingleton.setRequestedOrientation(req);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -976,6 +1000,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
|
||||
return true;
|
||||
}
|
||||
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -985,6 +1012,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
public static boolean isTablet() {
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
Activity activity = (Activity)getContext();
|
||||
if (activity == null) {
|
||||
return false;
|
||||
}
|
||||
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
|
||||
double dWidthInches = metrics.widthPixels / (double)metrics.xdpi;
|
||||
@@ -1000,6 +1030,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static boolean isChromebook() {
|
||||
if (getContext() == null) {
|
||||
return false;
|
||||
}
|
||||
return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
|
||||
}
|
||||
|
||||
@@ -1571,6 +1604,32 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called by SDL using JNI.
|
||||
*/
|
||||
public static void requestPermission(String permission, int requestCode) {
|
||||
if (Build.VERSION.SDK_INT < 23) {
|
||||
nativePermissionResult(requestCode, true);
|
||||
return;
|
||||
}
|
||||
|
||||
Activity activity = (Activity)getContext();
|
||||
if (activity.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) {
|
||||
activity.requestPermissions(new String[]{permission}, requestCode);
|
||||
} else {
|
||||
nativePermissionResult(requestCode, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
nativePermissionResult(requestCode, true);
|
||||
} else {
|
||||
nativePermissionResult(requestCode, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1596,7 +1655,7 @@ class SDLMain implements Runnable {
|
||||
|
||||
Log.v("SDL", "Finished main function");
|
||||
|
||||
if (SDLActivity.mSingleton.isFinishing()) {
|
||||
if (SDLActivity.mSingleton == null || SDLActivity.mSingleton.isFinishing()) {
|
||||
// Activity is already being destroyed
|
||||
} else {
|
||||
// Let's finish the Activity
|
||||
|
||||
@@ -10,12 +10,12 @@ 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)
|
||||
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)
|
||||
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 wget -O SourceHanSerifJP-Regular.otf https://github.com/adobe-fonts/source-han-serif/blob/release/SubsetOTF/JP/SourceHanSerifJP-Regular.otf?raw=true)
|
||||
endif()
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue(); /* ISys3x */
|
||||
int p2 = getCaliValue(); /* IWinMsg */
|
||||
int p3 = getCaliValue(); /* ITimer */
|
||||
@@ -18,17 +19,24 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("AliceLogo.Init %d,%d,%d,%p:\n", p1, p2, p3, var);
|
||||
}
|
||||
|
||||
void SetWaveNum() {
|
||||
static void SetWaveNum() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("AliceLogo.SetWaveNum %d,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
static void Run() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("AliceLogo.Run %d,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"Run", Run},
|
||||
{"SetWaveNum", SetWaveNum},
|
||||
};
|
||||
|
||||
const Module module_AliceLogo = {"AliceLogo", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(AliceLogo MODULE AliceLogo.c)
|
||||
|
||||
install(TARGETS AliceLogo DESTINATION lib/xsystem35)
|
||||
+89
-30
@@ -1,33 +1,92 @@
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
if (APPLE)
|
||||
add_link_options("SHELL:-undefined dynamic_lookup")
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src)
|
||||
|
||||
add_subdirectory(lib)
|
||||
|
||||
add_subdirectory(AliceLogo)
|
||||
add_subdirectory(Confirm)
|
||||
add_subdirectory(Gpx)
|
||||
add_subdirectory(Math)
|
||||
add_subdirectory(MsgSkip)
|
||||
add_subdirectory(NIGHTDLL)
|
||||
add_subdirectory(NightDemonDemo)
|
||||
add_subdirectory(RandMT)
|
||||
add_subdirectory(SACT)
|
||||
add_subdirectory(ShArray)
|
||||
add_subdirectory(ShCalc)
|
||||
add_subdirectory(ShGraph)
|
||||
add_subdirectory(ShPort)
|
||||
add_subdirectory(ShSound)
|
||||
add_subdirectory(ShString)
|
||||
add_subdirectory(dDemo)
|
||||
add_subdirectory(eDemo)
|
||||
add_subdirectory(eeDemo)
|
||||
add_subdirectory(nDEMO)
|
||||
add_subdirectory(nDEMOE)
|
||||
add_subdirectory(oDEMO)
|
||||
add_subdirectory(oujimisc)
|
||||
add_subdirectory(tDemo)
|
||||
add_library(modules STATIC
|
||||
modules.c
|
||||
AliceLogo/AliceLogo.c
|
||||
Confirm/Confirm.c
|
||||
Gpx/Gpx.c
|
||||
Gpx/effectcopy.c
|
||||
Math/Math.c
|
||||
MsgSkip/MsgSkip.c
|
||||
NIGHTDLL/NIGHTDLL.c
|
||||
NIGHTDLL/nt_scenario.c
|
||||
NIGHTDLL/sactcg.c
|
||||
NIGHTDLL/sactstring.c
|
||||
NIGHTDLL/sprite.c
|
||||
NIGHTDLL/sprite_draw.c
|
||||
NIGHTDLL/sprite_update.c
|
||||
NIGHTDLL/sprite_eupdate.c
|
||||
NIGHTDLL/nt_event.c
|
||||
NIGHTDLL/nt_msg.c
|
||||
NIGHTDLL/nt_sel.c
|
||||
NIGHTDLL/nt_graph.c
|
||||
NIGHTDLL/nt_sound.c
|
||||
NightDemonDemo/NightDemonDemo.c
|
||||
RandMT/RandMT.c
|
||||
SACT/SACT.c
|
||||
SACT/sactcg.c
|
||||
SACT/sactsound.c
|
||||
SACT/sactbgm.c
|
||||
SACT/sacttimer.c
|
||||
SACT/sactstring.c
|
||||
SACT/sactcrypto.c
|
||||
SACT/sactchart.c
|
||||
SACT/sactamask.c
|
||||
SACT/sactlog.c
|
||||
SACT/sprite.c
|
||||
SACT/sprite_event.c
|
||||
SACT/sprite_tevent.c
|
||||
SACT/sprite_move.c
|
||||
SACT/sprite_anime.c
|
||||
SACT/sprite_get.c
|
||||
SACT/sprite_put.c
|
||||
SACT/sprite_switch.c
|
||||
SACT/sprite_sel.c
|
||||
SACT/sprite_msg.c
|
||||
SACT/sprite_draw.c
|
||||
SACT/sprite_update.c
|
||||
SACT/sprite_eupdate.c
|
||||
SACT/sprite_quake.c
|
||||
SACT/sprite_keywait.c
|
||||
SACT/screen_quake.c
|
||||
SACT/sprite_xmenu.c
|
||||
ShArray/ShArray.c
|
||||
ShCalc/ShCalc.c
|
||||
ShGraph/ShGraph.c
|
||||
ShPort/ShPort.c
|
||||
ShSound/ShSound.c
|
||||
ShString/ShString.c
|
||||
dDemo/dDemo.c
|
||||
eDemo/eDemo.c
|
||||
eeDemo/eeDemo.c
|
||||
nDEMO/nDEMO.c
|
||||
nDEMOE/nDEMOE.c
|
||||
oDEMO/oDEMO.c
|
||||
oujimisc/oujimisc.c
|
||||
tDemo/tDemo.c
|
||||
)
|
||||
|
||||
target_include_directories(modules PUBLIC .)
|
||||
|
||||
target_compile_options(modules PRIVATE -Wno-pointer-sign -Wno-invalid-source-encoding)
|
||||
target_link_libraries(modules PRIVATE graph alk drawtext list)
|
||||
|
||||
if (SDL2MIXER_FOUND)
|
||||
if (ANDROID)
|
||||
target_link_libraries(modules PRIVATE SDL2 SDL2_mixer)
|
||||
else()
|
||||
target_link_libraries(modules PRIVATE PkgConfig::SDL2MIXER)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindJPEG)
|
||||
if (JPEG_FOUND)
|
||||
target_compile_definitions(modules PRIVATE HAVE_JPEG)
|
||||
target_sources(modules PRIVATE
|
||||
NightDemonDemo/ndd.c
|
||||
NightDemonDemo/jpeg2surface.c
|
||||
)
|
||||
target_link_libraries(modules PRIVATE JPEG::JPEG)
|
||||
endif()
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(Confirm MODULE Confirm.c)
|
||||
|
||||
install(TARGETS Confirm DESTINATION lib/xsystem35)
|
||||
@@ -5,14 +5,15 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("Confirm.Init %d:\n", p1);
|
||||
}
|
||||
|
||||
void ExistKeyFile() {
|
||||
static void ExistKeyFile() {
|
||||
char *p1 = sys_getString(0);
|
||||
int *p2 = getCaliVariable();
|
||||
int *var = getCaliVariable();
|
||||
@@ -22,7 +23,7 @@ void ExistKeyFile() {
|
||||
DEBUG_COMMAND_YET("Confirm.ExistKeyFile %s,%p,%p:\n",p1, p2, var);
|
||||
}
|
||||
|
||||
void CheckProtectFile() {
|
||||
static void CheckProtectFile() {
|
||||
char *p1 = sys_getString(0);
|
||||
int *p2 = getCaliVariable();
|
||||
int *var = getCaliVariable();
|
||||
@@ -32,7 +33,7 @@ void CheckProtectFile() {
|
||||
DEBUG_COMMAND_YET("Confirm.CheckProtectFile %s,%p,%p:\n", p1,p2,var);
|
||||
}
|
||||
|
||||
void CreateKeyFile() {
|
||||
static void CreateKeyFile() {
|
||||
char *p1 = sys_getString(0);
|
||||
int *p2 = getCaliVariable();
|
||||
int *var = getCaliVariable();
|
||||
@@ -41,3 +42,12 @@ void CreateKeyFile() {
|
||||
|
||||
DEBUG_COMMAND_YET("Confirm.CreateKeyFile %s,%p,%p:\n", p1,p2,var);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"CheckProtectFile", CheckProtectFile},
|
||||
{"CreateKeyFile", CreateKeyFile},
|
||||
{"ExistKeyFile", ExistKeyFile},
|
||||
{"Init", Init},
|
||||
};
|
||||
|
||||
const Module module_Confirm = {"Confirm", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
add_library(Gpx MODULE Gpx.c effectcopy.c)
|
||||
|
||||
target_link_libraries(Gpx PRIVATE graph)
|
||||
|
||||
install(TARGETS Gpx DESTINATION lib/xsystem35)
|
||||
+112
-54
@@ -33,6 +33,7 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
#include "ags.h"
|
||||
#include "cg.h"
|
||||
@@ -125,7 +126,7 @@ static int load_cg_main(int no) {
|
||||
return sf->no;
|
||||
}
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
/*
|
||||
Gpx.Init(): Gpx モジュールの初期化
|
||||
*/
|
||||
@@ -140,7 +141,7 @@ void Init() {
|
||||
DEBUG_COMMAND("Gpx.Init %d:\n", p1);
|
||||
}
|
||||
|
||||
void Create() {
|
||||
static void Create() {
|
||||
/*
|
||||
Gpx.Create(): 新規 surface の作成(PixelとAlphaマップの両方)
|
||||
|
||||
@@ -171,7 +172,7 @@ void Create() {
|
||||
DEBUG_COMMAND("Gpx.Create %p,%d,%d,%d:\n", var, width, height, bpp);
|
||||
}
|
||||
|
||||
void CreatePixelOnly() {
|
||||
static void CreatePixelOnly() {
|
||||
/*
|
||||
Gpx.CreatePixelOnly(): 新規 surface の作成(Pixelのみ)
|
||||
|
||||
@@ -199,7 +200,7 @@ void CreatePixelOnly() {
|
||||
DEBUG_COMMAND("Gpx.CreatePixelOnly %d,%d,%d,%d:\n", *var, width, height, bpp);
|
||||
}
|
||||
|
||||
void CreateAMapOnly() {
|
||||
static void CreateAMapOnly() {
|
||||
/*
|
||||
Gpx.CreateAMapOnly(): 新規 surface の作成(AlphaMapのみ)
|
||||
|
||||
@@ -225,7 +226,7 @@ void CreateAMapOnly() {
|
||||
DEBUG_COMMAND("Gpx.CreateAMapOnly %p,%d,%d:\n", var, width, height);
|
||||
}
|
||||
|
||||
void IsSurface() {
|
||||
static void IsSurface() {
|
||||
/*
|
||||
Gpx.IsSurface(): 指定の番号の surface が surface かどうか
|
||||
(pixel と alpha の両方のデータを持つ)を調べる
|
||||
@@ -248,7 +249,7 @@ void IsSurface() {
|
||||
DEBUG_COMMAND("Gpx.IsSurface %d,%p:\n", p1, var);
|
||||
}
|
||||
|
||||
void IsPixel() {
|
||||
static void IsPixel() {
|
||||
/*
|
||||
Gpx.IsPixel(): 指定の番号の surface が pixelデータかどうかを調べる
|
||||
|
||||
@@ -270,7 +271,7 @@ void IsPixel() {
|
||||
DEBUG_COMMAND("Gpx.IsPixel %d,%p:\n", p1, var);
|
||||
}
|
||||
|
||||
void IsAlpha() {
|
||||
static void IsAlpha() {
|
||||
/*
|
||||
Gpx.IsAlpha(): 指定の番号の surface が alpha mapかどうかを調べる
|
||||
|
||||
@@ -292,7 +293,7 @@ void IsAlpha() {
|
||||
DEBUG_COMMAND("Gpx.IsAlpha %d,%p:\n", p1, var);
|
||||
}
|
||||
|
||||
void GetWidth() {
|
||||
static void GetWidth() {
|
||||
/*
|
||||
Gpx.GetWidth(): 指定の番号の surface の幅を取得する
|
||||
|
||||
@@ -314,7 +315,7 @@ void GetWidth() {
|
||||
DEBUG_COMMAND("Gpx.GetWidth %d,%d:\n", p1, *var);
|
||||
}
|
||||
|
||||
void GetHeight() {
|
||||
static void GetHeight() {
|
||||
/*
|
||||
Gpx.GetWidth(): 指定の番号の surface の高さを取得する
|
||||
|
||||
@@ -336,13 +337,13 @@ void GetHeight() {
|
||||
DEBUG_COMMAND("Gpx.GetHeight %d,%d:\n", p1, *var);
|
||||
}
|
||||
|
||||
void GetCreatedSurface() { /* not used ? */
|
||||
static void GetCreatedSurface() { /* not used ? */
|
||||
int *var = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("Gpx.GetCreatedSurface %p:\n", var);
|
||||
}
|
||||
|
||||
void LoadCG() {
|
||||
static void LoadCG() {
|
||||
/*
|
||||
Gpx.LoadCG(): 新規 surface を作成してその上に CG を load
|
||||
|
||||
@@ -357,21 +358,21 @@ void LoadCG() {
|
||||
DEBUG_COMMAND("Gpx.LoadCG %p,%d (%d):\n", var, p1, *var);
|
||||
}
|
||||
|
||||
void GetCGPosX() { /* not useed ? */
|
||||
static void GetCGPosX() { /* not useed ? */
|
||||
int *var = getCaliVariable();
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("Gpx.GetCgPosX %p,%d:\n", var, p1);
|
||||
}
|
||||
|
||||
void GetCGPosY() { /* not useed ? */
|
||||
static void GetCGPosY() { /* not useed ? */
|
||||
int *var = getCaliVariable();
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("Gpx.GetCgPosY %p,%d:\n", var, p1);
|
||||
}
|
||||
|
||||
void Free() {
|
||||
static void Free() {
|
||||
/*
|
||||
Gpx.Free(): 指定の surface を開放する
|
||||
|
||||
@@ -386,7 +387,7 @@ void Free() {
|
||||
}
|
||||
}
|
||||
|
||||
void FreeAll() {
|
||||
static void FreeAll() {
|
||||
/*
|
||||
Gpx.FreeAll(): 全ての surface を開放する
|
||||
*/
|
||||
@@ -395,7 +396,7 @@ void FreeAll() {
|
||||
DEBUG_COMMAND("Gpx.FreeAll:\n");
|
||||
}
|
||||
|
||||
void Copy() {
|
||||
static void Copy() {
|
||||
/*
|
||||
Gpx.Copy(): 指定 surface 領域のコピー
|
||||
|
||||
@@ -426,7 +427,7 @@ void Copy() {
|
||||
gr_copy(dst, dx, dy, src, sx, sy, sw, sh);
|
||||
}
|
||||
|
||||
void CopyBright() { /* not used ? */
|
||||
static void CopyBright() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -440,7 +441,7 @@ void CopyBright() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.CopyBright %d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9);
|
||||
}
|
||||
|
||||
void CopyAMap() {
|
||||
static void CopyAMap() {
|
||||
/*
|
||||
Gpx.CopyAMap(): 指定 surface の alpha map 領域のコピー
|
||||
|
||||
@@ -471,7 +472,7 @@ void CopyAMap() {
|
||||
gr_copy_alpha_map(dst, dx, dy, src, sx, sy, sw, sh);
|
||||
}
|
||||
|
||||
void Blend() { /* not used ? */
|
||||
static void Blend() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -485,7 +486,7 @@ void Blend() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.Blend %d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9);
|
||||
}
|
||||
|
||||
void BlendSrcBright() { /* not used ? */
|
||||
static void BlendSrcBright() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -500,7 +501,7 @@ void BlendSrcBright() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendSrcBright %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
|
||||
}
|
||||
|
||||
void BlendAddSatur() { /* not used ? */
|
||||
static void BlendAddSatur() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -513,7 +514,7 @@ void BlendAddSatur() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendAddStatur %d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
void BlendAMap() {
|
||||
static void BlendAMap() {
|
||||
/*
|
||||
Gpx.BlendAMap(): 転送元の alpha map を参照して 指定領域を alpha blend
|
||||
|
||||
@@ -544,7 +545,7 @@ void BlendAMap() {
|
||||
gr_blend_alpha_map(dst, dx, dy, src, sx, sy, sw, sh);
|
||||
}
|
||||
|
||||
void BlendAMapSrcOnly() { /* not used ? */
|
||||
static void BlendAMapSrcOnly() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -557,7 +558,7 @@ void BlendAMapSrcOnly() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendAMapSrcOnly %d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
void BlendAMapColor() { /* not used ? */
|
||||
static void BlendAMapColor() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -573,7 +574,7 @@ void BlendAMapColor() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendAMapColor %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
|
||||
}
|
||||
|
||||
void BlendAMapColorAlpha() { /* not used ? */
|
||||
static void BlendAMapColorAlpha() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -590,7 +591,7 @@ void BlendAMapColorAlpha() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendAMapColorAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
|
||||
}
|
||||
|
||||
void BlendAMapAlpha() { /* not used ? */
|
||||
static void BlendAMapAlpha() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -604,7 +605,7 @@ void BlendAMapAlpha() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendAMapAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9);
|
||||
}
|
||||
|
||||
void BlendAMapBright() { /* not used ? */
|
||||
static void BlendAMapBright() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -618,7 +619,7 @@ void BlendAMapBright() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendAMapBright %d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9);
|
||||
}
|
||||
|
||||
void BlendAMapAlphaSrcBright() { /* not used ? */
|
||||
static void BlendAMapAlphaSrcBright() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -633,7 +634,7 @@ void BlendAMapAlphaSrcBright() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendAMapBright %d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
|
||||
}
|
||||
|
||||
void BlendUseAMapColor() { /* not used ? */
|
||||
static void BlendUseAMapColor() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -650,7 +651,7 @@ void BlendUseAMapColor() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendUseAMapColor %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
|
||||
}
|
||||
|
||||
void BlendScreen() { /* not used ? */
|
||||
static void BlendScreen() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -663,7 +664,7 @@ void BlendScreen() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendScreen %d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
void BlendMultiply() { /* not used ? */
|
||||
static void BlendMultiply() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -676,7 +677,7 @@ void BlendMultiply() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendMultiply %d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
void BlendScreenAlpha() { /* not used ? */
|
||||
static void BlendScreenAlpha() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -690,7 +691,7 @@ void BlendScreenAlpha() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.BlendScreenAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9);
|
||||
}
|
||||
|
||||
void Fill() {
|
||||
static void Fill() {
|
||||
/*
|
||||
Gpx.Fill(): 指定領域の塗りつぶし
|
||||
|
||||
@@ -720,7 +721,7 @@ void Fill() {
|
||||
gr_fill(dst, dx, dy, dw, dh, r, g, b);
|
||||
}
|
||||
|
||||
void FillAlphaColor() { /* not used ? */
|
||||
static void FillAlphaColor() { /* not used ? */
|
||||
int ds = getCaliValue();
|
||||
int dx = getCaliValue();
|
||||
int dy = getCaliValue();
|
||||
@@ -739,7 +740,7 @@ void FillAlphaColor() { /* not used ? */
|
||||
gr_fill_alpha_color(dst, dx, dy, dw, dh, r, g, b, lv);
|
||||
}
|
||||
|
||||
void FillAMap() { /* not used ? */
|
||||
static void FillAMap() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -750,7 +751,7 @@ void FillAMap() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.FillAMap %d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6);
|
||||
}
|
||||
|
||||
void FillAMapOverBorder() {
|
||||
static void FillAMapOverBorder() {
|
||||
/*
|
||||
Gpx.FillAMapOverBorder(): 矩形領域中の 閾値以上の alpha 値を持つ
|
||||
ものを指定の alpha 値に置き換え。
|
||||
@@ -772,13 +773,13 @@ void FillAMapOverBorder() {
|
||||
int d = getCaliValue();
|
||||
surface_t *dst;
|
||||
|
||||
DEBUG_COMMAND("Gpx.BlendAMapOverBorder %d,%d,%d,%d,%d,%d,%d:\n", ds, dx, dy, dw, dh, s, d);
|
||||
DEBUG_COMMAND("Gpx.FillAMapOverBorder %d,%d,%d,%d,%d,%d,%d:\n", ds, dx, dy, dw, dh, s, d);
|
||||
|
||||
dst = sf_get(ds);
|
||||
gr_fill_alpha_overborder(dst, dx, dy, dw, dh, s, d);
|
||||
}
|
||||
|
||||
void FillAMapUnderBorder() { /* not used ? */
|
||||
static void FillAMapUnderBorder() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -787,10 +788,10 @@ void FillAMapUnderBorder() { /* not used ? */
|
||||
int p6 = getCaliValue();
|
||||
int p7 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("Gpx.BlendAMapUnderBorder %d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7);
|
||||
DEBUG_COMMAND_YET("Gpx.FillAMapUnderBorder %d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
void SaturDP_DPxSA() { /* not used ? */
|
||||
static void SaturDP_DPxSA() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -803,7 +804,7 @@ void SaturDP_DPxSA() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.SaturDP_DPxSA %d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
void ScreenDA_DAxSA() { /* not used ? */
|
||||
static void ScreenDA_DAxSA() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -816,7 +817,7 @@ void ScreenDA_DAxSA() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.ScreenDA_DAxSA %d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
void AddDA_DAxSA() { /* not used ? */
|
||||
static void AddDA_DAxSA() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -829,7 +830,7 @@ void AddDA_DAxSA() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.AddDA_DAxSA %d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
void SpriteCopyAMap() {
|
||||
static void SpriteCopyAMap() {
|
||||
/*
|
||||
Gpx.SpriteCopyAMap(): 指定の alpha 値以外の領域の alpha map コピー
|
||||
|
||||
@@ -863,7 +864,7 @@ void SpriteCopyAMap() {
|
||||
|
||||
}
|
||||
|
||||
void BrightDestOnly() {
|
||||
static void BrightDestOnly() {
|
||||
/*
|
||||
Gpx.BrightDestOnly(): 指定領域の明るさを設定
|
||||
|
||||
@@ -890,7 +891,7 @@ void BrightDestOnly() {
|
||||
gr_bright_dst_only(dst, dx, dy, dw, dh, r);
|
||||
}
|
||||
|
||||
void CopyTextureWrap() { /* not used ? */
|
||||
static void CopyTextureWrap() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -907,7 +908,7 @@ void CopyTextureWrap() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.CopyTextureWrap %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
|
||||
}
|
||||
|
||||
void CopyTextureWrapAlpha() { /* not used ? */
|
||||
static void CopyTextureWrapAlpha() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -925,7 +926,7 @@ void CopyTextureWrapAlpha() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.CopyTextureWrapAlpha %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
|
||||
}
|
||||
|
||||
void CopyStretch() {
|
||||
static void CopyStretch() {
|
||||
/*
|
||||
Gpx.CopyStretch(): 拡大・縮小
|
||||
|
||||
@@ -959,7 +960,7 @@ void CopyStretch() {
|
||||
gr_copy_stretch(dst, dx, dy, dw, dh, src, sx, sy, sw, sh);
|
||||
}
|
||||
|
||||
void CopyStretchBlend() { /* not used ? */
|
||||
static void CopyStretchBlend() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -975,7 +976,7 @@ void CopyStretchBlend() { /* not used ? */
|
||||
DEBUG_COMMAND_YET("Gpx.CopyStretchBlend %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
|
||||
}
|
||||
|
||||
void CopyStretchBlendAMap() {
|
||||
static void CopyStretchBlendAMap() {
|
||||
/*
|
||||
Gpx.CopyStretchBlendAMap(): 拡大・縮小しながら alpha blend
|
||||
|
||||
@@ -1010,7 +1011,7 @@ void CopyStretchBlendAMap() {
|
||||
gr_copy_stretch_blend_alpha_map(dst, dx, dy, dw, dh, src, sx, sy, sw, sh);
|
||||
}
|
||||
|
||||
void StretchBlendScreen2x2() { /* not used ? */
|
||||
static void StretchBlendScreen2x2() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -1024,7 +1025,7 @@ void StretchBlendScreen2x2() { /* not used ? */
|
||||
}
|
||||
|
||||
|
||||
void StretchBlendScreen2x2WDS() {
|
||||
static void StretchBlendScreen2x2WDS() {
|
||||
/*
|
||||
Gpx.StretchBlenfScreen2x2WDS(): 2枚の surface を縦横2倍に拡大しつつ
|
||||
alpha blend (飽和加算)する
|
||||
@@ -1063,7 +1064,7 @@ void StretchBlendScreen2x2WDS() {
|
||||
gr_blend_alpha_wds_stretch2x2(src1, sx1, sy1, src2, sx2, sy2, sw, sh, dst, dx, dy);
|
||||
}
|
||||
|
||||
void BlendScreenWDS() {
|
||||
static void BlendScreenWDS() {
|
||||
/*
|
||||
Gpx.BlendScreenWDS(): 飽和加算 alpha blend
|
||||
|
||||
@@ -1101,7 +1102,7 @@ void BlendScreenWDS() {
|
||||
gr_blend_alpha_wds(src1, sx1, sy1, src2, sx2, sy2, sw, sh, dst, dx, dy);
|
||||
}
|
||||
|
||||
void EffectCopy() {
|
||||
static void EffectCopy() {
|
||||
/*
|
||||
Gpx.EffectCopy(): 効果つき領域コピー
|
||||
|
||||
@@ -1169,8 +1170,65 @@ void EffectCopy() {
|
||||
|
||||
}
|
||||
|
||||
void SetClickCancelFlag() { /* not used ? */
|
||||
static void SetClickCancelFlag() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("Gpx.SetClikCancelFlag %d:\n", p1);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"AddDA_DAxSA", AddDA_DAxSA},
|
||||
{"Blend", Blend},
|
||||
{"BlendAMap", BlendAMap},
|
||||
{"BlendAMapAlpha", BlendAMapAlpha},
|
||||
{"BlendAMapAlphaSrcBright", BlendAMapAlphaSrcBright},
|
||||
{"BlendAMapBright", BlendAMapBright},
|
||||
{"BlendAMapColor", BlendAMapColor},
|
||||
{"BlendAMapColorAlpha", BlendAMapColorAlpha},
|
||||
{"BlendAMapSrcOnly", BlendAMapSrcOnly},
|
||||
{"BlendAddSatur", BlendAddSatur},
|
||||
{"BlendMultiply", BlendMultiply},
|
||||
{"BlendScreen", BlendScreen},
|
||||
{"BlendScreenAlpha", BlendScreenAlpha},
|
||||
{"BlendScreenWDS", BlendScreenWDS},
|
||||
{"BlendSrcBright", BlendSrcBright},
|
||||
{"BlendUseAMapColor", BlendUseAMapColor},
|
||||
{"BrightDestOnly", BrightDestOnly},
|
||||
{"Copy", Copy},
|
||||
{"CopyAMap", CopyAMap},
|
||||
{"CopyBright", CopyBright},
|
||||
{"CopyStretch", CopyStretch},
|
||||
{"CopyStretchBlend", CopyStretchBlend},
|
||||
{"CopyStretchBlendAMap", CopyStretchBlendAMap},
|
||||
{"CopyTextureWrap", CopyTextureWrap},
|
||||
{"CopyTextureWrapAlpha", CopyTextureWrapAlpha},
|
||||
{"Create", Create},
|
||||
{"CreateAMapOnly", CreateAMapOnly},
|
||||
{"CreatePixelOnly", CreatePixelOnly},
|
||||
{"EffectCopy", EffectCopy},
|
||||
{"Fill", Fill},
|
||||
{"FillAMap", FillAMap},
|
||||
{"FillAMapOverBorder", FillAMapOverBorder},
|
||||
{"FillAMapUnderBorder", FillAMapUnderBorder},
|
||||
{"FillAlphaColor", FillAlphaColor},
|
||||
{"Free", Free},
|
||||
{"FreeAll", FreeAll},
|
||||
{"GetCGPosX", GetCGPosX},
|
||||
{"GetCGPosY", GetCGPosY},
|
||||
{"GetCreatedSurface", GetCreatedSurface},
|
||||
{"GetHeight", GetHeight},
|
||||
{"GetWidth", GetWidth},
|
||||
{"Init", Init},
|
||||
{"IsAlpha", IsAlpha},
|
||||
{"IsPixel", IsPixel},
|
||||
{"IsSurface", IsSurface},
|
||||
{"LoadCG", LoadCG},
|
||||
{"SaturDP_DPxSA", SaturDP_DPxSA},
|
||||
{"ScreenDA_DAxSA", ScreenDA_DAxSA},
|
||||
{"SetClickCancelFlag", SetClickCancelFlag},
|
||||
{"SpriteCopyAMap", SpriteCopyAMap},
|
||||
{"StretchBlendScreen2x2", StretchBlendScreen2x2},
|
||||
{"StretchBlendScreen2x2WDS", StretchBlendScreen2x2WDS},
|
||||
};
|
||||
|
||||
const Module module_Gpx = {"Gpx", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(Math MODULE Math.c)
|
||||
|
||||
install(TARGETS Math DESTINATION lib/xsystem35)
|
||||
+14
-4
@@ -28,12 +28,13 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
#include "randMT.h"
|
||||
|
||||
static int numtblmax;
|
||||
|
||||
void RandMTInit() {
|
||||
static void RandMTInit() {
|
||||
/*
|
||||
(おそらく Mersenne Twister使用の) 乱数初期化
|
||||
|
||||
@@ -44,7 +45,7 @@ void RandMTInit() {
|
||||
DEBUG_COMMAND("Math.RandMTInit %d:\n", p1);
|
||||
}
|
||||
|
||||
void RandMTGet() {
|
||||
static void RandMTGet() {
|
||||
/*
|
||||
1 から num までの乱数を生成
|
||||
|
||||
@@ -63,7 +64,7 @@ void RandMTGet() {
|
||||
DEBUG_COMMAND("Math.RandMTGet %d,%p:\n", num, var);
|
||||
}
|
||||
|
||||
void RandMTMakeNumTable() {
|
||||
static void RandMTMakeNumTable() {
|
||||
/*
|
||||
乱数テーブルの最大値を設定
|
||||
|
||||
@@ -76,7 +77,7 @@ void RandMTMakeNumTable() {
|
||||
DEBUG_COMMAND("Math.RandMTMakeNumTable %d:\n", p1);
|
||||
}
|
||||
|
||||
void RandMTGetNumTable() {
|
||||
static void RandMTGetNumTable() {
|
||||
/*
|
||||
乱数テーブルから値を取得
|
||||
|
||||
@@ -88,3 +89,12 @@ void RandMTGetNumTable() {
|
||||
|
||||
DEBUG_COMMAND("Math.RandMTGetNumTable %d:\n", *var);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"RandMTGet", RandMTGet},
|
||||
{"RandMTGetNumTable", RandMTGetNumTable},
|
||||
{"RandMTInit", RandMTInit},
|
||||
{"RandMTMakeNumTable", RandMTMakeNumTable},
|
||||
};
|
||||
|
||||
const Module module_Math = {"Math", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(MsgSkip MODULE MsgSkip.c)
|
||||
|
||||
install(TARGETS MsgSkip DESTINATION lib/xsystem35)
|
||||
@@ -6,12 +6,13 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
#include "message.h"
|
||||
|
||||
static char *msgskipfile;
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int *p1 = getCaliVariable();
|
||||
int p2 = getCaliValue(); /* ISys3x */
|
||||
int p3 = getCaliValue();
|
||||
@@ -21,7 +22,7 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("MsgSkip.Init %p,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
void Start() {
|
||||
static void Start() {
|
||||
int *p1 = getCaliVariable();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
@@ -30,40 +31,52 @@ void Start() {
|
||||
DEBUG_COMMAND_YET("MsgSkip.Start %p,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void SetValid() {
|
||||
static void SetValid() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
|
||||
DEBUG_COMMAND("MsgSkip.SetValid %d:\n", p1);
|
||||
}
|
||||
|
||||
void GetValid() {
|
||||
static void GetValid() {
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.GetValid %p:\n", p1);
|
||||
}
|
||||
|
||||
void SetAction() {
|
||||
static void SetAction() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND("MsgSkip.SetAcion %d:\n", p1);
|
||||
}
|
||||
|
||||
void GetAction() {
|
||||
static void GetAction() {
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.GetAcion %p:\n", p1);
|
||||
}
|
||||
|
||||
void PushStr() {
|
||||
static void PushStr() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.PushStr %d:\n", p1);
|
||||
}
|
||||
|
||||
void PopStr() {
|
||||
static void PopStr() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("MsgSkip.PopStr %d:\n", p1);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"GetAction", GetAction},
|
||||
{"GetValid", GetValid},
|
||||
{"Init", Init},
|
||||
{"PopStr", PopStr},
|
||||
{"PushStr", PushStr},
|
||||
{"SetAction", SetAction},
|
||||
{"SetValid", SetValid},
|
||||
{"Start", Start},
|
||||
};
|
||||
|
||||
const Module module_MsgSkip = {"MsgSkip", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
add_library(NIGHTDLL MODULE
|
||||
NIGHTDLL.c
|
||||
nt_scenario.c
|
||||
sactcg.c
|
||||
sactstring.c
|
||||
sprite.c
|
||||
sprite_draw.c
|
||||
sprite_update.c
|
||||
sprite_eupdate.c
|
||||
nt_event.c
|
||||
nt_msg.c
|
||||
nt_sel.c
|
||||
nt_graph.c
|
||||
nt_sound.c
|
||||
)
|
||||
|
||||
target_compile_options(NIGHTDLL PRIVATE -Wno-pointer-sign -Wno-invalid-source-encoding)
|
||||
|
||||
target_link_libraries(NIGHTDLL PRIVATE graph drawtext list)
|
||||
|
||||
install(TARGETS NIGHTDLL DESTINATION lib/xsystem35)
|
||||
+142
-69
@@ -5,6 +5,7 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
#include "night.h"
|
||||
#include "nt_sound.h"
|
||||
@@ -19,7 +20,7 @@
|
||||
night_t nightprv;
|
||||
|
||||
|
||||
void Init(void) { /* 0 */
|
||||
static void Init(void) { /* 0 */
|
||||
int *var = getCaliVariable();
|
||||
int p1 = getCaliValue(); /* ISys3xCG */
|
||||
int p2 = getCaliValue(); /* ISys3xDIB */
|
||||
@@ -37,7 +38,7 @@ void Init(void) { /* 0 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.Init %p:\n", var);
|
||||
}
|
||||
|
||||
void InitGame() { /* 1 */
|
||||
static void InitGame() { /* 1 */
|
||||
nact->ags.font->antialiase_on = TRUE;
|
||||
sys_setHankakuMode(2);
|
||||
|
||||
@@ -47,13 +48,13 @@ void InitGame() { /* 1 */
|
||||
|
||||
nt_gr_init();
|
||||
ntmsg_init();
|
||||
sstr_init();
|
||||
nt_sstr_init();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.InitGame:\n");
|
||||
}
|
||||
|
||||
// メッセージの枠の表示
|
||||
void SetMsgFrame() { /* 2 */
|
||||
static void SetMsgFrame() { /* 2 */
|
||||
int p1 = getCaliValue(); // 0=枠消去, 1=枠あり, 2=中央
|
||||
|
||||
ntmsg_set_frame(p1);
|
||||
@@ -62,7 +63,7 @@ void SetMsgFrame() { /* 2 */
|
||||
}
|
||||
|
||||
// メッセージの表示位置の設定
|
||||
void SetMsgPlaceMethod(void) { /* 3 */
|
||||
static void SetMsgPlaceMethod(void) { /* 3 */
|
||||
int p1 = getCaliValue(); // 0=メッセージ枠内, 1=中央,
|
||||
// 2=メッセージ枠+顔つき
|
||||
ntmsg_set_place(p1);
|
||||
@@ -71,21 +72,21 @@ void SetMsgPlaceMethod(void) { /* 3 */
|
||||
}
|
||||
|
||||
// 未実装?
|
||||
void SetMsgDrawEffect(void) { /* 4 */
|
||||
static void SetMsgDrawEffect(void) { /* 4 */
|
||||
int p1 = getCaliValue(); // 0, 1, 2, 3 (実際にはどれも機能しない?)
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SetMsgDrawEffect %d:\n", p1);
|
||||
}
|
||||
|
||||
// 未実装?
|
||||
void SetMsgClearEffect(void) { /* 5 */
|
||||
static void SetMsgClearEffect(void) { /* 5 */
|
||||
int p1 = getCaliValue(); // 0, 1, 2, 4 (実際にはどれも機能しない?)
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SetMsgClearEffect %d:\n", p1);
|
||||
}
|
||||
|
||||
// 壁紙CGの設定
|
||||
void SetWallPaper(void) { /* 6 */
|
||||
static void SetWallPaper(void) { /* 6 */
|
||||
int p1 = getCaliValue(); // 壁紙CG番号
|
||||
|
||||
nt_gr_set_wallpaper(p1);
|
||||
@@ -94,7 +95,7 @@ void SetWallPaper(void) { /* 6 */
|
||||
}
|
||||
|
||||
// 背景CGの設定
|
||||
void SetScenery(void) { /* 7 */
|
||||
static void SetScenery(void) { /* 7 */
|
||||
int p1 = getCaliValue(); // 背景GC番号
|
||||
|
||||
nt_gr_set_scenery(p1);
|
||||
@@ -103,7 +104,7 @@ void SetScenery(void) { /* 7 */
|
||||
}
|
||||
|
||||
// 顔CGの設定
|
||||
void SetFace(void) { /* 8 */
|
||||
static void SetFace(void) { /* 8 */
|
||||
int p1 = getCaliValue(); // 顔CG番号
|
||||
|
||||
nt_gr_set_face(p1);
|
||||
@@ -112,7 +113,7 @@ void SetFace(void) { /* 8 */
|
||||
}
|
||||
|
||||
// 立ち絵左の設定
|
||||
void SetSpriteL(void) { /* 9 */
|
||||
static void SetSpriteL(void) { /* 9 */
|
||||
int p1 = getCaliValue(); // 左人物スプライト番号
|
||||
|
||||
nt_gr_set_spL(p1);
|
||||
@@ -121,7 +122,7 @@ void SetSpriteL(void) { /* 9 */
|
||||
}
|
||||
|
||||
// 立ち絵中央の設定
|
||||
void SetSpriteM(void) { /* 10 */
|
||||
static void SetSpriteM(void) { /* 10 */
|
||||
int p1 = getCaliValue(); // 中央人物スプライト番号
|
||||
|
||||
nt_gr_set_spM(p1);
|
||||
@@ -130,7 +131,7 @@ void SetSpriteM(void) { /* 10 */
|
||||
}
|
||||
|
||||
// 立ち絵右の設定
|
||||
void SetSpriteR(void) { /* 11 */
|
||||
static void SetSpriteR(void) { /* 11 */
|
||||
int p1 = getCaliValue(); // 右人物スプライト番号
|
||||
|
||||
nt_gr_set_spR(p1);
|
||||
@@ -139,7 +140,7 @@ void SetSpriteR(void) { /* 11 */
|
||||
}
|
||||
|
||||
// 立ち絵左の設定(季節違い?)
|
||||
void SetSpriteSeasonL(void) { /* 12 */
|
||||
static void SetSpriteSeasonL(void) { /* 12 */
|
||||
int p1 = getCaliValue(); // 左人物スプライト番号
|
||||
|
||||
nt_gr_set_spsL(p1);
|
||||
@@ -148,7 +149,7 @@ void SetSpriteSeasonL(void) { /* 12 */
|
||||
}
|
||||
|
||||
// 立ち絵中央の設定(季節違い?)
|
||||
void SetSpriteSeasonM(void) { /* 13 */
|
||||
static void SetSpriteSeasonM(void) { /* 13 */
|
||||
int p1 = getCaliValue(); // 中央人物スプライト番号
|
||||
|
||||
nt_gr_set_spM(p1);
|
||||
@@ -157,7 +158,7 @@ void SetSpriteSeasonM(void) { /* 13 */
|
||||
}
|
||||
|
||||
// 立ち絵右の設定(季節違い?)
|
||||
void SetSpriteSeasonR(void) { /* 14 */
|
||||
static void SetSpriteSeasonR(void) { /* 14 */
|
||||
int p1 = getCaliValue(); // 右人物スプライト番号
|
||||
|
||||
nt_gr_set_spsR(p1);
|
||||
@@ -166,14 +167,14 @@ void SetSpriteSeasonR(void) { /* 14 */
|
||||
}
|
||||
|
||||
// 改行
|
||||
void StartNewLine(void) { /* 15 */
|
||||
static void StartNewLine(void) { /* 15 */
|
||||
ntmsg_newline();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.StartNewLine:\n");
|
||||
}
|
||||
|
||||
// メッセージフォントサイズの設定
|
||||
void SetFontSize(void) { /* 16 */
|
||||
static void SetFontSize(void) { /* 16 */
|
||||
int p1 = getCaliValue(); // メッセージフォントサイズ
|
||||
|
||||
night.fontsize = p1;
|
||||
@@ -182,7 +183,7 @@ void SetFontSize(void) { /* 16 */
|
||||
}
|
||||
|
||||
// フォントの種類の設定
|
||||
void SetFont(void) { /* 17 */
|
||||
static void SetFont(void) { /* 17 */
|
||||
int p1 = getCaliValue(); // 0: ゴシック, 1: 明朝
|
||||
|
||||
night.fonttype = p1;
|
||||
@@ -191,7 +192,7 @@ void SetFont(void) { /* 17 */
|
||||
}
|
||||
|
||||
// 選択肢モード ON
|
||||
void SetSelMode(void) { /* 18 */
|
||||
static void SetSelMode(void) { /* 18 */
|
||||
int p1 = getCaliValue(); // 0, 1(ほとんど0)
|
||||
|
||||
night.selmode = p1;
|
||||
@@ -200,7 +201,7 @@ void SetSelMode(void) { /* 18 */
|
||||
}
|
||||
|
||||
// キー入力待ち後、改ページ
|
||||
void AnalyzeMessage(void) { /* 19 */
|
||||
static void AnalyzeMessage(void) { /* 19 */
|
||||
int *var = getCaliVariable(); // 入力されたキー
|
||||
|
||||
*var = ntmsg_ana();
|
||||
@@ -209,7 +210,7 @@ void AnalyzeMessage(void) { /* 19 */
|
||||
}
|
||||
|
||||
// ~DRAWの効果時間
|
||||
void SetDrawTime(void) { /* 20 */
|
||||
static void SetDrawTime(void) { /* 20 */
|
||||
int p1 = getCaliValue(); // 効果時間 (未使用?)
|
||||
|
||||
nt_gr_set_drawtime(p1);
|
||||
@@ -218,7 +219,7 @@ void SetDrawTime(void) { /* 20 */
|
||||
}
|
||||
|
||||
// 効果つき画面更新
|
||||
void Draw(void) { /* 21 */
|
||||
static void Draw(void) { /* 21 */
|
||||
int p1 = getCaliValue(); // 効果番号
|
||||
|
||||
nt_gr_draw(p1);
|
||||
@@ -227,7 +228,7 @@ void Draw(void) { /* 21 */
|
||||
}
|
||||
|
||||
// 音声データを再生
|
||||
void SetVoice(void) { /* 22 */
|
||||
static void SetVoice(void) { /* 22 */
|
||||
int p1 = getCaliValue(); // ファイル番号
|
||||
|
||||
nt_voice_set(p1);
|
||||
@@ -236,13 +237,13 @@ void SetVoice(void) { /* 22 */
|
||||
}
|
||||
|
||||
// 未使用
|
||||
void WaitKey(void) { /* 23 */
|
||||
static void WaitKey(void) { /* 23 */
|
||||
int p1 = getCaliValue(); //
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.WaitKey %d:\n", p1);
|
||||
}
|
||||
|
||||
void AddFeeling(void) { /* 24 */
|
||||
static void AddFeeling(void) { /* 24 */
|
||||
int p1 = getCaliValue(); // person(1:新開,2:星川,3:百瀬,4:いずみ,5:鏡花,6:真言美,7:マコト
|
||||
int p2 = getCaliValue(); // val
|
||||
|
||||
@@ -250,14 +251,14 @@ void AddFeeling(void) { /* 24 */
|
||||
|
||||
}
|
||||
|
||||
void SubFeeling(void) { /* 25 */
|
||||
static void SubFeeling(void) { /* 25 */
|
||||
int p1 = getCaliValue(); // person
|
||||
int p2 = getCaliValue(); // val
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SubFeeling %d:\n", p1);
|
||||
}
|
||||
|
||||
void CallEvent(void) { /* 26 */
|
||||
static void CallEvent(void) { /* 26 */
|
||||
int p1 = getCaliValue(); // 1, 2 (Event Number)
|
||||
|
||||
nt_sco_callevent(p1);
|
||||
@@ -265,7 +266,7 @@ void CallEvent(void) { /* 26 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.CallEvent %d:\n", p1);
|
||||
}
|
||||
|
||||
void ScreenCG(void) { /* 27 */
|
||||
static void ScreenCG(void) { /* 27 */
|
||||
/*
|
||||
CG を読み込んで、surface0 と BlendScreen で重ね合わせ
|
||||
|
||||
@@ -284,7 +285,7 @@ void ScreenCG(void) { /* 27 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.ScreenCG %d,%d,%d:\n", x, y, no);
|
||||
}
|
||||
|
||||
void RunGameMain(void) { /* 28 */
|
||||
static void RunGameMain(void) { /* 28 */
|
||||
int *p1 = getCaliVariable(); // result
|
||||
int p2 = getCaliValue(); // month
|
||||
int p3 = getCaliValue(); // day
|
||||
@@ -300,7 +301,7 @@ void RunGameMain(void) { /* 28 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.RunGameMain %p,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5);
|
||||
}
|
||||
|
||||
void CheckNewGame(void) { /* 29 */
|
||||
static void CheckNewGame(void) { /* 29 */
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
*p1 = 0;
|
||||
@@ -308,21 +309,21 @@ void CheckNewGame(void) { /* 29 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.CheckNewGame %p:\n", p1);
|
||||
}
|
||||
|
||||
void SaveStartData(void) { /* 30 */
|
||||
static void SaveStartData(void) { /* 30 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SaveStartData:\n");
|
||||
}
|
||||
|
||||
void PrintExitSystem(void) { /* 31 */
|
||||
static void PrintExitSystem(void) { /* 31 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.PrintExitSystem:\n");
|
||||
}
|
||||
|
||||
void SetCalendar(void) { /* 32 */
|
||||
static void SetCalendar(void) { /* 32 */
|
||||
int p1 = getCaliValue(); // 0, 1, 2
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SetCalendar %d:\n", p1);
|
||||
}
|
||||
|
||||
void SetDate(void) { /* 33 */
|
||||
static void SetDate(void) { /* 33 */
|
||||
int p1 = getCaliValue(); // month
|
||||
int p2 = getCaliValue(); // day
|
||||
int p3 = getCaliValue(); // day of week
|
||||
@@ -334,7 +335,7 @@ void SetDate(void) { /* 33 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SetDate %d,%d,%d:\n", p1, p2, p3);
|
||||
}
|
||||
|
||||
void GetDate(void) { /* 34 */
|
||||
static void GetDate(void) { /* 34 */
|
||||
int *p1 = getCaliVariable(); // month
|
||||
int *p2 = getCaliVariable(); // day
|
||||
int *p3 = getCaliVariable(); // day of weeek
|
||||
@@ -346,11 +347,11 @@ void GetDate(void) { /* 34 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.GetDate %p,%p,%p:\n", p1, p2, p3);
|
||||
}
|
||||
|
||||
void SelectGameLevel(void) { /* 35 */
|
||||
static void SelectGameLevel(void) { /* 35 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SelectGameLevel:\n");
|
||||
}
|
||||
|
||||
void RunEventDungeon(void) { /* 36 */
|
||||
static void RunEventDungeon(void) { /* 36 */
|
||||
int *p1 = getCaliVariable();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
@@ -359,14 +360,14 @@ void RunEventDungeon(void) { /* 36 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.RunEventDungeon %p,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void RunEventBattle(void) { /* 37 */
|
||||
static void RunEventBattle(void) { /* 37 */
|
||||
int p1 = getCaliValue(); // 実際には機能しない?
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.RunEventBattle %d:\n", p1);
|
||||
}
|
||||
|
||||
// CD再生開始
|
||||
void CDPlay(void) { /* 38 */
|
||||
static void CDPlay(void) { /* 38 */
|
||||
int p1 = getCaliValue(); // no
|
||||
|
||||
nt_cd_play(p1);
|
||||
@@ -375,7 +376,7 @@ void CDPlay(void) { /* 38 */
|
||||
}
|
||||
|
||||
// CD再生停止
|
||||
void CDStop(void) { /* 39 */
|
||||
static void CDStop(void) { /* 39 */
|
||||
int p1 = getCaliValue(); // time(msec)
|
||||
|
||||
nt_cd_stop(p1);
|
||||
@@ -384,7 +385,7 @@ void CDStop(void) { /* 39 */
|
||||
}
|
||||
|
||||
// CDのmute
|
||||
void CDMute(void) { /* 40 */
|
||||
static void CDMute(void) { /* 40 */
|
||||
int p1 = getCaliValue(); // 0: mute off, 1: mute on
|
||||
|
||||
nt_cd_mute(p1 == 0 ? FALSE : TRUE);
|
||||
@@ -393,7 +394,7 @@ void CDMute(void) { /* 40 */
|
||||
}
|
||||
|
||||
// ch に効果音番号をセット
|
||||
void SoundEffectSetWave(void) { /* 41 */
|
||||
static void SoundEffectSetWave(void) { /* 41 */
|
||||
int p1 = getCaliValue(); // ch
|
||||
int p2 = getCaliValue(); // linkno
|
||||
|
||||
@@ -403,7 +404,7 @@ void SoundEffectSetWave(void) { /* 41 */
|
||||
}
|
||||
|
||||
// ch にくり返し数をセット
|
||||
void SoundEffectSetLoop(void) { /* 42 */
|
||||
static void SoundEffectSetLoop(void) { /* 42 */
|
||||
int p1 = getCaliValue(); // ch
|
||||
int p2 = getCaliValue(); // numloop
|
||||
|
||||
@@ -413,7 +414,7 @@ void SoundEffectSetLoop(void) { /* 42 */
|
||||
}
|
||||
|
||||
// ch に音量をセット
|
||||
void SoundEffectSetVolume(void) { /* 43 */
|
||||
static void SoundEffectSetVolume(void) { /* 43 */
|
||||
int p1 = getCaliValue(); // ch
|
||||
int p2 = getCaliValue(); // vol
|
||||
|
||||
@@ -423,7 +424,7 @@ void SoundEffectSetVolume(void) { /* 43 */
|
||||
}
|
||||
|
||||
// 効果音の再生を終るまで待つか待たないか?
|
||||
void SoundEffectSetSyncFlag(void) { /* 44 */
|
||||
static void SoundEffectSetSyncFlag(void) { /* 44 */
|
||||
int p1 = getCaliValue(); // ch
|
||||
int p2 = getCaliValue(); // 0: 終るまで待たない, 1: 待つ
|
||||
|
||||
@@ -433,7 +434,7 @@ void SoundEffectSetSyncFlag(void) { /* 44 */
|
||||
}
|
||||
|
||||
// ch の効果音を再生
|
||||
void SoundEffectPlay(void) { /* 45 */
|
||||
static void SoundEffectPlay(void) { /* 45 */
|
||||
int p1 = getCaliValue(); // ch
|
||||
|
||||
nt_snd_play(p1);
|
||||
@@ -442,7 +443,7 @@ void SoundEffectPlay(void) { /* 45 */
|
||||
}
|
||||
|
||||
// ch の効果音を停止
|
||||
void SoundEffectStop(void) { /* 46 */
|
||||
static void SoundEffectStop(void) { /* 46 */
|
||||
int p1 = getCaliValue(); // ch
|
||||
int p2 = getCaliValue(); // time (止まるまでの時間)
|
||||
|
||||
@@ -452,7 +453,7 @@ void SoundEffectStop(void) { /* 46 */
|
||||
}
|
||||
|
||||
// 全てのチャンネルの再生を停止
|
||||
void SoundEffectStopAll(void) { /* 47 */
|
||||
static void SoundEffectStopAll(void) { /* 47 */
|
||||
int p1 = getCaliValue(); // time (止まるまでの時間)
|
||||
|
||||
nt_snd_stopall(p1);
|
||||
@@ -460,86 +461,86 @@ void SoundEffectStopAll(void) { /* 47 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SoundEffectStopAll %d:\n", p1);
|
||||
}
|
||||
|
||||
void RunSoundMode(void) { /* 48 */
|
||||
static void RunSoundMode(void) { /* 48 */
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.RunSoundMode:\n");
|
||||
}
|
||||
|
||||
void RunMapEditor(void) { /* 49 */
|
||||
static void RunMapEditor(void) { /* 49 */
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.RunMapEditor %p:\n", p1);
|
||||
}
|
||||
|
||||
void VisualListClear(void) { /* 50 */
|
||||
static void VisualListClear(void) { /* 50 */
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.VisualListClear:\n");
|
||||
}
|
||||
|
||||
void VisualListAdd(void) { /* 51 */
|
||||
static void VisualListAdd(void) { /* 51 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.VisualListAdd %d:\n", p1);
|
||||
}
|
||||
|
||||
void GetLocalCountCG(void) { /* 52 */
|
||||
static void GetLocalCountCG(void) { /* 52 */
|
||||
int *p1 = getCaliVariable();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.GetLocalCountCG %p,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void PlayMemory(void) { /* 53 */
|
||||
static void PlayMemory(void) { /* 53 */
|
||||
int *p1 = getCaliVariable(); // 回想ページ
|
||||
int *p2 = getCaliVariable(); // 回想RESULT
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.PlayMemory %p,%p:\n", p1, p2);
|
||||
}
|
||||
|
||||
void GetEventFlagTotal(void) { /* 54 */
|
||||
static void GetEventFlagTotal(void) { /* 54 */
|
||||
int *p1 = getCaliVariable();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.GetEventFlagTotal %p,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void SetPlayerName(void) { /* 55 */
|
||||
static void SetPlayerName(void) { /* 55 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SetPlayerName %d:\n", p1);
|
||||
}
|
||||
|
||||
void GetPlayerName(void) { /* 56 */
|
||||
static void GetPlayerName(void) { /* 56 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.GetPlayerName %d:\n", p1);
|
||||
}
|
||||
|
||||
void SaveGame(void) { /* 57 */
|
||||
static void SaveGame(void) { /* 57 */
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SaveGame %p:\n", p1);
|
||||
}
|
||||
|
||||
void LoadGame(void) { /* 58 */
|
||||
static void LoadGame(void) { /* 58 */
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.LoadGame %p:\n", p1);
|
||||
}
|
||||
|
||||
void ExistSaveData(void) { /* 59 */
|
||||
static void ExistSaveData(void) { /* 59 */
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.ExistSaveData %p:\n", p1);
|
||||
}
|
||||
|
||||
void ExistStartData(void) { /* 60 */
|
||||
static void ExistStartData(void) { /* 60 */
|
||||
int *p1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.ExistStartData %p:\n", p1);
|
||||
}
|
||||
|
||||
void SetAreaData(void) { /* 61 */
|
||||
static void SetAreaData(void) { /* 61 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -547,27 +548,27 @@ void SetAreaData(void) { /* 61 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.SetAreaData %d,%d,%d:\n", p1, p2, p3);
|
||||
}
|
||||
|
||||
void RunBattleTest(void) { /* 62 */
|
||||
static void RunBattleTest(void) { /* 62 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.RunBattleTest:\n");
|
||||
}
|
||||
|
||||
void RunTrainingTest(void) { /* 63 */
|
||||
static void RunTrainingTest(void) { /* 63 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.RunTrainingTest:\n");
|
||||
}
|
||||
|
||||
void TestEventCall(void) { /* 64 */
|
||||
static void TestEventCall(void) { /* 64 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.TestEventCall:\n");
|
||||
}
|
||||
|
||||
void Test(void) { /* 65 */
|
||||
static void Test(void) { /* 65 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.Test:\n");
|
||||
}
|
||||
|
||||
void DebugScenario(void) { /* 66 */
|
||||
static void DebugScenario(void) { /* 66 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.DebugScenario:\n");
|
||||
}
|
||||
|
||||
void GetDLLTime(void) { /* 67 */
|
||||
static void GetDLLTime(void) { /* 67 */
|
||||
int *p1 = getCaliVariable();
|
||||
int *p2 = getCaliVariable();
|
||||
int *p3 = getCaliVariable();
|
||||
@@ -579,3 +580,75 @@ void GetDLLTime(void) { /* 67 */
|
||||
DEBUG_COMMAND_YET("NIGHTDLL.GetDLLTime %p,%p,%p,%p,%p,%p,%p:\n", p1, p2, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"AddFeeling", AddFeeling},
|
||||
{"AnalyzeMessage", AnalyzeMessage},
|
||||
{"CDMute", CDMute},
|
||||
{"CDPlay", CDPlay},
|
||||
{"CDStop", CDStop},
|
||||
{"CallEvent", CallEvent},
|
||||
{"CheckNewGame", CheckNewGame},
|
||||
{"DebugScenario", DebugScenario},
|
||||
{"Draw", Draw},
|
||||
{"ExistSaveData", ExistSaveData},
|
||||
{"ExistStartData", ExistStartData},
|
||||
{"GetDLLTime", GetDLLTime},
|
||||
{"GetDate", GetDate},
|
||||
{"GetEventFlagTotal", GetEventFlagTotal},
|
||||
{"GetLocalCountCG", GetLocalCountCG},
|
||||
{"GetPlayerName", GetPlayerName},
|
||||
{"Init", Init},
|
||||
{"InitGame", InitGame},
|
||||
{"LoadGame", LoadGame},
|
||||
{"PlayMemory", PlayMemory},
|
||||
{"PrintExitSystem", PrintExitSystem},
|
||||
{"RunBattleTest", RunBattleTest},
|
||||
{"RunEventBattle", RunEventBattle},
|
||||
{"RunEventDungeon", RunEventDungeon},
|
||||
{"RunGameMain", RunGameMain},
|
||||
{"RunMapEditor", RunMapEditor},
|
||||
{"RunSoundMode", RunSoundMode},
|
||||
{"RunTrainingTest", RunTrainingTest},
|
||||
{"SaveGame", SaveGame},
|
||||
{"SaveStartData", SaveStartData},
|
||||
{"ScreenCG", ScreenCG},
|
||||
{"SelectGameLevel", SelectGameLevel},
|
||||
{"SetAreaData", SetAreaData},
|
||||
{"SetCalendar", SetCalendar},
|
||||
{"SetDate", SetDate},
|
||||
{"SetDrawTime", SetDrawTime},
|
||||
{"SetFace", SetFace},
|
||||
{"SetFont", SetFont},
|
||||
{"SetFontSize", SetFontSize},
|
||||
{"SetMsgClearEffect", SetMsgClearEffect},
|
||||
{"SetMsgDrawEffect", SetMsgDrawEffect},
|
||||
{"SetMsgFrame", SetMsgFrame},
|
||||
{"SetMsgPlaceMethod", SetMsgPlaceMethod},
|
||||
{"SetPlayerName", SetPlayerName},
|
||||
{"SetScenery", SetScenery},
|
||||
{"SetSelMode", SetSelMode},
|
||||
{"SetSpriteL", SetSpriteL},
|
||||
{"SetSpriteM", SetSpriteM},
|
||||
{"SetSpriteR", SetSpriteR},
|
||||
{"SetSpriteSeasonL", SetSpriteSeasonL},
|
||||
{"SetSpriteSeasonM", SetSpriteSeasonM},
|
||||
{"SetSpriteSeasonR", SetSpriteSeasonR},
|
||||
{"SetVoice", SetVoice},
|
||||
{"SetWallPaper", SetWallPaper},
|
||||
{"SoundEffectPlay", SoundEffectPlay},
|
||||
{"SoundEffectSetLoop", SoundEffectSetLoop},
|
||||
{"SoundEffectSetSyncFlag", SoundEffectSetSyncFlag},
|
||||
{"SoundEffectSetVolume", SoundEffectSetVolume},
|
||||
{"SoundEffectSetWave", SoundEffectSetWave},
|
||||
{"SoundEffectStop", SoundEffectStop},
|
||||
{"SoundEffectStopAll", SoundEffectStopAll},
|
||||
{"StartNewLine", StartNewLine},
|
||||
{"SubFeeling", SubFeeling},
|
||||
{"Test", Test},
|
||||
{"TestEventCall", TestEventCall},
|
||||
{"VisualListAdd", VisualListAdd},
|
||||
{"VisualListClear", VisualListClear},
|
||||
{"WaitKey", WaitKey},
|
||||
};
|
||||
|
||||
const Module module_NIGHTDLL = {"NIGHTDLL", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
+34
-34
@@ -39,8 +39,8 @@ void nt_gr_set_wallpaper(int no) {
|
||||
sprite_t *sp = night.sp[SPNO_WALL];
|
||||
|
||||
if (sp) {
|
||||
sp_remove_updatelist(sp);
|
||||
sp_free(sp);
|
||||
nt_sp_remove_updatelist(sp);
|
||||
nt_sp_free(sp);
|
||||
}
|
||||
|
||||
if (no == 1013 && nt_sco_is_natsu()) {
|
||||
@@ -51,12 +51,12 @@ void nt_gr_set_wallpaper(int no) {
|
||||
no = 1012;
|
||||
}
|
||||
|
||||
sp = sp_new(SPNO_WALL, no, 0, 0, SPRITE_WP);
|
||||
sp_add_updatelist(sp);
|
||||
sp = nt_sp_new(SPNO_WALL, no, 0, 0, SPRITE_WP);
|
||||
nt_sp_add_updatelist(sp);
|
||||
if (no == 0) {
|
||||
sp->cursize.width = sf0->width;
|
||||
sp->cursize.height = sf0->height;
|
||||
sp->update = sp_draw_wall;
|
||||
sp->update = nt_sp_draw_wall;
|
||||
}
|
||||
|
||||
night.sp[SPNO_WALL] = sp;
|
||||
@@ -66,15 +66,15 @@ void nt_gr_set_scenery(int no) {
|
||||
sprite_t *sp = night.sp[SPNO_SCENERY];
|
||||
|
||||
if (sp) {
|
||||
sp_remove_updatelist(sp);
|
||||
sp_free(sp);
|
||||
nt_sp_remove_updatelist(sp);
|
||||
nt_sp_free(sp);
|
||||
sp = NULL;
|
||||
}
|
||||
|
||||
if (no) {
|
||||
sp = sp_new(SPNO_SCENERY, no, 0, 0, SPRITE_NORMAL);
|
||||
sp_add_updatelist(sp);
|
||||
sp_set_loc(sp, SCENERY_LOC_X, SCENERY_LOC_Y);
|
||||
sp = nt_sp_new(SPNO_SCENERY, no, 0, 0, SPRITE_NORMAL);
|
||||
nt_sp_add_updatelist(sp);
|
||||
nt_sp_set_loc(sp, SCENERY_LOC_X, SCENERY_LOC_Y);
|
||||
}
|
||||
|
||||
night.sp[SPNO_SCENERY] = sp;
|
||||
@@ -84,14 +84,14 @@ void nt_gr_set_face(int no) {
|
||||
sprite_t *sp = night.sp[SPNO_FACE];
|
||||
|
||||
if (sp) {
|
||||
sp_remove_updatelist(sp);
|
||||
sp_free(sp);
|
||||
nt_sp_remove_updatelist(sp);
|
||||
nt_sp_free(sp);
|
||||
sp = NULL;
|
||||
}
|
||||
if (no) {
|
||||
sp = sp_new(SPNO_FACE, no, 0, 0, SPRITE_NORMAL);
|
||||
sp_add_updatelist(sp);
|
||||
sp_set_loc(sp, FACE_LOC_X, FACE_LOC_Y);
|
||||
sp = nt_sp_new(SPNO_FACE, no, 0, 0, SPRITE_NORMAL);
|
||||
nt_sp_add_updatelist(sp);
|
||||
nt_sp_set_loc(sp, FACE_LOC_X, FACE_LOC_Y);
|
||||
night.msgplace = 2;
|
||||
} else {
|
||||
night.msgplace = 0;
|
||||
@@ -103,14 +103,14 @@ void nt_gr_set_spL(int no) {
|
||||
sprite_t *sp = night.sp[SPNO_TACHI_L];
|
||||
|
||||
if (sp) {
|
||||
sp_remove_updatelist(sp);
|
||||
sp_free(sp);
|
||||
nt_sp_remove_updatelist(sp);
|
||||
nt_sp_free(sp);
|
||||
sp = NULL;
|
||||
}
|
||||
if (no) {
|
||||
sp = sp_new(SPNO_TACHI_L, no, 0, 0, SPRITE_NORMAL);
|
||||
sp_add_updatelist(sp);
|
||||
sp_set_loc(sp, TACHI_L_LOC_X, TACHI_L_LOC_Y);
|
||||
sp = nt_sp_new(SPNO_TACHI_L, no, 0, 0, SPRITE_NORMAL);
|
||||
nt_sp_add_updatelist(sp);
|
||||
nt_sp_set_loc(sp, TACHI_L_LOC_X, TACHI_L_LOC_Y);
|
||||
}
|
||||
night.sp[SPNO_TACHI_L] = sp;
|
||||
}
|
||||
@@ -119,14 +119,14 @@ void nt_gr_set_spM(int no) {
|
||||
sprite_t *sp = night.sp[SPNO_TACHI_M];
|
||||
|
||||
if (sp) {
|
||||
sp_remove_updatelist(sp);
|
||||
sp_free(sp);
|
||||
nt_sp_remove_updatelist(sp);
|
||||
nt_sp_free(sp);
|
||||
sp = NULL;
|
||||
}
|
||||
if (no) {
|
||||
sp = sp_new(SPNO_TACHI_M, no, 0, 0, SPRITE_NORMAL);
|
||||
sp_add_updatelist(sp);
|
||||
sp_set_loc(sp, TACHI_M_LOC_X, TACHI_M_LOC_Y);
|
||||
sp = nt_sp_new(SPNO_TACHI_M, no, 0, 0, SPRITE_NORMAL);
|
||||
nt_sp_add_updatelist(sp);
|
||||
nt_sp_set_loc(sp, TACHI_M_LOC_X, TACHI_M_LOC_Y);
|
||||
}
|
||||
night.sp[SPNO_TACHI_M] = sp;
|
||||
}
|
||||
@@ -135,14 +135,14 @@ void nt_gr_set_spR(int no) {
|
||||
sprite_t *sp = night.sp[SPNO_TACHI_R];
|
||||
|
||||
if (sp) {
|
||||
sp_remove_updatelist(sp);
|
||||
sp_free(sp);
|
||||
nt_sp_remove_updatelist(sp);
|
||||
nt_sp_free(sp);
|
||||
sp = NULL;
|
||||
}
|
||||
if (no) {
|
||||
sp = sp_new(SPNO_TACHI_R, no, 0, 0, SPRITE_NORMAL);
|
||||
sp_add_updatelist(sp);
|
||||
sp_set_loc(sp, TACHI_R_LOC_X, TACHI_R_LOC_Y);
|
||||
sp = nt_sp_new(SPNO_TACHI_R, no, 0, 0, SPRITE_NORMAL);
|
||||
nt_sp_add_updatelist(sp);
|
||||
nt_sp_set_loc(sp, TACHI_R_LOC_X, TACHI_R_LOC_Y);
|
||||
}
|
||||
night.sp[SPNO_TACHI_R] = sp;
|
||||
}
|
||||
@@ -178,15 +178,15 @@ void nt_gr_draw(int effectno) {
|
||||
// 全消し
|
||||
break;
|
||||
case 1:
|
||||
sp_update_all(TRUE);
|
||||
nt_sp_update_all(TRUE);
|
||||
break;
|
||||
default:
|
||||
if (night.waitskiplv > 1) {
|
||||
sp_update_all(TRUE);
|
||||
nt_sp_update_all(TRUE);
|
||||
break;
|
||||
}
|
||||
//sp_eupdate(effectno, effecttime, TRUE);
|
||||
sp_eupdate(effectno, 1000, TRUE);
|
||||
//nt_sp_eupdate(effectno, effecttime, TRUE);
|
||||
nt_sp_eupdate(effectno, 1000, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+37
-37
@@ -67,34 +67,34 @@ void ntmsg_init() {
|
||||
sprite_t *sp;
|
||||
|
||||
// メッセージスプライト
|
||||
sp = night.sp[SPNO_MSGFRAME_FG] = sp_msg_new(SPNO_MSGFRAME_FG, 0, 0, sf0->width, sf0->height);
|
||||
sp_add_updatelist(sp);
|
||||
sp = night.sp[SPNO_MSGFRAME_FG] = nt_sp_msg_new(SPNO_MSGFRAME_FG, 0, 0, sf0->width, sf0->height);
|
||||
nt_sp_add_updatelist(sp);
|
||||
|
||||
// メッセージ背景用CG
|
||||
sp = night.sp[SPNO_MSGFRAME_BG] = sp_new(SPNO_MSGFRAME_BG, CGNO_MSGFRAME_LCG, 0, 0, SPRITE_NORMAL);
|
||||
sp_add_updatelist(sp);
|
||||
sp = night.sp[SPNO_MSGFRAME_BG] = nt_sp_new(SPNO_MSGFRAME_BG, CGNO_MSGFRAME_LCG, 0, 0, SPRITE_NORMAL);
|
||||
nt_sp_add_updatelist(sp);
|
||||
|
||||
// 文字背景CG作成
|
||||
scg_create(CGNO_MSGFR_BG,
|
||||
nt_scg_create(CGNO_MSGFR_BG,
|
||||
sf0->width, sf0->height,
|
||||
0, 0, 0, 255);
|
||||
// night.cg[CGNO_MSGFR_BG]->refcnt++;
|
||||
|
||||
// 文字背景CGのためのsprite
|
||||
sp = night.sp[SPNO_MSGBG] = sp_new(SPNO_MSGBG, CGNO_MSGFR_BG, 0, 0, SPRITE_NORMAL);
|
||||
sp_add_updatelist(sp);
|
||||
sp = night.sp[SPNO_MSGBG] = nt_sp_new(SPNO_MSGBG, CGNO_MSGFR_BG, 0, 0, SPRITE_NORMAL);
|
||||
nt_sp_add_updatelist(sp);
|
||||
|
||||
// キー入力アニメーションCG作成
|
||||
scg_cut(CGNO_MSGHAK_1, CGNO_MSGHAK_LCG, 0, 0, 9, 9);
|
||||
nt_scg_cut(CGNO_MSGHAK_1, CGNO_MSGHAK_LCG, 0, 0, 9, 9);
|
||||
//night.cg[CGNO_MSGHAK_1]->refcnt++;
|
||||
scg_cut(CGNO_MSGHAK_2, CGNO_MSGHAK_LCG, 0, 9, 9, 9);
|
||||
nt_scg_cut(CGNO_MSGHAK_2, CGNO_MSGHAK_LCG, 0, 9, 9, 9);
|
||||
//night.cg[CGNO_MSGHAK_2]->refcnt++;
|
||||
sp = night.sp[SPNO_MSG_KEYANIM] = sp_new(SPNO_MSG_KEYANIM, CGNO_MSGHAK_1, CGNO_MSGHAK_2, 0, SPRITE_ANIME);
|
||||
sp = night.sp[SPNO_MSG_KEYANIM] = nt_sp_new(SPNO_MSG_KEYANIM, CGNO_MSGHAK_1, CGNO_MSGHAK_2, 0, SPRITE_ANIME);
|
||||
sp->u.anime.interval = HAKANIM_INTERVAL;
|
||||
sp_add_updatelist(sp);
|
||||
sp_set_loc(sp, HAKANIM_LOC_X, HAKANIM_LOC_Y);
|
||||
sp_set_show(sp, FALSE);
|
||||
sp->update = sp_draw_scg;
|
||||
nt_sp_add_updatelist(sp);
|
||||
nt_sp_set_loc(sp, HAKANIM_LOC_X, HAKANIM_LOC_Y);
|
||||
nt_sp_set_show(sp, FALSE);
|
||||
sp->update = nt_sp_draw_scg;
|
||||
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ void ntmsg_init() {
|
||||
|
||||
|
||||
// 主人公名前
|
||||
sstr_regist_replace(SNAME_RYO, SNAME_RYO_DEF);
|
||||
nt_sstr_regist_replace(SNAME_RYO, SNAME_RYO_DEF);
|
||||
|
||||
night.msg.cbmove = cb_mousemove;
|
||||
night.msg.cbrelease = cb_keyrelease;
|
||||
@@ -129,14 +129,14 @@ void ntmsg_set_frame(int type) {
|
||||
|
||||
switch(type) {
|
||||
case 0:
|
||||
sp_set_show(night.sp[SPNO_MSGBG], FALSE);
|
||||
sp_set_show(night.sp[SPNO_MSGFRAME_BG], FALSE);
|
||||
sp_set_show(night.sp[SPNO_MSGFRAME_FG], FALSE);
|
||||
nt_sp_set_show(night.sp[SPNO_MSGBG], FALSE);
|
||||
nt_sp_set_show(night.sp[SPNO_MSGFRAME_BG], FALSE);
|
||||
nt_sp_set_show(night.sp[SPNO_MSGFRAME_FG], FALSE);
|
||||
break;
|
||||
case 1:
|
||||
sp_set_show(night.sp[SPNO_MSGBG], TRUE);
|
||||
sp_set_show(night.sp[SPNO_MSGFRAME_BG], TRUE);
|
||||
sp_set_show(night.sp[SPNO_MSGFRAME_FG], TRUE);
|
||||
nt_sp_set_show(night.sp[SPNO_MSGBG], TRUE);
|
||||
nt_sp_set_show(night.sp[SPNO_MSGFRAME_BG], TRUE);
|
||||
nt_sp_set_show(night.sp[SPNO_MSGFRAME_FG], TRUE);
|
||||
|
||||
gr_fill(sf, MSGFRAME_0_X, MSGFRAME_0_Y,
|
||||
MSGFRAME_0_WIDTH, MSGFRAME_0_HEIGHT,
|
||||
@@ -144,12 +144,12 @@ void ntmsg_set_frame(int type) {
|
||||
gr_fill_alpha_map(sf, MSGFRAME_0_X, MSGFRAME_0_Y,
|
||||
MSGFRAME_0_WIDTH, MSGFRAME_0_HEIGHT, 192);
|
||||
ntmsg_clear(SPNO_MSGFRAME_FG);
|
||||
sp_update_all(TRUE);
|
||||
nt_sp_update_all(TRUE);
|
||||
break;
|
||||
case 2:
|
||||
sp_set_show(night.sp[SPNO_MSGBG], TRUE);
|
||||
sp_set_show(night.sp[SPNO_MSGFRAME_BG], FALSE);
|
||||
sp_set_show(night.sp[SPNO_MSGFRAME_FG], TRUE);
|
||||
nt_sp_set_show(night.sp[SPNO_MSGBG], TRUE);
|
||||
nt_sp_set_show(night.sp[SPNO_MSGFRAME_BG], FALSE);
|
||||
nt_sp_set_show(night.sp[SPNO_MSGFRAME_FG], TRUE);
|
||||
|
||||
gr_fill(sf, MSGFRAME_1_X, MSGFRAME_1_Y,
|
||||
MSGFRAME_1_WIDTH, MSGFRAME_1_HEIGHT,
|
||||
@@ -157,7 +157,7 @@ void ntmsg_set_frame(int type) {
|
||||
gr_fill_alpha_map(sf, MSGFRAME_1_X, MSGFRAME_1_Y,
|
||||
MSGFRAME_1_WIDTH, MSGFRAME_1_HEIGHT, 128);
|
||||
ntmsg_clear(SPNO_MSGFRAME_FG);
|
||||
sp_update_all(TRUE);
|
||||
nt_sp_update_all(TRUE);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -182,7 +182,7 @@ void ntmsg_newline() {
|
||||
void ntmsg_add(char *msg) {
|
||||
int len;
|
||||
|
||||
WARNING("len = %d\n", strlen(msg));
|
||||
SACT_DEBUG("len = %d\n", strlen(msg));
|
||||
|
||||
if (msg[0] == '\0') return;
|
||||
|
||||
@@ -210,12 +210,12 @@ int ntmsg_ana(void) {
|
||||
} else {
|
||||
// msg newpage
|
||||
ntmsg_out(SPNO_MSGFRAME_FG, night.fontsize, 255, 255, 255, night.fonttype, 0, 2);
|
||||
sp_update_clipped();
|
||||
nt_sp_update_clipped();
|
||||
ret = ntmsg_keywait();
|
||||
|
||||
// clear msgsprite
|
||||
ntmsg_clear(SPNO_MSGFRAME_FG);
|
||||
//sp_update_clipped();
|
||||
//nt_sp_update_clipped();
|
||||
}
|
||||
|
||||
night.selmode = -1;
|
||||
@@ -234,7 +234,7 @@ static void ntmsg_out(int wNum, int wSize, int wColorR, int wColorG, int wColorB
|
||||
// shortcut
|
||||
sp = night.sp[wNum];
|
||||
|
||||
msg = sstr_replacestr(night.msgbuf);
|
||||
msg = nt_sstr_replacestr(night.msgbuf);
|
||||
|
||||
// 文字アラインメントの調整
|
||||
set_align(msg, sp, wSize);
|
||||
@@ -273,12 +273,12 @@ static void ntmsg_out(int wNum, int wSize, int wColorR, int wColorG, int wColorB
|
||||
needupdate = TRUE;
|
||||
|
||||
if (wSpeed > 0) {
|
||||
sp_updateme_part(sp,
|
||||
nt_sp_updateme_part(sp,
|
||||
sp->u.msg.dspcur.x,
|
||||
sp->u.msg.dspcur.y,
|
||||
cw,
|
||||
wSize);
|
||||
sp_update_clipped();
|
||||
nt_sp_update_clipped();
|
||||
needupdate = FALSE;
|
||||
|
||||
// keywait
|
||||
@@ -301,7 +301,7 @@ static void ntmsg_out(int wNum, int wSize, int wColorR, int wColorG, int wColorB
|
||||
if (needupdate) {
|
||||
uparea.width = sp->cursize.width;
|
||||
uparea.height = min(sp->cursize.height, uparea.y - sp->u.msg.dspcur.y + wLineSpace + wLineSpace);
|
||||
sp_updateme_part(sp, uparea.x, uparea.y, uparea.width, uparea.height);
|
||||
nt_sp_updateme_part(sp, uparea.x, uparea.y, uparea.width, uparea.height);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -455,8 +455,8 @@ static void hakanim(int i) {
|
||||
sp->curcg = sp->cg2;
|
||||
}
|
||||
sp->show = TRUE;
|
||||
sp_updateme(sp);
|
||||
sp_update_clipped();
|
||||
nt_sp_updateme(sp);
|
||||
nt_sp_update_clipped();
|
||||
|
||||
sp->show = show;
|
||||
}
|
||||
@@ -489,7 +489,7 @@ int ntmsg_update(sprite_t *sp, MyRectangle *r) {
|
||||
|
||||
gre_BlendUseAMap(sf0, dx, dy, sf0, dx, dy, sp->u.msg.canvas, sx, sy, w, h, sp->u.msg.canvas, sx, sy, sp->blendrate);
|
||||
|
||||
WARNING("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n",
|
||||
SACT_DEBUG("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n",
|
||||
sp->no, sx, sy, w, h, dx, dy);
|
||||
|
||||
return OK;
|
||||
@@ -509,5 +509,5 @@ static void ntmsg_clear(int wNum) {
|
||||
memset(sf->pixel, 0, sf->bytes_per_line * sf->height);
|
||||
memset(sf->alpha, 0, sf->width * sf->height);
|
||||
|
||||
sp_updateme(sp);
|
||||
nt_sp_updateme(sp);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ static struct _scoadr scene2adr(int no) {
|
||||
struct _scoadr adr = {0, 0};
|
||||
|
||||
snprintf(label, 7, "E%05d", no);
|
||||
WARNING("seaching %6s\n", label);
|
||||
SACT_DEBUG("seaching %6s\n", label);
|
||||
for (i = 0; i < nact->ain.fncnum; i++) {
|
||||
if (0 == strncmp(nact->ain.fnc[i].name, label, 6)) {
|
||||
adr.page = nact->ain.fnc[i].page;
|
||||
@@ -57,7 +57,7 @@ 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());
|
||||
//WARNING("%d:%x\n", sl_getPage(), sl_getIndex());
|
||||
//SACT_DEBUG("%d:%x\n", sl_getPage(), sl_getIndex());
|
||||
if (!nact->popupmenu_opened) {
|
||||
check_command(sl_getc());
|
||||
if (sl_getPage() == inadr.page &&
|
||||
|
||||
+35
-35
@@ -61,7 +61,7 @@ static cginfo_t *cgs[CGMAX];
|
||||
spriteから参照されるときは増やし、CG_xxxを作る時に
|
||||
参照されるときは増やさない。
|
||||
*/
|
||||
cginfo_t *scg_loadcg_no(int no, boolean refinc) {
|
||||
cginfo_t *nt_scg_loadcg_no(int no, boolean refinc) {
|
||||
cginfo_t *i;
|
||||
|
||||
if (no >= (CGMAX -1)) {
|
||||
@@ -95,7 +95,7 @@ cginfo_t *scg_loadcg_no(int no, boolean refinc) {
|
||||
}
|
||||
|
||||
// 指定の大きさ、色の矩形の CG を作成
|
||||
int scg_create(int wNumCG, int wWidth, int wHeight, int wR, int wG, int wB, int wBlendRate) {
|
||||
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);
|
||||
@@ -109,7 +109,7 @@ int scg_create(int wNumCG, int wWidth, int wHeight, int wR, int wG, int wB, int
|
||||
gr_fill_alpha_map(i->sf, 0, 0, wWidth, wHeight, wBlendRate);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
scg_free(wNumCG);
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
@@ -117,7 +117,7 @@ int scg_create(int wNumCG, int wWidth, int wHeight, int wR, int wG, int wB, int
|
||||
}
|
||||
|
||||
// 指定のCGを反転させたCGを作成
|
||||
int scg_create_reverse(int wNumCG, int wNumSrcCG, int wReverseX, int wReverseY) {
|
||||
int nt_scg_create_reverse(int wNumCG, int wNumSrcCG, int wReverseX, int wReverseY) {
|
||||
cginfo_t *i, *srccg;
|
||||
surface_t *src;
|
||||
|
||||
@@ -125,7 +125,7 @@ int scg_create_reverse(int wNumCG, int wNumSrcCG, int wReverseX, int wReverseY)
|
||||
spcg_assert_no(wNumSrcCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
if (NULL == (srccg = scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
return NG;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ int scg_create_reverse(int wNumCG, int wNumSrcCG, int wReverseX, int wReverseY)
|
||||
src = srccg->sf;
|
||||
i->sf = stretch(src, src->width, src->height, (wReverseX << 1) | wReverseY);
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
scg_free(wNumCG);
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
@@ -145,7 +145,7 @@ int scg_create_reverse(int wNumCG, int wNumSrcCG, int wReverseX, int wReverseY)
|
||||
}
|
||||
|
||||
// 指定のCGを拡大/縮小したCGを作成
|
||||
int scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG) {
|
||||
int nt_scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG) {
|
||||
cginfo_t *i, *srccg;
|
||||
surface_t *src;
|
||||
|
||||
@@ -153,7 +153,7 @@ int scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG) {
|
||||
spcg_assert_no(wNumSrcCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
if (NULL == (srccg = scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
return NG;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ int scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG) {
|
||||
i->sf = stretch(src, wWidth, wHeight, 0);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
scg_free(wNumCG);
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
@@ -174,7 +174,7 @@ int scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG) {
|
||||
}
|
||||
|
||||
// ベースCGの上にブレンドCGを重ねた CG を作成
|
||||
int scg_create_blend(int wNumDstCG, int wNumBaseCG, int wX, int wY, int wNumBlendCG, int wAlphaMapMode) {
|
||||
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);
|
||||
@@ -182,8 +182,8 @@ int scg_create_blend(int wNumDstCG, int wNumBaseCG, int wX, int wY, int wNumBlen
|
||||
spcg_assert_no(wNumBlendCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
basecg = scg_loadcg_no(wNumBaseCG, FALSE);
|
||||
blendcg = scg_loadcg_no(wNumBlendCG, FALSE);
|
||||
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));
|
||||
@@ -194,7 +194,7 @@ int scg_create_blend(int wNumDstCG, int wNumBaseCG, int wX, int wY, int wNumBlen
|
||||
i->sf = blend(basecg->sf, wX , wY, blendcg->sf, wAlphaMapMode);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
scg_free(wNumDstCG);
|
||||
nt_scg_free(wNumDstCG);
|
||||
|
||||
cgs[wNumDstCG] = i;
|
||||
|
||||
@@ -202,7 +202,7 @@ int scg_create_blend(int wNumDstCG, int wNumBaseCG, int wX, int wY, int wNumBlen
|
||||
}
|
||||
|
||||
// 指定の文字列のCGを作成
|
||||
int scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, char *cText) {
|
||||
int nt_scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, char *cText) {
|
||||
cginfo_t *i;
|
||||
agsurface_t *glyph;
|
||||
FONT *font;
|
||||
@@ -232,7 +232,7 @@ int scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, char *cText)
|
||||
gr_draw_amap(i->sf, 0, 0, glyph->pixel, glyph->width, wSize, glyph->bytes_per_line);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
scg_free(wNumCG);
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
@@ -240,7 +240,7 @@ int scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, char *cText)
|
||||
}
|
||||
|
||||
// 数字文字列のCGを作成
|
||||
int scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFigs, int wZeroPadding, int wValue) {
|
||||
int nt_scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFigs, int wZeroPadding, int wValue) {
|
||||
cginfo_t *i;
|
||||
agsurface_t *glyph;
|
||||
FONT *font;
|
||||
@@ -270,7 +270,7 @@ int scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFigs,
|
||||
gr_draw_amap(i->sf, 0, 0, glyph->pixel, glyph->width, wSize, glyph->bytes_per_line);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
scg_free(wNumCG);
|
||||
nt_scg_free(wNumCG);
|
||||
|
||||
cgs[wNumCG] = i;
|
||||
|
||||
@@ -278,14 +278,14 @@ int scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFigs,
|
||||
}
|
||||
|
||||
// CGを複製
|
||||
int scg_copy(int wNumDstCG, int wNumSrcCG) {
|
||||
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 = scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
return NG;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ int scg_copy(int wNumDstCG, int wNumSrcCG) {
|
||||
i->sf = sf_dup(srccg->sf);
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
scg_free(wNumDstCG);
|
||||
nt_scg_free(wNumDstCG);
|
||||
|
||||
cgs[wNumDstCG] = i;
|
||||
|
||||
@@ -304,7 +304,7 @@ int scg_copy(int wNumDstCG, int wNumSrcCG) {
|
||||
}
|
||||
|
||||
// CGの一部を切りぬいたCGを作成
|
||||
int scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight) {
|
||||
int nt_scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight) {
|
||||
cginfo_t *i, *srccg;
|
||||
surface_t *dst, *src;
|
||||
|
||||
@@ -312,7 +312,7 @@ int scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeigh
|
||||
spcg_assert_no(wNumSrcCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
if (NULL == (srccg = scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
return NG;
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ int scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeigh
|
||||
i->sf = dst;
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
scg_free(wNumDstCG);
|
||||
nt_scg_free(wNumDstCG);
|
||||
|
||||
cgs[wNumDstCG] = i;
|
||||
|
||||
@@ -345,7 +345,7 @@ int scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeigh
|
||||
}
|
||||
|
||||
// 元のCGの一部を切りぬいたCGを作成
|
||||
int scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight) {
|
||||
int nt_scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight) {
|
||||
cginfo_t *i, *srccg;
|
||||
surface_t *dst, *src;
|
||||
|
||||
@@ -353,7 +353,7 @@ int scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int w
|
||||
spcg_assert_no(wNumSrcCG);
|
||||
|
||||
// 元にするCGを参照 (LINKCGなら読み込み)
|
||||
if (NULL == (srccg = scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
if (NULL == (srccg = nt_scg_loadcg_no(wNumSrcCG, FALSE))) {
|
||||
return NG;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ int scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int w
|
||||
i->sf = dst;
|
||||
|
||||
// もし前に作成したものがあり、未開放の場合は開放
|
||||
scg_free(wNumDstCG);
|
||||
nt_scg_free(wNumDstCG);
|
||||
|
||||
cgs[wNumDstCG] = i;
|
||||
|
||||
@@ -388,11 +388,11 @@ int scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int w
|
||||
}
|
||||
|
||||
// 全てのCGの開放
|
||||
int scg_freeall() {
|
||||
int nt_scg_freeall() {
|
||||
int i;
|
||||
|
||||
for (i = 1; i < CGMAX; i++) {
|
||||
scg_free(i);
|
||||
nt_scg_free(i);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
@@ -401,7 +401,7 @@ int scg_freeall() {
|
||||
* 指定の番号の CG をオブジェクトリストから消し、オブジェクトがどこからも参照
|
||||
* されていない(参照数が0の)場合のみ、オブジェクトを削除
|
||||
*/
|
||||
int scg_free(int no) {
|
||||
int nt_scg_free(int no) {
|
||||
cginfo_t *cg;
|
||||
|
||||
spcg_assert_no(no);
|
||||
@@ -410,7 +410,7 @@ int scg_free(int no) {
|
||||
|
||||
// 参照数が0の時のみオブジェクトを開放
|
||||
if (cg->refcnt == 0) {
|
||||
scg_free_cgobj(cg);
|
||||
nt_scg_free_cgobj(cg);
|
||||
}
|
||||
|
||||
// 番号で消したときはオブジェクトが開放されなくても
|
||||
@@ -423,7 +423,7 @@ int scg_free(int no) {
|
||||
/**
|
||||
* CG オブジェクトの開放
|
||||
*/
|
||||
int scg_free_cgobj(cginfo_t *cg) {
|
||||
int nt_scg_free_cgobj(cginfo_t *cg) {
|
||||
if (cg == NULL) return NG;
|
||||
|
||||
(cg->refcnt)--;
|
||||
@@ -448,7 +448,7 @@ int scg_free_cgobj(cginfo_t *cg) {
|
||||
}
|
||||
|
||||
// CGの種類を取得
|
||||
int scg_querytype(int wNumCG, int *ret) {
|
||||
int nt_scg_querytype(int wNumCG, int *ret) {
|
||||
if (wNumCG >= (CGMAX -1)) goto errexit;
|
||||
if (cgs[wNumCG] == NULL) goto errexit;
|
||||
|
||||
@@ -462,7 +462,7 @@ int scg_querytype(int wNumCG, int *ret) {
|
||||
}
|
||||
|
||||
// CGの大きさを取得
|
||||
int scg_querysize(int wNumCG, int *w, int *h) {
|
||||
int nt_scg_querysize(int wNumCG, int *w, int *h) {
|
||||
if (wNumCG >= (CGMAX -1)) goto errexit;
|
||||
if (cgs[wNumCG] == NULL) goto errexit;
|
||||
if (cgs[wNumCG]->sf == NULL) goto errexit;
|
||||
@@ -478,7 +478,7 @@ int scg_querysize(int wNumCG, int *w, int *h) {
|
||||
}
|
||||
|
||||
// CGのBPPを取得
|
||||
int scg_querybpp(int wNumCG, int *ret) {
|
||||
int nt_scg_querybpp(int wNumCG, int *ret) {
|
||||
if (wNumCG >= (CGMAX -1)) goto errexit;
|
||||
if (cgs[wNumCG] == NULL) goto errexit;
|
||||
if (cgs[wNumCG]->sf == NULL) goto errexit;
|
||||
@@ -493,7 +493,7 @@ int scg_querybpp(int wNumCG, int *ret) {
|
||||
}
|
||||
|
||||
// CGの alphamap が存在するかを取得
|
||||
int scg_existalphamap(int wNumCG, int *ret) {
|
||||
int nt_scg_existalphamap(int wNumCG, int *ret) {
|
||||
if (wNumCG >= (CGMAX -1)) goto errexit;
|
||||
if (cgs[wNumCG] == NULL) goto errexit;
|
||||
if (cgs[wNumCG]->sf == NULL) goto errexit;
|
||||
|
||||
+18
-18
@@ -27,23 +27,23 @@
|
||||
#include "portab.h"
|
||||
#include "night.h"
|
||||
|
||||
extern cginfo_t *scg_loadcg_no(int no, boolean refinc);
|
||||
extern int scg_create(int wNumCG, int wWidth, int wHeight, int wR, int wG, int wB, int wBlendRate);
|
||||
extern int scg_create_reverse(int NumCG, int wNumSrcCG, int wReverseX, int wReverseY);
|
||||
extern int scg_create_stretch(int wNumCG, int wWidth, int wHeight, int wNumSrcCG);
|
||||
extern int scg_create_blend(int wNumDstCG, int wNumBaseCG, int wX, int wY, int wNumBlendCG, int wAlphaMapMode);
|
||||
extern int scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, char *cText);
|
||||
extern int scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFigs, int wZeroPadding, int wValue);
|
||||
extern int scg_copy(int wNumDstCG, int wNumSrcCG);
|
||||
extern int scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight);
|
||||
extern int scg_partcopy(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight);
|
||||
extern int scg_freeall();
|
||||
extern int scg_free(int cg);
|
||||
extern int scg_free_cgobj(cginfo_t *cg);
|
||||
extern int scg_querytype(int wNumCG, int *ret);
|
||||
extern int scg_querysize(int wNumCG, int *w, int *h);
|
||||
extern int scg_querybpp(int wNumCG, int *ret);
|
||||
extern int scg_existalphamap(int wNumCG, int *ret);
|
||||
extern int scg_linkcgfree(int no);
|
||||
extern cginfo_t *nt_scg_loadcg_no(int no, boolean refinc);
|
||||
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);
|
||||
extern int nt_scg_create_blend(int wNumDstCG, int wNumBaseCG, int wX, int wY, int wNumBlendCG, int wAlphaMapMode);
|
||||
extern int nt_scg_create_text(int wNumCG, int wSize, int wR, int wG, int wB, char *cText);
|
||||
extern int nt_scg_create_textnum(int wNumCG, int wSize, int wR, int wG, int wB, int wFigs, int wZeroPadding, int wValue);
|
||||
extern int nt_scg_copy(int wNumDstCG, int wNumSrcCG);
|
||||
extern int nt_scg_cut(int wNumDstCG, int wNumSrcCG, int wX, int wY, int wWidth, int wHeight);
|
||||
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);
|
||||
extern int nt_scg_existalphamap(int wNumCG, int *ret);
|
||||
extern int nt_scg_linkcgfree(int no);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -51,7 +51,7 @@ static char *replacedst;
|
||||
/**
|
||||
* 文字列変数スタックの初期化
|
||||
*/
|
||||
int sstr_init() {
|
||||
int nt_sstr_init() {
|
||||
stack = malloc(sizeof(char *) * DEFSTACKSIZE);
|
||||
idx = 0;
|
||||
idxmax = DEFSTACKSIZE;
|
||||
@@ -62,7 +62,7 @@ int sstr_init() {
|
||||
* 文字列変数スタックに文字列を積む
|
||||
* @param strno: シナリオ上での文字列変数番号
|
||||
*/
|
||||
int sstr_push(char *str) {
|
||||
int nt_sstr_push(char *str) {
|
||||
if (idx >= idxmax) {
|
||||
stack = realloc(stack, sizeof(char *) * idx*2);
|
||||
idxmax = idx*2;
|
||||
@@ -77,7 +77,7 @@ int sstr_push(char *str) {
|
||||
* 文字列変数スタックから文字列を取り出す
|
||||
* @param strno: スタックから戻した文字列を格納する文字列変数番号
|
||||
*/
|
||||
int sstr_pop(char *str, int maxlen) {
|
||||
int nt_sstr_pop(char *str, int maxlen) {
|
||||
if (idx == 0) return NG;
|
||||
|
||||
strncpy(str, stack[--idx], maxlen);
|
||||
@@ -91,7 +91,7 @@ int sstr_pop(char *str, int maxlen) {
|
||||
* @param sstrno: 変換元文字列変数番号
|
||||
* @param dstrno: 変換先文字列変数番号
|
||||
*/
|
||||
int sstr_regist_replace(char *sstr, char *dstr) {
|
||||
int nt_sstr_regist_replace(char *sstr, char *dstr) {
|
||||
strexchange_t *ex;
|
||||
|
||||
if (sstr == dstr) return NG;
|
||||
@@ -106,7 +106,7 @@ int sstr_regist_replace(char *sstr, char *dstr) {
|
||||
/**
|
||||
* 数値 -> 文字列化
|
||||
*/
|
||||
int sstr_num2str(int strno, int fig, int nzeropad, int num) {
|
||||
int nt_sstr_num2str(int strno, int fig, int nzeropad, int num) {
|
||||
char s[256], ss[256];
|
||||
|
||||
if (nzeropad) {
|
||||
@@ -148,7 +148,7 @@ static void replacestr_cb(void* data, void* userdata) {
|
||||
}
|
||||
|
||||
// 文字列の置き換え
|
||||
char *sstr_replacestr(char *msg) {
|
||||
char *nt_sstr_replacestr(char *msg) {
|
||||
if (strreplace == NULL) return msg;
|
||||
|
||||
repbuf[0][0] = '\0';
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
#ifndef __SACTSTRING_H__
|
||||
#define __SACTSTRING_H__
|
||||
|
||||
extern int sstr_init();
|
||||
extern int sstr_push(char *str);
|
||||
extern int sstr_pop(char *str, int maxlen);
|
||||
extern int sstr_regist_replace(char *sstr, char *dstr);
|
||||
extern int sstr_num2str(int strno, int fig, int nzeropad, int num);
|
||||
extern char *sstr_replacestr(char *msg);
|
||||
extern int nt_sstr_init();
|
||||
extern int nt_sstr_push(char *str);
|
||||
extern int nt_sstr_pop(char *str, int maxlen);
|
||||
extern int nt_sstr_regist_replace(char *sstr, char *dstr);
|
||||
extern int nt_sstr_num2str(int strno, int fig, int nzeropad, int num);
|
||||
extern char *nt_sstr_replacestr(char *msg);
|
||||
|
||||
|
||||
#endif /* __SACTSTRING_H__ */
|
||||
|
||||
+15
-15
@@ -9,7 +9,7 @@
|
||||
#include "ngraph.h"
|
||||
#include "nt_msg.h"
|
||||
|
||||
sprite_t *sp_new(int no, int cg1, int cg2, int cg3, int type) {
|
||||
sprite_t *nt_sp_new(int no, int cg1, int cg2, int cg3, int type) {
|
||||
sprite_t *sp;
|
||||
|
||||
sp = calloc(1, sizeof(sprite_t));
|
||||
@@ -17,9 +17,9 @@ sprite_t *sp_new(int no, int cg1, int cg2, int cg3, int type) {
|
||||
sp->no = no;
|
||||
sp->type = type;
|
||||
|
||||
if (cg1) sp->cg1 = scg_loadcg_no(cg1, TRUE); else sp->cg1 = NULL;
|
||||
if (cg2) sp->cg2 = scg_loadcg_no(cg2, TRUE); else sp->cg2 = NULL;
|
||||
if (cg3) sp->cg3 = scg_loadcg_no(cg3, TRUE); else sp->cg3 = NULL;
|
||||
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->curcg = sp->cg1;
|
||||
sp->show = TRUE;
|
||||
@@ -47,7 +47,7 @@ sprite_t *sp_new(int no, int cg1, int cg2, int cg3, int type) {
|
||||
return sp;
|
||||
}
|
||||
|
||||
sprite_t *sp_msg_new(int no, int x, int y, int width, int height) {
|
||||
sprite_t *nt_sp_msg_new(int no, int x, int y, int width, int height) {
|
||||
sprite_t *sp;
|
||||
|
||||
sp = calloc(1, sizeof(sprite_t));
|
||||
@@ -69,12 +69,12 @@ sprite_t *sp_msg_new(int no, int x, int y, int width, int height) {
|
||||
return sp;
|
||||
}
|
||||
|
||||
void sp_free(sprite_t *sp) {
|
||||
void nt_sp_free(sprite_t *sp) {
|
||||
if (sp == NULL) return;
|
||||
|
||||
if (sp->cg1) scg_free_cgobj(sp->cg1);
|
||||
if (sp->cg2) scg_free_cgobj(sp->cg2);
|
||||
if (sp->cg3) scg_free_cgobj(sp->cg3);
|
||||
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->type == SPRITE_MSG) {
|
||||
sf_free(sp->u.msg.canvas);
|
||||
@@ -83,7 +83,7 @@ void sp_free(sprite_t *sp) {
|
||||
free(sp);
|
||||
}
|
||||
|
||||
void sp_set_show(sprite_t *sp, boolean show) {
|
||||
void nt_sp_set_show(sprite_t *sp, boolean show) {
|
||||
boolean oldshow;
|
||||
|
||||
if (sp == NULL) return;
|
||||
@@ -92,22 +92,22 @@ void sp_set_show(sprite_t *sp, boolean show) {
|
||||
sp->show = show;
|
||||
|
||||
if (oldshow != show) {
|
||||
sp_updateme(sp);
|
||||
nt_sp_updateme(sp);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
void sp_set_cg(sprite_t *sp, int no) {
|
||||
void nt_sp_set_cg(sprite_t *sp, int no) {
|
||||
cginfo_t *cg;
|
||||
|
||||
if (sp == NULL) return;
|
||||
|
||||
if (sp->curcg) {
|
||||
scg_free_cgobj(sp->curcg);
|
||||
nt_scg_free_cgobj(sp->curcg);
|
||||
}
|
||||
|
||||
if (no) {
|
||||
cg = scg_loadcg_no(no, TRUE);
|
||||
cg = nt_scg_loadcg_no(no, TRUE);
|
||||
} else {
|
||||
cg = NULL;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ void sp_set_cg(sprite_t *sp, int no) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void sp_set_loc(sprite_t *sp, int x, int y) {
|
||||
void nt_sp_set_loc(sprite_t *sp, int x, int y) {
|
||||
if (sp == NULL) return;
|
||||
sp->cur.x = sp->loc.x = x;
|
||||
sp->cur.y = sp->loc.y = y;
|
||||
|
||||
+19
-19
@@ -6,7 +6,7 @@
|
||||
#include "surface.h"
|
||||
#include "graphics.h"
|
||||
|
||||
#define DEFAULT_UPDATE sp_draw
|
||||
#define DEFAULT_UPDATE nt_sp_draw
|
||||
|
||||
|
||||
#define SPRITEMAX 20
|
||||
@@ -107,30 +107,30 @@ typedef struct _sprite sprite_t;
|
||||
|
||||
|
||||
/* in nt_sprite.c */
|
||||
extern sprite_t *sp_new(int no, int cg1, int cg2, int cg3, int type);
|
||||
extern sprite_t *sp_msg_new(int no, int x, int y, int width, int height);
|
||||
extern void sp_free(sprite_t *sp);
|
||||
extern void sp_set_show(sprite_t *sp, boolean show);
|
||||
// extern void sp_set_cg(sprite_t *sp, int no);
|
||||
extern void sp_set_loc(sprite_t *sp, int x, int y);
|
||||
extern sprite_t *nt_sp_new(int no, int cg1, int cg2, int cg3, int type);
|
||||
extern sprite_t *nt_sp_msg_new(int no, int x, int y, int width, int height);
|
||||
extern void nt_sp_free(sprite_t *sp);
|
||||
extern void nt_sp_set_show(sprite_t *sp, boolean show);
|
||||
// extern void nt_sp_set_cg(sprite_t *sp, int no);
|
||||
extern void nt_sp_set_loc(sprite_t *sp, int x, int y);
|
||||
|
||||
/* in nt_sprite_update.c */
|
||||
extern int sp_update_clipped();
|
||||
extern int sp_update_all(boolean syncscreen);
|
||||
extern int sp_updateme(sprite_t *sp);
|
||||
extern int sp_updateme_part(sprite_t *sp, int x, int y, int w, int h);
|
||||
extern void sp_add_updatelist(sprite_t *sp);
|
||||
extern void sp_remove_updatelist(sprite_t *sp);
|
||||
extern int sp_draw_wall(sprite_t *sp, MyRectangle *r);
|
||||
extern int nt_sp_update_clipped();
|
||||
extern int nt_sp_update_all(boolean syncscreen);
|
||||
extern int nt_sp_updateme(sprite_t *sp);
|
||||
extern int nt_sp_updateme_part(sprite_t *sp, int x, int y, int w, int h);
|
||||
extern void nt_sp_add_updatelist(sprite_t *sp);
|
||||
extern void nt_sp_remove_updatelist(sprite_t *sp);
|
||||
extern int nt_sp_draw_wall(sprite_t *sp, MyRectangle *r);
|
||||
|
||||
/* in nt_sprite_draw.c */
|
||||
extern int sp_draw(sprite_t *sp, MyRectangle *r);
|
||||
extern int sp_draw2(sprite_t *sp, cginfo_t *cg, MyRectangle *r);
|
||||
extern void sp_draw_dmap(void* data, void* userdata);
|
||||
extern int sp_draw_scg(sprite_t *sp, MyRectangle *r);
|
||||
extern int nt_sp_draw(sprite_t *sp, MyRectangle *r);
|
||||
extern int nt_sp_draw2(sprite_t *sp, cginfo_t *cg, MyRectangle *r);
|
||||
extern void nt_sp_draw_dmap(void* data, void* userdata);
|
||||
extern int nt_sp_draw_scg(sprite_t *sp, MyRectangle *r);
|
||||
|
||||
/* in nt_sprite_eupdate.c */
|
||||
extern int sp_eupdate(int type, int time, int cancel);
|
||||
extern int nt_sp_eupdate(int type, int time, int cancel);
|
||||
|
||||
|
||||
#endif /* __SPRITE_H__ */
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
@param sp: 描画するスプライト
|
||||
@param r : 再描画する領域
|
||||
*/
|
||||
int sp_draw(sprite_t *sp, MyRectangle *r) {
|
||||
int nt_sp_draw(sprite_t *sp, MyRectangle *r) {
|
||||
if (sp == NULL) return NG;
|
||||
|
||||
return sp_draw2(sp, sp->curcg, r);
|
||||
return nt_sp_draw2(sp, sp->curcg, r);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -52,7 +52,7 @@ int sp_draw(sprite_t *sp, MyRectangle *r) {
|
||||
@param cg: 描画するCG
|
||||
@param r : 再描画する領域
|
||||
*/
|
||||
int sp_draw2(sprite_t *sp, cginfo_t *cg, MyRectangle *r) {
|
||||
int nt_sp_draw2(sprite_t *sp, cginfo_t *cg, MyRectangle *r) {
|
||||
surface_t update;
|
||||
int sx, sy, w, h, dx, dy;
|
||||
|
||||
@@ -96,14 +96,14 @@ int sp_draw2(sprite_t *sp, cginfo_t *cg, MyRectangle *r) {
|
||||
}
|
||||
}
|
||||
|
||||
WARNING("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n",
|
||||
SACT_DEBUG("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n",
|
||||
sp->no, sx, sy, w, h, dx, dy);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
// BlendScreenによる描画
|
||||
int sp_draw_scg(sprite_t *sp, MyRectangle *r) {
|
||||
int nt_sp_draw_scg(sprite_t *sp, MyRectangle *r) {
|
||||
surface_t update;
|
||||
cginfo_t *cg;
|
||||
int sx, sy, w, h, dx, dy;
|
||||
@@ -136,7 +136,7 @@ int sp_draw_scg(sprite_t *sp, MyRectangle *r) {
|
||||
sf0, dx, dy,
|
||||
cg->sf, sx, sy, w, h);
|
||||
|
||||
WARNING("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n",
|
||||
SACT_DEBUG("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n",
|
||||
sp->no, sx, sy, w, h, dx, dy);
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -88,7 +88,7 @@ static void ec1_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
}
|
||||
gre_Blend(sf0, 0, 0, sfsrc, 0, 0, sfdst, 0, 0, sfsrc->width, sfsrc->height, curstep);
|
||||
|
||||
// WARNING("step = %d\n", curstep);
|
||||
// SACT_DEBUG("step = %d\n", curstep);
|
||||
ags_updateFull();
|
||||
|
||||
ecp.oldstep = curstep;
|
||||
@@ -101,7 +101,7 @@ static void ec7_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
int i, t, y;
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
|
||||
//WARNING("step = %d\n", curstep);
|
||||
//SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0);
|
||||
@@ -129,7 +129,7 @@ static void ec8_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
int i, t, x;
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime) / (ecp.edtime - ecp.sttime);
|
||||
//WARNING("step = %d\n", curstep);
|
||||
//SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0);
|
||||
@@ -160,7 +160,7 @@ static void ec9_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
sfsrc->width / EC9DELTA + EC9DELTA);
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
|
||||
//WARNING("step = %d\n", curstep);
|
||||
//SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0);
|
||||
@@ -194,7 +194,7 @@ static void ec12_cb(surface_t *src, surface_t *dst) {
|
||||
int j, st_i, ed_i, l;
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
|
||||
WARNING("step = %d\n", curstep);
|
||||
SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0); return;
|
||||
@@ -225,7 +225,7 @@ static void ec13_cb(surface_t *src, surface_t *dst) {
|
||||
int dyy = 0 + sf0->height -1;
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
|
||||
WARNING("step = %d\n", curstep);
|
||||
SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0); return;
|
||||
@@ -364,7 +364,7 @@ static void ec_whiteout_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
@param time: 実行時間(msec)
|
||||
@param cancel: キー抜け(0:なし, 1:あり)
|
||||
*/
|
||||
int sp_eupdate(int type, int time, int cancel) {
|
||||
int nt_sp_eupdate(int type, int time, int cancel) {
|
||||
surface_t *sfsrc, *sfdst;
|
||||
int key;
|
||||
entrypoint *cb;
|
||||
@@ -372,7 +372,7 @@ int sp_eupdate(int type, int time, int cancel) {
|
||||
// 現在の sf0 をセーブ
|
||||
sfsrc = sf_dup(sf0);
|
||||
|
||||
sp_update_all(FALSE);
|
||||
nt_sp_update_all(FALSE);
|
||||
|
||||
sfdst = sf_dup(sf0);
|
||||
|
||||
@@ -415,7 +415,7 @@ int sp_eupdate(int type, int time, int cancel) {
|
||||
cb = ec_dummy_cb;
|
||||
break;
|
||||
case 1013:
|
||||
sp_update_all(TRUE); return OK;
|
||||
nt_sp_update_all(TRUE); return OK;
|
||||
// cb = ec_dummy_cb;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -67,8 +67,8 @@ static void disjunction(void* region, void* data) {
|
||||
MyRectangle *r2 = (MyRectangle *)data;
|
||||
int x1, x2, y1, y2;
|
||||
|
||||
//WARNING("r1x=%d,r1y=%d,r1w=%d,r1h=%d\n", r1->x, r1->y, r1->width, r1->height);
|
||||
//WARNING("r2x=%d,r2y=%d,r2w=%d,r2h=%d\n", r2->x, r2->y, r2->width, r2->height);
|
||||
//SACT_DEBUG("r1x=%d,r1y=%d,r1w=%d,r1h=%d\n", r1->x, r1->y, r1->width, r1->height);
|
||||
//SACT_DEBUG("r2x=%d,r2y=%d,r2w=%d,r2h=%d\n", r2->x, r2->y, r2->width, r2->height);
|
||||
|
||||
if (r2->width == 0) {
|
||||
r2->x = r1->x;
|
||||
@@ -88,7 +88,7 @@ static void disjunction(void* region, void* data) {
|
||||
r2->width = x2 - x1;
|
||||
r2->height = y2 - y1;
|
||||
|
||||
//WARNING("res:r2x=%d,r2y=%d,r2w=%d,r2h=%d\n", r2->x, r2->y, r2->width, r2->height);
|
||||
//SACT_DEBUG("res:r2x=%d,r2y=%d,r2w=%d,r2h=%d\n", r2->x, r2->y, r2->width, r2->height);
|
||||
}
|
||||
|
||||
// 更新の必要なスプライトの領域の和をとってクリッピングする
|
||||
@@ -105,7 +105,7 @@ static MyRectangle get_updatearea() {
|
||||
// surface0との領域の積をとる
|
||||
intersection(&rsf0, &clip, &result);
|
||||
|
||||
WARNING("clipped area x=%d y=%d w=%d h=%d\n",
|
||||
SACT_DEBUG("clipped area x=%d y=%d w=%d h=%d\n",
|
||||
result.x, result.y,
|
||||
result.width, result.height);
|
||||
|
||||
@@ -130,7 +130,7 @@ static void do_update_each(void* data, void* userdata) {
|
||||
画面全体の更新
|
||||
@param syncscreen: surface0 に描画したものを Screen に反映させるかどうか
|
||||
*/
|
||||
int sp_update_all(boolean syncscreen) {
|
||||
int nt_sp_update_all(boolean syncscreen) {
|
||||
// 画面全体を更新領域に
|
||||
MyRectangle r = {0, 0, sf0->width, sf0->height };
|
||||
|
||||
@@ -152,7 +152,7 @@ int sp_update_all(boolean syncscreen) {
|
||||
画面の一部を更新
|
||||
updateme(_part)で登録した更新が必要なspriteの和の領域をupdate
|
||||
*/
|
||||
int sp_update_clipped() {
|
||||
int nt_sp_update_clipped() {
|
||||
MyRectangle r;
|
||||
|
||||
// 更新領域の確定
|
||||
@@ -176,7 +176,7 @@ int sp_update_clipped() {
|
||||
sprite全体の更新を登録
|
||||
@param sp: 更新するスプライト
|
||||
*/
|
||||
int sp_updateme(sprite_t *sp) {
|
||||
int nt_sp_updateme(sprite_t *sp) {
|
||||
MyRectangle *r;
|
||||
|
||||
if (sp == NULL) return NG;
|
||||
@@ -190,7 +190,7 @@ int sp_updateme(sprite_t *sp) {
|
||||
|
||||
updatearea = slist_append(updatearea, r);
|
||||
|
||||
WARNING("x = %d, y = %d, spno = %d w=%d,h=%d\n",
|
||||
SACT_DEBUG("x = %d, y = %d, spno = %d w=%d,h=%d\n",
|
||||
r->x, r->y, sp->no, r->width, r->height);
|
||||
|
||||
return OK;
|
||||
@@ -204,7 +204,7 @@ int sp_updateme(sprite_t *sp) {
|
||||
@param w: 更新領域幅
|
||||
@param h: 更新領域高さ
|
||||
*/
|
||||
int sp_updateme_part(sprite_t *sp, int x, int y, int w, int h) {
|
||||
int nt_sp_updateme_part(sprite_t *sp, int x, int y, int w, int h) {
|
||||
MyRectangle *r;
|
||||
|
||||
if (sp == NULL) return NG;
|
||||
@@ -218,7 +218,7 @@ int sp_updateme_part(sprite_t *sp, int x, int y, int w, int h) {
|
||||
|
||||
updatearea = slist_append(updatearea, r);
|
||||
|
||||
WARNING("x = %d, y = %d, spno = %d w=%d,h=%d\n",
|
||||
SACT_DEBUG("x = %d, y = %d, spno = %d w=%d,h=%d\n",
|
||||
r->x, r->y, sp->no, r->width, r->height);
|
||||
|
||||
return OK;
|
||||
@@ -238,16 +238,16 @@ static int compare_spriteno_smallfirst(const void *a, const void *b) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sp_add_updatelist(sprite_t *sp) {
|
||||
void nt_sp_add_updatelist(sprite_t *sp) {
|
||||
updatelist = slist_insert_sorted(updatelist, sp, compare_spriteno_smallfirst);
|
||||
}
|
||||
|
||||
void sp_remove_updatelist(sprite_t *sp) {
|
||||
void nt_sp_remove_updatelist(sprite_t *sp) {
|
||||
updatelist = slist_remove(updatelist, sp);
|
||||
}
|
||||
|
||||
// デフォルトの壁紙update
|
||||
int sp_draw_wall(sprite_t *sp, MyRectangle *area) {
|
||||
int nt_sp_draw_wall(sprite_t *sp, MyRectangle *area) {
|
||||
int sx, sy, w, h;
|
||||
|
||||
sx = area->x;
|
||||
@@ -256,7 +256,7 @@ int sp_draw_wall(sprite_t *sp, MyRectangle *area) {
|
||||
h = area->height;
|
||||
gr_fill(sf0, sx, sy, w, h, 0, 0, 0);
|
||||
|
||||
WARNING("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, \n",
|
||||
SACT_DEBUG("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, \n",
|
||||
sp->no, sx, sy, w, h);
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
include(FindJPEG)
|
||||
|
||||
if (JPEG_FOUND)
|
||||
add_library(NightDemonDemo MODULE NightDemonDemo.c ndd.c jpeg2surface.c)
|
||||
|
||||
target_link_libraries(NightDemonDemo PRIVATE graph alk JPEG::JPEG)
|
||||
|
||||
install(TARGETS NightDemonDemo DESTINATION lib/xsystem35)
|
||||
endif()
|
||||
@@ -28,28 +28,40 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
extern void ndd_init(char *files[], int n);
|
||||
extern void ndd_run(int demonum);
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue(); /* ISys3x */
|
||||
int p2 = getCaliValue(); /* IWinMsg */
|
||||
int p3 = getCaliValue(); /* ITimer */
|
||||
int *var = getCaliVariable();
|
||||
|
||||
#ifdef HAVE_JPEG
|
||||
ndd_init(nact->files.alk, 4);
|
||||
#endif
|
||||
*var = 1;
|
||||
|
||||
DEBUG_COMMAND("NightDemonDemo.Init %d,%d,%d,%p:\n", p1, p2, p3, var);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
static void Run() {
|
||||
int p1 = getCaliValue(); // デモ番号 0,1,2
|
||||
int p2 = getCaliValue();
|
||||
|
||||
#ifdef HAVE_JPEG
|
||||
ndd_run(p1);
|
||||
#endif
|
||||
|
||||
DEBUG_COMMAND("NightDemonDemo.Run %d,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"Run", Run},
|
||||
};
|
||||
|
||||
const Module module_NightDemonDemo = {"NightDemonDemo", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(RandMT MODULE RandMT.c)
|
||||
|
||||
install(TARGETS RandMT DESTINATION lib/xsystem35)
|
||||
+12
-3
@@ -28,10 +28,11 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
#include "randMT.h"
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
/*
|
||||
乱数初期化
|
||||
|
||||
@@ -42,7 +43,7 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("RandMT.Init %p:\n", p1);
|
||||
}
|
||||
|
||||
void Get() {
|
||||
static void Get() {
|
||||
/*
|
||||
1 から num までの乱数を生成
|
||||
|
||||
@@ -61,10 +62,18 @@ void Get() {
|
||||
DEBUG_COMMAND_YET("RandMT.Get %d,%p:\n", num, var);
|
||||
}
|
||||
|
||||
void GetNoOverlap() { /* not used ? */
|
||||
static void GetNoOverlap() { /* not used ? */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int *var1 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("RandMT.GetNoOverlap %p:\n", p1);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Get", Get},
|
||||
{"GetNoOverlap", GetNoOverlap},
|
||||
{"Init", Init},
|
||||
};
|
||||
|
||||
const Module module_RandMT = {"RandMT", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
add_library(SACT MODULE
|
||||
SACT.c
|
||||
sactcg.c
|
||||
sactsound.c
|
||||
sactbgm.c
|
||||
sacttimer.c
|
||||
sactstring.c
|
||||
sactcrypto.c
|
||||
sactchart.c
|
||||
sactamask.c
|
||||
sactlog.c
|
||||
sprite.c
|
||||
sprite_event.c
|
||||
sprite_tevent.c
|
||||
sprite_move.c
|
||||
sprite_anime.c
|
||||
sprite_get.c
|
||||
sprite_put.c
|
||||
sprite_switch.c
|
||||
sprite_sel.c
|
||||
sprite_msg.c
|
||||
sprite_draw.c
|
||||
sprite_update.c
|
||||
sprite_eupdate.c
|
||||
sprite_quake.c
|
||||
sprite_keywait.c
|
||||
screen_quake.c
|
||||
sprite_xmenu.c
|
||||
)
|
||||
|
||||
target_compile_options(SACT PRIVATE -Wno-pointer-sign -Wno-invalid-source-encoding)
|
||||
|
||||
target_link_libraries(SACT PRIVATE graph drawtext list)
|
||||
|
||||
install(TARGETS SACT DESTINATION lib/xsystem35)
|
||||
+246
-120
File diff suppressed because it is too large
Load Diff
@@ -140,14 +140,13 @@ int ssnd_waitkey(int no, int *res) {
|
||||
}
|
||||
|
||||
if (sact.waitkey == -1) {
|
||||
cache[slot - SLOTOFFSET] = 0;
|
||||
*res = 0;
|
||||
} else {
|
||||
*res = sact.waitkey;
|
||||
}
|
||||
sact.waittype = KEYWAIT_NONE;
|
||||
|
||||
cache[slot - SLOTOFFSET] = 0;
|
||||
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ static int sp_draw_wall(sprite_t *sp) {
|
||||
h = sact.updaterect.height;
|
||||
gr_fill(sf0, sx, sy, w, h, 0, 0, 0);
|
||||
|
||||
WARNING("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, \n",
|
||||
SACT_DEBUG("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, \n",
|
||||
sp->no, sx, sy, w, h);
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -62,7 +62,7 @@ static int eventCB_ANIM(sprite_t *sp, agsevent_t *e) {
|
||||
sp->curcg = sp->cg3; break;
|
||||
}
|
||||
|
||||
// WARNING("anime update\n");
|
||||
// SACT_DEBUG("anime update\n");
|
||||
|
||||
// カウントアップ
|
||||
sp->u.anime.tick++;
|
||||
|
||||
@@ -137,7 +137,7 @@ int sp_draw2(sprite_t *sp, cginfo_t *cg) {
|
||||
}
|
||||
}
|
||||
|
||||
WARNING("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n", sp->no, sx, sy, w, h, dx, dy);
|
||||
SACT_DEBUG("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n", sp->no, sx, sy, w, h, dx, dy);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ static void ec1_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
}
|
||||
gre_Blend(sf0, 0, 0, sfsrc, 0, 0, sfdst, 0, 0, sfsrc->width, sfsrc->height, curstep);
|
||||
|
||||
WARNING("step = %d\n", curstep);
|
||||
SACT_DEBUG("step = %d\n", curstep);
|
||||
ags_updateFull();
|
||||
|
||||
ecp.oldstep = curstep;
|
||||
@@ -144,7 +144,7 @@ static void ec7_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
int i, t, y;
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
|
||||
WARNING("step = %d\n", curstep);
|
||||
SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0);
|
||||
@@ -172,7 +172,7 @@ static void ec8_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
int i, t, x;
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime) / (ecp.edtime - ecp.sttime);
|
||||
WARNING("step = %d\n", curstep);
|
||||
SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0);
|
||||
@@ -203,7 +203,7 @@ static void ec9_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
sfsrc->width / EC9DELTA + EC9DELTA);
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
|
||||
WARNING("step = %d\n", curstep);
|
||||
SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0);
|
||||
@@ -237,7 +237,7 @@ static void ec12_cb(surface_t *src, surface_t *dst) {
|
||||
int j, st_i, ed_i, l;
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
|
||||
WARNING("step = %d\n", curstep);
|
||||
SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0); return;
|
||||
@@ -268,7 +268,7 @@ static void ec13_cb(surface_t *src, surface_t *dst) {
|
||||
int dyy = 0 + sf0->height -1;
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
|
||||
WARNING("step = %d\n", curstep);
|
||||
SACT_DEBUG("step = %d\n", curstep);
|
||||
|
||||
if (ecp.oldstep == curstep) {
|
||||
usleep(0); return;
|
||||
|
||||
@@ -15,7 +15,7 @@ static void ec10_cb(surface_t *sfsrc, surface_t *sfdst) {
|
||||
|
||||
curstep = maxstep * (ecp.curtime - ecp.sttime)/ (ecp.edtime - ecp.sttime);
|
||||
turstep = maxstep / 2;
|
||||
WARNING("step = %d/%d\n", curstep, maxstep);
|
||||
SACT_DEBUG("step = %d/%d\n", curstep, maxstep);
|
||||
|
||||
if (curstep > turstep) {
|
||||
// 帰り
|
||||
|
||||
@@ -92,7 +92,7 @@ static void cb_focused_swsp(void* s, void* data) {
|
||||
int *update = (int *)data;
|
||||
boolean oldstate = sp->show;
|
||||
|
||||
WARNING("show up spex %d\n", sp->no);
|
||||
SACT_DEBUG("show up spex %d\n", sp->no);
|
||||
|
||||
sp->show = TRUE;
|
||||
if (oldstate != sp->show) {
|
||||
@@ -110,7 +110,7 @@ static void cb_defocused_swsp(void* s, void* data) {
|
||||
int *update = (int *)data;
|
||||
boolean oldstate = sp->show;
|
||||
|
||||
WARNING("hide spex %d\n", sp->no);
|
||||
SACT_DEBUG("hide spex %d\n", sp->no);
|
||||
|
||||
sp->show = FALSE;
|
||||
if (oldstate != sp->show) {
|
||||
@@ -174,7 +174,7 @@ static int cb_focused(sprite_t *sp) {
|
||||
update++;
|
||||
}
|
||||
sp->focused = TRUE;
|
||||
WARNING("get forcused %d, type %d\n", sp->no, sp->type);
|
||||
SACT_DEBUG("get forcused %d, type %d\n", sp->no, sp->type);
|
||||
if (sp->numsound1) {
|
||||
ssnd_play(sp->numsound1);
|
||||
}
|
||||
@@ -197,7 +197,7 @@ static int cb_defocused(sprite_t *sp) {
|
||||
sp->curcg = sp->cg1;
|
||||
update++;
|
||||
sp->focused = FALSE;
|
||||
WARNING("lost forcused %d\n", sp->no);
|
||||
SACT_DEBUG("lost forcused %d\n", sp->no);
|
||||
}
|
||||
|
||||
return update;
|
||||
|
||||
@@ -74,7 +74,7 @@ static int move_cb(sprite_t *sp, agsevent_t *e) {
|
||||
// 現在時刻の取得
|
||||
now = sact.movecurtime;
|
||||
|
||||
WARNING("no = %d now = %d st = %d, ed = %d\n",
|
||||
SACT_DEBUG("no = %d now = %d st = %d, ed = %d\n",
|
||||
sp->no, now, sp->move.starttime, sp->move.endtime);
|
||||
|
||||
if (now >= sp->move.endtime) {
|
||||
@@ -135,7 +135,7 @@ void spev_move_setup(void* data, void* userdata) {
|
||||
// タイマコールバック登録
|
||||
spev_add_teventlistener(sp, move_cb);
|
||||
|
||||
WARNING("no=%d,from(%d,%d@%d)to(%d,%d@%d),time=%d\n", sp->no,
|
||||
SACT_DEBUG("no=%d,from(%d,%d@%d)to(%d,%d@%d),time=%d\n", sp->no,
|
||||
sp->cur.x, sp->cur.y, sp->move.starttime,
|
||||
sp->move.to.x, sp->move.to.y, sp->move.endtime,
|
||||
sp->move.time);
|
||||
@@ -164,6 +164,7 @@ void spev_move_waitend(sprite_t *sp, int dx, int dy, int time) {
|
||||
|
||||
while (sp->move.moving) {
|
||||
nact->callback();
|
||||
WaitVsync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,6 +183,7 @@ void spev_wait4moving_sp() {
|
||||
|
||||
while (sp->move.moving) {
|
||||
nact->callback();
|
||||
WaitVsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,10 +392,10 @@ void smsg_clear(int wNum) {
|
||||
|
||||
/*
|
||||
出力中の文字列があるかチェック
|
||||
@return: なし(0) , あり(1)
|
||||
@return: なし(1) , あり(0)
|
||||
*/
|
||||
int smsg_is_empty() {
|
||||
return (sact.msgbuf[0] != '\0');
|
||||
return (sact.msgbuf[0] == '\0');
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -471,7 +471,7 @@ int smsg_update(sprite_t *sp) {
|
||||
|
||||
gre_BlendUseAMap(sf0, dx, dy, sf0, dx, dy, sp->u.msg.canvas, sx, sy, w, h, sp->u.msg.canvas, sx, sy, sp->blendrate);
|
||||
|
||||
WARNING("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n",
|
||||
SACT_DEBUG("do update no=%d, sx=%d, sy=%d, w=%d, h=%d, dx=%d, dy=%d\n",
|
||||
sp->no, sx, sy, w, h, dx, dy);
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -63,8 +63,8 @@ static void disjunction(void* region, void* data) {
|
||||
MyRectangle *r2 = (MyRectangle *)data;
|
||||
int x1, x2, y1, y2;
|
||||
|
||||
//WARNING("r1x=%d,r1y=%d,r1w=%d,r1h=%d\n", r1->x, r1->y, r1->width, r1->height);
|
||||
//WARNING("r2x=%d,r2y=%d,r2w=%d,r2h=%d\n", r2->x, r2->y, r2->width, r2->height);
|
||||
//SACT_DEBUG("r1x=%d,r1y=%d,r1w=%d,r1h=%d\n", r1->x, r1->y, r1->width, r1->height);
|
||||
//SACT_DEBUG("r2x=%d,r2y=%d,r2w=%d,r2h=%d\n", r2->x, r2->y, r2->width, r2->height);
|
||||
|
||||
if (r2->width == 0) {
|
||||
r2->x = r1->x;
|
||||
@@ -84,7 +84,7 @@ static void disjunction(void* region, void* data) {
|
||||
r2->width = x2 - x1;
|
||||
r2->height = y2 - y1;
|
||||
|
||||
//WARNING("res:r2x=%d,r2y=%d,r2w=%d,r2h=%d\n", r2->x, r2->y, r2->width, r2->height);
|
||||
//SACT_DEBUG("res:r2x=%d,r2y=%d,r2w=%d,r2h=%d\n", r2->x, r2->y, r2->width, r2->height);
|
||||
}
|
||||
|
||||
// 更新の必要なスプライトの領域の和をとってクリッピングする
|
||||
@@ -100,7 +100,7 @@ static void get_updatearea() {
|
||||
// surface0との領域の積をとる
|
||||
intersection(&rsf0, &clip, &sact.updaterect);
|
||||
|
||||
WARNING("clipped area x=%d y=%d w=%d h=%d\n",
|
||||
SACT_DEBUG("clipped area x=%d y=%d w=%d h=%d\n",
|
||||
sact.updaterect.x, sact.updaterect.y,
|
||||
sact.updaterect.width, sact.updaterect.height);
|
||||
|
||||
@@ -206,7 +206,7 @@ int sp_updateme(sprite_t *sp) {
|
||||
|
||||
updatearea = slist_append(updatearea, r);
|
||||
|
||||
WARNING("x = %d, y = %d, spno = %d w=%d,h=%d\n",
|
||||
SACT_DEBUG("x = %d, y = %d, spno = %d w=%d,h=%d\n",
|
||||
r->x, r->y, sp->no, r->width, r->height);
|
||||
|
||||
return OK;
|
||||
@@ -234,7 +234,7 @@ int sp_updateme_part(sprite_t *sp, int x, int y, int w, int h) {
|
||||
|
||||
updatearea = slist_append(updatearea, r);
|
||||
|
||||
WARNING("x = %d, y = %d, spno = %d w=%d,h=%d\n",
|
||||
SACT_DEBUG("x = %d, y = %d, spno = %d w=%d,h=%d\n",
|
||||
r->x, r->y, sp->no, r->width, r->height);
|
||||
|
||||
return OK;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(ShArray MODULE ShArray.c)
|
||||
|
||||
install(TARGETS ShArray DESTINATION lib/xsystem35)
|
||||
+114
-54
@@ -31,9 +31,10 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
void GetAtArray(void) { /* 0 */
|
||||
static void GetAtArray(void) { /* 0 */
|
||||
/*
|
||||
配列から演算しながら値を取り出す
|
||||
|
||||
@@ -79,7 +80,7 @@ void GetAtArray(void) { /* 0 */
|
||||
*vResult = j;
|
||||
}
|
||||
|
||||
void AddAtArray(void) { /* 1 */
|
||||
static void AddAtArray(void) { /* 1 */
|
||||
/*
|
||||
配列1に配列2を足す。65535 を超えたら 65535 に。
|
||||
|
||||
@@ -105,7 +106,7 @@ void AddAtArray(void) { /* 1 */
|
||||
}
|
||||
}
|
||||
|
||||
void SubAtArray(void) { /* 2 */
|
||||
static void SubAtArray(void) { /* 2 */
|
||||
/*
|
||||
配列1から配列2を引く。負になったら0をかく
|
||||
|
||||
@@ -131,7 +132,7 @@ void SubAtArray(void) { /* 2 */
|
||||
}
|
||||
}
|
||||
|
||||
void MulAtArray(void) { /* 3 */
|
||||
static void MulAtArray(void) { /* 3 */
|
||||
/*
|
||||
配列1に配列2をかけて、配列1に格納、65535まで。
|
||||
|
||||
@@ -157,7 +158,7 @@ void MulAtArray(void) { /* 3 */
|
||||
}
|
||||
}
|
||||
|
||||
void DivAtArray(void) { /* 4 */
|
||||
static void DivAtArray(void) { /* 4 */
|
||||
/*
|
||||
配列1を配列2で割って、配列1に格納、65535まで。
|
||||
|
||||
@@ -187,7 +188,7 @@ void DivAtArray(void) { /* 4 */
|
||||
}
|
||||
}
|
||||
|
||||
void MinAtArray(void) { /* 5 */
|
||||
static void MinAtArray(void) { /* 5 */
|
||||
/*
|
||||
配列 vAry1 の中身を配列 vAry2 で下限に設定する
|
||||
|
||||
@@ -210,7 +211,7 @@ void MinAtArray(void) { /* 5 */
|
||||
}
|
||||
}
|
||||
|
||||
void MaxAtArray(void) { /* 6 */
|
||||
static void MaxAtArray(void) { /* 6 */
|
||||
/*
|
||||
配列 vAry1 の中身を配列 vAry2 で上限に設定する
|
||||
|
||||
@@ -233,7 +234,7 @@ void MaxAtArray(void) { /* 6 */
|
||||
}
|
||||
}
|
||||
|
||||
void AndNumArray(void) { /* 7 */
|
||||
static void AndNumArray(void) { /* 7 */
|
||||
/*
|
||||
配列のデータと val で AND をとる
|
||||
|
||||
@@ -254,7 +255,7 @@ void AndNumArray(void) { /* 7 */
|
||||
}
|
||||
}
|
||||
|
||||
void OrNumArray(void) { /* 8 */
|
||||
static void OrNumArray(void) { /* 8 */
|
||||
/*
|
||||
配列のデータと val で OR をとる
|
||||
|
||||
@@ -275,7 +276,7 @@ void OrNumArray(void) { /* 8 */
|
||||
}
|
||||
}
|
||||
|
||||
void XorNumArray(void) { /* 9 */
|
||||
static void XorNumArray(void) { /* 9 */
|
||||
/*
|
||||
配列のデータと val で XOR をとる
|
||||
|
||||
@@ -296,7 +297,7 @@ void XorNumArray(void) { /* 9 */
|
||||
}
|
||||
}
|
||||
|
||||
void SetEquArray(void) { /* 10 */
|
||||
static void SetEquArray(void) { /* 10 */
|
||||
/*
|
||||
配列が val と等しければ 配列 vResults に 1 を、そうでなければ
|
||||
0 を代入
|
||||
@@ -320,7 +321,7 @@ void SetEquArray(void) { /* 10 */
|
||||
}
|
||||
}
|
||||
|
||||
void SetNotArray(void) { /* 11 */
|
||||
static void SetNotArray(void) { /* 11 */
|
||||
/*
|
||||
配列が val と等しくなければ配列 vResults に 1 を、そうでなければ
|
||||
0 を代入
|
||||
@@ -344,7 +345,7 @@ void SetNotArray(void) { /* 11 */
|
||||
}
|
||||
}
|
||||
|
||||
void SetLowArray(void) { /* 12 */
|
||||
static void SetLowArray(void) { /* 12 */
|
||||
/*
|
||||
配列データが val よりも小さければ vResult に 1 をセット
|
||||
|
||||
@@ -367,7 +368,7 @@ void SetLowArray(void) { /* 12 */
|
||||
}
|
||||
}
|
||||
|
||||
void SetHighArray(void) { /* 13 */
|
||||
static void SetHighArray(void) { /* 13 */
|
||||
/*
|
||||
配列データが val よりも大きければ vResult に 1 をセット
|
||||
|
||||
@@ -390,7 +391,7 @@ void SetHighArray(void) { /* 13 */
|
||||
}
|
||||
}
|
||||
|
||||
void SetRangeArray(void) { /* 14 */
|
||||
static void SetRangeArray(void) { /* 14 */
|
||||
/*
|
||||
配列データがある範囲(min〜max)にあるかチェック
|
||||
|
||||
@@ -417,7 +418,7 @@ void SetRangeArray(void) { /* 14 */
|
||||
}
|
||||
}
|
||||
|
||||
void SetAndEquArray(void) { /* 15 */
|
||||
static void SetAndEquArray(void) { /* 15 */
|
||||
/*
|
||||
配列 vAry と mask との AND をとって val に等しければ
|
||||
配列 vResults に1を、等しくなければ 0 を書く
|
||||
@@ -444,7 +445,7 @@ void SetAndEquArray(void) { /* 15 */
|
||||
}
|
||||
}
|
||||
|
||||
void AndEquArray(void) { /* 16 */
|
||||
static void AndEquArray(void) { /* 16 */
|
||||
/*
|
||||
配列 vAry 中で val と同じならば、vResult と 1 の AND を
|
||||
違うならば 0 をかく。
|
||||
@@ -468,7 +469,7 @@ void AndEquArray(void) { /* 16 */
|
||||
}
|
||||
}
|
||||
|
||||
void AndNotArray(void) { /* 17 */
|
||||
static void AndNotArray(void) { /* 17 */
|
||||
/*
|
||||
配列 vAry 中で val と等しくないならば、vResult と 1 の AND を
|
||||
違う場合は 0 をかく。
|
||||
@@ -492,7 +493,7 @@ void AndNotArray(void) { /* 17 */
|
||||
}
|
||||
}
|
||||
|
||||
void AndLowArray(void) { /* 18 */
|
||||
static void AndLowArray(void) { /* 18 */
|
||||
/*
|
||||
配列 vAry が min よりも小さいならば、vResult と 1 の AND を
|
||||
そうでないならば 0 をかく。
|
||||
@@ -516,7 +517,7 @@ void AndLowArray(void) { /* 18 */
|
||||
}
|
||||
}
|
||||
|
||||
void AndHighArray(void) { /* 19 */
|
||||
static void AndHighArray(void) { /* 19 */
|
||||
/*
|
||||
配列 vAry が min よりも大きいならば、vResult と 1 の AND を
|
||||
そうでないならば 0 をかく。
|
||||
@@ -540,7 +541,7 @@ void AndHighArray(void) { /* 19 */
|
||||
}
|
||||
}
|
||||
|
||||
void AndRangeArray(void) { /* 20 */
|
||||
static void AndRangeArray(void) { /* 20 */
|
||||
/*
|
||||
vAry が min から max にある場合、vResults と 1 の AND を
|
||||
そうでなければ 0 をかく。
|
||||
@@ -566,7 +567,7 @@ void AndRangeArray(void) { /* 20 */
|
||||
}
|
||||
}
|
||||
|
||||
void AndAndEquArray(void) { /* 21 */
|
||||
static void AndAndEquArray(void) { /* 21 */
|
||||
/*
|
||||
配列 vAry と mask との AND をとって val に等しければ
|
||||
配列 vResults と1の AND、等しくなければ 0 を書く
|
||||
@@ -593,7 +594,7 @@ void AndAndEquArray(void) { /* 21 */
|
||||
}
|
||||
}
|
||||
|
||||
void OrEquArray(void) { /* 22 */
|
||||
static void OrEquArray(void) { /* 22 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -602,7 +603,7 @@ void OrEquArray(void) { /* 22 */
|
||||
DEBUG_COMMAND_YET("ShArray.OrEquArray: %d,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
void OrNotArray(void) { /* 23 */
|
||||
static void OrNotArray(void) { /* 23 */
|
||||
/*
|
||||
配列の値が val と等しくなければ vResult に 1 を書き込む
|
||||
|
||||
@@ -626,7 +627,7 @@ void OrNotArray(void) { /* 23 */
|
||||
}
|
||||
}
|
||||
|
||||
void OrLowArray(void) { /* 24 */
|
||||
static void OrLowArray(void) { /* 24 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -635,7 +636,7 @@ void OrLowArray(void) { /* 24 */
|
||||
DEBUG_COMMAND_YET("ShArray.OrLowArray: %d,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
void OrHighArray(void) { /* 25 */
|
||||
static void OrHighArray(void) { /* 25 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -644,7 +645,7 @@ void OrHighArray(void) { /* 25 */
|
||||
DEBUG_COMMAND_YET("ShArray.OrHighArray: %d,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
void OrRangeArray(void) { /* 26 */
|
||||
static void OrRangeArray(void) { /* 26 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -654,7 +655,7 @@ void OrRangeArray(void) { /* 26 */
|
||||
DEBUG_COMMAND_YET("ShArray.OrRangeArray: %d,%d,%d,%d,%d:\n", p1, p2, p3, p4,p5);
|
||||
}
|
||||
|
||||
void OrAndEquArray(void) { /* 27 */
|
||||
static void OrAndEquArray(void) { /* 27 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -664,7 +665,7 @@ void OrAndEquArray(void) { /* 27 */
|
||||
DEBUG_COMMAND_YET("ShArray.OrAndEquArray: %d,%d,%d,%d,%d:\n", p1, p2, p3, p4,p5);
|
||||
}
|
||||
|
||||
void EnumEquArray(void) { /* 28 */
|
||||
static void EnumEquArray(void) { /* 28 */
|
||||
/*
|
||||
配列のデータ中に val と同じデータを数を vResult に返す
|
||||
|
||||
@@ -689,7 +690,7 @@ void EnumEquArray(void) { /* 28 */
|
||||
}
|
||||
}
|
||||
|
||||
void EnumEquArray2(void) { /* 29 */
|
||||
static void EnumEquArray2(void) { /* 29 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -700,7 +701,7 @@ void EnumEquArray2(void) { /* 29 */
|
||||
DEBUG_COMMAND_YET("ShArray.EnumEquArray2: %d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6);
|
||||
}
|
||||
|
||||
void EnumEquNotArray2(void) { /* 30 */
|
||||
static void EnumEquNotArray2(void) { /* 30 */
|
||||
/*
|
||||
配列1が val1 に等しく、配列2がval2 に等しくないものの数を
|
||||
vResult に返す。
|
||||
@@ -732,7 +733,7 @@ void EnumEquNotArray2(void) { /* 30 */
|
||||
}
|
||||
}
|
||||
|
||||
void EnumNotArray(void) { /* 31 */
|
||||
static void EnumNotArray(void) { /* 31 */
|
||||
/*
|
||||
配列のなかで val と等しくないものの個数を返す
|
||||
|
||||
@@ -759,7 +760,7 @@ void EnumNotArray(void) { /* 31 */
|
||||
}
|
||||
}
|
||||
|
||||
void EnumNotArray2(void) { /* 32 */
|
||||
static void EnumNotArray2(void) { /* 32 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -770,7 +771,7 @@ void EnumNotArray2(void) { /* 32 */
|
||||
DEBUG_COMMAND_YET("ShArray.EnumNotArray2: %d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6);
|
||||
}
|
||||
|
||||
void EnumLowArray(void) { /* 33 */
|
||||
static void EnumLowArray(void) { /* 33 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -779,7 +780,7 @@ void EnumLowArray(void) { /* 33 */
|
||||
DEBUG_COMMAND_YET("ShArray.EnumLowArray: %d,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
void EnumHighArray(void) { /* 34 */
|
||||
static void EnumHighArray(void) { /* 34 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -788,7 +789,7 @@ void EnumHighArray(void) { /* 34 */
|
||||
DEBUG_COMMAND_YET("ShArray.EnumHighArray: %d,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
void EnumRangeArray(void) { /* 35 */
|
||||
static void EnumRangeArray(void) { /* 35 */
|
||||
/*
|
||||
配列の値のうちが min と max の間あるものの数を vResult に返す
|
||||
|
||||
@@ -818,7 +819,7 @@ void EnumRangeArray(void) { /* 35 */
|
||||
|
||||
}
|
||||
|
||||
void GrepEquArray(void) { /* 36 */
|
||||
static void GrepEquArray(void) { /* 36 */
|
||||
/*
|
||||
配列の値が val と等しければ vLastMatch に一致した index を返し
|
||||
vResult に 1 を返す
|
||||
@@ -850,7 +851,7 @@ void GrepEquArray(void) { /* 36 */
|
||||
}
|
||||
}
|
||||
|
||||
void GrepNotArray(void) { /* 37 */
|
||||
static void GrepNotArray(void) { /* 37 */
|
||||
/*
|
||||
配列の値が val と等しくなければ vLastMatch にその index を返し
|
||||
vResult に 1 を返す
|
||||
@@ -882,7 +883,7 @@ void GrepNotArray(void) { /* 37 */
|
||||
}
|
||||
}
|
||||
|
||||
void GrepEquArray2(void) { /* 38 */
|
||||
static void GrepEquArray2(void) { /* 38 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -894,7 +895,7 @@ void GrepEquArray2(void) { /* 38 */
|
||||
DEBUG_COMMAND_YET("ShArray.GrepEquArray2: %d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
void GrepNotArray2(void) { /* 39 */
|
||||
static void GrepNotArray2(void) { /* 39 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -906,7 +907,7 @@ void GrepNotArray2(void) { /* 39 */
|
||||
DEBUG_COMMAND_YET("ShArray.GrepNotArray2: %d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
void GrepEquNotArray2(void) { /* 40 */
|
||||
static void GrepEquNotArray2(void) { /* 40 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -918,7 +919,7 @@ void GrepEquNotArray2(void) { /* 40 */
|
||||
DEBUG_COMMAND_YET("ShArray.GrepEquNotArray2: %d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
void GrepLowArray(void) { /* 41 */
|
||||
static void GrepLowArray(void) { /* 41 */
|
||||
/*
|
||||
配列の値が min よりも小さければ vMatch に一致した index
|
||||
を返し vResult に 1 を返す
|
||||
@@ -950,7 +951,7 @@ void GrepLowArray(void) { /* 41 */
|
||||
}
|
||||
}
|
||||
|
||||
void GrepHighArray(void) { /* 42 */
|
||||
static void GrepHighArray(void) { /* 42 */
|
||||
/*
|
||||
配列の値が min よりも大きければ vMatch に一致した index
|
||||
を返し vResult に 1 を返す
|
||||
@@ -982,7 +983,7 @@ void GrepHighArray(void) { /* 42 */
|
||||
}
|
||||
}
|
||||
|
||||
void GrepRangeArray(void) { /* 43 */
|
||||
static void GrepRangeArray(void) { /* 43 */
|
||||
/*
|
||||
配列の値が max と min の間にあれば vMatch に一致した index
|
||||
を返し vResult に 1 を返す
|
||||
@@ -1016,7 +1017,7 @@ void GrepRangeArray(void) { /* 43 */
|
||||
}
|
||||
}
|
||||
|
||||
void GrepLowOrderArray(void) { /* 44 */
|
||||
static void GrepLowOrderArray(void) { /* 44 */
|
||||
/*
|
||||
配列 vAry の中で minよりも大きく、 max よりも小さいもの
|
||||
のうち、最も小さいものの index を vLastMatch に返す。
|
||||
@@ -1067,7 +1068,7 @@ void GrepLowOrderArray(void) { /* 44 */
|
||||
|
||||
}
|
||||
|
||||
void GrepHighOrderArray(void) { /* 45 */
|
||||
static void GrepHighOrderArray(void) { /* 45 */
|
||||
/*
|
||||
配列 vAry の中で minよりも大きく、 max よりも小さいもの
|
||||
のうち、最も大きいものの index を vLastMatch に返す。
|
||||
@@ -1117,7 +1118,7 @@ void GrepHighOrderArray(void) { /* 45 */
|
||||
}
|
||||
}
|
||||
|
||||
void ChangeEquArray(void) { /* 46 */
|
||||
static void ChangeEquArray(void) { /* 46 */
|
||||
int *vAry = getCaliVariable();
|
||||
int cnt = getCaliValue();
|
||||
int src = getCaliValue();
|
||||
@@ -1134,7 +1135,7 @@ void ChangeEquArray(void) { /* 46 */
|
||||
}
|
||||
}
|
||||
|
||||
void ChangeNotArray(void) { /* 47 */
|
||||
static void ChangeNotArray(void) { /* 47 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -1143,7 +1144,7 @@ void ChangeNotArray(void) { /* 47 */
|
||||
DEBUG_COMMAND_YET("ShArray.ChangeNotArray: %d,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
void ChangeLowArray(void) { /* 48 */
|
||||
static void ChangeLowArray(void) { /* 48 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -1152,7 +1153,7 @@ void ChangeLowArray(void) { /* 48 */
|
||||
DEBUG_COMMAND_YET("ShArray.ChangeLowArray: %d,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
void ChangeHighArray(void) { /* 49 */
|
||||
static void ChangeHighArray(void) { /* 49 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -1161,7 +1162,7 @@ void ChangeHighArray(void) { /* 49 */
|
||||
DEBUG_COMMAND_YET("ShArray.ChangeHighArray: %d,%d,%d,%d:\n", p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
void ChangeRangeArray(void) { /* 50 */
|
||||
static void ChangeRangeArray(void) { /* 50 */
|
||||
/*
|
||||
配列内データが min から max の間にあるときは val で置き換え
|
||||
|
||||
@@ -1188,7 +1189,7 @@ void ChangeRangeArray(void) { /* 50 */
|
||||
}
|
||||
}
|
||||
|
||||
void CopyArrayToRect(void) { /* 51 */
|
||||
static void CopyArrayToRect(void) { /* 51 */
|
||||
/*
|
||||
vSrc の sw * sh の領域を vDst の dx,dy の位置にコピー
|
||||
|
||||
@@ -1222,7 +1223,7 @@ void CopyArrayToRect(void) { /* 51 */
|
||||
}
|
||||
}
|
||||
|
||||
void CopyRectToArray(void) { /* 52 */
|
||||
static void CopyRectToArray(void) { /* 52 */
|
||||
/*
|
||||
vSrc の sw * sh の領域を vDst の dx,dy の位置にコピー
|
||||
|
||||
@@ -1256,7 +1257,7 @@ void CopyRectToArray(void) { /* 52 */
|
||||
}
|
||||
}
|
||||
|
||||
void ChangeSecretArray(void) { /* 53 */
|
||||
static void ChangeSecretArray(void) { /* 53 */
|
||||
/*
|
||||
良く分からないが、データをコード化しているようだ
|
||||
|
||||
@@ -1340,3 +1341,62 @@ void ChangeSecretArray(void) { /* 53 */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"AddAtArray", AddAtArray},
|
||||
{"AndAndEquArray", AndAndEquArray},
|
||||
{"AndEquArray", AndEquArray},
|
||||
{"AndHighArray", AndHighArray},
|
||||
{"AndLowArray", AndLowArray},
|
||||
{"AndNotArray", AndNotArray},
|
||||
{"AndNumArray", AndNumArray},
|
||||
{"AndRangeArray", AndRangeArray},
|
||||
{"ChangeEquArray", ChangeEquArray},
|
||||
{"ChangeHighArray", ChangeHighArray},
|
||||
{"ChangeLowArray", ChangeLowArray},
|
||||
{"ChangeNotArray", ChangeNotArray},
|
||||
{"ChangeRangeArray", ChangeRangeArray},
|
||||
{"ChangeSecretArray", ChangeSecretArray},
|
||||
{"CopyArrayToRect", CopyArrayToRect},
|
||||
{"CopyRectToArray", CopyRectToArray},
|
||||
{"DivAtArray", DivAtArray},
|
||||
{"EnumEquArray", EnumEquArray},
|
||||
{"EnumEquArray2", EnumEquArray2},
|
||||
{"EnumEquNotArray2", EnumEquNotArray2},
|
||||
{"EnumHighArray", EnumHighArray},
|
||||
{"EnumLowArray", EnumLowArray},
|
||||
{"EnumNotArray", EnumNotArray},
|
||||
{"EnumNotArray2", EnumNotArray2},
|
||||
{"EnumRangeArray", EnumRangeArray},
|
||||
{"GetAtArray", GetAtArray},
|
||||
{"GrepEquArray", GrepEquArray},
|
||||
{"GrepEquArray2", GrepEquArray2},
|
||||
{"GrepEquNotArray2", GrepEquNotArray2},
|
||||
{"GrepHighArray", GrepHighArray},
|
||||
{"GrepHighOrderArray", GrepHighOrderArray},
|
||||
{"GrepLowArray", GrepLowArray},
|
||||
{"GrepLowOrderArray", GrepLowOrderArray},
|
||||
{"GrepNotArray", GrepNotArray},
|
||||
{"GrepNotArray2", GrepNotArray2},
|
||||
{"GrepRangeArray", GrepRangeArray},
|
||||
{"MaxAtArray", MaxAtArray},
|
||||
{"MinAtArray", MinAtArray},
|
||||
{"MulAtArray", MulAtArray},
|
||||
{"OrAndEquArray", OrAndEquArray},
|
||||
{"OrEquArray", OrEquArray},
|
||||
{"OrHighArray", OrHighArray},
|
||||
{"OrLowArray", OrLowArray},
|
||||
{"OrNotArray", OrNotArray},
|
||||
{"OrNumArray", OrNumArray},
|
||||
{"OrRangeArray", OrRangeArray},
|
||||
{"SetAndEquArray", SetAndEquArray},
|
||||
{"SetEquArray", SetEquArray},
|
||||
{"SetHighArray", SetHighArray},
|
||||
{"SetLowArray", SetLowArray},
|
||||
{"SetNotArray", SetNotArray},
|
||||
{"SetRangeArray", SetRangeArray},
|
||||
{"SubAtArray", SubAtArray},
|
||||
{"XorNumArray", XorNumArray},
|
||||
};
|
||||
|
||||
const Module module_ShArray = {"ShArray", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(ShCalc MODULE ShCalc.c)
|
||||
|
||||
install(TARGETS ShCalc DESTINATION lib/xsystem35)
|
||||
+52
-23
@@ -34,6 +34,7 @@
|
||||
#include "nact.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "randMT.h"
|
||||
|
||||
static int numbase;
|
||||
@@ -51,7 +52,7 @@ static int64_t div64(int64_t a1, int64_t a2) {
|
||||
return a1 / a2;
|
||||
}
|
||||
|
||||
void SetIntNumBase(void) { /* 0 */
|
||||
static void SetIntNumBase(void) { /* 0 */
|
||||
/*
|
||||
64 bit 演算のための倍数をセット
|
||||
|
||||
@@ -65,7 +66,7 @@ void SetIntNumBase(void) { /* 0 */
|
||||
|
||||
}
|
||||
|
||||
void SetIntNum16(void) { /* 1 */
|
||||
static void SetIntNum16(void) { /* 1 */
|
||||
/*
|
||||
64 bit 演算のための数値をセット
|
||||
|
||||
@@ -78,13 +79,13 @@ void SetIntNum16(void) { /* 1 */
|
||||
DEBUG_COMMAND("ShCalc.SetIntNum16 %p:\n", var);
|
||||
}
|
||||
|
||||
void SetIntNum32(void) { /* 2 */
|
||||
static void SetIntNum32(void) { /* 2 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShCalc.SetIntNum32: %d:\n", p1);
|
||||
}
|
||||
|
||||
void GetIntNum16(void) { /* 3 */
|
||||
static void GetIntNum16(void) { /* 3 */
|
||||
/*
|
||||
64 bit 演算した結果を得る
|
||||
|
||||
@@ -104,13 +105,13 @@ void GetIntNum16(void) { /* 3 */
|
||||
DEBUG_COMMAND("ShCalc.GetIntNum16 %d:\n", var);
|
||||
}
|
||||
|
||||
void GetIntNum32(void) { /* 4 */
|
||||
static void GetIntNum32(void) { /* 4 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShCalc.GetIntNum32: %d:\n", p1);
|
||||
}
|
||||
|
||||
void AddIntNum16(void) { /* 5 */
|
||||
static void AddIntNum16(void) { /* 5 */
|
||||
/*
|
||||
64 bit 加算
|
||||
|
||||
@@ -123,25 +124,25 @@ void AddIntNum16(void) { /* 5 */
|
||||
DEBUG_COMMAND("ShCalc.AddIntNum16 %p:\n", var);
|
||||
}
|
||||
|
||||
void AddIntNum32(void) { /* 6 */
|
||||
static void AddIntNum32(void) { /* 6 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShCalc.AddIntNum32: %d:\n", p1);
|
||||
}
|
||||
|
||||
void SubIntNum16(void) { /* 7 */
|
||||
static void SubIntNum16(void) { /* 7 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShCalc.SubIntNum16: %d:\n", p1);
|
||||
}
|
||||
|
||||
void SubIntNum32(void) { /* 8 */
|
||||
static void SubIntNum32(void) { /* 8 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShCalc.SubIntNum32: %d:\n", p1);
|
||||
}
|
||||
|
||||
void MulIntNum16(void) { /* 9 */
|
||||
static void MulIntNum16(void) { /* 9 */
|
||||
/*
|
||||
64 bit 乗算
|
||||
|
||||
@@ -154,13 +155,13 @@ void MulIntNum16(void) { /* 9 */
|
||||
DEBUG_COMMAND("ShCalc.MulIntNum16: %p:\n", var);
|
||||
}
|
||||
|
||||
void MulIntNum32(void) { /* 10 */
|
||||
static void MulIntNum32(void) { /* 10 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShCalc.MulIntNum32: %d:\n", p1);
|
||||
}
|
||||
|
||||
void DivIntNum16(void) { /* 11 */
|
||||
static void DivIntNum16(void) { /* 11 */
|
||||
/*
|
||||
64 bit 除算
|
||||
|
||||
@@ -177,13 +178,13 @@ void DivIntNum16(void) { /* 11 */
|
||||
DEBUG_COMMAND("ShCalc.DivIntNum16 %p:\n", var);
|
||||
}
|
||||
|
||||
void DivIntNum32(void) { /* 12 */
|
||||
static void DivIntNum32(void) { /* 12 */
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShCalc.DivIntNum32: %d:\n", p1);
|
||||
}
|
||||
|
||||
void CmpIntNum16(void) { /* 13 */
|
||||
static void CmpIntNum16(void) { /* 13 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -191,7 +192,7 @@ void CmpIntNum16(void) { /* 13 */
|
||||
DEBUG_COMMAND_YET("ShCalc.CmpIntNum16: %d,%d,%d:\n", p1, p2, p3);
|
||||
}
|
||||
|
||||
void CmpIntNum32(void) { /* 14 */
|
||||
static void CmpIntNum32(void) { /* 14 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -199,7 +200,7 @@ void CmpIntNum32(void) { /* 14 */
|
||||
DEBUG_COMMAND_YET("ShCalc.CmpIntNum32: %d,%d,%d:\n", p1, p2, p3);
|
||||
}
|
||||
|
||||
void GetLengthNum16(void) { /* 15 */
|
||||
static void GetLengthNum16(void) { /* 15 */
|
||||
/*
|
||||
数値の桁数を返す
|
||||
var: 数値
|
||||
@@ -223,14 +224,14 @@ void GetLengthNum16(void) { /* 15 */
|
||||
DEBUG_COMMAND("ShCalc.GetLengthNum16 %p,%p:\n", var, vResult);
|
||||
}
|
||||
|
||||
void GetLengthNum32(void) { /* 16 */
|
||||
static void GetLengthNum32(void) { /* 16 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShCalc.GetLengthNum32: %d,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void NumToRate(void) { /* 17 */
|
||||
static void NumToRate(void) { /* 17 */
|
||||
/*
|
||||
p1 * (p3/p2) の演算結果を返す。
|
||||
|
||||
@@ -262,7 +263,7 @@ void NumToRate(void) { /* 17 */
|
||||
|
||||
}
|
||||
|
||||
void NumToRateNum(void) { /* 18 */
|
||||
static void NumToRateNum(void) { /* 18 */
|
||||
/*
|
||||
p1 * (p2/p3) の演算結果を返す。
|
||||
|
||||
@@ -293,7 +294,7 @@ void NumToRateNum(void) { /* 18 */
|
||||
DEBUG_COMMAND("ShCalc.NumToRateNum %d,%d,%d,%d,%p:\n", p1, p2, p3, flag, vResult);
|
||||
}
|
||||
|
||||
void SetRandomSeed() {
|
||||
static void SetRandomSeed() {
|
||||
/*
|
||||
乱数の種の設定
|
||||
|
||||
@@ -306,7 +307,7 @@ void SetRandomSeed() {
|
||||
DEBUG_COMMAND("ShCalc.SetRandomSeed %d:\n", seed);
|
||||
}
|
||||
|
||||
void GetRandomNumA() {
|
||||
static void GetRandomNumA() {
|
||||
int num = getCaliValue();
|
||||
int *var = getCaliVariable();
|
||||
|
||||
@@ -319,7 +320,7 @@ void GetRandomNumA() {
|
||||
DEBUG_COMMAND("ShCalc.GetRandomNumA %d,%p:\n", num, var);
|
||||
}
|
||||
|
||||
void NumToBit() {
|
||||
static void NumToBit() {
|
||||
/*
|
||||
2^(beki-1)
|
||||
|
||||
@@ -341,7 +342,7 @@ void NumToBit() {
|
||||
DEBUG_COMMAND("ShCalc.NumToBit %d,%p:\n", beki, var);
|
||||
}
|
||||
|
||||
void BitToNum() {
|
||||
static void BitToNum() {
|
||||
/*
|
||||
val -> var
|
||||
1 -> 1
|
||||
@@ -374,3 +375,31 @@ void BitToNum() {
|
||||
(*var)++;
|
||||
}
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"AddIntNum16", AddIntNum16},
|
||||
{"AddIntNum32", AddIntNum32},
|
||||
{"BitToNum", BitToNum},
|
||||
{"CmpIntNum16", CmpIntNum16},
|
||||
{"CmpIntNum32", CmpIntNum32},
|
||||
{"DivIntNum16", DivIntNum16},
|
||||
{"DivIntNum32", DivIntNum32},
|
||||
{"GetIntNum16", GetIntNum16},
|
||||
{"GetIntNum32", GetIntNum32},
|
||||
{"GetLengthNum16", GetLengthNum16},
|
||||
{"GetLengthNum32", GetLengthNum32},
|
||||
{"GetRandomNumA", GetRandomNumA},
|
||||
{"MulIntNum16", MulIntNum16},
|
||||
{"MulIntNum32", MulIntNum32},
|
||||
{"NumToBit", NumToBit},
|
||||
{"NumToRate", NumToRate},
|
||||
{"NumToRateNum", NumToRateNum},
|
||||
{"SetIntNum16", SetIntNum16},
|
||||
{"SetIntNum32", SetIntNum32},
|
||||
{"SetIntNumBase", SetIntNumBase},
|
||||
{"SetRandomSeed", SetRandomSeed},
|
||||
{"SubIntNum16", SubIntNum16},
|
||||
{"SubIntNum32", SubIntNum32},
|
||||
};
|
||||
|
||||
const Module module_ShCalc = {"ShCalc", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(ShGraph MODULE ShGraph.c)
|
||||
|
||||
install(TARGETS ShGraph DESTINATION lib/xsystem35)
|
||||
+30
-12
@@ -32,6 +32,7 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
#include "ags.h"
|
||||
#include "counter.h"
|
||||
@@ -89,7 +90,7 @@ static struct _s2 s2[SLOT];
|
||||
static int* add_p5[SLOT]; /* どこまでアニメーションのコマが進んだか */
|
||||
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
/*
|
||||
モジュール初期化
|
||||
*/
|
||||
@@ -98,13 +99,13 @@ void Init() {
|
||||
DEBUG_COMMAND("ShGraph.Init %d:\n", p1);
|
||||
}
|
||||
|
||||
void GetSurfaceData() {
|
||||
static void GetSurfaceData() {
|
||||
int p1 = getCaliValue(); /* ISurface */
|
||||
|
||||
DEBUG_COMMAND_YET("ShGraph.GetSurfaceData %d:\n", p1);
|
||||
}
|
||||
|
||||
void ChangeEquColor() {
|
||||
static void ChangeEquColor() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -116,7 +117,7 @@ void ChangeEquColor() {
|
||||
DEBUG_COMMAND_YET("ShGraph.ChangeEquColor %d,%d,%d,%d,%p,%p,%d:\n", p1, p2, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
void ChangeNotColor() {
|
||||
static void ChangeNotColor() {
|
||||
/*
|
||||
指定の領域が src と等しくなければ dst に塗りつぶす
|
||||
|
||||
@@ -228,7 +229,7 @@ void ChangeNotColor() {
|
||||
lastslotが0の場合は 7 で指定したところまで。
|
||||
|
||||
*/
|
||||
void ResetAnimeData() {
|
||||
static void ResetAnimeData() {
|
||||
/*
|
||||
アニメーション用の各種データをクリア
|
||||
|
||||
@@ -253,7 +254,7 @@ void ResetAnimeData() {
|
||||
|
||||
}
|
||||
|
||||
void SetAnimeSrc() {
|
||||
static void SetAnimeSrc() {
|
||||
/*
|
||||
アニメーションの各パターンのソース領域の設定
|
||||
|
||||
@@ -296,7 +297,7 @@ void SetAnimeSrc() {
|
||||
src[no].b = b;
|
||||
}
|
||||
|
||||
void SetAnimeDst() {
|
||||
static void SetAnimeDst() {
|
||||
/*
|
||||
アニメーションの描画先設定
|
||||
|
||||
@@ -331,7 +332,7 @@ void SetAnimeDst() {
|
||||
s2[no].w_1000A8A2 = 0;
|
||||
}
|
||||
|
||||
void AddAnimeData() {
|
||||
static void AddAnimeData() {
|
||||
/*
|
||||
アニメーション各種設定
|
||||
|
||||
@@ -375,7 +376,7 @@ void AddAnimeData() {
|
||||
add_p5[i] = p5;
|
||||
}
|
||||
|
||||
void AddAnimeRemain() {
|
||||
static void AddAnimeRemain() {
|
||||
/*
|
||||
アニメーション各種設定
|
||||
|
||||
@@ -401,7 +402,7 @@ void AddAnimeRemain() {
|
||||
}
|
||||
}
|
||||
|
||||
void SetAnimeRect() {
|
||||
static void SetAnimeRect() {
|
||||
/*
|
||||
アニメーション描画領域設定
|
||||
|
||||
@@ -423,7 +424,7 @@ void SetAnimeRect() {
|
||||
maprect.height = h;
|
||||
}
|
||||
|
||||
void SetAnimeBack() {
|
||||
static void SetAnimeBack() {
|
||||
/*
|
||||
アニメーション背景領域設定
|
||||
|
||||
@@ -451,7 +452,7 @@ void SetAnimeBack() {
|
||||
mapback_p6 = p6;
|
||||
}
|
||||
|
||||
void PlayAnimeData() {
|
||||
static void PlayAnimeData() {
|
||||
/*
|
||||
実際にアニメーションを実行
|
||||
|
||||
@@ -641,3 +642,20 @@ static void copy_sprite(int sx, int sy, int width, int height, int dx, int dy, i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"AddAnimeData", AddAnimeData},
|
||||
{"AddAnimeRemain", AddAnimeRemain},
|
||||
{"ChangeEquColor", ChangeEquColor},
|
||||
{"ChangeNotColor", ChangeNotColor},
|
||||
{"GetSurfaceData", GetSurfaceData},
|
||||
{"Init", Init},
|
||||
{"PlayAnimeData", PlayAnimeData},
|
||||
{"ResetAnimeData", ResetAnimeData},
|
||||
{"SetAnimeBack", SetAnimeBack},
|
||||
{"SetAnimeDst", SetAnimeDst},
|
||||
{"SetAnimeRect", SetAnimeRect},
|
||||
{"SetAnimeSrc", SetAnimeSrc},
|
||||
};
|
||||
|
||||
const Module module_ShGraph = {"ShGraph", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(ShPort MODULE ShPort.c)
|
||||
|
||||
install(TARGETS ShPort DESTINATION lib/xsystem35)
|
||||
+23
-9
@@ -34,13 +34,14 @@
|
||||
#include "nact.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "graphicsdevice.h"
|
||||
|
||||
// キー変換テーブル
|
||||
#define KEYMAP_MAX 8
|
||||
static BYTE *keymap[KEYMAP_MAX];
|
||||
|
||||
void OutputMessageBox(void) { /* 0 */
|
||||
static void OutputMessageBox(void) { /* 0 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -51,7 +52,7 @@ void OutputMessageBox(void) { /* 0 */
|
||||
DEBUG_COMMAND_YET("ShPort.OutputMessageBox: %d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p3, p4, p5, p6);
|
||||
}
|
||||
|
||||
void InputListNum(void) { /* 1 */
|
||||
static void InputListNum(void) { /* 1 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -68,7 +69,7 @@ void InputListNum(void) { /* 1 */
|
||||
* ShPortサブシステム全体の初期化
|
||||
* @param p1: ISys3x
|
||||
*/
|
||||
void Init(void) {
|
||||
static void Init(void) {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShPort.Init: %d:\n", p1);
|
||||
@@ -79,7 +80,7 @@ void Init(void) {
|
||||
* 指定のキーコードマップの初期化
|
||||
* @param no: キーコードマップの番号(1~)
|
||||
*/
|
||||
void InitKeyStatus(void) {
|
||||
static void InitKeyStatus(void) {
|
||||
int no = getCaliValue();
|
||||
|
||||
if (no >= KEYMAP_MAX) {
|
||||
@@ -103,7 +104,7 @@ void InitKeyStatus(void) {
|
||||
* @param key: キーコード
|
||||
* @param func: 機能キーコード
|
||||
*/
|
||||
void SetKeyStatus(void) {
|
||||
static void SetKeyStatus(void) {
|
||||
int no = getCaliValue();
|
||||
int key = getCaliValue();
|
||||
int func = getCaliValue();
|
||||
@@ -124,7 +125,7 @@ void SetKeyStatus(void) {
|
||||
* @param no: マップ番号
|
||||
* @param var: 押下キーに対応する機能コードを返す変数
|
||||
*/
|
||||
void GetKeyStatus(void) {
|
||||
static void GetKeyStatus(void) {
|
||||
int no = getCaliValue();
|
||||
int *var = getCaliVariable();
|
||||
int i;
|
||||
@@ -142,7 +143,7 @@ void GetKeyStatus(void) {
|
||||
DEBUG_COMMAND("ShPort.GetKeyStatus: %d,%p:\n", no, var);
|
||||
}
|
||||
|
||||
void InputListString(void) {
|
||||
static void InputListString(void) {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -154,7 +155,7 @@ void InputListString(void) {
|
||||
DEBUG_COMMAND_YET("ShPort.InputListString: %d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
void InputOpenFile(void) {
|
||||
static void InputOpenFile(void) {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -166,7 +167,7 @@ void InputOpenFile(void) {
|
||||
DEBUG_COMMAND_YET("ShPort.InputOpenFile: %d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
void InputSaveFile(void) {
|
||||
static void InputSaveFile(void) {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -178,3 +179,16 @@ void InputSaveFile(void) {
|
||||
DEBUG_COMMAND_YET("ShPort.InputSaveFile: %d,%d,%d,%d,%d,%d,%d:\n", p1, p2, p3, p3, p4, p5, p6, p7);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"GetKeyStatus", GetKeyStatus},
|
||||
{"Init", Init},
|
||||
{"InitKeyStatus", InitKeyStatus},
|
||||
{"InputListNum", InputListNum},
|
||||
{"InputListString", InputListString},
|
||||
{"InputOpenFile", InputOpenFile},
|
||||
{"InputSaveFile", InputSaveFile},
|
||||
{"OutputMessageBox", OutputMessageBox},
|
||||
{"SetKeyStatus", SetKeyStatus},
|
||||
};
|
||||
|
||||
const Module module_ShPort = {"ShPort", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
add_library(ShSound MODULE ShSound.c)
|
||||
if (SDL2MIXER_FOUND)
|
||||
target_link_libraries(ShSound PRIVATE PkgConfig::SDL2MIXER)
|
||||
endif()
|
||||
|
||||
install(TARGETS ShSound DESTINATION lib/xsystem35)
|
||||
+38
-16
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
#include "dri.h"
|
||||
#include "ald_manager.h"
|
||||
@@ -41,7 +42,7 @@
|
||||
static Mix_Chunk *chunk;
|
||||
#endif
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
/*
|
||||
モジュール初期化
|
||||
*/
|
||||
@@ -50,7 +51,7 @@ void Init() {
|
||||
DEBUG_COMMAND("ShSound.Init %d:\n", p1);
|
||||
}
|
||||
|
||||
void wavLoad() {
|
||||
static void wavLoad() {
|
||||
/*
|
||||
指定のスロットにPCMファイルをロード
|
||||
|
||||
@@ -65,7 +66,7 @@ void wavLoad() {
|
||||
mus_wav_load(slot, no);
|
||||
}
|
||||
|
||||
void wavUnload() {
|
||||
static void wavUnload() {
|
||||
/*
|
||||
指定のスロットのPCMファイルを削除
|
||||
|
||||
@@ -78,7 +79,7 @@ void wavUnload() {
|
||||
DEBUG_COMMAND("ShSound.wavUnload %d:\n",slot);
|
||||
}
|
||||
|
||||
void wavUnloadRange() {
|
||||
static void wavUnloadRange() {
|
||||
/*
|
||||
指定のスロット(複数)のPCMファイルを削除
|
||||
|
||||
@@ -96,7 +97,7 @@ void wavUnloadRange() {
|
||||
DEBUG_COMMAND("ShSound.wavUnloadRange %d,%d:\n", slot, range);
|
||||
}
|
||||
|
||||
void wavUnloadAll() {
|
||||
static void wavUnloadAll() {
|
||||
/*
|
||||
すべてのスロットのPCMファイルを削除
|
||||
*/
|
||||
@@ -109,7 +110,7 @@ void wavUnloadAll() {
|
||||
DEBUG_COMMAND("ShSound.wavUnloadAll:\n");
|
||||
}
|
||||
|
||||
void wavLoadMemory() {
|
||||
static void wavLoadMemory() {
|
||||
/*
|
||||
指定の番号の WAV ファイルをメモリ上に読み込み
|
||||
|
||||
@@ -124,7 +125,7 @@ void wavLoadMemory() {
|
||||
DEBUG_COMMAND("ShSound.wavLoadMemory %d:\n", no);
|
||||
}
|
||||
|
||||
void wavSendMemory() {
|
||||
static void wavSendMemory() {
|
||||
/*
|
||||
wavLoadMemory で読み込んだデータを指定のスロットに投入
|
||||
|
||||
@@ -142,7 +143,7 @@ void wavSendMemory() {
|
||||
DEBUG_COMMAND("ShSound.wavSendMemory %d:\n", slot);
|
||||
}
|
||||
|
||||
void wavFadeVolumeMemory() {
|
||||
static void wavFadeVolumeMemory() {
|
||||
/*
|
||||
wavLoadMemory で読み込んだデータのボリュームのフェード
|
||||
|
||||
@@ -161,7 +162,7 @@ void wavFadeVolumeMemory() {
|
||||
DEBUG_COMMAND("ShSound.wavFadeVolumeMemory %d,%d:\n", start, range);
|
||||
}
|
||||
|
||||
void wavReversePanMemory() {
|
||||
static void wavReversePanMemory() {
|
||||
/*
|
||||
wavLoadMemoryで読み込んだデータの左右のチャンネルを反転
|
||||
*/
|
||||
@@ -175,7 +176,7 @@ void wavReversePanMemory() {
|
||||
DEBUG_COMMAND("ShSound.wavReversePanMemory:\n");
|
||||
}
|
||||
|
||||
void wavPlay() {
|
||||
static void wavPlay() {
|
||||
/*
|
||||
指定のスロットのPCMを再生
|
||||
|
||||
@@ -190,7 +191,7 @@ void wavPlay() {
|
||||
DEBUG_COMMAND("ShSound.wavPlay %d, %d:\n", slot, loop);
|
||||
}
|
||||
|
||||
void wavPlayRing() {
|
||||
static void wavPlayRing() {
|
||||
/*
|
||||
指定の範囲のスロットのPCMを呼ばれる毎に繰り返し
|
||||
|
||||
@@ -208,7 +209,7 @@ void wavPlayRing() {
|
||||
DEBUG_COMMAND("ShSound.wavPlayRing %d,%d,%d:\n", start, cnt, *cur);
|
||||
}
|
||||
|
||||
void wavStop() {
|
||||
static void wavStop() {
|
||||
/*
|
||||
指定のスロットの再生を停止
|
||||
|
||||
@@ -221,7 +222,7 @@ void wavStop() {
|
||||
mus_wav_stop(slot);
|
||||
}
|
||||
|
||||
void wavStopAll() {
|
||||
static void wavStopAll() {
|
||||
/*
|
||||
全てのスロットの再生を停止
|
||||
*/
|
||||
@@ -234,7 +235,7 @@ void wavStopAll() {
|
||||
DEBUG_COMMAND("ShSound.wavStopAll:\n");
|
||||
}
|
||||
|
||||
void wavPause() {
|
||||
static void wavPause() {
|
||||
/*
|
||||
指定のスロットの再生を一時停止
|
||||
|
||||
@@ -245,7 +246,7 @@ void wavPause() {
|
||||
DEBUG_COMMAND_YET("ShSound.wavPause %d:\n", slot);
|
||||
}
|
||||
|
||||
void wavIsPlay() {
|
||||
static void wavIsPlay() {
|
||||
/*
|
||||
指定のスロットが再生中かどうかを調べる
|
||||
|
||||
@@ -260,7 +261,7 @@ void wavIsPlay() {
|
||||
DEBUG_COMMAND("ShSound.wavIsPlay %d,%p:\n", slot, result);
|
||||
}
|
||||
|
||||
void wavIsPlayRange() {
|
||||
static void wavIsPlayRange() {
|
||||
/*
|
||||
指定の範囲のスロットが再生中かどうかを調べる
|
||||
|
||||
@@ -281,3 +282,24 @@ void wavIsPlayRange() {
|
||||
|
||||
DEBUG_COMMAND("ShSound.wavIsPlayRange %d,%d,%p:\n", slot, range, result);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"wavFadeVolumeMemory", wavFadeVolumeMemory},
|
||||
{"wavIsPlay", wavIsPlay},
|
||||
{"wavIsPlayRange", wavIsPlayRange},
|
||||
{"wavLoad", wavLoad},
|
||||
{"wavLoadMemory", wavLoadMemory},
|
||||
{"wavPause", wavPause},
|
||||
{"wavPlay", wavPlay},
|
||||
{"wavPlayRing", wavPlayRing},
|
||||
{"wavReversePanMemory", wavReversePanMemory},
|
||||
{"wavSendMemory", wavSendMemory},
|
||||
{"wavStop", wavStop},
|
||||
{"wavStopAll", wavStopAll},
|
||||
{"wavUnload", wavUnload},
|
||||
{"wavUnloadAll", wavUnloadAll},
|
||||
{"wavUnloadRange", wavUnloadRange},
|
||||
};
|
||||
|
||||
const Module module_ShSound = {"ShSound", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(ShString MODULE ShString.c)
|
||||
|
||||
install(TARGETS ShString DESTINATION lib/xsystem35)
|
||||
+26
-10
@@ -34,10 +34,11 @@
|
||||
#include "nact.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "variable.h"
|
||||
#include "ags.h"
|
||||
|
||||
void ExchangeString(void) {
|
||||
static void ExchangeString(void) {
|
||||
/*
|
||||
文字列(target)中の一部(pat)を別の文字列(patr)で置き換える
|
||||
*/
|
||||
@@ -66,35 +67,35 @@ void ExchangeString(void) {
|
||||
v_strcpy(target -1, dst);
|
||||
}
|
||||
|
||||
void SetNum16String(void) { /* 1 */
|
||||
static void SetNum16String(void) { /* 1 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShString.SetNum16String: %d,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void SetNum16HalfString(void) { /* 2 */
|
||||
static void SetNum16HalfString(void) { /* 2 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShString.SetNum16HalfString: %d,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void SetNum32String(void) { /* 3 */
|
||||
static void SetNum32String(void) { /* 3 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShString.SetNum32String: %d,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void SetNum32HalfString(void) { /* 4 */
|
||||
static void SetNum32HalfString(void) { /* 4 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("ShString.SetNum32HalfString: %d,%d:\n", p1, p2);
|
||||
}
|
||||
|
||||
void GetArrayString(void) { /* 5 */
|
||||
static void GetArrayString(void) { /* 5 */
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -102,7 +103,7 @@ void GetArrayString(void) { /* 5 */
|
||||
DEBUG_COMMAND_YET("ShString.GetArrayString: %d,%d,%d:\n", p1, p2, p3);
|
||||
}
|
||||
|
||||
void SetWindowTitle(void) { /* 6 */
|
||||
static void SetWindowTitle(void) { /* 6 */
|
||||
int strno = getCaliValue();
|
||||
int p2 = getCaliValue(); /* ISys3xSystem */
|
||||
|
||||
@@ -111,7 +112,7 @@ void SetWindowTitle(void) { /* 6 */
|
||||
DEBUG_COMMAND("ShString.SetWindowTitle: %d,%d:\n", strno, p2);
|
||||
}
|
||||
|
||||
void FillString() {
|
||||
static void FillString() {
|
||||
/*
|
||||
指定の番号の文字列を他の文字列にコピー
|
||||
|
||||
@@ -133,7 +134,7 @@ void FillString() {
|
||||
DEBUG_COMMAND("ShString.FillString: %d,%d,%d,%d:\n", st, cnt, src, p4);
|
||||
}
|
||||
|
||||
void SetStringNum16(void) {
|
||||
static void SetStringNum16(void) {
|
||||
/*
|
||||
文字列を数値に変換
|
||||
大文字、小文字、混在可
|
||||
@@ -173,9 +174,24 @@ void SetStringNum16(void) {
|
||||
*var = atoi(_dst);
|
||||
}
|
||||
|
||||
void SetStringNum32(void) {
|
||||
static void SetStringNum32(void) {
|
||||
int p1 = getCaliValue();
|
||||
int *p2 = getCaliVariable();
|
||||
|
||||
DEBUG_COMMAND_YET("ShString.SetStringNum32: %d,%p:\n", p1, p2);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"ExchangeString", ExchangeString},
|
||||
{"FillString", FillString},
|
||||
{"GetArrayString", GetArrayString},
|
||||
{"SetNum16HalfString", SetNum16HalfString},
|
||||
{"SetNum16String", SetNum16String},
|
||||
{"SetNum32HalfString", SetNum32HalfString},
|
||||
{"SetNum32String", SetNum32String},
|
||||
{"SetStringNum16", SetStringNum16},
|
||||
{"SetStringNum32", SetStringNum32},
|
||||
{"SetWindowTitle", SetWindowTitle},
|
||||
};
|
||||
|
||||
const Module module_ShString = {"ShString", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
add_library(dDemo MODULE dDemo.c)
|
||||
|
||||
target_link_libraries(dDemo PRIVATE graph alk)
|
||||
|
||||
install(TARGETS dDemo DESTINATION lib/xsystem35)
|
||||
+14
-4
@@ -7,6 +7,7 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
#include "input.h"
|
||||
#include "music.h"
|
||||
@@ -17,7 +18,7 @@ static struct ddemo dd;
|
||||
#include "scene.c"
|
||||
#endif
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -31,20 +32,20 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("dDemo.Init %d,%d,%d,%p:\n", p1, p2, p3, var);
|
||||
}
|
||||
|
||||
void SetKeyCancelFlag() {
|
||||
static void SetKeyCancelFlag() {
|
||||
int cancelflag = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("dDemo.SetKeyCancelFlag %d:\n", cancelflag);
|
||||
}
|
||||
|
||||
void SetLoopFlag() {
|
||||
static void SetLoopFlag() {
|
||||
/* Loop Flag */
|
||||
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
|
||||
|
||||
DEBUG_COMMAND_YET("dDemo.SetLoopFlag %d:\n", loopflag);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
static void Run() {
|
||||
DEBUG_COMMAND_YET("dDemo.Run:\n");
|
||||
|
||||
#ifdef DDEMODEV
|
||||
@@ -58,3 +59,12 @@ void Run() {
|
||||
mus_cdrom_stop();
|
||||
#endif
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"Run", Run},
|
||||
{"SetKeyCancelFlag", SetKeyCancelFlag},
|
||||
{"SetLoopFlag", SetLoopFlag},
|
||||
};
|
||||
|
||||
const Module module_dDemo = {"dDemo", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(eDemo MODULE eDemo.c)
|
||||
|
||||
install(TARGETS eDemo DESTINATION lib/xsystem35)
|
||||
+16
-5
@@ -5,10 +5,11 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -19,26 +20,36 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("eDEMO.Init %d,%d,%d,%p:\n", p1, p2, p3, var);
|
||||
}
|
||||
|
||||
void SetKeyCancelFlag() {
|
||||
static void SetKeyCancelFlag() {
|
||||
int cancelflag = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("eDEMO.SetKeyCancelFlag %d:\n", cancelflag);
|
||||
}
|
||||
|
||||
void SetLoopFlag() {
|
||||
static void SetLoopFlag() {
|
||||
/* Loop Flag */
|
||||
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
|
||||
|
||||
DEBUG_COMMAND_YET("eDEMO.SetLoopFlag %d:\n", loopflag);
|
||||
}
|
||||
|
||||
void SetDrawStaffFlag() {
|
||||
static void SetDrawStaffFlag() {
|
||||
/* Loop Flag */
|
||||
int staffflag = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("eDEMO.SetDrawStaffFlag %d:\n", staffflag);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
static void Run() {
|
||||
DEBUG_COMMAND_YET("eDEMO.Run:\n");
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"Run", Run},
|
||||
{"SetDrawStaffFlag", SetDrawStaffFlag},
|
||||
{"SetKeyCancelFlag", SetKeyCancelFlag},
|
||||
{"SetLoopFlag", SetLoopFlag},
|
||||
};
|
||||
|
||||
const Module module_eDemo = {"eDemo", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(eeDemo MODULE eeDemo.c)
|
||||
|
||||
install(TARGETS eeDemo DESTINATION lib/xsystem35)
|
||||
+14
-4
@@ -5,10 +5,11 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -19,21 +20,30 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("eeDEMO.Init %d,%d,%d,%p:\n", p1, p2, p3, var);
|
||||
}
|
||||
|
||||
void SetKeyCancelFlag() {
|
||||
static void SetKeyCancelFlag() {
|
||||
int cancelflag = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("eeDEMO.SetKeyCancelFlag %d:\n", cancelflag);
|
||||
}
|
||||
|
||||
void SetLoopFlag() {
|
||||
static void SetLoopFlag() {
|
||||
/* Loop Flag */
|
||||
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
|
||||
|
||||
DEBUG_COMMAND_YET("eeDEMO.SetLoopFlag %d:\n", loopflag);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
static void Run() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("eeDEMO.Run %d:\n", p1);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"Run", Run},
|
||||
{"SetKeyCancelFlag", SetKeyCancelFlag},
|
||||
{"SetLoopFlag", SetLoopFlag},
|
||||
};
|
||||
|
||||
const Module module_eeDemo = {"eeDemo", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
add_library(graph STATIC
|
||||
graph.c
|
||||
surface.c
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (C) 2020 <KichikuouChrome@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "s39ain.h"
|
||||
#include "modules.h"
|
||||
|
||||
static const Module *modules[] = {
|
||||
&module_AliceLogo,
|
||||
&module_Confirm,
|
||||
&module_Gpx,
|
||||
&module_Math,
|
||||
&module_MsgSkip,
|
||||
&module_NIGHTDLL,
|
||||
&module_NightDemonDemo,
|
||||
&module_RandMT,
|
||||
&module_SACT,
|
||||
&module_ShArray,
|
||||
&module_ShCalc,
|
||||
&module_ShGraph,
|
||||
&module_ShPort,
|
||||
&module_ShSound,
|
||||
&module_ShString,
|
||||
&module_dDemo,
|
||||
&module_eDemo,
|
||||
&module_eeDemo,
|
||||
&module_nDEMO,
|
||||
&module_nDEMOE,
|
||||
&module_oDEMO,
|
||||
&module_oujimisc,
|
||||
&module_tDemo,
|
||||
NULL
|
||||
};
|
||||
|
||||
static int compare_name(const void *f1, const void *f2) {
|
||||
return strcmp(((const ModuleFunc *)f1)->name,
|
||||
((const ModuleFunc *)f2)->name);
|
||||
}
|
||||
|
||||
static void resolve_func(S39AIN_DLLFN *func, const Module *mod) {
|
||||
ModuleFunc key = {.name = func->name};
|
||||
ModuleFunc *mf = bsearch(&key, mod->funcs, mod->nfunc, sizeof(ModuleFunc), compare_name);
|
||||
|
||||
if (mf)
|
||||
func->entrypoint = mf->entrypoint;
|
||||
else
|
||||
WARNING("Cannot resolve DLL function %s.%s\n", mod->name, func->name);
|
||||
}
|
||||
|
||||
int resolve_module(S39AIN_DLLINF *dll) {
|
||||
if (dll->function_num == 0)
|
||||
return OK;
|
||||
|
||||
for (const Module **mod = modules; *mod; mod++) {
|
||||
if (strcasecmp((*mod)->name, dll->name) == 0) {
|
||||
for (int i = 0; i < dll->function_num; i++)
|
||||
resolve_func(&dll->function[i], *mod);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
WARNING("Cannot resolve DLL: %s\n", dll->name);
|
||||
return NG;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (C) 2020 <KichikuouChrome@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MODULES_H__
|
||||
#define __MODULES_H__
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
void (*entrypoint)(void);
|
||||
} ModuleFunc;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const ModuleFunc *funcs; // must be sorted by name
|
||||
int nfunc;
|
||||
} Module;
|
||||
|
||||
extern const Module module_AliceLogo;
|
||||
extern const Module module_Confirm;
|
||||
extern const Module module_Gpx;
|
||||
extern const Module module_Math;
|
||||
extern const Module module_MsgSkip;
|
||||
extern const Module module_NIGHTDLL;
|
||||
extern const Module module_NightDemonDemo;
|
||||
extern const Module module_RandMT;
|
||||
extern const Module module_SACT;
|
||||
extern const Module module_ShArray;
|
||||
extern const Module module_ShCalc;
|
||||
extern const Module module_ShGraph;
|
||||
extern const Module module_ShPort;
|
||||
extern const Module module_ShSound;
|
||||
extern const Module module_ShString;
|
||||
extern const Module module_dDemo;
|
||||
extern const Module module_eDemo;
|
||||
extern const Module module_eeDemo;
|
||||
extern const Module module_nDEMO;
|
||||
extern const Module module_nDEMOE;
|
||||
extern const Module module_oDEMO;
|
||||
extern const Module module_oujimisc;
|
||||
extern const Module module_tDemo;
|
||||
|
||||
struct S39AIN_DLLINF;
|
||||
int resolve_module(struct S39AIN_DLLINF *dll);
|
||||
|
||||
#endif /* __MODULES_H__ */
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(nDEMO MODULE nDEMO.c)
|
||||
|
||||
install(TARGETS nDEMO DESTINATION lib/xsystem35)
|
||||
+13
-4
@@ -5,9 +5,10 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue(); /* ISys3x */
|
||||
int p2 = getCaliValue(); /* IWinMsg */
|
||||
int p3 = getCaliValue(); /* ITimer */
|
||||
@@ -18,19 +19,27 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("nDEMO.Init %p:\n", var);
|
||||
}
|
||||
|
||||
void SetKeyCancelFlag() {
|
||||
static void SetKeyCancelFlag() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("nDEMO.SetKeyCancelFlag %d:\n", p1);
|
||||
}
|
||||
|
||||
void SetLoopFlag() {
|
||||
static void SetLoopFlag() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("nDEMO.SetLoopFlag %d:\n", p1);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
static void Run() {
|
||||
DEBUG_COMMAND_YET("nDEMO.Run:\n");
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"Run", Run},
|
||||
{"SetKeyCancelFlag", SetKeyCancelFlag},
|
||||
{"SetLoopFlag", SetLoopFlag},
|
||||
};
|
||||
|
||||
const Module module_nDEMO = {"nDEMO", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(nDEMOE MODULE nDEMOE.c)
|
||||
|
||||
install(TARGETS nDEMOE DESTINATION lib/xsystem35)
|
||||
+11
-3
@@ -5,9 +5,10 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -16,13 +17,20 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("nDEMOE.Init %p:\n", var);
|
||||
}
|
||||
|
||||
void SetKeyCancelFlag() {
|
||||
static void SetKeyCancelFlag() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("nDEMOE.SetKeyCancelFlag %d:\n", p1);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
static void Run() {
|
||||
DEBUG_COMMAND_YET("nDEMOE.Run:\n");
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"Run", Run},
|
||||
{"SetKeyCancelFlag", SetKeyCancelFlag},
|
||||
};
|
||||
|
||||
const Module module_nDEMOE = {"nDEMOE", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(oDEMO MODULE oDEMO.c)
|
||||
|
||||
install(TARGETS oDEMO DESTINATION lib/xsystem35)
|
||||
+14
-4
@@ -5,10 +5,11 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -19,19 +20,28 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("oDEMO.Init %d,%d,%d,%p:\n", p1, p2, p3, var);
|
||||
}
|
||||
|
||||
void SetKeyCancelFlag() {
|
||||
static void SetKeyCancelFlag() {
|
||||
int cancelflag = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("oDEMO.SetKeyCancelFlag %d:\n", cancelflag);
|
||||
}
|
||||
|
||||
void SetLoopFlag() {
|
||||
static void SetLoopFlag() {
|
||||
/* Loop Flag */
|
||||
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
|
||||
|
||||
DEBUG_COMMAND_YET("oDEMO.SetLoopFlag %d:\n", loopflag);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
static void Run() {
|
||||
DEBUG_COMMAND_YET("oDEMO.Run:\n");
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"Run", Run},
|
||||
{"SetKeyCancelFlag", SetKeyCancelFlag},
|
||||
{"SetLoopFlag", SetLoopFlag},
|
||||
};
|
||||
|
||||
const Module module_oDEMO = {"oDEMO", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(oujimisc MODULE oujimisc.c)
|
||||
|
||||
install(TARGETS oujimisc DESTINATION lib/xsystem35)
|
||||
+30
-12
@@ -5,9 +5,10 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
void MakeMapSetParam() {
|
||||
static void MakeMapSetParam() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -16,7 +17,7 @@ void MakeMapSetParam() {
|
||||
DEBUG_COMMAND_YET("oujimisc.MakeMapSetParam %d,%d,%d,%d:\n", p1,p2,p3,p4);
|
||||
}
|
||||
|
||||
void MakeMapSetChipParam() {
|
||||
static void MakeMapSetChipParam() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -27,7 +28,7 @@ void MakeMapSetChipParam() {
|
||||
|
||||
}
|
||||
|
||||
void MakeMapDraw() {
|
||||
static void MakeMapDraw() {
|
||||
int p1 = getCaliValue(); /* ISys3xDIB */
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -40,13 +41,13 @@ void MakeMapDraw() {
|
||||
DEBUG_COMMAND_YET("oujimisc.MakeMapDraw %d,%d,%d,%d,%d,%p,%p,%p:\n", p1,p2,p3,p4,p5,p6,p7,p8);
|
||||
}
|
||||
|
||||
void MakeMapInit() {
|
||||
static void MakeMapInit() {
|
||||
int p1 = getCaliValue(); /* ISys3x */
|
||||
|
||||
DEBUG_COMMAND_YET("oujimisc.MakeMapInit %d:\n", p1);
|
||||
}
|
||||
|
||||
void DrawNumber() {
|
||||
static void DrawNumber() {
|
||||
int p1 = getCaliValue(); /* ISys3xDIB */
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -59,18 +60,18 @@ void DrawNumber() {
|
||||
DEBUG_COMMAND_YET("oujimisc.DrawNumber %d,%d,%d,%d,%d,%d,%d,%d:\n", p1,p2,p3,p4,p5,p6,p7,p8);
|
||||
}
|
||||
|
||||
void TempMapCreateShadow() {
|
||||
static void TempMapCreateShadow() {
|
||||
DEBUG_COMMAND_YET("oujimisc.TempMapCreateShadow:\n");
|
||||
}
|
||||
|
||||
void TempMapInit() {
|
||||
static void TempMapInit() {
|
||||
int p1 = getCaliValue(); /* ISys3x */
|
||||
int p2 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("oujimisc.TempMapInit %d,%d:\n", p1,p2);
|
||||
}
|
||||
|
||||
void TempMapLoadToShadow() {
|
||||
static void TempMapLoadToShadow() {
|
||||
int p1 = getCaliValue();
|
||||
int *p2 = getCaliVariable();
|
||||
int *p3 = getCaliVariable();
|
||||
@@ -80,7 +81,7 @@ void TempMapLoadToShadow() {
|
||||
DEBUG_COMMAND_YET("oujimisc.TempMapLoadToShadow %d,%p,%p,%p,%d:\n", p1,p2,p3,p4,p5);
|
||||
}
|
||||
|
||||
void TempMapSaveToShadow() {
|
||||
static void TempMapSaveToShadow() {
|
||||
int p1 = getCaliValue();
|
||||
int *p2 = getCaliVariable();
|
||||
int *p3 = getCaliVariable();
|
||||
@@ -90,19 +91,19 @@ void TempMapSaveToShadow() {
|
||||
DEBUG_COMMAND_YET("oujimisc.TempMapSaveToShadow %d,%p,%p,%p,%d:\n", p1,p2,p3,p4,p5);
|
||||
}
|
||||
|
||||
void TempMapFileSave() {
|
||||
static void TempMapFileSave() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("oujimisc.TempMapFileSave %d:\n", p1);
|
||||
}
|
||||
|
||||
void TempMapFileLoad() {
|
||||
static void TempMapFileLoad() {
|
||||
int p1 = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("oujimisc.TempMapFileLoad %d:\n", p1);
|
||||
}
|
||||
|
||||
void CalcMoveDiffer() {
|
||||
static void CalcMoveDiffer() {
|
||||
int *p1 = getCaliVariable();
|
||||
int *p2 = getCaliVariable();
|
||||
int p3 = getCaliValue();
|
||||
@@ -114,3 +115,20 @@ void CalcMoveDiffer() {
|
||||
|
||||
DEBUG_COMMAND_YET("oujimisc.CalcMoveDiffer %p,%p,%d,%d,%d,%d,%p,%d:\n", p1,p2,p3,p4,p5,p6,p7,p8);
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"CalcMoveDiffer", CalcMoveDiffer},
|
||||
{"DrawNumber", DrawNumber},
|
||||
{"MakeMapDraw", MakeMapDraw},
|
||||
{"MakeMapInit", MakeMapInit},
|
||||
{"MakeMapSetChipParam", MakeMapSetChipParam},
|
||||
{"MakeMapSetParam", MakeMapSetParam},
|
||||
{"TempMapCreateShadow", TempMapCreateShadow},
|
||||
{"TempMapFileLoad", TempMapFileLoad},
|
||||
{"TempMapFileSave", TempMapFileSave},
|
||||
{"TempMapInit", TempMapInit},
|
||||
{"TempMapLoadToShadow", TempMapLoadToShadow},
|
||||
{"TempMapSaveToShadow", TempMapSaveToShadow},
|
||||
};
|
||||
|
||||
const Module module_oujimisc = {"oujimisc", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(tDemo MODULE tDemo.c)
|
||||
|
||||
install(TARGETS tDemo DESTINATION lib/xsystem35)
|
||||
+13
-4
@@ -5,9 +5,10 @@
|
||||
#include "portab.h"
|
||||
#include "system.h"
|
||||
#include "xsystem35.h"
|
||||
#include "modules.h"
|
||||
#include "nact.h"
|
||||
|
||||
void Init() {
|
||||
static void Init() {
|
||||
int p1 = getCaliValue();
|
||||
int p2 = getCaliValue();
|
||||
int p3 = getCaliValue();
|
||||
@@ -18,20 +19,28 @@ void Init() {
|
||||
DEBUG_COMMAND_YET("tDemo.Init %d,%d,%d,%p:\n", p1, p2, p3, var);
|
||||
}
|
||||
|
||||
void SetKeyCancelFlag() {
|
||||
static void SetKeyCancelFlag() {
|
||||
int cancelflag = getCaliValue();
|
||||
|
||||
DEBUG_COMMAND_YET("tDemo.SetKeyCancelFlag %d:\n", cancelflag);
|
||||
}
|
||||
|
||||
void SetLoopFlag() {
|
||||
static void SetLoopFlag() {
|
||||
/* Loop Flag */
|
||||
int loopflag = getCaliValue(); /* 0 なら無限繰り返し */
|
||||
|
||||
DEBUG_COMMAND_YET("tDemo.SetLoopFlag %d:\n", loopflag);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
static void Run() {
|
||||
DEBUG_COMMAND_YET("tDemo.Run:\n");
|
||||
}
|
||||
|
||||
static const ModuleFunc functions[] = {
|
||||
{"Init", Init},
|
||||
{"Run", Run},
|
||||
{"SetKeyCancelFlag", SetKeyCancelFlag},
|
||||
{"SetLoopFlag", SetLoopFlag},
|
||||
};
|
||||
|
||||
const Module module_tDemo = {"tDemo", functions, sizeof(functions) / sizeof(ModuleFunc)};
|
||||
|
||||
+5
-5
@@ -3,9 +3,9 @@ gettext_create_translations(xsystem35.pot ALL ja.po)
|
||||
|
||||
add_custom_target(pot
|
||||
xgettext --default-domain=${PACKAGE} --directory=${CMAKE_SOURCE_DIR}
|
||||
--keyword=_ --keyword=N_
|
||||
--files-from=${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in
|
||||
--copyright-holder='Masaki Chikama'
|
||||
--output=${CMAKE_CURRENT_SOURCE_DIR}/xsystem35.pot
|
||||
)
|
||||
--keyword=_ --keyword=N_
|
||||
--files-from=${CMAKE_CURRENT_SOURCE_DIR}/POTFILES.in
|
||||
--copyright-holder='Masaki Chikama'
|
||||
--output=${CMAKE_CURRENT_SOURCE_DIR}/xsystem35.pot
|
||||
)
|
||||
add_dependencies(translations pot)
|
||||
|
||||
+19
-32
@@ -1,12 +1,3 @@
|
||||
if (ENABLE_MODULES)
|
||||
set(CMAKE_BUILD_RPATH ${CMAKE_CURRENT_BINARY_DIR}/../modules)
|
||||
if (APPLE)
|
||||
set(CMAKE_INSTALL_RPATH @loader_path/../lib/xsystem35)
|
||||
else()
|
||||
set(CMAKE_INSTALL_RPATH $ORIGIN/../lib/xsystem35)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
add_library(xsystem35 SHARED)
|
||||
else()
|
||||
@@ -60,10 +51,6 @@ target_sources(xsystem35 PRIVATE
|
||||
target_sources(xsystem35 PRIVATE
|
||||
network.c)
|
||||
|
||||
if (ENABLE_MODULES)
|
||||
target_link_libraries(xsystem35 PRIVATE -rdynamic)
|
||||
endif()
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
|
||||
set(LIBS "SHELL:-s USE_ZLIB=1 -s USE_FREETYPE=1 -s USE_SDL=2")
|
||||
@@ -75,13 +62,13 @@ if (EMSCRIPTEN)
|
||||
list(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG "-O1")
|
||||
|
||||
target_link_options(xsystem35 PRIVATE
|
||||
"SHELL:-s ENVIRONMENT=web"
|
||||
"SHELL:-s ASYNCIFY=1 -s ASYNCIFY_IGNORE_INDIRECT=1"
|
||||
"SHELL:-s ASYNCIFY_IMPORTS=\"['emscripten_sleep','SDL_Delay','__syscall118','muspcm_load_no','muspcm_load_mixlr','muspcm_waitend','wait_vsync','load_mincho_font']\""
|
||||
"SHELL:-s ALLOW_MEMORY_GROWTH=1"
|
||||
"SHELL:-s NO_EXIT_RUNTIME=1"
|
||||
"SHELL:-s EXPORTED_FUNCTIONS=\"['_main','_ags_setAntialiasedStringMode', '_ald_getdata', '_ald_freedata']\""
|
||||
"SHELL:-s EXTRA_EXPORTED_RUNTIME_METHODS=\"['getValue','getMemory','addRunDependency','removeRunDependency']\"")
|
||||
"SHELL:-s ENVIRONMENT=web"
|
||||
"SHELL:-s ASYNCIFY=1 -s ASYNCIFY_IGNORE_INDIRECT=1"
|
||||
"SHELL:-s ASYNCIFY_IMPORTS=\"['muspcm_load_no','muspcm_load_mixlr','muspcm_waitend','wait_vsync','load_mincho_font']\""
|
||||
"SHELL:-s ALLOW_MEMORY_GROWTH=1"
|
||||
"SHELL:-s NO_EXIT_RUNTIME=1"
|
||||
"SHELL:-s EXPORTED_FUNCTIONS=\"['_main','_ags_setAntialiasedStringMode', '_ald_getdata', '_ald_freedata']\""
|
||||
"SHELL:-s EXTRA_EXPORTED_RUNTIME_METHODS=\"['getValue','getMemory','addRunDependency','removeRunDependency']\"")
|
||||
|
||||
elseif (ANDROID)
|
||||
|
||||
@@ -90,26 +77,26 @@ elseif (ANDROID)
|
||||
else() # non-emscripten, non-android
|
||||
target_link_libraries(xsystem35 PRIVATE m ZLIB::ZLIB)
|
||||
if (X11_FOUND)
|
||||
target_include_directories(xsystem35 PRIVATE ${X11_INCLUDE_DIR})
|
||||
target_link_libraries(xsystem35 PRIVATE ${X11_LIBRARIES})
|
||||
if (X11_xf86vmode_FOUND)
|
||||
target_link_libraries(xsystem35 PRIVATE ${X11_Xxf86vm_LIB})
|
||||
endif()
|
||||
target_include_directories(xsystem35 PRIVATE ${X11_INCLUDE_DIR})
|
||||
target_link_libraries(xsystem35 PRIVATE ${X11_LIBRARIES})
|
||||
if (X11_xf86vmode_FOUND)
|
||||
target_link_libraries(xsystem35 PRIVATE ${X11_Xxf86vm_LIB})
|
||||
endif()
|
||||
endif()
|
||||
if (GTK2_FOUND)
|
||||
target_link_libraries(xsystem35 PRIVATE GTK2::gtk)
|
||||
target_link_libraries(xsystem35 PRIVATE GTK2::gtk)
|
||||
endif()
|
||||
if (FREETYPE_FOUND)
|
||||
target_link_libraries(xsystem35 PRIVATE Freetype::Freetype)
|
||||
target_link_libraries(xsystem35 PRIVATE Freetype::Freetype)
|
||||
endif()
|
||||
if (SDL2_FOUND)
|
||||
target_link_libraries(xsystem35 PRIVATE PkgConfig::SDL2)
|
||||
target_link_libraries(xsystem35 PRIVATE PkgConfig::SDL2)
|
||||
endif()
|
||||
if (SDL2MIXER_FOUND)
|
||||
target_link_libraries(xsystem35 PRIVATE PkgConfig::SDL2MIXER)
|
||||
target_link_libraries(xsystem35 PRIVATE PkgConfig::SDL2MIXER)
|
||||
endif()
|
||||
if (SDL2TTF_FOUND)
|
||||
target_link_libraries(xsystem35 PRIVATE PkgConfig::SDL2TTF)
|
||||
target_link_libraries(xsystem35 PRIVATE PkgConfig::SDL2TTF)
|
||||
endif()
|
||||
|
||||
install(TARGETS xsystem35 RUNTIME DESTINATION bin)
|
||||
@@ -118,6 +105,6 @@ endif()
|
||||
# FIXME: set up dependency for xsystem35 on this
|
||||
if (ENABLE_SDL AND NOT EMSCRIPTEN AND NOT ANDROID)
|
||||
add_custom_target(sdl_input.c
|
||||
COMMAND perl xsyskey.pl ${SDL2_INCLUDE_DIRS} > sdl_input.c
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
COMMAND perl xsyskey.pl ${SDL2_INCLUDE_DIRS} > sdl_input.c
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
+7
-17
@@ -28,12 +28,8 @@
|
||||
#include "nact.h"
|
||||
#include "s39ain.h"
|
||||
#include "xsystem35.h"
|
||||
#ifdef ENABLE_MODULES
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#define dll nact->ain.dll
|
||||
#define msgi nact->ain.msg
|
||||
|
||||
typedef void *entrypoint (void);
|
||||
|
||||
@@ -46,21 +42,15 @@ void commands2F60() {
|
||||
if (dll == NULL) {
|
||||
SYSERROR("No DLL initilized\n");
|
||||
}
|
||||
|
||||
|
||||
if (dll + type == NULL) goto eexit;
|
||||
|
||||
if (dll[type].handle == NULL) goto eexit;
|
||||
|
||||
|
||||
if (dll[type].function_num < fnum) goto eexit;
|
||||
|
||||
if (dll[type].function[fnum].name == NULL) goto eexit;
|
||||
|
||||
function = dlsym(dll[type].handle, dll[type].function[fnum].name);
|
||||
|
||||
if (function) {
|
||||
(*function)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (dll[type].function[fnum].entrypoint == NULL) goto eexit;
|
||||
|
||||
dll[type].function[fnum].entrypoint();
|
||||
return;
|
||||
#endif
|
||||
|
||||
eexit:
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "ags.h"
|
||||
|
||||
extern int cp932tosjis0213(int code);
|
||||
extern unsigned short *s2u[];
|
||||
extern const unsigned short *s2u[];
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
|
||||
+97
-94
@@ -45,9 +45,9 @@ int mus_exit() {
|
||||
}
|
||||
|
||||
/*
|
||||
* cdrom の演奏開始
|
||||
* track: トラック番号 (第一トラックは 1)
|
||||
* loop : 繰り返し回数 (0の場合は無限)
|
||||
* cdrom の演奏開始
|
||||
* track: トラック番号 (第一トラックは 1)
|
||||
* loop : 繰り返し回数 (0の場合は無限)
|
||||
*/
|
||||
int mus_cdrom_start(int track, int loop) {
|
||||
if (!prv.cd_valid) return NG;
|
||||
@@ -57,7 +57,7 @@ int mus_cdrom_start(int track, int loop) {
|
||||
}
|
||||
|
||||
/*
|
||||
* cdrom の演奏停止
|
||||
* cdrom の演奏停止
|
||||
*/
|
||||
int mus_cdrom_stop() {
|
||||
if (!prv.cd_valid) return NG;
|
||||
@@ -67,9 +67,9 @@ int mus_cdrom_stop() {
|
||||
}
|
||||
|
||||
/*
|
||||
* cdrom の演奏状態の取得
|
||||
* info: 演奏時間(track/min/sec/frame)の状態を格納する場所
|
||||
* 停止している場合は 999/999/999/999 が返る
|
||||
* cdrom の演奏状態の取得
|
||||
* info: 演奏時間(track/min/sec/frame)の状態を格納する場所
|
||||
* 停止している場合は 999/999/999/999 が返る
|
||||
*/
|
||||
int mus_cdrom_get_playposition(cd_time *tm) {
|
||||
if (!prv.cd_valid) return NG;
|
||||
@@ -78,7 +78,7 @@ int mus_cdrom_get_playposition(cd_time *tm) {
|
||||
}
|
||||
|
||||
/*
|
||||
* cdrom の最大トラック数の取得
|
||||
* cdrom の最大トラック数の取得
|
||||
*
|
||||
*/
|
||||
int mus_cdrom_get_maxtrack() {
|
||||
@@ -87,48 +87,48 @@ int mus_cdrom_get_maxtrack() {
|
||||
}
|
||||
|
||||
/*
|
||||
* CDROM の有効/無効 フラグの取得
|
||||
* return: FALASE -> 無効
|
||||
* TRUE -> 有効
|
||||
* CDROM の有効/無効 フラグの取得
|
||||
* return: FALASE -> 無効
|
||||
* TRUE -> 有効
|
||||
*/
|
||||
boolean mus_cdrom_get_state() {
|
||||
return prv.cd_valid;
|
||||
}
|
||||
|
||||
/*
|
||||
* midi の演奏開始
|
||||
* no : ファイル番号( no >= 1)
|
||||
* loop: 繰り返し回数 (0の場合は無限)
|
||||
* midi の演奏開始
|
||||
* no : ファイル番号( no >= 1)
|
||||
* loop: 繰り返し回数 (0の場合は無限)
|
||||
*/
|
||||
int mus_midi_start(int no, int loop) {
|
||||
return musmidi_start(no, loop);
|
||||
}
|
||||
|
||||
/*
|
||||
* midi の演奏停止
|
||||
* midi の演奏停止
|
||||
*/
|
||||
int mus_midi_stop(void) {
|
||||
return musmidi_stop();
|
||||
}
|
||||
|
||||
/*
|
||||
* midi の一時停止
|
||||
* midi の一時停止
|
||||
*/
|
||||
int mus_midi_pause(void) {
|
||||
return musmidi_pause();
|
||||
}
|
||||
|
||||
/*
|
||||
* midi の一時停止解除
|
||||
* midi の一時停止解除
|
||||
*/
|
||||
int mus_midi_unpause(void) {
|
||||
return musmidi_unpause();
|
||||
}
|
||||
|
||||
/*
|
||||
* midi の演奏状態の取得
|
||||
* state: 演奏時間や番号の状態を格納する場所
|
||||
* 停止している場合は 0 が入る
|
||||
* midi の演奏状態の取得
|
||||
* state: 演奏時間や番号の状態を格納する場所
|
||||
* 停止している場合は 0 が入る
|
||||
*/
|
||||
int mus_midi_get_playposition(midiplaystate *state) {
|
||||
midiplaystate st = musmidi_getpos();
|
||||
@@ -137,41 +137,41 @@ int mus_midi_get_playposition(midiplaystate *state) {
|
||||
}
|
||||
|
||||
/*
|
||||
* midi の演奏 flag/variable の状態を設定する
|
||||
* midi の演奏 flag/variable の状態を設定する
|
||||
* mode : 0 -> flag mode
|
||||
* 1 -> variable mode
|
||||
* index: flag/variable 番号
|
||||
* val : 書き込む値
|
||||
* index: flag/variable 番号
|
||||
* val : 書き込む値
|
||||
*/
|
||||
int mus_midi_set_flag(int mode, int index, int val) {
|
||||
return musmidi_setflag(mode, index, val);
|
||||
}
|
||||
|
||||
/*
|
||||
* midi の演奏 flag/variable の状態を取得する
|
||||
* midi の演奏 flag/variable の状態を取得する
|
||||
* mode : 0 -> flag mode
|
||||
* 1 -> variable mode
|
||||
* index: flag/variable 番号
|
||||
* index: flag/variable 番号
|
||||
*
|
||||
* return : flag/variable の値
|
||||
* return : flag/variable の値
|
||||
*/
|
||||
int mus_midi_get_flag(int mode, int index) {
|
||||
return musmidi_getflag(mode, index);
|
||||
}
|
||||
|
||||
/*
|
||||
* MIDI の有効/無効 フラグの取得
|
||||
* return: FALASE -> 無効
|
||||
* TRUE -> 有効
|
||||
* MIDI の有効/無効 フラグの取得
|
||||
* return: FALASE -> 無効
|
||||
* TRUE -> 有効
|
||||
*/
|
||||
boolean mus_midi_get_state() {
|
||||
return prv.midi_valid;
|
||||
}
|
||||
|
||||
/*
|
||||
* WAV の演奏開始 (command S?)
|
||||
* no : ファイル番号( no >= 1)
|
||||
* loop: 繰り返し回数 (0の場合は無限)
|
||||
* WAV の演奏開始 (command S?)
|
||||
* no : ファイル番号( no >= 1)
|
||||
* loop: 繰り返し回数 (0の場合は無限)
|
||||
*/
|
||||
int mus_pcm_start(int no, int loop) {
|
||||
if (!prv.pcm_valid) return NG;
|
||||
@@ -181,10 +181,10 @@ int mus_pcm_start(int no, int loop) {
|
||||
}
|
||||
|
||||
/*
|
||||
* WAV を左右 mix して演奏
|
||||
* noL : 左用のファイル番号(noL >= 1)
|
||||
* noR : 右用のファイル番号(noR >= 1)
|
||||
* loop: 繰り返し数(0の場合は無限ループ)
|
||||
* WAV を左右 mix して演奏
|
||||
* noL : 左用のファイル番号(noL >= 1)
|
||||
* noR : 右用のファイル番号(noR >= 1)
|
||||
* loop: 繰り返し数(0の場合は無限ループ)
|
||||
*/
|
||||
int mus_pcm_mix(int noL, int noR, int loop) {
|
||||
if (!prv.pcm_valid) return NG;
|
||||
@@ -194,8 +194,8 @@ int mus_pcm_mix(int noL, int noR, int loop) {
|
||||
}
|
||||
|
||||
/*
|
||||
* WAV の演奏停止 (command S?)
|
||||
* msec: 止まるまでの時間(msec), 0の場合はすぐに止まる
|
||||
* WAV の演奏停止 (command S?)
|
||||
* msec: 止まるまでの時間(msec), 0の場合はすぐに止まる
|
||||
*/
|
||||
int mus_pcm_stop(int msec) {
|
||||
if (!prv.pcm_valid) return NG;
|
||||
@@ -205,8 +205,8 @@ int mus_pcm_stop(int msec) {
|
||||
}
|
||||
|
||||
/*
|
||||
* WAV ファイルをメモリ上に載せる
|
||||
* no : ファイル番号( no >= 1)
|
||||
* WAV ファイルをメモリ上に載せる
|
||||
* no : ファイル番号( no >= 1)
|
||||
*/
|
||||
int mus_pcm_load(int no) {
|
||||
if (!prv.pcm_valid) return NG;
|
||||
@@ -215,10 +215,10 @@ int mus_pcm_load(int no) {
|
||||
}
|
||||
|
||||
/*
|
||||
* WAV の演奏状態の取得
|
||||
* pos: 演奏時間を格納する場所(msec)
|
||||
* 停止している場合は 0 が入る
|
||||
* loopしている場合は合計時間
|
||||
* WAV の演奏状態の取得
|
||||
* pos: 演奏時間を格納する場所(msec)
|
||||
* 停止している場合は 0 が入る
|
||||
* loopしている場合は合計時間
|
||||
*/
|
||||
int mus_pcm_get_playposition(int *pos) {
|
||||
if (!prv.pcm_valid) return NG;
|
||||
@@ -229,11 +229,11 @@ int mus_pcm_get_playposition(int *pos) {
|
||||
|
||||
/* pcm (Scommand) related function */
|
||||
/*
|
||||
* 指定のフォーマットで再生可能かどうか調べる
|
||||
* 指定のフォーマットで再生可能かどうか調べる
|
||||
* bit : 8 or 16 bit
|
||||
* rate: frequency
|
||||
* ch : Mono or Stereo
|
||||
* able: 可能かどうかの状態を受け取る場所
|
||||
* able: 可能かどうかの状態を受け取る場所
|
||||
*/
|
||||
int mus_pcm_check_ability(int bit, int rate, int ch, boolean *able) {
|
||||
if (!prv.pcm_valid) {
|
||||
@@ -245,22 +245,22 @@ int mus_pcm_check_ability(int bit, int rate, int ch, boolean *able) {
|
||||
}
|
||||
|
||||
/*
|
||||
* PCM の有効/無効 フラグの取得
|
||||
* return: FALASE -> 無効
|
||||
* TRUE -> 有効
|
||||
* PCM の有効/無効 フラグの取得
|
||||
* return: FALASE -> 無効
|
||||
* TRUE -> 有効
|
||||
*/
|
||||
boolean mus_pcm_get_state() {
|
||||
return prv.pcm_valid;
|
||||
}
|
||||
|
||||
/*
|
||||
* フェード開始
|
||||
* device: フェードするデバイス(MIX_MAXTER/MIX_PCM/....)
|
||||
* time : 最終ボリュームまでに達する時間(msec)
|
||||
* volume: 最終ボリューム
|
||||
* stop: フェード終了時に演奏をストップするかどうか?
|
||||
* 0: しない
|
||||
* 1: する
|
||||
* フェード開始
|
||||
* device: フェードするデバイス(MIX_MAXTER/MIX_PCM/....)
|
||||
* time : 最終ボリュームまでに達する時間(msec)
|
||||
* volume: 最終ボリューム
|
||||
* stop: フェード終了時に演奏をストップするかどうか?
|
||||
* 0: しない
|
||||
* 1: する
|
||||
*/
|
||||
int mus_mixer_fadeout_start(int device, int time, int volume, int stop) {
|
||||
if (device == MIX_MIDI)
|
||||
@@ -270,11 +270,11 @@ int mus_mixer_fadeout_start(int device, int time, int volume, int stop) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のデバイスが現在フェード中かどうかを調べる
|
||||
* device: 指定デバイス
|
||||
* 指定のデバイスが現在フェード中かどうかを調べる
|
||||
* device: 指定デバイス
|
||||
*
|
||||
* return: TRUE -> フェード中
|
||||
* FALSE -> フェード中でない
|
||||
* return: TRUE -> フェード中
|
||||
* FALSE -> フェード中でない
|
||||
*/
|
||||
boolean mus_mixer_fadeout_get_state(int device) {
|
||||
if (device == MIX_MIDI)
|
||||
@@ -284,8 +284,8 @@ boolean mus_mixer_fadeout_get_state(int device) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のデバイスのフェードを途中で止める
|
||||
* device: 指定デバイス
|
||||
* 指定のデバイスのフェードを途中で止める
|
||||
* device: 指定デバイス
|
||||
*/
|
||||
int mus_mixer_fadeout_stop(int device) {
|
||||
printf("%s not implemented\n", __func__);
|
||||
@@ -293,10 +293,10 @@ int mus_mixer_fadeout_stop(int device) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のデバイスのミキサーレベルを取得する
|
||||
* device: 指定デバイス
|
||||
* 指定のデバイスのミキサーレベルを取得する
|
||||
* device: 指定デバイス
|
||||
*
|
||||
* return: ミキサーレベル(0 - 100) (ゲーム内で設定された値)
|
||||
* return: ミキサーレベル(0 - 100) (ゲーム内で設定された値)
|
||||
*/
|
||||
int mus_mixer_get_level(int device) {
|
||||
printf("%s not implemented\n", __func__);
|
||||
@@ -304,9 +304,9 @@ int mus_mixer_get_level(int device) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルに wave file をロード
|
||||
* 指定のチャンネルに wave file をロード
|
||||
* ch : channel (0-127)
|
||||
* num: ファイル番号 (1-65535)
|
||||
* num: ファイル番号 (1-65535)
|
||||
*/
|
||||
int mus_wav_load(int ch, int num) {
|
||||
if (!prv.pcm_valid) return NG;
|
||||
@@ -316,7 +316,7 @@ int mus_wav_load(int ch, int num) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルから wave file を破棄
|
||||
* 指定のチャンネルから wave file を破棄
|
||||
* ch : channel
|
||||
*/
|
||||
int mus_wav_unload(int ch) {
|
||||
@@ -327,10 +327,10 @@ int mus_wav_unload(int ch) {
|
||||
}
|
||||
|
||||
/*
|
||||
* WAV の演奏開始 (wavXXXX)
|
||||
* ch : 再生するチャンネル (0-127)
|
||||
(あらかじめ mus_wav_loadでloadしておく)
|
||||
* loop: 繰り返し回数 (0の場合は無限, それ以外は1回のみ)
|
||||
* WAV の演奏開始 (wavXXXX)
|
||||
* ch : 再生するチャンネル (0-127)
|
||||
(あらかじめ mus_wav_loadでloadしておく)
|
||||
* loop: 繰り返し回数 (0の場合は無限, それ以外は1回のみ)
|
||||
*/
|
||||
int mus_wav_play(int ch, int loop) {
|
||||
if (!prv.pcm_valid) return NG;
|
||||
@@ -340,7 +340,7 @@ int mus_wav_play(int ch, int loop) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルのWAVの演奏停止 (wavXXX)
|
||||
* 指定のチャンネルのWAVの演奏停止 (wavXXX)
|
||||
* ch: channel
|
||||
*/
|
||||
int mus_wav_stop(int ch) {
|
||||
@@ -351,31 +351,34 @@ int mus_wav_stop(int ch) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルの演奏状態の取得
|
||||
* 指定のチャンネルの演奏状態の取得
|
||||
* ch: channel (0-127)
|
||||
*
|
||||
* return: 演奏時間(msec) 65535ms で飽和
|
||||
* return: 演奏時間(msec) 65535ms で飽和
|
||||
*/
|
||||
int mus_wav_get_playposition(int ch) {
|
||||
return muspcm_getpos(ch + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルのWAVのフェード
|
||||
* 指定のチャンネルのWAVのフェード
|
||||
* ch: channel(0-127)
|
||||
* time : 最終ボリュームまでに達する時間(msec)
|
||||
* volume: 最終ボリューム
|
||||
* stop : フェード終了時に演奏をストップするかどうか?
|
||||
* 0: しない
|
||||
* 1: する
|
||||
* time : 最終ボリュームまでに達する時間(msec)
|
||||
* volume: 最終ボリューム
|
||||
* stop : フェード終了時に演奏をストップするかどうか?
|
||||
* 0: しない
|
||||
* 1: する
|
||||
*/
|
||||
int mus_wav_fadeout_start(int ch, int time, int volume, int stop) {
|
||||
if (volume == 0 && stop)
|
||||
return muspcm_fadeout(ch + 1, time);
|
||||
|
||||
printf("%s not implemented\n", __func__);
|
||||
return NG;
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルのフェードを途中で止める
|
||||
* 指定のチャンネルのフェードを途中で止める
|
||||
* ch: channel (0-127)
|
||||
*/
|
||||
int mus_wav_fadeout_stop(int ch) {
|
||||
@@ -384,11 +387,11 @@ int mus_wav_fadeout_stop(int ch) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルが現在フェード中かどうかを調べる
|
||||
* 指定のチャンネルが現在フェード中かどうかを調べる
|
||||
* ch: channel
|
||||
*
|
||||
* return: TRUE -> フェード中
|
||||
* FALSE -> フェード中でない
|
||||
* return: TRUE -> フェード中
|
||||
* FALSE -> フェード中でない
|
||||
*/
|
||||
boolean mus_wav_fadeout_get_state(int ch) {
|
||||
printf("%s not implemented\n", __func__);
|
||||
@@ -396,7 +399,7 @@ boolean mus_wav_fadeout_get_state(int ch) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルの再生が終了するまで待つ
|
||||
* 指定のチャンネルの再生が終了するまで待つ
|
||||
* ch: channel (0-127)
|
||||
*/
|
||||
int mus_wav_waitend(int ch) {
|
||||
@@ -407,11 +410,11 @@ int mus_wav_waitend(int ch) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルで時間待ち
|
||||
* 再生していないならすぐに戻る。コマンドが発行された瞬間に演奏中で
|
||||
* あれば、演奏が終っても指定時間経過するまで待つ。
|
||||
* 指定のチャンネルで時間待ち
|
||||
* 再生していないならすぐに戻る。コマンドが発行された瞬間に演奏中で
|
||||
* あれば、演奏が終っても指定時間経過するまで待つ。
|
||||
* ch : channel (0-127)
|
||||
* time: 待ち時間(msec)
|
||||
* time: 待ち時間(msec)
|
||||
*/
|
||||
int mus_wav_waittime(int ch, int time) {
|
||||
printf("%s not implemented\n", __func__);
|
||||
@@ -419,19 +422,19 @@ int mus_wav_waittime(int ch, int time) {
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルのWAVデータの演奏時間の取得
|
||||
* 指定のチャンネルのWAVデータの演奏時間の取得
|
||||
* ch: channel
|
||||
*
|
||||
* return: 時間(msec) 65535ms で飽和
|
||||
* return: 時間(msec) 65535ms で飽和
|
||||
*/
|
||||
int mus_wav_wavtime(int ch) {
|
||||
return muspcm_getwavelen(ch + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* 指定のチャンネルに wave file をLR反転してロード
|
||||
* 指定のチャンネルに wave file をLR反転してロード
|
||||
* ch : channel (0-127)
|
||||
* num: ファイル番号 (1-65535)
|
||||
* num: ファイル番号 (1-65535)
|
||||
*/
|
||||
int mus_wav_load_lrsw(int ch, int num) {
|
||||
printf("%s not implemented\n", __func__);
|
||||
|
||||
+4
-4
@@ -41,15 +41,15 @@ struct _musprvdat {
|
||||
cdobj_t cdrom; // cdrom object
|
||||
midiobj_t midi; // midi object
|
||||
|
||||
// ゲーム内での volume 設定 (%値)
|
||||
// ゲーム内での volume 設定 (%値)
|
||||
int vol_master;
|
||||
int vol_pcm;
|
||||
int vol_midi;
|
||||
int vol_cd;
|
||||
int vol_pcm_sub[128 + 1 + 2]; // volval の channel
|
||||
int volval[16]; // 各channel 毎の volume valance
|
||||
int vol_pcm_sub[128 + 1 + 2]; // volval の channel
|
||||
int volval[16]; // 各channel 毎の volume valance
|
||||
|
||||
// 最大トラック数
|
||||
// 最大トラック数
|
||||
int cd_maxtrk;
|
||||
};
|
||||
|
||||
|
||||
@@ -297,6 +297,8 @@ int muspcm_getpos(int slot) {
|
||||
|
||||
long len = obj->chunk->alen * 1000 / (44100 * 4);
|
||||
int pos = get_high_counter(SYSTEMCOUNTER_MSEC) - obj->start_time;
|
||||
if (pos == 0)
|
||||
pos = 1; // because 0 means "not playing"
|
||||
if (pos > len)
|
||||
pos = 0;
|
||||
return pos;
|
||||
|
||||
+66
-66
@@ -1,4 +1,4 @@
|
||||
unsigned short s2u_80[]={
|
||||
static const unsigned short s2u_80[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -24,7 +24,7 @@ unsigned short s2u_80[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_81[]={
|
||||
static const unsigned short s2u_81[]={
|
||||
0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B,
|
||||
0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,
|
||||
0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,
|
||||
@@ -50,7 +50,7 @@ unsigned short s2u_81[]={
|
||||
0x212B,0x2030,0x266F,0x266D,0x266A,0x2020,0x2021,0x00B6,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x25EF,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_82[]={
|
||||
static const unsigned short s2u_82[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0xFF10,
|
||||
0xFF11,0xFF12,0xFF13,0xFF14,0xFF15,0xFF16,0xFF17,0xFF18,
|
||||
@@ -73,10 +73,10 @@ unsigned short s2u_82[]={
|
||||
0x307A,0x307B,0x307C,0x307D,0x307E,0x307F,0x3080,0x3081,
|
||||
0x3082,0x3083,0x3084,0x3085,0x3086,0x3087,0x3088,0x3089,
|
||||
0x308A,0x308B,0x308C,0x308D,0x308E,0x308F,0x3090,0x3091,
|
||||
0x3092,0x3093,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x3092,0x3093,0x3094,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_83[]={
|
||||
static const unsigned short s2u_83[]={
|
||||
0x30A1,0x30A2,0x30A3,0x30A4,0x30A5,0x30A6,0x30A7,0x30A8,
|
||||
0x30A9,0x30AA,0x30AB,0x30AC,0x30AD,0x30AE,0x30AF,0x30B0,
|
||||
0x30B1,0x30B2,0x30B3,0x30B4,0x30B5,0x30B6,0x30B7,0x30B8,
|
||||
@@ -102,7 +102,7 @@ unsigned short s2u_83[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_84[]={
|
||||
static const unsigned short s2u_84[]={
|
||||
0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416,
|
||||
0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
|
||||
0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,
|
||||
@@ -128,7 +128,7 @@ unsigned short s2u_84[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_85[]={
|
||||
static const unsigned short s2u_85[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -154,7 +154,7 @@ unsigned short s2u_85[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_86[]={
|
||||
static const unsigned short s2u_86[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -180,7 +180,7 @@ unsigned short s2u_86[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_87[]={
|
||||
static const unsigned short s2u_87[]={
|
||||
0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,
|
||||
0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,
|
||||
0x2470,0x2471,0x2472,0x2473,0x2160,0x2161,0x2162,0x2163,
|
||||
@@ -206,7 +206,7 @@ unsigned short s2u_87[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_88[]={
|
||||
static const unsigned short s2u_88[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -232,7 +232,7 @@ unsigned short s2u_88[]={
|
||||
0x828B,0x9C2F,0x5141,0x5370,0x54BD,0x54E1,0x56E0,0x59FB,
|
||||
0x5F15,0x98F2,0x6DEB,0x80E4,0x852D,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_89[]={
|
||||
static const unsigned short s2u_89[]={
|
||||
0x9662,0x9670,0x96A0,0x97FB,0x540B,0x53F3,0x5B87,0x70CF,
|
||||
0x7FBD,0x8FC2,0x96E8,0x536F,0x9D5C,0x7ABA,0x4E11,0x7893,
|
||||
0x81FC,0x6E26,0x5618,0x5504,0x6B1D,0x851A,0x9C3B,0x59E5,
|
||||
@@ -258,7 +258,7 @@ unsigned short s2u_89[]={
|
||||
0x89E3,0x56DE,0x584A,0x58CA,0x5EFB,0x5FEB,0x602A,0x6094,
|
||||
0x6062,0x61D0,0x6212,0x62D0,0x6539,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_8a[]={
|
||||
static const unsigned short s2u_8a[]={
|
||||
0x9B41,0x6666,0x68B0,0x6D77,0x7070,0x754C,0x7686,0x7D75,
|
||||
0x82A5,0x87F9,0x958B,0x968E,0x8C9D,0x51F1,0x52BE,0x5916,
|
||||
0x54B3,0x5BB3,0x5D16,0x6168,0x6982,0x6DAF,0x788D,0x84CB,
|
||||
@@ -284,7 +284,7 @@ unsigned short s2u_8a[]={
|
||||
0x5B09,0x5BC4,0x5C90,0x5E0C,0x5E7E,0x5FCC,0x63EE,0x673A,
|
||||
0x65D7,0x65E2,0x671F,0x68CB,0x68C4,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_8b[]={
|
||||
static const unsigned short s2u_8b[]={
|
||||
0x6A5F,0x5E30,0x6BC5,0x6C17,0x6C7D,0x757F,0x7948,0x5B63,
|
||||
0x7A00,0x7D00,0x5FBD,0x898F,0x8A18,0x8CB4,0x8D77,0x8ECC,
|
||||
0x8F1D,0x98E2,0x9A0E,0x9B3C,0x4E80,0x507D,0x5100,0x5993,
|
||||
@@ -310,7 +310,7 @@ unsigned short s2u_8b[]={
|
||||
0x611A,0x865E,0x55B0,0x7A7A,0x5076,0x5BD3,0x9047,0x9685,
|
||||
0x4E32,0x6ADB,0x91E7,0x5C51,0x5C48,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_8c[]={
|
||||
static const unsigned short s2u_8c[]={
|
||||
0x6398,0x7A9F,0x6C93,0x9774,0x8F61,0x7AAA,0x718A,0x9688,
|
||||
0x7C82,0x6817,0x7E70,0x6851,0x936C,0x52F2,0x541B,0x85AB,
|
||||
0x8A13,0x7FA4,0x8ECD,0x90E1,0x5366,0x8888,0x7941,0x4FC2,
|
||||
@@ -336,7 +336,7 @@ unsigned short s2u_8c[]={
|
||||
0x4EA4,0x4F7C,0x4FAF,0x5019,0x5016,0x5149,0x516C,0x529F,
|
||||
0x52B9,0x52FE,0x539A,0x53E3,0x5411,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_8d[]={
|
||||
static const unsigned short s2u_8d[]={
|
||||
0x540E,0x5589,0x5751,0x57A2,0x597D,0x5B54,0x5B5D,0x5B8F,
|
||||
0x5DE5,0x5DE7,0x5DF7,0x5E78,0x5E83,0x5E9A,0x5EB7,0x5F18,
|
||||
0x6052,0x614C,0x6297,0x62D8,0x63A7,0x653B,0x6602,0x6643,
|
||||
@@ -362,7 +362,7 @@ unsigned short s2u_8d[]={
|
||||
0x6628,0x6714,0x67F5,0x7A84,0x7B56,0x7D22,0x932F,0x685C,
|
||||
0x9BAD,0x7B39,0x5319,0x518A,0x5237,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_8e[]={
|
||||
static const unsigned short s2u_8e[]={
|
||||
0x5BDF,0x62F6,0x64AE,0x64E6,0x672D,0x6BBA,0x85A9,0x96D1,
|
||||
0x7690,0x9BD6,0x634C,0x9306,0x9BAB,0x76BF,0x6652,0x4E09,
|
||||
0x5098,0x53C2,0x5C71,0x60E8,0x6492,0x6563,0x685F,0x71E6,
|
||||
@@ -388,7 +388,7 @@ unsigned short s2u_8e[]={
|
||||
0x9152,0x9996,0x5112,0x53D7,0x546A,0x5BFF,0x6388,0x6A39,
|
||||
0x7DAC,0x9700,0x56DA,0x53CE,0x5468,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_8f[]={
|
||||
static const unsigned short s2u_8f[]={
|
||||
0x5B97,0x5C31,0x5DDE,0x4FEE,0x6101,0x62FE,0x6D32,0x79C0,
|
||||
0x79CB,0x7D42,0x7E4D,0x7FD2,0x81ED,0x821F,0x8490,0x8846,
|
||||
0x8972,0x8B90,0x8E74,0x8F2F,0x9031,0x914B,0x916C,0x96C6,
|
||||
@@ -414,7 +414,7 @@ unsigned short s2u_8f[]={
|
||||
0x6761,0x6756,0x6D44,0x72B6,0x7573,0x7A63,0x84B8,0x8B72,
|
||||
0x91B8,0x9320,0x5631,0x57F4,0x98FE,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_90[]={
|
||||
static const unsigned short s2u_90[]={
|
||||
0x62ED,0x690D,0x6B96,0x71ED,0x7E54,0x8077,0x8272,0x89E6,
|
||||
0x98DF,0x8755,0x8FB1,0x5C3B,0x4F38,0x4FE1,0x4FB5,0x5507,
|
||||
0x5A20,0x5BDD,0x5BE9,0x5FC3,0x614E,0x632F,0x65B0,0x664B,
|
||||
@@ -440,7 +440,7 @@ unsigned short s2u_90[]={
|
||||
0x6813,0x6834,0x6CC9,0x6D45,0x6D17,0x67D3,0x6F5C,0x714E,
|
||||
0x717D,0x65CB,0x7A7F,0x7BAD,0x7DDA,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_91[]={
|
||||
static const unsigned short s2u_91[]={
|
||||
0x7E4A,0x7FA8,0x817A,0x821B,0x8239,0x85A6,0x8A6E,0x8CCE,
|
||||
0x8DF5,0x9078,0x9077,0x92AD,0x9291,0x9583,0x9BAE,0x524D,
|
||||
0x5584,0x6F38,0x7136,0x5168,0x7985,0x7E55,0x81B3,0x7CCE,
|
||||
@@ -466,7 +466,7 @@ unsigned short s2u_91[]={
|
||||
0x629E,0x62D3,0x6CA2,0x6FEF,0x7422,0x8A17,0x9438,0x6FC1,
|
||||
0x8AFE,0x8338,0x51E7,0x86F8,0x53EA,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_92[]={
|
||||
static const unsigned short s2u_92[]={
|
||||
0x53E9,0x4F46,0x9054,0x8FB0,0x596A,0x8131,0x5DFD,0x7AEA,
|
||||
0x8FBF,0x68DA,0x8C37,0x72F8,0x9C48,0x6A3D,0x8AB0,0x4E39,
|
||||
0x5358,0x5606,0x5766,0x62C5,0x63A2,0x65E6,0x6B4E,0x6DE1,
|
||||
@@ -492,7 +492,7 @@ unsigned short s2u_92[]={
|
||||
0x633A,0x63D0,0x68AF,0x6C40,0x7887,0x798E,0x7A0B,0x7DE0,
|
||||
0x8247,0x8A02,0x8AE6,0x8E44,0x9013,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_93[]={
|
||||
static const unsigned short s2u_93[]={
|
||||
0x90B8,0x912D,0x91D8,0x9F0E,0x6CE5,0x6458,0x64E2,0x6575,
|
||||
0x6EF4,0x7684,0x7B1B,0x9069,0x93D1,0x6EBA,0x54F2,0x5FB9,
|
||||
0x64A4,0x8F4D,0x8FED,0x9244,0x5178,0x586B,0x5929,0x5C55,
|
||||
@@ -518,7 +518,7 @@ unsigned short s2u_93[]={
|
||||
0x6C5D,0x4E8C,0x5C3C,0x5F10,0x8FE9,0x5302,0x8CD1,0x8089,
|
||||
0x8679,0x5EFF,0x65E5,0x4E73,0x5165,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_94[]={
|
||||
static const unsigned short s2u_94[]={
|
||||
0x5982,0x5C3F,0x97EE,0x4EFB,0x598A,0x5FCD,0x8A8D,0x6FE1,
|
||||
0x79B0,0x7962,0x5BE7,0x8471,0x732B,0x71B1,0x5E74,0x5FF5,
|
||||
0x637B,0x649A,0x71C3,0x7C98,0x4E43,0x5EFC,0x4E4B,0x57DC,
|
||||
@@ -544,7 +544,7 @@ unsigned short s2u_94[]={
|
||||
0x907F,0x975E,0x98DB,0x6A0B,0x7C38,0x5099,0x5C3E,0x5FAE,
|
||||
0x6787,0x6BD8,0x7435,0x7709,0x7F8E,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_95[]={
|
||||
static const unsigned short s2u_95[]={
|
||||
0x9F3B,0x67CA,0x7A17,0x5339,0x758B,0x9AED,0x5F66,0x819D,
|
||||
0x83F1,0x8098,0x5F3C,0x5FC5,0x7562,0x7B46,0x903C,0x6867,
|
||||
0x59EB,0x5A9B,0x7D10,0x767E,0x8B2C,0x4FF5,0x5F6A,0x6A19,
|
||||
@@ -570,7 +570,7 @@ unsigned short s2u_95[]={
|
||||
0x5446,0x5831,0x5949,0x5B9D,0x5CF0,0x5CEF,0x5D29,0x5E96,
|
||||
0x62B1,0x6367,0x653E,0x65B9,0x670B,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_96[]={
|
||||
static const unsigned short s2u_96[]={
|
||||
0x6CD5,0x6CE1,0x70F9,0x7832,0x7E2B,0x80DE,0x82B3,0x840C,
|
||||
0x84EC,0x8702,0x8912,0x8A2A,0x8C4A,0x90A6,0x92D2,0x98FD,
|
||||
0x9CF3,0x9D6C,0x4E4F,0x4EA1,0x508D,0x5256,0x574A,0x59A8,
|
||||
@@ -596,7 +596,7 @@ unsigned short s2u_96[]={
|
||||
0x5F79,0x7D04,0x85AC,0x8A33,0x8E8D,0x9756,0x67F3,0x85AE,
|
||||
0x9453,0x6109,0x6108,0x6CB9,0x7652,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_97[]={
|
||||
static const unsigned short s2u_97[]={
|
||||
0x8AED,0x8F38,0x552F,0x4F51,0x512A,0x52C7,0x53CB,0x5BA5,
|
||||
0x5E7D,0x60A0,0x6182,0x63D6,0x6709,0x67DA,0x6E67,0x6D8C,
|
||||
0x7336,0x7337,0x7531,0x7950,0x88D5,0x8A98,0x904A,0x9091,
|
||||
@@ -622,7 +622,7 @@ unsigned short s2u_97[]={
|
||||
0x6B74,0x5217,0x52A3,0x70C8,0x88C2,0x5EC9,0x604B,0x6190,
|
||||
0x6F23,0x7149,0x7C3E,0x7DF4,0x806F,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_98[]={
|
||||
static const unsigned short s2u_98[]={
|
||||
0x84EE,0x9023,0x932C,0x5442,0x9B6F,0x6AD3,0x7089,0x8CC2,
|
||||
0x8DEF,0x9732,0x52B4,0x5A41,0x5ECA,0x5F04,0x6717,0x697C,
|
||||
0x6994,0x6D6A,0x6F0F,0x7262,0x72FC,0x7BED,0x8001,0x807E,
|
||||
@@ -648,7 +648,7 @@ unsigned short s2u_98[]={
|
||||
0x6703,0x5055,0x5050,0x5048,0x505A,0x5056,0x506C,0x5078,
|
||||
0x5080,0x509A,0x5085,0x50B4,0x50B2,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_99[]={
|
||||
static const unsigned short s2u_99[]={
|
||||
0x50C9,0x50CA,0x50B3,0x50C2,0x50D6,0x50DE,0x50E5,0x50ED,
|
||||
0x50E3,0x50EE,0x50F9,0x50F5,0x5109,0x5101,0x5102,0x5116,
|
||||
0x5115,0x5114,0x511A,0x5121,0x513A,0x5137,0x513C,0x513B,
|
||||
@@ -674,7 +674,7 @@ unsigned short s2u_99[]={
|
||||
0x5480,0x5476,0x5484,0x5490,0x5486,0x54C7,0x54A2,0x54B8,
|
||||
0x54A5,0x54AC,0x54C4,0x54C8,0x54A8,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_9a[]={
|
||||
static const unsigned short s2u_9a[]={
|
||||
0x54AB,0x54C2,0x54A4,0x54BE,0x54BC,0x54D8,0x54E5,0x54E6,
|
||||
0x550F,0x5514,0x54FD,0x54EE,0x54ED,0x54FA,0x54E2,0x5539,
|
||||
0x5540,0x5563,0x554C,0x552E,0x555C,0x5545,0x5556,0x5557,
|
||||
@@ -700,7 +700,7 @@ unsigned short s2u_9a[]={
|
||||
0x5938,0x593E,0x7AD2,0x5955,0x5950,0x594E,0x595A,0x5958,
|
||||
0x5962,0x5960,0x5967,0x596C,0x5969,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_9b[]={
|
||||
static const unsigned short s2u_9b[]={
|
||||
0x5978,0x5981,0x599D,0x4F5E,0x4FAB,0x59A3,0x59B2,0x59C6,
|
||||
0x59E8,0x59DC,0x598D,0x59D9,0x59DA,0x5A25,0x5A1F,0x5A11,
|
||||
0x5A1C,0x5A09,0x5A1A,0x5A40,0x5A6C,0x5A49,0x5A35,0x5A36,
|
||||
@@ -726,7 +726,7 @@ unsigned short s2u_9b[]={
|
||||
0x5E64,0x5E47,0x5E75,0x5E76,0x5E7A,0x9EBC,0x5E7F,0x5EA0,
|
||||
0x5EC1,0x5EC2,0x5EC8,0x5ED0,0x5ECF,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_9c[]={
|
||||
static const unsigned short s2u_9c[]={
|
||||
0x5ED6,0x5EE3,0x5EDD,0x5EDA,0x5EDB,0x5EE2,0x5EE1,0x5EE8,
|
||||
0x5EE9,0x5EEC,0x5EF1,0x5EF3,0x5EF0,0x5EF4,0x5EF8,0x5EFE,
|
||||
0x5F03,0x5F09,0x5F5D,0x5F5C,0x5F0B,0x5F11,0x5F16,0x5F29,
|
||||
@@ -752,7 +752,7 @@ unsigned short s2u_9c[]={
|
||||
0x61FA,0x61F4,0x61FF,0x61FD,0x61FC,0x61FE,0x6200,0x6208,
|
||||
0x6209,0x620D,0x620C,0x6214,0x621B,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_9d[]={
|
||||
static const unsigned short s2u_9d[]={
|
||||
0x621E,0x6221,0x622A,0x622E,0x6230,0x6232,0x6233,0x6241,
|
||||
0x624E,0x625E,0x6263,0x625B,0x6260,0x6268,0x627C,0x6282,
|
||||
0x6289,0x627E,0x6292,0x6293,0x6296,0x62D4,0x6283,0x6294,
|
||||
@@ -778,7 +778,7 @@ unsigned short s2u_9d[]={
|
||||
0x6670,0x6683,0x6688,0x668E,0x6689,0x6684,0x6698,0x669D,
|
||||
0x66C1,0x66B9,0x66C9,0x66BE,0x66BC,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_9e[]={
|
||||
static const unsigned short s2u_9e[]={
|
||||
0x66C4,0x66B8,0x66D6,0x66DA,0x66E0,0x663F,0x66E6,0x66E9,
|
||||
0x66F0,0x66F5,0x66F7,0x670F,0x6716,0x671E,0x6726,0x6727,
|
||||
0x9738,0x672E,0x673F,0x6736,0x6741,0x6738,0x6737,0x6746,
|
||||
@@ -804,7 +804,7 @@ unsigned short s2u_9e[]={
|
||||
0x6A47,0x6A62,0x6A59,0x6A66,0x6A48,0x6A38,0x6A22,0x6A90,
|
||||
0x6A8D,0x6AA0,0x6A84,0x6AA2,0x6AA3,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_9f[]={
|
||||
static const unsigned short s2u_9f[]={
|
||||
0x6A97,0x8617,0x6ABB,0x6AC3,0x6AC2,0x6AB8,0x6AB3,0x6AAC,
|
||||
0x6ADE,0x6AD1,0x6ADF,0x6AAA,0x6ADA,0x6AEA,0x6AFB,0x6B05,
|
||||
0x8616,0x6AFA,0x6B12,0x6B16,0x9B31,0x6B1F,0x6B38,0x6B37,
|
||||
@@ -830,7 +830,7 @@ unsigned short s2u_9f[]={
|
||||
0x6E9F,0x6F41,0x6F11,0x704C,0x6EEC,0x6EF8,0x6EFE,0x6F3F,
|
||||
0x6EF2,0x6F31,0x6EEF,0x6F32,0x6ECC,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e0[]={
|
||||
static const unsigned short s2u_e0[]={
|
||||
0x6F3E,0x6F13,0x6EF7,0x6F86,0x6F7A,0x6F78,0x6F81,0x6F80,
|
||||
0x6F6F,0x6F5B,0x6FF3,0x6F6D,0x6F82,0x6F7C,0x6F58,0x6F8E,
|
||||
0x6F91,0x6FC2,0x6F66,0x6FB3,0x6FA3,0x6FA1,0x6FA4,0x6FB9,
|
||||
@@ -856,7 +856,7 @@ unsigned short s2u_e0[]={
|
||||
0x7469,0x7470,0x7463,0x746A,0x7476,0x747E,0x748B,0x749E,
|
||||
0x74A7,0x74CA,0x74CF,0x74D4,0x73F1,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e1[]={
|
||||
static const unsigned short s2u_e1[]={
|
||||
0x74E0,0x74E3,0x74E7,0x74E9,0x74EE,0x74F2,0x74F0,0x74F1,
|
||||
0x74F8,0x74F7,0x7504,0x7503,0x7505,0x750C,0x750E,0x750D,
|
||||
0x7515,0x7513,0x751E,0x7526,0x752C,0x753C,0x7544,0x754D,
|
||||
@@ -882,7 +882,7 @@ unsigned short s2u_e1[]={
|
||||
0x78A3,0x78B5,0x78AA,0x78AF,0x78D1,0x78C6,0x78CB,0x78D4,
|
||||
0x78BE,0x78BC,0x78C5,0x78CA,0x78EC,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e2[]={
|
||||
static const unsigned short s2u_e2[]={
|
||||
0x78E7,0x78DA,0x78FD,0x78F4,0x7907,0x7912,0x7911,0x7919,
|
||||
0x792C,0x792B,0x7940,0x7960,0x7957,0x795F,0x795A,0x7955,
|
||||
0x7953,0x797A,0x797F,0x798A,0x799D,0x79A7,0x9F4B,0x79AA,
|
||||
@@ -908,7 +908,7 @@ unsigned short s2u_e2[]={
|
||||
0x7CC5,0x7CC2,0x7CD8,0x7CD2,0x7CDC,0x7CE2,0x9B3B,0x7CEF,
|
||||
0x7CF2,0x7CF4,0x7CF6,0x7CFA,0x7D06,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e3[]={
|
||||
static const unsigned short s2u_e3[]={
|
||||
0x7D02,0x7D1C,0x7D15,0x7D0A,0x7D45,0x7D4B,0x7D2E,0x7D32,
|
||||
0x7D3F,0x7D35,0x7D46,0x7D73,0x7D56,0x7D4E,0x7D72,0x7D68,
|
||||
0x7D6E,0x7D4F,0x7D63,0x7D93,0x7D89,0x7D5B,0x7D8F,0x7D7D,
|
||||
@@ -934,7 +934,7 @@ unsigned short s2u_e3[]={
|
||||
0x80D9,0x80DD,0x80C4,0x80DA,0x80D6,0x8109,0x80EF,0x80F1,
|
||||
0x811B,0x8129,0x8123,0x812F,0x814B,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e4[]={
|
||||
static const unsigned short s2u_e4[]={
|
||||
0x968B,0x8146,0x813E,0x8153,0x8151,0x80FC,0x8171,0x816E,
|
||||
0x8165,0x8166,0x8174,0x8183,0x8188,0x818A,0x8180,0x8182,
|
||||
0x81A0,0x8195,0x81A4,0x81A3,0x815F,0x8193,0x81A9,0x81B0,
|
||||
@@ -960,7 +960,7 @@ unsigned short s2u_e4[]={
|
||||
0x84FF,0x84F4,0x8517,0x8518,0x852C,0x851F,0x8515,0x8514,
|
||||
0x84FC,0x8540,0x8563,0x8558,0x8548,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e5[]={
|
||||
static const unsigned short s2u_e5[]={
|
||||
0x8541,0x8602,0x854B,0x8555,0x8580,0x85A4,0x8588,0x8591,
|
||||
0x858A,0x85A8,0x856D,0x8594,0x859B,0x85EA,0x8587,0x859C,
|
||||
0x8577,0x857E,0x8590,0x85C9,0x85BA,0x85CF,0x85B9,0x85D0,
|
||||
@@ -986,7 +986,7 @@ unsigned short s2u_e5[]={
|
||||
0x891E,0x8925,0x892A,0x892B,0x8941,0x8944,0x893B,0x8936,
|
||||
0x8938,0x894C,0x891D,0x8960,0x895E,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e6[]={
|
||||
static const unsigned short s2u_e6[]={
|
||||
0x8966,0x8964,0x896D,0x896A,0x896F,0x8974,0x8977,0x897E,
|
||||
0x8983,0x8988,0x898A,0x8993,0x8998,0x89A1,0x89A9,0x89A6,
|
||||
0x89AC,0x89AF,0x89B2,0x89BA,0x89BD,0x89BF,0x89C0,0x89DA,
|
||||
@@ -1012,7 +1012,7 @@ unsigned short s2u_e6[]={
|
||||
0x8DFC,0x8E08,0x8E09,0x8DFF,0x8E1D,0x8E1E,0x8E10,0x8E1F,
|
||||
0x8E42,0x8E35,0x8E30,0x8E34,0x8E4A,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e7[]={
|
||||
static const unsigned short s2u_e7[]={
|
||||
0x8E47,0x8E49,0x8E4C,0x8E50,0x8E48,0x8E59,0x8E64,0x8E60,
|
||||
0x8E2A,0x8E63,0x8E55,0x8E76,0x8E72,0x8E7C,0x8E81,0x8E87,
|
||||
0x8E85,0x8E84,0x8E8B,0x8E8A,0x8E93,0x8E91,0x8E94,0x8E99,
|
||||
@@ -1038,7 +1038,7 @@ unsigned short s2u_e7[]={
|
||||
0x929C,0x9296,0x9293,0x929B,0x925A,0x92CF,0x92B9,0x92B7,
|
||||
0x92E9,0x930F,0x92FA,0x9344,0x932E,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e8[]={
|
||||
static const unsigned short s2u_e8[]={
|
||||
0x9319,0x9322,0x931A,0x9323,0x933A,0x9335,0x933B,0x935C,
|
||||
0x9360,0x937C,0x936E,0x9356,0x93B0,0x93AC,0x93AD,0x9394,
|
||||
0x93B9,0x93D6,0x93D7,0x93E8,0x93E5,0x93D8,0x93C3,0x93DD,
|
||||
@@ -1064,7 +1064,7 @@ unsigned short s2u_e8[]={
|
||||
0x980F,0x980C,0x9838,0x9824,0x9821,0x9837,0x983D,0x9846,
|
||||
0x984F,0x984B,0x986B,0x986F,0x9870,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_e9[]={
|
||||
static const unsigned short s2u_e9[]={
|
||||
0x9871,0x9874,0x9873,0x98AA,0x98AF,0x98B1,0x98B6,0x98C4,
|
||||
0x98C3,0x98C6,0x98E9,0x98EB,0x9903,0x9909,0x9912,0x9914,
|
||||
0x9918,0x9921,0x991D,0x991E,0x9924,0x9920,0x992C,0x992E,
|
||||
@@ -1090,7 +1090,7 @@ unsigned short s2u_e9[]={
|
||||
0x9D2A,0x9D26,0x9DAF,0x9D23,0x9D1F,0x9D44,0x9D15,0x9D12,
|
||||
0x9D41,0x9D3F,0x9D3E,0x9D46,0x9D48,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_ea[]={
|
||||
static const unsigned short s2u_ea[]={
|
||||
0x9D5D,0x9D5E,0x9D64,0x9D51,0x9D50,0x9D59,0x9D72,0x9D89,
|
||||
0x9D87,0x9DAB,0x9D6F,0x9D7A,0x9D9A,0x9DA4,0x9DA9,0x9DB2,
|
||||
0x9DC4,0x9DC1,0x9DBB,0x9DB8,0x9DBA,0x9DC6,0x9DCF,0x9DC2,
|
||||
@@ -1116,7 +1116,7 @@ unsigned short s2u_ea[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_eb[]={
|
||||
static const unsigned short s2u_eb[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1142,7 +1142,7 @@ unsigned short s2u_eb[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_ec[]={
|
||||
static const unsigned short s2u_ec[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1168,7 +1168,7 @@ unsigned short s2u_ec[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_ed[]={
|
||||
static const unsigned short s2u_ed[]={
|
||||
0x7E8A,0x891C,0x9348,0x9288,0x84DC,0x4FC9,0x70BB,0x6631,
|
||||
0x68C8,0x92F9,0x66FB,0x5F45,0x4E28,0x4EE1,0x4EFC,0x4F00,
|
||||
0x4F03,0x4F39,0x4F56,0x4F92,0x4F8A,0x4F9A,0x4F94,0x4FCD,
|
||||
@@ -1194,7 +1194,7 @@ unsigned short s2u_ed[]={
|
||||
0x7007,0x7028,0x7085,0x70AB,0x710F,0x7104,0x715C,0x7146,
|
||||
0x7147,0xFA15,0x71C1,0x71FE,0x72B1,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_ee[]={
|
||||
static const unsigned short s2u_ee[]={
|
||||
0x72BE,0x7324,0xFA16,0x7377,0x73BD,0x73C9,0x73D6,0x73E3,
|
||||
0x73D2,0x7407,0x73F5,0x7426,0x742A,0x7429,0x742E,0x7462,
|
||||
0x7489,0x749F,0x7501,0x756F,0x7682,0x769C,0x769E,0x769B,
|
||||
@@ -1220,7 +1220,7 @@ unsigned short s2u_ee[]={
|
||||
0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,0x2178,
|
||||
0x2179,0xFFE2,0xFFE4,0xFF07,0xFF02,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_ef[]={
|
||||
static const unsigned short s2u_ef[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1246,7 +1246,7 @@ unsigned short s2u_ef[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f0[]={
|
||||
static const unsigned short s2u_f0[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1272,7 +1272,7 @@ unsigned short s2u_f0[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f1[]={
|
||||
static const unsigned short s2u_f1[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1298,7 +1298,7 @@ unsigned short s2u_f1[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f2[]={
|
||||
static const unsigned short s2u_f2[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1324,7 +1324,7 @@ unsigned short s2u_f2[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f3[]={
|
||||
static const unsigned short s2u_f3[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1350,7 +1350,7 @@ unsigned short s2u_f3[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f4[]={
|
||||
static const unsigned short s2u_f4[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1376,7 +1376,7 @@ unsigned short s2u_f4[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f5[]={
|
||||
static const unsigned short s2u_f5[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1402,7 +1402,7 @@ unsigned short s2u_f5[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f6[]={
|
||||
static const unsigned short s2u_f6[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1428,7 +1428,7 @@ unsigned short s2u_f6[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f7[]={
|
||||
static const unsigned short s2u_f7[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1454,7 +1454,7 @@ unsigned short s2u_f7[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f8[]={
|
||||
static const unsigned short s2u_f8[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1480,7 +1480,7 @@ unsigned short s2u_f8[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_f9[]={
|
||||
static const unsigned short s2u_f9[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1506,7 +1506,7 @@ unsigned short s2u_f9[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_fa[]={
|
||||
static const unsigned short s2u_fa[]={
|
||||
0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,
|
||||
0x2178,0x2179,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,
|
||||
0x2166,0x2167,0x2168,0x2169,0xffe2,0xffe4,0xff07,0xff02,
|
||||
@@ -1532,7 +1532,7 @@ unsigned short s2u_fa[]={
|
||||
0x6a73,0x6a7e,0x6ae2,0x6ae4,0x6bd6,0x6c3f,0x6c5c,0x6c86,
|
||||
0x6c6f,0x6cda,0x6d04,0x6d87,0x6d6f,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_fb[]={
|
||||
static const unsigned short s2u_fb[]={
|
||||
0x6D96,0x6DAC,0x6DCF,0x6DF8,0x6DF2,0x6DFC,0x6E39,0x6E5C,
|
||||
0x6E27,0x6E3C,0x6EBF,0x6F88,0x6FB5,0x6FF5,0x7005,0x7007,
|
||||
0x7028,0x7085,0x70AB,0x710F,0x7104,0x715C,0x7146,0x7147,
|
||||
@@ -1558,7 +1558,7 @@ unsigned short s2u_fb[]={
|
||||
0x974D,0x974F,0x9751,0x9755,0x9857,0x9865,0xFA2A,0xFA2B,
|
||||
0x9927,0xFA2C,0x999E,0x9A4E,0x9AD9,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_fc[]={
|
||||
static const unsigned short s2u_fc[]={
|
||||
0x9ADC,0x9B75,0x9B72,0x9B8F,0x9BB1,0x9BBB,0x9C00,0x9D70,
|
||||
0x9D6B,0xFA2D,0x9E19,0x9ED1,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1584,7 +1584,7 @@ unsigned short s2u_fc[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_fd[]={
|
||||
static const unsigned short s2u_fd[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1610,7 +1610,7 @@ unsigned short s2u_fd[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_fe[]={
|
||||
static const unsigned short s2u_fe[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1636,7 +1636,7 @@ unsigned short s2u_fe[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short s2u_ff[]={
|
||||
static const unsigned short s2u_ff[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
@@ -1662,7 +1662,7 @@ unsigned short s2u_ff[]={
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,0x30FB,
|
||||
};
|
||||
unsigned short *s2u[] ={
|
||||
const unsigned short *s2u[] ={
|
||||
s2u_80,s2u_81,s2u_82,s2u_83,s2u_84,s2u_85,s2u_86,s2u_87,
|
||||
s2u_88,s2u_89,s2u_8a,s2u_8b,s2u_8c,s2u_8d,s2u_8e,s2u_8f,
|
||||
s2u_90,s2u_91,s2u_92,s2u_93,s2u_94,s2u_95,s2u_96,s2u_97,
|
||||
|
||||
+8
-33
@@ -34,14 +34,13 @@
|
||||
#include "xsystem35.h"
|
||||
|
||||
#ifdef ENABLE_MODULES
|
||||
#include <dlfcn.h>
|
||||
#include "modules.h"
|
||||
#endif
|
||||
|
||||
/* short cut */
|
||||
#define dll nact->ain.dll
|
||||
#define msg nact->ain.msg
|
||||
#define fnc nact->ain.fnc
|
||||
#define path_to_dll nact->ain.path_to_dll
|
||||
#define path_to_ain nact->ain.path_to_ain
|
||||
#define dllnum nact->ain.dllnum
|
||||
#define fncnum nact->ain.fncnum
|
||||
@@ -62,13 +61,6 @@ int s39ain_init(void) {
|
||||
return NG;
|
||||
}
|
||||
|
||||
if (path_to_dll == NULL) {
|
||||
char path[512];
|
||||
getcwd(path, 400);
|
||||
strcat(path, "/modules");
|
||||
path_to_dll = strdup(path);
|
||||
}
|
||||
|
||||
if (NULL == (fp = fopen(path_to_ain, "rb"))) {
|
||||
WARNING("fail to open %s\n", path_to_ain);
|
||||
return NG;
|
||||
@@ -136,6 +128,7 @@ int s39ain_init(void) {
|
||||
dll[i].function[j].argv[k] = LittleEndian_getDW(p, 0);
|
||||
p += 4;
|
||||
}
|
||||
dll[i].function[j].entrypoint = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,30 +169,12 @@ int s39ain_init(void) {
|
||||
p += strlen(p) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef ENABLE_MODULES
|
||||
free(buf);
|
||||
return dllnum == 0 ? OK : NG;
|
||||
#else
|
||||
|
||||
/* open dll */
|
||||
for (i = 0; i < dllnum; i++) {
|
||||
char soname[64];
|
||||
void *handle;
|
||||
|
||||
if (dll[i].function_num == 0) continue;
|
||||
|
||||
snprintf(soname, sizeof(soname), "lib%s.so", dll[i].name);
|
||||
handle = dlopen(soname, RTLD_NOW);
|
||||
|
||||
if (handle == NULL) {
|
||||
SYSERROR("dlopen: %s(%s)\n", dlerror(), dll[i].name);
|
||||
}
|
||||
|
||||
dll[i].handle = handle;
|
||||
}
|
||||
|
||||
|
||||
free(buf);
|
||||
|
||||
#ifdef ENABLE_MODULES
|
||||
for (i = 0; i < dllnum; i++)
|
||||
resolve_module(&dll[i]);
|
||||
#endif
|
||||
return OK;
|
||||
#endif // ENABLE_MODULES
|
||||
}
|
||||
|
||||
+2
-3
@@ -31,11 +31,11 @@ typedef struct {
|
||||
char *name; /* 関数名 */
|
||||
int argc; /* 関数の引数の数 */
|
||||
int *argv; /* 関数の引数のそれぞれの種類 */
|
||||
void (*entrypoint)(void);
|
||||
} S39AIN_DLLFN;
|
||||
|
||||
/* DLL 情報 */
|
||||
typedef struct {
|
||||
void *handle; /* DLL handler */
|
||||
typedef struct S39AIN_DLLINF {
|
||||
char *name; /* DLL 名 */
|
||||
int function_num; /* 関数の数 */
|
||||
S39AIN_DLLFN *function; /* 関数本体 */
|
||||
@@ -51,7 +51,6 @@ typedef struct {
|
||||
/* System39.ain 全体の情報 */
|
||||
typedef struct {
|
||||
char *path_to_ain; /* system39.ain へのパス */
|
||||
char *path_to_dll; /* DLL モジュールへのパス */
|
||||
|
||||
int dllnum; /* DLL の数 */
|
||||
int fncnum; /* FUNC の数 */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user