Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f18f5156d7 | |||
| 8e0603f363 | |||
| 9f2abc90c8 | |||
| a4c60472f8 | |||
| 01c316bbc6 | |||
| ca2ce2e885 | |||
| 8519a0daa2 |
134 changed files with 605280 additions and 1509095 deletions
|
|
@ -1,9 +1,105 @@
|
|||
[
|
||||
null,
|
||||
{"id":1,"battlerName":"","characterIndex":0,"characterName":"男主人公","classId":5,"equips":[1,1,2,3,0],"faceIndex":0,"faceName":"","traits":[],"initialLevel":1,"maxLevel":99,"name":"コリウス","nickname":"","note":"<Set Sts Data>\nTreeType: 5,0,6,0,7\n</Set Sts Data>","profile":""},
|
||||
{"id":2,"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":3,"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":4,"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":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":""}
|
||||
]
|
||||
null,
|
||||
{
|
||||
"id": 1,
|
||||
"battlerName": "",
|
||||
"characterIndex": 0,
|
||||
"characterName": "男主人公",
|
||||
"classId": 5,
|
||||
"equips": [1, 1, 2, 3, 0],
|
||||
"faceIndex": 0,
|
||||
"faceName": "",
|
||||
"traits": [],
|
||||
"initialLevel": 1,
|
||||
"maxLevel": 99,
|
||||
"name": "コリウス",
|
||||
"nickname": "",
|
||||
"note": "<Set Sts Data>\nTreeType: 5,0,6,0,7\n</Set Sts Data>",
|
||||
"profile": ""
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"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": 3,
|
||||
"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": 4,
|
||||
"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": 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": ""
|
||||
}
|
||||
]
|
||||
|
|
|
|||
152024
www/data/Animations.json
152024
www/data/Animations.json
File diff suppressed because it is too large
Load diff
|
|
@ -1,543 +1,243 @@
|
|||
[
|
||||
null,
|
||||
{
|
||||
"id": 1,
|
||||
"atypeId": 5,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 128,
|
||||
"name": "盾",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 300
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"atypeId": 1,
|
||||
"description": "",
|
||||
"etypeId": 3,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 130,
|
||||
"name": "帽子",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 300
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"atypeId": 1,
|
||||
"description": "",
|
||||
"etypeId": 4,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 135,
|
||||
"name": "服",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 300
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"atypeId": 1,
|
||||
"description": "",
|
||||
"etypeId": 5,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 145,
|
||||
"name": "指輪",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 300
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0
|
||||
}
|
||||
]
|
||||
null,
|
||||
{
|
||||
"id": 1,
|
||||
"atypeId": 5,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 128,
|
||||
"name": "盾",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 10, 0, 0, 0, 0],
|
||||
"price": 300
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"atypeId": 1,
|
||||
"description": "",
|
||||
"etypeId": 3,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 130,
|
||||
"name": "帽子",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 10, 0, 0, 0, 0],
|
||||
"price": 300
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"atypeId": 1,
|
||||
"description": "",
|
||||
"etypeId": 4,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 135,
|
||||
"name": "服",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 10, 0, 0, 0, 0],
|
||||
"price": 300
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"atypeId": 1,
|
||||
"description": "",
|
||||
"etypeId": 5,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 145,
|
||||
"name": "指輪",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 10, 0, 0, 0],
|
||||
"price": 300
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"atypeId": 0,
|
||||
"description": "",
|
||||
"etypeId": 2,
|
||||
"traits": [{ "code": 22, "dataId": 1, "value": 0 }],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0
|
||||
}
|
||||
]
|
||||
|
|
|
|||
19278
www/data/Classes.json
19278
www/data/Classes.json
File diff suppressed because it is too large
Load diff
384576
www/data/CommonEvents.json
384576
www/data/CommonEvents.json
File diff suppressed because it is too large
Load diff
|
|
@ -1,251 +1,119 @@
|
|||
[
|
||||
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
|
||||
}
|
||||
],
|
||||
"gold": 0,
|
||||
"name": "ミノタウロス",
|
||||
"note": "",
|
||||
"params": [
|
||||
500,
|
||||
0,
|
||||
30,
|
||||
30,
|
||||
30,
|
||||
30,
|
||||
30,
|
||||
30
|
||||
]
|
||||
}
|
||||
]
|
||||
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 }
|
||||
],
|
||||
"gold": 0,
|
||||
"name": "ミノタウロス",
|
||||
"note": "",
|
||||
"params": [500, 0, 30, 30, 30, 30, 30, 30]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
3085
www/data/Items.json
3085
www/data/Items.json
File diff suppressed because it is too large
Load diff
64058
www/data/Map001.json
64058
www/data/Map001.json
File diff suppressed because it is too large
Load diff
43122
www/data/Map002.json
43122
www/data/Map002.json
File diff suppressed because it is too large
Load diff
34008
www/data/Map003.json
34008
www/data/Map003.json
File diff suppressed because it is too large
Load diff
21642
www/data/Map004.json
21642
www/data/Map004.json
File diff suppressed because it is too large
Load diff
50631
www/data/Map005.json
50631
www/data/Map005.json
File diff suppressed because it is too large
Load diff
2362
www/data/Map006.json
2362
www/data/Map006.json
File diff suppressed because it is too large
Load diff
24629
www/data/Map007.json
24629
www/data/Map007.json
File diff suppressed because it is too large
Load diff
12746
www/data/Map008.json
12746
www/data/Map008.json
File diff suppressed because it is too large
Load diff
14499
www/data/Map009.json
14499
www/data/Map009.json
File diff suppressed because it is too large
Load diff
77841
www/data/Map010.json
77841
www/data/Map010.json
File diff suppressed because it is too large
Load diff
17663
www/data/Map011.json
17663
www/data/Map011.json
File diff suppressed because it is too large
Load diff
33696
www/data/Map012.json
33696
www/data/Map012.json
File diff suppressed because it is too large
Load diff
73897
www/data/Map013.json
73897
www/data/Map013.json
File diff suppressed because it is too large
Load diff
3114
www/data/Map014.json
3114
www/data/Map014.json
File diff suppressed because it is too large
Load diff
11816
www/data/Map016.json
11816
www/data/Map016.json
File diff suppressed because it is too large
Load diff
9088
www/data/Map017.json
9088
www/data/Map017.json
File diff suppressed because it is too large
Load diff
29597
www/data/Map018.json
29597
www/data/Map018.json
File diff suppressed because it is too large
Load diff
37133
www/data/Map019.json
37133
www/data/Map019.json
File diff suppressed because it is too large
Load diff
13725
www/data/Map020.json
13725
www/data/Map020.json
File diff suppressed because it is too large
Load diff
3719
www/data/Map021.json
3719
www/data/Map021.json
File diff suppressed because it is too large
Load diff
11265
www/data/Map023.json
11265
www/data/Map023.json
File diff suppressed because it is too large
Load diff
17462
www/data/Map024.json
17462
www/data/Map024.json
File diff suppressed because it is too large
Load diff
19112
www/data/Map026.json
19112
www/data/Map026.json
File diff suppressed because it is too large
Load diff
8651
www/data/Map027.json
8651
www/data/Map027.json
File diff suppressed because it is too large
Load diff
13610
www/data/Map028.json
13610
www/data/Map028.json
File diff suppressed because it is too large
Load diff
5690
www/data/Map029.json
5690
www/data/Map029.json
File diff suppressed because it is too large
Load diff
26345
www/data/Map030.json
26345
www/data/Map030.json
File diff suppressed because it is too large
Load diff
13145
www/data/Map031.json
13145
www/data/Map031.json
File diff suppressed because it is too large
Load diff
13032
www/data/Map032.json
13032
www/data/Map032.json
File diff suppressed because it is too large
Load diff
37687
www/data/Map033.json
37687
www/data/Map033.json
File diff suppressed because it is too large
Load diff
50768
www/data/Map034.json
50768
www/data/Map034.json
File diff suppressed because it is too large
Load diff
22010
www/data/Map035.json
22010
www/data/Map035.json
File diff suppressed because it is too large
Load diff
78631
www/data/Map036.json
78631
www/data/Map036.json
File diff suppressed because it is too large
Load diff
44181
www/data/Map037.json
44181
www/data/Map037.json
File diff suppressed because it is too large
Load diff
39170
www/data/Map038.json
39170
www/data/Map038.json
File diff suppressed because it is too large
Load diff
63030
www/data/Map039.json
63030
www/data/Map039.json
File diff suppressed because it is too large
Load diff
19732
www/data/Map040.json
19732
www/data/Map040.json
File diff suppressed because it is too large
Load diff
36643
www/data/Map041.json
36643
www/data/Map041.json
File diff suppressed because it is too large
Load diff
12178
www/data/Map042.json
12178
www/data/Map042.json
File diff suppressed because it is too large
Load diff
25688
www/data/Map043.json
25688
www/data/Map043.json
File diff suppressed because it is too large
Load diff
7392
www/data/Map044.json
7392
www/data/Map044.json
File diff suppressed because it is too large
Load diff
34660
www/data/Map046.json
34660
www/data/Map046.json
File diff suppressed because it is too large
Load diff
8218
www/data/Map047.json
8218
www/data/Map047.json
File diff suppressed because it is too large
Load diff
23484
www/data/Map048.json
23484
www/data/Map048.json
File diff suppressed because it is too large
Load diff
59131
www/data/Map049.json
59131
www/data/Map049.json
File diff suppressed because it is too large
Load diff
|
|
@ -1,412 +1,412 @@
|
|||
[
|
||||
null,
|
||||
{
|
||||
"id": 1,
|
||||
"expanded": true,
|
||||
"name": "屋内訓練場",
|
||||
"order": 19,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 911.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"expanded": true,
|
||||
"name": "兵舎",
|
||||
"order": 11,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 599.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"expanded": true,
|
||||
"name": "教員部屋",
|
||||
"order": 15,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 1118
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"expanded": false,
|
||||
"name": "森",
|
||||
"order": 34,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"expanded": true,
|
||||
"name": "風呂",
|
||||
"order": 2,
|
||||
"parentId": 7,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"expanded": false,
|
||||
"name": "黒",
|
||||
"order": 44,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"expanded": true,
|
||||
"name": "食堂・売店",
|
||||
"order": 1,
|
||||
"parentId": 0,
|
||||
"scrollX": 1126.6666666666667,
|
||||
"scrollY": 600.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"expanded": false,
|
||||
"name": "合宿用森",
|
||||
"order": 36,
|
||||
"parentId": 10,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 1070
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"expanded": false,
|
||||
"name": "外",
|
||||
"order": 14,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"expanded": true,
|
||||
"name": "合宿用森2",
|
||||
"order": 35,
|
||||
"parentId": 0,
|
||||
"scrollX": 1318.6666666666667,
|
||||
"scrollY": 1800.6666666666667
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"expanded": false,
|
||||
"name": "宝探し森",
|
||||
"order": 38,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"expanded": true,
|
||||
"name": "医務室・図書館",
|
||||
"order": 4,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 1116.6666666666667
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"expanded": true,
|
||||
"name": "外訓練場",
|
||||
"order": 8,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 600.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"expanded": false,
|
||||
"name": "騎士団隊長の部屋",
|
||||
"order": 33,
|
||||
"parentId": 46,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
null,
|
||||
{
|
||||
"id": 16,
|
||||
"expanded": false,
|
||||
"name": "ロックアーテル家",
|
||||
"order": 25,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"expanded": false,
|
||||
"name": "風呂2",
|
||||
"order": 3,
|
||||
"parentId": 5,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"expanded": false,
|
||||
"name": "小屋",
|
||||
"order": 9,
|
||||
"parentId": 13,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"expanded": true,
|
||||
"name": "医務室",
|
||||
"order": 6,
|
||||
"parentId": 12,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"expanded": true,
|
||||
"name": "森の町",
|
||||
"order": 23,
|
||||
"parentId": 0,
|
||||
"scrollX": 1222.6666666666667,
|
||||
"scrollY": 600.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"expanded": false,
|
||||
"name": "キャンプ内",
|
||||
"order": 37,
|
||||
"parentId": 10,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
null,
|
||||
{
|
||||
"id": 23,
|
||||
"expanded": true,
|
||||
"name": "トイレ",
|
||||
"order": 10,
|
||||
"parentId": 13,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"expanded": false,
|
||||
"name": "武器庫",
|
||||
"order": 21,
|
||||
"parentId": 1,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
null,
|
||||
{
|
||||
"id": 26,
|
||||
"expanded": true,
|
||||
"name": "宿屋",
|
||||
"order": 26,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"expanded": false,
|
||||
"name": "宿屋1F",
|
||||
"order": 27,
|
||||
"parentId": 26,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"expanded": true,
|
||||
"name": "テア宅",
|
||||
"order": 42,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"expanded": false,
|
||||
"name": "武器屋",
|
||||
"order": 24,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"expanded": false,
|
||||
"name": "宝探し森2",
|
||||
"order": 39,
|
||||
"parentId": 11,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 744.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"expanded": false,
|
||||
"name": "懺悔室",
|
||||
"order": 5,
|
||||
"parentId": 12,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"expanded": true,
|
||||
"name": "多目的室",
|
||||
"order": 7,
|
||||
"parentId": 12,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"expanded": false,
|
||||
"name": "調教部屋",
|
||||
"order": 20,
|
||||
"parentId": 1,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 599.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"expanded": true,
|
||||
"name": "宝探し森3",
|
||||
"order": 40,
|
||||
"parentId": 11,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 1138
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"expanded": false,
|
||||
"name": "森の小屋",
|
||||
"order": 41,
|
||||
"parentId": 34,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 1070
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"expanded": true,
|
||||
"name": "アーテルの部屋",
|
||||
"order": 16,
|
||||
"parentId": 3,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"expanded": true,
|
||||
"name": "ロック部屋",
|
||||
"order": 17,
|
||||
"parentId": 3,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"expanded": true,
|
||||
"name": "学長・テアの部屋",
|
||||
"order": 18,
|
||||
"parentId": 3,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"expanded": true,
|
||||
"name": "教室・資料室",
|
||||
"order": 22,
|
||||
"parentId": 1,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"expanded": false,
|
||||
"name": "上級生の部屋",
|
||||
"order": 12,
|
||||
"parentId": 2,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"expanded": true,
|
||||
"name": "鍛冶場・ヘンジの部屋",
|
||||
"order": 13,
|
||||
"parentId": 2,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 599.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"expanded": false,
|
||||
"name": "学校マップ",
|
||||
"order": 43,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"expanded": false,
|
||||
"name": "アーテル実家(現在)",
|
||||
"order": 28,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"expanded": false,
|
||||
"name": "アーテル実家(過去)",
|
||||
"order": 29,
|
||||
"parentId": 43,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
null,
|
||||
{
|
||||
"id": 46,
|
||||
"expanded": true,
|
||||
"name": "結婚後家",
|
||||
"order": 30,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 47,
|
||||
"expanded": false,
|
||||
"name": "結婚後家1F",
|
||||
"order": 31,
|
||||
"parentId": 46,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"expanded": false,
|
||||
"name": "家",
|
||||
"order": 32,
|
||||
"parentId": 46,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 49,
|
||||
"expanded": false,
|
||||
"name": "回想部屋",
|
||||
"order": 45,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 610
|
||||
}
|
||||
]
|
||||
null,
|
||||
{
|
||||
"id": 1,
|
||||
"expanded": true,
|
||||
"name": "屋内訓練場",
|
||||
"order": 19,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 640.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"expanded": true,
|
||||
"name": "兵舎",
|
||||
"order": 11,
|
||||
"parentId": 0,
|
||||
"scrollX": 1126.6666666666667,
|
||||
"scrollY": 599.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"expanded": true,
|
||||
"name": "教員部屋",
|
||||
"order": 15,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 640.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"expanded": false,
|
||||
"name": "森",
|
||||
"order": 34,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 624.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"expanded": true,
|
||||
"name": "風呂",
|
||||
"order": 2,
|
||||
"parentId": 7,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"expanded": false,
|
||||
"name": "黒",
|
||||
"order": 44,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"expanded": true,
|
||||
"name": "食堂・売店",
|
||||
"order": 1,
|
||||
"parentId": 0,
|
||||
"scrollX": 1105.3333333333333,
|
||||
"scrollY": 599.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"expanded": false,
|
||||
"name": "合宿用森",
|
||||
"order": 36,
|
||||
"parentId": 10,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 1070
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"expanded": false,
|
||||
"name": "外",
|
||||
"order": 14,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"expanded": true,
|
||||
"name": "合宿用森2",
|
||||
"order": 35,
|
||||
"parentId": 0,
|
||||
"scrollX": 1318.6666666666667,
|
||||
"scrollY": 1795.3333333333333
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"expanded": true,
|
||||
"name": "宝探し森",
|
||||
"order": 38,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 734
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"expanded": true,
|
||||
"name": "医務室・図書館",
|
||||
"order": 4,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"expanded": true,
|
||||
"name": "外訓練場",
|
||||
"order": 8,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 600.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"expanded": false,
|
||||
"name": "騎士団隊長の部屋",
|
||||
"order": 33,
|
||||
"parentId": 46,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
null,
|
||||
{
|
||||
"id": 16,
|
||||
"expanded": false,
|
||||
"name": "ロックアーテル家",
|
||||
"order": 25,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"expanded": false,
|
||||
"name": "風呂2",
|
||||
"order": 3,
|
||||
"parentId": 5,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"expanded": false,
|
||||
"name": "小屋",
|
||||
"order": 9,
|
||||
"parentId": 13,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"expanded": true,
|
||||
"name": "医務室",
|
||||
"order": 6,
|
||||
"parentId": 12,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"expanded": true,
|
||||
"name": "森の町",
|
||||
"order": 23,
|
||||
"parentId": 0,
|
||||
"scrollX": 1222.6666666666667,
|
||||
"scrollY": 599.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"expanded": false,
|
||||
"name": "キャンプ内",
|
||||
"order": 37,
|
||||
"parentId": 10,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
null,
|
||||
{
|
||||
"id": 23,
|
||||
"expanded": true,
|
||||
"name": "トイレ",
|
||||
"order": 10,
|
||||
"parentId": 13,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"expanded": false,
|
||||
"name": "武器庫",
|
||||
"order": 21,
|
||||
"parentId": 1,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
null,
|
||||
{
|
||||
"id": 26,
|
||||
"expanded": true,
|
||||
"name": "宿屋",
|
||||
"order": 26,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"expanded": false,
|
||||
"name": "宿屋1F",
|
||||
"order": 27,
|
||||
"parentId": 26,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"expanded": true,
|
||||
"name": "テア宅",
|
||||
"order": 42,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 29,
|
||||
"expanded": false,
|
||||
"name": "武器屋",
|
||||
"order": 24,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 30,
|
||||
"expanded": false,
|
||||
"name": "宝探し森2",
|
||||
"order": 39,
|
||||
"parentId": 11,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 744.6666666666666
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"expanded": false,
|
||||
"name": "懺悔室",
|
||||
"order": 5,
|
||||
"parentId": 12,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 32,
|
||||
"expanded": true,
|
||||
"name": "多目的室",
|
||||
"order": 7,
|
||||
"parentId": 12,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 33,
|
||||
"expanded": false,
|
||||
"name": "調教部屋",
|
||||
"order": 20,
|
||||
"parentId": 1,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 599.3333333333334
|
||||
},
|
||||
{
|
||||
"id": 34,
|
||||
"expanded": true,
|
||||
"name": "宝探し森3",
|
||||
"order": 40,
|
||||
"parentId": 11,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 1207.3333333333333
|
||||
},
|
||||
{
|
||||
"id": 35,
|
||||
"expanded": false,
|
||||
"name": "森の小屋",
|
||||
"order": 41,
|
||||
"parentId": 34,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 982
|
||||
},
|
||||
{
|
||||
"id": 36,
|
||||
"expanded": true,
|
||||
"name": "アーテルの部屋",
|
||||
"order": 16,
|
||||
"parentId": 3,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 37,
|
||||
"expanded": true,
|
||||
"name": "ロック部屋",
|
||||
"order": 17,
|
||||
"parentId": 3,
|
||||
"scrollX": 848,
|
||||
"scrollY": 624
|
||||
},
|
||||
{
|
||||
"id": 38,
|
||||
"expanded": true,
|
||||
"name": "学長・テアの部屋",
|
||||
"order": 18,
|
||||
"parentId": 3,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 624
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"expanded": true,
|
||||
"name": "教室・資料室",
|
||||
"order": 22,
|
||||
"parentId": 1,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 40,
|
||||
"expanded": false,
|
||||
"name": "上級生の部屋",
|
||||
"order": 12,
|
||||
"parentId": 2,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 41,
|
||||
"expanded": true,
|
||||
"name": "鍛冶場・ヘンジの部屋",
|
||||
"order": 13,
|
||||
"parentId": 2,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 624
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"expanded": false,
|
||||
"name": "学校マップ",
|
||||
"order": 43,
|
||||
"parentId": 0,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"expanded": false,
|
||||
"name": "アーテル実家(現在)",
|
||||
"order": 28,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 44,
|
||||
"expanded": false,
|
||||
"name": "アーテル実家(過去)",
|
||||
"order": 29,
|
||||
"parentId": 43,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
null,
|
||||
{
|
||||
"id": 46,
|
||||
"expanded": true,
|
||||
"name": "結婚後家",
|
||||
"order": 30,
|
||||
"parentId": 20,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 47,
|
||||
"expanded": false,
|
||||
"name": "結婚後家1F",
|
||||
"order": 31,
|
||||
"parentId": 46,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 48,
|
||||
"expanded": false,
|
||||
"name": "家",
|
||||
"order": 32,
|
||||
"parentId": 46,
|
||||
"scrollX": 1092,
|
||||
"scrollY": 610
|
||||
},
|
||||
{
|
||||
"id": 49,
|
||||
"expanded": false,
|
||||
"name": "回想部屋",
|
||||
"order": 45,
|
||||
"parentId": 0,
|
||||
"scrollX": 1081.3333333333333,
|
||||
"scrollY": 686
|
||||
}
|
||||
]
|
||||
|
|
|
|||
4246
www/data/Skills.json
4246
www/data/Skills.json
File diff suppressed because it is too large
Load diff
|
|
@ -1,295 +1,253 @@
|
|||
[
|
||||
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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
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 }]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
5681
www/data/System.json
5681
www/data/System.json
File diff suppressed because it is too large
Load diff
80239
www/data/Tilesets.json
80239
www/data/Tilesets.json
File diff suppressed because it is too large
Load diff
|
|
@ -1,167 +1,109 @@
|
|||
[
|
||||
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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,663 +1,323 @@
|
|||
[
|
||||
null,
|
||||
{
|
||||
"id": 1,
|
||||
"animationId": 6,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 97,
|
||||
"name": "剣",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 500,
|
||||
"wtypeId": 2
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"animationId": 6,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 99,
|
||||
"name": "斧",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 500,
|
||||
"wtypeId": 4
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"animationId": 1,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 101,
|
||||
"name": "杖",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 500,
|
||||
"wtypeId": 6
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"animationId": 11,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 102,
|
||||
"name": "弓",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 500,
|
||||
"wtypeId": 7
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 242,
|
||||
"name": "ステータス",
|
||||
"note": "<Set Sts Data>\nスキル: 34,39,46,44,45\n</Set Sts Data>",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 13
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 7,
|
||||
"name": "エロステータス",
|
||||
"note": "<Set Sts Data>\nスキル: 16,19,22\n</Set Sts Data>",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 12
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 84,
|
||||
"name": "エロスキル",
|
||||
"note": "<Set Sts Data>\nスキル: 27\n</Set Sts Data>",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 13
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{
|
||||
"code": 31,
|
||||
"dataId": 1,
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"code": 22,
|
||||
"dataId": 0,
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
}
|
||||
]
|
||||
null,
|
||||
{
|
||||
"id": 1,
|
||||
"animationId": 6,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 97,
|
||||
"name": "剣",
|
||||
"note": "",
|
||||
"params": [0, 0, 10, 0, 0, 0, 0, 0],
|
||||
"price": 500,
|
||||
"wtypeId": 2
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"animationId": 6,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 99,
|
||||
"name": "斧",
|
||||
"note": "",
|
||||
"params": [0, 0, 10, 0, 0, 0, 0, 0],
|
||||
"price": 500,
|
||||
"wtypeId": 4
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"animationId": 1,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 101,
|
||||
"name": "杖",
|
||||
"note": "",
|
||||
"params": [0, 0, 10, 0, 0, 0, 0, 0],
|
||||
"price": 500,
|
||||
"wtypeId": 6
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"animationId": 11,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 102,
|
||||
"name": "弓",
|
||||
"note": "",
|
||||
"params": [0, 0, 10, 0, 0, 0, 0, 0],
|
||||
"price": 500,
|
||||
"wtypeId": 7
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 242,
|
||||
"name": "ステータス",
|
||||
"note": "<Set Sts Data>\nスキル: 34,39,46,44,45\n</Set Sts Data>",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 13
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 7,
|
||||
"name": "エロステータス",
|
||||
"note": "<Set Sts Data>\nスキル: 16,19,22\n</Set Sts Data>",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 12
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 84,
|
||||
"name": "エロスキル",
|
||||
"note": "<Set Sts Data>\nスキル: 27\n</Set Sts Data>",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 13
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"animationId": 0,
|
||||
"description": "",
|
||||
"etypeId": 1,
|
||||
"traits": [
|
||||
{ "code": 31, "dataId": 1, "value": 0 },
|
||||
{ "code": 22, "dataId": 0, "value": 0 }
|
||||
],
|
||||
"iconIndex": 0,
|
||||
"name": "",
|
||||
"note": "",
|
||||
"params": [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"price": 0,
|
||||
"wtypeId": 0
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,53 +1,445 @@
|
|||
/*! 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 } })
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,207 @@
|
|||
/*! 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
|
||||
}();
|
||||
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;
|
||||
})();
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,428 +1,524 @@
|
|||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
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 __());
|
||||
};
|
||||
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 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),
|
||||
];
|
||||
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;
|
||||
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);
|
||||
}
|
||||
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;
|
||||
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;
|
||||
}
|
||||
var PictureRenderer = (function (_super) {
|
||||
__extends(PictureRenderer, _super);
|
||||
function PictureRenderer(renderer) {
|
||||
_super.call(this, renderer);
|
||||
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;
|
||||
}
|
||||
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 = {}));
|
||||
} 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 = {}));
|
||||
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 = {}));
|
||||
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
|
||||
//# sourceMappingURL=pixi-picture.js.map
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
86164
www/js/libs/pixi.js
86164
www/js/libs/pixi.js
File diff suppressed because it is too large
Load diff
|
|
@ -4,6 +4,6 @@
|
|||
|
||||
PluginManager.setup($plugins);
|
||||
|
||||
window.onload = function() {
|
||||
SceneManager.run(Scene_Boot);
|
||||
window.onload = function () {
|
||||
SceneManager.run(Scene_Boot);
|
||||
};
|
||||
|
|
|
|||
3271
www/js/plugins.js
3271
www/js/plugins.js
File diff suppressed because one or more lines are too long
|
|
@ -17,76 +17,74 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
var _Scene_Menu_create = Scene_Menu.prototype.create;
|
||||
Scene_Menu.prototype.create = function () {
|
||||
_Scene_Menu_create.call(this);
|
||||
this._statusWindow.x = 0;
|
||||
this._statusWindow.y = this._commandWindow.height;
|
||||
this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width;
|
||||
};
|
||||
|
||||
var _Scene_Menu_create = Scene_Menu.prototype.create;
|
||||
Scene_Menu.prototype.create = function () {
|
||||
_Scene_Menu_create.call(this);
|
||||
this._statusWindow.x = 0;
|
||||
this._statusWindow.y = this._commandWindow.height;
|
||||
this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width;
|
||||
};
|
||||
Window_MenuCommand.prototype.windowWidth = function () {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.windowWidth = function () {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
Window_MenuCommand.prototype.maxCols = function () {
|
||||
return 4;
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.maxCols = function () {
|
||||
return 4;
|
||||
};
|
||||
Window_MenuCommand.prototype.numVisibleRows = function () {
|
||||
return 2;
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.numVisibleRows = function () {
|
||||
return 2;
|
||||
};
|
||||
Window_MenuStatus.prototype.windowWidth = function () {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.windowWidth = function () {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
Window_MenuStatus.prototype.windowHeight = function () {
|
||||
var h1 = this.fittingHeight(1);
|
||||
var h2 = this.fittingHeight(2);
|
||||
return Graphics.boxHeight - h1 - h2;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.windowHeight = function () {
|
||||
var h1 = this.fittingHeight(1);
|
||||
var h2 = this.fittingHeight(2);
|
||||
return Graphics.boxHeight - h1 - h2;
|
||||
};
|
||||
Window_MenuStatus.prototype.maxCols = function () {
|
||||
return 4;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.maxCols = function () {
|
||||
return 4;
|
||||
};
|
||||
Window_MenuStatus.prototype.numVisibleRows = function () {
|
||||
return 1;
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.numVisibleRows = function () {
|
||||
return 1;
|
||||
};
|
||||
Window_MenuStatus.prototype.drawItemImage = function (index) {
|
||||
var actor = $gameParty.members()[index];
|
||||
var rect = this.itemRectForText(index);
|
||||
var w = Math.min(rect.width, 144);
|
||||
var h = Math.min(rect.height, 144);
|
||||
var lineHeight = this.lineHeight();
|
||||
this.changePaintOpacity(actor.isBattleMember());
|
||||
this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h);
|
||||
this.changePaintOpacity(true);
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.drawItemImage = function (index) {
|
||||
var actor = $gameParty.members()[index];
|
||||
var rect = this.itemRectForText(index);
|
||||
var w = Math.min(rect.width, 144);
|
||||
var h = Math.min(rect.height, 144);
|
||||
var lineHeight = this.lineHeight();
|
||||
this.changePaintOpacity(actor.isBattleMember());
|
||||
this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h);
|
||||
this.changePaintOpacity(true);
|
||||
};
|
||||
|
||||
Window_MenuStatus.prototype.drawItemStatus = function (index) {
|
||||
var actor = $gameParty.members()[index];
|
||||
var rect = this.itemRectForText(index);
|
||||
var x = rect.x;
|
||||
var y = rect.y;
|
||||
var width = rect.width;
|
||||
var bottom = y + rect.height;
|
||||
var lineHeight = this.lineHeight();
|
||||
this.drawActorName(actor, x, y + lineHeight * 0, width);
|
||||
this.drawActorLevel(actor, x, y + lineHeight * 1, width);
|
||||
this.drawActorClass(actor, x, bottom - lineHeight * 4, width);
|
||||
this.drawActorHp(actor, x, bottom - lineHeight * 3, width);
|
||||
this.drawActorMp(actor, x, bottom - lineHeight * 2, width);
|
||||
this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);
|
||||
};
|
||||
|
||||
var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize;
|
||||
Window_MenuActor.prototype.initialize = function () {
|
||||
_Window_MenuActor_initialize.call(this);
|
||||
this.y = this.fittingHeight(2);
|
||||
};
|
||||
Window_MenuStatus.prototype.drawItemStatus = function (index) {
|
||||
var actor = $gameParty.members()[index];
|
||||
var rect = this.itemRectForText(index);
|
||||
var x = rect.x;
|
||||
var y = rect.y;
|
||||
var width = rect.width;
|
||||
var bottom = y + rect.height;
|
||||
var lineHeight = this.lineHeight();
|
||||
this.drawActorName(actor, x, y + lineHeight * 0, width);
|
||||
this.drawActorLevel(actor, x, y + lineHeight * 1, width);
|
||||
this.drawActorClass(actor, x, bottom - lineHeight * 4, width);
|
||||
this.drawActorHp(actor, x, bottom - lineHeight * 3, width);
|
||||
this.drawActorMp(actor, x, bottom - lineHeight * 2, width);
|
||||
this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);
|
||||
};
|
||||
|
||||
var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize;
|
||||
Window_MenuActor.prototype.initialize = function () {
|
||||
_Window_MenuActor_initialize.call(this);
|
||||
this.y = this.fittingHeight(2);
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -17,118 +17,116 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
var _Scene_File_create = Scene_File.prototype.create;
|
||||
Scene_File.prototype.create = function () {
|
||||
_Scene_File_create.call(this);
|
||||
this._listWindow.height = this._listWindow.fittingHeight(8);
|
||||
var x = 0;
|
||||
var y = this._listWindow.y + this._listWindow.height;
|
||||
var width = Graphics.boxWidth;
|
||||
var height = Graphics.boxHeight - y;
|
||||
this._statusWindow = new Window_SavefileStatus(x, y, width, height);
|
||||
this._statusWindow.setMode(this.mode());
|
||||
this._listWindow.statusWindow = this._statusWindow;
|
||||
this._listWindow.callUpdateHelp();
|
||||
this.addWindow(this._statusWindow);
|
||||
};
|
||||
|
||||
var _Scene_File_create = Scene_File.prototype.create;
|
||||
Scene_File.prototype.create = function () {
|
||||
_Scene_File_create.call(this);
|
||||
this._listWindow.height = this._listWindow.fittingHeight(8);
|
||||
var x = 0;
|
||||
var y = this._listWindow.y + this._listWindow.height;
|
||||
var width = Graphics.boxWidth;
|
||||
var height = Graphics.boxHeight - y;
|
||||
this._statusWindow = new Window_SavefileStatus(x, y, width, height);
|
||||
this._statusWindow.setMode(this.mode());
|
||||
this._listWindow.statusWindow = this._statusWindow;
|
||||
this._listWindow.callUpdateHelp();
|
||||
this.addWindow(this._statusWindow);
|
||||
};
|
||||
var _Scene_File_start = Scene_File.prototype.start;
|
||||
Scene_File.prototype.start = function () {
|
||||
_Scene_File_start.call(this);
|
||||
this._listWindow.ensureCursorVisible();
|
||||
this._listWindow.callUpdateHelp();
|
||||
};
|
||||
|
||||
var _Scene_File_start = Scene_File.prototype.start;
|
||||
Scene_File.prototype.start = function () {
|
||||
_Scene_File_start.call(this);
|
||||
this._listWindow.ensureCursorVisible();
|
||||
this._listWindow.callUpdateHelp();
|
||||
};
|
||||
Window_SavefileList.prototype.windowWidth = function () {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.windowWidth = function () {
|
||||
return Graphics.boxWidth;
|
||||
};
|
||||
Window_SavefileList.prototype.maxCols = function () {
|
||||
return 4;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.maxCols = function () {
|
||||
return 4;
|
||||
};
|
||||
Window_SavefileList.prototype.numVisibleRows = function () {
|
||||
return 5;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.numVisibleRows = function () {
|
||||
return 5;
|
||||
};
|
||||
Window_SavefileList.prototype.spacing = function () {
|
||||
return 8;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.spacing = function () {
|
||||
return 8;
|
||||
};
|
||||
Window_SavefileList.prototype.itemHeight = function () {
|
||||
return this.lineHeight() * 2;
|
||||
};
|
||||
|
||||
Window_SavefileList.prototype.itemHeight = function () {
|
||||
return this.lineHeight() * 2;
|
||||
};
|
||||
|
||||
var _Window_SavefileList_callUpdateHelp =
|
||||
Window_SavefileList.prototype.callUpdateHelp;
|
||||
Window_SavefileList.prototype.callUpdateHelp = function () {
|
||||
_Window_SavefileList_callUpdateHelp.call(this);
|
||||
if (this.active && this.statusWindow) {
|
||||
this.statusWindow.setId(this.index() + 1);
|
||||
}
|
||||
};
|
||||
|
||||
function Window_SavefileStatus() {
|
||||
this.initialize.apply(this, arguments);
|
||||
var _Window_SavefileList_callUpdateHelp =
|
||||
Window_SavefileList.prototype.callUpdateHelp;
|
||||
Window_SavefileList.prototype.callUpdateHelp = function () {
|
||||
_Window_SavefileList_callUpdateHelp.call(this);
|
||||
if (this.active && this.statusWindow) {
|
||||
this.statusWindow.setId(this.index() + 1);
|
||||
}
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype = Object.create(Window_Base.prototype);
|
||||
Window_SavefileStatus.prototype.constructor = Window_SavefileStatus;
|
||||
function Window_SavefileStatus() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_SavefileStatus.prototype.initialize = function (x, y, width, height) {
|
||||
Window_Base.prototype.initialize.call(this, x, y, width, height);
|
||||
this._id = 1;
|
||||
};
|
||||
Window_SavefileStatus.prototype = Object.create(Window_Base.prototype);
|
||||
Window_SavefileStatus.prototype.constructor = Window_SavefileStatus;
|
||||
|
||||
Window_SavefileStatus.prototype.setMode = function (mode) {
|
||||
this._mode = mode;
|
||||
};
|
||||
Window_SavefileStatus.prototype.initialize = function (x, y, width, height) {
|
||||
Window_Base.prototype.initialize.call(this, x, y, width, height);
|
||||
this._id = 1;
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.setId = function (id) {
|
||||
this._id = id;
|
||||
this.refresh();
|
||||
};
|
||||
Window_SavefileStatus.prototype.setMode = function (mode) {
|
||||
this._mode = mode;
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.refresh = function () {
|
||||
this.contents.clear();
|
||||
var id = this._id;
|
||||
var valid = DataManager.isThisGameFile(id);
|
||||
var info = DataManager.loadSavefileInfo(id);
|
||||
var rect = this.contents.rect;
|
||||
this.resetTextColor();
|
||||
if (this._mode === 'load') {
|
||||
this.changePaintOpacity(valid);
|
||||
}
|
||||
this.drawFileId(id, rect.x, rect.y);
|
||||
if (info) {
|
||||
this.changePaintOpacity(valid);
|
||||
this.drawContents(info, rect, valid);
|
||||
this.changePaintOpacity(true);
|
||||
}
|
||||
};
|
||||
Window_SavefileStatus.prototype.setId = function (id) {
|
||||
this._id = id;
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawFileId = function (id, x, y) {
|
||||
this.drawText(TextManager.file + ' ' + id, x, y, 180);
|
||||
};
|
||||
Window_SavefileStatus.prototype.refresh = function () {
|
||||
this.contents.clear();
|
||||
var id = this._id;
|
||||
var valid = DataManager.isThisGameFile(id);
|
||||
var info = DataManager.loadSavefileInfo(id);
|
||||
var rect = this.contents.rect;
|
||||
this.resetTextColor();
|
||||
if (this._mode === "load") {
|
||||
this.changePaintOpacity(valid);
|
||||
}
|
||||
this.drawFileId(id, rect.x, rect.y);
|
||||
if (info) {
|
||||
this.changePaintOpacity(valid);
|
||||
this.drawContents(info, rect, valid);
|
||||
this.changePaintOpacity(true);
|
||||
}
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawContents = function (info, rect, valid) {
|
||||
var bottom = rect.y + rect.height;
|
||||
var playtimeY = bottom - this.lineHeight();
|
||||
this.drawText(info.title, rect.x + 192, rect.y, rect.width - 192);
|
||||
if (valid) {
|
||||
this.drawPartyfaces(info, rect.x, bottom - 144);
|
||||
}
|
||||
this.drawText(info.playtime, rect.x, playtimeY, rect.width, 'right');
|
||||
};
|
||||
Window_SavefileStatus.prototype.drawFileId = function (id, x, y) {
|
||||
this.drawText(TextManager.file + " " + id, x, y, 180);
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawPartyfaces = function (info, x, y) {
|
||||
if (info && info.faces) {
|
||||
for (var i = 0; i < info.faces.length; i++) {
|
||||
var data = info.faces[i];
|
||||
this.drawFace(data[0], data[1], x + i * 150, y);
|
||||
}
|
||||
}
|
||||
};
|
||||
Window_SavefileStatus.prototype.drawContents = function (info, rect, valid) {
|
||||
var bottom = rect.y + rect.height;
|
||||
var playtimeY = bottom - this.lineHeight();
|
||||
this.drawText(info.title, rect.x + 192, rect.y, rect.width - 192);
|
||||
if (valid) {
|
||||
this.drawPartyfaces(info, rect.x, bottom - 144);
|
||||
}
|
||||
this.drawText(info.playtime, rect.x, playtimeY, rect.width, "right");
|
||||
};
|
||||
|
||||
Window_SavefileStatus.prototype.drawPartyfaces = function (info, x, y) {
|
||||
if (info && info.faces) {
|
||||
for (var i = 0; i < info.faces.length; i++) {
|
||||
var data = info.faces[i];
|
||||
this.drawFace(data[0], data[1], x + i * 150, y);
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
//
|
||||
|
||||
var Imported = Imported || {};
|
||||
Imported['AnimationMapName'] = 1.04;
|
||||
Imported["AnimationMapName"] = 1.04;
|
||||
|
||||
/*:
|
||||
* @plugindesc ver1.04/マップ名表示をアニメーションさせます。
|
||||
|
|
@ -20,8 +20,8 @@ Imported['AnimationMapName'] = 1.04;
|
|||
* @param Pattern Variable ID
|
||||
* @desc パターンの変更に使う変数のIDです。
|
||||
* 0または、空欄で変数を使用しません。
|
||||
* @default
|
||||
*
|
||||
* @default
|
||||
*
|
||||
* @param Anime Font Size
|
||||
* @desc 表示マップ名のフォントサイズです。
|
||||
* @default 28
|
||||
|
|
@ -34,19 +34,19 @@ Imported['AnimationMapName'] = 1.04;
|
|||
* @param Anime Count
|
||||
* @desc マップ名の表示時間です。
|
||||
* @default 300
|
||||
*
|
||||
*
|
||||
* @param Anime OriginalX
|
||||
* @desc 移動前の座標Xです。
|
||||
* @default 0
|
||||
*
|
||||
*
|
||||
* @param Anime OriginalY
|
||||
* @desc 移動前の座標Yです。
|
||||
* @default -60
|
||||
*
|
||||
*
|
||||
* @param Anime MoveX
|
||||
* @desc X座標の移動距離です。
|
||||
* @default 0
|
||||
*
|
||||
*
|
||||
* @param Anime MoveY
|
||||
* @desc Y座標の移動距離です。
|
||||
* @default 60
|
||||
|
|
@ -112,18 +112,18 @@ Imported['AnimationMapName'] = 1.04;
|
|||
* マップのメモ欄に以下のように記述してください。
|
||||
*
|
||||
* <アニメーションマップネーム設定>
|
||||
*
|
||||
*
|
||||
* 設定項目
|
||||
*
|
||||
* </アニメーションマップネーム設定>
|
||||
*
|
||||
*
|
||||
* 設定項目は、プラグインコマンドの設定の変更の項目で記述されているものが
|
||||
* 使用可能です。
|
||||
*
|
||||
* ---各設定項目の優先度---
|
||||
* プラグインコマンドによる設定は、基本設定を書き換えると同時に、パターンが
|
||||
* 設定されている場合は、指定した変数の数値も書き換えます。
|
||||
*
|
||||
*
|
||||
* マップのメモによる設定は、基本的に優先されます。
|
||||
* プラグインコマンドで呼び出した場合も、マップに設定がある場合は、その設定を
|
||||
* ベースとして使用します。
|
||||
|
|
@ -183,379 +183,474 @@ Imported['AnimationMapName'] = 1.04;
|
|||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
(function () {
|
||||
var parameters = PluginManager.parameters('AnimationMapName');
|
||||
var patternVariableId = Number(parameters['Pattern Variable ID']) || 0;
|
||||
var animeFontSize = Number(parameters['Anime Font Size'] || 28);
|
||||
var animeCount = Number(parameters['Anime Count'] || 300);
|
||||
var animeOriginalX = Number(parameters['Anime OriginalX'] || 0);
|
||||
var animeOriginalY = Number(parameters['Anime OriginalY'] || 0);
|
||||
var animeMoveX = Number(parameters['Anime MoveX'] || 0);
|
||||
var animeMoveY = Number(parameters['Anime MoveY'] || 0);
|
||||
var animePattern = parameters['Anime Pattern'] || 'Normal';
|
||||
var fillRectColor = parameters['Fill Rect Color'] || 'rgba(0,0,0,0.5)';
|
||||
var backPicture = parameters['Back Picture'];
|
||||
var parameters = PluginManager.parameters("AnimationMapName");
|
||||
var patternVariableId = Number(parameters["Pattern Variable ID"]) || 0;
|
||||
var animeFontSize = Number(parameters["Anime Font Size"] || 28);
|
||||
var animeCount = Number(parameters["Anime Count"] || 300);
|
||||
var animeOriginalX = Number(parameters["Anime OriginalX"] || 0);
|
||||
var animeOriginalY = Number(parameters["Anime OriginalY"] || 0);
|
||||
var animeMoveX = Number(parameters["Anime MoveX"] || 0);
|
||||
var animeMoveY = Number(parameters["Anime MoveY"] || 0);
|
||||
var animePattern = parameters["Anime Pattern"] || "Normal";
|
||||
var fillRectColor = parameters["Fill Rect Color"] || "rgba(0,0,0,0.5)";
|
||||
var backPicture = parameters["Back Picture"];
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var __GInterpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
__GInterpreter_pluginCommand.call(this, command, args);
|
||||
if (command === 'AnimationMapName' || command === 'アニメーションマップネーム') {
|
||||
var code = args.shift();
|
||||
if (code === 'Setting' || code === '設定') this.setAmsSetting(args);
|
||||
if (code === 'Add' || code === '表示') this.showAmn(args);
|
||||
}
|
||||
};
|
||||
var __GInterpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
__GInterpreter_pluginCommand.call(this, command, args);
|
||||
if (
|
||||
command === "AnimationMapName" ||
|
||||
command === "アニメーションマップネーム"
|
||||
) {
|
||||
var code = args.shift();
|
||||
if (code === "Setting" || code === "設定") this.setAmsSetting(args);
|
||||
if (code === "Add" || code === "表示") this.showAmn(args);
|
||||
}
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.setAmsSetting = function (args) {
|
||||
var params = $gameSystem.amnParameters();
|
||||
var amnParams = DataManager.makeAmnParams(params, args);
|
||||
if (patternVariableId) {
|
||||
if (amnParams.pattern === 'Normal' || amnParams.pattern == 0) {
|
||||
$gameVariables._data[patternVariableId] = 0;
|
||||
} else if (amnParams.pattern === 'Stretch' || amnParams.pattern == -1) {
|
||||
$gameVariables._data[patternVariableId] = -1;
|
||||
} else if (amnParams.pattern === 'GrowUp' || amnParams.pattern == -2) {
|
||||
$gameVariables._data[patternVariableId] = -2;
|
||||
} else {
|
||||
$gameVariables._data[patternVariableId] = Number(amnParams.pattern);
|
||||
Game_Interpreter.prototype.setAmsSetting = function (args) {
|
||||
var params = $gameSystem.amnParameters();
|
||||
var amnParams = DataManager.makeAmnParams(params, args);
|
||||
if (patternVariableId) {
|
||||
if (amnParams.pattern === "Normal" || amnParams.pattern == 0) {
|
||||
$gameVariables._data[patternVariableId] = 0;
|
||||
} else if (amnParams.pattern === "Stretch" || amnParams.pattern == -1) {
|
||||
$gameVariables._data[patternVariableId] = -1;
|
||||
} else if (amnParams.pattern === "GrowUp" || amnParams.pattern == -2) {
|
||||
$gameVariables._data[patternVariableId] = -2;
|
||||
} else {
|
||||
$gameVariables._data[patternVariableId] = Number(amnParams.pattern);
|
||||
}
|
||||
}
|
||||
$gameSystem.setAmnParameters(amnParams);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DataManager.amnMapParams = function (map) {
|
||||
if (!map) return false;
|
||||
if (map.note === undefined) return false;
|
||||
if (map._amsParams) {
|
||||
return map._amsParams;
|
||||
}
|
||||
var texts = map.note.split("\n");
|
||||
var params = {};
|
||||
for (var i = 0, max = texts.length; i < max; i++) {
|
||||
if (
|
||||
/^<(?:AnimationMapNameSetting|アニメーションマップネーム設定)>/.exec(
|
||||
texts[i]
|
||||
)
|
||||
) {
|
||||
for (var j = i; j < max; j++) {
|
||||
if (
|
||||
/^<\/(?:AnimationMapNameSetting|アニメーションマップネーム設定)>/.exec(
|
||||
texts[j]
|
||||
)
|
||||
) {
|
||||
i = j;
|
||||
break;
|
||||
} else {
|
||||
if (/(.+?):(.+)?/.exec(texts[j])) {
|
||||
var code = RegExp.$1;
|
||||
var value = RegExp.$2;
|
||||
switch (code) {
|
||||
case "size":
|
||||
params.size = Number(value);
|
||||
break;
|
||||
case "count":
|
||||
params.count = Number(value);
|
||||
break;
|
||||
case "ox":
|
||||
params.ox = Number(value);
|
||||
break;
|
||||
case "oy":
|
||||
params.oy = Number(value);
|
||||
break;
|
||||
case "mx":
|
||||
params.mx = Number(value);
|
||||
break;
|
||||
case "my":
|
||||
params.my = Number(value);
|
||||
break;
|
||||
case "pattern":
|
||||
params.pattern = value;
|
||||
break;
|
||||
case "color":
|
||||
params.color = value;
|
||||
break;
|
||||
case "picture":
|
||||
params.picture = value;
|
||||
break;
|
||||
case "text":
|
||||
params.text = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$gameSystem.setAmnParameters(amnParams);
|
||||
}
|
||||
}
|
||||
map._amsParams = params;
|
||||
return map._amsParams;
|
||||
};
|
||||
|
||||
DataManager.makeAmnParams = function (params, args) {
|
||||
var amnParams = {
|
||||
size: params.size,
|
||||
count: params.count,
|
||||
ox: params.ox,
|
||||
oy: params.oy,
|
||||
mx: params.mx,
|
||||
my: params.my,
|
||||
pattern: params.pattern,
|
||||
color: params.color,
|
||||
picture: params.picture,
|
||||
text: params.text,
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DataManager.amnMapParams = function (map) {
|
||||
if (!map) return false;
|
||||
if (map.note === undefined) return false;
|
||||
if (map._amsParams) { return map._amsParams }
|
||||
var texts = map.note.split('\n');
|
||||
var params = {};
|
||||
for (var i = 0, max = texts.length; i < max; i++) {
|
||||
if (/^<(?:AnimationMapNameSetting|アニメーションマップネーム設定)>/.exec(texts[i])) {
|
||||
for (var j = i; j < max; j++) {
|
||||
if (/^<\/(?:AnimationMapNameSetting|アニメーションマップネーム設定)>/.exec(texts[j])) {
|
||||
i = j;
|
||||
break;
|
||||
} else {
|
||||
if (/(.+?):(.+)?/.exec(texts[j])) {
|
||||
var code = RegExp.$1;
|
||||
var value = RegExp.$2;
|
||||
switch (code) {
|
||||
case 'size': params.size = Number(value); break;
|
||||
case 'count': params.count = Number(value); break;
|
||||
case 'ox': params.ox = Number(value); break;
|
||||
case 'oy': params.oy = Number(value); break;
|
||||
case 'mx': params.mx = Number(value); break;
|
||||
case 'my': params.my = Number(value); break;
|
||||
case 'pattern': params.pattern = value; break;
|
||||
case 'color': params.color = value; break;
|
||||
case 'picture': params.picture = value; break;
|
||||
case 'text': params.text = value; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
args.forEach(
|
||||
function (a) {
|
||||
if (/(.+?):(.+)?/.exec(a)) {
|
||||
var code = RegExp.$1;
|
||||
var value = RegExp.$2;
|
||||
switch (code) {
|
||||
case "size":
|
||||
amnParams.size = Number(value);
|
||||
break;
|
||||
case "count":
|
||||
amnParams.count = Number(value);
|
||||
break;
|
||||
case "ox":
|
||||
amnParams.ox = Number(value);
|
||||
break;
|
||||
case "oy":
|
||||
amnParams.oy = Number(value);
|
||||
break;
|
||||
case "mx":
|
||||
amnParams.mx = Number(value);
|
||||
break;
|
||||
case "my":
|
||||
amnParams.my = Number(value);
|
||||
break;
|
||||
case "pattern":
|
||||
amnParams.pattern = value;
|
||||
break;
|
||||
case "color":
|
||||
amnParams.color = value;
|
||||
break;
|
||||
case "picture":
|
||||
amnParams.picture = value;
|
||||
break;
|
||||
case "text":
|
||||
amnParams.text = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
map._amsParams = params;
|
||||
return map._amsParams;
|
||||
}.bind(this)
|
||||
);
|
||||
return amnParams;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Game_System.prototype.amnParameters = function () {
|
||||
if (!this._amnParameters) this.initAmnParameters();
|
||||
if (patternVariableId) {
|
||||
this._amnParameters.pattern = $gameVariables.value(patternVariableId);
|
||||
}
|
||||
var params = DataManager.amnMapParams($dataMap);
|
||||
var amnParams = {
|
||||
size: this._amnParameters.size,
|
||||
count: this._amnParameters.count,
|
||||
ox: this._amnParameters.ox,
|
||||
oy: this._amnParameters.oy,
|
||||
mx: this._amnParameters.mx,
|
||||
my: this._amnParameters.my,
|
||||
pattern: this._amnParameters.pattern,
|
||||
color: this._amnParameters.color,
|
||||
picture: this._amnParameters.picture,
|
||||
};
|
||||
for (var key in params) {
|
||||
amnParams[key] = params[key];
|
||||
}
|
||||
return amnParams;
|
||||
};
|
||||
|
||||
DataManager.makeAmnParams = function (params, args) {
|
||||
var amnParams = {
|
||||
size: params.size, count: params.count,
|
||||
ox: params.ox, oy: params.oy, mx: params.mx, my: params.my,
|
||||
pattern: params.pattern, color: params.color, picture: params.picture,
|
||||
text: params.text
|
||||
};
|
||||
args.forEach(function (a) {
|
||||
if (/(.+?):(.+)?/.exec(a)) {
|
||||
var code = RegExp.$1;
|
||||
var value = RegExp.$2;
|
||||
switch (code) {
|
||||
case 'size': amnParams.size = Number(value); break;
|
||||
case 'count': amnParams.count = Number(value); break;
|
||||
case 'ox': amnParams.ox = Number(value); break;
|
||||
case 'oy': amnParams.oy = Number(value); break;
|
||||
case 'mx': amnParams.mx = Number(value); break;
|
||||
case 'my': amnParams.my = Number(value); break;
|
||||
case 'pattern': amnParams.pattern = value; break;
|
||||
case 'color': amnParams.color = value; break;
|
||||
case 'picture': amnParams.picture = value; break;
|
||||
case 'text': amnParams.text = value; break;
|
||||
}
|
||||
}
|
||||
}.bind(this));
|
||||
return amnParams;
|
||||
Game_System.prototype.initAmnParameters = function () {
|
||||
this._amnParameters = {
|
||||
size: animeFontSize,
|
||||
count: animeCount,
|
||||
ox: animeOriginalX,
|
||||
oy: animeOriginalY,
|
||||
mx: animeMoveX,
|
||||
my: animeMoveY,
|
||||
pattern: animePattern,
|
||||
color: fillRectColor,
|
||||
picture: backPicture,
|
||||
text: "",
|
||||
};
|
||||
if (patternVariableId) {
|
||||
var pattern = this._amnParameters.pattern;
|
||||
if (pattern === "Normal" || pattern === 0)
|
||||
$gameVariables._data[patternVariableId] = 0;
|
||||
if (pattern === "Stretch" || pattern === -1)
|
||||
$gameVariables._data[patternVariableId] = -1;
|
||||
if (pattern === "GrowUp" || pattern === -2)
|
||||
$gameVariables._data[patternVariableId] = -2;
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
Game_System.prototype.setAmnParameters = function (params) {
|
||||
this._amnParameters = params;
|
||||
};
|
||||
|
||||
Game_System.prototype.amnParameters = function () {
|
||||
if (!this._amnParameters) this.initAmnParameters();
|
||||
if (patternVariableId) {
|
||||
this._amnParameters.pattern = $gameVariables.value(patternVariableId);
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var __GInterpreter_update = Game_Interpreter.prototype.update;
|
||||
Game_Interpreter.prototype.update = function () {
|
||||
__GInterpreter_update.call(this);
|
||||
if (this._refreshAmn) {
|
||||
if (ImageManager.isReady()) {
|
||||
this.refreshMapName(this._amnParams);
|
||||
this._refreshAmn = false;
|
||||
this._amnParams = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.animationMapName = function (params) {
|
||||
if (params.picture) {
|
||||
ImageManager.loadPicture(params.picture);
|
||||
this._refreshAmn = true;
|
||||
this._amnParams = params;
|
||||
} else {
|
||||
this.refreshMapName(params);
|
||||
}
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.refreshMapName = function (params) {
|
||||
console.log(params);
|
||||
var text = (params.text ? params.text : $gameMap.displayName()) || "";
|
||||
var array = CommonPopupManager.window()
|
||||
.convertEscapeCharacters(text)
|
||||
.split("");
|
||||
var a2 = [];
|
||||
var flag = false;
|
||||
var cflag = false;
|
||||
var setIndex = -1;
|
||||
var count = 0;
|
||||
var s1 = "";
|
||||
var aX = 0;
|
||||
var aY = 0;
|
||||
if (params.pattern === "GrowUp" || params.pattern == -2) aY = 1.0;
|
||||
var pattern = params.pattern;
|
||||
var afs = params.size + 8;
|
||||
var supY = 0;
|
||||
if (params.pattern === "GrowUp" || params.pattern == -2) supY = afs;
|
||||
for (var i = 0, max = array.length; i < max; i++) {
|
||||
if (array[i] === "\x1b") {
|
||||
var cnt = a2.length;
|
||||
a2[cnt] = array[i];
|
||||
for (var j = i; j < max; j++) {
|
||||
if (array[j] === "]") {
|
||||
a2[cnt] += "]";
|
||||
//a2[i] = a2[i].replace(/\x1b/,'\\');
|
||||
if (a2[cnt].match(/\x1bI\[\d+\]/i)) count++;
|
||||
i = j;
|
||||
break;
|
||||
} else {
|
||||
a2[cnt] += array[j];
|
||||
}
|
||||
}
|
||||
var params = DataManager.amnMapParams($dataMap);
|
||||
var amnParams = {
|
||||
size: this._amnParameters.size, count: this._amnParameters.count,
|
||||
ox: this._amnParameters.ox, oy: this._amnParameters.oy,
|
||||
mx: this._amnParameters.mx, my: this._amnParameters.my,
|
||||
pattern: this._amnParameters.pattern, color: this._amnParameters.color,
|
||||
picture: this._amnParameters.picture
|
||||
};
|
||||
for (var key in params) { amnParams[key] = params[key] }
|
||||
return amnParams;
|
||||
};
|
||||
} else {
|
||||
a2.push(array[i]);
|
||||
s1 += array[i];
|
||||
}
|
||||
}
|
||||
|
||||
Game_System.prototype.initAmnParameters = function () {
|
||||
this._amnParameters = {
|
||||
size: animeFontSize, count: animeCount, ox: animeOriginalX,
|
||||
oy: animeOriginalY, mx: animeMoveX, my: animeMoveY,
|
||||
pattern: animePattern, color: fillRectColor, picture: backPicture,
|
||||
text: ''
|
||||
};
|
||||
if (patternVariableId) {
|
||||
var pattern = this._amnParameters.pattern;
|
||||
if (pattern === 'Normal' || pattern === 0) $gameVariables._data[patternVariableId] = 0;
|
||||
if (pattern === 'Stretch' || pattern === -1) $gameVariables._data[patternVariableId] = -1;
|
||||
if (pattern === 'GrowUp' || pattern === -2) $gameVariables._data[patternVariableId] = -2;
|
||||
}
|
||||
};
|
||||
CommonPopupManager.window().resetFontSettings();
|
||||
var fs = params.size;
|
||||
var fontStr = "\\FS[" + fs + "]";
|
||||
CommonPopupManager.window().drawTextEx(fontStr, 0, 0);
|
||||
var textSize = CommonPopupManager.window().textWidth(s1) + params.size;
|
||||
textSize += params.size * 1.14 * count;
|
||||
var bitmap = null;
|
||||
var bw = textSize;
|
||||
var bh = fs;
|
||||
if (params.picture) {
|
||||
bitmap = ImageManager.loadPicture(params.picture);
|
||||
var arg = CommonPopupManager.setPopup("");
|
||||
bw = bitmap.width;
|
||||
bh = bitmap.height;
|
||||
arg.x = params.ox; // + textSize / 2 - bitmap.width / 2;
|
||||
arg.y = params.oy + bitmap.height * aY;
|
||||
arg.moveX = params.mx;
|
||||
arg.moveY = params.my;
|
||||
arg.bitmap = bitmap;
|
||||
arg.count = params.count;
|
||||
arg.extend = [0, arg.count]; //[arg.count * 0.2, arg.count * 0.8];
|
||||
arg.fixed = false;
|
||||
arg.anchorX = aX;
|
||||
arg.anchorY = aY;
|
||||
arg.pattern = pattern;
|
||||
arg.tag = "AnimationMapName";
|
||||
supY += bitmap.height / 2 - afs / 2;
|
||||
} else {
|
||||
bitmap = new Bitmap(textSize, params.size + 8);
|
||||
|
||||
Game_System.prototype.setAmnParameters = function (params) {
|
||||
this._amnParameters = params;
|
||||
};
|
||||
var xx = 0;
|
||||
bitmap.gradientFillRect(
|
||||
xx,
|
||||
0,
|
||||
bitmap.width / 3,
|
||||
bitmap.height,
|
||||
"rgba(0,0,0,0)",
|
||||
params.color
|
||||
);
|
||||
xx += bitmap.width / 3;
|
||||
bitmap.fillRect(xx, 0, bitmap.width / 3, bitmap.height, params.color);
|
||||
xx += bitmap.width / 3;
|
||||
bitmap.gradientFillRect(
|
||||
xx,
|
||||
0,
|
||||
bitmap.width / 3,
|
||||
bitmap.height,
|
||||
params.color,
|
||||
"rgba(0,0,0,0)"
|
||||
);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
var arg = CommonPopupManager.setPopup("");
|
||||
arg.x = params.ox;
|
||||
arg.y = params.oy + supY;
|
||||
arg.moveX = params.mx;
|
||||
arg.moveY = params.my;
|
||||
arg.bitmap = bitmap;
|
||||
arg.count = params.count;
|
||||
arg.extend = [0, arg.count]; //[arg.count * 0.2, arg.count * 0.8];
|
||||
arg.fixed = false;
|
||||
arg.anchorX = aX;
|
||||
arg.anchorY = aY;
|
||||
arg.pattern = pattern;
|
||||
arg.tag = "AnimationMapName";
|
||||
}
|
||||
if (arg) CommonPopupManager._tempCommonSprites.setNullPos(arg);
|
||||
|
||||
var __GInterpreter_update = Game_Interpreter.prototype.update;
|
||||
Game_Interpreter.prototype.update = function () {
|
||||
__GInterpreter_update.call(this);
|
||||
if (this._refreshAmn) {
|
||||
if (ImageManager.isReady()) {
|
||||
this.refreshMapName(this._amnParams);
|
||||
this._refreshAmn = false;
|
||||
this._amnParams = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.animationMapName = function (params) {
|
||||
if (params.picture) {
|
||||
ImageManager.loadPicture(params.picture);
|
||||
this._refreshAmn = true;
|
||||
this._amnParams = params;
|
||||
} else {
|
||||
this.refreshMapName(params);
|
||||
}
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.refreshMapName = function (params) {
|
||||
console.log(params)
|
||||
var text = (params.text ? params.text : $gameMap.displayName()) || '';
|
||||
var array = CommonPopupManager.window().convertEscapeCharacters(text).split("");
|
||||
var a2 = [];
|
||||
var flag = false;
|
||||
var cflag = false;
|
||||
var setIndex = -1;
|
||||
var count = 0;
|
||||
var s1 = '';
|
||||
var aX = 0;
|
||||
var aY = 0;
|
||||
if (params.pattern === 'GrowUp' || params.pattern == -2) aY = 1.0;
|
||||
var pattern = params.pattern;
|
||||
var afs = params.size + 8;
|
||||
var supY = 0;
|
||||
if (params.pattern === 'GrowUp' || params.pattern == -2) supY = afs;
|
||||
for (var i = 0, max = array.length; i < max; i++) {
|
||||
if (array[i] === '\x1b') {
|
||||
var cnt = a2.length;
|
||||
a2[cnt] = array[i];
|
||||
for (var j = i; j < max; j++) {
|
||||
if (array[j] === ']') {
|
||||
a2[cnt] += ']';
|
||||
//a2[i] = a2[i].replace(/\x1b/,'\\');
|
||||
if (a2[cnt].match(/\x1bI\[\d+\]/i)) count++;
|
||||
i = j;
|
||||
break;
|
||||
} else {
|
||||
a2[cnt] += array[j];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
a2.push(array[i]);
|
||||
s1 += array[i];
|
||||
}
|
||||
}
|
||||
|
||||
CommonPopupManager.window().resetFontSettings();
|
||||
var fs = params.size;
|
||||
var fontStr = '\\FS[' + fs + ']';
|
||||
CommonPopupManager.window().drawTextEx(fontStr, 0, 0);
|
||||
var textSize = CommonPopupManager.window().textWidth(s1) + params.size;
|
||||
textSize += (params.size * 1.14) * count;
|
||||
var bitmap = null;
|
||||
var bw = textSize;
|
||||
var bh = fs;
|
||||
if (params.picture) {
|
||||
bitmap = ImageManager.loadPicture(params.picture);
|
||||
var arg = CommonPopupManager.setPopup('');
|
||||
bw = bitmap.width;
|
||||
bh = bitmap.height;
|
||||
arg.x = params.ox// + textSize / 2 - bitmap.width / 2;
|
||||
arg.y = params.oy + bitmap.height * aY;
|
||||
arg.moveX = params.mx;
|
||||
arg.moveY = params.my;
|
||||
arg.bitmap = bitmap;
|
||||
arg.count = params.count;
|
||||
arg.extend = [0, arg.count]//[arg.count * 0.2, arg.count * 0.8];
|
||||
arg.fixed = false;
|
||||
arg.anchorX = aX;
|
||||
arg.anchorY = aY;
|
||||
arg.pattern = pattern;
|
||||
arg.tag = 'AnimationMapName';
|
||||
supY += bitmap.height / 2 - afs / 2;
|
||||
} else {
|
||||
bitmap = new Bitmap(textSize, params.size + 8);
|
||||
|
||||
var xx = 0;
|
||||
bitmap.gradientFillRect(xx, 0, bitmap.width / 3, bitmap.height, 'rgba(0,0,0,0)', params.color);
|
||||
xx += bitmap.width / 3;
|
||||
bitmap.fillRect(xx, 0, bitmap.width / 3, bitmap.height, params.color);
|
||||
xx += bitmap.width / 3;
|
||||
bitmap.gradientFillRect(xx, 0, bitmap.width / 3, bitmap.height, params.color, 'rgba(0,0,0,0)');
|
||||
|
||||
var arg = CommonPopupManager.setPopup('');
|
||||
arg.x = params.ox;
|
||||
arg.y = params.oy + supY;
|
||||
arg.moveX = params.mx;
|
||||
arg.moveY = params.my;
|
||||
arg.bitmap = bitmap;
|
||||
arg.count = params.count;
|
||||
arg.extend = [0, arg.count]//[arg.count * 0.2, arg.count * 0.8];
|
||||
arg.fixed = false;
|
||||
arg.anchorX = aX;
|
||||
arg.anchorY = aY;
|
||||
arg.pattern = pattern;
|
||||
arg.tag = 'AnimationMapName';
|
||||
}
|
||||
if (arg) CommonPopupManager._tempCommonSprites.setNullPos(arg);
|
||||
|
||||
var s = Math.floor((params.count * 0.4) / s1.length);
|
||||
var n = 0;
|
||||
var setColor = '';
|
||||
var ssupY = (pattern == -2 || pattern === 'GrowUp') ? 4 : 0;
|
||||
var bfs = fs;
|
||||
var cnt = 0;
|
||||
var s = Math.floor((params.count * 0.4) / s1.length);
|
||||
var n = 0;
|
||||
var setColor = "";
|
||||
var ssupY = pattern == -2 || pattern === "GrowUp" ? 4 : 0;
|
||||
var bfs = fs;
|
||||
var cnt = 0;
|
||||
CommonPopupManager.window().contents.fontSize = fs;
|
||||
for (var i = 0; i < a2.length; i++) {
|
||||
if (a2[i].match(/\x1bI\[(\d+)\]/i)) a2[i] = "\\I[" + RegExp.$1 + "]";
|
||||
if (a2[i].match(/\x1bC\[(\d+)\]/i)) {
|
||||
setColor = "\\C[" + RegExp.$1 + "]";
|
||||
} else if (a2[i].match(/\x1bFS\[(\d+)\]/i)) {
|
||||
fs = Number(RegExp.$1);
|
||||
fontStr = "\\FS[" + fs + "]";
|
||||
} else {
|
||||
var fsy = (bfs - fs) / 2;
|
||||
if (fsy > 0 && ssupY > 0) fsy -= 8;
|
||||
var arg = CommonPopupManager.setPopup("");
|
||||
var bitmap = new Bitmap(fs + 12, fs + 12);
|
||||
var tx = fontStr + setColor + a2[i];
|
||||
CommonPopupManager.window().contents.fontSize = fs;
|
||||
for (var i = 0; i < a2.length; i++) {
|
||||
if (a2[i].match(/\x1bI\[(\d+)\]/i)) a2[i] = '\\I[' + RegExp.$1 + ']';
|
||||
if (a2[i].match(/\x1bC\[(\d+)\]/i)) {
|
||||
setColor = '\\C[' + RegExp.$1 + ']';
|
||||
} else if (a2[i].match(/\x1bFS\[(\d+)\]/i)) {
|
||||
fs = Number(RegExp.$1);
|
||||
fontStr = '\\FS[' + fs + ']';
|
||||
} else {
|
||||
var fsy = (bfs - fs) / 2;
|
||||
if (fsy > 0 && ssupY > 0) fsy -= 8;
|
||||
var arg = CommonPopupManager.setPopup('');
|
||||
var bitmap = new Bitmap(fs + 12, fs + 12);
|
||||
var tx = fontStr + setColor + a2[i];
|
||||
CommonPopupManager.window().contents.fontSize = fs;
|
||||
var tw = CommonPopupManager.window().textWidth(a2[i]);
|
||||
CommonPopupManager.window().contents = bitmap;
|
||||
CommonPopupManager.window().drawTextEx(tx, 4, 0);
|
||||
arg.bitmap = bitmap;
|
||||
arg.x = params.ox + n + (bw - textSize) / 2 + 10;
|
||||
arg.y = params.oy + supY + ssupY + fsy;
|
||||
arg.moveX = params.mx;
|
||||
arg.moveY = params.my;
|
||||
arg.anchorX = aX;
|
||||
arg.anchorY = aY;
|
||||
arg.delay = s * (cnt + 1);
|
||||
arg.count = Math.floor((params.count - 20) - (cnt * s));
|
||||
arg.extend = [0, arg.count]//[arg.count*0.2,arg.count*0.8];
|
||||
arg.fixed = false;
|
||||
arg.pattern = pattern;
|
||||
arg.tag = 'AnimationMapName';
|
||||
if (a2[i].match(/\\I\[\d+\]/i)) {
|
||||
n += 34;
|
||||
} else {
|
||||
n += tw;
|
||||
}
|
||||
CommonPopupManager._tempCommonSprites.setNullPos(arg);
|
||||
cnt++;
|
||||
}
|
||||
var tw = CommonPopupManager.window().textWidth(a2[i]);
|
||||
CommonPopupManager.window().contents = bitmap;
|
||||
CommonPopupManager.window().drawTextEx(tx, 4, 0);
|
||||
arg.bitmap = bitmap;
|
||||
arg.x = params.ox + n + (bw - textSize) / 2 + 10;
|
||||
arg.y = params.oy + supY + ssupY + fsy;
|
||||
arg.moveX = params.mx;
|
||||
arg.moveY = params.my;
|
||||
arg.anchorX = aX;
|
||||
arg.anchorY = aY;
|
||||
arg.delay = s * (cnt + 1);
|
||||
arg.count = Math.floor(params.count - 20 - cnt * s);
|
||||
arg.extend = [0, arg.count]; //[arg.count*0.2,arg.count*0.8];
|
||||
arg.fixed = false;
|
||||
arg.pattern = pattern;
|
||||
arg.tag = "AnimationMapName";
|
||||
if (a2[i].match(/\\I\[\d+\]/i)) {
|
||||
n += 34;
|
||||
} else {
|
||||
n += tw;
|
||||
}
|
||||
};
|
||||
CommonPopupManager._tempCommonSprites.setNullPos(arg);
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.showAmn = function (args) {
|
||||
CommonPopupManager.clearPopup('AnimationMapName');
|
||||
var amnParams = DataManager.makeAmnParams($gameSystem.amnParameters(), args);
|
||||
this.animationMapName(amnParams);
|
||||
};
|
||||
Game_Interpreter.prototype.showAmn = function (args) {
|
||||
CommonPopupManager.clearPopup("AnimationMapName");
|
||||
var amnParams = DataManager.makeAmnParams(
|
||||
$gameSystem.amnParameters(),
|
||||
args
|
||||
);
|
||||
this.animationMapName(amnParams);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Game_Map.prototype.showMapName = function () {
|
||||
if (this.displayName() !== '') {
|
||||
this._interpreter.animationMapName($gameSystem.amnParameters());
|
||||
}
|
||||
};
|
||||
Game_Map.prototype.showMapName = function () {
|
||||
if (this.displayName() !== "") {
|
||||
this._interpreter.animationMapName($gameSystem.amnParameters());
|
||||
}
|
||||
};
|
||||
|
||||
Game_Map.prototype.displayRegionAmn = function (params) {
|
||||
if (!this.isNameDisplayEnabled()) return;
|
||||
var args = params.split(' ');
|
||||
args[0] = 'text:' + args[0];
|
||||
this._interpreter.showAmn(args);
|
||||
};
|
||||
Game_Map.prototype.displayRegionAmn = function (params) {
|
||||
if (!this.isNameDisplayEnabled()) return;
|
||||
var args = params.split(" ");
|
||||
args[0] = "text:" + args[0];
|
||||
this._interpreter.showAmn(args);
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var _animeMN_GPlayer_performTransfer = Game_Player.prototype.performTransfer;
|
||||
Game_Player.prototype.performTransfer = function () {
|
||||
_animeMN_GPlayer_performTransfer.call(this);
|
||||
if ($gameMap.isNameDisplayEnabled()) $gameMap.showMapName();
|
||||
$gameTemp._regionAmnArray = null;
|
||||
$gameTemp._lastRegionId = null;
|
||||
};
|
||||
var _animeMN_GPlayer_performTransfer = Game_Player.prototype.performTransfer;
|
||||
Game_Player.prototype.performTransfer = function () {
|
||||
_animeMN_GPlayer_performTransfer.call(this);
|
||||
if ($gameMap.isNameDisplayEnabled()) $gameMap.showMapName();
|
||||
$gameTemp._regionAmnArray = null;
|
||||
$gameTemp._lastRegionId = null;
|
||||
};
|
||||
|
||||
var __GPlayer_update = Game_Player.prototype.update;
|
||||
Game_Player.prototype.update = function (sceneActive) {
|
||||
__GPlayer_update.call(this, sceneActive);
|
||||
var ri = this.regionId();
|
||||
if (this.regionAmnArray(ri) && ri !== $gameTemp._lastRegionId) {
|
||||
$gameTemp._lastRegionId = ri;
|
||||
if ($dataMap.meta['RegionName' + ri]) {
|
||||
$gameMap.displayRegionAmn($dataMap.meta['RegionName' + ri]);
|
||||
} else if ($dataMap.meta['リージョンネーム' + ri]) {
|
||||
$gameMap.displayRegionAmn($dataMap.meta['リージョンネーム' + ri]);
|
||||
}
|
||||
}
|
||||
};
|
||||
var __GPlayer_update = Game_Player.prototype.update;
|
||||
Game_Player.prototype.update = function (sceneActive) {
|
||||
__GPlayer_update.call(this, sceneActive);
|
||||
var ri = this.regionId();
|
||||
if (this.regionAmnArray(ri) && ri !== $gameTemp._lastRegionId) {
|
||||
$gameTemp._lastRegionId = ri;
|
||||
if ($dataMap.meta["RegionName" + ri]) {
|
||||
$gameMap.displayRegionAmn($dataMap.meta["RegionName" + ri]);
|
||||
} else if ($dataMap.meta["リージョンネーム" + ri]) {
|
||||
$gameMap.displayRegionAmn($dataMap.meta["リージョンネーム" + ri]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Game_Player.prototype.regionAmnArray = function (ri) {
|
||||
if ($gameTemp._regionAmnArray) return $gameTemp._regionAmnArray[ri];
|
||||
$gameTemp._regionAmnArray = [];
|
||||
for (var i = 1, max = 255; i < max; i++) {
|
||||
if (!$dataMap.meta) break;
|
||||
if ($dataMap.meta['RegionName' + i]) $gameTemp._regionAmnArray[i] = true;
|
||||
if ($dataMap.meta['リージョンネーム' + i]) $gameTemp._regionAmnArray[i] = true;
|
||||
}
|
||||
return $gameTemp._regionAmnArray[ri];
|
||||
};
|
||||
Game_Player.prototype.regionAmnArray = function (ri) {
|
||||
if ($gameTemp._regionAmnArray) return $gameTemp._regionAmnArray[ri];
|
||||
$gameTemp._regionAmnArray = [];
|
||||
for (var i = 1, max = 255; i < max; i++) {
|
||||
if (!$dataMap.meta) break;
|
||||
if ($dataMap.meta["RegionName" + i]) $gameTemp._regionAmnArray[i] = true;
|
||||
if ($dataMap.meta["リージョンネーム" + i])
|
||||
$gameTemp._regionAmnArray[i] = true;
|
||||
}
|
||||
return $gameTemp._regionAmnArray[ri];
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// 再定義 何もしなくする
|
||||
Window_MapName.prototype.open = function () {
|
||||
//this.refresh();
|
||||
this._showCount = 0;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
// 再定義 何もしなくする
|
||||
Window_MapName.prototype.open = function () {
|
||||
//this.refresh();
|
||||
this._showCount = 0;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -148,303 +148,322 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
var localExtraStageIndex = -1;
|
||||
var localExtraStageIndex = -1;
|
||||
|
||||
var createPluginParameter = function (pluginName) {
|
||||
var paramReplacer = function (key, value) {
|
||||
if (value === 'null') {
|
||||
return value;
|
||||
}
|
||||
if (value[0] === '"' && value[value.length - 1] === '"') {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
} catch (e) {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
var parameter = JSON.parse(JSON.stringify(PluginManager.parameters(pluginName), paramReplacer));
|
||||
PluginManager.setParameters(pluginName, parameter);
|
||||
return parameter;
|
||||
var createPluginParameter = function (pluginName) {
|
||||
var paramReplacer = function (key, value) {
|
||||
if (value === "null") {
|
||||
return value;
|
||||
}
|
||||
if (value[0] === '"' && value[value.length - 1] === '"') {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
} catch (e) {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
var parameters = createPluginParameter('AnotherNewGame');
|
||||
parameters.anotherDataList = parameters.anotherDataList || [];
|
||||
var parameter = JSON.parse(
|
||||
JSON.stringify(PluginManager.parameters(pluginName), paramReplacer)
|
||||
);
|
||||
PluginManager.setParameters(pluginName, parameter);
|
||||
return parameter;
|
||||
};
|
||||
var parameters = createPluginParameter("AnotherNewGame");
|
||||
parameters.anotherDataList = parameters.anotherDataList || [];
|
||||
|
||||
/**
|
||||
* Convert escape characters.(require any window object)
|
||||
* @param text Target text
|
||||
* @returns {String} Converted text
|
||||
*/
|
||||
var convertEscapeCharacters = function (text) {
|
||||
var windowLayer = SceneManager._scene._windowLayer;
|
||||
return windowLayer ? windowLayer.children[0].convertEscapeCharacters(text.toString()) : text;
|
||||
};
|
||||
/**
|
||||
* Convert escape characters.(require any window object)
|
||||
* @param text Target text
|
||||
* @returns {String} Converted text
|
||||
*/
|
||||
var convertEscapeCharacters = function (text) {
|
||||
var windowLayer = SceneManager._scene._windowLayer;
|
||||
return windowLayer
|
||||
? windowLayer.children[0].convertEscapeCharacters(text.toString())
|
||||
: text;
|
||||
};
|
||||
|
||||
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.call(this, command, args);
|
||||
var index = args[0] ? parseInt(convertEscapeCharacters(args[0])) - 1 : 0;
|
||||
switch (command.toUpperCase()) {
|
||||
case 'ANG_VISIBLE':
|
||||
ANGSettingManager.setVisible(index, true);
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case 'ANG_ENABLE':
|
||||
ANGSettingManager.setEnable(index, true);
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case 'ANG_HIDDEN':
|
||||
ANGSettingManager.setVisible(index, false);
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case 'ANG_DISABLE':
|
||||
ANGSettingManager.setEnable(index, false);
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case 'ANG_NEWGAME_HIDDEN':
|
||||
ANGSettingManager.newGameHidden = true;
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case 'ANG_NEWGAME_VISIBLE':
|
||||
ANGSettingManager.newGameHidden = false;
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_Map
|
||||
// アナザーニューゲームのロード時に実行していたイベントを中断します。
|
||||
//=============================================================================
|
||||
Game_Map.prototype.abortInterpreter = function () {
|
||||
if (this.isEventRunning()) {
|
||||
this._interpreter.command115();
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Scene_Title
|
||||
// アナザーニューゲームの選択時の処理を追加定義します。
|
||||
//=============================================================================
|
||||
var _Scene_Title_create = Scene_Title.prototype.create;
|
||||
Scene_Title.prototype.create = function () {
|
||||
ANGSettingManager.loadData();
|
||||
_Scene_Title_create.call(this);
|
||||
};
|
||||
|
||||
var _Scene_Title_commandContinue = Scene_Title.prototype.commandContinue;
|
||||
Scene_Title.prototype.commandContinue = function () {
|
||||
_Scene_Title_commandContinue.call(this);
|
||||
localExtraStageIndex = -1;
|
||||
};
|
||||
|
||||
var _Scene_Title_commandNewGameSecond = Scene_Title.prototype.commandNewGameSecond;
|
||||
Scene_Title.prototype.commandNewGameSecond = function (index) {
|
||||
if (_Scene_Title_commandNewGameSecond) {
|
||||
_Scene_Title_commandNewGameSecond.apply(this, arguments);
|
||||
}
|
||||
var command = parameters.anotherDataList[index];
|
||||
if (command.noFadeout) {
|
||||
this._noFadeout = true;
|
||||
}
|
||||
if (!command.fileLoad) {
|
||||
var preMapId = $dataSystem.startMapId;
|
||||
var preStartX = $dataSystem.startX;
|
||||
var preStartY = $dataSystem.startY;
|
||||
var newMapId = command.mapId;
|
||||
if (newMapId > 0) {
|
||||
$dataSystem.startMapId = newMapId;
|
||||
$dataSystem.startX = command.mapX || 1;
|
||||
$dataSystem.startY = command.mapY || 1;
|
||||
}
|
||||
this.commandNewGame();
|
||||
$dataSystem.startMapId = preMapId;
|
||||
$dataSystem.startX = preStartX;
|
||||
$dataSystem.startY = preStartY;
|
||||
var switchId = command.switchId;
|
||||
if (switchId > 0) {
|
||||
$gameSwitches.setValue(switchId, true);
|
||||
}
|
||||
} else {
|
||||
this.commandContinue();
|
||||
localExtraStageIndex = index;
|
||||
}
|
||||
};
|
||||
|
||||
var _Scene_Title_createCommandWindow = Scene_Title.prototype.createCommandWindow;
|
||||
Scene_Title.prototype.createCommandWindow = function () {
|
||||
_Scene_Title_createCommandWindow.call(this);
|
||||
parameters.anotherDataList.forEach(function (command, index) {
|
||||
if (ANGSettingManager.isVisible(index)) {
|
||||
this._commandWindow.setHandler('nameGame2_' + index, this.commandNewGameSecond.bind(this, index));
|
||||
}
|
||||
}, this);
|
||||
};
|
||||
|
||||
Scene_Title.prototype.fadeOutAll = function () {
|
||||
if (!this._noFadeout) {
|
||||
Scene_Base.prototype.fadeOutAll.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Scene_Load
|
||||
// ロード成功時にアナザーポイントに移動します。
|
||||
//=============================================================================
|
||||
var _Scene_Load_onLoadSuccess = Scene_Load.prototype.onLoadSuccess;
|
||||
Scene_Load.prototype.onLoadSuccess = function () {
|
||||
_Scene_Load_onLoadSuccess.call(this);
|
||||
if (localExtraStageIndex >= 0) {
|
||||
var command = parameters.anotherDataList[localExtraStageIndex];
|
||||
var mapId = command.mapId;
|
||||
if (mapId > 0) {
|
||||
var x = command.mapX || 1;
|
||||
var y = command.mapY || 1;
|
||||
$gamePlayer.reserveTransfer(mapId, x, y);
|
||||
}
|
||||
$gameMap.abortInterpreter();
|
||||
DataManager.selectSavefileForNewGame();
|
||||
var switchId = command.switchId;
|
||||
if (switchId > 0) {
|
||||
$gameSwitches.setValue(switchId, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Window_TitleCommand
|
||||
// アナザーニューゲームの選択肢を追加定義します。
|
||||
//=============================================================================
|
||||
var _Window_TitleCommand_makeCommandList = Window_TitleCommand.prototype.makeCommandList;
|
||||
Window_TitleCommand.prototype.makeCommandList = function () {
|
||||
_Window_TitleCommand_makeCommandList.call(this);
|
||||
parameters.anotherDataList.forEach(function (command, index) {
|
||||
if (ANGSettingManager.isVisible(index)) {
|
||||
this.makeAnotherNewGameCommand(command, index);
|
||||
}
|
||||
}, this);
|
||||
if (ANGSettingManager.newGameHidden) {
|
||||
this.eraseCommandNewGame();
|
||||
}
|
||||
};
|
||||
|
||||
Window_TitleCommand.prototype.makeAnotherNewGameCommand = function (command, index) {
|
||||
this.addCommand(command.name, 'nameGame2_' + index, ANGSettingManager.isEnable(index));
|
||||
var addPosition = command.addPosition;
|
||||
if (addPosition > 0) {
|
||||
var anotherCommand = this._list.pop();
|
||||
this._list.splice(addPosition - 1, 0, anotherCommand);
|
||||
}
|
||||
};
|
||||
|
||||
Window_TitleCommand.prototype.eraseCommandNewGame = function () {
|
||||
this._list = this._list.filter(function (command) {
|
||||
return command.symbol !== 'newGame';
|
||||
});
|
||||
};
|
||||
|
||||
var _Window_TitleCommand_updatePlacement = Window_TitleCommand.prototype.updatePlacement;
|
||||
Window_TitleCommand.prototype.updatePlacement = function () {
|
||||
_Window_TitleCommand_updatePlacement.call(this);
|
||||
var addSize = this._list.length - 3;
|
||||
if (addSize > 0) {
|
||||
this.y += addSize * this.itemHeight() / 2;
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// ANGManager
|
||||
// アナザーニューゲームの設定ファイルのセーブとロードを定義します。
|
||||
//=============================================================================
|
||||
function ANGSettingManager() {
|
||||
throw new Error('This is a static class');
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.call(this, command, args);
|
||||
var index = args[0] ? parseInt(convertEscapeCharacters(args[0])) - 1 : 0;
|
||||
switch (command.toUpperCase()) {
|
||||
case "ANG_VISIBLE":
|
||||
ANGSettingManager.setVisible(index, true);
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case "ANG_ENABLE":
|
||||
ANGSettingManager.setEnable(index, true);
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case "ANG_HIDDEN":
|
||||
ANGSettingManager.setVisible(index, false);
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case "ANG_DISABLE":
|
||||
ANGSettingManager.setEnable(index, false);
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case "ANG_NEWGAME_HIDDEN":
|
||||
ANGSettingManager.newGameHidden = true;
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
case "ANG_NEWGAME_VISIBLE":
|
||||
ANGSettingManager.newGameHidden = false;
|
||||
ANGSettingManager.save();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager._fileId = -1001;
|
||||
//=============================================================================
|
||||
// Game_Map
|
||||
// アナザーニューゲームのロード時に実行していたイベントを中断します。
|
||||
//=============================================================================
|
||||
Game_Map.prototype.abortInterpreter = function () {
|
||||
if (this.isEventRunning()) {
|
||||
this._interpreter.command115();
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager._visible = [];
|
||||
ANGSettingManager._enable = [];
|
||||
ANGSettingManager.newGameHidden = false;
|
||||
//=============================================================================
|
||||
// Scene_Title
|
||||
// アナザーニューゲームの選択時の処理を追加定義します。
|
||||
//=============================================================================
|
||||
var _Scene_Title_create = Scene_Title.prototype.create;
|
||||
Scene_Title.prototype.create = function () {
|
||||
ANGSettingManager.loadData();
|
||||
_Scene_Title_create.call(this);
|
||||
};
|
||||
|
||||
ANGSettingManager.make = function () {
|
||||
var info = {};
|
||||
info.visible = this._visible;
|
||||
info.enable = this._enable;
|
||||
info.newGameHidden = this.newGameHidden;
|
||||
return info;
|
||||
};
|
||||
var _Scene_Title_commandContinue = Scene_Title.prototype.commandContinue;
|
||||
Scene_Title.prototype.commandContinue = function () {
|
||||
_Scene_Title_commandContinue.call(this);
|
||||
localExtraStageIndex = -1;
|
||||
};
|
||||
|
||||
ANGSettingManager.isVisible = function (index) {
|
||||
if (this._visible[index] !== undefined) {
|
||||
return this._visible[index];
|
||||
} else {
|
||||
return !parameters.anotherDataList[index].hidden;
|
||||
}
|
||||
};
|
||||
var _Scene_Title_commandNewGameSecond =
|
||||
Scene_Title.prototype.commandNewGameSecond;
|
||||
Scene_Title.prototype.commandNewGameSecond = function (index) {
|
||||
if (_Scene_Title_commandNewGameSecond) {
|
||||
_Scene_Title_commandNewGameSecond.apply(this, arguments);
|
||||
}
|
||||
var command = parameters.anotherDataList[index];
|
||||
if (command.noFadeout) {
|
||||
this._noFadeout = true;
|
||||
}
|
||||
if (!command.fileLoad) {
|
||||
var preMapId = $dataSystem.startMapId;
|
||||
var preStartX = $dataSystem.startX;
|
||||
var preStartY = $dataSystem.startY;
|
||||
var newMapId = command.mapId;
|
||||
if (newMapId > 0) {
|
||||
$dataSystem.startMapId = newMapId;
|
||||
$dataSystem.startX = command.mapX || 1;
|
||||
$dataSystem.startY = command.mapY || 1;
|
||||
}
|
||||
this.commandNewGame();
|
||||
$dataSystem.startMapId = preMapId;
|
||||
$dataSystem.startX = preStartX;
|
||||
$dataSystem.startY = preStartY;
|
||||
var switchId = command.switchId;
|
||||
if (switchId > 0) {
|
||||
$gameSwitches.setValue(switchId, true);
|
||||
}
|
||||
} else {
|
||||
this.commandContinue();
|
||||
localExtraStageIndex = index;
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager.setVisible = function (index, value) {
|
||||
this._visible[index] = value;
|
||||
};
|
||||
var _Scene_Title_createCommandWindow =
|
||||
Scene_Title.prototype.createCommandWindow;
|
||||
Scene_Title.prototype.createCommandWindow = function () {
|
||||
_Scene_Title_createCommandWindow.call(this);
|
||||
parameters.anotherDataList.forEach(function (command, index) {
|
||||
if (ANGSettingManager.isVisible(index)) {
|
||||
this._commandWindow.setHandler(
|
||||
"nameGame2_" + index,
|
||||
this.commandNewGameSecond.bind(this, index)
|
||||
);
|
||||
}
|
||||
}, this);
|
||||
};
|
||||
|
||||
ANGSettingManager.isEnable = function (index) {
|
||||
if (this._enable[index] !== undefined) {
|
||||
return this._enable[index];
|
||||
} else {
|
||||
return !parameters.anotherDataList[index].disable;
|
||||
}
|
||||
};
|
||||
Scene_Title.prototype.fadeOutAll = function () {
|
||||
if (!this._noFadeout) {
|
||||
Scene_Base.prototype.fadeOutAll.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager.setEnable = function (index, value) {
|
||||
this._enable[index] = value;
|
||||
};
|
||||
//=============================================================================
|
||||
// Scene_Load
|
||||
// ロード成功時にアナザーポイントに移動します。
|
||||
//=============================================================================
|
||||
var _Scene_Load_onLoadSuccess = Scene_Load.prototype.onLoadSuccess;
|
||||
Scene_Load.prototype.onLoadSuccess = function () {
|
||||
_Scene_Load_onLoadSuccess.call(this);
|
||||
if (localExtraStageIndex >= 0) {
|
||||
var command = parameters.anotherDataList[localExtraStageIndex];
|
||||
var mapId = command.mapId;
|
||||
if (mapId > 0) {
|
||||
var x = command.mapX || 1;
|
||||
var y = command.mapY || 1;
|
||||
$gamePlayer.reserveTransfer(mapId, x, y);
|
||||
}
|
||||
$gameMap.abortInterpreter();
|
||||
DataManager.selectSavefileForNewGame();
|
||||
var switchId = command.switchId;
|
||||
if (switchId > 0) {
|
||||
$gameSwitches.setValue(switchId, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager.loadData = function () {
|
||||
var info = this.load();
|
||||
this._visible = info.visible || [];
|
||||
this._enable = info.enable || [];
|
||||
this.newGameHidden = !!info.newGameHidden;
|
||||
};
|
||||
//=============================================================================
|
||||
// Window_TitleCommand
|
||||
// アナザーニューゲームの選択肢を追加定義します。
|
||||
//=============================================================================
|
||||
var _Window_TitleCommand_makeCommandList =
|
||||
Window_TitleCommand.prototype.makeCommandList;
|
||||
Window_TitleCommand.prototype.makeCommandList = function () {
|
||||
_Window_TitleCommand_makeCommandList.call(this);
|
||||
parameters.anotherDataList.forEach(function (command, index) {
|
||||
if (ANGSettingManager.isVisible(index)) {
|
||||
this.makeAnotherNewGameCommand(command, index);
|
||||
}
|
||||
}, this);
|
||||
if (ANGSettingManager.newGameHidden) {
|
||||
this.eraseCommandNewGame();
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager.load = function () {
|
||||
var json;
|
||||
try {
|
||||
json = StorageManager.load(this._fileId);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return [];
|
||||
}
|
||||
if (json) {
|
||||
return JSON.parse(json);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
Window_TitleCommand.prototype.makeAnotherNewGameCommand = function (
|
||||
command,
|
||||
index
|
||||
) {
|
||||
this.addCommand(
|
||||
command.name,
|
||||
"nameGame2_" + index,
|
||||
ANGSettingManager.isEnable(index)
|
||||
);
|
||||
var addPosition = command.addPosition;
|
||||
if (addPosition > 0) {
|
||||
var anotherCommand = this._list.pop();
|
||||
this._list.splice(addPosition - 1, 0, anotherCommand);
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager.save = function () {
|
||||
var info = ANGSettingManager.make();
|
||||
StorageManager.save(this._fileId, JSON.stringify(info));
|
||||
};
|
||||
Window_TitleCommand.prototype.eraseCommandNewGame = function () {
|
||||
this._list = this._list.filter(function (command) {
|
||||
return command.symbol !== "newGame";
|
||||
});
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// StorageManager
|
||||
// アナザーニューゲームの設定ファイルのパス取得処理を追加定義します。
|
||||
//=============================================================================
|
||||
var _StorageManager_localFilePath = StorageManager.localFilePath;
|
||||
StorageManager.localFilePath = function (savefileId) {
|
||||
if (savefileId === ANGSettingManager._fileId) {
|
||||
return this.localFileDirectoryPath() + 'AnotherNewGameMk2.rpgsave';
|
||||
} else {
|
||||
return _StorageManager_localFilePath.call(this, savefileId);
|
||||
}
|
||||
};
|
||||
var _Window_TitleCommand_updatePlacement =
|
||||
Window_TitleCommand.prototype.updatePlacement;
|
||||
Window_TitleCommand.prototype.updatePlacement = function () {
|
||||
_Window_TitleCommand_updatePlacement.call(this);
|
||||
var addSize = this._list.length - 3;
|
||||
if (addSize > 0) {
|
||||
this.y += (addSize * this.itemHeight()) / 2;
|
||||
}
|
||||
};
|
||||
|
||||
var _StorageManager_webStorageKey = StorageManager.webStorageKey;
|
||||
StorageManager.webStorageKey = function (savefileId) {
|
||||
if (savefileId === ANGSettingManager._fileId) {
|
||||
return 'RPG AnotherNewGame Mk2' + parameters.manageNumber;
|
||||
} else {
|
||||
return _StorageManager_webStorageKey.call(this, savefileId);
|
||||
}
|
||||
};
|
||||
//=============================================================================
|
||||
// ANGManager
|
||||
// アナザーニューゲームの設定ファイルのセーブとロードを定義します。
|
||||
//=============================================================================
|
||||
function ANGSettingManager() {
|
||||
throw new Error("This is a static class");
|
||||
}
|
||||
|
||||
ANGSettingManager._fileId = -1001;
|
||||
|
||||
ANGSettingManager._visible = [];
|
||||
ANGSettingManager._enable = [];
|
||||
ANGSettingManager.newGameHidden = false;
|
||||
|
||||
ANGSettingManager.make = function () {
|
||||
var info = {};
|
||||
info.visible = this._visible;
|
||||
info.enable = this._enable;
|
||||
info.newGameHidden = this.newGameHidden;
|
||||
return info;
|
||||
};
|
||||
|
||||
ANGSettingManager.isVisible = function (index) {
|
||||
if (this._visible[index] !== undefined) {
|
||||
return this._visible[index];
|
||||
} else {
|
||||
return !parameters.anotherDataList[index].hidden;
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager.setVisible = function (index, value) {
|
||||
this._visible[index] = value;
|
||||
};
|
||||
|
||||
ANGSettingManager.isEnable = function (index) {
|
||||
if (this._enable[index] !== undefined) {
|
||||
return this._enable[index];
|
||||
} else {
|
||||
return !parameters.anotherDataList[index].disable;
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager.setEnable = function (index, value) {
|
||||
this._enable[index] = value;
|
||||
};
|
||||
|
||||
ANGSettingManager.loadData = function () {
|
||||
var info = this.load();
|
||||
this._visible = info.visible || [];
|
||||
this._enable = info.enable || [];
|
||||
this.newGameHidden = !!info.newGameHidden;
|
||||
};
|
||||
|
||||
ANGSettingManager.load = function () {
|
||||
var json;
|
||||
try {
|
||||
json = StorageManager.load(this._fileId);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return [];
|
||||
}
|
||||
if (json) {
|
||||
return JSON.parse(json);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
ANGSettingManager.save = function () {
|
||||
var info = ANGSettingManager.make();
|
||||
StorageManager.save(this._fileId, JSON.stringify(info));
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// StorageManager
|
||||
// アナザーニューゲームの設定ファイルのパス取得処理を追加定義します。
|
||||
//=============================================================================
|
||||
var _StorageManager_localFilePath = StorageManager.localFilePath;
|
||||
StorageManager.localFilePath = function (savefileId) {
|
||||
if (savefileId === ANGSettingManager._fileId) {
|
||||
return this.localFileDirectoryPath() + "AnotherNewGameMk2.rpgsave";
|
||||
} else {
|
||||
return _StorageManager_localFilePath.call(this, savefileId);
|
||||
}
|
||||
};
|
||||
|
||||
var _StorageManager_webStorageKey = StorageManager.webStorageKey;
|
||||
StorageManager.webStorageKey = function (savefileId) {
|
||||
if (savefileId === ANGSettingManager._fileId) {
|
||||
return "RPG AnotherNewGame Mk2" + parameters.manageNumber;
|
||||
} else {
|
||||
return _StorageManager_webStorageKey.call(this, savefileId);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -54,36 +54,36 @@
|
|||
* 音の聞き手(初期設定では画面の中央)との距離感によって音量などが変化します。
|
||||
* 音源と聞き手の距離が縮まるほど音量が大きくなりますし、
|
||||
* 音源が聞き手よりも右の方にあれば、音が右から聞こえてくる(位相が増える)ようになります。
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* ---RPGツクールMZでの使い方---
|
||||
* プラグインコマンドの「音源から音声を演奏」を用いて、
|
||||
* 音声を特定の場所(音源)から聞こえるように演奏することができます。
|
||||
*
|
||||
*
|
||||
* ※BGM,BGSについては、音源から演奏したまま別のマップへ移動すると
|
||||
* 音源が行方不明になるため、聞こえ方がおかしくなります。
|
||||
* 移動前に演奏を止めるか、移動後にプラグインコマンドを再設定しましょう。
|
||||
*
|
||||
*
|
||||
* この他にも、音の聞き手を特定のマップイベントに変更するコマンドや
|
||||
* 「移動ルートの設定」「アニメーションの表示」におけるSEを自動で音源化するコマンドもあります。
|
||||
* 慣れたらそちらも使ってみてください。
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* ---RPGツクールMVでの使い方---
|
||||
* マップイベントの「ルート設定」内で効果音を鳴らすと、プラグインの効果が発動します。
|
||||
* ※イベントコマンドの「SEの演奏」では自動調節しません。うまく使い分けましょう。
|
||||
* また、「アニメーションの表示」の効果音も対象の位置から聞こえるようになります。
|
||||
*
|
||||
*
|
||||
* さらに、プラグインコマンドによりBGMやBGSを特定の位置から鳴らすことができます。
|
||||
* トリアコンタンさんのBGS並行演奏プラグインとも連携可能にしてみました。
|
||||
* 詳しくは下の方の「プラグインコマンド」を見てください。
|
||||
*
|
||||
*
|
||||
* なお基準となる音量は効果音(,BGM,BGS)の演奏を指定した時の音量です。
|
||||
* 音源と聞き手が同じかすぐ隣のマスに居る時は基準音量で鳴らされ、
|
||||
* そこから一歩離れるたびに音が小さくなっていきます。
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* プラグインパラメータ:
|
||||
* listener : 発信される音の「聞き手」を設定します。
|
||||
* screen 「画面の中央マス」が聞き手になります。
|
||||
|
|
@ -95,48 +95,48 @@
|
|||
* 逆に音源が一歩左へ移動すると位相が-pan変化します。
|
||||
* cutoff : 音を鳴らすことを許可する最小の音量(%)です。
|
||||
* 計算後の音量がこの値を下回ると強制的に音量0%になります。
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* プラグインコマンド:
|
||||
* audiosource listener 1
|
||||
* 指定したID(この場合は1)のマップイベントを聞き手にします。
|
||||
* (ちなみに0を指定すると「このイベント」を聞き手にします)
|
||||
* 聞き手は常に一つですので、スクリーンorプレイヤーは聞き手ではなくなります。
|
||||
*
|
||||
*
|
||||
* audiosource listener reset
|
||||
* マップイベントの聞き手化を解除し、スクリーンかプレイヤーに聞き手を戻します。
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* audiosource bgm 1
|
||||
* audiosource bgs 1
|
||||
* 現在流れているBGM/BGSの音量と位相を、
|
||||
* 「指定したIDのマップイベントから鳴っている」風に聞こえるように調節します。
|
||||
* (0を指定すると「このイベント」から鳴らします)
|
||||
* 設置されたラジオから曲が流れている演出などにお使いください。
|
||||
*
|
||||
*
|
||||
* また、BGS並行演奏プラグインと連携する場合は、
|
||||
* BGSライン変更→audiosourceの順番で指定すれば
|
||||
* それぞれのBGSに音源を指定できます。
|
||||
* 例
|
||||
* ◆プラグインコマンド:PB_BGSライン変更 2
|
||||
* ◆プラグインコマンド:audiosource bgs 1
|
||||
*
|
||||
*
|
||||
* audiosource bgm reset
|
||||
* audiosource bgs reset
|
||||
* BGM/BGSの音源化を解除し、通常通りの演奏に戻します。
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* audiosource se on
|
||||
* audiosource se off
|
||||
* 「ルート設定」や「アニメーションの表示」では自動的に効果音が
|
||||
* 対象キャラの位置から音が鳴っているように調節されますが、
|
||||
* 調節してほしくない時はこのプラグインコマンドでoffにしましょう。
|
||||
* 初期値はonです。
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* ライセンス:
|
||||
* このプラグインの利用法に制限はありません。お好きなようにどうぞ。
|
||||
*
|
||||
*
|
||||
* @command play
|
||||
* @text 音源から音声を演奏
|
||||
* @desc 音源(音の発し手)と聞き手の位置関係を計算し、音声を音源から聞こえてくるように演奏します。
|
||||
|
|
@ -145,344 +145,385 @@
|
|||
* @type file
|
||||
* @dir audio
|
||||
* @text 音声ファイル
|
||||
*
|
||||
*
|
||||
* @arg volume
|
||||
* @type number
|
||||
* @default 90
|
||||
* @text 音量(%)
|
||||
*
|
||||
*
|
||||
* @arg pitch
|
||||
* @type number
|
||||
* @default 100
|
||||
* @text ピッチ(%)
|
||||
*
|
||||
*
|
||||
* @arg source
|
||||
* @type number
|
||||
* @default 0
|
||||
* @text 音源イベント
|
||||
* @desc 音源にするマップイベントをIDで指定します。0のときは「このイベント」になります。
|
||||
*
|
||||
*
|
||||
* @command listener
|
||||
* @text 音の聞き手の変更
|
||||
* @desc 音の聞き手にするマップイベントをIDで指定します。0で解除(聞き手が画面の中央/プレイヤーに戻る)します。
|
||||
*
|
||||
*
|
||||
* @arg listener
|
||||
* @type number
|
||||
* @default 0
|
||||
* @text 聞き手イベント
|
||||
*
|
||||
*
|
||||
* @command adjustRouteSe
|
||||
* @text 移動ルートのSEを音源化
|
||||
* @desc 「移動ルートの設定」の内部に「SEの演奏」があるとき、自動的に対象のイベントから音が聞こえるようにします。
|
||||
*
|
||||
*
|
||||
* @arg value
|
||||
* @type boolean
|
||||
*
|
||||
*
|
||||
* @command adjustAnimationSe
|
||||
* @text アニメーションのSEを音源化
|
||||
* @desc 「アニメーションの表示」でアニメにSEが含まれるとき、自動的に対象のイベントから音が聞こえるようにします。
|
||||
*
|
||||
*
|
||||
* @arg value
|
||||
* @type boolean
|
||||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
var pluginName = 'AudioSource';
|
||||
var parameters = PluginManager.parameters(pluginName);
|
||||
var listener = parameters['listener'];
|
||||
var decay = toNumber(parameters['decay'], 85).clamp(0, Infinity);
|
||||
var pan = toNumber(parameters['pan'], 10);
|
||||
var cutoff = toNumber(parameters['cutoff'], 1).clamp(0, 100);
|
||||
"use strict";
|
||||
var pluginName = "AudioSource";
|
||||
var parameters = PluginManager.parameters(pluginName);
|
||||
var listener = parameters["listener"];
|
||||
var decay = toNumber(parameters["decay"], 85).clamp(0, Infinity);
|
||||
var pan = toNumber(parameters["pan"], 10);
|
||||
var cutoff = toNumber(parameters["cutoff"], 1).clamp(0, 100);
|
||||
|
||||
//効果音の音量調節(マップイベントのルート設定から鳴らした時のみ)
|
||||
var _Game_Character_processMoveCommand = Game_Character.prototype.processMoveCommand;
|
||||
Game_Character.prototype.processMoveCommand = function (command) {
|
||||
var adjust = typeof $gameSystem._adjustRouteSe === "boolean" ? $gameSystem._adjustRouteSe : !PluginManager.registerCommand;
|
||||
if (adjust && command.code === Game_Character.ROUTE_PLAY_SE) playAdjustSe(command.parameters[0], this);
|
||||
else _Game_Character_processMoveCommand.apply(this, arguments);
|
||||
};
|
||||
//効果音の音量調節(マップイベントのルート設定から鳴らした時のみ)
|
||||
var _Game_Character_processMoveCommand =
|
||||
Game_Character.prototype.processMoveCommand;
|
||||
Game_Character.prototype.processMoveCommand = function (command) {
|
||||
var adjust =
|
||||
typeof $gameSystem._adjustRouteSe === "boolean"
|
||||
? $gameSystem._adjustRouteSe
|
||||
: !PluginManager.registerCommand;
|
||||
if (adjust && command.code === Game_Character.ROUTE_PLAY_SE)
|
||||
playAdjustSe(command.parameters[0], this);
|
||||
else _Game_Character_processMoveCommand.apply(this, arguments);
|
||||
};
|
||||
|
||||
//アニメーション中の効果音を音量調節
|
||||
Sprite_Animation.prototype.processTimingData = function (timing) {
|
||||
var duration = timing.flashDuration * this._rate;
|
||||
switch (timing.flashScope) {
|
||||
case 1:
|
||||
this.startFlash(timing.flashColor, duration);
|
||||
break;
|
||||
case 2:
|
||||
this.startScreenFlash(timing.flashColor, duration);
|
||||
break;
|
||||
case 3:
|
||||
this.startHiding(duration);
|
||||
break;
|
||||
}
|
||||
if (!this._duplicated && timing.se) {
|
||||
var adjust = typeof $gameSystem._adjustAnimationSe === "boolean" ? $gameSystem._adjustAnimationSe : !PluginManager.registerCommand;
|
||||
playAdjustSe(timing.se, adjust && this._target && this._target._character);
|
||||
}
|
||||
};
|
||||
//アニメーション中の効果音を音量調節
|
||||
Sprite_Animation.prototype.processTimingData = function (timing) {
|
||||
var duration = timing.flashDuration * this._rate;
|
||||
switch (timing.flashScope) {
|
||||
case 1:
|
||||
this.startFlash(timing.flashColor, duration);
|
||||
break;
|
||||
case 2:
|
||||
this.startScreenFlash(timing.flashColor, duration);
|
||||
break;
|
||||
case 3:
|
||||
this.startHiding(duration);
|
||||
break;
|
||||
}
|
||||
if (!this._duplicated && timing.se) {
|
||||
var adjust =
|
||||
typeof $gameSystem._adjustAnimationSe === "boolean"
|
||||
? $gameSystem._adjustAnimationSe
|
||||
: !PluginManager.registerCommand;
|
||||
playAdjustSe(
|
||||
timing.se,
|
||||
adjust && this._target && this._target._character
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//戦闘終了直後、BGMとBGSの音量が初期値に戻っているので再度設定する
|
||||
//fadeInがcancelされてしまいそうだが、実際はfadeInの処理の方が遅延するのでうまくいく
|
||||
var _BattleManager_replayBgmAndBgs = BattleManager.replayBgmAndBgs;
|
||||
BattleManager.replayBgmAndBgs = function () {
|
||||
_BattleManager_replayBgmAndBgs.apply(this, arguments);
|
||||
AudioManager.updateAudioSource();
|
||||
};
|
||||
//戦闘終了直後、BGMとBGSの音量が初期値に戻っているので再度設定する
|
||||
//fadeInがcancelされてしまいそうだが、実際はfadeInの処理の方が遅延するのでうまくいく
|
||||
var _BattleManager_replayBgmAndBgs = BattleManager.replayBgmAndBgs;
|
||||
BattleManager.replayBgmAndBgs = function () {
|
||||
_BattleManager_replayBgmAndBgs.apply(this, arguments);
|
||||
AudioManager.updateAudioSource();
|
||||
};
|
||||
|
||||
//BGM、BGSの音量調節(毎フレーム)
|
||||
AudioManager.updateAudioSource = function () {
|
||||
updateParameters(this._currentBgm, $gameMap.event($gameSystem._bgmSource), true);
|
||||
if ($gameSystem._bgsSources) {
|
||||
if (!this.iterateAllBgs) return delete $gameSystem._bgsSources;
|
||||
this.iterateAllBgs(function () {
|
||||
updateParameters(this._currentBgs, $gameMap.event($gameSystem._bgsSources[this.getBgsLineIndex()]));
|
||||
}.bind(this));
|
||||
}
|
||||
else updateParameters(this._currentBgs, $gameMap.event($gameSystem._bgsSource));
|
||||
};
|
||||
//BGM、BGSの音量調節(毎フレーム)
|
||||
AudioManager.updateAudioSource = function () {
|
||||
updateParameters(
|
||||
this._currentBgm,
|
||||
$gameMap.event($gameSystem._bgmSource),
|
||||
true
|
||||
);
|
||||
if ($gameSystem._bgsSources) {
|
||||
if (!this.iterateAllBgs) return delete $gameSystem._bgsSources;
|
||||
this.iterateAllBgs(
|
||||
function () {
|
||||
updateParameters(
|
||||
this._currentBgs,
|
||||
$gameMap.event($gameSystem._bgsSources[this.getBgsLineIndex()])
|
||||
);
|
||||
}.bind(this)
|
||||
);
|
||||
} else
|
||||
updateParameters(
|
||||
this._currentBgs,
|
||||
$gameMap.event($gameSystem._bgsSource)
|
||||
);
|
||||
};
|
||||
|
||||
//BGM、BGSの音量が自動調節されている場合はイベントコマンドからのAudioBufferの調節を無効にする
|
||||
//(同一フレームに複数回の音量変化が含まれるとノイズが発生するため)
|
||||
var _AudioManager_updateBgmParameters = AudioManager.updateBgmParameters;
|
||||
AudioManager.updateBgmParameters = function (bgm) {
|
||||
if ($gameMap && $gameMap.event($gameSystem._bgmSource)) return;
|
||||
_AudioManager_updateBgmParameters.apply(this, arguments);
|
||||
};
|
||||
//BGM、BGSの音量が自動調節されている場合はイベントコマンドからのAudioBufferの調節を無効にする
|
||||
//(同一フレームに複数回の音量変化が含まれるとノイズが発生するため)
|
||||
var _AudioManager_updateBgmParameters = AudioManager.updateBgmParameters;
|
||||
AudioManager.updateBgmParameters = function (bgm) {
|
||||
if ($gameMap && $gameMap.event($gameSystem._bgmSource)) return;
|
||||
_AudioManager_updateBgmParameters.apply(this, arguments);
|
||||
};
|
||||
|
||||
var _AudioManager_updateBgsParameters = AudioManager.updateBgsParameters;
|
||||
AudioManager.updateBgsParameters = function (bgs) {
|
||||
if ($gameMap && $gameSystem) {
|
||||
if ($gameSystem._bgsSources && this.getBgsLineIndex) {
|
||||
if ($gameMap.event($gameSystem._bgsSources[this.getBgsLineIndex()])) return;
|
||||
} else {
|
||||
if ($gameMap.event($gameSystem._bgsSource)) return;
|
||||
}
|
||||
}
|
||||
_AudioManager_updateBgsParameters.apply(this, arguments);
|
||||
};
|
||||
var _AudioManager_updateBgsParameters = AudioManager.updateBgsParameters;
|
||||
AudioManager.updateBgsParameters = function (bgs) {
|
||||
if ($gameMap && $gameSystem) {
|
||||
if ($gameSystem._bgsSources && this.getBgsLineIndex) {
|
||||
if ($gameMap.event($gameSystem._bgsSources[this.getBgsLineIndex()]))
|
||||
return;
|
||||
} else {
|
||||
if ($gameMap.event($gameSystem._bgsSource)) return;
|
||||
}
|
||||
}
|
||||
_AudioManager_updateBgsParameters.apply(this, arguments);
|
||||
};
|
||||
|
||||
//BGM、BGSのオプション側の音量を変えた時にちゃんと音量調節されるようにする
|
||||
var _AudioManager_bgmVolume = Object.getOwnPropertyDescriptor(AudioManager, 'bgmVolume');
|
||||
Object.defineProperty(AudioManager, 'bgmVolume', {
|
||||
get: function () {
|
||||
return _AudioManager_bgmVolume.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
_AudioManager_bgmVolume.set.call(this, value);
|
||||
if ($gameMap && $gameSystem) this.updateAudioSource();
|
||||
},
|
||||
configurable: true
|
||||
});
|
||||
//BGM、BGSのオプション側の音量を変えた時にちゃんと音量調節されるようにする
|
||||
var _AudioManager_bgmVolume = Object.getOwnPropertyDescriptor(
|
||||
AudioManager,
|
||||
"bgmVolume"
|
||||
);
|
||||
Object.defineProperty(AudioManager, "bgmVolume", {
|
||||
get: function () {
|
||||
return _AudioManager_bgmVolume.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
_AudioManager_bgmVolume.set.call(this, value);
|
||||
if ($gameMap && $gameSystem) this.updateAudioSource();
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
|
||||
var _AudioManager_bgsVolume = Object.getOwnPropertyDescriptor(AudioManager, 'bgsVolume');
|
||||
Object.defineProperty(AudioManager, 'bgsVolume', {
|
||||
get: function () {
|
||||
return _AudioManager_bgsVolume.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
_AudioManager_bgsVolume.set.call(this, value);
|
||||
if ($gameMap && $gameSystem) this.updateAudioSource();
|
||||
},
|
||||
configurable: true
|
||||
});
|
||||
var _AudioManager_bgsVolume = Object.getOwnPropertyDescriptor(
|
||||
AudioManager,
|
||||
"bgsVolume"
|
||||
);
|
||||
Object.defineProperty(AudioManager, "bgsVolume", {
|
||||
get: function () {
|
||||
return _AudioManager_bgsVolume.get.call(this);
|
||||
},
|
||||
set: function (value) {
|
||||
_AudioManager_bgsVolume.set.call(this, value);
|
||||
if ($gameMap && $gameSystem) this.updateAudioSource();
|
||||
},
|
||||
configurable: true,
|
||||
});
|
||||
|
||||
var bgmOnSave = null;
|
||||
var bgsOnSave = null;
|
||||
var bgmOnSave = null;
|
||||
var bgsOnSave = null;
|
||||
|
||||
var _Scene_Map_onMapLoaded = Scene_Map.prototype.onMapLoaded;
|
||||
Scene_Map.prototype.onMapLoaded = function () {
|
||||
_Scene_Map_onMapLoaded.apply(this, arguments);
|
||||
if (bgmOnSave) {
|
||||
AudioManager.playBgm(bgmOnSave);
|
||||
bgmOnSave = null;
|
||||
}
|
||||
if (bgsOnSave) {
|
||||
AudioManager.playBgs(bgsOnSave);
|
||||
bgsOnSave = null;
|
||||
}
|
||||
AudioManager.updateAudioSource();
|
||||
};
|
||||
var _Scene_Map_onMapLoaded = Scene_Map.prototype.onMapLoaded;
|
||||
Scene_Map.prototype.onMapLoaded = function () {
|
||||
_Scene_Map_onMapLoaded.apply(this, arguments);
|
||||
if (bgmOnSave) {
|
||||
AudioManager.playBgm(bgmOnSave);
|
||||
bgmOnSave = null;
|
||||
}
|
||||
if (bgsOnSave) {
|
||||
AudioManager.playBgs(bgsOnSave);
|
||||
bgsOnSave = null;
|
||||
}
|
||||
AudioManager.updateAudioSource();
|
||||
};
|
||||
|
||||
var _Game_System_onAfterLoad = Game_System.prototype.onAfterLoad;
|
||||
Game_System.prototype.onAfterLoad = function () {
|
||||
bgmOnSave = this._bgmOnSave;
|
||||
bgsOnSave = this._bgsOnSave;
|
||||
this._bgmOnSave = this._bgsOnSave = {};
|
||||
_Game_System_onAfterLoad.apply(this, arguments);
|
||||
this._bgmOnSave = bgmOnSave;
|
||||
this._bgsOnSave = bgsOnSave;
|
||||
};
|
||||
var _Game_System_onAfterLoad = Game_System.prototype.onAfterLoad;
|
||||
Game_System.prototype.onAfterLoad = function () {
|
||||
bgmOnSave = this._bgmOnSave;
|
||||
bgsOnSave = this._bgsOnSave;
|
||||
this._bgmOnSave = this._bgsOnSave = {};
|
||||
_Game_System_onAfterLoad.apply(this, arguments);
|
||||
this._bgmOnSave = bgmOnSave;
|
||||
this._bgsOnSave = bgsOnSave;
|
||||
};
|
||||
|
||||
var _Game_Map_update = Game_Map.prototype.update;
|
||||
Game_Map.prototype.update = function (sceneActive) {
|
||||
_Game_Map_update.apply(this, arguments);
|
||||
AudioManager.updateAudioSource();
|
||||
};
|
||||
var _Game_Map_update = Game_Map.prototype.update;
|
||||
Game_Map.prototype.update = function (sceneActive) {
|
||||
_Game_Map_update.apply(this, arguments);
|
||||
AudioManager.updateAudioSource();
|
||||
};
|
||||
|
||||
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.apply(this, arguments);
|
||||
if (command.toLowerCase() === 'audiosource') {
|
||||
var eventId = +args[1] === 0 ? this._eventId : +args[1];
|
||||
switch (args[0].toLowerCase()) {
|
||||
case 'listener':
|
||||
$gameSystem._listenerEvent = eventId;
|
||||
break;
|
||||
case 'bgm':
|
||||
$gameSystem._bgmSource = eventId;
|
||||
break;
|
||||
case 'bgs':
|
||||
if ($gameSystem.getBgsLine) {
|
||||
$gameSystem._bgsSources = $gameSystem._bgsSources || [];
|
||||
$gameSystem._bgsSources[$gameSystem.getBgsLine()] = eventId;
|
||||
}
|
||||
else $gameSystem._bgsSource = eventId;
|
||||
break;
|
||||
case 'se':
|
||||
$gameSystem._adjustRouteSe = $gameSystem._adjustAnimationSe = args[1].toLowerCase() !== 'off';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.apply(this, arguments);
|
||||
if (command.toLowerCase() === "audiosource") {
|
||||
var eventId = +args[1] === 0 ? this._eventId : +args[1];
|
||||
switch (args[0].toLowerCase()) {
|
||||
case "listener":
|
||||
$gameSystem._listenerEvent = eventId;
|
||||
break;
|
||||
case "bgm":
|
||||
$gameSystem._bgmSource = eventId;
|
||||
break;
|
||||
case "bgs":
|
||||
if ($gameSystem.getBgsLine) {
|
||||
$gameSystem._bgsSources = $gameSystem._bgsSources || [];
|
||||
$gameSystem._bgsSources[$gameSystem.getBgsLine()] = eventId;
|
||||
} else $gameSystem._bgsSource = eventId;
|
||||
break;
|
||||
case "se":
|
||||
$gameSystem._adjustRouteSe = $gameSystem._adjustAnimationSe =
|
||||
args[1].toLowerCase() !== "off";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (PluginManager.registerCommand) {
|
||||
PluginManager.registerCommand(pluginName, "play", function (args) {
|
||||
var { path, volume, pitch, source } = args;
|
||||
var [dir, name] = path.split("/");
|
||||
var eventId = +source || this._eventId;
|
||||
var pan = 0;
|
||||
switch (dir) {
|
||||
case "bgm": {
|
||||
$gameSystem._bgmSource = eventId;
|
||||
AudioManager.playBgm({ name, volume, pitch, pan });
|
||||
break;
|
||||
}
|
||||
case "bgs": {
|
||||
if ($gameSystem.getBgsLine) {
|
||||
$gameSystem._bgsSources = $gameSystem._bgsSources || [];
|
||||
$gameSystem._bgsSources[$gameSystem.getBgsLine()] = eventId;
|
||||
}
|
||||
else $gameSystem._bgsSource = eventId;
|
||||
AudioManager.playBgs({ name, volume, pitch, pan });
|
||||
break;
|
||||
}
|
||||
case "me": {
|
||||
playAdjustMe({ name, volume, pitch, pan }, $gameMap.event(eventId));
|
||||
break;
|
||||
}
|
||||
case "se": {
|
||||
playAdjustSe({ name, volume, pitch, pan }, $gameMap.event(eventId));
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (PluginManager.registerCommand) {
|
||||
PluginManager.registerCommand(pluginName, "play", function (args) {
|
||||
var { path, volume, pitch, source } = args;
|
||||
var [dir, name] = path.split("/");
|
||||
var eventId = +source || this._eventId;
|
||||
var pan = 0;
|
||||
switch (dir) {
|
||||
case "bgm": {
|
||||
$gameSystem._bgmSource = eventId;
|
||||
AudioManager.playBgm({ name, volume, pitch, pan });
|
||||
break;
|
||||
}
|
||||
case "bgs": {
|
||||
if ($gameSystem.getBgsLine) {
|
||||
$gameSystem._bgsSources = $gameSystem._bgsSources || [];
|
||||
$gameSystem._bgsSources[$gameSystem.getBgsLine()] = eventId;
|
||||
} else $gameSystem._bgsSource = eventId;
|
||||
AudioManager.playBgs({ name, volume, pitch, pan });
|
||||
break;
|
||||
}
|
||||
case "me": {
|
||||
playAdjustMe({ name, volume, pitch, pan }, $gameMap.event(eventId));
|
||||
break;
|
||||
}
|
||||
case "se": {
|
||||
playAdjustSe({ name, volume, pitch, pan }, $gameMap.event(eventId));
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
PluginManager.registerCommand(pluginName, "listener", function (args) {
|
||||
$gameSystem._listenerEvent = args.listener;
|
||||
});
|
||||
PluginManager.registerCommand(pluginName, "listener", function (args) {
|
||||
$gameSystem._listenerEvent = args.listener;
|
||||
});
|
||||
|
||||
PluginManager.registerCommand(pluginName, "adjustRouteSe", function (args) {
|
||||
$gameSystem._adjustRouteSe = args.value === "true";
|
||||
});
|
||||
PluginManager.registerCommand(pluginName, "adjustRouteSe", function (args) {
|
||||
$gameSystem._adjustRouteSe = args.value === "true";
|
||||
});
|
||||
|
||||
PluginManager.registerCommand(pluginName, "adjustAnimationSe", function (args) {
|
||||
$gameSystem._adjustAnimationSe = args.value === "true";
|
||||
});
|
||||
PluginManager.registerCommand(
|
||||
pluginName,
|
||||
"adjustAnimationSe",
|
||||
function (args) {
|
||||
$gameSystem._adjustAnimationSe = args.value === "true";
|
||||
}
|
||||
);
|
||||
|
||||
var _Game_Intepreter_command241 = Game_Interpreter.prototype.command241;
|
||||
Game_Interpreter.prototype.command241 = function (params) {
|
||||
$gameSystem._bgmSource = NaN;
|
||||
return _Game_Intepreter_command241.apply(this, arguments);
|
||||
};
|
||||
var _Game_Intepreter_command241 = Game_Interpreter.prototype.command241;
|
||||
Game_Interpreter.prototype.command241 = function (params) {
|
||||
$gameSystem._bgmSource = NaN;
|
||||
return _Game_Intepreter_command241.apply(this, arguments);
|
||||
};
|
||||
|
||||
var _Game_Intepreter_command245 = Game_Interpreter.prototype.command245;
|
||||
Game_Interpreter.prototype.command245 = function (params) {
|
||||
if ($gameSystem.getBgsLine) {
|
||||
$gameSystem._bgsSources = $gameSystem._bgsSources || [];
|
||||
$gameSystem._bgsSources[$gameSystem.getBgsLine()] = NaN;
|
||||
}
|
||||
else $gameSystem._bgsSource = NaN;
|
||||
return _Game_Intepreter_command245.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
var _Game_Intepreter_command245 = Game_Interpreter.prototype.command245;
|
||||
Game_Interpreter.prototype.command245 = function (params) {
|
||||
if ($gameSystem.getBgsLine) {
|
||||
$gameSystem._bgsSources = $gameSystem._bgsSources || [];
|
||||
$gameSystem._bgsSources[$gameSystem.getBgsLine()] = NaN;
|
||||
} else $gameSystem._bgsSource = NaN;
|
||||
return _Game_Intepreter_command245.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function toNumber(str, def) {
|
||||
return isNaN(str) ? def : +(str || def);
|
||||
}
|
||||
function toNumber(str, def) {
|
||||
return isNaN(str) ? def : +(str || def);
|
||||
}
|
||||
|
||||
//BGMとBGSの音量と位相を調節する
|
||||
function updateParameters(audio, source, isBgm) {
|
||||
if (audio && source) {
|
||||
var lastVolume = audio.volume;
|
||||
var lastPan = audio.pan;
|
||||
adjust(audio, source);
|
||||
if (audio.volume < cutoff) audio.volume = 0;
|
||||
var buffer = AudioManager[isBgm ? '_bgmBuffer' : '_bgsBuffer'];
|
||||
if (buffer && buffer._gainNode) buffer._gainNode.gain.cancelScheduledValues(0);
|
||||
AudioManager.updateBufferParameters(buffer, AudioManager[isBgm ? '_bgmVolume' : '_bgsVolume'], audio);
|
||||
audio.volume = lastVolume;
|
||||
audio.pan = lastPan;
|
||||
}
|
||||
}
|
||||
//BGMとBGSの音量と位相を調節する
|
||||
function updateParameters(audio, source, isBgm) {
|
||||
if (audio && source) {
|
||||
var lastVolume = audio.volume;
|
||||
var lastPan = audio.pan;
|
||||
adjust(audio, source);
|
||||
if (audio.volume < cutoff) audio.volume = 0;
|
||||
var buffer = AudioManager[isBgm ? "_bgmBuffer" : "_bgsBuffer"];
|
||||
if (buffer && buffer._gainNode)
|
||||
buffer._gainNode.gain.cancelScheduledValues(0);
|
||||
AudioManager.updateBufferParameters(
|
||||
buffer,
|
||||
AudioManager[isBgm ? "_bgmVolume" : "_bgsVolume"],
|
||||
audio
|
||||
);
|
||||
audio.volume = lastVolume;
|
||||
audio.pan = lastPan;
|
||||
}
|
||||
}
|
||||
|
||||
//MEの音量と位相を調節して再生する
|
||||
function playAdjustMe(me, source) {
|
||||
if (source) {
|
||||
var lastVolume = me.volume;
|
||||
var lastPan = me.pan;
|
||||
adjust(me, source);
|
||||
if (me.volume >= cutoff) AudioManager.playMe(me);
|
||||
me.volume = lastVolume;
|
||||
me.pan = lastPan;
|
||||
}
|
||||
else AudioManager.playMe(me);
|
||||
}
|
||||
//MEの音量と位相を調節して再生する
|
||||
function playAdjustMe(me, source) {
|
||||
if (source) {
|
||||
var lastVolume = me.volume;
|
||||
var lastPan = me.pan;
|
||||
adjust(me, source);
|
||||
if (me.volume >= cutoff) AudioManager.playMe(me);
|
||||
me.volume = lastVolume;
|
||||
me.pan = lastPan;
|
||||
} else AudioManager.playMe(me);
|
||||
}
|
||||
|
||||
//SEの音量と位相を調節して再生する
|
||||
function playAdjustSe(se, source) {
|
||||
if (source) {
|
||||
var lastVolume = se.volume;
|
||||
var lastPan = se.pan;
|
||||
adjust(se, source);
|
||||
if (se.volume >= cutoff) AudioManager.playSe(se);
|
||||
se.volume = lastVolume;
|
||||
se.pan = lastPan;
|
||||
}
|
||||
else AudioManager.playSe(se);
|
||||
}
|
||||
//SEの音量と位相を調節して再生する
|
||||
function playAdjustSe(se, source) {
|
||||
if (source) {
|
||||
var lastVolume = se.volume;
|
||||
var lastPan = se.pan;
|
||||
adjust(se, source);
|
||||
if (se.volume >= cutoff) AudioManager.playSe(se);
|
||||
se.volume = lastVolume;
|
||||
se.pan = lastPan;
|
||||
} else AudioManager.playSe(se);
|
||||
}
|
||||
|
||||
//実際に音量調節を担当する関数。第一引数にオーディオデータ、第二引数に音源キャラクターを指定する
|
||||
function adjust(audio, source) {
|
||||
if (!source) throw new Error('audiosourceエラー:音源となるイベントが存在しません');
|
||||
var listenerX, listenerY, listenerEvent = $gameMap.event($gameSystem._listenerEvent);
|
||||
if (listenerEvent) {
|
||||
listenerX = listenerEvent._realX;
|
||||
listenerY = listenerEvent._realY;
|
||||
} else {
|
||||
switch (listener.toLowerCase()) {
|
||||
case 'screen':
|
||||
listenerX = $gameMap.displayX() + $gamePlayer.centerX();
|
||||
listenerY = $gameMap.displayY() + $gamePlayer.centerY();
|
||||
break;
|
||||
case 'player':
|
||||
listenerX = $gamePlayer._realX;
|
||||
listenerY = $gamePlayer._realY;
|
||||
break;
|
||||
default:
|
||||
throw new Error('audiosourceエラー:listenerパラメータはscreenかplayerにしてください');
|
||||
}
|
||||
}
|
||||
var dx = $gameMap.deltaX(source._realX, listenerX);
|
||||
var dy = $gameMap.deltaY(source._realY, listenerY);
|
||||
var d = Math.sqrt(dx * dx + dy * dy);
|
||||
if (d > 1) audio.volume *= Math.pow(decay / 100, d - 1);
|
||||
audio.pan = (dx * pan).clamp(-100, 100);
|
||||
}
|
||||
//実際に音量調節を担当する関数。第一引数にオーディオデータ、第二引数に音源キャラクターを指定する
|
||||
function adjust(audio, source) {
|
||||
if (!source)
|
||||
throw new Error("audiosourceエラー:音源となるイベントが存在しません");
|
||||
var listenerX,
|
||||
listenerY,
|
||||
listenerEvent = $gameMap.event($gameSystem._listenerEvent);
|
||||
if (listenerEvent) {
|
||||
listenerX = listenerEvent._realX;
|
||||
listenerY = listenerEvent._realY;
|
||||
} else {
|
||||
switch (listener.toLowerCase()) {
|
||||
case "screen":
|
||||
listenerX = $gameMap.displayX() + $gamePlayer.centerX();
|
||||
listenerY = $gameMap.displayY() + $gamePlayer.centerY();
|
||||
break;
|
||||
case "player":
|
||||
listenerX = $gamePlayer._realX;
|
||||
listenerY = $gamePlayer._realY;
|
||||
break;
|
||||
default:
|
||||
throw new Error(
|
||||
"audiosourceエラー:listenerパラメータはscreenかplayerにしてください"
|
||||
);
|
||||
}
|
||||
}
|
||||
var dx = $gameMap.deltaX(source._realX, listenerX);
|
||||
var dy = $gameMap.deltaY(source._realY, listenerY);
|
||||
var d = Math.sqrt(dx * dx + dy * dy);
|
||||
if (d > 1) audio.volume *= Math.pow(decay / 100, d - 1);
|
||||
audio.pan = (dx * pan).clamp(-100, 100);
|
||||
}
|
||||
|
||||
//連携用の口
|
||||
AudioManager.playAdjustSe = playAdjustSe;
|
||||
})();
|
||||
//連携用の口
|
||||
AudioManager.playAdjustSe = playAdjustSe;
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -7446,4 +7446,4 @@
|
|||
* @desc テキストを表示するかどうか
|
||||
* on→表示 off→非表示
|
||||
* @default on
|
||||
*/
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7446,4 +7446,4 @@
|
|||
* @desc テキストを表示するかどうか
|
||||
* on→表示 off→非表示
|
||||
* @default on
|
||||
*/
|
||||
*/
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -42,100 +42,107 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
"use strict";
|
||||
|
||||
const _PNAME = 'CommonEventBeforeAfterMenu';
|
||||
const _PARAMETERS = PluginManager.parameters(_PNAME);
|
||||
const _PNAME = "CommonEventBeforeAfterMenu";
|
||||
const _PARAMETERS = PluginManager.parameters(_PNAME);
|
||||
|
||||
const _COMMON_EVENT_ID_BM = +_PARAMETERS['Common Event ID (before Menu)'] || 0;
|
||||
const _COMMON_EVENT_ID_AM = +_PARAMETERS['Common Event ID (after Menu)'] || 0;
|
||||
const _COMMON_EVENT_ID_BM =
|
||||
+_PARAMETERS["Common Event ID (before Menu)"] || 0;
|
||||
const _COMMON_EVENT_ID_AM = +_PARAMETERS["Common Event ID (after Menu)"] || 0;
|
||||
|
||||
function _(f) { return f[_PNAME] = f[_PNAME] || {} }
|
||||
function _(f) {
|
||||
return (f[_PNAME] = f[_PNAME] || {});
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// Scene_Map
|
||||
//==============================================================================
|
||||
//==============================================================================
|
||||
// Scene_Map
|
||||
//==============================================================================
|
||||
|
||||
var _Scene_Map_isMenuCalled = Scene_Map.prototype.isMenuCalled;
|
||||
Scene_Map.prototype.isMenuCalled = function () {
|
||||
return _Scene_Map_isMenuCalled.call(this) || _(this).reserveCallMenu;
|
||||
var _Scene_Map_isMenuCalled = Scene_Map.prototype.isMenuCalled;
|
||||
Scene_Map.prototype.isMenuCalled = function () {
|
||||
return _Scene_Map_isMenuCalled.call(this) || _(this).reserveCallMenu;
|
||||
};
|
||||
|
||||
var _Scene_Map_callMenu = Scene_Map.prototype.callMenu;
|
||||
Scene_Map.prototype.callMenu = function () {
|
||||
if (_COMMON_EVENT_ID_BM && !_(this).reserveCallMenu) {
|
||||
_(this).reserveCallMenu = true;
|
||||
$gameTemp.reserveCommonEvent(_COMMON_EVENT_ID_BM);
|
||||
} else {
|
||||
_(this).reserveCallMenu = false;
|
||||
_Scene_Map_callMenu.call(this);
|
||||
}
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Scene_Menu
|
||||
//==============================================================================
|
||||
|
||||
var _Scene_Menu_terminate = Scene_Menu.prototype.terminate;
|
||||
Scene_Menu.prototype.terminate = function () {
|
||||
if (
|
||||
_COMMON_EVENT_ID_AM &&
|
||||
!$gameTemp.isCalledMenuFromEvent &&
|
||||
SceneManager.isNextScene(Scene_Map)
|
||||
) {
|
||||
$gameTemp.reserveCommonEvent(_COMMON_EVENT_ID_AM);
|
||||
}
|
||||
$gameTemp.isCalledMenuFromEvent = false;
|
||||
_Scene_Menu_terminate.call(this);
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Game_Temp
|
||||
//==============================================================================
|
||||
|
||||
((__initialize) => {
|
||||
Game_Temp.prototype.initialize = function () {
|
||||
__initialize.apply(this, arguments);
|
||||
this.isCalledMenuFromEvent = false;
|
||||
};
|
||||
})(Game_Temp.prototype.initialize);
|
||||
|
||||
var _Scene_Map_callMenu = Scene_Map.prototype.callMenu;
|
||||
Scene_Map.prototype.callMenu = function () {
|
||||
if (_COMMON_EVENT_ID_BM && !_(this).reserveCallMenu) {
|
||||
_(this).reserveCallMenu = true;
|
||||
$gameTemp.reserveCommonEvent(_COMMON_EVENT_ID_BM);
|
||||
} else {
|
||||
_(this).reserveCallMenu = false;
|
||||
_Scene_Map_callMenu.call(this);
|
||||
}
|
||||
};
|
||||
//==============================================================================
|
||||
// Game_Interpreter
|
||||
//==============================================================================
|
||||
|
||||
//==============================================================================
|
||||
// Scene_Menu
|
||||
//==============================================================================
|
||||
((__setup) => {
|
||||
let common1 = { code: 117, indent: 0, parameters: [_COMMON_EVENT_ID_BM] };
|
||||
let common2 = { code: 117, indent: 0, parameters: [_COMMON_EVENT_ID_AM] };
|
||||
|
||||
var _Scene_Menu_terminate = Scene_Menu.prototype.terminate;
|
||||
Scene_Menu.prototype.terminate = function () {
|
||||
if (_COMMON_EVENT_ID_AM && !$gameTemp.isCalledMenuFromEvent && SceneManager.isNextScene(Scene_Map)) {
|
||||
$gameTemp.reserveCommonEvent(_COMMON_EVENT_ID_AM);
|
||||
}
|
||||
$gameTemp.isCalledMenuFromEvent = false;
|
||||
_Scene_Menu_terminate.call(this);
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
// Game_Temp
|
||||
//==============================================================================
|
||||
|
||||
(__initialize => {
|
||||
Game_Temp.prototype.initialize = function () {
|
||||
__initialize.apply(this, arguments);
|
||||
this.isCalledMenuFromEvent = false;
|
||||
};
|
||||
})(Game_Temp.prototype.initialize);
|
||||
|
||||
//==============================================================================
|
||||
// Game_Interpreter
|
||||
//==============================================================================
|
||||
|
||||
(__setup => {
|
||||
let common1 = { code: 117, indent: 0, parameters: [_COMMON_EVENT_ID_BM] };
|
||||
let common2 = { code: 117, indent: 0, parameters: [_COMMON_EVENT_ID_AM] };
|
||||
|
||||
Game_Interpreter.prototype.setup = function (list, eventId) {
|
||||
let _list = list;
|
||||
if (_COMMON_EVENT_ID_BM || _COMMON_EVENT_ID_AM) {
|
||||
let hasCallMenu = list.some(event => event.code == 351);
|
||||
if (hasCallMenu) {
|
||||
_list = [];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].code == 351) {
|
||||
let indent = list[i].indent;
|
||||
if (_COMMON_EVENT_ID_BM) {
|
||||
common1.indent = indent;
|
||||
_list.push({ ...common1 });
|
||||
}
|
||||
_list.push(list[i]);
|
||||
if (_COMMON_EVENT_ID_AM) {
|
||||
common2.indent = indent;
|
||||
_list.push({ ...common2 });
|
||||
}
|
||||
} else {
|
||||
_list.push(list[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Game_Interpreter.prototype.setup = function (list, eventId) {
|
||||
let _list = list;
|
||||
if (_COMMON_EVENT_ID_BM || _COMMON_EVENT_ID_AM) {
|
||||
let hasCallMenu = list.some((event) => event.code == 351);
|
||||
if (hasCallMenu) {
|
||||
_list = [];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].code == 351) {
|
||||
let indent = list[i].indent;
|
||||
if (_COMMON_EVENT_ID_BM) {
|
||||
common1.indent = indent;
|
||||
_list.push({ ...common1 });
|
||||
}
|
||||
_list.push(list[i]);
|
||||
if (_COMMON_EVENT_ID_AM) {
|
||||
common2.indent = indent;
|
||||
_list.push({ ...common2 });
|
||||
}
|
||||
} else {
|
||||
_list.push(list[i]);
|
||||
}
|
||||
__setup.call(this, _list, eventId);
|
||||
};
|
||||
})(Game_Interpreter.prototype.setup);
|
||||
}
|
||||
}
|
||||
}
|
||||
__setup.call(this, _list, eventId);
|
||||
};
|
||||
})(Game_Interpreter.prototype.setup);
|
||||
|
||||
(__command351 => {
|
||||
Game_Interpreter.prototype.command351 = function () {
|
||||
$gameTemp.isCalledMenuFromEvent = true;
|
||||
return __command351.apply(this, arguments);
|
||||
};
|
||||
})(Game_Interpreter.prototype.command351);
|
||||
}());
|
||||
((__command351) => {
|
||||
Game_Interpreter.prototype.command351 = function () {
|
||||
$gameTemp.isCalledMenuFromEvent = true;
|
||||
return __command351.apply(this, arguments);
|
||||
};
|
||||
})(Game_Interpreter.prototype.command351);
|
||||
})();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -4,12 +4,12 @@
|
|||
*
|
||||
* @help This plugin does not provide plugin commands.
|
||||
*
|
||||
* @param cacheLimit
|
||||
* @param cacheLimit
|
||||
* @desc For setting the upper limit of image memory cache. (MPix)
|
||||
* @default 10
|
||||
*
|
||||
* @param screenWidth
|
||||
* @desc For setting the screen width.
|
||||
* @desc For setting the screen width.
|
||||
* @default 816
|
||||
*
|
||||
* @param screenHeight
|
||||
|
|
@ -65,73 +65,71 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
function toNumber(str, def) {
|
||||
return isNaN(str) ? def : +(str || def);
|
||||
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 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;
|
||||
var _ConfigManager_applyData = ConfigManager.applyData;
|
||||
ConfigManager.applyData = function (config) {
|
||||
_ConfigManager_applyData.apply(this, arguments);
|
||||
if (config["alwaysDash"] === undefined) {
|
||||
this.alwaysDash = alwaysDash;
|
||||
}
|
||||
};
|
||||
|
||||
if (windowHeightTo) {
|
||||
windowHeight = windowHeightTo;
|
||||
} else if (screenHeight !== SceneManager._screenHeight) {
|
||||
windowHeight = screenHeight;
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
})();
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -236,351 +236,403 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
var pluginName = 'DestinationWindow';
|
||||
var metaTagPrefix = 'DW_';
|
||||
"use strict";
|
||||
var pluginName = "DestinationWindow";
|
||||
var metaTagPrefix = "DW_";
|
||||
|
||||
//=============================================================================
|
||||
// ローカル関数
|
||||
// プラグインパラメータやプラグインコマンドパラメータの整形やチェックをします
|
||||
//=============================================================================
|
||||
var getParamString = 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 '';
|
||||
};
|
||||
|
||||
var getParamNumber = function (paramNames, min, max) {
|
||||
var value = getParamString(paramNames);
|
||||
if (arguments.length < 2) min = -Infinity;
|
||||
if (arguments.length < 3) max = Infinity;
|
||||
return (parseInt(value) || 0).clamp(min, max);
|
||||
};
|
||||
|
||||
var getParamBoolean = function (paramNames) {
|
||||
var value = getParamString(paramNames);
|
||||
return value.toUpperCase() === 'ON' || value.toUpperCase() === 'TRUE';
|
||||
};
|
||||
|
||||
var getParamNumberArray = function (paramNames) {
|
||||
var value = PluginManager.parameters(pluginName)[paramNames];
|
||||
return JSON.parse(value)
|
||||
.map(function (e) { return Number(JSON.parse(e)); }, this);
|
||||
};
|
||||
|
||||
var getArgNumber = function (arg, min, max) {
|
||||
if (arguments.length < 2) min = -Infinity;
|
||||
if (arguments.length < 3) max = Infinity;
|
||||
return (parseInt(arg) || 0).clamp(min, max);
|
||||
};
|
||||
|
||||
var concatAllArguments = function (args) {
|
||||
return args.reduce(function (prevValue, arg) {
|
||||
return prevValue + ' ' + arg;
|
||||
}, '').replace(/^ /, '');
|
||||
};
|
||||
|
||||
var setPluginCommand = function (commandName, methodName) {
|
||||
pluginCommandMap.set(metaTagPrefix + commandName, methodName);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// パラメータの取得と整形
|
||||
//=============================================================================
|
||||
var param = {};
|
||||
param.showingSwitchId = getParamNumber(['ShowingSwitchId', '表示スイッチID'], 0);
|
||||
param.windowX = getParamNumber(['WindowX', 'ウィンドウX座標']);
|
||||
param.windowY = getParamNumber(['WindowY', 'ウィンドウY座標']);
|
||||
param.windowWidth = getParamNumber(['WindowWidth', 'ウィンドウ横幅'], 1);
|
||||
param.windowSkin = getParamString(['WindowSkin', 'ウィンドウスキン名']);
|
||||
param.windowOpacity = getParamNumber(['WindowOpacity', 'ウィンドウ不透明度']);
|
||||
param.fadeFrame = getParamNumber(['FadeFrame', 'フェード時間'], 1);
|
||||
param.fontSize = getParamNumber(['FontSize', 'フォントサイズ'], 12);
|
||||
param.closeEventRunning = getParamBoolean(['CloseEventRunning', 'イベント中は閉じる']);
|
||||
param.showingInMenu = getParamBoolean(['ShowingInMenu', 'メニュー画面に表示']);
|
||||
param.autoAdjust = getParamBoolean(['AutoAdjust', '自働調整']);
|
||||
param.showingFrames = getParamNumber(['ShowingFrames', '表示フレーム数'], 0);
|
||||
param.textAlign = getParamNumber(['TextAlign', '文字列揃え'], 0);
|
||||
param.noDestinationWindowMapIds = getParamNumberArray(['NoDestinationWindowMapIds']);
|
||||
|
||||
var pluginCommandMap = new Map();
|
||||
setPluginCommand('目標設定', 'execSetDestination');
|
||||
setPluginCommand('SET_DESTINATION', 'execSetDestination');
|
||||
setPluginCommand('アイコン付き目標設定', 'execSetDestinationWithIcon');
|
||||
setPluginCommand('SET_DESTINATION_WITH_ICON', 'execSetDestinationWithIcon');
|
||||
|
||||
var _extractMetadata = DataManager.extractMetadata;
|
||||
DataManager.extractMetadata = function (data) {
|
||||
_extractMetadata.call(this, data);
|
||||
if (data === $dataMap) {
|
||||
if (data.meta.noDestinationWindow) {
|
||||
data.noDestinationWindow = true;
|
||||
} else {
|
||||
data.noDestinationWindow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_Interpreter
|
||||
// プラグインコマンドを追加定義します。
|
||||
//=============================================================================
|
||||
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.apply(this, arguments);
|
||||
var pluginCommandMethod = pluginCommandMap.get(command.toUpperCase());
|
||||
if (pluginCommandMethod) {
|
||||
this[pluginCommandMethod](args);
|
||||
}
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.execSetDestination = function (args) {
|
||||
$gameSystem.setDestinationIcon(null);
|
||||
$gameSystem.setDestination(concatAllArguments(args));
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.execSetDestinationWithIcon = function (args) {
|
||||
var icon = args.shift();
|
||||
$gameSystem.setDestinationIcon(icon);
|
||||
$gameSystem.setDestination(concatAllArguments(args));
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_System
|
||||
// 目標テキストを追加定義します。
|
||||
//=============================================================================
|
||||
Game_System.prototype.setDestination = function (value) {
|
||||
this._destinationTextList = value.split('\\n');
|
||||
this.resetDestinationFrame();
|
||||
};
|
||||
|
||||
Game_System.prototype.getDestination = function () {
|
||||
return this._destinationTextList || [];
|
||||
};
|
||||
|
||||
Game_System.prototype.setDestinationIcon = function (value) {
|
||||
this._destinationIconIndex = value;
|
||||
};
|
||||
|
||||
Game_System.prototype.getDestinationIcon = function () {
|
||||
return this._destinationIconIndex || '';
|
||||
};
|
||||
|
||||
Game_System.prototype.resetDestinationFrame = function () {
|
||||
this._destinationFrame = 0;
|
||||
};
|
||||
|
||||
Game_System.prototype.isOverDestinationFrame = function () {
|
||||
this._destinationFrame++;
|
||||
return param.showingFrames > 0 ? param.showingFrames <= this._destinationFrame : false;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_Map
|
||||
// 行動目標ウィンドウ非表示マップであるかを判定します。
|
||||
//=============================================================================
|
||||
Game_Map.prototype.isNoDestinationWindowMap = function () {
|
||||
return param.noDestinationWindowMapIds.some(function (mapId) {
|
||||
return mapId === this.mapId();
|
||||
}, this) || $dataMap.noDestinationWindow;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Scene_Map
|
||||
// 行動目標ウィンドウを生成します。
|
||||
//=============================================================================
|
||||
var _Scene_Map_createMapNameWindow = Scene_Map.prototype.createMapNameWindow;
|
||||
Scene_Map.prototype.createMapNameWindow = function () {
|
||||
this.createDestinationWindow();
|
||||
_Scene_Map_createMapNameWindow.apply(this, arguments);
|
||||
};
|
||||
|
||||
Scene_Map.prototype.createDestinationWindow = function () {
|
||||
this._destinationWindow = new Window_Destination(param.windowX, param.windowY, param.windowWidth);
|
||||
this.addChild(this._destinationWindow);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Scene_Menu
|
||||
// メニュー画面にも表示できるようにします。
|
||||
//=============================================================================
|
||||
var _Scene_Menu_create = Scene_Menu.prototype.create;
|
||||
Scene_Menu.prototype.create = function () {
|
||||
_Scene_Menu_create.apply(this, arguments);
|
||||
if (param.showingInMenu) {
|
||||
this.createDestinationWindow();
|
||||
}
|
||||
};
|
||||
|
||||
Scene_Menu.prototype.createDestinationWindow = function () {
|
||||
var y, width, height;
|
||||
if (this._commandWindow.maxCols() === 1) {
|
||||
y = this._commandWindow.y + this._commandWindow.height;
|
||||
width = this._commandWindow.width;
|
||||
height = null;
|
||||
} else {
|
||||
y = this._goldWindow.y;
|
||||
width = param.windowWidth;
|
||||
height = this._goldWindow.height;
|
||||
}
|
||||
this._destinationWindow = new Window_DestinationMenu(0, y, width, height);
|
||||
this.addWindow(this._destinationWindow);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Window_Destination
|
||||
// 行動目標ウィンドウです。
|
||||
//=============================================================================
|
||||
function Window_Destination() {
|
||||
this.initialize.apply(this, arguments);
|
||||
//=============================================================================
|
||||
// ローカル関数
|
||||
// プラグインパラメータやプラグインコマンドパラメータの整形やチェックをします
|
||||
//=============================================================================
|
||||
var getParamString = 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 "";
|
||||
};
|
||||
|
||||
Window_Destination.prototype = Object.create(Window_Base.prototype);
|
||||
Window_Destination.prototype.constructor = Window_Destination;
|
||||
var getParamNumber = function (paramNames, min, max) {
|
||||
var value = getParamString(paramNames);
|
||||
if (arguments.length < 2) min = -Infinity;
|
||||
if (arguments.length < 3) max = Infinity;
|
||||
return (parseInt(value) || 0).clamp(min, max);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.initialize = function (x, y, width, height) {
|
||||
Window_Base.prototype.initialize.call(this, x, y, width, height || this.fittingHeight(1));
|
||||
this._text = '';
|
||||
this._textList = [];
|
||||
this._iconIndex = 0;
|
||||
this.update();
|
||||
this.opacity = this.isVisible() ? 255 : 0;
|
||||
};
|
||||
var getParamBoolean = function (paramNames) {
|
||||
var value = getParamString(paramNames);
|
||||
return value.toUpperCase() === "ON" || value.toUpperCase() === "TRUE";
|
||||
};
|
||||
|
||||
Window_Destination.prototype.loadWindowskin = function () {
|
||||
if (param.windowSkin) {
|
||||
this.windowskin = ImageManager.loadSystem(param.windowSkin);
|
||||
} else {
|
||||
Window_Base.prototype.loadWindowskin.call(this);
|
||||
}
|
||||
};
|
||||
var getParamNumberArray = function (paramNames) {
|
||||
var value = PluginManager.parameters(pluginName)[paramNames];
|
||||
return JSON.parse(value).map(function (e) {
|
||||
return Number(JSON.parse(e));
|
||||
}, this);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.lineHeight = function () {
|
||||
return Math.max(this.standardFontSize() + 8, Window_Base._iconHeight);
|
||||
};
|
||||
var getArgNumber = function (arg, min, max) {
|
||||
if (arguments.length < 2) min = -Infinity;
|
||||
if (arguments.length < 3) max = Infinity;
|
||||
return (parseInt(arg) || 0).clamp(min, max);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.standardFontSize = function () {
|
||||
return param.fontSize || Window_Base.prototype.standardFontSize.call(this);
|
||||
};
|
||||
var concatAllArguments = function (args) {
|
||||
return args
|
||||
.reduce(function (prevValue, arg) {
|
||||
return prevValue + " " + arg;
|
||||
}, "")
|
||||
.replace(/^ /, "");
|
||||
};
|
||||
|
||||
Window_Destination.prototype.standardBackOpacity = function () {
|
||||
return param.windowOpacity || Window_Base.prototype.standardBackOpacity.call(this);
|
||||
};
|
||||
var setPluginCommand = function (commandName, methodName) {
|
||||
pluginCommandMap.set(metaTagPrefix + commandName, methodName);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.standardPadding = function () {
|
||||
return 12;
|
||||
};
|
||||
//=============================================================================
|
||||
// パラメータの取得と整形
|
||||
//=============================================================================
|
||||
var param = {};
|
||||
param.showingSwitchId = getParamNumber(
|
||||
["ShowingSwitchId", "表示スイッチID"],
|
||||
0
|
||||
);
|
||||
param.windowX = getParamNumber(["WindowX", "ウィンドウX座標"]);
|
||||
param.windowY = getParamNumber(["WindowY", "ウィンドウY座標"]);
|
||||
param.windowWidth = getParamNumber(["WindowWidth", "ウィンドウ横幅"], 1);
|
||||
param.windowSkin = getParamString(["WindowSkin", "ウィンドウスキン名"]);
|
||||
param.windowOpacity = getParamNumber(["WindowOpacity", "ウィンドウ不透明度"]);
|
||||
param.fadeFrame = getParamNumber(["FadeFrame", "フェード時間"], 1);
|
||||
param.fontSize = getParamNumber(["FontSize", "フォントサイズ"], 12);
|
||||
param.closeEventRunning = getParamBoolean([
|
||||
"CloseEventRunning",
|
||||
"イベント中は閉じる",
|
||||
]);
|
||||
param.showingInMenu = getParamBoolean([
|
||||
"ShowingInMenu",
|
||||
"メニュー画面に表示",
|
||||
]);
|
||||
param.autoAdjust = getParamBoolean(["AutoAdjust", "自働調整"]);
|
||||
param.showingFrames = getParamNumber(["ShowingFrames", "表示フレーム数"], 0);
|
||||
param.textAlign = getParamNumber(["TextAlign", "文字列揃え"], 0);
|
||||
param.noDestinationWindowMapIds = getParamNumberArray([
|
||||
"NoDestinationWindowMapIds",
|
||||
]);
|
||||
|
||||
Window_Destination.prototype.update = function () {
|
||||
Window_Base.prototype.update.call(this);
|
||||
if (!this.windowskin.isReady()) return;
|
||||
this.updateText();
|
||||
this.updateOpacity();
|
||||
};
|
||||
var pluginCommandMap = new Map();
|
||||
setPluginCommand("目標設定", "execSetDestination");
|
||||
setPluginCommand("SET_DESTINATION", "execSetDestination");
|
||||
setPluginCommand("アイコン付き目標設定", "execSetDestinationWithIcon");
|
||||
setPluginCommand("SET_DESTINATION_WITH_ICON", "execSetDestinationWithIcon");
|
||||
|
||||
Window_Destination.prototype.updateOpacity = function () {
|
||||
if (this.isVisible()) {
|
||||
this.setOpacity(this.opacity + this.getFadeValue());
|
||||
} else {
|
||||
this.setOpacity(this.opacity - this.getFadeValue());
|
||||
}
|
||||
this.visible = (this.opacity > 0);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.updateText = function () {
|
||||
var textList = $gameSystem.getDestination();
|
||||
var iconIndex = getArgNumber(this.convertEscapeCharacters($gameSystem.getDestinationIcon()), 0);
|
||||
if (textList.length !== this._textList.length) {
|
||||
this.height = this.fittingHeight(textList.length);
|
||||
this.createContents();
|
||||
this._textList = [];
|
||||
}
|
||||
textList.forEach(function (text, index) {
|
||||
text = this.convertEscapeCharacters(text);
|
||||
if (this._textList[index] === text && this._iconIndex === iconIndex) {
|
||||
return;
|
||||
}
|
||||
this._textList[index] = text;
|
||||
this._text = text;
|
||||
this._iconIndex = iconIndex;
|
||||
this.drawDestination(index);
|
||||
}, this);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.drawDestination = function (lineNumber) {
|
||||
this.contents.clearRect(0, lineNumber * this.lineHeight(), this.contentsWidth(), this.lineHeight());
|
||||
var x = this.getContentsX();
|
||||
var y = lineNumber * this.lineHeight() + this.lineHeight() / 2 - this.contents.fontSize / 2 - 4;
|
||||
if (this._iconIndex > 0 && lineNumber === 0) {
|
||||
this.drawIcon(this._iconIndex, x, y);
|
||||
x += Window_Base._iconWidth;
|
||||
}
|
||||
if (param.autoAdjust) {
|
||||
this.resetTextColor();
|
||||
this.drawText(this._text, x, y, this.contentsWidth() - x);
|
||||
} else {
|
||||
this.drawTextEx(this._text, x, y);
|
||||
}
|
||||
};
|
||||
|
||||
Window_Destination.prototype.getContentsX = function () {
|
||||
if (param.textAlign === 0) {
|
||||
return 0;
|
||||
}
|
||||
var width = param.autoAdjust ? this.textWidth(this._text) : this.drawTextEx(this._text, 0, -this.lineHeight());
|
||||
if (this._iconIndex > 0) {
|
||||
width += Window_Base._iconWidth;
|
||||
}
|
||||
var division = (param.textAlign === 1 ? 2 : 1);
|
||||
return this.contentsWidth() / division - width / division;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.setOpacity = function (value) {
|
||||
this.opacity = value;
|
||||
this.contentsOpacity = value;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.getFadeValue = function () {
|
||||
return 255 / param.fadeFrame;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isVisible = function () {
|
||||
return $gameSwitches.value(param.showingSwitchId) && !this.isEventRunning() &&
|
||||
this.isExistText() && !this.isOverFrame() && !this.isNoDestinationWindowMap();
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isOverFrame = function () {
|
||||
return $gameSystem.isOverDestinationFrame();
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isExistText = function () {
|
||||
return this._textList.length > 0 || !!this._iconIndex;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isEventRunning = function () {
|
||||
return $gameMap.isEventRunning() && param.closeEventRunning;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isNoDestinationWindowMap = function () {
|
||||
return $gameMap.isNoDestinationWindowMap();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Window_DestinationMenu
|
||||
// メニュー画面の行動目標ウィンドウです。
|
||||
//=============================================================================
|
||||
function Window_DestinationMenu() {
|
||||
this.initialize.apply(this, arguments);
|
||||
var _extractMetadata = DataManager.extractMetadata;
|
||||
DataManager.extractMetadata = function (data) {
|
||||
_extractMetadata.call(this, data);
|
||||
if (data === $dataMap) {
|
||||
if (data.meta.noDestinationWindow) {
|
||||
data.noDestinationWindow = true;
|
||||
} else {
|
||||
data.noDestinationWindow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Window_DestinationMenu.prototype = Object.create(Window_Destination.prototype);
|
||||
Window_DestinationMenu.prototype.constructor = Window_DestinationMenu;
|
||||
//=============================================================================
|
||||
// Game_Interpreter
|
||||
// プラグインコマンドを追加定義します。
|
||||
//=============================================================================
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.apply(this, arguments);
|
||||
var pluginCommandMethod = pluginCommandMap.get(command.toUpperCase());
|
||||
if (pluginCommandMethod) {
|
||||
this[pluginCommandMethod](args);
|
||||
}
|
||||
};
|
||||
|
||||
Window_DestinationMenu.prototype.isOverFrame = function () {
|
||||
return false;
|
||||
};
|
||||
Game_Interpreter.prototype.execSetDestination = function (args) {
|
||||
$gameSystem.setDestinationIcon(null);
|
||||
$gameSystem.setDestination(concatAllArguments(args));
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.execSetDestinationWithIcon = function (args) {
|
||||
var icon = args.shift();
|
||||
$gameSystem.setDestinationIcon(icon);
|
||||
$gameSystem.setDestination(concatAllArguments(args));
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_System
|
||||
// 目標テキストを追加定義します。
|
||||
//=============================================================================
|
||||
Game_System.prototype.setDestination = function (value) {
|
||||
this._destinationTextList = value.split("\\n");
|
||||
this.resetDestinationFrame();
|
||||
};
|
||||
|
||||
Game_System.prototype.getDestination = function () {
|
||||
return this._destinationTextList || [];
|
||||
};
|
||||
|
||||
Game_System.prototype.setDestinationIcon = function (value) {
|
||||
this._destinationIconIndex = value;
|
||||
};
|
||||
|
||||
Game_System.prototype.getDestinationIcon = function () {
|
||||
return this._destinationIconIndex || "";
|
||||
};
|
||||
|
||||
Game_System.prototype.resetDestinationFrame = function () {
|
||||
this._destinationFrame = 0;
|
||||
};
|
||||
|
||||
Game_System.prototype.isOverDestinationFrame = function () {
|
||||
this._destinationFrame++;
|
||||
return param.showingFrames > 0
|
||||
? param.showingFrames <= this._destinationFrame
|
||||
: false;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_Map
|
||||
// 行動目標ウィンドウ非表示マップであるかを判定します。
|
||||
//=============================================================================
|
||||
Game_Map.prototype.isNoDestinationWindowMap = function () {
|
||||
return (
|
||||
param.noDestinationWindowMapIds.some(function (mapId) {
|
||||
return mapId === this.mapId();
|
||||
}, this) || $dataMap.noDestinationWindow
|
||||
);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Scene_Map
|
||||
// 行動目標ウィンドウを生成します。
|
||||
//=============================================================================
|
||||
var _Scene_Map_createMapNameWindow = Scene_Map.prototype.createMapNameWindow;
|
||||
Scene_Map.prototype.createMapNameWindow = function () {
|
||||
this.createDestinationWindow();
|
||||
_Scene_Map_createMapNameWindow.apply(this, arguments);
|
||||
};
|
||||
|
||||
Scene_Map.prototype.createDestinationWindow = function () {
|
||||
this._destinationWindow = new Window_Destination(
|
||||
param.windowX,
|
||||
param.windowY,
|
||||
param.windowWidth
|
||||
);
|
||||
this.addChild(this._destinationWindow);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Scene_Menu
|
||||
// メニュー画面にも表示できるようにします。
|
||||
//=============================================================================
|
||||
var _Scene_Menu_create = Scene_Menu.prototype.create;
|
||||
Scene_Menu.prototype.create = function () {
|
||||
_Scene_Menu_create.apply(this, arguments);
|
||||
if (param.showingInMenu) {
|
||||
this.createDestinationWindow();
|
||||
}
|
||||
};
|
||||
|
||||
Scene_Menu.prototype.createDestinationWindow = function () {
|
||||
var y, width, height;
|
||||
if (this._commandWindow.maxCols() === 1) {
|
||||
y = this._commandWindow.y + this._commandWindow.height;
|
||||
width = this._commandWindow.width;
|
||||
height = null;
|
||||
} else {
|
||||
y = this._goldWindow.y;
|
||||
width = param.windowWidth;
|
||||
height = this._goldWindow.height;
|
||||
}
|
||||
this._destinationWindow = new Window_DestinationMenu(0, y, width, height);
|
||||
this.addWindow(this._destinationWindow);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Window_Destination
|
||||
// 行動目標ウィンドウです。
|
||||
//=============================================================================
|
||||
function Window_Destination() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_Destination.prototype = Object.create(Window_Base.prototype);
|
||||
Window_Destination.prototype.constructor = Window_Destination;
|
||||
|
||||
Window_Destination.prototype.initialize = function (x, y, width, height) {
|
||||
Window_Base.prototype.initialize.call(
|
||||
this,
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height || this.fittingHeight(1)
|
||||
);
|
||||
this._text = "";
|
||||
this._textList = [];
|
||||
this._iconIndex = 0;
|
||||
this.update();
|
||||
this.opacity = this.isVisible() ? 255 : 0;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.loadWindowskin = function () {
|
||||
if (param.windowSkin) {
|
||||
this.windowskin = ImageManager.loadSystem(param.windowSkin);
|
||||
} else {
|
||||
Window_Base.prototype.loadWindowskin.call(this);
|
||||
}
|
||||
};
|
||||
|
||||
Window_Destination.prototype.lineHeight = function () {
|
||||
return Math.max(this.standardFontSize() + 8, Window_Base._iconHeight);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.standardFontSize = function () {
|
||||
return param.fontSize || Window_Base.prototype.standardFontSize.call(this);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.standardBackOpacity = function () {
|
||||
return (
|
||||
param.windowOpacity ||
|
||||
Window_Base.prototype.standardBackOpacity.call(this)
|
||||
);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.standardPadding = function () {
|
||||
return 12;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.update = function () {
|
||||
Window_Base.prototype.update.call(this);
|
||||
if (!this.windowskin.isReady()) return;
|
||||
this.updateText();
|
||||
this.updateOpacity();
|
||||
};
|
||||
|
||||
Window_Destination.prototype.updateOpacity = function () {
|
||||
if (this.isVisible()) {
|
||||
this.setOpacity(this.opacity + this.getFadeValue());
|
||||
} else {
|
||||
this.setOpacity(this.opacity - this.getFadeValue());
|
||||
}
|
||||
this.visible = this.opacity > 0;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.updateText = function () {
|
||||
var textList = $gameSystem.getDestination();
|
||||
var iconIndex = getArgNumber(
|
||||
this.convertEscapeCharacters($gameSystem.getDestinationIcon()),
|
||||
0
|
||||
);
|
||||
if (textList.length !== this._textList.length) {
|
||||
this.height = this.fittingHeight(textList.length);
|
||||
this.createContents();
|
||||
this._textList = [];
|
||||
}
|
||||
textList.forEach(function (text, index) {
|
||||
text = this.convertEscapeCharacters(text);
|
||||
if (this._textList[index] === text && this._iconIndex === iconIndex) {
|
||||
return;
|
||||
}
|
||||
this._textList[index] = text;
|
||||
this._text = text;
|
||||
this._iconIndex = iconIndex;
|
||||
this.drawDestination(index);
|
||||
}, this);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.drawDestination = function (lineNumber) {
|
||||
this.contents.clearRect(
|
||||
0,
|
||||
lineNumber * this.lineHeight(),
|
||||
this.contentsWidth(),
|
||||
this.lineHeight()
|
||||
);
|
||||
var x = this.getContentsX();
|
||||
var y =
|
||||
lineNumber * this.lineHeight() +
|
||||
this.lineHeight() / 2 -
|
||||
this.contents.fontSize / 2 -
|
||||
4;
|
||||
if (this._iconIndex > 0 && lineNumber === 0) {
|
||||
this.drawIcon(this._iconIndex, x, y);
|
||||
x += Window_Base._iconWidth;
|
||||
}
|
||||
if (param.autoAdjust) {
|
||||
this.resetTextColor();
|
||||
this.drawText(this._text, x, y, this.contentsWidth() - x);
|
||||
} else {
|
||||
this.drawTextEx(this._text, x, y);
|
||||
}
|
||||
};
|
||||
|
||||
Window_Destination.prototype.getContentsX = function () {
|
||||
if (param.textAlign === 0) {
|
||||
return 0;
|
||||
}
|
||||
var width = param.autoAdjust
|
||||
? this.textWidth(this._text)
|
||||
: this.drawTextEx(this._text, 0, -this.lineHeight());
|
||||
if (this._iconIndex > 0) {
|
||||
width += Window_Base._iconWidth;
|
||||
}
|
||||
var division = param.textAlign === 1 ? 2 : 1;
|
||||
return this.contentsWidth() / division - width / division;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.setOpacity = function (value) {
|
||||
this.opacity = value;
|
||||
this.contentsOpacity = value;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.getFadeValue = function () {
|
||||
return 255 / param.fadeFrame;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isVisible = function () {
|
||||
return (
|
||||
$gameSwitches.value(param.showingSwitchId) &&
|
||||
!this.isEventRunning() &&
|
||||
this.isExistText() &&
|
||||
!this.isOverFrame() &&
|
||||
!this.isNoDestinationWindowMap()
|
||||
);
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isOverFrame = function () {
|
||||
return $gameSystem.isOverDestinationFrame();
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isExistText = function () {
|
||||
return this._textList.length > 0 || !!this._iconIndex;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isEventRunning = function () {
|
||||
return $gameMap.isEventRunning() && param.closeEventRunning;
|
||||
};
|
||||
|
||||
Window_Destination.prototype.isNoDestinationWindowMap = function () {
|
||||
return $gameMap.isNoDestinationWindowMap();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Window_DestinationMenu
|
||||
// メニュー画面の行動目標ウィンドウです。
|
||||
//=============================================================================
|
||||
function Window_DestinationMenu() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_DestinationMenu.prototype = Object.create(
|
||||
Window_Destination.prototype
|
||||
);
|
||||
Window_DestinationMenu.prototype.constructor = Window_DestinationMenu;
|
||||
|
||||
Window_DestinationMenu.prototype.isOverFrame = function () {
|
||||
return false;
|
||||
};
|
||||
})();
|
||||
|
||||
|
|
|
|||
|
|
@ -49,299 +49,297 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
var parameters = PluginManager.parameters("EnemyBook");
|
||||
var unknownData = String(parameters["Unknown Data"] || "??????");
|
||||
|
||||
var parameters = PluginManager.parameters('EnemyBook');
|
||||
var unknownData = String(parameters['Unknown Data'] || '??????');
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.call(this, command, args);
|
||||
if (command === "EnemyBook") {
|
||||
switch (args[0]) {
|
||||
case "open":
|
||||
SceneManager.push(Scene_EnemyBook);
|
||||
break;
|
||||
case "add":
|
||||
$gameSystem.addToEnemyBook(Number(args[1]));
|
||||
break;
|
||||
case "remove":
|
||||
$gameSystem.removeFromEnemyBook(Number(args[1]));
|
||||
break;
|
||||
case "complete":
|
||||
$gameSystem.completeEnemyBook();
|
||||
break;
|
||||
case "clear":
|
||||
$gameSystem.clearEnemyBook();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.call(this, command, args);
|
||||
if (command === 'EnemyBook') {
|
||||
switch (args[0]) {
|
||||
case 'open':
|
||||
SceneManager.push(Scene_EnemyBook);
|
||||
break;
|
||||
case 'add':
|
||||
$gameSystem.addToEnemyBook(Number(args[1]));
|
||||
break;
|
||||
case 'remove':
|
||||
$gameSystem.removeFromEnemyBook(Number(args[1]));
|
||||
break;
|
||||
case 'complete':
|
||||
$gameSystem.completeEnemyBook();
|
||||
break;
|
||||
case 'clear':
|
||||
$gameSystem.clearEnemyBook();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
Game_System.prototype.addToEnemyBook = function (enemyId) {
|
||||
if (!this._enemyBookFlags) {
|
||||
this.clearEnemyBook();
|
||||
}
|
||||
this._enemyBookFlags[enemyId] = true;
|
||||
};
|
||||
|
||||
Game_System.prototype.addToEnemyBook = function (enemyId) {
|
||||
if (!this._enemyBookFlags) {
|
||||
this.clearEnemyBook();
|
||||
}
|
||||
this._enemyBookFlags[enemyId] = true;
|
||||
};
|
||||
Game_System.prototype.removeFromEnemyBook = function (enemyId) {
|
||||
if (this._enemyBookFlags) {
|
||||
this._enemyBookFlags[enemyId] = false;
|
||||
}
|
||||
};
|
||||
|
||||
Game_System.prototype.removeFromEnemyBook = function (enemyId) {
|
||||
if (this._enemyBookFlags) {
|
||||
this._enemyBookFlags[enemyId] = false;
|
||||
}
|
||||
};
|
||||
Game_System.prototype.completeEnemyBook = function () {
|
||||
this.clearEnemyBook();
|
||||
for (var i = 1; i < $dataEnemies.length; i++) {
|
||||
this._enemyBookFlags[i] = true;
|
||||
}
|
||||
};
|
||||
|
||||
Game_System.prototype.completeEnemyBook = function () {
|
||||
this.clearEnemyBook();
|
||||
for (var i = 1; i < $dataEnemies.length; i++) {
|
||||
this._enemyBookFlags[i] = true;
|
||||
}
|
||||
};
|
||||
Game_System.prototype.clearEnemyBook = function () {
|
||||
this._enemyBookFlags = [];
|
||||
};
|
||||
|
||||
Game_System.prototype.clearEnemyBook = function () {
|
||||
this._enemyBookFlags = [];
|
||||
};
|
||||
Game_System.prototype.isInEnemyBook = function (enemy) {
|
||||
if (this._enemyBookFlags && enemy) {
|
||||
return !!this._enemyBookFlags[enemy.id];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Game_System.prototype.isInEnemyBook = function (enemy) {
|
||||
if (this._enemyBookFlags && enemy) {
|
||||
return !!this._enemyBookFlags[enemy.id];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var _Game_Troop_setup = Game_Troop.prototype.setup;
|
||||
Game_Troop.prototype.setup = function (troopId) {
|
||||
_Game_Troop_setup.call(this, troopId);
|
||||
this.members().forEach(function (enemy) {
|
||||
if (enemy.isAppeared()) {
|
||||
$gameSystem.addToEnemyBook(enemy.enemyId());
|
||||
}
|
||||
}, this);
|
||||
};
|
||||
|
||||
var _Game_Troop_setup = Game_Troop.prototype.setup;
|
||||
Game_Troop.prototype.setup = function (troopId) {
|
||||
_Game_Troop_setup.call(this, troopId);
|
||||
this.members().forEach(function (enemy) {
|
||||
if (enemy.isAppeared()) {
|
||||
$gameSystem.addToEnemyBook(enemy.enemyId());
|
||||
}
|
||||
}, this);
|
||||
};
|
||||
var _Game_Enemy_appear = Game_Enemy.prototype.appear;
|
||||
Game_Enemy.prototype.appear = function () {
|
||||
_Game_Enemy_appear.call(this);
|
||||
$gameSystem.addToEnemyBook(this._enemyId);
|
||||
};
|
||||
|
||||
var _Game_Enemy_appear = Game_Enemy.prototype.appear;
|
||||
Game_Enemy.prototype.appear = function () {
|
||||
_Game_Enemy_appear.call(this);
|
||||
$gameSystem.addToEnemyBook(this._enemyId);
|
||||
};
|
||||
var _Game_Enemy_transform = Game_Enemy.prototype.transform;
|
||||
Game_Enemy.prototype.transform = function (enemyId) {
|
||||
_Game_Enemy_transform.call(this, enemyId);
|
||||
$gameSystem.addToEnemyBook(enemyId);
|
||||
};
|
||||
|
||||
var _Game_Enemy_transform = Game_Enemy.prototype.transform;
|
||||
Game_Enemy.prototype.transform = function (enemyId) {
|
||||
_Game_Enemy_transform.call(this, enemyId);
|
||||
$gameSystem.addToEnemyBook(enemyId);
|
||||
};
|
||||
function Scene_EnemyBook() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
function Scene_EnemyBook() {
|
||||
this.initialize.apply(this, arguments);
|
||||
Scene_EnemyBook.prototype = Object.create(Scene_MenuBase.prototype);
|
||||
Scene_EnemyBook.prototype.constructor = Scene_EnemyBook;
|
||||
|
||||
Scene_EnemyBook.prototype.initialize = function () {
|
||||
Scene_MenuBase.prototype.initialize.call(this);
|
||||
};
|
||||
|
||||
Scene_EnemyBook.prototype.create = function () {
|
||||
Scene_MenuBase.prototype.create.call(this);
|
||||
this._indexWindow = new Window_EnemyBookIndex(0, 0);
|
||||
this._indexWindow.setHandler("cancel", this.popScene.bind(this));
|
||||
var wy = this._indexWindow.height;
|
||||
var ww = Graphics.boxWidth;
|
||||
var wh = Graphics.boxHeight - wy;
|
||||
this._statusWindow = new Window_EnemyBookStatus(0, wy, ww, wh);
|
||||
this.addWindow(this._indexWindow);
|
||||
this.addWindow(this._statusWindow);
|
||||
this._indexWindow.setStatusWindow(this._statusWindow);
|
||||
};
|
||||
|
||||
function Window_EnemyBookIndex() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_EnemyBookIndex.prototype = Object.create(Window_Selectable.prototype);
|
||||
Window_EnemyBookIndex.prototype.constructor = Window_EnemyBookIndex;
|
||||
|
||||
Window_EnemyBookIndex.lastTopRow = 0;
|
||||
Window_EnemyBookIndex.lastIndex = 0;
|
||||
|
||||
Window_EnemyBookIndex.prototype.initialize = function (x, y) {
|
||||
var width = Graphics.boxWidth;
|
||||
var height = this.fittingHeight(6);
|
||||
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
|
||||
this.refresh();
|
||||
this.setTopRow(Window_EnemyBookIndex.lastTopRow);
|
||||
this.select(Window_EnemyBookIndex.lastIndex);
|
||||
this.activate();
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.maxCols = function () {
|
||||
return 3;
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.maxItems = function () {
|
||||
return this._list ? this._list.length : 0;
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.setStatusWindow = function (statusWindow) {
|
||||
this._statusWindow = statusWindow;
|
||||
this.updateStatus();
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.update = function () {
|
||||
Window_Selectable.prototype.update.call(this);
|
||||
this.updateStatus();
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.updateStatus = function () {
|
||||
if (this._statusWindow) {
|
||||
var enemy = this._list[this.index()];
|
||||
this._statusWindow.setEnemy(enemy);
|
||||
}
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.refresh = function () {
|
||||
this._list = [];
|
||||
for (var i = 1; i < $dataEnemies.length; i++) {
|
||||
var enemy = $dataEnemies[i];
|
||||
if (enemy.name && enemy.meta.book !== "no") {
|
||||
this._list.push(enemy);
|
||||
}
|
||||
}
|
||||
this.createContents();
|
||||
this.drawAllItems();
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.drawItem = function (index) {
|
||||
var enemy = this._list[index];
|
||||
var rect = this.itemRectForText(index);
|
||||
var name;
|
||||
if ($gameSystem.isInEnemyBook(enemy)) {
|
||||
name = enemy.name;
|
||||
} else {
|
||||
name = unknownData;
|
||||
}
|
||||
this.drawText(name, rect.x, rect.y, rect.width);
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.processCancel = function () {
|
||||
Window_Selectable.prototype.processCancel.call(this);
|
||||
Window_EnemyBookIndex.lastTopRow = this.topRow();
|
||||
Window_EnemyBookIndex.lastIndex = this.index();
|
||||
};
|
||||
|
||||
function Window_EnemyBookStatus() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_EnemyBookStatus.prototype = Object.create(Window_Base.prototype);
|
||||
Window_EnemyBookStatus.prototype.constructor = Window_EnemyBookStatus;
|
||||
|
||||
Window_EnemyBookStatus.prototype.initialize = function (x, y, width, height) {
|
||||
Window_Base.prototype.initialize.call(this, x, y, width, height);
|
||||
this._enemy = null;
|
||||
this._enemySprite = new Sprite();
|
||||
this._enemySprite.anchor.x = 0.5;
|
||||
this._enemySprite.anchor.y = 0.5;
|
||||
this._enemySprite.x = width / 2 - 20;
|
||||
this._enemySprite.y = height / 2;
|
||||
this.addChildToBack(this._enemySprite);
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
Window_EnemyBookStatus.prototype.setEnemy = function (enemy) {
|
||||
if (this._enemy !== enemy) {
|
||||
this._enemy = enemy;
|
||||
this.refresh();
|
||||
}
|
||||
};
|
||||
|
||||
Window_EnemyBookStatus.prototype.update = function () {
|
||||
Window_Base.prototype.update.call(this);
|
||||
if (this._enemySprite.bitmap) {
|
||||
var bitmapHeight = this._enemySprite.bitmap.height;
|
||||
var contentsHeight = this.contents.height;
|
||||
var scale = 1;
|
||||
if (bitmapHeight > contentsHeight) {
|
||||
scale = contentsHeight / bitmapHeight;
|
||||
}
|
||||
this._enemySprite.scale.x = scale;
|
||||
this._enemySprite.scale.y = scale;
|
||||
}
|
||||
};
|
||||
|
||||
Window_EnemyBookStatus.prototype.refresh = function () {
|
||||
var enemy = this._enemy;
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
var lineHeight = this.lineHeight();
|
||||
|
||||
this.contents.clear();
|
||||
|
||||
if (!enemy || !$gameSystem.isInEnemyBook(enemy)) {
|
||||
this._enemySprite.bitmap = null;
|
||||
return;
|
||||
}
|
||||
|
||||
Scene_EnemyBook.prototype = Object.create(Scene_MenuBase.prototype);
|
||||
Scene_EnemyBook.prototype.constructor = Scene_EnemyBook;
|
||||
var name = enemy.battlerName;
|
||||
var hue = enemy.battlerHue;
|
||||
var bitmap;
|
||||
if ($gameSystem.isSideView()) {
|
||||
bitmap = ImageManager.loadSvEnemy(name, hue);
|
||||
} else {
|
||||
bitmap = ImageManager.loadEnemy(name, hue);
|
||||
}
|
||||
this._enemySprite.bitmap = bitmap;
|
||||
|
||||
Scene_EnemyBook.prototype.initialize = function () {
|
||||
Scene_MenuBase.prototype.initialize.call(this);
|
||||
};
|
||||
this.resetTextColor();
|
||||
this.drawText(enemy.name, x, y);
|
||||
|
||||
Scene_EnemyBook.prototype.create = function () {
|
||||
Scene_MenuBase.prototype.create.call(this);
|
||||
this._indexWindow = new Window_EnemyBookIndex(0, 0);
|
||||
this._indexWindow.setHandler('cancel', this.popScene.bind(this));
|
||||
var wy = this._indexWindow.height;
|
||||
var ww = Graphics.boxWidth;
|
||||
var wh = Graphics.boxHeight - wy;
|
||||
this._statusWindow = new Window_EnemyBookStatus(0, wy, ww, wh);
|
||||
this.addWindow(this._indexWindow);
|
||||
this.addWindow(this._statusWindow);
|
||||
this._indexWindow.setStatusWindow(this._statusWindow);
|
||||
};
|
||||
x = this.textPadding();
|
||||
y = lineHeight + this.textPadding();
|
||||
|
||||
function Window_EnemyBookIndex() {
|
||||
this.initialize.apply(this, arguments);
|
||||
for (var i = 0; i < 8; i++) {
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(TextManager.param(i), x, y, 160);
|
||||
this.resetTextColor();
|
||||
this.drawText(enemy.params[i], x + 160, y, 60, "right");
|
||||
y += lineHeight;
|
||||
}
|
||||
|
||||
Window_EnemyBookIndex.prototype = Object.create(Window_Selectable.prototype);
|
||||
Window_EnemyBookIndex.prototype.constructor = Window_EnemyBookIndex;
|
||||
var rewardsWidth = 280;
|
||||
x = this.contents.width - rewardsWidth;
|
||||
y = lineHeight + this.textPadding();
|
||||
|
||||
Window_EnemyBookIndex.lastTopRow = 0;
|
||||
Window_EnemyBookIndex.lastIndex = 0;
|
||||
this.resetTextColor();
|
||||
this.drawText(enemy.exp, x, y);
|
||||
x += this.textWidth(enemy.exp) + 6;
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(TextManager.expA, x, y);
|
||||
x += this.textWidth(TextManager.expA + " ");
|
||||
|
||||
Window_EnemyBookIndex.prototype.initialize = function (x, y) {
|
||||
var width = Graphics.boxWidth;
|
||||
var height = this.fittingHeight(6);
|
||||
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
|
||||
this.refresh();
|
||||
this.setTopRow(Window_EnemyBookIndex.lastTopRow);
|
||||
this.select(Window_EnemyBookIndex.lastIndex);
|
||||
this.activate();
|
||||
};
|
||||
this.resetTextColor();
|
||||
this.drawText(enemy.gold, x, y);
|
||||
x += this.textWidth(enemy.gold) + 6;
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(TextManager.currencyUnit, x, y);
|
||||
|
||||
Window_EnemyBookIndex.prototype.maxCols = function () {
|
||||
return 3;
|
||||
};
|
||||
x = this.contents.width - rewardsWidth;
|
||||
y += lineHeight;
|
||||
|
||||
Window_EnemyBookIndex.prototype.maxItems = function () {
|
||||
return this._list ? this._list.length : 0;
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.setStatusWindow = function (statusWindow) {
|
||||
this._statusWindow = statusWindow;
|
||||
this.updateStatus();
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.update = function () {
|
||||
Window_Selectable.prototype.update.call(this);
|
||||
this.updateStatus();
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.updateStatus = function () {
|
||||
if (this._statusWindow) {
|
||||
var enemy = this._list[this.index()];
|
||||
this._statusWindow.setEnemy(enemy);
|
||||
}
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.refresh = function () {
|
||||
this._list = [];
|
||||
for (var i = 1; i < $dataEnemies.length; i++) {
|
||||
var enemy = $dataEnemies[i];
|
||||
if (enemy.name && enemy.meta.book !== 'no') {
|
||||
this._list.push(enemy);
|
||||
}
|
||||
}
|
||||
this.createContents();
|
||||
this.drawAllItems();
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.drawItem = function (index) {
|
||||
var enemy = this._list[index];
|
||||
var rect = this.itemRectForText(index);
|
||||
var name;
|
||||
if ($gameSystem.isInEnemyBook(enemy)) {
|
||||
name = enemy.name;
|
||||
} else {
|
||||
name = unknownData;
|
||||
}
|
||||
this.drawText(name, rect.x, rect.y, rect.width);
|
||||
};
|
||||
|
||||
Window_EnemyBookIndex.prototype.processCancel = function () {
|
||||
Window_Selectable.prototype.processCancel.call(this);
|
||||
Window_EnemyBookIndex.lastTopRow = this.topRow();
|
||||
Window_EnemyBookIndex.lastIndex = this.index();
|
||||
};
|
||||
|
||||
function Window_EnemyBookStatus() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_EnemyBookStatus.prototype = Object.create(Window_Base.prototype);
|
||||
Window_EnemyBookStatus.prototype.constructor = Window_EnemyBookStatus;
|
||||
|
||||
Window_EnemyBookStatus.prototype.initialize = function (x, y, width, height) {
|
||||
Window_Base.prototype.initialize.call(this, x, y, width, height);
|
||||
this._enemy = null;
|
||||
this._enemySprite = new Sprite();
|
||||
this._enemySprite.anchor.x = 0.5;
|
||||
this._enemySprite.anchor.y = 0.5;
|
||||
this._enemySprite.x = width / 2 - 20;
|
||||
this._enemySprite.y = height / 2;
|
||||
this.addChildToBack(this._enemySprite);
|
||||
this.refresh();
|
||||
};
|
||||
|
||||
Window_EnemyBookStatus.prototype.setEnemy = function (enemy) {
|
||||
if (this._enemy !== enemy) {
|
||||
this._enemy = enemy;
|
||||
this.refresh();
|
||||
}
|
||||
};
|
||||
|
||||
Window_EnemyBookStatus.prototype.update = function () {
|
||||
Window_Base.prototype.update.call(this);
|
||||
if (this._enemySprite.bitmap) {
|
||||
var bitmapHeight = this._enemySprite.bitmap.height;
|
||||
var contentsHeight = this.contents.height;
|
||||
var scale = 1;
|
||||
if (bitmapHeight > contentsHeight) {
|
||||
scale = contentsHeight / bitmapHeight;
|
||||
}
|
||||
this._enemySprite.scale.x = scale;
|
||||
this._enemySprite.scale.y = scale;
|
||||
}
|
||||
};
|
||||
|
||||
Window_EnemyBookStatus.prototype.refresh = function () {
|
||||
var enemy = this._enemy;
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
var lineHeight = this.lineHeight();
|
||||
|
||||
this.contents.clear();
|
||||
|
||||
if (!enemy || !$gameSystem.isInEnemyBook(enemy)) {
|
||||
this._enemySprite.bitmap = null;
|
||||
return;
|
||||
}
|
||||
|
||||
var name = enemy.battlerName;
|
||||
var hue = enemy.battlerHue;
|
||||
var bitmap;
|
||||
if ($gameSystem.isSideView()) {
|
||||
bitmap = ImageManager.loadSvEnemy(name, hue);
|
||||
} else {
|
||||
bitmap = ImageManager.loadEnemy(name, hue);
|
||||
}
|
||||
this._enemySprite.bitmap = bitmap;
|
||||
|
||||
this.resetTextColor();
|
||||
this.drawText(enemy.name, x, y);
|
||||
|
||||
x = this.textPadding();
|
||||
y = lineHeight + this.textPadding();
|
||||
|
||||
for (var i = 0; i < 8; i++) {
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(TextManager.param(i), x, y, 160);
|
||||
this.resetTextColor();
|
||||
this.drawText(enemy.params[i], x + 160, y, 60, 'right');
|
||||
y += lineHeight;
|
||||
}
|
||||
|
||||
var rewardsWidth = 280;
|
||||
x = this.contents.width - rewardsWidth;
|
||||
y = lineHeight + this.textPadding();
|
||||
|
||||
this.resetTextColor();
|
||||
this.drawText(enemy.exp, x, y);
|
||||
x += this.textWidth(enemy.exp) + 6;
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(TextManager.expA, x, y);
|
||||
x += this.textWidth(TextManager.expA + ' ');
|
||||
|
||||
this.resetTextColor();
|
||||
this.drawText(enemy.gold, x, y);
|
||||
x += this.textWidth(enemy.gold) + 6;
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(TextManager.currencyUnit, x, y);
|
||||
|
||||
x = this.contents.width - rewardsWidth;
|
||||
for (var j = 0; j < enemy.dropItems.length; j++) {
|
||||
var di = enemy.dropItems[j];
|
||||
if (di.kind > 0) {
|
||||
var item = Game_Enemy.prototype.itemObject(di.kind, di.dataId);
|
||||
this.drawItemName(item, x, y, rewardsWidth);
|
||||
y += lineHeight;
|
||||
}
|
||||
}
|
||||
|
||||
for (var j = 0; j < enemy.dropItems.length; j++) {
|
||||
var di = enemy.dropItems[j];
|
||||
if (di.kind > 0) {
|
||||
var item = Game_Enemy.prototype.itemObject(di.kind, di.dataId);
|
||||
this.drawItemName(item, x, y, rewardsWidth);
|
||||
y += lineHeight;
|
||||
}
|
||||
}
|
||||
|
||||
var descWidth = 480;
|
||||
x = this.contents.width - descWidth;
|
||||
y = this.textPadding() + lineHeight * 7;
|
||||
this.drawTextEx(enemy.meta.desc1, x, y + lineHeight * 0, descWidth);
|
||||
this.drawTextEx(enemy.meta.desc2, x, y + lineHeight * 1, descWidth);
|
||||
};
|
||||
|
||||
var descWidth = 480;
|
||||
x = this.contents.width - descWidth;
|
||||
y = this.textPadding() + lineHeight * 7;
|
||||
this.drawTextEx(enemy.meta.desc1, x, y + lineHeight * 0, descWidth);
|
||||
this.drawTextEx(enemy.meta.desc2, x, y + lineHeight * 1, descWidth);
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -65,100 +65,106 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Get database meta information.
|
||||
* @param object Database item
|
||||
* @param name Meta name
|
||||
* @returns {String} meta value
|
||||
*/
|
||||
var getMetaValue = function (object, name) {
|
||||
var tagName = param.commandPrefix + name;
|
||||
return object.meta.hasOwnProperty(tagName) ? convertEscapeCharacters(object.meta[tagName]) : null;
|
||||
};
|
||||
/**
|
||||
* Get database meta information.
|
||||
* @param object Database item
|
||||
* @param name Meta name
|
||||
* @returns {String} meta value
|
||||
*/
|
||||
var getMetaValue = function (object, name) {
|
||||
var tagName = param.commandPrefix + name;
|
||||
return object.meta.hasOwnProperty(tagName)
|
||||
? convertEscapeCharacters(object.meta[tagName])
|
||||
: null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get database meta information.(for multi language)
|
||||
* @param object Database item
|
||||
* @param names Meta name array (for multi language)
|
||||
* @returns {String} meta value
|
||||
*/
|
||||
var getMetaValues = function (object, names) {
|
||||
var metaValue;
|
||||
names.some(function (name) {
|
||||
metaValue = getMetaValue(object, name);
|
||||
return metaValue !== null;
|
||||
});
|
||||
return metaValue;
|
||||
};
|
||||
/**
|
||||
* Get database meta information.(for multi language)
|
||||
* @param object Database item
|
||||
* @param names Meta name array (for multi language)
|
||||
* @returns {String} meta value
|
||||
*/
|
||||
var getMetaValues = function (object, names) {
|
||||
var metaValue;
|
||||
names.some(function (name) {
|
||||
metaValue = getMetaValue(object, name);
|
||||
return metaValue !== null;
|
||||
});
|
||||
return metaValue;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert escape characters.(require any window object)
|
||||
* @param text Target text
|
||||
* @returns {String} Converted text
|
||||
*/
|
||||
var convertEscapeCharacters = function (text) {
|
||||
var windowLayer = SceneManager._scene._windowLayer;
|
||||
return windowLayer ? windowLayer.children[0].convertEscapeCharacters(text.toString()) : text;
|
||||
};
|
||||
/**
|
||||
* Convert escape characters.(require any window object)
|
||||
* @param text Target text
|
||||
* @returns {String} Converted text
|
||||
*/
|
||||
var convertEscapeCharacters = function (text) {
|
||||
var windowLayer = SceneManager._scene._windowLayer;
|
||||
return windowLayer
|
||||
? windowLayer.children[0].convertEscapeCharacters(text.toString())
|
||||
: text;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create plugin parameter. param[paramName] ex. param.commandPrefix
|
||||
* @param pluginName plugin name(EncounterSwitchConditions)
|
||||
* @returns {Object} Created parameter
|
||||
*/
|
||||
var createPluginParameter = function (pluginName) {
|
||||
var paramReplacer = function (key, value) {
|
||||
if (value === 'null') {
|
||||
return value;
|
||||
}
|
||||
if (value[0] === '"' && value[value.length - 1] === '"') {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
} catch (e) {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
var parameter = JSON.parse(JSON.stringify(PluginManager.parameters(pluginName), paramReplacer));
|
||||
PluginManager.setParameters(pluginName, parameter);
|
||||
return parameter;
|
||||
/**
|
||||
* Create plugin parameter. param[paramName] ex. param.commandPrefix
|
||||
* @param pluginName plugin name(EncounterSwitchConditions)
|
||||
* @returns {Object} Created parameter
|
||||
*/
|
||||
var createPluginParameter = function (pluginName) {
|
||||
var paramReplacer = function (key, value) {
|
||||
if (value === "null") {
|
||||
return value;
|
||||
}
|
||||
if (value[0] === '"' && value[value.length - 1] === '"') {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
} catch (e) {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
var param = createPluginParameter('EventMovableLimitation');
|
||||
var parameter = JSON.parse(
|
||||
JSON.stringify(PluginManager.parameters(pluginName), paramReplacer)
|
||||
);
|
||||
PluginManager.setParameters(pluginName, parameter);
|
||||
return parameter;
|
||||
};
|
||||
var param = createPluginParameter("EventMovableLimitation");
|
||||
|
||||
var _Game_Event_initialize = Game_Event.prototype.initialize;
|
||||
Game_Event.prototype.initialize = function (mapId, eventId) {
|
||||
_Game_Event_initialize.apply(this, arguments);
|
||||
var movables = getMetaValues(this.event(), ['移動制限', 'Movable']);
|
||||
if (movables) {
|
||||
this._movables = movables.split(',').map(function (value) {
|
||||
return parseInt(value);
|
||||
});
|
||||
this._initX = this._x;
|
||||
this._initY = this._y;
|
||||
}
|
||||
};
|
||||
var _Game_Event_initialize = Game_Event.prototype.initialize;
|
||||
Game_Event.prototype.initialize = function (mapId, eventId) {
|
||||
_Game_Event_initialize.apply(this, arguments);
|
||||
var movables = getMetaValues(this.event(), ["移動制限", "Movable"]);
|
||||
if (movables) {
|
||||
this._movables = movables.split(",").map(function (value) {
|
||||
return parseInt(value);
|
||||
});
|
||||
this._initX = this._x;
|
||||
this._initY = this._y;
|
||||
}
|
||||
};
|
||||
|
||||
var _Game_Event_canPass = Game_Event.prototype.canPass;
|
||||
Game_Event.prototype.canPass = function (x, y, d) {
|
||||
if (this._movables) {
|
||||
var x2 = $gameMap.roundXWithDirection(x, d);
|
||||
var y2 = $gameMap.roundYWithDirection(y, d);
|
||||
if (this._movables[0] >= 0 && this._initY - y2 > this._movables[0]) {
|
||||
return false;
|
||||
}
|
||||
if (this._movables[1] >= 0 && y2 - this._initY > this._movables[1]) {
|
||||
return false;
|
||||
}
|
||||
if (this._movables[2] >= 0 && this._initX - x2 > this._movables[2]) {
|
||||
return false;
|
||||
}
|
||||
if (this._movables[3] >= 0 && x2 - this._initX > this._movables[3]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return _Game_Event_canPass.apply(this, arguments);
|
||||
};
|
||||
var _Game_Event_canPass = Game_Event.prototype.canPass;
|
||||
Game_Event.prototype.canPass = function (x, y, d) {
|
||||
if (this._movables) {
|
||||
var x2 = $gameMap.roundXWithDirection(x, d);
|
||||
var y2 = $gameMap.roundYWithDirection(y, d);
|
||||
if (this._movables[0] >= 0 && this._initY - y2 > this._movables[0]) {
|
||||
return false;
|
||||
}
|
||||
if (this._movables[1] >= 0 && y2 - this._initY > this._movables[1]) {
|
||||
return false;
|
||||
}
|
||||
if (this._movables[2] >= 0 && this._initX - x2 > this._movables[2]) {
|
||||
return false;
|
||||
}
|
||||
if (this._movables[3] >= 0 && x2 - this._initX > this._movables[3]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return _Game_Event_canPass.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -38,35 +38,34 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
"use strict";
|
||||
|
||||
var _Sprite__renderCanvas = Sprite.prototype._renderCanvas;
|
||||
Sprite.prototype._renderCanvas = function (renderer) {
|
||||
_Sprite__renderCanvas.apply(this, arguments);
|
||||
if (this.isExistLoadingBitmap()) {
|
||||
this._renderCanvas_PIXI(renderer);
|
||||
var _Sprite__renderCanvas = Sprite.prototype._renderCanvas;
|
||||
Sprite.prototype._renderCanvas = function (renderer) {
|
||||
_Sprite__renderCanvas.apply(this, arguments);
|
||||
if (this.isExistLoadingBitmap()) {
|
||||
this._renderCanvas_PIXI(renderer);
|
||||
}
|
||||
};
|
||||
|
||||
var _Sprite__renderWebGL = Sprite.prototype._renderWebGL;
|
||||
Sprite.prototype._renderWebGL = function (renderer) {
|
||||
_Sprite__renderWebGL.apply(this, arguments);
|
||||
if (this.isExistLoadingBitmap()) {
|
||||
if (this._isPicture) {
|
||||
this._speedUpCustomBlendModes(renderer);
|
||||
renderer.setObjectRenderer(renderer.plugins.picture);
|
||||
if (!this.isVideoPicture || !this.isVideoPicture()) {
|
||||
renderer.plugins.picture.render(this);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
renderer.setObjectRenderer(renderer.plugins.sprite);
|
||||
renderer.plugins.sprite.render(this);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var _Sprite__renderWebGL = Sprite.prototype._renderWebGL;
|
||||
Sprite.prototype._renderWebGL = function (renderer) {
|
||||
_Sprite__renderWebGL.apply(this, arguments);
|
||||
if (this.isExistLoadingBitmap()) {
|
||||
if (this._isPicture) {
|
||||
this._speedUpCustomBlendModes(renderer);
|
||||
renderer.setObjectRenderer(renderer.plugins.picture);
|
||||
if (!this.isVideoPicture || !this.isVideoPicture()) {
|
||||
renderer.plugins.picture.render(this);
|
||||
}
|
||||
} else {
|
||||
renderer.setObjectRenderer(renderer.plugins.sprite);
|
||||
renderer.plugins.sprite.render(this);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Sprite.prototype.isExistLoadingBitmap = function () {
|
||||
return this.bitmap && !this.bitmap.isReady();
|
||||
};
|
||||
Sprite.prototype.isExistLoadingBitmap = function () {
|
||||
return this.bitmap && !this.bitmap.isReady();
|
||||
};
|
||||
})();
|
||||
|
||||
|
|
|
|||
|
|
@ -90,41 +90,49 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
var pluginName = 'FloatVariables';
|
||||
"use strict";
|
||||
var pluginName = "FloatVariables";
|
||||
|
||||
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 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 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 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 paramFloatVariableStart = getParamNumber(['FloatVariableStart', '小数変数開始位置']);
|
||||
var paramFloatVariableEnd = getParamNumber(['FloatVariableEnd', '小数変数終了位置']);
|
||||
//=============================================================================
|
||||
// パラメータの取得と整形
|
||||
//=============================================================================
|
||||
var paramFloatVariableStart = getParamNumber([
|
||||
"FloatVariableStart",
|
||||
"小数変数開始位置",
|
||||
]);
|
||||
var paramFloatVariableEnd = getParamNumber([
|
||||
"FloatVariableEnd",
|
||||
"小数変数終了位置",
|
||||
]);
|
||||
|
||||
var _Game_Variables_setValue = Game_Variables.prototype.setValue;
|
||||
Game_Variables.prototype.setValue = function (variableId, value) {
|
||||
if (variableId >= paramFloatVariableStart && variableId <= paramFloatVariableEnd) {
|
||||
if (variableId > 0 && variableId < $dataSystem.variables.length) {
|
||||
this._data[variableId] = value;
|
||||
this.onChange();
|
||||
}
|
||||
} else {
|
||||
_Game_Variables_setValue.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
var _Game_Variables_setValue = Game_Variables.prototype.setValue;
|
||||
Game_Variables.prototype.setValue = function (variableId, value) {
|
||||
if (
|
||||
variableId >= paramFloatVariableStart &&
|
||||
variableId <= paramFloatVariableEnd
|
||||
) {
|
||||
if (variableId > 0 && variableId < $dataSystem.variables.length) {
|
||||
this._data[variableId] = value;
|
||||
this.onChange();
|
||||
}
|
||||
} else {
|
||||
_Game_Variables_setValue.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
/*:
|
||||
* @plugindesc display foreground tiling sprite(Ver1.0.1)
|
||||
* @author Sasuke KANNAZUKI (thanks to Yoji Ojima)
|
||||
*
|
||||
*
|
||||
* @noteParam fgName
|
||||
* @noteRequire 1
|
||||
* @noteDir img/parallaxes/
|
||||
* @noteType file
|
||||
* @noteData maps
|
||||
*
|
||||
*
|
||||
* @help This plugin does not provide plugin commands.
|
||||
*
|
||||
* 'foreground' is like a parallax that displays over the map.
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
*
|
||||
* Map Note:
|
||||
* write down following 5 settings at map's note.
|
||||
* <fgName:name> name is the string, file name of tiling sprite.
|
||||
* <fgName:name> name is the string, file name of tiling sprite.
|
||||
* if the name starts '!', it is regarded as "foreground zero".
|
||||
* the filename is searched from img/parallaxes.
|
||||
* <fgLoopX:number> number is the flag of loop x. 0:no 1:yes
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
* <fgSy:number> number is y scroll speed.
|
||||
* when it doesn't loop y, this is ignored.
|
||||
* if this is not written on the note, it'll be 0.
|
||||
*
|
||||
*
|
||||
* Ex.
|
||||
* <fgName:sample1><fgLoopX:1><fgLoopY:1>
|
||||
*
|
||||
|
|
@ -49,13 +49,13 @@
|
|||
/*:ja
|
||||
* @plugindesc マップに合わせてスクロールする近景の設定(Ver1.0.1)
|
||||
* @author 神無月サスケ (thanks to Yoji Ojima)
|
||||
*
|
||||
*
|
||||
* @noteParam fgName
|
||||
* @noteRequire 1
|
||||
* @noteDir img/parallaxes/
|
||||
* @noteType file
|
||||
* @noteData maps
|
||||
*
|
||||
*
|
||||
* @help このプラグインにプラグインコマンドはありません。
|
||||
* 近景(foreground)は、マップの上に表示される遠景のようなものです。
|
||||
* 使用する画像ファイルは、img/parallaxes に置いてください。
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
* <fgSy:数字> Y座標のスクロール速度です
|
||||
* Y座標にループしない場合は無視されます。
|
||||
* 省略時は0になります。
|
||||
*
|
||||
*
|
||||
* 例:
|
||||
* <fgName:sample1><fgLoopX:1><fgLoopY:1>
|
||||
* sample1.png が前景になり、斜め上にループします。
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
// check zero foreground or not.
|
||||
//
|
||||
ImageManager.isZeroForeground = function (filename) {
|
||||
return filename.charAt(0) === '!';
|
||||
return filename.charAt(0) === "!";
|
||||
};
|
||||
|
||||
//
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
|
||||
Game_Map.prototype.initForeground = function () {
|
||||
this._foregroundDefined = true;
|
||||
this._foregroundName = '';
|
||||
this._foregroundName = "";
|
||||
this._foregroundZero = false;
|
||||
this._foregroundLoopX = false;
|
||||
this._foregroundLoopY = false;
|
||||
|
|
@ -146,9 +146,10 @@
|
|||
|
||||
Game_Map.prototype.setupForeground = function () {
|
||||
if ($dataMap.meta) {
|
||||
this._foregroundName = $dataMap.meta.fgName || '';
|
||||
this._foregroundName = $dataMap.meta.fgName || "";
|
||||
this._foregroundZero = ImageManager.isZeroForeground(
|
||||
this._foregroundName);
|
||||
this._foregroundName
|
||||
);
|
||||
this._foregroundLoopX = !!$dataMap.meta.fgLoopX;
|
||||
this._foregroundLoopY = !!$dataMap.meta.fgLoopY;
|
||||
this._foregroundSx = Number($dataMap.meta.fgSx) || 0;
|
||||
|
|
@ -182,7 +183,7 @@
|
|||
if (this._foregroundZero) {
|
||||
return this._foregroundX * this.tileWidth();
|
||||
} else if (this._foregroundLoopX) {
|
||||
return this._foregroundX * this.tileWidth() / 2;
|
||||
return (this._foregroundX * this.tileWidth()) / 2;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -193,7 +194,7 @@
|
|||
if (this._foregroundZero) {
|
||||
return this._foregroundY * this.tileHeight();
|
||||
} else if (this._foregroundLoopY) {
|
||||
return this._foregroundY * this.tileHeight() / 2;
|
||||
return (this._foregroundY * this.tileHeight()) / 2;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -212,8 +213,10 @@
|
|||
this._foregroundY += distance;
|
||||
}
|
||||
} else if (this.height() >= this.screenTileY()) {
|
||||
var displayY = Math.min(lastY + distance,
|
||||
this.height() - this.screenTileY());
|
||||
var displayY = Math.min(
|
||||
lastY + distance,
|
||||
this.height() - this.screenTileY()
|
||||
);
|
||||
this._foregroundY += displayY - lastY;
|
||||
}
|
||||
};
|
||||
|
|
@ -243,8 +246,10 @@
|
|||
this._foregroundX += distance;
|
||||
}
|
||||
} else if (this.width() >= this.screenTileX()) {
|
||||
var displayX = Math.min(lastX + distance,
|
||||
this.width() - this.screenTileX());
|
||||
var displayX = Math.min(
|
||||
lastX + distance,
|
||||
this.width() - this.screenTileX()
|
||||
);
|
||||
this._foregroundX += displayX - lastX;
|
||||
}
|
||||
};
|
||||
|
|
@ -318,5 +323,4 @@
|
|||
this._foreground.origin.y = $gameMap.foregroundOy();
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -40,143 +40,147 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
function convertEscape(txt) { return Window_Base.prototype.convertEscapeCharacters(txt) };
|
||||
function convertEscape(txt) {
|
||||
return Window_Base.prototype.convertEscapeCharacters(txt);
|
||||
}
|
||||
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.call(this, command, args);
|
||||
// スクリプトコマンド「HZRANDOM」
|
||||
if (command.toUpperCase() === 'HZRANDOM') {
|
||||
var type = String(args[0]);
|
||||
if (type.toUpperCase() === 'CREATE') {
|
||||
// 「HZRANDOM CREATE」:ランダムリストの作成
|
||||
var id = Number(convertEscape(args[1]));
|
||||
var min = Number(convertEscape(args[2]));
|
||||
var max = Number(convertEscape(args[3]));
|
||||
var loop = args[4] != null ? Number(convertEscape(args[4])) == 1 : false;
|
||||
$gameSystem.putHzRandomList(id, new HzRandomList(min, max, loop));
|
||||
} else if (type.toUpperCase() === 'NEXT') {
|
||||
// 「HZRANDOM NEXT」:ランダムリストの次の要素を取得
|
||||
var id = Number(convertEscape(args[1]));
|
||||
var varNo = Number(convertEscape(args[2]));
|
||||
var nextValue = $gameSystem.getNextHzRandomList(id);
|
||||
if (nextValue != null) {
|
||||
$gameVariables.setValue(varNo, nextValue);
|
||||
}
|
||||
} else if (type.toUpperCase() === 'SHUFFLE') {
|
||||
// 「HZRANDOM NEXT」:ランダムリストの再シャッフル
|
||||
var id = Number(convertEscape(args[1]));
|
||||
$gameSystem.shuffleHzRandomList(id);
|
||||
}
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.call(this, command, args);
|
||||
// スクリプトコマンド「HZRANDOM」
|
||||
if (command.toUpperCase() === "HZRANDOM") {
|
||||
var type = String(args[0]);
|
||||
if (type.toUpperCase() === "CREATE") {
|
||||
// 「HZRANDOM CREATE」:ランダムリストの作成
|
||||
var id = Number(convertEscape(args[1]));
|
||||
var min = Number(convertEscape(args[2]));
|
||||
var max = Number(convertEscape(args[3]));
|
||||
var loop =
|
||||
args[4] != null ? Number(convertEscape(args[4])) == 1 : false;
|
||||
$gameSystem.putHzRandomList(id, new HzRandomList(min, max, loop));
|
||||
} else if (type.toUpperCase() === "NEXT") {
|
||||
// 「HZRANDOM NEXT」:ランダムリストの次の要素を取得
|
||||
var id = Number(convertEscape(args[1]));
|
||||
var varNo = Number(convertEscape(args[2]));
|
||||
var nextValue = $gameSystem.getNextHzRandomList(id);
|
||||
if (nextValue != null) {
|
||||
$gameVariables.setValue(varNo, nextValue);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// ランダムリストはGame_Systemに保管。(セーブファイルに保存するため)
|
||||
//
|
||||
Game_System.prototype.putHzRandomList = function (id, list) {
|
||||
if (!this._hzrandomList) {
|
||||
this._hzrandomList = [];
|
||||
}
|
||||
this._hzrandomList[id] = list;
|
||||
};
|
||||
|
||||
Game_System.prototype.getNextHzRandomList = function (id) {
|
||||
if (!this._hzrandomList) {
|
||||
this._hzrandomList = [];
|
||||
}
|
||||
if (!this._hzrandomList[id]) {
|
||||
return null;
|
||||
}
|
||||
return HzRandomList.next(this._hzrandomList[id]);
|
||||
};
|
||||
|
||||
Game_System.prototype.shuffleHzRandomList = function (id) {
|
||||
if (!this._hzrandomList) {
|
||||
this._hzrandomList = [];
|
||||
}
|
||||
if (!this._hzrandomList[id]) {
|
||||
return;
|
||||
}
|
||||
HzRandomList.shuffle(this._hzrandomList[id]);
|
||||
};
|
||||
|
||||
function HzRandomList() {
|
||||
this.initialize.apply(this, arguments);
|
||||
} else if (type.toUpperCase() === "SHUFFLE") {
|
||||
// 「HZRANDOM NEXT」:ランダムリストの再シャッフル
|
||||
var id = Number(convertEscape(args[1]));
|
||||
$gameSystem.shuffleHzRandomList(id);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 初期化処理
|
||||
* @returns {Array|HzRandomList_L1.HzRandomList._list}
|
||||
*/
|
||||
HzRandomList.prototype.initialize = function (min, max, loop) {
|
||||
this._min = min;
|
||||
this._max = max;
|
||||
this._loop = loop;
|
||||
if (this._min > this._max) {
|
||||
var tmp = this._min;
|
||||
this._min = this._max;
|
||||
this._max = tmp;
|
||||
}
|
||||
// min~max(max含む)の配列を作成
|
||||
this._list = new Array(this._max - this._min + 1);
|
||||
for (var i = 0; i < this._max - this._min + 1; i++) {
|
||||
this._list[i] = this._min + i;
|
||||
}
|
||||
// 配列のシャッフル
|
||||
shuffle(this._list);
|
||||
// 次回取得時の配列のINDEX設定
|
||||
this._index = 0;
|
||||
};
|
||||
//
|
||||
// ランダムリストはGame_Systemに保管。(セーブファイルに保存するため)
|
||||
//
|
||||
Game_System.prototype.putHzRandomList = function (id, list) {
|
||||
if (!this._hzrandomList) {
|
||||
this._hzrandomList = [];
|
||||
}
|
||||
this._hzrandomList[id] = list;
|
||||
};
|
||||
|
||||
/**
|
||||
* ランダムリストの次の要素を返す
|
||||
* @returns {Array}
|
||||
*/
|
||||
HzRandomList.next = function (list) {
|
||||
if (list._index >= list._list.length) {
|
||||
if (!list._loop) {
|
||||
// ループ設定OFFの場合、配列を再シャッフル
|
||||
shuffle(list._list);
|
||||
}
|
||||
// INDEXを0に戻す
|
||||
list._index = 0;
|
||||
}
|
||||
// ランダムリストの要素を取得
|
||||
var value = list._list[list._index];
|
||||
// インデックスをカウントアップ
|
||||
list._index++;
|
||||
return value;
|
||||
};
|
||||
Game_System.prototype.getNextHzRandomList = function (id) {
|
||||
if (!this._hzrandomList) {
|
||||
this._hzrandomList = [];
|
||||
}
|
||||
if (!this._hzrandomList[id]) {
|
||||
return null;
|
||||
}
|
||||
return HzRandomList.next(this._hzrandomList[id]);
|
||||
};
|
||||
|
||||
/**
|
||||
* 配列を再度シャッフルする
|
||||
* @returns {undefined}
|
||||
*/
|
||||
HzRandomList.shuffle = function (list) {
|
||||
// 配列を再シャッフル
|
||||
Game_System.prototype.shuffleHzRandomList = function (id) {
|
||||
if (!this._hzrandomList) {
|
||||
this._hzrandomList = [];
|
||||
}
|
||||
if (!this._hzrandomList[id]) {
|
||||
return;
|
||||
}
|
||||
HzRandomList.shuffle(this._hzrandomList[id]);
|
||||
};
|
||||
|
||||
function HzRandomList() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初期化処理
|
||||
* @returns {Array|HzRandomList_L1.HzRandomList._list}
|
||||
*/
|
||||
HzRandomList.prototype.initialize = function (min, max, loop) {
|
||||
this._min = min;
|
||||
this._max = max;
|
||||
this._loop = loop;
|
||||
if (this._min > this._max) {
|
||||
var tmp = this._min;
|
||||
this._min = this._max;
|
||||
this._max = tmp;
|
||||
}
|
||||
// min~max(max含む)の配列を作成
|
||||
this._list = new Array(this._max - this._min + 1);
|
||||
for (var i = 0; i < this._max - this._min + 1; i++) {
|
||||
this._list[i] = this._min + i;
|
||||
}
|
||||
// 配列のシャッフル
|
||||
shuffle(this._list);
|
||||
// 次回取得時の配列のINDEX設定
|
||||
this._index = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* ランダムリストの次の要素を返す
|
||||
* @returns {Array}
|
||||
*/
|
||||
HzRandomList.next = function (list) {
|
||||
if (list._index >= list._list.length) {
|
||||
if (!list._loop) {
|
||||
// ループ設定OFFの場合、配列を再シャッフル
|
||||
shuffle(list._list);
|
||||
// INDEXを0に戻す
|
||||
list._index = 0;
|
||||
};
|
||||
}
|
||||
// INDEXを0に戻す
|
||||
list._index = 0;
|
||||
}
|
||||
// ランダムリストの要素を取得
|
||||
var value = list._list[list._index];
|
||||
// インデックスをカウントアップ
|
||||
list._index++;
|
||||
return value;
|
||||
};
|
||||
|
||||
/**
|
||||
* 配列のシャッフル用関数
|
||||
* @param {type} array
|
||||
* @returns {unresolved}
|
||||
*/
|
||||
function shuffle(array) {
|
||||
var n = array.length, t, i;
|
||||
/**
|
||||
* 配列を再度シャッフルする
|
||||
* @returns {undefined}
|
||||
*/
|
||||
HzRandomList.shuffle = function (list) {
|
||||
// 配列を再シャッフル
|
||||
shuffle(list._list);
|
||||
// INDEXを0に戻す
|
||||
list._index = 0;
|
||||
};
|
||||
|
||||
while (n) {
|
||||
i = Math.floor(Math.random() * n--);
|
||||
t = array[n];
|
||||
array[n] = array[i];
|
||||
array[i] = t;
|
||||
}
|
||||
/**
|
||||
* 配列のシャッフル用関数
|
||||
* @param {type} array
|
||||
* @returns {unresolved}
|
||||
*/
|
||||
function shuffle(array) {
|
||||
var n = array.length,
|
||||
t,
|
||||
i;
|
||||
|
||||
return array;
|
||||
while (n) {
|
||||
i = Math.floor(Math.random() * n--);
|
||||
t = array[n];
|
||||
array[n] = array[i];
|
||||
array[i] = t;
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -73,311 +73,309 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
var parameters = PluginManager.parameters("ItemBook");
|
||||
var unknownData = String(parameters["Unknown Data"] || "??????");
|
||||
var priceText = String(parameters["Price Text"] || "Price");
|
||||
var equipText = String(parameters["Equip Text"] || "Equip");
|
||||
var typeText = String(parameters["Type Text"] || "Type");
|
||||
|
||||
var parameters = PluginManager.parameters('ItemBook');
|
||||
var unknownData = String(parameters['Unknown Data'] || '??????');
|
||||
var priceText = String(parameters['Price Text'] || 'Price');
|
||||
var equipText = String(parameters['Equip Text'] || 'Equip');
|
||||
var typeText = String(parameters['Type Text'] || 'Type');
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.call(this, command, args);
|
||||
if (command === "ItemBook") {
|
||||
switch (args[0]) {
|
||||
case "open":
|
||||
SceneManager.push(Scene_ItemBook);
|
||||
break;
|
||||
case "add":
|
||||
$gameSystem.addToItemBook(args[1], Number(args[2]));
|
||||
break;
|
||||
case "remove":
|
||||
$gameSystem.removeFromItemBook(args[1], Number(args[2]));
|
||||
break;
|
||||
case "complete":
|
||||
$gameSystem.completeItemBook();
|
||||
break;
|
||||
case "clear":
|
||||
$gameSystem.clearItemBook();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.call(this, command, args);
|
||||
if (command === 'ItemBook') {
|
||||
switch (args[0]) {
|
||||
case 'open':
|
||||
SceneManager.push(Scene_ItemBook);
|
||||
break;
|
||||
case 'add':
|
||||
$gameSystem.addToItemBook(args[1], Number(args[2]));
|
||||
break;
|
||||
case 'remove':
|
||||
$gameSystem.removeFromItemBook(args[1], Number(args[2]));
|
||||
break;
|
||||
case 'complete':
|
||||
$gameSystem.completeItemBook();
|
||||
break;
|
||||
case 'clear':
|
||||
$gameSystem.clearItemBook();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
Game_System.prototype.addToItemBook = function (type, dataId) {
|
||||
if (!this._ItemBookFlags) {
|
||||
this.clearItemBook();
|
||||
}
|
||||
var typeIndex = this.itemBookTypeToIndex(type);
|
||||
if (typeIndex >= 0) {
|
||||
this._ItemBookFlags[typeIndex][dataId] = true;
|
||||
}
|
||||
};
|
||||
|
||||
Game_System.prototype.addToItemBook = function (type, dataId) {
|
||||
if (!this._ItemBookFlags) {
|
||||
this.clearItemBook();
|
||||
}
|
||||
var typeIndex = this.itemBookTypeToIndex(type);
|
||||
if (typeIndex >= 0) {
|
||||
this._ItemBookFlags[typeIndex][dataId] = true;
|
||||
}
|
||||
};
|
||||
Game_System.prototype.removeFromItemBook = function (type, dataId) {
|
||||
if (this._ItemBookFlags) {
|
||||
var typeIndex = this.itemBookTypeToIndex(type);
|
||||
if (typeIndex >= 0) {
|
||||
this._ItemBookFlags[typeIndex][dataId] = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Game_System.prototype.removeFromItemBook = function (type, dataId) {
|
||||
if (this._ItemBookFlags) {
|
||||
var typeIndex = this.itemBookTypeToIndex(type);
|
||||
if (typeIndex >= 0) {
|
||||
this._ItemBookFlags[typeIndex][dataId] = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
Game_System.prototype.itemBookTypeToIndex = function (type) {
|
||||
switch (type) {
|
||||
case "item":
|
||||
return 0;
|
||||
case "weapon":
|
||||
return 1;
|
||||
case "armor":
|
||||
return 2;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
Game_System.prototype.itemBookTypeToIndex = function (type) {
|
||||
switch (type) {
|
||||
case 'item':
|
||||
return 0;
|
||||
case 'weapon':
|
||||
return 1;
|
||||
case 'armor':
|
||||
return 2;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
Game_System.prototype.completeItemBook = function () {
|
||||
var i;
|
||||
this.clearItemBook();
|
||||
for (i = 1; i < $dataItems.length; i++) {
|
||||
this._ItemBookFlags[0][i] = true;
|
||||
}
|
||||
for (i = 1; i < $dataWeapons.length; i++) {
|
||||
this._ItemBookFlags[1][i] = true;
|
||||
}
|
||||
for (i = 1; i < $dataArmors.length; i++) {
|
||||
this._ItemBookFlags[2][i] = true;
|
||||
}
|
||||
};
|
||||
|
||||
Game_System.prototype.completeItemBook = function () {
|
||||
var i;
|
||||
this.clearItemBook();
|
||||
for (i = 1; i < $dataItems.length; i++) {
|
||||
this._ItemBookFlags[0][i] = true;
|
||||
}
|
||||
for (i = 1; i < $dataWeapons.length; i++) {
|
||||
this._ItemBookFlags[1][i] = true;
|
||||
}
|
||||
for (i = 1; i < $dataArmors.length; i++) {
|
||||
this._ItemBookFlags[2][i] = true;
|
||||
}
|
||||
};
|
||||
Game_System.prototype.clearItemBook = function () {
|
||||
this._ItemBookFlags = [[], [], []];
|
||||
};
|
||||
|
||||
Game_System.prototype.clearItemBook = function () {
|
||||
this._ItemBookFlags = [[], [], []];
|
||||
};
|
||||
Game_System.prototype.isInItemBook = function (item) {
|
||||
if (this._ItemBookFlags && item) {
|
||||
var typeIndex = -1;
|
||||
if (DataManager.isItem(item)) {
|
||||
typeIndex = 0;
|
||||
} else if (DataManager.isWeapon(item)) {
|
||||
typeIndex = 1;
|
||||
} else if (DataManager.isArmor(item)) {
|
||||
typeIndex = 2;
|
||||
}
|
||||
if (typeIndex >= 0) {
|
||||
return !!this._ItemBookFlags[typeIndex][item.id];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Game_System.prototype.isInItemBook = function (item) {
|
||||
if (this._ItemBookFlags && item) {
|
||||
var typeIndex = -1;
|
||||
if (DataManager.isItem(item)) {
|
||||
typeIndex = 0;
|
||||
} else if (DataManager.isWeapon(item)) {
|
||||
typeIndex = 1;
|
||||
} else if (DataManager.isArmor(item)) {
|
||||
typeIndex = 2;
|
||||
}
|
||||
if (typeIndex >= 0) {
|
||||
return !!this._ItemBookFlags[typeIndex][item.id];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var _Game_Party_gainItem = Game_Party.prototype.gainItem;
|
||||
Game_Party.prototype.gainItem = function (item, amount, includeEquip) {
|
||||
_Game_Party_gainItem.call(this, item, amount, includeEquip);
|
||||
if (item && amount > 0) {
|
||||
var type;
|
||||
if (DataManager.isItem(item)) {
|
||||
type = "item";
|
||||
} else if (DataManager.isWeapon(item)) {
|
||||
type = "weapon";
|
||||
} else if (DataManager.isArmor(item)) {
|
||||
type = "armor";
|
||||
}
|
||||
$gameSystem.addToItemBook(type, item.id);
|
||||
}
|
||||
};
|
||||
|
||||
var _Game_Party_gainItem = Game_Party.prototype.gainItem;
|
||||
Game_Party.prototype.gainItem = function (item, amount, includeEquip) {
|
||||
_Game_Party_gainItem.call(this, item, amount, includeEquip);
|
||||
if (item && amount > 0) {
|
||||
var type;
|
||||
if (DataManager.isItem(item)) {
|
||||
type = 'item';
|
||||
} else if (DataManager.isWeapon(item)) {
|
||||
type = 'weapon';
|
||||
} else if (DataManager.isArmor(item)) {
|
||||
type = 'armor';
|
||||
}
|
||||
$gameSystem.addToItemBook(type, item.id);
|
||||
}
|
||||
};
|
||||
function Scene_ItemBook() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
function Scene_ItemBook() {
|
||||
this.initialize.apply(this, arguments);
|
||||
Scene_ItemBook.prototype = Object.create(Scene_MenuBase.prototype);
|
||||
Scene_ItemBook.prototype.constructor = Scene_ItemBook;
|
||||
|
||||
Scene_ItemBook.prototype.initialize = function () {
|
||||
Scene_MenuBase.prototype.initialize.call(this);
|
||||
};
|
||||
|
||||
Scene_ItemBook.prototype.create = function () {
|
||||
Scene_MenuBase.prototype.create.call(this);
|
||||
this._indexWindow = new Window_ItemBookIndex(0, 0);
|
||||
this._indexWindow.setHandler("cancel", this.popScene.bind(this));
|
||||
var wy = this._indexWindow.height;
|
||||
var ww = Graphics.boxWidth;
|
||||
var wh = Graphics.boxHeight - wy;
|
||||
this._statusWindow = new Window_ItemBookStatus(0, wy, ww, wh);
|
||||
this.addWindow(this._indexWindow);
|
||||
this.addWindow(this._statusWindow);
|
||||
this._indexWindow.setStatusWindow(this._statusWindow);
|
||||
};
|
||||
|
||||
function Window_ItemBookIndex() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_ItemBookIndex.prototype = Object.create(Window_Selectable.prototype);
|
||||
Window_ItemBookIndex.prototype.constructor = Window_ItemBookIndex;
|
||||
|
||||
Window_ItemBookIndex.lastTopRow = 0;
|
||||
Window_ItemBookIndex.lastIndex = 0;
|
||||
|
||||
Window_ItemBookIndex.prototype.initialize = function (x, y) {
|
||||
var width = Graphics.boxWidth;
|
||||
var height = this.fittingHeight(6);
|
||||
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
|
||||
this.refresh();
|
||||
this.setTopRow(Window_ItemBookIndex.lastTopRow);
|
||||
this.select(Window_ItemBookIndex.lastIndex);
|
||||
this.activate();
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.maxCols = function () {
|
||||
return 3;
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.maxItems = function () {
|
||||
return this._list ? this._list.length : 0;
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.setStatusWindow = function (statusWindow) {
|
||||
this._statusWindow = statusWindow;
|
||||
this.updateStatus();
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.update = function () {
|
||||
Window_Selectable.prototype.update.call(this);
|
||||
this.updateStatus();
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.updateStatus = function () {
|
||||
if (this._statusWindow) {
|
||||
var item = this._list[this.index()];
|
||||
this._statusWindow.setItem(item);
|
||||
}
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.refresh = function () {
|
||||
var i, item;
|
||||
this._list = [];
|
||||
for (i = 1; i < $dataItems.length; i++) {
|
||||
item = $dataItems[i];
|
||||
if (item.name && item.itypeId === 1 && item.meta.book !== "no") {
|
||||
this._list.push(item);
|
||||
}
|
||||
}
|
||||
for (i = 1; i < $dataWeapons.length; i++) {
|
||||
item = $dataWeapons[i];
|
||||
if (item.name && item.meta.book !== "no") {
|
||||
this._list.push(item);
|
||||
}
|
||||
}
|
||||
for (i = 1; i < $dataArmors.length; i++) {
|
||||
item = $dataArmors[i];
|
||||
if (item.name && item.meta.book !== "no") {
|
||||
this._list.push(item);
|
||||
}
|
||||
}
|
||||
this.createContents();
|
||||
this.drawAllItems();
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.drawItem = function (index) {
|
||||
var item = this._list[index];
|
||||
var rect = this.itemRect(index);
|
||||
var width = rect.width - this.textPadding();
|
||||
if ($gameSystem.isInItemBook(item)) {
|
||||
this.drawItemName(item, rect.x, rect.y, width);
|
||||
} else {
|
||||
var iw = Window_Base._iconWidth + 4;
|
||||
this.drawText(unknownData, rect.x + iw, rect.y, width - iw);
|
||||
}
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.processCancel = function () {
|
||||
Window_Selectable.prototype.processCancel.call(this);
|
||||
Window_ItemBookIndex.lastTopRow = this.topRow();
|
||||
Window_ItemBookIndex.lastIndex = this.index();
|
||||
};
|
||||
|
||||
function Window_ItemBookStatus() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_ItemBookStatus.prototype = Object.create(Window_Base.prototype);
|
||||
Window_ItemBookStatus.prototype.constructor = Window_ItemBookStatus;
|
||||
|
||||
Window_ItemBookStatus.prototype.initialize = function (x, y, width, height) {
|
||||
Window_Base.prototype.initialize.call(this, x, y, width, height);
|
||||
};
|
||||
|
||||
Window_ItemBookStatus.prototype.setItem = function (item) {
|
||||
if (this._item !== item) {
|
||||
this._item = item;
|
||||
this.refresh();
|
||||
}
|
||||
};
|
||||
|
||||
Window_ItemBookStatus.prototype.refresh = function () {
|
||||
var item = this._item;
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
var lineHeight = this.lineHeight();
|
||||
|
||||
this.contents.clear();
|
||||
|
||||
if (!item || !$gameSystem.isInItemBook(item)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Scene_ItemBook.prototype = Object.create(Scene_MenuBase.prototype);
|
||||
Scene_ItemBook.prototype.constructor = Scene_ItemBook;
|
||||
this.drawItemName(item, x, y);
|
||||
|
||||
Scene_ItemBook.prototype.initialize = function () {
|
||||
Scene_MenuBase.prototype.initialize.call(this);
|
||||
};
|
||||
x = this.textPadding();
|
||||
y = lineHeight + this.textPadding();
|
||||
|
||||
Scene_ItemBook.prototype.create = function () {
|
||||
Scene_MenuBase.prototype.create.call(this);
|
||||
this._indexWindow = new Window_ItemBookIndex(0, 0);
|
||||
this._indexWindow.setHandler('cancel', this.popScene.bind(this));
|
||||
var wy = this._indexWindow.height;
|
||||
var ww = Graphics.boxWidth;
|
||||
var wh = Graphics.boxHeight - wy;
|
||||
this._statusWindow = new Window_ItemBookStatus(0, wy, ww, wh);
|
||||
this.addWindow(this._indexWindow);
|
||||
this.addWindow(this._statusWindow);
|
||||
this._indexWindow.setStatusWindow(this._statusWindow);
|
||||
};
|
||||
var price = item.price > 0 ? item.price : "-";
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(priceText, x, y, 120);
|
||||
this.resetTextColor();
|
||||
this.drawText(price, x + 120, y, 120, "right");
|
||||
y += lineHeight;
|
||||
|
||||
function Window_ItemBookIndex() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
if (DataManager.isWeapon(item) || DataManager.isArmor(item)) {
|
||||
var etype = $dataSystem.equipTypes[item.etypeId];
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(equipText, x, y, 120);
|
||||
this.resetTextColor();
|
||||
this.drawText(etype, x + 120, y, 120, "right");
|
||||
y += lineHeight;
|
||||
|
||||
Window_ItemBookIndex.prototype = Object.create(Window_Selectable.prototype);
|
||||
Window_ItemBookIndex.prototype.constructor = Window_ItemBookIndex;
|
||||
var type;
|
||||
if (DataManager.isWeapon(item)) {
|
||||
type = $dataSystem.weaponTypes[item.wtypeId];
|
||||
} else {
|
||||
type = $dataSystem.armorTypes[item.atypeId];
|
||||
}
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(typeText, x, y, 120);
|
||||
this.resetTextColor();
|
||||
this.drawText(type, x + 120, y, 120, "right");
|
||||
|
||||
Window_ItemBookIndex.lastTopRow = 0;
|
||||
Window_ItemBookIndex.lastIndex = 0;
|
||||
|
||||
Window_ItemBookIndex.prototype.initialize = function (x, y) {
|
||||
var width = Graphics.boxWidth;
|
||||
var height = this.fittingHeight(6);
|
||||
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
|
||||
this.refresh();
|
||||
this.setTopRow(Window_ItemBookIndex.lastTopRow);
|
||||
this.select(Window_ItemBookIndex.lastIndex);
|
||||
this.activate();
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.maxCols = function () {
|
||||
return 3;
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.maxItems = function () {
|
||||
return this._list ? this._list.length : 0;
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.setStatusWindow = function (statusWindow) {
|
||||
this._statusWindow = statusWindow;
|
||||
this.updateStatus();
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.update = function () {
|
||||
Window_Selectable.prototype.update.call(this);
|
||||
this.updateStatus();
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.updateStatus = function () {
|
||||
if (this._statusWindow) {
|
||||
var item = this._list[this.index()];
|
||||
this._statusWindow.setItem(item);
|
||||
}
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.refresh = function () {
|
||||
var i, item;
|
||||
this._list = [];
|
||||
for (i = 1; i < $dataItems.length; i++) {
|
||||
item = $dataItems[i];
|
||||
if (item.name && item.itypeId === 1 && item.meta.book !== 'no') {
|
||||
this._list.push(item);
|
||||
}
|
||||
}
|
||||
for (i = 1; i < $dataWeapons.length; i++) {
|
||||
item = $dataWeapons[i];
|
||||
if (item.name && item.meta.book !== 'no') {
|
||||
this._list.push(item);
|
||||
}
|
||||
}
|
||||
for (i = 1; i < $dataArmors.length; i++) {
|
||||
item = $dataArmors[i];
|
||||
if (item.name && item.meta.book !== 'no') {
|
||||
this._list.push(item);
|
||||
}
|
||||
}
|
||||
this.createContents();
|
||||
this.drawAllItems();
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.drawItem = function (index) {
|
||||
var item = this._list[index];
|
||||
var rect = this.itemRect(index);
|
||||
var width = rect.width - this.textPadding();
|
||||
if ($gameSystem.isInItemBook(item)) {
|
||||
this.drawItemName(item, rect.x, rect.y, width);
|
||||
} else {
|
||||
var iw = Window_Base._iconWidth + 4;
|
||||
this.drawText(unknownData, rect.x + iw, rect.y, width - iw);
|
||||
}
|
||||
};
|
||||
|
||||
Window_ItemBookIndex.prototype.processCancel = function () {
|
||||
Window_Selectable.prototype.processCancel.call(this);
|
||||
Window_ItemBookIndex.lastTopRow = this.topRow();
|
||||
Window_ItemBookIndex.lastIndex = this.index();
|
||||
};
|
||||
|
||||
function Window_ItemBookStatus() {
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
Window_ItemBookStatus.prototype = Object.create(Window_Base.prototype);
|
||||
Window_ItemBookStatus.prototype.constructor = Window_ItemBookStatus;
|
||||
|
||||
Window_ItemBookStatus.prototype.initialize = function (x, y, width, height) {
|
||||
Window_Base.prototype.initialize.call(this, x, y, width, height);
|
||||
};
|
||||
|
||||
Window_ItemBookStatus.prototype.setItem = function (item) {
|
||||
if (this._item !== item) {
|
||||
this._item = item;
|
||||
this.refresh();
|
||||
}
|
||||
};
|
||||
|
||||
Window_ItemBookStatus.prototype.refresh = function () {
|
||||
var item = this._item;
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
var lineHeight = this.lineHeight();
|
||||
|
||||
this.contents.clear();
|
||||
|
||||
if (!item || !$gameSystem.isInItemBook(item)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.drawItemName(item, x, y);
|
||||
|
||||
x = this.textPadding();
|
||||
y = lineHeight + this.textPadding();
|
||||
|
||||
var price = item.price > 0 ? item.price : '-';
|
||||
x = this.textPadding() + 300;
|
||||
y = lineHeight + this.textPadding();
|
||||
for (var i = 2; i < 8; i++) {
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(priceText, x, y, 120);
|
||||
this.drawText(TextManager.param(i), x, y, 160);
|
||||
this.resetTextColor();
|
||||
this.drawText(price, x + 120, y, 120, 'right');
|
||||
this.drawText(item.params[i], x + 160, y, 60, "right");
|
||||
y += lineHeight;
|
||||
}
|
||||
}
|
||||
|
||||
if (DataManager.isWeapon(item) || DataManager.isArmor(item)) {
|
||||
var etype = $dataSystem.equipTypes[item.etypeId];
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(equipText, x, y, 120);
|
||||
this.resetTextColor();
|
||||
this.drawText(etype, x + 120, y, 120, 'right');
|
||||
y += lineHeight;
|
||||
|
||||
var type;
|
||||
if (DataManager.isWeapon(item)) {
|
||||
type = $dataSystem.weaponTypes[item.wtypeId];
|
||||
} else {
|
||||
type = $dataSystem.armorTypes[item.atypeId];
|
||||
}
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(typeText, x, y, 120);
|
||||
this.resetTextColor();
|
||||
this.drawText(type, x + 120, y, 120, 'right');
|
||||
|
||||
x = this.textPadding() + 300;
|
||||
y = lineHeight + this.textPadding();
|
||||
for (var i = 2; i < 8; i++) {
|
||||
this.changeTextColor(this.systemColor());
|
||||
this.drawText(TextManager.param(i), x, y, 160);
|
||||
this.resetTextColor();
|
||||
this.drawText(item.params[i], x + 160, y, 60, 'right');
|
||||
y += lineHeight;
|
||||
}
|
||||
}
|
||||
|
||||
x = 0;
|
||||
y = this.textPadding() * 2 + lineHeight * 7;
|
||||
this.drawTextEx(item.description, x, y);
|
||||
};
|
||||
|
||||
x = 0;
|
||||
y = this.textPadding() * 2 + lineHeight * 7;
|
||||
this.drawTextEx(item.description, x, y);
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -5,56 +5,58 @@
|
|||
/*:ja
|
||||
* @plugindesc ver1.00 メニューコマンドにロードを追加します。
|
||||
* @author まっつUP
|
||||
*
|
||||
*
|
||||
* @param loadtext
|
||||
* @desc コマンド「ロード」のコマンド名です。
|
||||
* @default ロード
|
||||
*
|
||||
* @help
|
||||
*
|
||||
*
|
||||
* RPGで笑顔を・・・
|
||||
*
|
||||
*
|
||||
* このヘルプとパラメータの説明をよくお読みになってからお使いください。
|
||||
*
|
||||
*
|
||||
* コマンド「ロード」はイベントテスト中またはセーブデータがないときは選択不能になります。
|
||||
*
|
||||
*
|
||||
* このプラグインを利用する場合は
|
||||
* readmeなどに「まっつUP」の名を入れてください。
|
||||
* また、素材のみの販売はダメです。
|
||||
* 上記以外の規約等はございません。
|
||||
* もちろんツクールMVで使用する前提です。
|
||||
* 何か不具合ありましたら気軽にどうぞ。
|
||||
*
|
||||
*
|
||||
* 免責事項:
|
||||
* このプラグインを利用したことによるいかなる損害も制作者は一切の責任を負いません。
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
(function () {
|
||||
var parameters = PluginManager.parameters("LoadComSim");
|
||||
var LCSloadtext = String(parameters["loadtext"] || "ロード");
|
||||
|
||||
var parameters = PluginManager.parameters('LoadComSim');
|
||||
var LCSloadtext = String(parameters['loadtext'] || 'ロード');
|
||||
var _Scene_Menu_createCommandWindow =
|
||||
Scene_Menu.prototype.createCommandWindow;
|
||||
Scene_Menu.prototype.createCommandWindow = function () {
|
||||
_Scene_Menu_createCommandWindow.call(this);
|
||||
this._commandWindow.setHandler("load", this.commandLoad.bind(this));
|
||||
};
|
||||
|
||||
var _Scene_Menu_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
|
||||
Scene_Menu.prototype.createCommandWindow = function () {
|
||||
_Scene_Menu_createCommandWindow.call(this);
|
||||
this._commandWindow.setHandler('load', this.commandLoad.bind(this));
|
||||
};
|
||||
Scene_Menu.prototype.commandLoad = function () {
|
||||
//新規
|
||||
SceneManager.push(Scene_Load);
|
||||
};
|
||||
|
||||
Scene_Menu.prototype.commandLoad = function () { //新規
|
||||
SceneManager.push(Scene_Load);
|
||||
};
|
||||
|
||||
var _Window_MenuCommand_addSaveCommand = Window_MenuCommand.prototype.addSaveCommand;
|
||||
Window_MenuCommand.prototype.addSaveCommand = function () {
|
||||
_Window_MenuCommand_addSaveCommand.call(this);
|
||||
var enabled = this.isLoadEnabled();
|
||||
this.addCommand(LCSloadtext, 'load', enabled);
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.isLoadEnabled = function () { //新規
|
||||
if (DataManager.isEventTest()) return false; //この行はイベントテスト中かどうか判定しています。
|
||||
return DataManager.isAnySavefileExists();
|
||||
};
|
||||
var _Window_MenuCommand_addSaveCommand =
|
||||
Window_MenuCommand.prototype.addSaveCommand;
|
||||
Window_MenuCommand.prototype.addSaveCommand = function () {
|
||||
_Window_MenuCommand_addSaveCommand.call(this);
|
||||
var enabled = this.isLoadEnabled();
|
||||
this.addCommand(LCSloadtext, "load", enabled);
|
||||
};
|
||||
|
||||
Window_MenuCommand.prototype.isLoadEnabled = function () {
|
||||
//新規
|
||||
if (DataManager.isEventTest()) return false; //この行はイベントテスト中かどうか判定しています。
|
||||
return DataManager.isAnySavefileExists();
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -19,12 +19,12 @@
|
|||
* アイテム等のメモ欄に
|
||||
* <MNKR_SwitchSell>
|
||||
* と入れてください。
|
||||
*
|
||||
*
|
||||
* プラグインパラメーターで指定したスイッチがONの時に、
|
||||
* ショップで売却できなくなります。
|
||||
*
|
||||
*
|
||||
* 購入可能で、売却不可のアイテムが作れます。
|
||||
*
|
||||
*
|
||||
*
|
||||
* 利用規約:
|
||||
* MITライセンスです。
|
||||
|
|
@ -44,9 +44,12 @@
|
|||
(() => {
|
||||
"use strict";
|
||||
|
||||
const pluginName = document.currentScript.src.split("/").pop().replace(/\.js$/, "");
|
||||
const pluginName = document.currentScript.src
|
||||
.split("/")
|
||||
.pop()
|
||||
.replace(/\.js$/, "");
|
||||
const parameters = PluginManager.parameters(pluginName);
|
||||
const switchId = Number(parameters['switchId'] || 0);
|
||||
const switchId = Number(parameters["switchId"] || 0);
|
||||
|
||||
const _Window_ShopSell_isEnabled = Window_ShopSell.prototype.isEnabled;
|
||||
Window_ShopSell.prototype.isEnabled = function (item) {
|
||||
|
|
@ -55,7 +58,8 @@
|
|||
if (item && item.meta) {
|
||||
isTag = item.meta.MNKR_SwitchSell;
|
||||
}
|
||||
return (switchSell && isTag) ? false : _Window_ShopSell_isEnabled.call(this, item);
|
||||
return switchSell && isTag
|
||||
? false
|
||||
: _Window_ShopSell_isEnabled.call(this, item);
|
||||
};
|
||||
|
||||
})();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -28,8 +28,8 @@
|
|||
*
|
||||
* @param Custom Image
|
||||
* @desc The image to use when showing "Made with MV"
|
||||
* Default:
|
||||
* @default
|
||||
* Default:
|
||||
* @default
|
||||
* @require 1
|
||||
* @dir img/system/
|
||||
* @type file
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
* @help このプラグインにはプラグインコマンドはありません。
|
||||
*
|
||||
* @param Show Made With MV
|
||||
* @desc "Made with MV"のスプラッシュ画面を表示できる/できないようにします。
|
||||
* @desc "Made with MV"のスプラッシュ画面を表示できる/できないようにします。
|
||||
* OFF - false ON - true
|
||||
* デフォルト: ON
|
||||
* @default true
|
||||
|
|
@ -73,15 +73,15 @@
|
|||
* @type file
|
||||
*
|
||||
* @param Show Custom Splash
|
||||
* @desc "Made with MV"のスプラッシュ画面を表示できる/できないようにします。
|
||||
* @desc "Made with MV"のスプラッシュ画面を表示できる/できないようにします。
|
||||
* OFF - false ON - true
|
||||
* デフォルト: OFF
|
||||
* @default false
|
||||
*
|
||||
* @param Custom Image
|
||||
* @desc "Made with MV"を表示する際に使用する画像
|
||||
* デフォルト:
|
||||
* @default
|
||||
* デフォルト:
|
||||
* @default
|
||||
* @require 1
|
||||
* @dir img/system/
|
||||
* @type file
|
||||
|
|
@ -104,16 +104,26 @@
|
|||
*/
|
||||
var Liquidize = Liquidize || {};
|
||||
Liquidize.MadeWithMV = {};
|
||||
Liquidize.MadeWithMV.Parameters = PluginManager.parameters('MadeWithMv');
|
||||
|
||||
Liquidize.MadeWithMV.ShowMV = JSON.parse(Liquidize.MadeWithMV.Parameters["Show Made With MV"]);
|
||||
Liquidize.MadeWithMV.MVImage = String(Liquidize.MadeWithMV.Parameters["Made with MV Image"]);
|
||||
Liquidize.MadeWithMV.ShowCustom = JSON.parse(Liquidize.MadeWithMV.Parameters["Show Custom Splash"]);
|
||||
Liquidize.MadeWithMV.CustomImage = String(Liquidize.MadeWithMV.Parameters["Custom Image"]);
|
||||
Liquidize.MadeWithMV.FadeOutTime = Number(Liquidize.MadeWithMV.Parameters["Fade Out Time"]) || 120;
|
||||
Liquidize.MadeWithMV.FadeInTime = Number(Liquidize.MadeWithMV.Parameters["Fade In Time"]) || 120;
|
||||
Liquidize.MadeWithMV.WaitTime = Number(Liquidize.MadeWithMV.Parameters["Wait Time"]) || 160;
|
||||
Liquidize.MadeWithMV.Parameters = PluginManager.parameters("MadeWithMv");
|
||||
|
||||
Liquidize.MadeWithMV.ShowMV = JSON.parse(
|
||||
Liquidize.MadeWithMV.Parameters["Show Made With MV"]
|
||||
);
|
||||
Liquidize.MadeWithMV.MVImage = String(
|
||||
Liquidize.MadeWithMV.Parameters["Made with MV Image"]
|
||||
);
|
||||
Liquidize.MadeWithMV.ShowCustom = JSON.parse(
|
||||
Liquidize.MadeWithMV.Parameters["Show Custom Splash"]
|
||||
);
|
||||
Liquidize.MadeWithMV.CustomImage = String(
|
||||
Liquidize.MadeWithMV.Parameters["Custom Image"]
|
||||
);
|
||||
Liquidize.MadeWithMV.FadeOutTime =
|
||||
Number(Liquidize.MadeWithMV.Parameters["Fade Out Time"]) || 120;
|
||||
Liquidize.MadeWithMV.FadeInTime =
|
||||
Number(Liquidize.MadeWithMV.Parameters["Fade In Time"]) || 120;
|
||||
Liquidize.MadeWithMV.WaitTime =
|
||||
Number(Liquidize.MadeWithMV.Parameters["Wait Time"]) || 160;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Scene_Splash
|
||||
|
|
@ -121,184 +131,194 @@ Liquidize.MadeWithMV.WaitTime = Number(Liquidize.MadeWithMV.Parameters["Wait Tim
|
|||
// This is a constructor, implementation is done in the inner scope.
|
||||
|
||||
function Scene_Splash() {
|
||||
this.initialize.apply(this, arguments);
|
||||
this.initialize.apply(this, arguments);
|
||||
}
|
||||
|
||||
(function () {
|
||||
//-----------------------------------------------------------------------------
|
||||
// Scene_Boot
|
||||
//
|
||||
// The scene class for dealing with the game boot.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Scene_Boot
|
||||
//
|
||||
// The scene class for dealing with the game boot.
|
||||
var _Scene_Boot_loadSystemImages = Scene_Boot.prototype.loadSystemImages;
|
||||
Scene_Boot.prototype.loadSystemImages = function () {
|
||||
_Scene_Boot_loadSystemImages.call(this);
|
||||
if (Liquidize.MadeWithMV.ShowMV) {
|
||||
ImageManager.loadSystem(Liquidize.MadeWithMV.MVImage);
|
||||
}
|
||||
if (Liquidize.MadeWithMV.ShowCustom) {
|
||||
ImageManager.loadSystem(Liquidize.MadeWithMV.CustomImage);
|
||||
}
|
||||
};
|
||||
|
||||
var _Scene_Boot_loadSystemImages = Scene_Boot.prototype.loadSystemImages;
|
||||
Scene_Boot.prototype.loadSystemImages = function () {
|
||||
_Scene_Boot_loadSystemImages.call(this);
|
||||
if (Liquidize.MadeWithMV.ShowMV) {
|
||||
ImageManager.loadSystem(Liquidize.MadeWithMV.MVImage);
|
||||
}
|
||||
if (Liquidize.MadeWithMV.ShowCustom) {
|
||||
ImageManager.loadSystem(Liquidize.MadeWithMV.CustomImage);
|
||||
}
|
||||
};
|
||||
var _Scene_Boot_start = Scene_Boot.prototype.start;
|
||||
Scene_Boot.prototype.start = function () {
|
||||
if (
|
||||
(Liquidize.MadeWithMV.ShowMV || Liquidize.MadeWithMV.ShowCustom) &&
|
||||
!DataManager.isBattleTest() &&
|
||||
!DataManager.isEventTest()
|
||||
) {
|
||||
SceneManager.goto(Scene_Splash);
|
||||
} else {
|
||||
_Scene_Boot_start.call(this);
|
||||
}
|
||||
};
|
||||
|
||||
var _Scene_Boot_start = Scene_Boot.prototype.start;
|
||||
Scene_Boot.prototype.start = function () {
|
||||
if ((Liquidize.MadeWithMV.ShowMV || Liquidize.MadeWithMV.ShowCustom) && !DataManager.isBattleTest() && !DataManager.isEventTest()) {
|
||||
SceneManager.goto(Scene_Splash);
|
||||
//-----------------------------------------------------------------------------
|
||||
// Scene_Splash
|
||||
//
|
||||
// The scene class for dealing with the splash screens.
|
||||
|
||||
Scene_Splash.prototype = Object.create(Scene_Base.prototype);
|
||||
Scene_Splash.prototype.constructor = Scene_Splash;
|
||||
|
||||
Scene_Splash.prototype.initialize = function () {
|
||||
Scene_Base.prototype.initialize.call(this);
|
||||
this._mvSplash = null;
|
||||
this._customSplash = null;
|
||||
this._mvWaitTime = Liquidize.MadeWithMV.WaitTime;
|
||||
this._customWaitTime = Liquidize.MadeWithMV.WaitTime;
|
||||
this._mvFadeOut = false;
|
||||
this._mvFadeIn = false;
|
||||
this._customFadeOut = false;
|
||||
this._customFadeIn = false;
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.create = function () {
|
||||
Scene_Base.prototype.create.call(this);
|
||||
this.createSplashes();
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.start = function () {
|
||||
Scene_Base.prototype.start.call(this);
|
||||
SceneManager.clearStack();
|
||||
if (this._mvSplash != null) {
|
||||
this.centerSprite(this._mvSplash);
|
||||
}
|
||||
if (this._customSplash != null) {
|
||||
this.centerSprite(this._customSplash);
|
||||
}
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.update = function () {
|
||||
if (Liquidize.MadeWithMV.ShowMV) {
|
||||
if (!this._mvFadeIn) {
|
||||
this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false);
|
||||
this._mvFadeIn = true;
|
||||
} else {
|
||||
if (this._mvWaitTime > 0 && this._mvFadeOut == false) {
|
||||
this._mvWaitTime--;
|
||||
} else {
|
||||
_Scene_Boot_start.call(this);
|
||||
if (this._mvFadeOut == false) {
|
||||
this._mvFadeOut = true;
|
||||
this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Scene_Splash
|
||||
//
|
||||
// The scene class for dealing with the splash screens.
|
||||
|
||||
Scene_Splash.prototype = Object.create(Scene_Base.prototype);
|
||||
Scene_Splash.prototype.constructor = Scene_Splash;
|
||||
|
||||
Scene_Splash.prototype.initialize = function () {
|
||||
Scene_Base.prototype.initialize.call(this);
|
||||
this._mvSplash = null;
|
||||
this._customSplash = null;
|
||||
this._mvWaitTime = Liquidize.MadeWithMV.WaitTime;
|
||||
this._customWaitTime = Liquidize.MadeWithMV.WaitTime;
|
||||
this._mvFadeOut = false;
|
||||
this._mvFadeIn = false;
|
||||
this._customFadeOut = false;
|
||||
this._customFadeIn = false;
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.create = function () {
|
||||
Scene_Base.prototype.create.call(this);
|
||||
this.createSplashes();
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.start = function () {
|
||||
Scene_Base.prototype.start.call(this);
|
||||
SceneManager.clearStack();
|
||||
if (this._mvSplash != null) {
|
||||
this.centerSprite(this._mvSplash);
|
||||
}
|
||||
if (this._customSplash != null) {
|
||||
this.centerSprite(this._customSplash);
|
||||
}
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.update = function () {
|
||||
if (Liquidize.MadeWithMV.ShowMV) {
|
||||
if (!this._mvFadeIn) {
|
||||
this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false);
|
||||
this._mvFadeIn = true;
|
||||
} else {
|
||||
if (this._mvWaitTime > 0 && this._mvFadeOut == false) {
|
||||
this._mvWaitTime--;
|
||||
} else {
|
||||
if (this._mvFadeOut == false) {
|
||||
this._mvFadeOut = true;
|
||||
this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Liquidize.MadeWithMV.ShowCustom) {
|
||||
if (Liquidize.MadeWithMV.ShowMV && this._mvFadeOut == true) {
|
||||
if (!this._customFadeIn && this._fadeDuration == 0) {
|
||||
this._customSplash.opacity = 255;
|
||||
this._customWaitTime = Liquidize.MadeWithMV.WaitTime;
|
||||
this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false);
|
||||
this._customFadeIn = true;
|
||||
} else {
|
||||
if (this._customWaitTime > 0 && this._customFadeOut == false) {
|
||||
this._customWaitTime--;
|
||||
} else {
|
||||
if (this._customFadeOut == false) {
|
||||
this._customFadeOut = true;
|
||||
this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (!Liquidize.MadeWithMV.ShowMV) {
|
||||
if (!this._customFadeIn) {
|
||||
this._customSplash.opacity = 255;
|
||||
this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false);
|
||||
this._customFadeIn = true;
|
||||
} else {
|
||||
if (this._customWaitTime > 0 && this._customFadeOut == false) {
|
||||
this._customWaitTime--;
|
||||
} else {
|
||||
if (this._customFadeOut == false) {
|
||||
this._customFadeOut = true;
|
||||
this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Liquidize.MadeWithMV.ShowCustom) {
|
||||
if (Liquidize.MadeWithMV.ShowMV && this._mvFadeOut == true && this._customFadeOut == true) {
|
||||
this.gotoTitleOrTest();
|
||||
} else if (!Liquidize.MadeWithMV.ShowMV && this._customFadeOut == true) {
|
||||
this.gotoTitleOrTest();
|
||||
}
|
||||
if (Liquidize.MadeWithMV.ShowCustom) {
|
||||
if (Liquidize.MadeWithMV.ShowMV && this._mvFadeOut == true) {
|
||||
if (!this._customFadeIn && this._fadeDuration == 0) {
|
||||
this._customSplash.opacity = 255;
|
||||
this._customWaitTime = Liquidize.MadeWithMV.WaitTime;
|
||||
this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false);
|
||||
this._customFadeIn = true;
|
||||
} else {
|
||||
if (this._mvFadeOut == true) {
|
||||
this.gotoTitleOrTest();
|
||||
if (this._customWaitTime > 0 && this._customFadeOut == false) {
|
||||
this._customWaitTime--;
|
||||
} else {
|
||||
if (this._customFadeOut == false) {
|
||||
this._customFadeOut = true;
|
||||
this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Scene_Base.prototype.update.call(this);
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.createSplashes = function () {
|
||||
if (Liquidize.MadeWithMV.ShowMV) {
|
||||
this._mvSplash = new Sprite(ImageManager.loadSystem(Liquidize.MadeWithMV.MVImage));
|
||||
this.addChild(this._mvSplash);
|
||||
}
|
||||
if (Liquidize.MadeWithMV.ShowCustom) {
|
||||
this._customSplash = new Sprite(ImageManager.loadSystem(Liquidize.MadeWithMV.CustomImage));
|
||||
this._customSplash.opacity = 0;
|
||||
this.addChild(this._customSplash);
|
||||
}
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.centerSprite = function (sprite) {
|
||||
sprite.x = Graphics.width / 2;
|
||||
sprite.y = Graphics.height / 2;
|
||||
sprite.anchor.x = 0.5;
|
||||
sprite.anchor.y = 0.5;
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.gotoTitleOrTest = function () {
|
||||
Scene_Base.prototype.start.call(this);
|
||||
SoundManager.preloadImportantSounds();
|
||||
if (DataManager.isBattleTest()) {
|
||||
DataManager.setupBattleTest();
|
||||
SceneManager.goto(Scene_Battle);
|
||||
} else if (DataManager.isEventTest()) {
|
||||
DataManager.setupEventTest();
|
||||
SceneManager.goto(Scene_Map);
|
||||
} else if (!Liquidize.MadeWithMV.ShowMV) {
|
||||
if (!this._customFadeIn) {
|
||||
this._customSplash.opacity = 255;
|
||||
this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false);
|
||||
this._customFadeIn = true;
|
||||
} else {
|
||||
this.checkPlayerLocation();
|
||||
DataManager.setupNewGame();
|
||||
SceneManager.goto(Scene_Title);
|
||||
Window_TitleCommand.initCommandPosition();
|
||||
if (this._customWaitTime > 0 && this._customFadeOut == false) {
|
||||
this._customWaitTime--;
|
||||
} else {
|
||||
if (this._customFadeOut == false) {
|
||||
this._customFadeOut = true;
|
||||
this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.updateDocumentTitle();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Scene_Splash.prototype.updateDocumentTitle = function () {
|
||||
document.title = $dataSystem.gameTitle;
|
||||
};
|
||||
if (Liquidize.MadeWithMV.ShowCustom) {
|
||||
if (
|
||||
Liquidize.MadeWithMV.ShowMV &&
|
||||
this._mvFadeOut == true &&
|
||||
this._customFadeOut == true
|
||||
) {
|
||||
this.gotoTitleOrTest();
|
||||
} else if (!Liquidize.MadeWithMV.ShowMV && this._customFadeOut == true) {
|
||||
this.gotoTitleOrTest();
|
||||
}
|
||||
} else {
|
||||
if (this._mvFadeOut == true) {
|
||||
this.gotoTitleOrTest();
|
||||
}
|
||||
}
|
||||
|
||||
Scene_Splash.prototype.checkPlayerLocation = function () {
|
||||
if ($dataSystem.startMapId === 0) {
|
||||
throw new Error('Player\'s starting position is not set');
|
||||
}
|
||||
};
|
||||
Scene_Base.prototype.update.call(this);
|
||||
};
|
||||
|
||||
})();
|
||||
Scene_Splash.prototype.createSplashes = function () {
|
||||
if (Liquidize.MadeWithMV.ShowMV) {
|
||||
this._mvSplash = new Sprite(
|
||||
ImageManager.loadSystem(Liquidize.MadeWithMV.MVImage)
|
||||
);
|
||||
this.addChild(this._mvSplash);
|
||||
}
|
||||
if (Liquidize.MadeWithMV.ShowCustom) {
|
||||
this._customSplash = new Sprite(
|
||||
ImageManager.loadSystem(Liquidize.MadeWithMV.CustomImage)
|
||||
);
|
||||
this._customSplash.opacity = 0;
|
||||
this.addChild(this._customSplash);
|
||||
}
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.centerSprite = function (sprite) {
|
||||
sprite.x = Graphics.width / 2;
|
||||
sprite.y = Graphics.height / 2;
|
||||
sprite.anchor.x = 0.5;
|
||||
sprite.anchor.y = 0.5;
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.gotoTitleOrTest = function () {
|
||||
Scene_Base.prototype.start.call(this);
|
||||
SoundManager.preloadImportantSounds();
|
||||
if (DataManager.isBattleTest()) {
|
||||
DataManager.setupBattleTest();
|
||||
SceneManager.goto(Scene_Battle);
|
||||
} else if (DataManager.isEventTest()) {
|
||||
DataManager.setupEventTest();
|
||||
SceneManager.goto(Scene_Map);
|
||||
} else {
|
||||
this.checkPlayerLocation();
|
||||
DataManager.setupNewGame();
|
||||
SceneManager.goto(Scene_Title);
|
||||
Window_TitleCommand.initCommandPosition();
|
||||
}
|
||||
this.updateDocumentTitle();
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.updateDocumentTitle = function () {
|
||||
document.title = $dataSystem.gameTitle;
|
||||
};
|
||||
|
||||
Scene_Splash.prototype.checkPlayerLocation = function () {
|
||||
if ($dataSystem.startMapId === 0) {
|
||||
throw new Error("Player's starting position is not set");
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -404,369 +404,450 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
//=============================================================================
|
||||
// ユーザ書き換え領域 - 開始 -
|
||||
// 高度な設定を記述しています。必要な場合は書き換えてください。
|
||||
//=============================================================================
|
||||
var settings = {
|
||||
/* 署名のフォント情報です。faceはあらかじめフォントをロードしておかなければ使えません */
|
||||
signature: { face: 'GameFont', color: 'rgba(255,255,255,1.0)', align: 'right' },
|
||||
/* 効果音情報です。ファイル名はプラグイン管理画面から取得します */
|
||||
se: { volume: 90, pitch: 100, pan: 0 },
|
||||
/* テストプレー以外での動作を無効にするフラグです */
|
||||
testOnly: true
|
||||
};
|
||||
//=============================================================================
|
||||
// ユーザ書き換え領域 - 終了 -
|
||||
//=============================================================================
|
||||
var pluginName = 'MakeScreenCapture';
|
||||
"use strict";
|
||||
//=============================================================================
|
||||
// ユーザ書き換え領域 - 開始 -
|
||||
// 高度な設定を記述しています。必要な場合は書き換えてください。
|
||||
//=============================================================================
|
||||
var settings = {
|
||||
/* 署名のフォント情報です。faceはあらかじめフォントをロードしておかなければ使えません */
|
||||
signature: {
|
||||
face: "GameFont",
|
||||
color: "rgba(255,255,255,1.0)",
|
||||
align: "right",
|
||||
},
|
||||
/* 効果音情報です。ファイル名はプラグイン管理画面から取得します */
|
||||
se: { volume: 90, pitch: 100, pan: 0 },
|
||||
/* テストプレー以外での動作を無効にするフラグです */
|
||||
testOnly: true,
|
||||
};
|
||||
//=============================================================================
|
||||
// ユーザ書き換え領域 - 終了 -
|
||||
//=============================================================================
|
||||
var pluginName = "MakeScreenCapture";
|
||||
|
||||
var getParamString = function (paramNames) {
|
||||
var value = getParamOther(paramNames);
|
||||
return value == null ? '' : value;
|
||||
};
|
||||
var getParamString = function (paramNames) {
|
||||
var value = getParamOther(paramNames);
|
||||
return value == null ? "" : value;
|
||||
};
|
||||
|
||||
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 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' || (value || '').toUpperCase() === 'TRUE';
|
||||
};
|
||||
var getParamBoolean = function (paramNames) {
|
||||
var value = getParamOther(paramNames);
|
||||
return (
|
||||
(value || "").toUpperCase() === "ON" ||
|
||||
(value || "").toUpperCase() === "TRUE"
|
||||
);
|
||||
};
|
||||
|
||||
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 Utils.isNwjs() ? convertEnvironmentVariable(name) : name;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
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 Utils.isNwjs() ? convertEnvironmentVariable(name) : name;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
var getCommandName = function (command) {
|
||||
return (command || '').toUpperCase();
|
||||
};
|
||||
var getCommandName = function (command) {
|
||||
return (command || "").toUpperCase();
|
||||
};
|
||||
|
||||
var getArgString = function (arg, upperFlg) {
|
||||
arg = convertEscapeCharacters(arg);
|
||||
return upperFlg ? arg.toUpperCase() : arg;
|
||||
};
|
||||
var getArgString = function (arg, upperFlg) {
|
||||
arg = convertEscapeCharacters(arg);
|
||||
return upperFlg ? arg.toUpperCase() : arg;
|
||||
};
|
||||
|
||||
var convertEnvironmentVariable = function (text) {
|
||||
if (text == null) text = '';
|
||||
text = text.replace(/%(\w+)%/gi, function () {
|
||||
return process.env[arguments[1]] || '';
|
||||
}.bind(this));
|
||||
return text;
|
||||
};
|
||||
var convertEnvironmentVariable = function (text) {
|
||||
if (text == null) text = "";
|
||||
text = text.replace(
|
||||
/%(\w+)%/gi,
|
||||
function () {
|
||||
return process.env[arguments[1]] || "";
|
||||
}.bind(this)
|
||||
);
|
||||
return text;
|
||||
};
|
||||
|
||||
var convertEscapeCharacters = function (text) {
|
||||
if (text == null) text = '';
|
||||
var window = SceneManager._scene._windowLayer.children[0];
|
||||
return window ? window.convertEscapeCharacters(text) : text;
|
||||
};
|
||||
var convertEscapeCharacters = function (text) {
|
||||
if (text == null) text = "";
|
||||
var window = SceneManager._scene._windowLayer.children[0];
|
||||
return window ? window.convertEscapeCharacters(text) : text;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// パラメータの取得と整形
|
||||
//=============================================================================
|
||||
var paramFuncKeyPngCapture = getParamString(['FuncKeyPngCapture', 'PNGキャプチャキー']);
|
||||
var paramFuncKeyJpegCapture = getParamString(['FuncKeyJpegCapture', 'JPEGキャプチャキー']);
|
||||
var paramFuncKeyWebpCapture = getParamString(['FuncKeyWebpCapture', 'WEBPキャプチャキー']);
|
||||
var paramFileName = getParamString(['FileName', 'ファイル名']);
|
||||
var paramLocation = getParamString(['Location', '出力場所']);
|
||||
var paramFileFormat = getParamString(['FileFormat', '保存形式']).toLowerCase();
|
||||
var paramSignature = getParamString(['Signature', '署名']);
|
||||
var paramSignatureImage = getParamString(['SignatureImage', '署名画像']);
|
||||
var paramSignatureSize = getParamNumber(['SignatureSize', '署名サイズ']);
|
||||
var paramNumberDigit = getParamNumber(['NumberDigit', '連番桁数']);
|
||||
var paramInterval = getParamNumber(['Interval', '実行間隔']);
|
||||
var paramSeName = getParamString(['SeName', '効果音']);
|
||||
var paramTimeStamp = getParamBoolean(['TimeStamp', 'タイムスタンプ']);
|
||||
var paramJpegQuality = getParamNumber(['JpegQuality', 'JPEG品質']);
|
||||
var paramSimultaneousCtrl = getParamBoolean(['SimultaneousCtrl', 'Ctrl同時押し']);
|
||||
var paramSimultaneousAlt = getParamBoolean(['SimultaneousAlt', 'Alt同時押し']);
|
||||
//=============================================================================
|
||||
// パラメータの取得と整形
|
||||
//=============================================================================
|
||||
var paramFuncKeyPngCapture = getParamString([
|
||||
"FuncKeyPngCapture",
|
||||
"PNGキャプチャキー",
|
||||
]);
|
||||
var paramFuncKeyJpegCapture = getParamString([
|
||||
"FuncKeyJpegCapture",
|
||||
"JPEGキャプチャキー",
|
||||
]);
|
||||
var paramFuncKeyWebpCapture = getParamString([
|
||||
"FuncKeyWebpCapture",
|
||||
"WEBPキャプチャキー",
|
||||
]);
|
||||
var paramFileName = getParamString(["FileName", "ファイル名"]);
|
||||
var paramLocation = getParamString(["Location", "出力場所"]);
|
||||
var paramFileFormat = getParamString([
|
||||
"FileFormat",
|
||||
"保存形式",
|
||||
]).toLowerCase();
|
||||
var paramSignature = getParamString(["Signature", "署名"]);
|
||||
var paramSignatureImage = getParamString(["SignatureImage", "署名画像"]);
|
||||
var paramSignatureSize = getParamNumber(["SignatureSize", "署名サイズ"]);
|
||||
var paramNumberDigit = getParamNumber(["NumberDigit", "連番桁数"]);
|
||||
var paramInterval = getParamNumber(["Interval", "実行間隔"]);
|
||||
var paramSeName = getParamString(["SeName", "効果音"]);
|
||||
var paramTimeStamp = getParamBoolean(["TimeStamp", "タイムスタンプ"]);
|
||||
var paramJpegQuality = getParamNumber(["JpegQuality", "JPEG品質"]);
|
||||
var paramSimultaneousCtrl = getParamBoolean([
|
||||
"SimultaneousCtrl",
|
||||
"Ctrl同時押し",
|
||||
]);
|
||||
var paramSimultaneousAlt = getParamBoolean([
|
||||
"SimultaneousAlt",
|
||||
"Alt同時押し",
|
||||
]);
|
||||
|
||||
//=============================================================================
|
||||
// Game_Interpreter
|
||||
// プラグインコマンドを追加定義します。
|
||||
//=============================================================================
|
||||
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.apply(this, arguments);
|
||||
this.pluginCommandMakeScreenCapture(command, args);
|
||||
};
|
||||
//=============================================================================
|
||||
// Game_Interpreter
|
||||
// プラグインコマンドを追加定義します。
|
||||
//=============================================================================
|
||||
var _Game_Interpreter_pluginCommand =
|
||||
Game_Interpreter.prototype.pluginCommand;
|
||||
Game_Interpreter.prototype.pluginCommand = function (command, args) {
|
||||
_Game_Interpreter_pluginCommand.apply(this, arguments);
|
||||
this.pluginCommandMakeScreenCapture(command, args);
|
||||
};
|
||||
|
||||
Game_Interpreter.prototype.pluginCommandMakeScreenCapture = function (command, args) {
|
||||
switch (getCommandName(command)) {
|
||||
case 'MSC_MAKE':
|
||||
case '画面キャプチャ作成':
|
||||
SceneManager.makeCapture();
|
||||
break;
|
||||
case 'MSC_PICTURE':
|
||||
case '画面キャプチャピクチャ':
|
||||
$gameScreen.captureFlg = true;
|
||||
break;
|
||||
case 'MSC_SAVE':
|
||||
case '画面キャプチャ保存':
|
||||
SceneManager.saveCapture(getArgString(args[0]) || paramFileName, paramFileFormat);
|
||||
break;
|
||||
}
|
||||
};
|
||||
Game_Interpreter.prototype.pluginCommandMakeScreenCapture = function (
|
||||
command,
|
||||
args
|
||||
) {
|
||||
switch (getCommandName(command)) {
|
||||
case "MSC_MAKE":
|
||||
case "画面キャプチャ作成":
|
||||
SceneManager.makeCapture();
|
||||
break;
|
||||
case "MSC_PICTURE":
|
||||
case "画面キャプチャピクチャ":
|
||||
$gameScreen.captureFlg = true;
|
||||
break;
|
||||
case "MSC_SAVE":
|
||||
case "画面キャプチャ保存":
|
||||
SceneManager.saveCapture(
|
||||
getArgString(args[0]) || paramFileName,
|
||||
paramFileFormat
|
||||
);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_Screen
|
||||
// キャプチャピクチャ用のプロパティを追加定義します。
|
||||
//=============================================================================
|
||||
var _Game_Screen_clear = Game_Screen.prototype.clear;
|
||||
Game_Screen.prototype.clear = function () {
|
||||
_Game_Screen_clear.apply(this, arguments);
|
||||
this.clearCapturePicture();
|
||||
};
|
||||
//=============================================================================
|
||||
// Game_Screen
|
||||
// キャプチャピクチャ用のプロパティを追加定義します。
|
||||
//=============================================================================
|
||||
var _Game_Screen_clear = Game_Screen.prototype.clear;
|
||||
Game_Screen.prototype.clear = function () {
|
||||
_Game_Screen_clear.apply(this, arguments);
|
||||
this.clearCapturePicture();
|
||||
};
|
||||
|
||||
Game_Screen.prototype.clearCapturePicture = function () {
|
||||
this.captureFlg = false;
|
||||
};
|
||||
Game_Screen.prototype.clearCapturePicture = function () {
|
||||
this.captureFlg = false;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Game_Picture
|
||||
// キャプチャピクチャ用のプロパティを追加定義します。
|
||||
//=============================================================================
|
||||
var _Game_Picture_show = Game_Picture.prototype.show;
|
||||
Game_Picture.prototype.show = function (name, origin, x, y, scaleX,
|
||||
scaleY, opacity, blendMode) {
|
||||
if ($gameScreen.captureFlg) {
|
||||
arguments[0] = Date.now().toString();
|
||||
this.captureFlg = true;
|
||||
} else {
|
||||
this.captureFlg = null;
|
||||
}
|
||||
$gameScreen.clearCapturePicture();
|
||||
_Game_Picture_show.apply(this, arguments);
|
||||
};
|
||||
//=============================================================================
|
||||
// Game_Picture
|
||||
// キャプチャピクチャ用のプロパティを追加定義します。
|
||||
//=============================================================================
|
||||
var _Game_Picture_show = Game_Picture.prototype.show;
|
||||
Game_Picture.prototype.show = function (
|
||||
name,
|
||||
origin,
|
||||
x,
|
||||
y,
|
||||
scaleX,
|
||||
scaleY,
|
||||
opacity,
|
||||
blendMode
|
||||
) {
|
||||
if ($gameScreen.captureFlg) {
|
||||
arguments[0] = Date.now().toString();
|
||||
this.captureFlg = true;
|
||||
} else {
|
||||
this.captureFlg = null;
|
||||
}
|
||||
$gameScreen.clearCapturePicture();
|
||||
_Game_Picture_show.apply(this, arguments);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Scene_Base
|
||||
// 定期実行キャプチャを定義します。
|
||||
//=============================================================================
|
||||
var _Scene_Base_update = Scene_Base.prototype.update;
|
||||
Scene_Base.prototype.update = function () {
|
||||
_Scene_Base_update.apply(this, arguments);
|
||||
var count = Graphics.frameCount;
|
||||
if (paramInterval !== 0 && Utils.isTestCapture() && (count + 1) % (paramInterval * 60) === 0) {
|
||||
SceneManager.takeCapture();
|
||||
}
|
||||
};
|
||||
//=============================================================================
|
||||
// Scene_Base
|
||||
// 定期実行キャプチャを定義します。
|
||||
//=============================================================================
|
||||
var _Scene_Base_update = Scene_Base.prototype.update;
|
||||
Scene_Base.prototype.update = function () {
|
||||
_Scene_Base_update.apply(this, arguments);
|
||||
var count = Graphics.frameCount;
|
||||
if (
|
||||
paramInterval !== 0 &&
|
||||
Utils.isTestCapture() &&
|
||||
(count + 1) % (paramInterval * 60) === 0
|
||||
) {
|
||||
SceneManager.takeCapture();
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Sprite_Picture
|
||||
// 画像の動的生成を追加定義します。
|
||||
//=============================================================================
|
||||
var _Sprite_Picture_loadBitmap = Sprite_Picture.prototype.loadBitmap;
|
||||
Sprite_Picture.prototype.loadBitmap = function () {
|
||||
if (this.picture().captureFlg) {
|
||||
this.bitmap = SceneManager.getCapture();
|
||||
} else {
|
||||
_Sprite_Picture_loadBitmap.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
//=============================================================================
|
||||
// Sprite_Picture
|
||||
// 画像の動的生成を追加定義します。
|
||||
//=============================================================================
|
||||
var _Sprite_Picture_loadBitmap = Sprite_Picture.prototype.loadBitmap;
|
||||
Sprite_Picture.prototype.loadBitmap = function () {
|
||||
if (this.picture().captureFlg) {
|
||||
this.bitmap = SceneManager.getCapture();
|
||||
} else {
|
||||
_Sprite_Picture_loadBitmap.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Utils
|
||||
// テスト用のキャプチャを許可するかどうかを返します。
|
||||
//=============================================================================
|
||||
Utils.isTestCapture = function () {
|
||||
return !settings.testOnly || Utils.isOptionValid('test');
|
||||
};
|
||||
//=============================================================================
|
||||
// Utils
|
||||
// テスト用のキャプチャを許可するかどうかを返します。
|
||||
//=============================================================================
|
||||
Utils.isTestCapture = function () {
|
||||
return !settings.testOnly || Utils.isOptionValid("test");
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Bitmap
|
||||
// 対象のビットマップを保存します。現状、ローカル環境下でのみ動作します。
|
||||
//=============================================================================
|
||||
Bitmap.prototype.save = function (fileName, format, extend) {
|
||||
var data = this._canvas.toDataURL('image/' + format, extend);
|
||||
data = data.replace(/^.*,/, '');
|
||||
if (format === 'jpeg') format = 'jpg';
|
||||
if (data) StorageManager.saveImg(fileName, format, data);
|
||||
};
|
||||
//=============================================================================
|
||||
// Bitmap
|
||||
// 対象のビットマップを保存します。現状、ローカル環境下でのみ動作します。
|
||||
//=============================================================================
|
||||
Bitmap.prototype.save = function (fileName, format, extend) {
|
||||
var data = this._canvas.toDataURL("image/" + format, extend);
|
||||
data = data.replace(/^.*,/, "");
|
||||
if (format === "jpeg") format = "jpg";
|
||||
if (data) StorageManager.saveImg(fileName, format, data);
|
||||
};
|
||||
|
||||
Bitmap.prototype.sign = function (text, fontInfo) {
|
||||
this.fontFace = fontInfo.face;
|
||||
this.fontSize = fontInfo.size;
|
||||
this.textColor = fontInfo.color;
|
||||
this.drawText(text, 8, this.height - this.fontSize - 8, this.width - 8 * 2, this.fontSize, fontInfo.align);
|
||||
};
|
||||
Bitmap.prototype.sign = function (text, fontInfo) {
|
||||
this.fontFace = fontInfo.face;
|
||||
this.fontSize = fontInfo.size;
|
||||
this.textColor = fontInfo.color;
|
||||
this.drawText(
|
||||
text,
|
||||
8,
|
||||
this.height - this.fontSize - 8,
|
||||
this.width - 8 * 2,
|
||||
this.fontSize,
|
||||
fontInfo.align
|
||||
);
|
||||
};
|
||||
|
||||
Bitmap.prototype.signAndSave = function (signature, fileName, format, signatureImage) {
|
||||
var fileFullPath = StorageManager.getLocalImgFileName(fileName);
|
||||
if (signatureImage) {
|
||||
this.signImage(signatureImage, signature);
|
||||
}
|
||||
this.sign(convertEscapeCharacters(paramSignature), signature);
|
||||
this.save(fileFullPath, format, format === 'jpeg' ? paramJpegQuality / 10 : undefined);
|
||||
};
|
||||
Bitmap.prototype.signAndSave = function (
|
||||
signature,
|
||||
fileName,
|
||||
format,
|
||||
signatureImage
|
||||
) {
|
||||
var fileFullPath = StorageManager.getLocalImgFileName(fileName);
|
||||
if (signatureImage) {
|
||||
this.signImage(signatureImage, signature);
|
||||
}
|
||||
this.sign(convertEscapeCharacters(paramSignature), signature);
|
||||
this.save(
|
||||
fileFullPath,
|
||||
format,
|
||||
format === "jpeg" ? paramJpegQuality / 10 : undefined
|
||||
);
|
||||
};
|
||||
|
||||
Bitmap.prototype.signImage = function (signBitmap, fontInfo) {
|
||||
var dx = 0, dy = this.height - signBitmap.height;
|
||||
switch (fontInfo.align) {
|
||||
case 'center':
|
||||
dx = this.width / 2 - signBitmap.width / 2;
|
||||
break;
|
||||
case 'right':
|
||||
dx = this.width - signBitmap.width;
|
||||
break;
|
||||
}
|
||||
this.blt(signBitmap, 0, 0, signBitmap.width, signBitmap.height, dx, dy);
|
||||
};
|
||||
Bitmap.prototype.signImage = function (signBitmap, fontInfo) {
|
||||
var dx = 0,
|
||||
dy = this.height - signBitmap.height;
|
||||
switch (fontInfo.align) {
|
||||
case "center":
|
||||
dx = this.width / 2 - signBitmap.width / 2;
|
||||
break;
|
||||
case "right":
|
||||
dx = this.width - signBitmap.width;
|
||||
break;
|
||||
}
|
||||
this.blt(signBitmap, 0, 0, signBitmap.width, signBitmap.height, dx, dy);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// Input
|
||||
// ファンクションキーのマップを定義します。
|
||||
//=============================================================================
|
||||
Input.functionReverseMapper = {
|
||||
F1: 112,
|
||||
F2: 113,
|
||||
F3: 114,
|
||||
F4: 115,
|
||||
F5: 116,
|
||||
F6: 117,
|
||||
F7: 118,
|
||||
F8: 119,
|
||||
F9: 120,
|
||||
F10: 121,
|
||||
F11: 122,
|
||||
F12: 123
|
||||
};
|
||||
//=============================================================================
|
||||
// Input
|
||||
// ファンクションキーのマップを定義します。
|
||||
//=============================================================================
|
||||
Input.functionReverseMapper = {
|
||||
F1: 112,
|
||||
F2: 113,
|
||||
F3: 114,
|
||||
F4: 115,
|
||||
F5: 116,
|
||||
F6: 117,
|
||||
F7: 118,
|
||||
F8: 119,
|
||||
F9: 120,
|
||||
F10: 121,
|
||||
F11: 122,
|
||||
F12: 123,
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// SceneManager
|
||||
// ファンクションキーが押下されたときにキャプチャを実行します。
|
||||
//=============================================================================
|
||||
SceneManager.captureNumber = 0;
|
||||
SceneManager.makeCapture = function () {
|
||||
if (paramSeName) {
|
||||
var se = settings.se;
|
||||
se.name = paramSeName;
|
||||
AudioManager.playSe(se);
|
||||
}
|
||||
this._captureBitmap = this.snap();
|
||||
};
|
||||
//=============================================================================
|
||||
// SceneManager
|
||||
// ファンクションキーが押下されたときにキャプチャを実行します。
|
||||
//=============================================================================
|
||||
SceneManager.captureNumber = 0;
|
||||
SceneManager.makeCapture = function () {
|
||||
if (paramSeName) {
|
||||
var se = settings.se;
|
||||
se.name = paramSeName;
|
||||
AudioManager.playSe(se);
|
||||
}
|
||||
this._captureBitmap = this.snap();
|
||||
};
|
||||
|
||||
SceneManager.getCapture = function () {
|
||||
return this._captureBitmap || ImageManager.loadEmptyBitmap();
|
||||
};
|
||||
SceneManager.getCapture = function () {
|
||||
return this._captureBitmap || ImageManager.loadEmptyBitmap();
|
||||
};
|
||||
|
||||
SceneManager.saveCapture = function (fileName, format) {
|
||||
if (!this._captureBitmap) return;
|
||||
var signature = this.getSignature();
|
||||
if (paramSignatureImage) {
|
||||
var image = ImageManager.loadPicture(paramSignatureImage, 0);
|
||||
image.addLoadListener(function () {
|
||||
this._captureBitmap.signAndSave(signature, fileName, format, image);
|
||||
}.bind(this));
|
||||
} else {
|
||||
this._captureBitmap.signAndSave(signature, fileName, format, null);
|
||||
}
|
||||
};
|
||||
SceneManager.saveCapture = function (fileName, format) {
|
||||
if (!this._captureBitmap) return;
|
||||
var signature = this.getSignature();
|
||||
if (paramSignatureImage) {
|
||||
var image = ImageManager.loadPicture(paramSignatureImage, 0);
|
||||
image.addLoadListener(
|
||||
function () {
|
||||
this._captureBitmap.signAndSave(signature, fileName, format, image);
|
||||
}.bind(this)
|
||||
);
|
||||
} else {
|
||||
this._captureBitmap.signAndSave(signature, fileName, format, null);
|
||||
}
|
||||
};
|
||||
|
||||
SceneManager.getSignature = function () {
|
||||
var signature = settings.signature;
|
||||
signature.size = paramSignatureSize;
|
||||
return signature;
|
||||
};
|
||||
SceneManager.getSignature = function () {
|
||||
var signature = settings.signature;
|
||||
signature.size = paramSignatureSize;
|
||||
return signature;
|
||||
};
|
||||
|
||||
SceneManager.takeCapture = function (format) {
|
||||
if (!format) {
|
||||
format = paramFileFormat;
|
||||
}
|
||||
this.makeCapture();
|
||||
this.saveCapture(paramFileName, format);
|
||||
};
|
||||
SceneManager.takeCapture = function (format) {
|
||||
if (!format) {
|
||||
format = paramFileFormat;
|
||||
}
|
||||
this.makeCapture();
|
||||
this.saveCapture(paramFileName, format);
|
||||
};
|
||||
|
||||
var _SceneManager_setupErrorHandlers = SceneManager.setupErrorHandlers;
|
||||
SceneManager.setupErrorHandlers = function () {
|
||||
_SceneManager_setupErrorHandlers.apply(this, arguments);
|
||||
if (Utils.isTestCapture()) {
|
||||
document.addEventListener('keyup', this.onKeyUpForCapture.bind(this));
|
||||
}
|
||||
};
|
||||
var _SceneManager_setupErrorHandlers = SceneManager.setupErrorHandlers;
|
||||
SceneManager.setupErrorHandlers = function () {
|
||||
_SceneManager_setupErrorHandlers.apply(this, arguments);
|
||||
if (Utils.isTestCapture()) {
|
||||
document.addEventListener("keyup", this.onKeyUpForCapture.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
var _SceneManager_onKeyDown = SceneManager.onKeyDown;
|
||||
SceneManager.onKeyDown = function (event) {
|
||||
_SceneManager_onKeyDown.apply(this, arguments);
|
||||
if (paramSimultaneousCtrl === event.ctrlKey && paramSimultaneousAlt === event.altKey && Utils.isTestCapture()) {
|
||||
this.onKeyDownForCapture(event);
|
||||
}
|
||||
};
|
||||
var _SceneManager_onKeyDown = SceneManager.onKeyDown;
|
||||
SceneManager.onKeyDown = function (event) {
|
||||
_SceneManager_onKeyDown.apply(this, arguments);
|
||||
if (
|
||||
paramSimultaneousCtrl === event.ctrlKey &&
|
||||
paramSimultaneousAlt === event.altKey &&
|
||||
Utils.isTestCapture()
|
||||
) {
|
||||
this.onKeyDownForCapture(event);
|
||||
}
|
||||
};
|
||||
|
||||
SceneManager.onKeyDownForCapture = function (event) {
|
||||
switch (event.keyCode) {
|
||||
case Input.functionReverseMapper[paramFuncKeyPngCapture]:
|
||||
SceneManager.takeCapture('png');
|
||||
break;
|
||||
case Input.functionReverseMapper[paramFuncKeyJpegCapture]:
|
||||
SceneManager.takeCapture('jpeg');
|
||||
break;
|
||||
case Input.functionReverseMapper[paramFuncKeyWebpCapture]:
|
||||
SceneManager.takeCapture('webp');
|
||||
break;
|
||||
}
|
||||
};
|
||||
SceneManager.onKeyDownForCapture = function (event) {
|
||||
switch (event.keyCode) {
|
||||
case Input.functionReverseMapper[paramFuncKeyPngCapture]:
|
||||
SceneManager.takeCapture("png");
|
||||
break;
|
||||
case Input.functionReverseMapper[paramFuncKeyJpegCapture]:
|
||||
SceneManager.takeCapture("jpeg");
|
||||
break;
|
||||
case Input.functionReverseMapper[paramFuncKeyWebpCapture]:
|
||||
SceneManager.takeCapture("webp");
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
SceneManager.onKeyUpForCapture = function (event) {
|
||||
// PrintScreen
|
||||
if (event.keyCode === 44) SceneManager.takeCapture();
|
||||
};
|
||||
SceneManager.onKeyUpForCapture = function (event) {
|
||||
// PrintScreen
|
||||
if (event.keyCode === 44) SceneManager.takeCapture();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// StorageManager
|
||||
// イメージファイルを保存します。
|
||||
//=============================================================================
|
||||
StorageManager.saveImg = function (fileName, format, data) {
|
||||
if (this.isLocalMode()) {
|
||||
this.saveImgToLocalFile(fileName + '.' + format, data);
|
||||
} else {
|
||||
this.saveImgToWebStorage(fileName, data);
|
||||
}
|
||||
};
|
||||
//=============================================================================
|
||||
// StorageManager
|
||||
// イメージファイルを保存します。
|
||||
//=============================================================================
|
||||
StorageManager.saveImg = function (fileName, format, data) {
|
||||
if (this.isLocalMode()) {
|
||||
this.saveImgToLocalFile(fileName + "." + format, data);
|
||||
} else {
|
||||
this.saveImgToWebStorage(fileName, data);
|
||||
}
|
||||
};
|
||||
|
||||
StorageManager.saveImgToWebStorage = function (fileName, data) {
|
||||
localStorage.setItem(fileName, data);
|
||||
};
|
||||
StorageManager.saveImgToWebStorage = function (fileName, data) {
|
||||
localStorage.setItem(fileName, data);
|
||||
};
|
||||
|
||||
StorageManager.saveImgToLocalFile = function (fileName, data) {
|
||||
var fs = require('fs');
|
||||
var dirPath = this.localImgFileDirectoryPath();
|
||||
var filePath = dirPath + fileName;
|
||||
if (!fs.existsSync(dirPath)) {
|
||||
fs.mkdirSync(dirPath);
|
||||
}
|
||||
fs.writeFileSync(filePath, new Buffer(data, 'base64'));
|
||||
};
|
||||
StorageManager.saveImgToLocalFile = function (fileName, data) {
|
||||
var fs = require("fs");
|
||||
var dirPath = this.localImgFileDirectoryPath();
|
||||
var filePath = dirPath + fileName;
|
||||
if (!fs.existsSync(dirPath)) {
|
||||
fs.mkdirSync(dirPath);
|
||||
}
|
||||
fs.writeFileSync(filePath, new Buffer(data, "base64"));
|
||||
};
|
||||
|
||||
StorageManager.localImgFileDirectoryPath = function () {
|
||||
var filePath = paramLocation;
|
||||
if (!filePath.match(/^[A-Z]:/)) {
|
||||
var path = require('path');
|
||||
filePath = path.join(path.dirname(process.mainModule.filename), filePath);
|
||||
}
|
||||
return decodeURIComponent(filePath.match(/\/$/) ? filePath : filePath + '/');
|
||||
};
|
||||
StorageManager.localImgFileDirectoryPath = function () {
|
||||
var filePath = paramLocation;
|
||||
if (!filePath.match(/^[A-Z]:/)) {
|
||||
var path = require("path");
|
||||
filePath = path.join(path.dirname(process.mainModule.filename), filePath);
|
||||
}
|
||||
return decodeURIComponent(
|
||||
filePath.match(/\/$/) ? filePath : filePath + "/"
|
||||
);
|
||||
};
|
||||
|
||||
StorageManager.getLocalImgFileName = function (fileName) {
|
||||
if (paramTimeStamp) {
|
||||
var date = new Date();
|
||||
return fileName + '_' + date.getFullYear() + (date.getMonth() + 1).padZero(2) + date.getDate().padZero(2) +
|
||||
'_' + date.getHours().padZero(2) + date.getMinutes().padZero(2) + date.getSeconds().padZero(2);
|
||||
} else {
|
||||
var number = SceneManager.captureNumber;
|
||||
if (number >= Math.pow(10, paramNumberDigit)) number = 0;
|
||||
SceneManager.captureNumber = number + 1;
|
||||
return fileName + (number > 0 ? number.padZero(paramNumberDigit) : '');
|
||||
}
|
||||
};
|
||||
StorageManager.getLocalImgFileName = function (fileName) {
|
||||
if (paramTimeStamp) {
|
||||
var date = new Date();
|
||||
return (
|
||||
fileName +
|
||||
"_" +
|
||||
date.getFullYear() +
|
||||
(date.getMonth() + 1).padZero(2) +
|
||||
date.getDate().padZero(2) +
|
||||
"_" +
|
||||
date.getHours().padZero(2) +
|
||||
date.getMinutes().padZero(2) +
|
||||
date.getSeconds().padZero(2)
|
||||
);
|
||||
} else {
|
||||
var number = SceneManager.captureNumber;
|
||||
if (number >= Math.pow(10, paramNumberDigit)) number = 0;
|
||||
SceneManager.captureNumber = number + 1;
|
||||
return fileName + (number > 0 ? number.padZero(paramNumberDigit) : "");
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -30,11 +30,10 @@
|
|||
*/
|
||||
|
||||
(function () {
|
||||
|
||||
var parameters = PluginManager.parameters('MenuCallCommon');
|
||||
var Noncha_ComEvent = Number(parameters['ComEvent'] || 1);
|
||||
var Noncha_ComCloseEvent = Number(parameters['ComCloseEvent'] || 1);
|
||||
var Noncha_ComSwitch = Number(parameters['ComSwitch'] || 1);
|
||||
var parameters = PluginManager.parameters("MenuCallCommon");
|
||||
var Noncha_ComEvent = Number(parameters["ComEvent"] || 1);
|
||||
var Noncha_ComCloseEvent = Number(parameters["ComCloseEvent"] || 1);
|
||||
var Noncha_ComSwitch = Number(parameters["ComSwitch"] || 1);
|
||||
|
||||
Scene_Map.prototype.updateCallMenu = function () {
|
||||
if (this.isMenuEnabled()) {
|
||||
|
|
@ -54,5 +53,4 @@
|
|||
this.menuCalling = false;
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue