Initial Commit

This commit is contained in:
dazedanon 2025-06-26 08:36:54 -05:00
commit 6a858c44ef
137 changed files with 1680028 additions and 0 deletions

111
.gitignore vendored Normal file
View file

@ -0,0 +1,111 @@
# Ignore all files
*.*
# File Types
!*.mps
!*.dat
!*.json
!*.txt
!*.project
!*.js
!*.zip
!*.7z
!*.csv
!*.ain
!*.fnl
!*.ks
!*.tjs
!*.yaml
!*.rb
!*.rvdata2
# Other Needed Files
!.gitignore
!README.md
!patch-config.txt
!GameUpdate*
!patch*
!Game.dat
!bsxx.dat*
!game.ini
# Ignore
previous_patch_sha.txt
kabe3_save.dat
kabe3_system.dat
psbpack.dat
Save*
cg.dat
scene.dat
BSXScript_*
# Images
!s_17.png
!s_19.png
!z_32.png
!z_39.png
!z_45.png
!!j_cristal.png
!face17-24.png
!IconSet.png
!TileA5.png
!TileB2.png
!TileB3.png
!title.jpg
!Actor17.png
!Actor17b.png
!Actor19.png
!Actor19b.png
!attribute1.png
!attribute2a.png
!attribute2b.png
!attribute2c.png
!attribute2d.png
!attribute3.png
!battle_tag1.png
!battle_tag2.png
!BF02_Ba1.png
!bf_title.png
!change_ex2.png
!change_ex4.png
!end1.png
!end2.png
!end3.png
!end4.png
!end5.png
!end6.png
!end7.png
!end8.png
!end9.png
!H04_a2.png
!H15_Fa1.png
!H15_Fa2.png
!H15_Fa3.png
!H15_Fa4.png
!H19_Fc2.png
!haiku1.png
!haiku2.png
!haiku3.png
!haiku99.png
!keihin.png
!keikoku1.png
!keikoku2.png
!keikoku3.png
!map.png
!map2.png
!op.png
!op2.png
!S18_Aa1.png
!status_base.png
!status_info1.png
!status_info11.png
!status_info12.png
!status_info13.png
!status_info14.png
!status_info15.png
!status_info16.png
!status_info17.png
!status_info2.png
!status_info3.png
!status_info4.png
!status_info5.png

14
GameUpdate.bat Normal file
View file

@ -0,0 +1,14 @@
@echo off
setlocal
REM Copy GAMEUPDATE.bat to a new file
copy patch.bat patch2.bat
REM Run the new file
call patch2.bat
REM Delete the new file
del patch2.bat
endlocal
@echo on

13
GameUpdate_linux.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
# Enable error handling
set -e
# Copy patch.bat to a new file
cp patch.sh patch2.sh
# Run the new file
bash patch2.sh
# Delete the new file
rm patch2.sh

102
README.md Normal file
View file

@ -0,0 +1,102 @@
# Apply Patch
1. Click Code
2. Click Download ZIP
3. Extract to game folder and Replace All.
## Future Patching
1. Run GAMEUPDATE.bat to auto patch.
# Troubleshooting
**GAMEUPDATE.bat doesn't update and closes immediately**
1. Make sure your path doesn't contain any Japanese characters or lots of whitespace.
2. Make sure you actually have permissions in the folder
For WOLF RPG games, if you downloaded the game off of DLSite, you will need to do some extra steps to patch it. This is because there is a "master" file called Data.wolf that will take priority over the english patch files. You will need this file to be a folder before patching will work.
# Wolf Games
1) Download the latest UberWolf.exe release from the following link:
https://github.com/Sinflower/UberWolf/releases
2) Drag Data.wolf onto UberWolf.exe. This will create a new folder called data.wolf~
3) Rename the new data.wolf~ folder to Data
4) Delete the Data.wolf file
5) Delete previous_patch_sha.txt (this will exist if you ran GameUpdate.bat previously)
6) Run GameUpdate.bat
# Edit/Contribute
TLDR 3 steps.
Fork the repository.
Make the changes.
Submit a merge request.
If everything looks good and doesn't break things I'll merge it in.
Longer Version:
# Required Software:
* [VSCode](https://code.visualstudio.com/) Make sure you check all the boxes for context menus.
* [Git](https://git-scm.com/downloads) (Use the default for everything. Just keep clicking Next)
# Guide to contributing
### 1. Fork the Repository
- Go to the repository you want to fork.
- Click the "Fork" button.
### 2. Clone Your Fork
- Clone your forked repository to your local machine.
```sh
git clone https://gitgud.io/YOUR_USERNAME/REPO_NAME.git
```
### 3. Make Your Changes (In VSCode)
- Edit the files locally on your new branch using VSCode.
- Add and commit your changes.
```sh
git add .
git commit -m "Description of your changes"
```
### 4. Push Your Changes
- Push your changes to your fork on GitGud.io.
```sh
git push origin your-feature-branch
```
### 5. Create a Merge Request
- Go to your fork on GitGud.io.
- Click on "Merge Requests" in the sidebar.
- Click the "New merge request" button.
- Select the branch you made changes to and the target project (the original repo).
- Provide a title and description for your merge request and submit it.
---
## Example
Assuming you want to fork a repository named `example-project`:
### 1. Fork the Repo
- Navigate to `https://gitgud.io/original_user/example-project` and click "Fork".
### 2. Clone Your Fork
```sh
git clone https://gitgud.io/YOUR_USERNAME/example-project.git
```
### 3. Make Changes and Commit
```sh
# Make changes to the files
git add .
git commit -m "Add new feature to example project"
```
### 4. Push Changes
```sh
git push origin add-new-feature
```
### 5. Create a Merge Request
- Go to `https://gitgud.io/YOUR_USERNAME/example-project/merge_requests` and click on "New merge request".
- Choose the source branch `add-new-feature` and target branch (default: `main` or `master`).
- Fill in the details and submit the merge request.

74
Readme.txt Normal file
View file

@ -0,0 +1,74 @@
クリスと遊楽の街 製品版1.1.0
くもがくれ。
本作品のプレイ前に、販売ページにて最新バージョンをご確認下さい。
不具合の修正等については、製品データの差し替えで対応致します。
            
-------------------------------------------------------------------
●はじめに
 本作品は性描写を含む成人向け同人ゲームです。 18歳未満の方のプレイを禁止します。
 本作品はフィクションです。 実在の人物・団体・事件等には関係ありません。 また、性描写の対象となる登場人物は全て18歳以上です。
●著作権
 本作品『クリスと遊楽の街 製品版』の著作権は『くもがくれ。』が所有します。
 本作品、並びに本作品に含まれるデータの無断転載、無断複製、無断配布を禁止します。
 Not for redistribution.
●制作ツール
 RPGツクールMV  株式会社エンターブレイン
●動作環境
 OS : Windows7/8/10
●起動方法
 解凍後、Game.exeをダブルクリックでソフトが起動されます。
 削除時は、フォルダごと削除下さい。
●注意事項
 セーブデータはwwwフォルダ内のsaveフォルダに保存されます。
 セーブデータを引き継ぐ場合は、saveフォルダを引き継ぐ先のwwwフォルダ内にコピーしてください。
●操作方法
 矢印キー    | 移動
 ctrl | ダッシュ(常時ダッシュの場合は歩き)
 X, Esc     | キャンセル、メニュー
 Z, Space, Enter | 決定、攻撃、長押しで溜め攻撃
 Ctrl | 会話の早送り
 shift | メッセージウィンドウ消去、回避
 A   | 会話のオート進行
●免責事項
 本ソフトウェアの使用または改造から生じる全ての損害に関して
 一切の責任を負いかねますので、ご了承下さい。
●サポート
 不具合、ご感想などありましたら下記のアドレスまでお願いします。
 ci-en
 https://ci-en.dlsite.com/creator/11043
●奥付
 『クリスと遊楽の街』
 企画/シナリオ/イラスト:すくも
 制作:くもがくれ。
 https://ci-en.dlsite.com/creator/11043
 twitter:@skm193
●修正履歴
◇ver1.0.0 2021/09/22
◇ver1.0.1 2021/09/23
 不都合の修正
◇ver1.0.2 2021/09/24
 不都合の修正
◇ver1.0.3 2021/09/25
 不都合の修正
◇ver1.0.4 2021/09/26
 不都合の修正
◇ver1.0.5 2021/09/28
 不具合の修正、オート機能の追加
◇ver1.1.0 2021/10/19
 腋毛OFF機能の追加

BIN
icudtl.dat Normal file

Binary file not shown.

12
package.json Normal file
View file

@ -0,0 +1,12 @@
{
"name": "",
"main": "www/index.html",
"js-flags": "--expose-gc",
"window": {
"title": "",
"toolbar": false,
"width": 816,
"height": 624,
"icon": "www/icon/icon.png"
}
}

3
patch-config.txt Normal file
View file

@ -0,0 +1,3 @@
username=dazed-translations
repo=battle-maiden-mizuki
branch=main

109
patch.bat Normal file
View file

@ -0,0 +1,109 @@
@echo off
setlocal EnableExtensions EnableDelayedExpansion
echo Checking for pwsh...
set _my_shell=pwsh
REM Check if pwsh.exe exists
where /q !_my_shell!
if !errorlevel! neq 0 (
echo pwsh not found. Falling back to powershell...
REM If pwsh is not found, set to powershell
set _my_shell=powershell
REM Check if powershell.exe exists
echo Checking for powershell...
where /q !_my_shell!
if !errorlevel! neq 0 (
echo.Error: Powershell not found!
pause
exit /B 1
) else (
echo powershell found.
)
) else (
echo pwsh found.
)
echo Using !_my_shell! for script execution.
REM Check if patch-config.txt exists
if not exist patch-config.txt (
echo "Config file (patch-config.txt) not found! Assuming no patching needed."
pause
exit /b
)
REM Read configuration from file
for /f "tokens=1,2 delims==" %%a in (patch-config.txt) do (
if "%%a"=="username" set "username=%%b"
if "%%a"=="repo" set "repo=%%b"
if "%%a"=="branch" set "branch=%%b"
)
REM Get the latest hash
echo "Getting latest commit SHA hash"
!_my_shell! -Command "(Invoke-RestMethod -Uri 'https://gitgud.io/api/v4/projects/%username%%%2F%repo%/repository/branches/%branch%').commit.id" > latest_patch_sha.txt
REM Read the latest SHA from the file
set /p latest_patch_sha=<latest_patch_sha.txt
REM Check if previous_patch_sha.txt exists
if not exist previous_patch_sha.txt (
echo "Previous SHA hash not found!"
echo "Assuming first time patching..."
goto download_extract
)
REM Read the stored SHA from previous check
set /p previous_patch_sha=<previous_patch_sha.txt
REM Trim whitespace from SHA strings
set "previous_patch_sha=%previous_patch_sha: =%"
set "latest_patch_sha=%latest_patch_sha: =%"
REM Compare trimmed SHAs
if "%latest_patch_sha%" neq "%previous_patch_sha%" (
echo "Update found! Patching..."
goto download_extract
) else (
echo "Patch is up to date."
)
REM Delete latest_patch_sha.txt
del latest_patch_sha.txt
endlocal
pause
exit /b
:download_extract
REM Escape single quotes in paths
set "escaped_cd=%CD:'=''%"
REM Download zip file
echo "Downloading latest patch..."
!_my_shell! -Command "Set-Location -LiteralPath '%escaped_cd%'; Invoke-WebRequest -Uri 'https://gitgud.io/%username%/%repo%/-/archive/%branch%/%repo%-%branch%.zip' -OutFile 'repo.zip'"
if !errorlevel! neq 0 (
pause
exit /b
)
REM Extract contents, overwriting conflicts
echo "Extracting..."
!_my_shell! -Command "Set-Location -LiteralPath '%escaped_cd%'; Expand-Archive -Path '.\repo.zip' -DestinationPath '.' -Force"
echo "Applying patch..."
xcopy /s /e /y "%repo%-%branch%\*" "."
REM Clean up
echo "Cleaning up..."
del repo.zip
rmdir /s /q "%repo%-%branch%"
del latest_patch_sha.txt
REM Store latest SHA for next check
echo %latest_patch_sha% > previous_patch_sha.txt
endlocal
pause
exit /b

74
patch.sh Normal file
View file

@ -0,0 +1,74 @@
#!/bin/bash
check_dependency() {
if ! command -v "$1" > /dev/null 2>&1; then
echo "Error: '$1' is not installed. Please install it using 'pkg install $1'."
exit 1
fi
}
# Check for jq, unzip, and curl
check_dependency jq
check_dependency unzip
check_dependency curl
CONFIG_FILE="patch-config.txt"
# Check if CONFIG_FILE exists
if [ ! -f "$CONFIG_FILE" ]; then
echo "Config file '$CONFIG_FILE' not found! Assuming no patching needed."
exit 0
fi
# Convert line endings to Unix format
sed -i 's/\r$//' "$CONFIG_FILE"
# Debug information
echo "Current directory: $(pwd)"
echo "Config file path: $(pwd)/$CONFIG_FILE"
# Read configuration from file
. "$(pwd)/$CONFIG_FILE"
# Get the latest hash
echo "Getting latest commit SHA hash"
latest_patch_sha=$(curl -s "https://gitgud.io/api/v4/projects/$username%2F$repo/repository/branches/$branch" | jq -r '.commit.id')
download_extract() {
# Download zip file
echo "Downloading latest patch..."
curl -sL "https://gitgud.io/$username/$repo/-/archive/$branch/$repo-$branch.zip" -o repo.zip
# Extract contents, overwriting conflicts
echo "Extracting..."
unzip -qo repo.zip
echo "Applying patch..."
cp -r "$repo-$branch/"* .
echo "Cleaning up..."
rm repo.zip
rm -rf "$repo-$branch"
rm -f latest_patch_sha.txt
# Store latest SHA for next check
echo "$latest_patch_sha" > previous_patch_sha.txt
}
# Check if previous_patch_sha.txt exists
if [ ! -f previous_patch_sha.txt ]; then
echo "Previous SHA hash not found!"
echo "Assuming first time patching..."
download_extract
else
# Read the stored SHA from previous check
previous_patch_sha=$(cat previous_patch_sha.txt)
# Compare trimmed SHAs
if [ "$latest_patch_sha" != "$previous_patch_sha" ]; then
echo "Update found! Patching..."
download_extract
else
echo "Patch is up to date."
fi
fi

433
www/data/Actors.json Normal file
View file

@ -0,0 +1,433 @@
[
null,
{
"id": 1,
"battlerName": "",
"characterIndex": 0,
"characterName": "01crys1",
"classId": 1,
"equips": [
25,
1,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "クリスティア",
"nickname": "精霊魔術師",
"note": "",
"profile": "エルフの魔術師。 精霊魔術を得意とする。\n世界樹の神官としてメイピアに派遣された。"
},
{
"id": 2,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 3,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 4,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 5,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 6,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 7,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 8,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 9,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 10,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "<SBI追加画像1:serihu>\n<SBI追加座標X1:1000>\n<SBI追加座標X1:500>",
"profile": ""
},
{
"id": 11,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 12,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 13,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 14,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 15,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 16,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 17,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 18,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 19,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 20,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
}
]

25312
www/data/Animations.json Normal file

File diff suppressed because it is too large Load diff

5403
www/data/Armors.json Normal file

File diff suppressed because it is too large Load diff

17389
www/data/Classes.json Normal file

File diff suppressed because it is too large Load diff

25945
www/data/CommonEvents.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,399 @@
{
"Scene_Menu": {
"WindowLayer": {
"2,Window_MenuStatus": {
"x": 240,
"y": 0,
"width": 610,
"height": 720,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
},
"1,Window_Gold": {
"x": 0,
"y": 648,
"width": 240,
"height": 72,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
},
"0,Window_MenuCommand": {
"x": 0,
"y": 0,
"width": 240,
"height": 290,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
},
"3,Window_Custom": {
"x": 241,
"y": 338,
"width": 320,
"height": 72,
"opacity": 0,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
},
"4,Window_Custom": {
"x": 294,
"y": 512,
"width": 500,
"height": 72,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
},
"5,Window_Custom": {
"x": 240,
"y": 584,
"width": 610,
"height": 64,
"opacity": 0,
"hidden": false,
"_customFontSize": "20",
"_customPadding": 18,
"_customLineHeight": "28",
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
},
"7,Window_Custom": {
"x": 241,
"y": 410,
"width": 320,
"height": 72,
"opacity": 0,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
},
"6,Window_Custom": {
"x": 307,
"y": 241,
"width": 610,
"height": 64,
"opacity": 0,
"hidden": false,
"_customFontSize": "20",
"_customPadding": 18,
"_customLineHeight": "28",
"_customBackOpacity": "192",
"_customBackFileName": "",
"_customFontFace": ""
},
"7,Window_MenuStatus": {
"x": 200,
"y": 0,
"width": 580,
"height": 720,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
},
"5,Window_MenuCommand": {
"x": 0,
"y": 0,
"width": 200,
"height": 650,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": "",
"_customCssMaxCols": 1
},
"6,Window_Gold": {
"x": 0,
"y": 648,
"width": 200,
"height": 72,
"opacity": 255,
"hidden": false,
"_customFontSize": "28",
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
},
"6,Window_MenuCommand": {
"x": 0,
"y": 0,
"width": 200,
"height": 650,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": "",
"_customCssMaxCols": 1
},
"8,Window_MenuStatus": {
"x": 200,
"y": 0,
"width": 635,
"height": 720,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": "",
"_customCssText1": "face",
"_customCssText2": "name,class,state",
"_customCssText3": " ,hp,mp",
"_customCssSpace": "0,20,20,0",
"_customCssSpaceIn": 5,
"_customCssWidthRate": "1,1,1",
"_customCssMaxCols": 1
},
"7,Window_Gold": {
"x": 0,
"y": 648,
"width": 200,
"height": 72,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": ""
}
},
"Scene_Menu": {
"0,Sprite": {
"x": 0,
"y": 0
}
}
},
"Scene_Status": {
"WindowLayer": {
"0,Window_Status": {
"x": 0,
"y": 0,
"width": 835,
"height": 720,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": "",
"_customCssMaxCols": 1
},
"2,Window_StatusArea": {
"x": 16,
"y": 90,
"width": 750,
"height": 180,
"opacity": 0,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 0,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": "",
"_customCssText1": "face,{line}",
"_customCssText2": "state,hp,mp",
"_customCssText3": "",
"_customCssSpace": "0,20,50,0",
"_customCssSpaceIn": 5,
"_customCssWidthRate": "2,2,3",
"_customCssMaxCols": 1
},
"1,Window_StatusArea": {
"x": 18,
"y": 18,
"width": 750,
"height": 72,
"opacity": 0,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 0,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": "",
"_customCssText1": "name,{line}",
"_customCssText2": "class",
"_customCssText3": "",
"_customCssSpace": "0,20,0,0",
"_customCssSpaceIn": 5,
"_customCssWidthRate": "1,1,1",
"_customCssMaxCols": 1
},
"3,Window_StatusArea": {
"x": 18,
"y": 270,
"width": 750,
"height": 252,
"opacity": 0,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 0,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": "",
"_customCssText1": "param(2),param(3),param(4),param(5),param(6),param(7),{line}",
"_customCssText2": "custom(0),custom(1),custom(2),custom(3)",
"_customCssText3": "equip(0),equip(1),equip(2),equip(3),equip(4)",
"_customCssSpace": "0,40,40,0",
"_customCssSpaceIn": 5,
"_customCssWidthRate": "1,1,4",
"_customCssMaxCols": 1
},
"4,Window_StatusArea": {
"x": 18,
"y": 522,
"width": 750,
"height": 72,
"opacity": 0,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 0,
"_customLineHeight": 36,
"_customBackOpacity": 192,
"_customBackFileName": "",
"_customFontFace": "",
"_customCssText1": "profile,{line}",
"_customCssText2": "",
"_customCssText3": "",
"_customCssSpace": "0,20,50,0",
"_customCssSpaceIn": 5,
"_customCssWidthRate": "1,0,0",
"_customCssMaxCols": 1
}
}
},
"Scene_Title": {
"WindowLayer": {
"0,Window_TitleCommand": {
"x": 260,
"y": 464,
"width": 160,
"height": 186,
"opacity": 0,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": "50",
"_customBackOpacity": 350,
"_customBackFileName": "",
"_customFontFace": "akabara-cinderella",
"_customCssMaxCols": 1
}
},
"Scene_Title": {
"2,Sprite": {
"x": -17,
"y": -247
},
"0,Sprite": {
"x": 640,
"y": 360
}
}
},
"Scene_Skill": {
"WindowLayer": {
"2,Window_SkillStatus": {
"x": 240,
"y": 108,
"width": 1040,
"height": 180,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 350,
"_customBackFileName": "",
"_customFontFace": ""
}
}
},
"Scene_Map": {
"WindowLayer": {
"0,Window_Message": {
"x": 233,
"y": 570,
"width": 816,
"height": 150,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 350,
"_customBackFileName": "",
"_customFontFace": ""
},
"2,Window_ChoiceList": {
"x": 917,
"y": 462,
"width": 132,
"height": 108,
"opacity": 255,
"hidden": false,
"_customFontSize": 28,
"_customPadding": 18,
"_customLineHeight": 36,
"_customBackOpacity": 350,
"_customBackFileName": "",
"_customFontFace": ""
}
}
}
}

256
www/data/Enemies.json Normal file
View file

@ -0,0 +1,256 @@
[
null,
{
"id": 1,
"actions": [
{
"conditionParam1": 0,
"conditionParam2": 0,
"conditionType": 0,
"rating": 5,
"skillId": 1
}
],
"battlerHue": 0,
"battlerName": "Bat",
"dropItems": [
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
}
],
"exp": 0,
"traits": [
{
"code": 22,
"dataId": 0,
"value": 0.95
},
{
"code": 22,
"dataId": 1,
"value": 0.05
},
{
"code": 31,
"dataId": 1,
"value": 0
}
],
"gold": 0,
"name": "こうもり",
"note": "",
"params": [
200,
0,
30,
30,
30,
30,
30,
30
]
},
{
"id": 2,
"actions": [
{
"conditionParam1": 0,
"conditionParam2": 0,
"conditionType": 0,
"rating": 5,
"skillId": 1
}
],
"battlerHue": 0,
"battlerName": "Slime",
"dropItems": [
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
}
],
"exp": 0,
"traits": [
{
"code": 22,
"dataId": 0,
"value": 0.95
},
{
"code": 22,
"dataId": 1,
"value": 0.05
},
{
"code": 31,
"dataId": 1,
"value": 0
}
],
"gold": 0,
"name": "スライム",
"note": "",
"params": [
250,
0,
30,
30,
30,
30,
30,
30
]
},
{
"id": 3,
"actions": [
{
"conditionParam1": 0,
"conditionParam2": 0,
"conditionType": 0,
"rating": 5,
"skillId": 1
}
],
"battlerHue": 0,
"battlerName": "Orc",
"dropItems": [
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
}
],
"exp": 0,
"traits": [
{
"code": 22,
"dataId": 0,
"value": 0.95
},
{
"code": 22,
"dataId": 1,
"value": 0.05
},
{
"code": 31,
"dataId": 1,
"value": 0
}
],
"gold": 0,
"name": "オーク",
"note": "",
"params": [
300,
0,
30,
30,
30,
30,
30,
30
]
},
{
"id": 4,
"actions": [
{
"conditionParam1": 0,
"conditionParam2": 0,
"conditionType": 0,
"rating": 5,
"skillId": 1
}
],
"battlerHue": 0,
"battlerName": "Minotaur",
"dropItems": [
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
}
],
"exp": 0,
"traits": [
{
"code": 22,
"dataId": 0,
"value": 0.95
},
{
"code": 22,
"dataId": 1,
"value": 0.05
},
{
"code": 31,
"dataId": 1,
"value": 0
},
{
"code": 11,
"dataId": 1,
"value": 0.1
}
],
"gold": 0,
"name": "ミノタウロス",
"note": "",
"params": [
28,
0,
25,
20,
11,
11,
12,
55
]
}
]

7956
www/data/Items.json Normal file

File diff suppressed because it is too large Load diff

2480
www/data/Map001.json Normal file

File diff suppressed because it is too large Load diff

17634
www/data/Map002.json Normal file

File diff suppressed because it is too large Load diff

52007
www/data/Map003.json Normal file

File diff suppressed because it is too large Load diff

50108
www/data/Map004.json Normal file

File diff suppressed because it is too large Load diff

30061
www/data/Map005.json Normal file

File diff suppressed because it is too large Load diff

13202
www/data/Map006.json Normal file

File diff suppressed because it is too large Load diff

35768
www/data/Map007.json Normal file

File diff suppressed because it is too large Load diff

35369
www/data/Map008.json Normal file

File diff suppressed because it is too large Load diff

12611
www/data/Map009.json Normal file

File diff suppressed because it is too large Load diff

19464
www/data/Map010.json Normal file

File diff suppressed because it is too large Load diff

28727
www/data/Map011.json Normal file

File diff suppressed because it is too large Load diff

41207
www/data/Map012.json Normal file

File diff suppressed because it is too large Load diff

23862
www/data/Map013.json Normal file

File diff suppressed because it is too large Load diff

20757
www/data/Map014.json Normal file

File diff suppressed because it is too large Load diff

15923
www/data/Map015.json Normal file

File diff suppressed because it is too large Load diff

25702
www/data/Map016.json Normal file

File diff suppressed because it is too large Load diff

14459
www/data/Map017.json Normal file

File diff suppressed because it is too large Load diff

19721
www/data/Map018.json Normal file

File diff suppressed because it is too large Load diff

37676
www/data/Map019.json Normal file

File diff suppressed because it is too large Load diff

17988
www/data/Map020.json Normal file

File diff suppressed because it is too large Load diff

54365
www/data/Map021.json Normal file

File diff suppressed because it is too large Load diff

12043
www/data/Map024.json Normal file

File diff suppressed because it is too large Load diff

16879
www/data/Map025.json Normal file

File diff suppressed because it is too large Load diff

32897
www/data/Map026.json Normal file

File diff suppressed because it is too large Load diff

11761
www/data/Map027.json Normal file

File diff suppressed because it is too large Load diff

31336
www/data/Map030.json Normal file

File diff suppressed because it is too large Load diff

12570
www/data/Map031.json Normal file

File diff suppressed because it is too large Load diff

18997
www/data/Map032.json Normal file

File diff suppressed because it is too large Load diff

12878
www/data/Map033.json Normal file

File diff suppressed because it is too large Load diff

27846
www/data/Map034.json Normal file

File diff suppressed because it is too large Load diff

37646
www/data/Map035.json Normal file

File diff suppressed because it is too large Load diff

43412
www/data/Map036.json Normal file

File diff suppressed because it is too large Load diff

20749
www/data/Map037.json Normal file

File diff suppressed because it is too large Load diff

18878
www/data/Map039.json Normal file

File diff suppressed because it is too large Load diff

18513
www/data/Map040.json Normal file

File diff suppressed because it is too large Load diff

17434
www/data/Map042.json Normal file

File diff suppressed because it is too large Load diff

20056
www/data/Map043.json Normal file

File diff suppressed because it is too large Load diff

11982
www/data/Map044.json Normal file

File diff suppressed because it is too large Load diff

14115
www/data/Map046.json Normal file

File diff suppressed because it is too large Load diff

13773
www/data/Map047.json Normal file

File diff suppressed because it is too large Load diff

14116
www/data/Map048.json Normal file

File diff suppressed because it is too large Load diff

13173
www/data/Map049.json Normal file

File diff suppressed because it is too large Load diff

34265
www/data/Map050.json Normal file

File diff suppressed because it is too large Load diff

30434
www/data/Map051.json Normal file

File diff suppressed because it is too large Load diff

15320
www/data/Map052.json Normal file

File diff suppressed because it is too large Load diff

21735
www/data/Map053.json Normal file

File diff suppressed because it is too large Load diff

28960
www/data/Map054.json Normal file

File diff suppressed because it is too large Load diff

48727
www/data/Map055.json Normal file

File diff suppressed because it is too large Load diff

67518
www/data/Map056.json Normal file

File diff suppressed because it is too large Load diff

11362
www/data/Map057.json Normal file

File diff suppressed because it is too large Load diff

47648
www/data/Map058.json Normal file

File diff suppressed because it is too large Load diff

11844
www/data/Map059.json Normal file

File diff suppressed because it is too large Load diff

25380
www/data/Map060.json Normal file

File diff suppressed because it is too large Load diff

487
www/data/MapInfos.json Normal file
View file

@ -0,0 +1,487 @@
[
null,
{
"id": 1,
"expanded": true,
"name": "遊楽都市メイピア",
"order": 1,
"parentId": 0,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 2,
"expanded": false,
"name": "議事堂周辺",
"order": 2,
"parentId": 1,
"scrollX": 1201,
"scrollY": 920
},
{
"id": 3,
"expanded": true,
"name": "フォルム浴場",
"order": 3,
"parentId": 2,
"scrollX": 1204,
"scrollY": 624
},
{
"id": 4,
"expanded": false,
"name": "闘技場周辺",
"order": 17,
"parentId": 1,
"scrollX": 1201,
"scrollY": 920
},
{
"id": 5,
"expanded": true,
"name": "夜蝶舞台",
"order": 14,
"parentId": 18,
"scrollX": 1097,
"scrollY": 905
},
{
"id": 6,
"expanded": false,
"name": "上流市街地",
"order": 27,
"parentId": 1,
"scrollX": 1201,
"scrollY": 872
},
{
"id": 7,
"expanded": true,
"name": "中流市街地",
"order": 35,
"parentId": 1,
"scrollX": 1201,
"scrollY": 920
},
{
"id": 8,
"expanded": false,
"name": "下流市街地",
"order": 42,
"parentId": 1,
"scrollX": 1201,
"scrollY": 920
},
{
"id": 9,
"expanded": true,
"name": "鍛冶工場クリア後",
"order": 40,
"parentId": 7,
"scrollX": 1201,
"scrollY": 922
},
{
"id": 10,
"expanded": false,
"name": "大劇場周辺",
"order": 10,
"parentId": 1,
"scrollX": 1005,
"scrollY": 872
},
{
"id": 11,
"expanded": true,
"name": "ピエールの美術工房",
"order": 4,
"parentId": 2,
"scrollX": 1200,
"scrollY": 919
},
{
"id": 12,
"expanded": true,
"name": "ウェヌス神殿",
"order": 8,
"parentId": 2,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 13,
"expanded": true,
"name": "ウェヌス神殿2F",
"order": 9,
"parentId": 12,
"scrollX": 1203,
"scrollY": 919
},
{
"id": 14,
"expanded": true,
"name": "議事堂",
"order": 5,
"parentId": 2,
"scrollX": 1201,
"scrollY": 922
},
{
"id": 15,
"expanded": true,
"name": "剣闘士の宿舎",
"order": 24,
"parentId": 4,
"scrollX": 1200,
"scrollY": 919
},
{
"id": 16,
"expanded": true,
"name": "宿屋テアトロン",
"order": 11,
"parentId": 10,
"scrollX": 1005,
"scrollY": 906
},
{
"id": 17,
"expanded": false,
"name": "浄水場クリア前",
"order": 6,
"parentId": 2,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 18,
"expanded": false,
"name": "大劇場",
"order": 12,
"parentId": 10,
"scrollX": 1201,
"scrollY": 920
},
{
"id": 19,
"expanded": true,
"name": "小劇場",
"order": 16,
"parentId": 10,
"scrollX": 1101,
"scrollY": 903
},
{
"id": 20,
"expanded": true,
"name": "地下室",
"order": 26,
"parentId": 55,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 21,
"expanded": false,
"name": "闘技場",
"order": 18,
"parentId": 4,
"scrollX": 1201,
"scrollY": 922
},
null,
null,
{
"id": 24,
"expanded": true,
"name": "死者の門",
"order": 19,
"parentId": 21,
"scrollX": 1129,
"scrollY": 906
},
{
"id": 25,
"expanded": true,
"name": "ニギディウス邸",
"order": 28,
"parentId": 6,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 26,
"expanded": true,
"name": "ニギディウス邸2F",
"order": 29,
"parentId": 25,
"scrollX": 1200,
"scrollY": 919
},
{
"id": 27,
"expanded": true,
"name": "中庭",
"order": 30,
"parentId": 25,
"scrollX": 1175,
"scrollY": 903
},
null,
null,
{
"id": 30,
"expanded": true,
"name": "上流酒場",
"order": 31,
"parentId": 6,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 31,
"expanded": true,
"name": "上流酒場2F",
"order": 32,
"parentId": 30,
"scrollX": 1182,
"scrollY": 917
},
{
"id": 32,
"expanded": true,
"name": "魔法道具店",
"order": 36,
"parentId": 7,
"scrollX": 1201,
"scrollY": 920
},
{
"id": 33,
"expanded": true,
"name": "鍛冶工場クリア前",
"order": 37,
"parentId": 7,
"scrollX": 1201,
"scrollY": 922
},
{
"id": 34,
"expanded": true,
"name": "マッサージ店",
"order": 38,
"parentId": 7,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 35,
"expanded": true,
"name": "下流酒場",
"order": 43,
"parentId": 8,
"scrollX": 1169,
"scrollY": 890
},
{
"id": 36,
"expanded": true,
"name": "合同家屋",
"order": 44,
"parentId": 8,
"scrollX": 1203,
"scrollY": 872
},
{
"id": 37,
"expanded": true,
"name": "簡易浴場",
"order": 45,
"parentId": 8,
"scrollX": 1005,
"scrollY": 908
},
null,
{
"id": 39,
"expanded": true,
"name": "簡易娼館2",
"order": 46,
"parentId": 8,
"scrollX": 1205,
"scrollY": 892
},
{
"id": 40,
"expanded": true,
"name": "簡易娼館3",
"order": 47,
"parentId": 8,
"scrollX": 1107,
"scrollY": 897
},
null,
{
"id": 42,
"expanded": false,
"name": "地下水路",
"order": 20,
"parentId": 4,
"scrollX": 1101,
"scrollY": 891
},
{
"id": 43,
"expanded": false,
"name": "秘儀荘",
"order": 50,
"parentId": 53,
"scrollX": 1201,
"scrollY": 922
},
{
"id": 44,
"expanded": false,
"name": "浄水場クリア後",
"order": 7,
"parentId": 2,
"scrollX": 1203,
"scrollY": 917
},
null,
{
"id": 46,
"expanded": true,
"name": "地下水路・個室A",
"order": 21,
"parentId": 42,
"scrollX": 1129,
"scrollY": 903
},
{
"id": 47,
"expanded": true,
"name": "地下水路・個室B",
"order": 22,
"parentId": 42,
"scrollX": 1200,
"scrollY": 920
},
{
"id": 48,
"expanded": true,
"name": "地下水路・個室C",
"order": 23,
"parentId": 42,
"scrollX": 1129,
"scrollY": 893
},
{
"id": 49,
"expanded": true,
"name": "上流市街地夜",
"order": 34,
"parentId": 6,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 50,
"expanded": true,
"name": "大劇場本番",
"order": 13,
"parentId": 18,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 51,
"expanded": true,
"name": "世界樹神殿",
"order": 39,
"parentId": 7,
"scrollX": 1191,
"scrollY": 872
},
{
"id": 52,
"expanded": true,
"name": "下流市街地夜",
"order": 48,
"parentId": 8,
"scrollX": 1203,
"scrollY": 909
},
{
"id": 53,
"expanded": true,
"name": "秘儀荘周辺",
"order": 49,
"parentId": 8,
"scrollX": 1201,
"scrollY": 920
},
{
"id": 54,
"expanded": true,
"name": "淫具屋",
"order": 41,
"parentId": 7,
"scrollX": 1200,
"scrollY": 919
},
{
"id": 55,
"expanded": true,
"name": "剣闘士治療所",
"order": 25,
"parentId": 4,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 56,
"expanded": true,
"name": "第Ⅳ霊写室",
"order": 51,
"parentId": 1,
"scrollX": 1201,
"scrollY": 922
},
{
"id": 57,
"expanded": true,
"name": "客Dの家",
"order": 33,
"parentId": 30,
"scrollX": 1200,
"scrollY": 921
},
{
"id": 58,
"expanded": false,
"name": "雷鳴の間",
"order": 52,
"parentId": 56,
"scrollX": 1184,
"scrollY": 922
},
{
"id": 59,
"expanded": true,
"name": "雷獣の回廊",
"order": 53,
"parentId": 56,
"scrollX": 1184,
"scrollY": 921
},
{
"id": 60,
"expanded": true,
"name": "フィリア舞台",
"order": 15,
"parentId": 18,
"scrollX": 968,
"scrollY": 904
}
]

3045
www/data/Skills.json Normal file

File diff suppressed because it is too large Load diff

536
www/data/States.json Normal file
View file

@ -0,0 +1,536 @@
[
null,
{
"id": 1,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"iconIndex": 1,
"maxTurns": 1,
"message1": "は倒れた!",
"message2": "を倒した!",
"message3": "",
"message4": "は立ち上がった!",
"minTurns": 1,
"motion": 3,
"name": "戦闘不能",
"note": "ステート1番はHPが0になったときに\n自動的に付加されます。",
"overlay": 0,
"priority": 100,
"releaseByDamage": false,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 4,
"stepsToRemove": 100,
"traits": [
{
"code": 23,
"dataId": 9,
"value": 0
}
]
},
{
"id": 2,
"autoRemovalTiming": 2,
"chanceByDamage": 100,
"description": "",
"iconIndex": 0,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "防御",
"note": "",
"overlay": 0,
"priority": 0,
"removeAtBattleEnd": true,
"removeByDamage": false,
"removeByRestriction": true,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100,
"traits": [
{
"code": 62,
"dataId": 1,
"value": 0
}
]
},
{
"id": 3,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"description": "",
"iconIndex": 0,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "不死身",
"note": "",
"overlay": 0,
"priority": 0,
"removeAtBattleEnd": true,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100,
"traits": [
{
"code": 14,
"dataId": 1,
"value": 0
}
]
},
{
"id": 4,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"iconIndex": 2,
"maxTurns": 1,
"message1": "は毒にかかった!",
"message2": "に毒をかけた!",
"message3": "",
"message4": "の毒が消えた!",
"minTurns": 1,
"motion": 1,
"overlay": 1,
"name": "毒",
"note": "",
"priority": 50,
"releaseByDamage": false,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100,
"traits": [
{
"code": 22,
"dataId": 7,
"value": -0.1
}
]
},
{
"id": 5,
"autoRemovalTiming": 1,
"chanceByDamage": 100,
"iconIndex": 3,
"maxTurns": 5,
"message1": "は暗闇に閉ざされた!",
"message2": "を暗闇に閉ざした!",
"message3": "",
"message4": "の暗闇が消えた!",
"minTurns": 3,
"motion": 1,
"name": "暗闇",
"note": "",
"overlay": 2,
"priority": 60,
"releaseByDamage": false,
"removeAtBattleEnd": true,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100,
"traits": [
{
"code": 22,
"dataId": 0,
"value": -0.5
}
]
},
{
"id": 6,
"autoRemovalTiming": 1,
"chanceByDamage": 100,
"iconIndex": 4,
"maxTurns": 5,
"message1": "は沈黙した!",
"message2": "を沈黙させた!",
"message3": "",
"message4": "の沈黙が解けた!",
"minTurns": 3,
"motion": 1,
"name": "沈黙",
"note": "",
"overlay": 3,
"priority": 65,
"releaseByDamage": false,
"removeAtBattleEnd": true,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100,
"traits": [
{
"code": 42,
"dataId": 1,
"value": 0
}
]
},
{
"id": 7,
"autoRemovalTiming": 1,
"chanceByDamage": 50,
"iconIndex": 5,
"maxTurns": 4,
"message1": "は激昂した!",
"message2": "を激昂させた!",
"message3": "",
"message4": "は我に返った!",
"minTurns": 2,
"motion": 1,
"name": "激昂",
"note": "",
"overlay": 4,
"priority": 70,
"releaseByDamage": false,
"removeAtBattleEnd": true,
"removeByDamage": true,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 1,
"stepsToRemove": 100,
"traits": []
},
{
"id": 8,
"autoRemovalTiming": 1,
"chanceByDamage": 50,
"iconIndex": 6,
"maxTurns": 4,
"message1": "は混乱した!",
"message2": "を混乱させた!",
"message3": "",
"message4": "は我に返った!",
"minTurns": 2,
"motion": 1,
"name": "混乱",
"note": "",
"overlay": 5,
"priority": 75,
"releaseByDamage": false,
"removeAtBattleEnd": true,
"removeByDamage": true,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 2,
"stepsToRemove": 100,
"traits": []
},
{
"id": 9,
"autoRemovalTiming": 1,
"chanceByDamage": 50,
"iconIndex": 7,
"maxTurns": 4,
"message1": "は魅了された!",
"message2": "を魅了した!",
"message3": "",
"message4": "は我に返った!",
"minTurns": 2,
"motion": 1,
"name": "魅了",
"note": "",
"overlay": 6,
"priority": 80,
"releaseByDamage": false,
"removeAtBattleEnd": true,
"removeByDamage": true,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 3,
"stepsToRemove": 100,
"traits": []
},
{
"id": 10,
"autoRemovalTiming": 1,
"chanceByDamage": 100,
"iconIndex": 8,
"maxTurns": 5,
"message1": "は眠った!",
"message2": "を眠らせた!",
"message3": "は眠っている。",
"message4": "は目を覚ました!",
"minTurns": 3,
"motion": 2,
"name": "睡眠",
"note": "",
"overlay": 7,
"priority": 90,
"releaseByDamage": true,
"removeAtBattleEnd": true,
"removeByDamage": true,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 4,
"stepsToRemove": 100,
"traits": [
{
"code": 22,
"dataId": 1,
"value": -1
}
]
},
{
"id": 11,
"autoRemovalTiming": 0,
"chanceByDamage": 50,
"iconIndex": 23,
"maxTurns": 4,
"message1": "は発情してしまった!",
"message2": "を発情させた!",
"message3": "",
"message4": "は我に返った!",
"minTurns": 2,
"motion": 0,
"name": "発情",
"note": "",
"overlay": 0,
"priority": 80,
"releaseByDamage": false,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100,
"traits": []
},
{
"id": 12,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"traits": [],
"iconIndex": 0,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "",
"note": "",
"overlay": 0,
"priority": 50,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100
},
{
"id": 13,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"traits": [],
"iconIndex": 0,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "",
"note": "",
"overlay": 0,
"priority": 50,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100
},
{
"id": 14,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"traits": [],
"iconIndex": 0,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "",
"note": "",
"overlay": 0,
"priority": 50,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100
},
{
"id": 15,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"traits": [],
"iconIndex": 0,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "",
"note": "",
"overlay": 0,
"priority": 50,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100
},
{
"id": 16,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"traits": [],
"iconIndex": 84,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "淫乱段階1",
"note": "",
"overlay": 0,
"priority": 50,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100
},
{
"id": 17,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"traits": [],
"iconIndex": 84,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "淫乱段階2",
"note": "",
"overlay": 0,
"priority": 50,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100
},
{
"id": 18,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"traits": [],
"iconIndex": 84,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "淫乱段階3",
"note": "",
"overlay": 0,
"priority": 50,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100
},
{
"id": 19,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"traits": [],
"iconIndex": 84,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "淫乱段階4",
"note": "",
"overlay": 0,
"priority": 50,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100
},
{
"id": 20,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"traits": [],
"iconIndex": 0,
"maxTurns": 1,
"message1": "",
"message2": "",
"message3": "",
"message4": "",
"minTurns": 1,
"motion": 0,
"name": "",
"note": "",
"overlay": 0,
"priority": 50,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 0,
"stepsToRemove": 100
}
]

2026
www/data/System.json Normal file

File diff suppressed because it is too large Load diff

106886
www/data/Tilesets.json Normal file

File diff suppressed because it is too large Load diff

167
www/data/Troops.json Normal file
View file

@ -0,0 +1,167 @@
[
null,
{
"id": 1,
"members": [
{
"enemyId": 1,
"x": 336,
"y": 436,
"hidden": false
},
{
"enemyId": 1,
"x": 480,
"y": 436,
"hidden": false
}
],
"name": "こうもり*2",
"pages": [
{
"conditions": {
"actorHp": 50,
"actorId": 1,
"actorValid": false,
"enemyHp": 50,
"enemyIndex": 0,
"enemyValid": false,
"switchId": 1,
"switchValid": false,
"turnA": 0,
"turnB": 0,
"turnEnding": false,
"turnValid": false
},
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"span": 0
}
]
},
{
"id": 2,
"members": [
{
"enemyId": 2,
"x": 337,
"y": 436,
"hidden": false
},
{
"enemyId": 2,
"x": 480,
"y": 436,
"hidden": false
}
],
"name": "スライム*2",
"pages": [
{
"conditions": {
"actorHp": 50,
"actorId": 1,
"actorValid": false,
"enemyHp": 50,
"enemyIndex": 0,
"enemyValid": false,
"switchId": 1,
"switchValid": false,
"turnA": 0,
"turnB": 0,
"turnEnding": false,
"turnValid": false
},
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"span": 0
}
]
},
{
"id": 3,
"members": [
{
"enemyId": 3,
"x": 408,
"y": 436,
"hidden": false
}
],
"name": "オーク",
"pages": [
{
"conditions": {
"actorHp": 50,
"actorId": 1,
"actorValid": false,
"enemyHp": 50,
"enemyIndex": 0,
"enemyValid": false,
"switchId": 1,
"switchValid": false,
"turnA": 0,
"turnB": 0,
"turnEnding": false,
"turnValid": false
},
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"span": 0
}
]
},
{
"id": 4,
"members": [
{
"enemyId": 4,
"x": 408,
"y": 436,
"hidden": false
}
],
"name": "ミノタウロス",
"pages": [
{
"conditions": {
"actorHp": 50,
"actorId": 1,
"actorValid": false,
"enemyHp": 50,
"enemyIndex": 0,
"enemyValid": false,
"switchId": 1,
"switchValid": false,
"turnA": 0,
"turnB": 0,
"turnEnding": false,
"turnValid": false
},
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"span": 0
}
]
}
]

1663
www/data/Weapons.json Normal file

File diff suppressed because it is too large Load diff

1195
www/data/klystia.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,22 @@
{
"battle": {
"background": "038",
"corner": "000",
"frame": "020"
},
"other": {
"background": "038",
"corner": "000",
"frame": "020"
},
"status": {
"background": "038",
"corner": "038",
"frame": "020"
},
"talk": {
"background": "038",
"corner": "038",
"frame": "020"
}
}

15
www/js/libs/fpsmeter.js Normal file
View file

@ -0,0 +1,15 @@
/*! FPSMeter 0.3.1 - 9th May 2013 | https://github.com/Darsain/fpsmeter */
(function(m,j){function s(a,e){for(var g in e)try{a.style[g]=e[g]}catch(j){}return a}function H(a){return null==a?String(a):"object"===typeof a||"function"===typeof a?Object.prototype.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase()||"object":typeof a}function R(a,e){if("array"!==H(e))return-1;if(e.indexOf)return e.indexOf(a);for(var g=0,j=e.length;g<j;g++)if(e[g]===a)return g;return-1}function I(){var a=arguments,e;for(e in a[1])if(a[1].hasOwnProperty(e))switch(H(a[1][e])){case "object":a[0][e]=
I({},a[0][e],a[1][e]);break;case "array":a[0][e]=a[1][e].slice(0);break;default:a[0][e]=a[1][e]}return 2<a.length?I.apply(null,[a[0]].concat(Array.prototype.slice.call(a,2))):a[0]}function N(a){a=Math.round(255*a).toString(16);return 1===a.length?"0"+a:a}function S(a,e,g,j){if(a.addEventListener)a[j?"removeEventListener":"addEventListener"](e,g,!1);else if(a.attachEvent)a[j?"detachEvent":"attachEvent"]("on"+e,g)}function D(a,e){function g(a,b,d,c){return y[0|a][Math.round(Math.min((b-d)/(c-d)*J,J))]}
function r(){f.legend.fps!==q&&(f.legend.fps=q,f.legend[T]=q?"FPS":"ms");K=q?b.fps:b.duration;f.count[T]=999<K?"999+":K.toFixed(99<K?0:d.decimals)}function m(){z=A();L<z-d.threshold&&(b.fps-=b.fps/Math.max(1,60*d.smoothing/d.interval),b.duration=1E3/b.fps);for(c=d.history;c--;)E[c]=0===c?b.fps:E[c-1],F[c]=0===c?b.duration:F[c-1];r();if(d.heat){if(w.length)for(c=w.length;c--;)w[c].el.style[h[w[c].name].heatOn]=q?g(h[w[c].name].heatmap,b.fps,0,d.maxFps):g(h[w[c].name].heatmap,b.duration,d.threshold,
0);if(f.graph&&h.column.heatOn)for(c=u.length;c--;)u[c].style[h.column.heatOn]=q?g(h.column.heatmap,E[c],0,d.maxFps):g(h.column.heatmap,F[c],d.threshold,0)}if(f.graph)for(p=0;p<d.history;p++)u[p].style.height=(q?E[p]?Math.round(O/d.maxFps*Math.min(E[p],d.maxFps)):0:F[p]?Math.round(O/d.threshold*Math.min(F[p],d.threshold)):0)+"px"}function k(){20>d.interval?(x=M(k),m()):(x=setTimeout(k,d.interval),P=M(m))}function G(a){a=a||window.event;a.preventDefault?(a.preventDefault(),a.stopPropagation()):(a.returnValue=
!1,a.cancelBubble=!0);b.toggle()}function U(){d.toggleOn&&S(f.container,d.toggleOn,G,1);a.removeChild(f.container)}function V(){f.container&&U();h=D.theme[d.theme];y=h.compiledHeatmaps||[];if(!y.length&&h.heatmaps.length){for(p=0;p<h.heatmaps.length;p++){y[p]=[];for(c=0;c<=J;c++){var b=y[p],e=c,g;g=0.33/J*c;var j=h.heatmaps[p].saturation,m=h.heatmaps[p].lightness,n=void 0,k=void 0,l=void 0,t=l=void 0,v=n=k=void 0,v=void 0,l=0.5>=m?m*(1+j):m+j-m*j;0===l?g="#000":(t=2*m-l,k=(l-t)/l,g*=6,n=Math.floor(g),
v=g-n,v*=l*k,0===n||6===n?(n=l,k=t+v,l=t):1===n?(n=l-v,k=l,l=t):2===n?(n=t,k=l,l=t+v):3===n?(n=t,k=l-v):4===n?(n=t+v,k=t):(n=l,k=t,l-=v),g="#"+N(n)+N(k)+N(l));b[e]=g}}h.compiledHeatmaps=y}f.container=s(document.createElement("div"),h.container);f.count=f.container.appendChild(s(document.createElement("div"),h.count));f.legend=f.container.appendChild(s(document.createElement("div"),h.legend));f.graph=d.graph?f.container.appendChild(s(document.createElement("div"),h.graph)):0;w.length=0;for(var q in f)f[q]&&
h[q].heatOn&&w.push({name:q,el:f[q]});u.length=0;if(f.graph){f.graph.style.width=d.history*h.column.width+(d.history-1)*h.column.spacing+"px";for(c=0;c<d.history;c++)u[c]=f.graph.appendChild(s(document.createElement("div"),h.column)),u[c].style.position="absolute",u[c].style.bottom=0,u[c].style.right=c*h.column.width+c*h.column.spacing+"px",u[c].style.width=h.column.width+"px",u[c].style.height="0px"}s(f.container,d);r();a.appendChild(f.container);f.graph&&(O=f.graph.clientHeight);d.toggleOn&&("click"===
d.toggleOn&&(f.container.style.cursor="pointer"),S(f.container,d.toggleOn,G))}"object"===H(a)&&a.nodeType===j&&(e=a,a=document.body);a||(a=document.body);var b=this,d=I({},D.defaults,e||{}),f={},u=[],h,y,J=100,w=[],W=0,B=d.threshold,Q=0,L=A()-B,z,E=[],F=[],x,P,q="fps"===d.show,O,K,c,p;b.options=d;b.fps=0;b.duration=0;b.isPaused=0;b.tickStart=function(){Q=A()};b.tick=function(){z=A();W=z-L;B+=(W-B)/d.smoothing;b.fps=1E3/B;b.duration=Q<L?B:z-Q;L=z};b.pause=function(){x&&(b.isPaused=1,clearTimeout(x),
C(x),C(P),x=P=0);return b};b.resume=function(){x||(b.isPaused=0,k());return b};b.set=function(a,c){d[a]=c;q="fps"===d.show;-1!==R(a,X)&&V();-1!==R(a,Y)&&s(f.container,d);return b};b.showDuration=function(){b.set("show","ms");return b};b.showFps=function(){b.set("show","fps");return b};b.toggle=function(){b.set("show",q?"ms":"fps");return b};b.hide=function(){b.pause();f.container.style.display="none";return b};b.show=function(){b.resume();f.container.style.display="block";return b};b.destroy=function(){b.pause();
U();b.tick=b.tickStart=function(){}};V();k()}var A,r=m.performance;A=r&&(r.now||r.webkitNow)?r[r.now?"now":"webkitNow"].bind(r):function(){return+new Date};for(var C=m.cancelAnimationFrame||m.cancelRequestAnimationFrame,M=m.requestAnimationFrame,r=["moz","webkit","o"],G=0,k=0,Z=r.length;k<Z&&!C;++k)M=(C=m[r[k]+"CancelAnimationFrame"]||m[r[k]+"CancelRequestAnimationFrame"])&&m[r[k]+"RequestAnimationFrame"];C||(M=function(a){var e=A(),g=Math.max(0,16-(e-G));G=e+g;return m.setTimeout(function(){a(e+
g)},g)},C=function(a){clearTimeout(a)});var T="string"===H(document.createElement("div").textContent)?"textContent":"innerText";D.extend=I;window.FPSMeter=D;D.defaults={interval:100,smoothing:10,show:"fps",toggleOn:"click",decimals:1,maxFps:60,threshold:100,position:"absolute",zIndex:10,left:"5px",top:"5px",right:"auto",bottom:"auto",margin:"0 0 0 0",theme:"dark",heat:0,graph:0,history:20};var X=["toggleOn","theme","heat","graph","history"],Y="position zIndex left top right bottom margin".split(" ")})(window);(function(m,j){j.theme={};var s=j.theme.base={heatmaps:[],container:{heatOn:null,heatmap:null,padding:"5px",minWidth:"95px",height:"30px",lineHeight:"30px",textAlign:"right",textShadow:"none"},count:{heatOn:null,heatmap:null,position:"absolute",top:0,right:0,padding:"5px 10px",height:"30px",fontSize:"24px",fontFamily:"Consolas, Andale Mono, monospace",zIndex:2},legend:{heatOn:null,heatmap:null,position:"absolute",top:0,left:0,padding:"5px 10px",height:"30px",fontSize:"12px",lineHeight:"32px",fontFamily:"sans-serif",
textAlign:"left",zIndex:2},graph:{heatOn:null,heatmap:null,position:"relative",boxSizing:"padding-box",MozBoxSizing:"padding-box",height:"100%",zIndex:1},column:{width:4,spacing:1,heatOn:null,heatmap:null}};j.theme.dark=j.extend({},s,{heatmaps:[{saturation:0.8,lightness:0.8}],container:{background:"#222",color:"#fff",border:"1px solid #1a1a1a",textShadow:"1px 1px 0 #222"},count:{heatOn:"color"},column:{background:"#3f3f3f"}});j.theme.light=j.extend({},s,{heatmaps:[{saturation:0.5,lightness:0.5}],
container:{color:"#666",background:"#fff",textShadow:"1px 1px 0 rgba(255,255,255,.5), -1px -1px 0 rgba(255,255,255,.5)",boxShadow:"0 0 0 1px rgba(0,0,0,.1)"},count:{heatOn:"color"},column:{background:"#eaeaea"}});j.theme.colorful=j.extend({},s,{heatmaps:[{saturation:0.5,lightness:0.6}],container:{heatOn:"backgroundColor",background:"#888",color:"#fff",textShadow:"1px 1px 0 rgba(0,0,0,.2)",boxShadow:"0 0 0 1px rgba(0,0,0,.1)"},column:{background:"#777",backgroundColor:"rgba(0,0,0,.2)"}});j.theme.transparent=
j.extend({},s,{heatmaps:[{saturation:0.8,lightness:0.5}],container:{padding:0,color:"#fff",textShadow:"1px 1px 0 rgba(0,0,0,.5)"},count:{padding:"0 5px",height:"40px",lineHeight:"40px"},legend:{padding:"0 5px",height:"40px",lineHeight:"42px"},graph:{height:"40px"},column:{width:5,background:"#999",heatOn:"backgroundColor",opacity:0.5}})})(window,FPSMeter);

View file

@ -0,0 +1,3 @@
/*! npm.im/iphone-inline-video */
var makeVideoPlayableInline=function(){"use strict";/*! npm.im/intervalometer */
function e(e,n,r,i){function t(r){d=n(t,i),e(r-(a||r)),a=r}var d,a;return{start:function(){d||t(0)},stop:function(){r(d),d=null,a=0}}}function n(n){return e(n,requestAnimationFrame,cancelAnimationFrame)}function r(e,n,r,i){function t(n){Boolean(e[r])===Boolean(i)&&n.stopImmediatePropagation(),delete e[r]}return e.addEventListener(n,t,!1),t}function i(e,n,r,i){function t(){return r[n]}function d(e){r[n]=e}i&&d(e[n]),Object.defineProperty(e,n,{get:t,set:d})}function t(e,n,r){r.addEventListener(n,function(){return e.dispatchEvent(new Event(n))})}function d(e,n){Promise.resolve().then(function(){e.dispatchEvent(new Event(n))})}function a(e){var n=new Audio;return t(e,"play",n),t(e,"playing",n),t(e,"pause",n),n.crossOrigin=e.crossOrigin,n.src=e.src||e.currentSrc||"data:",n}function o(e,n,r){(m||0)+200<Date.now()&&(e[g]=!0,m=Date.now()),r||(e.currentTime=n),A[++k%3]=100*n|0}function u(e){return e.driver.currentTime>=e.video.duration}function s(e){var n=this;n.video.readyState>=n.video.HAVE_FUTURE_DATA?(n.hasAudio||(n.driver.currentTime=n.video.currentTime+e*n.video.playbackRate/1e3,n.video.loop&&u(n)&&(n.driver.currentTime=0)),o(n.video,n.driver.currentTime)):n.video.networkState!==n.video.NETWORK_IDLE||n.video.buffered.length||n.video.load(),n.video.ended&&(delete n.video[g],n.video.pause(!0))}function c(){var e=this,n=e[b];return e.webkitDisplayingFullscreen?void e[E]():("data:"!==n.driver.src&&n.driver.src!==e.src&&(o(e,0,!0),n.driver.src=e.src),void(e.paused&&(n.paused=!1,e.buffered.length||e.load(),n.driver.play(),n.updater.start(),n.hasAudio||(d(e,"play"),n.video.readyState>=n.video.HAVE_ENOUGH_DATA&&d(e,"playing")))))}function v(e){var n=this,r=n[b];r.driver.pause(),r.updater.stop(),n.webkitDisplayingFullscreen&&n[T](),r.paused&&!e||(r.paused=!0,r.hasAudio||d(n,"pause"),n.ended&&(n[g]=!0,d(n,"ended")))}function p(e,r){var i=e[b]={};i.paused=!0,i.hasAudio=r,i.video=e,i.updater=n(s.bind(i)),r?i.driver=a(e):(e.addEventListener("canplay",function(){e.paused||d(e,"playing")}),i.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,u(i)&&o(e,0)},get ended(){return u(i)}}),e.addEventListener("emptied",function(){var n=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==e.src&&(o(e,0,!0),i.driver.src=e.src,n?i.driver.play():i.updater.stop())},!1),e.addEventListener("webkitbeginfullscreen",function(){e.paused?r&&!i.driver.buffered.length&&i.driver.load():(e.pause(),e[E]())}),r&&(e.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=e.currentTime}),e.addEventListener("seeking",function(){A.indexOf(100*e.currentTime|0)<0&&(i.driver.currentTime=e.currentTime)}))}function l(e){var n=e[b];e[E]=e.play,e[T]=e.pause,e.play=c,e.pause=v,i(e,"paused",n.driver),i(e,"muted",n.driver,!0),i(e,"playbackRate",n.driver,!0),i(e,"ended",n.driver),i(e,"loop",n.driver,!0),r(e,"seeking"),r(e,"seeked"),r(e,"timeupdate",g,!1),r(e,"ended",g,!1)}function f(e,n,r){void 0===n&&(n=!0),void 0===r&&(r=!0),r&&!h||e[b]||(p(e,n),l(e),e.classList.add("IIV"),!n&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments"))}var m,y="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol,h="object-fit"in document.head.style&&/iPhone|iPod/i.test(navigator.userAgent)&&!matchMedia("(-webkit-video-playable-inline)").matches,b=y(),g=y(),E=y("nativeplay"),T=y("nativepause"),A=[],k=0;return f.isWhitelisted=h,f}();

1
www/js/libs/lz-string.js Normal file

File diff suppressed because one or more lines are too long

428
www/js/libs/pixi-picture.js Normal file
View file

@ -0,0 +1,428 @@
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var shaderLib = [
{
vertUniforms: "",
vertCode: "vTextureCoord = aTextureCoord;",
fragUniforms: "uniform vec4 uTextureClamp;",
fragCode: "vec2 textureCoord = clamp(vTextureCoord, uTextureClamp.xy, uTextureClamp.zw);"
},
{
vertUniforms: "uniform mat3 uTransform;",
vertCode: "vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;",
fragUniforms: "",
fragCode: "vec2 textureCoord = vTextureCoord;"
},
{
vertUniforms: "uniform mat3 uTransform;",
vertCode: "vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;",
fragUniforms: "uniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;",
fragCode: "vec2 textureCoord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;" +
"\ntextureCoord = (uMapCoord * vec3(textureCoord, 1.0)).xy;" +
"\ntextureCoord = clamp(textureCoord, uClampFrame.xy, uClampFrame.zw);"
}
];
var PictureShader = (function (_super) {
__extends(PictureShader, _super);
function PictureShader(gl, vert, frag, tilingMode) {
var lib = shaderLib[tilingMode];
_super.call(this, gl, vert.replace(/%SPRITE_UNIFORMS%/gi, lib.vertUniforms)
.replace(/%SPRITE_CODE%/gi, lib.vertCode), frag.replace(/%SPRITE_UNIFORMS%/gi, lib.fragUniforms)
.replace(/%SPRITE_CODE%/gi, lib.fragCode));
this.bind();
this.tilingMode = tilingMode;
this.tempQuad = new PIXI.Quad(gl);
this.tempQuad.initVao(this);
this.uniforms.uColor = new Float32Array([1, 1, 1, 1]);
this.uniforms.uSampler = [0, 1];
}
PictureShader.blendVert = "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\nuniform mat3 mapMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n %SPRITE_CODE%\n vMapCoord = (mapMatrix * vec3(aVertexPosition, 1.0)).xy;\n}\n";
return PictureShader;
}(PIXI.Shader));
extras.PictureShader = PictureShader;
})(extras = PIXI.extras || (PIXI.extras = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var overlayFrag = "\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n vec4 source = texture2D(uSampler[0], textureCoord) * uColor;\n vec4 target = texture2D(uSampler[1], vMapCoord);\n\n //reverse hardlight\n if (source.a == 0.0) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n //yeah, premultiplied\n vec3 Cb = source.rgb/source.a, Cs;\n if (target.a > 0.0) {\n Cs = target.rgb / target.a;\n }\n vec3 multiply = Cb * Cs * 2.0;\n vec3 Cs2 = Cs * 2.0 - 1.0;\n vec3 screen = Cb + Cs2 - Cb * Cs2;\n vec3 B;\n if (Cb.r <= 0.5) {\n B.r = multiply.r;\n } else {\n B.r = screen.r;\n }\n if (Cb.g <= 0.5) {\n B.g = multiply.g;\n } else {\n B.g = screen.g;\n }\n if (Cb.b <= 0.5) {\n B.b = multiply.b;\n } else {\n B.b = screen.b;\n }\n vec4 res;\n res.xyz = (1.0 - source.a) * Cs + source.a * B;\n res.a = source.a + target.a * (1.0-source.a);\n gl_FragColor = vec4(res.xyz * res.a, res.a);\n}\n";
var HardLightShader = (function (_super) {
__extends(HardLightShader, _super);
function HardLightShader(gl, tilingMode) {
_super.call(this, gl, extras.PictureShader.blendVert, overlayFrag, tilingMode);
}
return HardLightShader;
}(extras.PictureShader));
extras.HardLightShader = HardLightShader;
})(extras = PIXI.extras || (PIXI.extras = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
function mapFilterBlendModesToPixi(gl, array) {
if (array === void 0) { array = []; }
array[PIXI.BLEND_MODES.OVERLAY] = [new extras.OverlayShader(gl, 0), new extras.OverlayShader(gl, 1), new extras.OverlayShader(gl, 2)];
array[PIXI.BLEND_MODES.HARD_LIGHT] = [new extras.HardLightShader(gl, 0), new extras.HardLightShader(gl, 1), new extras.HardLightShader(gl, 2)];
return array;
}
extras.mapFilterBlendModesToPixi = mapFilterBlendModesToPixi;
})(extras = PIXI.extras || (PIXI.extras = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var normalFrag = "\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n\n vec4 sample = texture2D(uSampler[0], textureCoord);\n gl_FragColor = sample * uColor;\n}\n";
var normalVert = "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n %SPRITE_CODE%\n}\n";
var NormalShader = (function (_super) {
__extends(NormalShader, _super);
function NormalShader(gl, tilingMode) {
_super.call(this, gl, normalVert, normalFrag, tilingMode);
}
return NormalShader;
}(extras.PictureShader));
extras.NormalShader = NormalShader;
})(extras = PIXI.extras || (PIXI.extras = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var overlayFrag = "\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n vec4 source = texture2D(uSampler[0], textureCoord) * uColor;\n vec4 target = texture2D(uSampler[1], vMapCoord);\n\n //reverse hardlight\n if (source.a == 0.0) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n //yeah, premultiplied\n vec3 Cb = source.rgb/source.a, Cs;\n if (target.a > 0.0) {\n Cs = target.rgb / target.a;\n }\n vec3 multiply = Cb * Cs * 2.0;\n vec3 Cb2 = Cb * 2.0 - 1.0;\n vec3 screen = Cb2 + Cs - Cb2 * Cs;\n vec3 B;\n if (Cs.r <= 0.5) {\n B.r = multiply.r;\n } else {\n B.r = screen.r;\n }\n if (Cs.g <= 0.5) {\n B.g = multiply.g;\n } else {\n B.g = screen.g;\n }\n if (Cs.b <= 0.5) {\n B.b = multiply.b;\n } else {\n B.b = screen.b;\n }\n vec4 res;\n res.xyz = (1.0 - source.a) * Cs + source.a * B;\n res.a = source.a + target.a * (1.0-source.a);\n gl_FragColor = vec4(res.xyz * res.a, res.a);\n}\n";
var OverlayShader = (function (_super) {
__extends(OverlayShader, _super);
function OverlayShader(gl, tilingMode) {
_super.call(this, gl, extras.PictureShader.blendVert, overlayFrag, tilingMode);
}
return OverlayShader;
}(extras.PictureShader));
extras.OverlayShader = OverlayShader;
})(extras = PIXI.extras || (PIXI.extras = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
function nextPow2(v) {
v += (v === 0) ? 1 : 0;
--v;
v |= v >>> 1;
v |= v >>> 2;
v |= v >>> 4;
v |= v >>> 8;
v |= v >>> 16;
return v + 1;
}
var PictureRenderer = (function (_super) {
__extends(PictureRenderer, _super);
function PictureRenderer(renderer) {
_super.call(this, renderer);
}
PictureRenderer.prototype.onContextChange = function () {
var gl = this.renderer.gl;
this.drawModes = extras.mapFilterBlendModesToPixi(gl);
this.normalShader = [new extras.NormalShader(gl, 0), new extras.NormalShader(gl, 1), new extras.NormalShader(gl, 2)];
this._tempClamp = new Float32Array(4);
this._tempColor = new Float32Array(4);
this._tempRect = new PIXI.Rectangle();
this._tempRect2 = new PIXI.Rectangle();
this._tempRect3 = new PIXI.Rectangle();
this._tempMatrix = new PIXI.Matrix();
this._tempMatrix2 = new PIXI.Matrix();
this._bigBuf = new Uint8Array(1 << 20);
this._renderTexture = new PIXI.BaseRenderTexture(1024, 1024);
};
PictureRenderer.prototype.start = function () {
};
PictureRenderer.prototype.flush = function () {
};
PictureRenderer.prototype._getRenderTexture = function (minWidth, minHeight) {
if (this._renderTexture.width < minWidth ||
this._renderTexture.height < minHeight) {
minHeight = nextPow2(minWidth);
minHeight = nextPow2(minHeight);
this._renderTexture.resize(minWidth, minHeight);
}
return this._renderTexture;
};
PictureRenderer.prototype._getBuf = function (size) {
var buf = this._bigBuf;
if (buf.length < size) {
size = nextPow2(size);
buf = new Uint8Array(size);
this._bigBuf = buf;
}
return buf;
};
PictureRenderer.prototype.render = function (sprite) {
if (!sprite.texture.valid) {
return;
}
var tilingMode = 0;
if (sprite.tileTransform) {
tilingMode = this._isSimpleSprite(sprite) ? 1 : 2;
}
var blendShader = this.drawModes[sprite.blendMode];
if (blendShader) {
this._renderBlend(sprite, blendShader[tilingMode]);
}
else {
this._renderNormal(sprite, this.normalShader[tilingMode]);
}
};
PictureRenderer.prototype._renderNormal = function (sprite, shader) {
var renderer = this.renderer;
renderer.bindShader(shader);
renderer.state.setBlendMode(sprite.blendMode);
this._renderInner(sprite, shader);
};
PictureRenderer.prototype._renderBlend = function (sprite, shader) {
var renderer = this.renderer;
var spriteBounds = sprite.getBounds();
var renderTarget = renderer._activeRenderTarget;
var matrix = renderTarget.projectionMatrix;
var flipX = matrix.a < 0;
var flipY = matrix.d < 0;
var resolution = renderTarget.resolution;
var screen = this._tempRect;
var fr = renderTarget.sourceFrame || renderTarget.destinationFrame;
screen.x = 0;
screen.y = 0;
screen.width = fr.width;
screen.height = fr.height;
var bounds = this._tempRect2;
var fbw = fr.width * resolution, fbh = fr.height * resolution;
bounds.x = (spriteBounds.x + matrix.tx / matrix.a) * resolution + fbw / 2;
bounds.y = (spriteBounds.y + matrix.ty / matrix.d) * resolution + fbh / 2;
bounds.width = spriteBounds.width * resolution;
bounds.height = spriteBounds.height * resolution;
if (flipX) {
bounds.y = fbw - bounds.width - bounds.x;
}
if (flipY) {
bounds.y = fbh - bounds.height - bounds.y;
}
var screenBounds = this._tempRect3;
var x_1 = Math.floor(Math.max(screen.x, bounds.x));
var x_2 = Math.ceil(Math.min(screen.x + screen.width, bounds.x + bounds.width));
var y_1 = Math.floor(Math.max(screen.y, bounds.y));
var y_2 = Math.ceil(Math.min(screen.y + screen.height, bounds.y + bounds.height));
var pixelsWidth = x_2 - x_1;
var pixelsHeight = y_2 - y_1;
if (pixelsWidth <= 0 || pixelsHeight <= 0) {
return;
}
var rt = this._getRenderTexture(pixelsWidth, pixelsHeight);
renderer.bindTexture(rt, 1, true);
var gl = renderer.gl;
if (renderer.renderingToScreen && renderTarget.root) {
var buf = this._getBuf(pixelsWidth * pixelsHeight * 4);
gl.readPixels(x_1, y_1, pixelsWidth, pixelsHeight, gl.RGBA, gl.UNSIGNED_BYTE, this._bigBuf);
gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, pixelsWidth, pixelsHeight, gl.RGBA, gl.UNSIGNED_BYTE, this._bigBuf);
}
else {
gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, x_1, y_1, pixelsWidth, pixelsHeight);
}
renderer.bindShader(shader);
renderer.state.setBlendMode(PIXI.BLEND_MODES.NORMAL);
if (shader.uniforms.mapMatrix) {
var mapMatrix = this._tempMatrix;
mapMatrix.a = bounds.width / rt.width / spriteBounds.width;
if (flipX) {
mapMatrix.a = -mapMatrix.a;
mapMatrix.tx = (bounds.x - x_1) / rt.width - (spriteBounds.x + spriteBounds.width) * mapMatrix.a;
}
else {
mapMatrix.tx = (bounds.x - x_1) / rt.width - spriteBounds.x * mapMatrix.a;
}
mapMatrix.d = bounds.height / rt.height / spriteBounds.height;
if (flipY) {
mapMatrix.d = -mapMatrix.d;
mapMatrix.ty = (bounds.y - y_1) / rt.height - (spriteBounds.y + spriteBounds.height) * mapMatrix.d;
}
else {
mapMatrix.ty = (bounds.y - y_1) / rt.height - spriteBounds.y * mapMatrix.d;
}
shader.uniforms.mapMatrix = mapMatrix.toArray(true);
}
this._renderInner(sprite, shader);
};
PictureRenderer.prototype._renderInner = function (sprite, shader) {
var renderer = this.renderer;
if (shader.tilingMode > 0) {
this._renderWithShader(sprite, shader.tilingMode === 1, shader);
}
else {
this._renderSprite(sprite, shader);
}
};
PictureRenderer.prototype._renderWithShader = function (ts, isSimple, shader) {
var quad = shader.tempQuad;
var renderer = this.renderer;
renderer.bindVao(quad.vao);
var vertices = quad.vertices;
var _width = ts._width;
var _height = ts._height;
var _anchorX = ts._anchor._x;
var _anchorY = ts._anchor._y;
var w0 = _width * (1 - _anchorX);
var w1 = _width * -_anchorX;
var h0 = _height * (1 - _anchorY);
var h1 = _height * -_anchorY;
var wt = ts.transform.worldTransform;
var a = wt.a;
var b = wt.b;
var c = wt.c;
var d = wt.d;
var tx = wt.tx;
var ty = wt.ty;
vertices[0] = (a * w1) + (c * h1) + tx;
vertices[1] = (d * h1) + (b * w1) + ty;
vertices[2] = (a * w0) + (c * h1) + tx;
vertices[3] = (d * h1) + (b * w0) + ty;
vertices[4] = (a * w0) + (c * h0) + tx;
vertices[5] = (d * h0) + (b * w0) + ty;
vertices[6] = (a * w1) + (c * h0) + tx;
vertices[7] = (d * h0) + (b * w1) + ty;
vertices = quad.uvs;
vertices[0] = vertices[6] = -ts.anchor.x;
vertices[1] = vertices[3] = -ts.anchor.y;
vertices[2] = vertices[4] = 1.0 - ts.anchor.x;
vertices[5] = vertices[7] = 1.0 - ts.anchor.y;
quad.upload();
var tex = ts._texture;
var lt = ts.tileTransform.localTransform;
var uv = ts.uvTransform;
var mapCoord = uv.mapCoord;
var uClampFrame = uv.uClampFrame;
var uClampOffset = uv.uClampOffset;
var w = tex.width;
var h = tex.height;
var W = _width;
var H = _height;
var tempMat = this._tempMatrix2;
tempMat.set(lt.a * w / W, lt.b * w / H, lt.c * h / W, lt.d * h / H, lt.tx / W, lt.ty / H);
tempMat.invert();
if (isSimple) {
tempMat.append(mapCoord);
}
else {
shader.uniforms.uMapCoord = mapCoord.toArray(true);
shader.uniforms.uClampFrame = uClampFrame;
shader.uniforms.uClampOffset = uClampOffset;
}
shader.uniforms.uTransform = tempMat.toArray(true);
var color = this._tempColor;
var alpha = ts.worldAlpha;
PIXI.utils.hex2rgb(ts.tint, color);
color[0] *= alpha;
color[1] *= alpha;
color[2] *= alpha;
color[3] = alpha;
shader.uniforms.uColor = color;
renderer.bindTexture(tex, 0, true);
quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0);
};
PictureRenderer.prototype._renderSprite = function (sprite, shader) {
var renderer = this.renderer;
var quad = shader.tempQuad;
renderer.bindVao(quad.vao);
var uvs = sprite.texture._uvs;
var vertices = quad.vertices;
var vd = sprite.vertexData;
for (var i = 0; i < 8; i++) {
quad.vertices[i] = vd[i];
}
quad.uvs[0] = uvs.x0;
quad.uvs[1] = uvs.y0;
quad.uvs[2] = uvs.x1;
quad.uvs[3] = uvs.y1;
quad.uvs[4] = uvs.x2;
quad.uvs[5] = uvs.y2;
quad.uvs[6] = uvs.x3;
quad.uvs[7] = uvs.y3;
quad.upload();
var frame = sprite.texture.frame;
var base = sprite.texture.baseTexture;
var clamp = this._tempClamp;
var eps = 0.5 / base.resolution;
clamp[0] = (frame.x + eps) / base.width;
clamp[1] = (frame.y + eps) / base.height;
clamp[2] = (frame.x + frame.width - eps) / base.width;
clamp[3] = (frame.y + frame.height - eps) / base.height;
shader.uniforms.uTextureClamp = clamp;
var color = this._tempColor;
PIXI.utils.hex2rgb(sprite.tint, color);
var alpha = sprite.worldAlpha;
color[0] *= alpha;
color[1] *= alpha;
color[2] *= alpha;
color[3] = alpha;
shader.uniforms.uColor = color;
renderer.bindTexture(base, 0, true);
quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0);
};
PictureRenderer.prototype._isSimpleSprite = function (ts) {
var renderer = this.renderer;
var tex = ts._texture;
var baseTex = tex.baseTexture;
var isSimple = baseTex.isPowerOfTwo && tex.frame.width === baseTex.width && tex.frame.height === baseTex.height;
if (isSimple) {
if (!baseTex._glTextures[renderer.CONTEXT_UID]) {
if (baseTex.wrapMode === PIXI.WRAP_MODES.CLAMP) {
baseTex.wrapMode = PIXI.WRAP_MODES.REPEAT;
}
}
else {
isSimple = baseTex.wrapMode !== PIXI.WRAP_MODES.CLAMP;
}
}
return isSimple;
};
return PictureRenderer;
}(PIXI.ObjectRenderer));
extras.PictureRenderer = PictureRenderer;
PIXI.WebGLRenderer.registerPlugin('picture', PictureRenderer);
PIXI.CanvasRenderer.registerPlugin('picture', PIXI.CanvasSpriteRenderer);
})(extras = PIXI.extras || (PIXI.extras = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var PictureSprite = (function (_super) {
__extends(PictureSprite, _super);
function PictureSprite(texture) {
_super.call(this, texture);
this.pluginName = 'picture';
}
return PictureSprite;
}(PIXI.Sprite));
extras.PictureSprite = PictureSprite;
})(extras = PIXI.extras || (PIXI.extras = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var PictureTilingSprite = (function (_super) {
__extends(PictureTilingSprite, _super);
function PictureTilingSprite(texture) {
_super.call(this, texture);
this.pluginName = 'picture';
}
return PictureTilingSprite;
}(extras.TilingSprite));
extras.PictureTilingSprite = PictureTilingSprite;
})(extras = PIXI.extras || (PIXI.extras = {}));
})(PIXI || (PIXI = {}));
//# sourceMappingURL=pixi-picture.js.map

887
www/js/libs/pixi-tilemap.js Normal file
View file

@ -0,0 +1,887 @@
var PIXI;
(function (PIXI) {
var tilemap;
(function (tilemap) {
var CanvasTileRenderer = (function () {
function CanvasTileRenderer(renderer) {
this.tileAnim = [0, 0];
this.dontUseTransform = false;
this.renderer = renderer;
this.tileAnim = [0, 0];
}
return CanvasTileRenderer;
}());
tilemap.CanvasTileRenderer = CanvasTileRenderer;
PIXI.CanvasRenderer.registerPlugin('tilemap', CanvasTileRenderer);
})(tilemap = PIXI.tilemap || (PIXI.tilemap = {}));
})(PIXI || (PIXI = {}));
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var PIXI;
(function (PIXI) {
var tilemap;
(function (tilemap) {
var CompositeRectTileLayer = (function (_super) {
__extends(CompositeRectTileLayer, _super);
function CompositeRectTileLayer(zIndex, bitmaps, useSquare, texPerChild) {
var _this = _super.call(this) || this;
_this.shadowColor = new Float32Array([0.0, 0.0, 0.0, 0.5]);
_this.modificationMarker = 0;
_this._globalMat = null;
_this._tempScale = null;
_this.initialize.apply(_this, arguments);
return _this;
}
CompositeRectTileLayer.prototype.updateTransform = function () {
_super.prototype.displayObjectUpdateTransform.call(this);
};
CompositeRectTileLayer.prototype.initialize = function (zIndex, bitmaps, useSquare, texPerChild) {
this.z = this.zIndex = zIndex;
this.useSquare = useSquare;
this.texPerChild = texPerChild || 16;
if (bitmaps) {
this.setBitmaps(bitmaps);
}
};
CompositeRectTileLayer.prototype.setBitmaps = function (bitmaps) {
var texPerChild = this.texPerChild;
var len1 = this.children.length;
var len2 = Math.ceil(bitmaps.length / texPerChild);
var i;
for (i = 0; i < len1; i++) {
this.children[i].textures = bitmaps.slice(i * texPerChild, (i + 1) * texPerChild);
}
for (i = len1; i < len2; i++) {
this.addChild(new tilemap.RectTileLayer(this.zIndex, bitmaps.slice(i * texPerChild, (i + 1) * texPerChild)));
}
};
CompositeRectTileLayer.prototype.clear = function () {
for (var i = 0; i < this.children.length; i++)
this.children[i].clear();
this.modificationMarker = 0;
};
CompositeRectTileLayer.prototype.addRect = function (num, u, v, x, y, tileWidth, tileHeight) {
if (this.children[num] && this.children[num].textures)
this.children[num].addRect(0, u, v, x, y, tileWidth, tileHeight);
};
CompositeRectTileLayer.prototype.addFrame = function (texture_, x, y, animX, animY) {
var texture;
var layer = null, ind = 0;
var children = this.children;
if (typeof texture_ === "number") {
var childIndex = texture_ / this.texPerChild >> 0;
layer = children[childIndex];
if (!layer) {
layer = children[0];
if (!layer) {
return false;
}
ind = 0;
}
else {
ind = texture_ % this.texPerChild;
}
texture = layer.textures[ind];
}
else if (typeof texture_ === "string") {
texture = PIXI.Texture.fromImage(texture_);
}
else {
texture = texture_;
for (var i = 0; i < children.length; i++) {
var child = children[i];
var tex = child.textures;
for (var j = 0; j < tex.length; j++) {
if (tex[j].baseTexture == texture.baseTexture) {
layer = child;
ind = j;
break;
}
}
if (layer) {
break;
}
}
if (!layer) {
for (i = 0; i < children.length; i++) {
var child = children[i];
if (child.textures.length < this.texPerChild) {
layer = child;
ind = child.textures.length;
child.textures.push(texture);
break;
}
}
if (!layer) {
children.push(layer = new tilemap.RectTileLayer(this.zIndex, texture));
ind = 0;
}
}
}
layer.addRect(ind, texture.frame.x, texture.frame.y, x, y, texture.frame.width, texture.frame.height, animX, animY);
return true;
};
;
CompositeRectTileLayer.prototype.renderCanvas = function (renderer) {
if (!renderer.plugins.tilemap.dontUseTransform) {
var wt = this.worldTransform;
renderer.context.setTransform(wt.a, wt.b, wt.c, wt.d, wt.tx * renderer.resolution, wt.ty * renderer.resolution);
}
var layers = this.children;
for (var i = 0; i < layers.length; i++)
layers[i].renderCanvas(renderer);
};
;
CompositeRectTileLayer.prototype.renderWebGL = function (renderer) {
var gl = renderer.gl;
var shader = renderer.plugins.tilemap.getShader(this.useSquare);
renderer.setObjectRenderer(renderer.plugins.tilemap);
renderer.bindShader(shader);
this._globalMat = this._globalMat || new PIXI.Matrix();
renderer._activeRenderTarget.projectionMatrix.copy(this._globalMat).append(this.worldTransform);
shader.uniforms.projectionMatrix = this._globalMat.toArray(true);
shader.uniforms.shadowColor = this.shadowColor;
if (this.useSquare) {
var tempScale = this._tempScale = (this._tempScale || [0, 0]);
tempScale[0] = this._globalMat.a >= 0 ? 1 : -1;
tempScale[1] = this._globalMat.d < 0 ? 1 : -1;
var ps = shader.uniforms.pointScale = tempScale;
shader.uniforms.projectionScale = Math.abs(this.worldTransform.a) * renderer.resolution;
}
var af = shader.uniforms.animationFrame = renderer.plugins.tilemap.tileAnim;
var layers = this.children;
for (var i = 0; i < layers.length; i++)
layers[i].renderWebGL(renderer, this.useSquare);
};
CompositeRectTileLayer.prototype.isModified = function (anim) {
var layers = this.children;
if (this.modificationMarker != layers.length) {
return true;
}
for (var i = 0; i < layers.length; i++) {
var layer = layers[i];
if (layer.modificationMarker != layer.pointsBuf.length ||
anim && layer.hasAnim) {
return true;
}
}
return false;
};
CompositeRectTileLayer.prototype.clearModify = function () {
var layers = this.children;
this.modificationMarker = layers.length;
for (var i = 0; i < layers.length; i++) {
var layer = layers[i];
layer.modificationMarker = layer.pointsBuf.length;
}
};
return CompositeRectTileLayer;
}(PIXI.Container));
tilemap.CompositeRectTileLayer = CompositeRectTileLayer;
})(tilemap = PIXI.tilemap || (PIXI.tilemap = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var tilemap;
(function (tilemap) {
var GraphicsLayer = (function (_super) {
__extends(GraphicsLayer, _super);
function GraphicsLayer(zIndex) {
var _this = _super.call(this) || this;
_this.z = _this.zIndex = zIndex;
return _this;
}
GraphicsLayer.prototype.renderCanvas = function (renderer) {
var wt = null;
if (renderer.plugins.tilemap.dontUseTransform) {
wt = this.transform.worldTransform;
this.transform.worldTransform = PIXI.Matrix.IDENTITY;
}
renderer.plugins.graphics.render(this);
if (renderer.plugins.tilemap.dontUseTransform) {
this.transform.worldTransform = wt;
}
renderer.context.globalAlpha = 1.0;
};
GraphicsLayer.prototype.renderWebGL = function (renderer) {
if (!this._webGL[renderer.CONTEXT_UID])
this.dirty = true;
_super.prototype.renderWebGL.call(this, renderer);
};
GraphicsLayer.prototype.isModified = function (anim) {
return false;
};
GraphicsLayer.prototype.clearModify = function () {
};
return GraphicsLayer;
}(PIXI.Graphics));
})(tilemap = PIXI.tilemap || (PIXI.tilemap = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var tilemap;
(function (tilemap) {
var RectTileLayer = (function (_super) {
__extends(RectTileLayer, _super);
function RectTileLayer(zIndex, texture) {
var _this = _super.call(this) || this;
_this.z = 0;
_this.zIndex = 0;
_this.pointsBuf = [];
_this._tempSize = new Float32Array([0, 0]);
_this._tempTexSize = 1;
_this.modificationMarker = 0;
_this.hasAnim = false;
_this.vbId = 0;
_this.vbBuffer = null;
_this.vbArray = null;
_this.vbInts = null;
_this.initialize(zIndex, texture);
return _this;
}
RectTileLayer.prototype.initialize = function (zIndex, textures) {
if (!textures) {
textures = [];
}
else if (!(textures instanceof Array) && textures.baseTexture) {
textures = [textures];
}
this.textures = textures;
this.z = this.zIndex = zIndex;
this.visible = false;
};
RectTileLayer.prototype.clear = function () {
this.pointsBuf.length = 0;
this.modificationMarker = 0;
this.hasAnim = false;
};
RectTileLayer.prototype.renderCanvas = function (renderer) {
if (this.textures.length === 0)
return;
var points = this.pointsBuf;
renderer.context.fillStyle = '#000000';
for (var i = 0, n = points.length; i < n; i += 9) {
var x1 = points[i], y1 = points[i + 1];
var x2 = points[i + 2], y2 = points[i + 3];
var w = points[i + 4];
var h = points[i + 5];
x1 += points[i + 6] * renderer.plugins.tilemap.tileAnim[0];
y1 += points[i + 7] * renderer.plugins.tilemap.tileAnim[1];
var textureId = points[i + 8];
if (textureId >= 0) {
renderer.context.drawImage(this.textures[textureId].baseTexture.source, x1, y1, w, h, x2, y2, w, h);
}
else {
renderer.context.globalAlpha = 0.5;
renderer.context.fillRect(x2, y2, w, h);
renderer.context.globalAlpha = 1;
}
}
};
RectTileLayer.prototype.addRect = function (textureId, u, v, x, y, tileWidth, tileHeight, animX, animY) {
if (animX === void 0) { animX = 0; }
if (animY === void 0) { animY = 0; }
var pb = this.pointsBuf;
this.hasAnim = this.hasAnim || animX > 0 || animY > 0;
if (tileWidth == tileHeight) {
pb.push(u);
pb.push(v);
pb.push(x);
pb.push(y);
pb.push(tileWidth);
pb.push(tileHeight);
pb.push(animX | 0);
pb.push(animY | 0);
pb.push(textureId);
}
else {
var i;
if (tileWidth % tileHeight === 0) {
for (i = 0; i < tileWidth / tileHeight; i++) {
pb.push(u + i * tileHeight);
pb.push(v);
pb.push(x + i * tileHeight);
pb.push(y);
pb.push(tileHeight);
pb.push(tileHeight);
pb.push(animX | 0);
pb.push(animY | 0);
pb.push(textureId);
}
}
else if (tileHeight % tileWidth === 0) {
for (i = 0; i < tileHeight / tileWidth; i++) {
pb.push(u);
pb.push(v + i * tileWidth);
pb.push(x);
pb.push(y + i * tileWidth);
pb.push(tileWidth);
pb.push(tileWidth);
pb.push(animX | 0);
pb.push(animY | 0);
pb.push(textureId);
}
}
else {
pb.push(u);
pb.push(v);
pb.push(x);
pb.push(y);
pb.push(tileWidth);
pb.push(tileHeight);
pb.push(animX | 0);
pb.push(animY | 0);
pb.push(textureId);
}
}
};
;
RectTileLayer.prototype.renderWebGL = function (renderer, useSquare) {
if (useSquare === void 0) { useSquare = false; }
var points = this.pointsBuf;
if (points.length === 0)
return;
var rectsCount = points.length / 9;
var tile = renderer.plugins.tilemap;
var gl = renderer.gl;
if (!useSquare) {
tile.checkIndexBuffer(rectsCount);
}
var shader = tile.getShader(useSquare);
var textures = this.textures;
if (textures.length === 0)
return;
var len = textures.length;
if (this._tempTexSize < shader.maxTextures) {
this._tempTexSize = shader.maxTextures;
this._tempSize = new Float32Array(2 * shader.maxTextures);
}
for (var i = 0; i < len; i++) {
if (!textures[i] || !textures[i].valid)
return;
var texture = textures[i].baseTexture;
}
tile.bindTextures(renderer, shader, textures);
var vb = tile.getVb(this.vbId);
if (!vb) {
vb = tile.createVb(useSquare);
this.vbId = vb.id;
this.vbBuffer = null;
this.modificationMarker = 0;
}
var vao = vb.vao;
renderer.bindVao(vao);
var vertexBuf = vb.vb;
vertexBuf.bind();
var vertices = rectsCount * shader.vertPerQuad;
if (vertices === 0)
return;
if (this.modificationMarker != vertices) {
this.modificationMarker = vertices;
var vs = shader.stride * vertices;
if (!this.vbBuffer || this.vbBuffer.byteLength < vs) {
var bk = shader.stride;
while (bk < vs) {
bk *= 2;
}
this.vbBuffer = new ArrayBuffer(bk);
this.vbArray = new Float32Array(this.vbBuffer);
this.vbInts = new Uint32Array(this.vbBuffer);
vertexBuf.upload(this.vbBuffer, 0, true);
}
var arr = this.vbArray, ints = this.vbInts;
var sz = 0;
var textureId, shiftU, shiftV;
if (useSquare) {
for (i = 0; i < points.length; i += 9) {
textureId = (points[i + 8] >> 2);
shiftU = 1024 * (points[i + 8] & 1);
shiftV = 1024 * ((points[i + 8] >> 1) & 1);
arr[sz++] = points[i + 2];
arr[sz++] = points[i + 3];
arr[sz++] = points[i + 0] + shiftU;
arr[sz++] = points[i + 1] + shiftV;
arr[sz++] = points[i + 4];
arr[sz++] = points[i + 6];
arr[sz++] = points[i + 7];
arr[sz++] = textureId;
}
}
else {
var tint = -1;
for (i = 0; i < points.length; i += 9) {
var eps = 0.5;
textureId = (points[i + 8] >> 2);
shiftU = 1024 * (points[i + 8] & 1);
shiftV = 1024 * ((points[i + 8] >> 1) & 1);
var x = points[i + 2], y = points[i + 3];
var w = points[i + 4], h = points[i + 5];
var u = points[i] + shiftU, v = points[i + 1] + shiftV;
var animX = points[i + 6], animY = points[i + 7];
arr[sz++] = x;
arr[sz++] = y;
arr[sz++] = u;
arr[sz++] = v;
arr[sz++] = u + eps;
arr[sz++] = v + eps;
arr[sz++] = u + w - eps;
arr[sz++] = v + h - eps;
arr[sz++] = animX;
arr[sz++] = animY;
arr[sz++] = textureId;
arr[sz++] = x + w;
arr[sz++] = y;
arr[sz++] = u + w;
arr[sz++] = v;
arr[sz++] = u + eps;
arr[sz++] = v + eps;
arr[sz++] = u + w - eps;
arr[sz++] = v + h - eps;
arr[sz++] = animX;
arr[sz++] = animY;
arr[sz++] = textureId;
arr[sz++] = x + w;
arr[sz++] = y + h;
arr[sz++] = u + w;
arr[sz++] = v + h;
arr[sz++] = u + eps;
arr[sz++] = v + eps;
arr[sz++] = u + w - eps;
arr[sz++] = v + h - eps;
arr[sz++] = animX;
arr[sz++] = animY;
arr[sz++] = textureId;
arr[sz++] = x;
arr[sz++] = y + h;
arr[sz++] = u;
arr[sz++] = v + h;
arr[sz++] = u + eps;
arr[sz++] = v + eps;
arr[sz++] = u + w - eps;
arr[sz++] = v + h - eps;
arr[sz++] = animX;
arr[sz++] = animY;
arr[sz++] = textureId;
}
}
vertexBuf.upload(arr, 0, true);
}
if (useSquare)
gl.drawArrays(gl.POINTS, 0, vertices);
else
gl.drawElements(gl.TRIANGLES, rectsCount * 6, gl.UNSIGNED_SHORT, 0);
};
return RectTileLayer;
}(PIXI.Container));
tilemap.RectTileLayer = RectTileLayer;
})(tilemap = PIXI.tilemap || (PIXI.tilemap = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var tilemap;
(function (tilemap) {
var rectShaderFrag = "varying vec2 vTextureCoord;\nvarying vec4 vFrame;\nvarying float vTextureId;\nuniform vec4 shadowColor;\nuniform sampler2D uSamplers[%count%];\nuniform vec2 uSamplerSize[%count%];\n\nvoid main(void){\n vec2 textureCoord = clamp(vTextureCoord, vFrame.xy, vFrame.zw);\n float textureId = floor(vTextureId + 0.5);\n\n vec4 color;\n %forloop%\n gl_FragColor = color;\n}";
var rectShaderVert = "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aFrame;\nattribute vec2 aAnim;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform vec2 animationFrame;\n\nvarying vec2 vTextureCoord;\nvarying float vTextureId;\nvarying vec4 vFrame;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vec2 anim = aAnim * animationFrame;\n vTextureCoord = aTextureCoord + anim;\n vFrame = aFrame + vec4(anim, anim);\n vTextureId = aTextureId;\n}\n";
var TilemapShader = (function (_super) {
__extends(TilemapShader, _super);
function TilemapShader(gl, maxTextures, shaderVert, shaderFrag) {
var _this = _super.call(this, gl, shaderVert, shaderFrag) || this;
_this.maxTextures = 0;
_this.maxTextures = maxTextures;
tilemap.shaderGenerator.fillSamplers(_this, _this.maxTextures);
return _this;
}
return TilemapShader;
}(PIXI.Shader));
tilemap.TilemapShader = TilemapShader;
var RectTileShader = (function (_super) {
__extends(RectTileShader, _super);
function RectTileShader(gl, maxTextures) {
var _this = _super.call(this, gl, maxTextures, rectShaderVert, tilemap.shaderGenerator.generateFragmentSrc(maxTextures, rectShaderFrag)) || this;
_this.vertSize = 11;
_this.vertPerQuad = 4;
_this.stride = _this.vertSize * 4;
tilemap.shaderGenerator.fillSamplers(_this, _this.maxTextures);
return _this;
}
RectTileShader.prototype.createVao = function (renderer, vb) {
var gl = renderer.gl;
return renderer.createVao()
.addIndex(this.indexBuffer)
.addAttribute(vb, this.attributes.aVertexPosition, gl.FLOAT, false, this.stride, 0)
.addAttribute(vb, this.attributes.aTextureCoord, gl.FLOAT, false, this.stride, 2 * 4)
.addAttribute(vb, this.attributes.aFrame, gl.FLOAT, false, this.stride, 4 * 4)
.addAttribute(vb, this.attributes.aAnim, gl.FLOAT, false, this.stride, 8 * 4)
.addAttribute(vb, this.attributes.aTextureId, gl.FLOAT, false, this.stride, 10 * 4);
};
return RectTileShader;
}(TilemapShader));
tilemap.RectTileShader = RectTileShader;
})(tilemap = PIXI.tilemap || (PIXI.tilemap = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var tilemap;
(function (tilemap) {
var shaderGenerator;
(function (shaderGenerator) {
function fillSamplers(shader, maxTextures) {
var sampleValues = [];
for (var i = 0; i < maxTextures; i++) {
sampleValues[i] = i;
}
shader.bind();
shader.uniforms.uSamplers = sampleValues;
var samplerSize = [];
for (i = 0; i < maxTextures; i++) {
samplerSize.push(1.0 / 2048);
samplerSize.push(1.0 / 2048);
}
shader.uniforms.uSamplerSize = samplerSize;
}
shaderGenerator.fillSamplers = fillSamplers;
function generateFragmentSrc(maxTextures, fragmentSrc) {
return fragmentSrc.replace(/%count%/gi, maxTextures + "")
.replace(/%forloop%/gi, this.generateSampleSrc(maxTextures));
}
shaderGenerator.generateFragmentSrc = generateFragmentSrc;
function generateSampleSrc(maxTextures) {
var src = '';
src += '\n';
src += '\n';
src += 'if(vTextureId <= -1.0) {';
src += '\n\tcolor = shadowColor;';
src += '\n}';
for (var i = 0; i < maxTextures; i++) {
src += '\nelse ';
if (i < maxTextures - 1) {
src += 'if(textureId == ' + i + '.0)';
}
src += '\n{';
src += '\n\tcolor = texture2D(uSamplers[' + i + '], textureCoord * uSamplerSize[' + i + ']);';
src += '\n}';
}
src += '\n';
src += '\n';
return src;
}
shaderGenerator.generateSampleSrc = generateSampleSrc;
})(shaderGenerator = tilemap.shaderGenerator || (tilemap.shaderGenerator = {}));
})(tilemap = PIXI.tilemap || (PIXI.tilemap = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var tilemap;
(function (tilemap) {
var squareShaderVert = "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec2 aAnim;\nattribute float aTextureId;\nattribute float aSize;\n\nuniform mat3 projectionMatrix;\nuniform vec2 samplerSize;\nuniform vec2 animationFrame;\nuniform float projectionScale;\n\nvarying vec2 vTextureCoord;\nvarying float vSize;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition + aSize * 0.5, 1.0)).xy, 0.0, 1.0);\n gl_PointSize = aSize * projectionScale;\n vTextureCoord = aTextureCoord + aAnim * animationFrame;\n vTextureId = aTextureId;\n vSize = aSize;\n}\n";
var squareShaderFrag = "\nvarying vec2 vTextureCoord;\nvarying float vSize;\nvarying float vTextureId;\n\nuniform vec4 shadowColor;\nuniform sampler2D uSamplers[%count%];\nuniform vec2 uSamplerSize[%count%];\nuniform vec2 pointScale;\n\nvoid main(void){\n float margin = 0.5 / vSize;\n vec2 pointCoord = (gl_PointCoord - 0.5) * pointScale + 0.5;\n vec2 clamped = vec2(clamp(pointCoord.x, margin, 1.0 - margin), clamp(pointCoord.y, margin, 1.0 - margin));\n vec2 textureCoord = pointCoord * vSize + vTextureCoord;\n float textureId = vTextureId;\n vec4 color;\n %forloop%\n gl_FragColor = color;\n}\n\n";
var SquareTileShader = (function (_super) {
__extends(SquareTileShader, _super);
function SquareTileShader(gl, maxTextures) {
var _this = _super.call(this, gl, maxTextures, squareShaderVert, tilemap.shaderGenerator.generateFragmentSrc(maxTextures, squareShaderFrag)) || this;
_this.vertSize = 8;
_this.vertPerQuad = 1;
_this.stride = _this.vertSize * 4;
_this.maxTextures = maxTextures;
tilemap.shaderGenerator.fillSamplers(_this, _this.maxTextures);
return _this;
}
SquareTileShader.prototype.createVao = function (renderer, vb) {
var gl = renderer.gl;
return renderer.createVao()
.addIndex(this.indexBuffer)
.addAttribute(vb, this.attributes.aVertexPosition, gl.FLOAT, false, this.stride, 0)
.addAttribute(vb, this.attributes.aTextureCoord, gl.FLOAT, false, this.stride, 2 * 4)
.addAttribute(vb, this.attributes.aSize, gl.FLOAT, false, this.stride, 4 * 4)
.addAttribute(vb, this.attributes.aAnim, gl.FLOAT, false, this.stride, 5 * 4)
.addAttribute(vb, this.attributes.aTextureId, gl.FLOAT, false, this.stride, 7 * 4);
};
;
return SquareTileShader;
}(tilemap.TilemapShader));
tilemap.SquareTileShader = SquareTileShader;
})(tilemap = PIXI.tilemap || (PIXI.tilemap = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var tilemap;
(function (tilemap) {
var glCore = PIXI.glCore;
function _hackSubImage(tex, sprite, clearBuffer, clearWidth, clearHeight) {
var gl = tex.gl;
var baseTex = sprite.texture.baseTexture;
if (clearBuffer && clearWidth > 0 && clearHeight > 0) {
gl.texSubImage2D(gl.TEXTURE_2D, 0, sprite.position.x, sprite.position.y, clearWidth, clearHeight, tex.format, tex.type, clearBuffer);
}
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1);
gl.texSubImage2D(gl.TEXTURE_2D, 0, sprite.position.x, sprite.position.y, tex.format, tex.type, baseTex.source);
}
var TileRenderer = (function (_super) {
__extends(TileRenderer, _super);
function TileRenderer(renderer) {
var _this = _super.call(this, renderer) || this;
_this.vbs = {};
_this.indices = new Uint16Array(0);
_this.lastTimeCheck = 0;
_this.tileAnim = [0, 0];
_this.maxTextures = 4;
_this.texLoc = [];
return _this;
}
TileRenderer.prototype.onContextChange = function () {
var gl = this.renderer.gl;
var maxTextures = this.maxTextures;
this.rectShader = new tilemap.RectTileShader(gl, maxTextures);
this.squareShader = new tilemap.SquareTileShader(gl, maxTextures);
this.checkIndexBuffer(2000);
this.rectShader.indexBuffer = this.indexBuffer;
this.squareShader.indexBuffer = this.indexBuffer;
this.vbs = {};
this.glTextures = [];
this.boundSprites = [];
this.initBounds();
};
TileRenderer.prototype.initBounds = function () {
var gl = this.renderer.gl;
var tempCanvas = document.createElement('canvas');
tempCanvas.width = 2048;
tempCanvas.height = 2048;
for (var i = 0; i < this.maxTextures; i++) {
var rt = PIXI.RenderTexture.create(2048, 2048);
rt.baseTexture.premultipliedAlpha = true;
rt.baseTexture.scaleMode = TileRenderer.SCALE_MODE;
rt.baseTexture.wrapMode = PIXI.WRAP_MODES.CLAMP;
this.renderer.textureManager.updateTexture(rt);
this.glTextures.push(rt);
var bs = [];
for (var j = 0; j < 4; j++) {
var spr = new PIXI.Sprite();
spr.position.x = 1024 * (j & 1);
spr.position.y = 1024 * (j >> 1);
bs.push(spr);
}
this.boundSprites.push(bs);
}
};
TileRenderer.prototype.bindTextures = function (renderer, shader, textures) {
var bounds = this.boundSprites;
var glts = this.glTextures;
var len = textures.length;
var maxTextures = this.maxTextures;
if (len > 4 * maxTextures) {
return;
}
var doClear = TileRenderer.DO_CLEAR;
if (doClear && !this._clearBuffer) {
this._clearBuffer = new Uint8Array(1024 * 1024 * 4);
}
var i;
for (i = 0; i < len; i++) {
var texture = textures[i];
if (!texture || !textures[i].valid)
continue;
var bs = bounds[i >> 2][i & 3];
if (!bs.texture ||
bs.texture.baseTexture !== texture.baseTexture) {
bs.texture = texture;
var glt = glts[i >> 2];
renderer.bindTexture(glt, 0, true);
if (doClear) {
_hackSubImage(glt.baseTexture._glTextures[renderer.CONTEXT_UID], bs, this._clearBuffer, 1024, 1024);
}
else {
_hackSubImage(glt.baseTexture._glTextures[renderer.CONTEXT_UID], bs);
}
}
}
this.texLoc.length = 0;
for (i = 0; i < maxTextures; i++) {
this.texLoc.push(renderer.bindTexture(glts[i], i, true));
}
shader.uniforms.uSamplers = this.texLoc;
};
TileRenderer.prototype.checkLeaks = function () {
var now = Date.now();
var old = now - 10000;
if (this.lastTimeCheck < old ||
this.lastTimeCheck > now) {
this.lastTimeCheck = now;
var vbs = this.vbs;
for (var key in vbs) {
if (vbs[key].lastTimeAccess < old) {
this.removeVb(key);
}
}
}
};
;
TileRenderer.prototype.start = function () {
this.renderer.state.setBlendMode(PIXI.BLEND_MODES.NORMAL);
};
TileRenderer.prototype.getVb = function (id) {
this.checkLeaks();
var vb = this.vbs[id];
if (vb) {
vb.lastAccessTime = Date.now();
return vb;
}
return null;
};
TileRenderer.prototype.createVb = function (useSquare) {
var id = ++TileRenderer.vbAutoincrement;
var shader = this.getShader(useSquare);
var gl = this.renderer.gl;
var vb = PIXI.glCore.GLBuffer.createVertexBuffer(gl, null, gl.STREAM_DRAW);
var stuff = {
id: id,
vb: vb,
vao: shader.createVao(this.renderer, vb),
lastTimeAccess: Date.now(),
useSquare: useSquare,
shader: shader
};
this.vbs[id] = stuff;
return stuff;
};
TileRenderer.prototype.removeVb = function (id) {
if (this.vbs[id]) {
this.vbs[id].vb.destroy();
this.vbs[id].vao.destroy();
delete this.vbs[id];
}
};
TileRenderer.prototype.checkIndexBuffer = function (size) {
var totalIndices = size * 6;
var indices = this.indices;
if (totalIndices <= indices.length) {
return;
}
var len = indices.length || totalIndices;
while (len < totalIndices) {
len <<= 1;
}
indices = new Uint16Array(len);
this.indices = indices;
for (var i = 0, j = 0; i + 5 < indices.length; i += 6, j += 4) {
indices[i + 0] = j + 0;
indices[i + 1] = j + 1;
indices[i + 2] = j + 2;
indices[i + 3] = j + 0;
indices[i + 4] = j + 2;
indices[i + 5] = j + 3;
}
if (this.indexBuffer) {
this.indexBuffer.upload(indices);
}
else {
var gl = this.renderer.gl;
this.indexBuffer = glCore.GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW);
}
};
TileRenderer.prototype.getShader = function (useSquare) {
return useSquare ? this.squareShader : this.rectShader;
};
TileRenderer.prototype.destroy = function () {
_super.prototype.destroy.call(this);
this.rectShader.destroy();
this.squareShader.destroy();
this.rectShader = null;
this.squareShader = null;
};
;
return TileRenderer;
}(PIXI.ObjectRenderer));
TileRenderer.vbAutoincrement = 0;
TileRenderer.SCALE_MODE = PIXI.SCALE_MODES.LINEAR;
TileRenderer.DO_CLEAR = false;
tilemap.TileRenderer = TileRenderer;
PIXI.WebGLRenderer.registerPlugin('tilemap', TileRenderer);
})(tilemap = PIXI.tilemap || (PIXI.tilemap = {}));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var tilemap;
(function (tilemap_1) {
var ZLayer = (function (_super) {
__extends(ZLayer, _super);
function ZLayer(tilemap, zIndex) {
var _this = _super.call(this) || this;
_this._lastAnimationFrame = -1;
_this.tilemap = tilemap;
_this.z = zIndex;
return _this;
}
ZLayer.prototype.clear = function () {
var layers = this.children;
for (var i = 0; i < layers.length; i++)
layers[i].clear();
this._previousLayers = 0;
};
ZLayer.prototype.cacheIfDirty = function () {
var tilemap = this.tilemap;
var layers = this.children;
var modified = this._previousLayers != layers.length;
this._previousLayers = layers.length;
var buf = this.canvasBuffer;
var tempRender = this._tempRender;
if (!buf) {
buf = this.canvasBuffer = document.createElement('canvas');
tempRender = this._tempRender = new PIXI.CanvasRenderer(100, 100, { view: buf });
tempRender.context = tempRender.rootContext;
tempRender.plugins.tilemap.dontUseTransform = true;
}
if (buf.width != tilemap._layerWidth ||
buf.height != tilemap._layerHeight) {
buf.width = tilemap._layerWidth;
buf.height = tilemap._layerHeight;
modified = true;
}
var i;
if (!modified) {
for (i = 0; i < layers.length; i++) {
if (layers[i].isModified(this._lastAnimationFrame != tilemap.animationFrame)) {
modified = true;
break;
}
}
}
this._lastAnimationFrame = tilemap.animationFrame;
if (modified) {
if (tilemap._hackRenderer) {
tilemap._hackRenderer(tempRender);
}
tempRender.context.clearRect(0, 0, buf.width, buf.height);
for (i = 0; i < layers.length; i++) {
layers[i].clearModify();
layers[i].renderCanvas(tempRender);
}
}
this.layerTransform = this.worldTransform;
for (i = 0; i < layers.length; i++) {
this.layerTransform = layers[i].worldTransform;
break;
}
};
;
ZLayer.prototype.renderCanvas = function (renderer) {
this.cacheIfDirty();
var wt = this.layerTransform;
renderer.context.setTransform(wt.a, wt.b, wt.c, wt.d, wt.tx * renderer.resolution, wt.ty * renderer.resolution);
var tilemap = this.tilemap;
renderer.context.drawImage(this.canvasBuffer, 0, 0);
};
;
return ZLayer;
}(PIXI.Container));
tilemap_1.ZLayer = ZLayer;
})(tilemap = PIXI.tilemap || (PIXI.tilemap = {}));
})(PIXI || (PIXI = {}));
//# sourceMappingURL=pixi-tilemap.js.map

40318
www/js/libs/pixi.js Normal file

File diff suppressed because it is too large Load diff

9
www/js/main.js Normal file
View file

@ -0,0 +1,9 @@
//=============================================================================
// main.js
//=============================================================================
PluginManager.setup($plugins);
window.onload = function() {
SceneManager.run(Scene_Boot);
};

8836
www/js/plugins.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
//=============================================================================
// rpg_managers.jsから抜き出し
//=============================================================================
/*:
* @plugindesc 背景ぼかさないよ
* @author ゆわか
*
* @help プラグインコマンドはありません
*
* 戦闘背景を指定せずに戦闘をした時に戦闘背景として表示されたり
* メニューを呼び出したときに表示されるマップ画像をぼかさないプラグインです
*
* 使用報告不要クレジット不要改変可商用利用可
* もし何か問題が起きても当方は一切責任を負いませんご了承ください
*/
SceneManager.snapForBackground = function() {
this._backgroundBitmap = this.snap();
// this._backgroundBitmap.blur();
};

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,679 @@
/*
############################################
作者: COBRA
改造や配布好き勝手にしても大丈夫だよ
寧ろ積極的に配布して皆のゲーム開発を快適にしてあげて
http://cobrara.blogspot.jp/
############################################
*/
// Version 1.1.1
// 2017/12/13 最新のバージョン(1.5)でデプロイメントすると1回目だけ画像が表示されない問題を修正
// 2017/8/27 1.1.0 ページの表示・非表示機能を追加しました
// 2017/7/30 1.0.4 最新のコアスクリプト(ver1.2c)にも対応しました
// 2017/5/4 1.0.3 エロステータス画面を開いてる最中NPCが動いてしまう問題を修正しました
// 2017/1/31 1.0.2 changeにおいて最後の項目に「@@,@_,@=」が含まれている場合エスケープされない問題を修正しました
// 2017/1/30 1.0.1 ピクチャ名に変数が反映されないバグを修正しました
// 2017/1/24 1.0.0
/*:
* @plugindesc エロステータス作れちゃうプラグイン(本体)
* @author COBRA
* @help Version 1.1.1
* 自由にいじれちゃうエロステータス画面
*
* 画像はimg/picturesにpngで保存してください
*
* 0pxの画像を表示しようとするとバグります
*
*
* 詳しくはこちらで
* http://cobrara.blogspot.jp/2017/01/blog-post_24.html
*
* 横幅816 縦幅624
* @param eroStaName
* @desc メニューに表示される名前だよ
* Default: エロステータス
* @default エロステータス
*
*
* @param
*
*
* @param commonEvent
* @desc エロステ画面を開く直前に実行されるコモンイベント数値
* Default:
* @default
*/
var CBR_eroStatus = [];
var CBR_eroStatusState = {};
//表示するページ変える
Game_System.prototype.CBR_eroSta_page = function(list){
this.availablePage = list;
CBR_eroStatusState.num = this.availablePage;
};
//起動・ロード・ニューゲーム時
var _CBR_Game_System_initialize = Game_System.prototype.initialize;
Game_System.prototype.initialize = function(){
_CBR_Game_System_initialize.call(this);
//初期値
CBR_eroStatus = [];
CBR_eroStatusState.num = [];
CBR_eroStatusState.numOrigin = [];
CBR_eroStatusState.now = null;
CBR_eroStatusState.name = null;
CBR_eroStatusState.event = null;
this.availablePage = [];
//ページ数取得
//こっちがあったら
for(var i=0,len=$plugins.length; i<len; i++){
var temp = $plugins[i].name.match(/^CBR_eroStatus_(\d+)/);//プラグインが存在して
if(temp){
CBR_eroStatusState.numOrigin[CBR_eroStatusState.numOrigin.length] = Number(temp[1]);
CBR_eroStatusState.num[CBR_eroStatusState.num.length] = Number(temp[1]);
}
}
//変更箇所の保存
CBR_eroStatusState.numOrigin.sort(function(a,b){return a-b;});//_nの小さい順に
this._CBR_eroSta_change_list = [];
//numOriginに[1,2,4,8]ってページが入ってる
//numには表示すべき[2,4]だけが入ってる
//エロステには[obj,obj,obj,obj]とOriginに対応した順番で入ってる
this._CBR_eroSta_pageList = [];
var param = PluginManager.parameters('CBR_eroStatus_main');
CBR_eroStatusState.name = ''+(param['eroStaName'] || 'エロステータス');
CBR_eroStatusState.event = Number(param['commonEvent']) || null;
for(var i=0,len=CBR_eroStatusState.numOrigin.length; i<len; i++){//ページの数だけ
var n = CBR_eroStatusState.numOrigin[i];
var param = PluginManager.parameters('CBR_eroStatus_'+n);
//nは_n.js 1,2,3
//iはページの順番  0,1,2
//保存する場合は0から99
CBR_eroStatus[i] = {'p':[],'t':[]};
this._CBR_eroSta_change_list[i] = {
'p':[],
't':[]
};
for(var k=1; k<100; k++){
this.CBR_eroSta_add(
'p',
i,
k-1,
param['picName_'+k],
param['picX_'+k],
param['picY_'+k],
param['picOrigin_'+k],
param['picShow_'+k],
param['picOpacity_'+k],
param['picZoom_'+k]
);
this.CBR_eroSta_add(
't',
i,
k-1,
param['txtSubject_'+k],
param['txtX_'+k],
param['txtY_'+k],
param['txtOrigin_'+k],
param['txtShow_'+k],
param['txtAlign_'+k],
param['txtSize_'+k]
);
}
}
this._CBR_eroSta_change_list = [];
for(var i=0,len=CBR_eroStatusState.numOrigin.length; i<len; i++){//ページ分だけチェンジリスト作る
this._CBR_eroSta_change_list[i] = {
'p':[],
't':[]
};
}
};
//セーブデータ読み込み時に実行
var _CBR_Game_System_onAfterLoad = Game_System.prototype.onAfterLoad;
Game_System.prototype.onAfterLoad = function() {
_CBR_Game_System_onAfterLoad.call(this);
if(this.availablePage.length){
CBR_eroStatusState.num = this.availablePage;
};
for(var i=0,len=CBR_eroStatusState.numOrigin.length; i<len; i++){//ページ数分
for(var j=0; j<2; j++){
var ty = (!j) ? 'p' : 't';
var list = this._CBR_eroSta_change_list[i][ty];//変更したいリスト
for(var k=0,len2=list.length; k<len2; k++){//チェンジする項目数
if(!CBR_eroStatus[i][ty][list[k].page]){//その項目のデフォが存在しなかったら作成
this.CBR_eroSta_add(ty,i);
}
CBR_eroStatus[i][ty][list[k].page][list[k].name] = list[k].val;
}
}
}
};
Game_System.prototype.CBR_eroSta_getPageIndex = function(num){//aはaligin or opacity bはzoom
var ary = CBR_eroStatusState.numOrigin;
for(var i=0,len=ary.length; i<len; i++){
if(ary[i]==num){
return i;
}
}
};
Game_System.prototype.CBR_eroSta_add = function(type,page,num,data,x,y,origin,show,a,b){//aはaligin or opacity bはzoom
if(type=='p'){
CBR_eroStatus[page].p[num] = {
'name':data,
'x':this.CBR_eroSta_changeVal('x',x),
'y':this.CBR_eroSta_changeVal('y',y),
'origin':origin || 'left',
'show':(show=='on'),
'opacity':this.CBR_eroSta_changeVal('opacity',a),
'zoom':this.CBR_eroSta_changeVal('zoom',b)
};
}else if(type=='t'){
CBR_eroStatus[page].t[num] = {
'subject':data,
'x':this.CBR_eroSta_changeVal('x',x),
'y':this.CBR_eroSta_changeVal('y',y),
'origin':origin || 'left',
'show':(show=='on'),
'align':a || 'top',
'size':this.CBR_eroSta_changeVal('size',b)
};
}
};
Game_System.prototype.CBR_eroSta_changeVal = function(name,val){//チェンジする時 add時 ロード時のチェンジで反映させよう
switch(name){
case 'x':
case 'y':
return Number(val) || 0;
break;
case 'opacity':
case 'zoom':
if(val){
return Number(val)/100;
}else{
return 1;
}
break;
case 'show':
return (val=='on');
break;
case 'size':
return Number(val) || 28;
break;
case 'name':
case 'subject':
return val || '';
break;
default:
return val;
break;
}
};
Game_System.prototype.CBR_eroSta_change = function(ary){
var txt_ary = {
'fontsize':'fontSize',
'vardigit':'varDigit'
};
var checkList ={
'p':['name','origin','x','y','show','opacity','zoom'],
't':['subject','origin','x','y','show','align','size']
}
for(var i=0,len=ary.length; i<len; i++){//変更したいpage_type_nの分だけ
var temp = ary[i].split(/@@|@_|@=|_|=/);
var temp2 = ary[i].match(/@@|@_|@=|_|=/g);
var list = [];//aryを分割したものを入れる
var temp3 = '';
for(var k=0,len2=temp.length; k<len2; k++){
if(temp2[k]){
if(temp2[k].charAt(0)=='@'){
temp3 += temp[k]+temp2[k].charAt(1);
}else{
list[list.length] = temp3+temp[k];
temp3 = '';
}
}else{
list[list.length] = temp3 + temp[k];
}
}
list[0] = Number(list[0]);
var page = null;
for(var k=0,len2=CBR_eroStatusState.numOrigin.length; k<len2; k++){//ページ数だけ回す
if(CBR_eroStatusState.numOrigin[k] == list[0]){//nと一致したら
page = k;
}
}
var type = list[1];
var n = Number(list[2])-1;
//しつこい気もするけどエロステータス開く時の軽さを最優先で
var obj = this._CBR_eroSta_change_list[page][type];
var objNum = false;
for(var k=0,len2=obj.length; k<len2; k++){//このページのchange数
if(n == obj[k].num){//nとチェンジしたい番号が一緒だったら
objNum = k;
break;
}
}
if(objNum === false){
objNum = len2;
obj[objNum] = {
'num':n,
'list':[]
};
}
//変更したいパラメータ数だけ回す
var chaList = obj[objNum].list;
for(var k=3,len2=list.length; k+1<len2; k+=2){
var listNum = false;
for(var m=0,len3=chaList.length; m<len3; m++){//既に存在するチェンジ数
if(list[k] == chaList[m].name){//一致する箇所があるかどうか
listNum = m;
break;
}
}
if(listNum === false){//無かったら
listNum = len3;
for(var m=0,len3=checkList[type].length; m<len3; m++){//ちゃんと項目通りかチェック
if(list[k] == checkList[type][m]){
break;
}else if((m+1) == len3){//もし無かったら
alert('ERROR:CBR_eroSta_change引数');
}
}
}
list[k+1] = this.CBR_eroSta_changeVal(list[k],list[k+1]);
chaList[listNum] = {
'name':list[k],
'val':list[k+1]
};
CBR_eroStatus[page][type][n][list[k]] = list[k+1];
}
}
};
//########### Scene ###########
function Scene_EroStatus() {
this.initialize.apply(this, arguments);
}
Scene_EroStatus.prototype = Object.create(Scene_MenuBase.prototype);
Scene_EroStatus.prototype.constructor = Scene_EroStatus;
Scene_EroStatus.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_EroStatus.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
if(CBR_eroStatusState.event){
$gameTemp.reserveCommonEvent(CBR_eroStatusState.event);
}
this._eroStatusWindow = new Window_EroStatus();
this._eroStatusWindow.setHandler('cancel', this.popScene.bind(this));
this._eroStatusWindow._margin = 0;//背景ピッチリする為
this._eroStatusWindow.margin = 0;//本当はこっちだけどね
this._eroStatusWindow._windowFrameSprite.visible = false;//枠線を消す
this.addWindow(this._eroStatusWindow);
};
Scene_EroStatus.prototype.update = function() {
$gameMap.refreshIfNeeded();
if(this.isActive()){
$gameMap.updateInterpreter();
}
$gameMap.updateVehicles();
Scene_Base.prototype.update.call(this);
};
//########### window ###########
function Window_EroStatus() {
this.initialize.apply(this, arguments);
}
Window_EroStatus.prototype = Object.create(Window_Selectable.prototype);
Window_EroStatus.prototype.constructor = Window_EroStatus;
Window_EroStatus.prototype.initialize = function(){//windowを作る
var width = Graphics.boxWidth;
var height = Graphics.boxHeight;
Window_Selectable.prototype.initialize.call(this, 0, 0, width, height);
CBR_eroStatusState.now = 0;
this._CBR_complete = false;
};
Window_EroStatus.prototype.CBR_complete = function(){//描写終わったかどうか
return this._CBR_complete;
};
Window_EroStatus.prototype.update = function() {//毎回image描写してもいいけどそれだと負荷が多くなるのでこの方法で
Window_Selectable.prototype.update.call(this);
if(1 < CBR_eroStatusState.num.length && this.isOpenAndActive()){//操作があった時
if(Input.isRepeated('right') || Input.isRepeated('left')){
SoundManager.playCursor(2);//音楽鳴らす
CBR_eroStatusState.now = ((CBR_eroStatusState.now+1) < CBR_eroStatusState.num.length) ? CBR_eroStatusState.now+1 : 0;
this._CBR_complete = false;//初期化
//this._statusWindow.refresh();//切り替えしたんでリフレッシュ
}
}
var page = $gameSystem.CBR_eroSta_getPageIndex(CBR_eroStatusState.num[CBR_eroStatusState.now]);
if(!this.CBR_complete()){//まだ画像の描写してないのなら
var flag = false;
var ary = CBR_eroStatus[page].p;
var p_data = [];
//ピクチャの数だけ
for(var i=0,len=ary.length; i<len; i++){
var name = ary[i].name;
if(!name || !ary[i].show){
continue;
}
name = name.replace(/\\(\\)|\\([VNP])\[(\d+)\]|\\(<)(.+)\\>/g,function(a,b,c,d,e,f){//汚いけどこれは毎回やらないとね
if(b){//\\
return '\\';
}else if(c){//[VNP]
d = Number(d);
switch(c){
case 'V':
return $gameVariables.value(d);
break;
case 'N':
return $gameActors._data[d]._name;
break;
case 'P':
return $dataActors[$gameParty._actors[d-1]].name;
break;
}
}else{//script
return eval(f);
}
});
if(ary[i].var){//変数があったら入れる
var v = ''+$gameVariables.value(ary[i].var);
if(ary[i].varDigit){//2ケタの時は2まで
if(v.length >= ary[i].varDigit){
name += v.substr(-1*ary[i].varDigit,1);
}else{
name = false;
}
}else{
name += v;
}
}
if(name){
var temp = ImageManager.loadPicture(name);//初回読み込み
if(temp){
//if(temp._isLoading || temp._loadingState == 'requesting'){//前者は古いver用 ロード中ならアウト
if(!temp.width){//前者は古いver用 ロード中ならアウト
flag = true;
break;
}
}else{//その名前の画像が無かったら
flag = true;
this._CBR_complete = true;
break;
}
p_data[i] = {
'w':temp.width,
'h':temp.height,
}
}
}
if(!flag){//全ロードが終わってたら
this.contents.clear();
//ピクチャの表示
var ary = CBR_eroStatus[page].p;
for(var i=0,len=ary.length; i<len; i++){
var name = ary[i].name;
if(!name || !ary[i].show){
continue;
}
//変数とか文字化
name = name.replace(/\\(\\)|\\([VNP])\[(\d+)\]|\\(<)(.+)\\>/g,function(a,b,c,d,e,f){
if(b){//\\
return '\\';
}else if(c){//[VNP]
d = Number(d);
switch(c){
case 'V':
return $gameVariables.value(d);
break;
case 'N':
return $gameActors._data[d]._name;
break;
case 'P':
return $dataActors[$gameParty._actors[d-1]].name;
break;
}
}else{//script
return eval(f);
}
});
if(name){
this.changePaintOpacity(ary[i].opacity);
var x = ary[i].x;
var y = ary[i].y;
if(ary[i].origin == 'center'){
x -= p_data[i].w * ary[i].zoom / 2;
y -= p_data[i].h * ary[i].zoom / 2;
}
this.drawPicture('pictures',name, 0,0,x,y,0,0,ary[i].zoom,0);
}
}
//テキストの表示
this.resetTextColor();
var ary = CBR_eroStatus[page].t;
for(var i=0,len=ary.length; i<len; i++){
var size = ary[i].size;// ary[i].fontSize;
var temp = ary[i].subject;
if(!temp || !ary[i].show){
continue;
}
var opAry = temp.match(/(\\\{|\\\}|\\[CI]\[\d+\])+/g);
//先頭にある場合は"","tesa"になる
var strAry = temp.split(/(?:\\\{|\\\}|\\[CI]\[\d+\])+/);
var str = '';
var allW = 0;
var maxSize = null;
var dataFAry = [];
var dataWAry = [];
var drawI =[];
var drawC =[];
//分割した配列の数
for(var k=0,len2=strAry.length; k<len2; k++){
//前方にある\{のフォントサイズを入れる
dataFAry[k] = k ? dataFAry[k-1] : 0;
drawI[k] = [];
//変数とか文字化
strAry[k] = strAry[k].replace(/\\(\\)|\\([VNP])\[(\d+)\]|\\(G)|\\(<)(.+)\\>/g,function(a,b,c,d,e,f,g){
if(b){//\\
return '\\';
}else if(c){//[VNP]
d = Number(d);
switch(c){
case 'V':
return $gameVariables.value(d);
break;
case 'N':
return $gameActors._data[d]._name;
break;
case 'P':
return $dataActors[$gameParty._actors[d-1]].name;
break;
}
}else if(e){//G
return $dataSystem.currencyUnit;
}else{//script
return eval(g);
}
});
//自身の前に区切りマッチがあったら
if(0 < k){
var temp = opAry[k-1].split('\\');//\\{\\}を分割する
for(var m=1,len3=temp.length; m<len3; m++){
switch(temp[m].charAt(0)){
case '{':
dataFAry[k] += 6;
break;
case '}':
dataFAry[k] -= 6;
break;
case 'C':
drawC[k] = Number(temp[m].match(/\[(\d+)\]/)[1]);//Cは複数あっても最後のが適応されれば良いわけで
break;
case 'I':
drawI[k][drawI[k].length] = Number(temp[m].match(/\[(\d+)\]/)[1]);
break;
}
}
}
this.contents.fontSize = size + dataFAry[k];
this.contents.context.font = this.contents._makeFontNameText();
dataWAry[k] = this.contents.context.measureText(strAry[k]).width;//何の為に+4するのか忘れた
allW += dataWAry[k];
if(strAry[k]){//先頭に\{や変数がある時の問題 アイコン乃場合もここを通さないと
if(maxSize === null){//まだ記録されてなかったら入れよう
maxSize = dataFAry[k];
}else{
maxSize = (maxSize < dataFAry[k]) ? dataFAry[k] : maxSize;
}
}
}
var x = ary[i].x;
if(ary[i].origin == 'center'){
x -= allW/2;
}else if(ary[i].origin == 'right'){
x -= allW;
}
for(var k=0,len2=strAry.length; k<len2; k++){
this.contents.fontSize = size + dataFAry[k];
this.contents.context.font = this.contents._makeFontNameText();
//bottom→下揃え原点の上 top→上揃え原点の下 center→原点
var line = ary[i].y;
var iconLine = ary[i].y;
if(ary[i].align == 'top'){
line += (size + dataFAry[k])/2;
}else if(ary[i].align == 'bottom'){
line -= (size + dataFAry[k])/2;
iconLine -= Window_Base._iconWidth;
}else{
iconLine -= Window_Base._iconWidth/2;
}
if(drawI[k].length){
for(var m=0,len3=drawI[k].length; m<len3; m++){
this.drawIcon(drawI[k][m], x, iconLine);
x += Window_Base._iconWidth;
}
}
if(drawC[k]){
this.changeTextColor(this.textColor(drawC[k]));
}
this.contents.drawText(strAry[k], x, line, dataWAry[k], 0, 'left');
x += dataWAry[k];
}
this.contents.fontSize = this.standardFontSize();
}
this.resetTextColor();
this.changePaintOpacity(true);
this.activate();
this._CBR_complete = true;
}
}
};
Window_EroStatus.prototype.drawPicture = function(dir, filename,sx, sy, x, y, w, h, zoom, hue) {
var bitmap = ImageManager.loadBitmap('img/'+dir+'/',filename, hue, true);
this.contents.blt(bitmap, sx, sy, bitmap.width, bitmap.height, x, y, bitmap.width * zoom, bitmap.height * zoom);
};
Window_EroStatus.prototype.standardPadding =function(){
return 0;
};
Window_Status.prototype.lineColor = function() {
return this.normalColor();
};
Window_Status.prototype.maxEquipmentLines = function() {
return 6;
};
//######### コマンドの追加 ##########
Scene_Menu.prototype.commandEroSta = function(){
SceneManager.push(Scene_EroStatus);
};
setTimeout(function(){
var _Scene_Menu_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
Scene_Menu.prototype.createCommandWindow = function(){
_Scene_Menu_createCommandWindow.call(this);
this._commandWindow.setHandler('eroStatus', this.commandEroSta.bind(this));
};
},0);
_Window_MenuCommand_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands;
Window_MenuCommand.prototype.addOriginalCommands = function(){
_Window_MenuCommand_addOriginalCommands.call(this);
this.addCommand(CBR_eroStatusState.name, 'eroStatus', true);
};

View file

@ -0,0 +1,137 @@
/*:
* @plugindesc Plugin used to set basic parameters.
* @author RM CoreScript team
*
* @help This plugin does not provide plugin commands.
*
* @param cacheLimit
* @desc For setting the upper limit of image memory cache. (MPix)
* @default 10
*
* @param screenWidth
* @desc For setting the screen width.
* @default 816
*
* @param screenHeight
* @desc For setting the screen height.
* @default 624
*
* @param changeWindowWidthTo
* @desc If set, change window width to this value
*
* @param changeWindowHeightTo
* @desc If set, change window height to this value
*
* @param renderingMode
* @desc Rendering mode (canvas/webgl/auto)
* @default auto
*
* @param alwaysDash
* @desc To set initial value as to whether the player always dashes. (on/off)
* @default off
*/
/*:ja
* @plugindesc 基本的なパラメーターを設定するプラグインです
* @author RM CoreScript team
*
* @help このプラグインにはプラグインコマンドはありません
*
* @param cacheLimit
* @desc 画像のメモリへのキャッシュの上限値 (MPix)
* @default 10
*
* @param screenWidth
* @desc 画面サイズの幅
* @default 816
*
* @param screenHeight
* @desc 画面サイズの高さ
* @default 624
*
* @param changeWindowWidthTo
* @desc 値が設定された場合ウインドウの幅を指定した値に変更
*
* @param changeWindowHeightTo
* @desc 値が設定された場合ウインドウの高さを指定した値に変更
*
* @param renderingMode
* @desc レンダリングモード (canvas/webgl/auto)
* @default auto
*
* @param alwaysDash
* @desc プレイヤーが常時ダッシュするかどうかの初期値 (on/off)
* @default off
*/
(function() {
function toNumber(str, def) {
return isNaN(str) ? def : +(str || def);
}
var parameters = PluginManager.parameters('Community_Basic');
var cacheLimit = toNumber(parameters['cacheLimit'], 10);
var screenWidth = toNumber(parameters['screenWidth'], 816);
var screenHeight = toNumber(parameters['screenHeight'], 624);
var renderingMode = parameters['renderingMode'].toLowerCase();
var alwaysDash = parameters['alwaysDash'].toLowerCase() === 'on';
var windowWidthTo = toNumber(parameters['changeWindowWidthTo'], 0);
var windowHeightTo = toNumber(parameters['changeWindowHeightTo'], 0);
var windowWidth;
var windowHeight;
if(windowWidthTo){
windowWidth = windowWidthTo;
}else if(screenWidth !== SceneManager._screenWidth){
windowWidth = screenWidth;
}
if(windowHeightTo){
windowHeight = windowHeightTo;
}else if(screenHeight !== SceneManager._screenHeight){
windowHeight = screenHeight;
}
ImageCache.limit = cacheLimit * 1000 * 1000;
SceneManager._screenWidth = screenWidth;
SceneManager._screenHeight = screenHeight;
SceneManager._boxWidth = screenWidth;
SceneManager._boxHeight = screenHeight;
SceneManager.preferableRendererType = function() {
if (Utils.isOptionValid('canvas')) {
return 'canvas';
} else if (Utils.isOptionValid('webgl')) {
return 'webgl';
} else if (renderingMode === 'canvas') {
return 'canvas';
} else if (renderingMode === 'webgl') {
return 'webgl';
} else {
return 'auto';
}
};
var _ConfigManager_applyData = ConfigManager.applyData;
ConfigManager.applyData = function(config) {
_ConfigManager_applyData.apply(this, arguments);
if (config['alwaysDash'] === undefined) {
this.alwaysDash = alwaysDash;
}
};
var _SceneManager_initNwjs = SceneManager.initNwjs;
SceneManager.initNwjs = function() {
_SceneManager_initNwjs.apply(this, arguments);
if (Utils.isNwjs() && windowWidth && windowHeight) {
var dw = windowWidth - window.innerWidth;
var dh = windowHeight - window.innerHeight;
window.moveBy(-dw / 2, -dh / 2);
window.resizeBy(dw, dh);
}
};
})();

View file

@ -0,0 +1,234 @@
//=============================================================================
// CustomizeConfigDefault.js
// ----------------------------------------------------------------------------
// (C)2015 Triacontane
// This plugin is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.1.1 2020/09/13 Mano_InputConfig.jsと併用したとき、Option項目を消していると表示不整合が発生する競合を修正
// 1.1.0 2016/08/01 項目自体を非表示にする機能を追加しました。
// 1.0.3 2016/06/22 多言語対応
// 1.0.2 2016/01/17 競合対策
// 1.0.1 2015/11/01 既存コードの再定義方法を修正(内容に変化なし)
// 1.0.0 2015/11/01 初版
// ----------------------------------------------------------------------------
// [Blog] : https://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc Setting default value for Options
* @author triacontane
*
* @param AlwaysDash
* @desc Always dash(ON/OFF)
* @default OFF
*
* @param CommandRemember
* @desc Command remember(ON/OFF)
* @default OFF
*
* @param BgmVolume
* @desc BGM Volume(0-100)
* @default 100
*
* @param BgsVolume
* @desc BGS Volume(0-100)
* @default 100
*
* @param MeVolume
* @desc ME Volume(0-100)
* @default 100
*
* @param SeVolume
* @desc SE Volume(0-100)
* @default 100
*
* @param EraseAlwaysDash
* @desc Erase AlwaysDash Option(ON/OFF)
* @default OFF
*
* @param EraseCommandRemember
* @desc Erase CommandRemember Option(ON/OFF)
* @default OFF
*
* @param EraseBgmVolume
* @desc Erase BgmVolume Option(ON/OFF)
* @default OFF
*
* @param EraseBgsVolume
* @desc Erase BgsVolume Option(ON/OFF)
* @default OFF
*
* @param EraseMeVolume
* @desc Erase MeVolume Option(ON/OFF)
* @default OFF
*
* @param EraseSeVolume
* @desc Erase SeVolume Option(ON/OFF)
* @default OFF
*
* @help Setting default value for Options.
*
* This plugin is released under the MIT License.
*/
/*:ja
* @plugindesc オプションデフォルト値設定プラグイン
* @author トリアコンタン
*
* @param 常時ダッシュ
* @desc 常にダッシュするShiftキーを押している場合のみ歩行(ON/OFF)
* @default OFF
*
* @param コマンド記憶
* @desc 選択したコマンドを記憶する(ON/OFF)
* @default OFF
*
* @param BGM音量
* @desc BGMの音量0-100
* @default 100
*
* @param BGS音量
* @desc BGSの音量0-100
* @default 100
*
* @param ME音量
* @desc MEの音量0-100
* @default 100
*
* @param SE音量
* @desc SEの音量0-100
* @default 100
*
* @param 常時ダッシュ消去
* @desc 常時ダッシュの項目を非表示にする(ON/OFF)
* @default OFF
*
* @param コマンド記憶消去
* @desc コマンド記憶の項目を非表示にする(ON/OFF)
* @default OFF
*
* @param BGM音量消去
* @desc BGM音量の項目を非表示にする(ON/OFF)
* @default OFF
*
* @param BGS音量消去
* @desc BGS音量の項目を非表示にする(ON/OFF)
* @default OFF
*
* @param ME音量消去
* @desc ME音量の項目を非表示にする(ON/OFF)
* @default OFF
*
* @param SE音量消去
* @desc SE音量の項目を非表示にする(ON/OFF)
* @default OFF
*
* @help オプション画面で設定可能な項目のデフォルト値を指定した値に変更します
* 例えば初回から常時ダッシュをONにしておけば
* プレイヤーが設定を変更する手間を省くことができます
* この処理はconfig.rpgsaveが未作成の場合にのみ実行されます
*
* また項目そのものを消去することもできます
* 例えば戦闘がないゲームではコマンド記憶等は不要なので消去できます
*
* このプラグインにはプラグインコマンドはありません
*
* 利用規約
* 作者に無断で改変再配布が可能で利用形態商用18禁利用等
* についても制限はありません
* このプラグインはもうあなたのものです
*/
(function() {
'use strict';
var pluginName = 'CustomizeConfigDefault';
var getParamNumber = function(paramNames, min, max) {
var value = getParamOther(paramNames);
if (arguments.length < 2) min = -Infinity;
if (arguments.length < 3) max = Infinity;
return (parseInt(value, 10) || 0).clamp(min, max);
};
var getParamBoolean = function(paramNames) {
var value = getParamOther(paramNames);
return (value || '').toUpperCase() === 'ON';
};
var getParamOther = function(paramNames) {
if (!Array.isArray(paramNames)) paramNames = [paramNames];
for (var i = 0; i < paramNames.length; i++) {
var name = PluginManager.parameters(pluginName)[paramNames[i]];
if (name) return name;
}
return null;
};
//=============================================================================
// パラメータの取得と整形
//=============================================================================
var paramAlwaysDash = getParamBoolean(['AlwaysDash', '常時ダッシュ']);
var paramCommandRemember = getParamBoolean(['CommandRemember', 'コマンド記憶']);
var paramBgmVolume = getParamNumber(['BgmVolume', 'BGM音量'], 0, 100);
var paramBgsVolume = getParamNumber(['BgsVolume', 'BGS音量'], 0, 100);
var paramMeVolume = getParamNumber(['MeVolume', 'ME音量'], 0, 100);
var paramSeVolume = getParamNumber(['SeVolume', 'SE音量'], 0, 100);
var paramEraseAlwaysDash = getParamBoolean(['EraseAlwaysDash', '常時ダッシュ消去']);
var paramEraseCommandRemember = getParamBoolean(['EraseCommandRemember', 'コマンド記憶消去']);
var paramEraseBgmVolume = getParamBoolean(['EraseBgmVolume', 'BGM音量消去']);
var paramEraseBgsVolume = getParamBoolean(['EraseBgsVolume', 'BGS音量消去']);
var paramEraseMeVolume = getParamBoolean(['EraseMeVolume', 'ME音量消去']);
var paramEraseSeVolume = getParamBoolean(['EraseSeVolume', 'SE音量消去']);
//=============================================================================
// ConfigManager
// それぞれの項目に初期値を与えます。
//=============================================================================
var _ConfigManagerApplyData = ConfigManager.applyData;
ConfigManager.applyData = function(config) {
_ConfigManagerApplyData.apply(this, arguments);
if (config.alwaysDash == null) this.alwaysDash = paramAlwaysDash;
if (config.commandRemember == null) this.commandRemember = paramCommandRemember;
if (config.bgmVolume == null) this.bgmVolume = paramBgmVolume;
if (config.bgsVolume == null) this.bgsVolume = paramBgsVolume;
if (config.meVolume == null) this.meVolume = paramMeVolume;
if (config.seVolume == null) this.seVolume = paramSeVolume;
};
//=============================================================================
// Window_Options
// パラメータを空白にした項目を除去します。
//=============================================================================
var _Window_Options_makeCommandList = Window_Options.prototype.makeCommandList;
Window_Options.prototype.makeCommandList = function() {
_Window_Options_makeCommandList.apply(this, arguments);
if (paramEraseAlwaysDash) this.eraseOption('alwaysDash');
if (paramEraseCommandRemember) this.eraseOption('commandRemember');
if (paramEraseBgmVolume) this.eraseOption('bgmVolume');
if (paramEraseBgsVolume) this.eraseOption('bgsVolume');
if (paramEraseMeVolume) this.eraseOption('meVolume');
if (paramEraseSeVolume) this.eraseOption('seVolume');
};
Window_Options.prototype.eraseOption = function(symbol) {
for (var i = 0; i < this._list.length; i++) {
if (this._list[i].symbol === symbol) {
this._list.splice(i, 1);
// for Mano_InputConfig.js
this.adjustIndexManoInputConfig(i);
break;
}
}
};
Window_Options.prototype.adjustIndexManoInputConfig = function(index) {
if (this._gamepadOptionIndex > index) {
this._gamepadOptionIndex -= 1;
}
if (this._keyboardConfigIndex > index) {
this._keyboardConfigIndex -= 1;
}
};
})();

View file

@ -0,0 +1,697 @@
//=============================================================================
// DTextPicture.js
// ----------------------------------------------------------------------------
// Copyright (c) 2015-2017 Triacontane
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.10.0 2017/02/12 アウトラインカラーをウィンドウカラー番号から指定できる機能を追加
// 1.9.0 2017/08/20 ウィンドウつきピクチャが重なったときにウィンドウがピクチャの下に表示される問題を修正
// 1.8.6 2017/06/28 フォント変更機能のヘルプが抜けていたので追加
// 1.8.5 2017/06/12 変数がマイナス値のときのゼロ埋め表示が正しく表示されない問題を修正
// 1.8.4 2017/05/10 プラグインを未適用のデータを読み込んだとき、最初の一回のみ動的文字列ピクチャが作成されない問題を修正
// 1.8.3 2017/04/19 自動翻訳プラグインに一部対応
// 1.8.2 2017/04/05 ピクチャの消去時にエラーが発生していた問題を修正
// 1.8.1 2017/03/30 拡大率と原点に対応していなかった問題を修正
// 1.8.0 2017/03/30 背景にウィンドウを表示できる機能を追加
// 1.7.1 2017/03/20 1.7.0で末尾がイタリック体の場合に、傾き部分が見切れてしまう問題を修正
// 1.7.0 2017/03/20 動的文字列を太字とイタリックにできる機能を追加
// 複数行表示かつ制御文字でアイコンを指定した場合に高さが余分に計算されてしまう問題の修正
// 1.6.2 2016/12/13 動的ピクチャに対して、ピクチャの表示とピクチャの色調変更を同フレームで行うと画像が消える問題の修正
// 1.6.1 2016/11/03 一通りの競合対策
// 1.6.0 2016/11/03 インストールされているフォントをピクチャのフォントとして利用できる機能を追加
// 1.5.1 2016/10/27 1.5.0でアウトラインカラーを指定するとエラーになっていた現象を修正
// 1.5.0 2016/10/23 制御文字で表示した変数の内容をリアルタイム更新できる機能を追加
// 1.4.2 2016/07/02 スクリプトからダイレクトで実行した場合も制御文字が反映されるよう修正(ただし余分にエスケープする必要あり)
// 1.4.1 2016/06/29 制御文字「\{」で文字サイズを大きくした際、元のサイズに戻さないと正しいサイズで表示されない問題を修正
// 1.4.0 2016/06/28 D_TEXT実行後に画像を指定してピクチャを表示した場合は画像を優先表示するよう仕様変更
// 1.3.1 2016/06/07 描画文字が半角英数字のみかつフォントを未指定の場合に文字が描画されない不具合を修正
// 1.3.0 2016/06/03 制御文字\oc[c] \ow[n]に対応
// 1.2.2 2016/03/28 データベース情報を簡単に出力する制御文字を追加
// 1.2.1 2016/01/29 コマンド「D_TEXT_SETTING」の実装が「D_TEST_SETTING」になっていたので修正
// 1.2.0 2016/01/27 複数行表示に対応
// 文字列の揃えと背景色を設定する機能を追加
// 変数をゼロ埋めして表示する機能を追加
// 1.1.3 2015/12/10 戦闘画面でもピクチャを使用できるよう修正
// 描画後にデバッグ画面等を開いて変数を修正した場合、再描画で変更が反映されてしまう問題を修正
// 1.1.2 2015/11/07 描画文字列に半角スペースが含まれていた場合も問題なく実行できるよう修正
// 1.1.0 2015/11/07 制御文字\C[n] \I[n] \{ \} に対応(\$と表示スピード制御系以外全部)
// 1.0.1 2015/11/07 RPGツクールMV日本語版に合わせてコメントの表記を変更
// 1.0.0 2015/11/06 初版
// ----------------------------------------------------------------------------
// [Blog] : https://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc 動的文字列ピクチャ生成プラグイン
* @author トリアコンタン
*
* @help 指定した文字列でピクチャを動的に生成するコマンドを提供します
* 文字列には各種制御文字\v[n]も使用可能で制御文字で表示した変数の値が
* 変更されたときにリアルタイムでピクチャの内容を更新できます
*
* 以下の手順で表示します
* 1 : プラグインコマンド[D_TEXT]で描画したい文字列と引数を指定下記の例参照
* 2 : プラグインコマンド[D_TEXT_SETTING]で背景色や揃えを指定任意
* 3 : イベントコマンドピクチャの表示画像を未選択に指定
* 1の時点ではピクチャは表示されないので必ずセットで呼び出してください
* ピクチャ表示前にD_TEXTを複数回実行すると複数行表示できます
*
* ver1.4.0より[D_TEXT]実行後にピクチャの表示画像を指定した場合は
* 動的文字列ピクチャ生成を保留として通常通り画像ピクチャが表示される
* ように挙動が変更になりました
*
* プラグインコマンド詳細
* イベントコマンドプラグインコマンドから実行
* 引数の間は半角スペースで区切る
*
* D_TEXT [描画文字列] [文字サイズ] : 動的文字列ピクチャ生成の準備
* D_TEXT テスト文字列 32
*
* 表示後は通常のピクチャと同様に移動や回転消去ができます
* また変数やアクターの表示など制御文字にも対応しています
*
* D_TEXT_SETTING ALIGN [揃え] : 揃え左揃え中央揃え右揃えの設定
* 0:左揃え 1:中央揃え 2:右揃え
*
* D_TEXT_SETTING ALIGN 0
* D_TEXT_SETTING ALIGN CENTER
*
* D_TEXT_SETTING BG_COLOR [背景色] : 背景色の設定(CSSの色指定と同様の書式)
*
* D_TEXT_SETTING BG_COLOR black
* D_TEXT_SETTING BG_COLOR #336699
* D_TEXT_SETTING BG_COLOR rgba(255,255,255,0.5)
*
* D_TEXT_SETTING REAL_TIME ON : 制御文字で表示した変数のリアルタイム表示
*
* D_TEXT_SETTING REAL_TIME ON
*
* リアルタイム表示を有効にしておくとピクチャの表示後に変数の値が変化したとき
* 自動でピクチャの内容も更新されます
*
* D_TEXT_SETTING WINDOW ON : 背景にウィンドウを表示する
* D_TEXT_SETTING WINDOW ON
*
* D_TEXT_SETTING FONT [フォント名] : 描画で使用するフォントを指定した名称に変更
* D_TEXT_SETTING FONT P明朝
*
* これらの設定はD_TEXTと同様ピクチャを表示する前に行ってください
*
* 対応制御文字一覧イベントコマンド文章の表示と同一です
* \V[n]
* \N[n]
* \P[n]
* \G
* \C[n]
* \I[n]
* \{
* \}
*
* 専用制御文字
* \V[n,m](m桁分のゼロ埋めした変数の値)
* \item[n] n 番のアイテム情報アイコン名称
* \weapon[n] n 番の武器情報アイコン名称
* \armor[n] n 番の防具情報アイコン名称
* \skill[n] n 番のスキル情報アイコン名称
* \state[n] n 番のステート情報アイコン名称
* \oc[c] アウトラインカラーをcに設定(1)
* \ow[n] アウトライン幅をnに設定(:\ow[5])
* \f[b] フォントの太字化
* \f[i] フォントのイタリック化
* \f[n] フォントの太字とイタリックを通常に戻す
*
* 1 アウトラインカラーの指定方法
* \oc[red] 色名で指定
* \oc[rgb(0,255,0)] カラーコードで指定
* \oc[2] 文字色番号\c[n]と同様のもので指定
*
* 利用規約
* 作者に無断で改変再配布が可能で利用形態商用18禁利用等
* についても制限はありません
* このプラグインはもうあなたのものです
*/
(function() {
'use strict';
var getCommandName = function(command) {
return (command || '').toUpperCase();
};
var getArgNumber = function(arg, min, max) {
if (arguments.length < 2) min = -Infinity;
if (arguments.length < 3) max = Infinity;
return (parseInt(convertEscapeCharacters(arg.toString())) || 0).clamp(min, max);
};
var getArgString = function(arg, upperFlg) {
arg = convertEscapeCharacters(arg);
return upperFlg ? arg.toUpperCase() : arg;
};
var getArgBoolean = function(arg) {
return (arg || '').toUpperCase() === 'ON';
};
var connectArgs = function(args, startIndex, endIndex) {
if (arguments.length < 2) startIndex = 0;
if (arguments.length < 3) endIndex = args.length;
var text = '';
for (var i = startIndex; i < endIndex; i++) {
text += args[i];
if (i < endIndex - 1) text += ' ';
}
return text;
};
var convertEscapeCharacters = function(text) {
if (text === undefined || text === null) text = '';
var window = SceneManager.getHiddenWindow();
return window ? window.convertEscapeCharacters(text) : text;
};
var getUsingVariables = function(text) {
var usingVariables = [];
text = text.replace(/\\/g, '\x1b');
text = text.replace(/\x1b\x1b/g, '\\');
text = text.replace(/\x1bV\[(\d+)\,\s*(\d+)\]/gi, function() {
var number = parseInt(arguments[1], 10);
usingVariables.push(number);
return $gameVariables.value(number);
}.bind(this));
text = text.replace(/\x1bV\[(\d+)\]/gi, function() {
var number = parseInt(arguments[1], 10);
usingVariables.push(number);
return $gameVariables.value(number);
}.bind(this));
text = text.replace(/\x1bV\[(\d+)\]/gi, function() {
var number = parseInt(arguments[1], 10);
usingVariables.push(number);
return $gameVariables.value(number);
}.bind(this));
return usingVariables;
};
//=============================================================================
// Game_Interpreter
// プラグインコマンド[D_TEXT]を追加定義します。
//=============================================================================
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.apply(this, arguments);
this.pluginCommandDTextPicture(command, args);
};
Game_Interpreter.textAlignMapper = {
LEFT: 0, CENTER: 1, RIGHT: 2, : 0, 中央: 1, : 2
};
Game_Interpreter.prototype.pluginCommandDTextPicture = function(command, args) {
switch (getCommandName(command)) {
case 'D_TEXT' :
if (isNaN(args[args.length - 1]) || args.length === 1) args.push($gameScreen.dTextSize || 28);
var fontSize = getArgNumber(args.pop());
$gameScreen.setDTextPicture(connectArgs(args), fontSize);
break;
case 'D_TEXT_SETTING':
switch (getCommandName(args[0])) {
case 'ALIGN' :
$gameScreen.dTextAlign = isNaN(args[1]) ?
Game_Interpreter.textAlignMapper[getArgString(args[1], true)] : getArgNumber(args[1], 0, 2);
break;
case 'BG_COLOR' :
$gameScreen.dTextBackColor = getArgString(connectArgs(args, 1));
break;
case 'FONT':
args.shift();
$gameScreen.setDtextFont(getArgString(connectArgs(args)));
break;
case 'REAL_TIME' :
$gameScreen.dTextRealTime = getArgBoolean(args[1]);
break;
case 'WINDOW':
$gameScreen.dWindowFrame = getArgBoolean(args[1]);
break;
}
break;
}
};
//=============================================================================
// Game_Variables
// 値を変更した変数の履歴を取得します。
//=============================================================================
var _Game_Variables_setValue = Game_Variables.prototype.setValue;
Game_Variables.prototype.setValue = function(variableId, value) {
if (this.value(variableId) !== value) {
this._changedVariables = this.getChangedVariables();
if (!this._changedVariables.contains(variableId)) {
this._changedVariables.push(variableId);
}
}
_Game_Variables_setValue.apply(this, arguments);
};
Game_Variables.prototype.getChangedVariables = function() {
return this._changedVariables || [];
};
Game_Variables.prototype.clearChangedVariables = function() {
return this._changedVariables = [];
};
//=============================================================================
// Game_Screen
// 動的ピクチャ用のプロパティを追加定義します。
//=============================================================================
var _Game_Screen_clear = Game_Screen.prototype.clear;
Game_Screen.prototype.clear = function() {
_Game_Screen_clear.call(this);
this.clearDTextPicture();
};
Game_Screen.prototype.clearDTextPicture = function() {
this.dTextValue = null;
this.dTextOriginal = null;
this.dTextRealTime = null;
this.dTextSize = 0;
this.dTextAlign = 0;
this.dTextBackColor = null;
this.dTextFont = null;
this.dUsingVariables = null;
this.dWindowFrame = null;
};
Game_Screen.prototype.setDTextPicture = function(value, size) {
if (typeof TranslationManager !== 'undefined') {
TranslationManager.translateIfNeed(value, function(translatedText) {
value = translatedText;
});
}
this.dUsingVariables = (this.dUsingVariables || []).concat(getUsingVariables(value));
this.dTextValue = (this.dTextValue || '') + getArgString(value, false) + '\n';
this.dTextOriginal = (this.dTextOriginal || '') + value + '\n';
this.dTextSize = size;
};
Game_Screen.prototype.getDTextPictureInfo = function() {
return {
value : this.dTextValue,
size : this.dTextSize || 0,
align : this.dTextAlign || 0,
color : this.dTextBackColor,
font : this.dTextFont,
usingVariables: this.dUsingVariables,
realTime : this.dTextRealTime,
originalValue : this.dTextOriginal,
windowFrame : this.dWindowFrame
};
};
Game_Screen.prototype.isSettingDText = function() {
return !!this.dTextValue;
};
Game_Screen.prototype.setDtextFont = function(name) {
this.dTextFont = name;
};
var _Game_Screen_updatePictures = Game_Screen.prototype.updatePictures;
Game_Screen.prototype.updatePictures = function() {
_Game_Screen_updatePictures.apply(this, arguments);
$gameVariables.clearChangedVariables();
};
//=============================================================================
// Game_Picture
// 動的ピクチャ用のプロパティを追加定義し、表示処理を動的ピクチャ対応に変更します。
//=============================================================================
var _Game_Picture_initBasic = Game_Picture.prototype.initBasic;
Game_Picture.prototype.initBasic = function() {
_Game_Picture_initBasic.call(this);
this.dTextValue = null;
this.dTextInfo = null;
};
var _Game_Picture_show = Game_Picture.prototype.show;
Game_Picture.prototype.show = function(name, origin, x, y, scaleX,
scaleY, opacity, blendMode) {
if ($gameScreen.isSettingDText() && !name) {
arguments[0] = Date.now().toString();
this.dTextInfo = $gameScreen.getDTextPictureInfo();
$gameScreen.clearDTextPicture();
} else {
this.dTextInfo = null;
}
_Game_Picture_show.apply(this, arguments);
};
var _Game_Picture_update = Game_Picture.prototype.update;
Game_Picture.prototype.update = function() {
_Game_Picture_update.apply(this, arguments);
if (this.dTextInfo && this.dTextInfo.realTime) {
this.updateDTextVariable();
}
};
Game_Picture.prototype.updateDTextVariable = function() {
$gameVariables.getChangedVariables().forEach(function(variableId) {
if (this.dTextInfo.usingVariables.contains(variableId)) {
this._name = Date.now().toString();
this.dTextInfo.value = getArgString(this.dTextInfo.originalValue, false);
}
}, this);
};
//=============================================================================
// SceneManager
// 文字描画用の隠しウィンドウを取得します。
//=============================================================================
SceneManager.getHiddenWindow = function() {
if (!this._hiddenWindow) {
this._hiddenWindow = new Window_Hidden(1, 1, 1, 1);
}
return this._hiddenWindow;
};
SceneManager.getSpriteset = function() {
return this._scene._spriteset;
};
//=============================================================================
// Window_Base
// 文字列変換処理に追加制御文字を設定します。
//=============================================================================
var _Window_Base_convertEscapeCharacters = Window_Base.prototype.convertEscapeCharacters;
Window_Base.prototype.convertEscapeCharacters = function(text) {
text = _Window_Base_convertEscapeCharacters.call(this, text);
text = text.replace(/\x1bV\[(\d+)\,\s*(\d+)\]/gi, function() {
return this.getVariablePadZero($gameVariables.value(parseInt(arguments[1], 10)), arguments[2]);
}.bind(this));
text = text.replace(/\x1bITEM\[(\d+)\]/gi, function() {
var item = $dataItems[getArgNumber(arguments[1], 1, $dataItems.length)];
return item ? '\x1bi[' + item.iconIndex + ']' + item.name : '';
}.bind(this));
text = text.replace(/\x1bWEAPON\[(\d+)\]/gi, function() {
var item = $dataWeapons[getArgNumber(arguments[1], 1, $dataWeapons.length)];
return item ? '\x1bi[' + item.iconIndex + ']' + item.name : '';
}.bind(this));
text = text.replace(/\x1bARMOR\[(\d+)\]/gi, function() {
var item = $dataArmors[getArgNumber(arguments[1], 1, $dataArmors.length)];
return item ? '\x1bi[' + item.iconIndex + ']' + item.name : '';
}.bind(this));
text = text.replace(/\x1bSKILL\[(\d+)\]/gi, function() {
var item = $dataSkills[getArgNumber(arguments[1], 1, $dataSkills.length)];
return item ? '\x1bi[' + item.iconIndex + ']' + item.name : '';
}.bind(this));
text = text.replace(/\x1bSTATE\[(\d+)\]/gi, function() {
var item = $dataStates[getArgNumber(arguments[1], 1, $dataStates.length)];
return item ? '\x1bi[' + item.iconIndex + ']' + item.name : '';
}.bind(this));
return text;
};
Window_Base.prototype.getVariablePadZero = function(value, digit) {
return (value < 0 ? '-' : '') + Math.abs(value).padZero(digit);
};
//=============================================================================
// Sprite_Picture
// 画像の動的生成を追加定義します。
//=============================================================================
var _Sprite_Picture_update = Sprite_Picture.prototype.update;
Sprite_Picture.prototype.update = function() {
_Sprite_Picture_update.apply(this, arguments);
if (this._frameWindow) {
this.updateFrameWindow();
}
};
Sprite_Picture.prototype.updateFrameWindow = function() {
var padding = this._frameWindow.standardPadding();
this._frameWindow.x = this.x - (this.anchor.x * this.width * this.scale.x) - padding;
this._frameWindow.y = this.y - (this.anchor.y * this.height * this.scale.y) - padding;
if (!this.visible) {
this.removeFrameWindow();
return;
}
if (!this._addFrameWindow) {
this.addFrameWindow();
}
if (Graphics.frameCount % 2 === 0) {
this.adjustScaleFrameWindow();
}
};
Sprite_Picture.prototype.adjustScaleFrameWindow = function() {
var padding = this._frameWindow.standardPadding();
var newFrameWidth = Math.floor(this.width * this.scale.x + padding * 2);
var newFrameHeight = Math.floor(this.height * this.scale.x + padding * 2);
if (this._frameWindow.width !== newFrameWidth || this._frameWindow.height !== newFrameHeight) {
this._frameWindow.move(this._frameWindow.x, this._frameWindow.y, newFrameWidth, newFrameHeight);
}
};
Sprite_Picture.prototype.addFrameWindow = function() {
var parent = this.parent;
if (parent) {
var index = parent.getChildIndex(this);
parent.addChildAt(this._frameWindow, index);
this._addFrameWindow = true;
}
};
Sprite_Picture.prototype.removeFrameWindow = function() {
var parent = this.parent;
if (parent) {
parent.removeChild(this._frameWindow);
this._frameWindow = null;
this._addFrameWindow = false;
}
};
var _Sprite_Picture_loadBitmap = Sprite_Picture.prototype.loadBitmap;
Sprite_Picture.prototype.loadBitmap = function() {
this.dTextInfo = this.picture().dTextInfo;
if (this.dTextInfo) {
this.makeDynamicBitmap();
} else {
_Sprite_Picture_loadBitmap.apply(this, arguments);
}
};
Sprite_Picture.prototype.makeDynamicBitmap = function() {
this.textWidths = [];
this.hiddenWindow = SceneManager.getHiddenWindow();
this.hiddenWindow.resetFontSettings(this.dTextInfo);
var bitmapVirtual = new Bitmap_Virtual();
this._processText(bitmapVirtual);
this.hiddenWindow.resetFontSettings(this.dTextInfo);
this.bitmap = new Bitmap(bitmapVirtual.width, bitmapVirtual.height);
this.bitmap.fontFace = this.hiddenWindow.contents.fontFace;
if (this.dTextInfo.color) {
this.bitmap.fillAll(this.dTextInfo.color);
}
this._processText(this.bitmap);
this._colorTone = [0, 0, 0, 0];
if (this._frameWindow) {
this.removeFrameWindow();
}
if (this.dTextInfo.windowFrame) {
var scaleX = this.picture().scaleX() / 100;
var scaleY = this.picture().scaleY() / 100;
this.makeFrameWindow(bitmapVirtual.width * scaleX, bitmapVirtual.height * scaleY);
}
this.hiddenWindow = null;
};
Sprite_Picture.prototype.makeFrameWindow = function(width, height) {
var padding = this.hiddenWindow.standardPadding();
this._frameWindow = new Window_Base(0, 0, width + padding * 2, height + padding * 2);
};
Sprite_Picture.prototype._processText = function(bitmap) {
var textState = {index: 0, x: 0, y: 0, text: this.dTextInfo.value, left: 0, line: -1, height: 0};
this._processNewLine(textState, bitmap);
textState.height = this.hiddenWindow.calcTextHeight(textState, false);
textState.index = 0;
while (textState.text[textState.index]) {
this._processCharacter(textState, bitmap);
}
};
Sprite_Picture.prototype._processCharacter = function(textState, bitmap) {
if (textState.text[textState.index] === '\x1b') {
var code = this.hiddenWindow.obtainEscapeCode(textState);
switch (code) {
case 'C':
bitmap.textColor = this.hiddenWindow.textColor(this.hiddenWindow.obtainEscapeParam(textState));
break;
case 'I':
this._processDrawIcon(this.hiddenWindow.obtainEscapeParam(textState), textState, bitmap);
break;
case '{':
this.hiddenWindow.makeFontBigger();
break;
case '}':
this.hiddenWindow.makeFontSmaller();
break;
case 'F':
switch (this.hiddenWindow.obtainEscapeParamString(textState).toUpperCase()) {
case 'I':
bitmap.fontItalic = true;
break;
case 'B':
bitmap.fontBoldFotDtext = true;
break;
case '/':
case 'N':
bitmap.fontItalic = false;
bitmap.fontBoldFotDtext = false;
break;
}
break;
case 'OC':
var colorCode = this.hiddenWindow.obtainEscapeParamString(textState);
var colorIndex = Number(colorCode);
if (!isNaN(colorIndex) && colorIndex > 0) {
bitmap.outlineColor = this.hiddenWindow.textColor(colorIndex);
} else {
bitmap.outlineColor = this.hiddenWindow.obtainEscapeParamString(textState);
}
break;
case 'OW':
bitmap.outlineWidth = this.hiddenWindow.obtainEscapeParam(textState);
break;
}
} else if (textState.text[textState.index] === '\n') {
this._processNewLine(textState, bitmap);
} else {
var c = textState.text[textState.index++];
var w = this.hiddenWindow.textWidth(c);
bitmap.fontSize = this.hiddenWindow.contents.fontSize;
bitmap.drawText(c, textState.x, textState.y, w * 2, textState.height, 'left');
textState.x += w;
}
};
Sprite_Picture.prototype._processNewLine = function(textState, bitmap) {
if (bitmap instanceof Bitmap_Virtual)
this.textWidths[textState.line] = textState.x;
this.hiddenWindow.processNewLine(textState);
textState.line++;
if (bitmap instanceof Bitmap)
textState.x = (bitmap.width - this.textWidths[textState.line]) / 2 * this.dTextInfo.align;
};
Sprite_Picture.prototype._processDrawIcon = function(iconIndex, textState, bitmap) {
var iconBitmap = ImageManager.loadSystem('IconSet');
var pw = Window_Base._iconWidth;
var ph = Window_Base._iconHeight;
var sx = iconIndex % 16 * pw;
var sy = Math.floor(iconIndex / 16) * ph;
bitmap.blt(iconBitmap, sx, sy, pw, ph, textState.x + 2, textState.y + (textState.height - ph) / 2);
textState.x += Window_Base._iconWidth + 4;
};
//=============================================================================
// Bitmap_Virtual
// サイズを計算するための仮想ビットマップクラス
//=============================================================================
function Bitmap_Virtual() {
this.initialize.apply(this, arguments);
}
Bitmap_Virtual.prototype.initialize = function() {
this.window = SceneManager.getHiddenWindow();
this.width = 0;
this.height = 0;
};
Bitmap_Virtual.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) {
var baseWidth = this.window.textWidth(text);
var fontSize = this.window.contents.fontSize;
if (this.fontItalic) {
baseWidth += Math.floor(fontSize / 6);
}
if (this.fontBoldFotDtext) {
baseWidth += 2;
}
this.width = Math.max(x + baseWidth, this.width);
this.height = Math.max(y + fontSize + 8, this.height);
};
Bitmap_Virtual.prototype.blt = function(source, sx, sy, sw, sh, dx, dy, dw, dh) {
this.width = Math.max(dx + (dw || sw), this.width);
this.height = Math.max(dy + (dh || sh), this.height);
};
//=============================================================================
// Window_Hidden
// 文字描画用の隠しウィンドウ
//=============================================================================
function Window_Hidden() {
this.initialize.apply(this, arguments);
}
Window_Hidden.prototype.backOpacity = null;
Window_Hidden.prototype = Object.create(Window_Base.prototype);
Window_Hidden.prototype.constructor = Window_Hidden;
Window_Hidden.prototype._createAllParts = function() {
this._windowBackSprite = {};
this._windowSpriteContainer = {};
this._windowContentsSprite = new Sprite();
this.addChild(this._windowContentsSprite);
};
Window_Hidden.prototype._refreshAllParts = function() {};
Window_Hidden.prototype._refreshBack = function() {};
Window_Hidden.prototype._refreshFrame = function() {};
Window_Hidden.prototype._refreshCursor = function() {};
Window_Hidden.prototype._refreshArrows = function() {};
Window_Hidden.prototype._refreshPauseSign = function() {};
Window_Hidden.prototype.updateTransform = function() {};
Window_Hidden.prototype.resetFontSettings = function(dTextInfo) {
if (dTextInfo) {
var customFont = dTextInfo.font ? dTextInfo.font + ',' : '';
this.contents.fontFace = customFont + this.standardFontFace();
this.contents.fontSize = dTextInfo.size || this.standardFontSize();
} else {
Window_Base.prototype.resetFontSettings.apply(this, arguments);
}
};
Window_Hidden.prototype.obtainEscapeParamString = function(textState) {
var arr = /^\[.+?\]/.exec(textState.text.slice(textState.index));
if (arr) {
textState.index += arr[0].length;
return arr[0].substring(1, arr[0].length - 1);
} else {
return '';
}
};
//=============================================================================
// Bitmap
// 太字対応
//=============================================================================
var _Bitmap__makeFontNameText = Bitmap.prototype._makeFontNameText;
Bitmap.prototype._makeFontNameText = function() {
return (this.fontBoldFotDtext ? 'bold ' : '') + _Bitmap__makeFontNameText.apply(this, arguments);
};
})();

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

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