Skip to content

Commit 4b33502

Browse files
author
liply
authored
Merge branch 'master' into fix-save-array
2 parents e1247ed + 27262f0 commit 4b33502

File tree

15 files changed

+61
-18
lines changed

15 files changed

+61
-18
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,6 @@ jspm_packages
5252
dist/
5353
*.iml
5454
game/**/*
55-
todo.md
55+
todo.md
56+
corescript/**/*
57+
corescript.zip

copy-all.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
let cpx = require('cpx');
2+
let fs = require('fs');
3+
4+
const root = process.argv[2] || './corescript';
5+
cpx.copySync('./template/**/*', root);
6+
cpx.copySync('./dist/*', root + '/js');
7+
cpx.copySync('./js/libs/*', root + '/js/libs');
8+
cpx.copySync('./plugins/*', root + '/js/plugins');

js/rpg_core/Bitmap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ Bitmap.prototype._requestImage = function(url){
855855

856856
if(!Decrypter.checkImgIgnore(url) && Decrypter.hasEncryptedImages) {
857857
this._loadingState = 'decrypting';
858-
Decrypter.decryptImg(url, bitmap);
858+
Decrypter.decryptImg(url, this);
859859
} else {
860860
this._image.src = url;
861861
this._image.onload = Bitmap.prototype._onLoad.bind(this);

js/rpg_core/ShaderTilemap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ShaderTilemap.prototype.constructor = ShaderTilemap;
1515

1616
// we need this constant for some platforms (Samsung S4, S5, Tab4, HTC One H8)
1717
PIXI.glCore.VertexArrayObject.FORCE_NATIVE = true;
18-
PIXI.GC_MODES.DEFAULT = PIXI.GC_MODES.AUTO;
18+
PIXI.settings.GC_MODE = PIXI.GC_MODES.AUTO;
1919
PIXI.tilemap.TileRenderer.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;
2020

2121
/**

js/rpg_core/Sprite.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,15 @@ Object.defineProperty(Sprite.prototype, 'bitmap', {
5757
},
5858
set: function(value) {
5959
if (this._bitmap !== value) {
60-
if(!this._bitmap){
60+
this._bitmap = value;
61+
62+
if(value){
6163
this._refreshFrame = true;
62-
}else if(this._bitmap && value){
63-
this._refreshFrame = false;
64-
}else if(!value){
64+
value.addLoadListener(this._onBitmapLoad.bind(this));
65+
}else{
6566
this._refreshFrame = false;
6667
this.texture.frame = Rectangle.emptyRectangle;
6768
}
68-
69-
this._bitmap = value;
70-
if(value)value.addLoadListener(this._onBitmapLoad.bind(this));
7169
}
7270
},
7371
configurable: true
@@ -158,6 +156,7 @@ Sprite.prototype.move = function(x, y) {
158156
* @param {Number} height The height of the frame
159157
*/
160158
Sprite.prototype.setFrame = function(x, y, width, height) {
159+
this._refreshFrame = false;
161160
var frame = this._frame;
162161
if (x !== frame.x || y !== frame.y ||
163162
width !== frame.width || height !== frame.height) {

js/rpg_core/Utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Utils.RPGMAKER_NAME = 'MV';
2828
*/
2929
Utils.RPGMAKER_VERSION = "1.3.5";
3030

31-
Utils.RPGMAKER_ENGINE = "community-1.1";
31+
Utils.RPGMAKER_ENGINE = "community-1.1b";
3232

3333
/**
3434
* Checks whether the option is in the query string.

js/rpg_core/_header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//=============================================================================
2-
// rpg_core.js v1.3.5
2+
// rpg_core.js v1.3.5 (community-1.1b)
33
//=============================================================================

js/rpg_managers/_header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//=============================================================================
2-
// rpg_managers.js v1.3.5
2+
// rpg_managers.js v1.3.5 (community-1.1b)
33
//=============================================================================

js/rpg_objects/_header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//=============================================================================
2-
// rpg_objects.js v1.3.5
2+
// rpg_objects.js v1.3.5 (community-1.1b)
33
//=============================================================================

js/rpg_scenes/_header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//=============================================================================
2-
// rpg_scenes.js v1.3.5
2+
// rpg_scenes.js v1.3.5 (community-1.1b)
33
//=============================================================================

js/rpg_sprites/_header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//=============================================================================
2-
// rpg_sprites.js v1.3.5
2+
// rpg_sprites.js v1.3.5 (community-1.1b)
33
//=============================================================================

js/rpg_windows/_header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//=============================================================================
2-
// rpg_windows.js v1.3.5
2+
// rpg_windows.js v1.3.5 (community-1.1b)
33
//=============================================================================

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@
1818
"copy:main": "cpx ./js/main.js ./game/js/",
1919
"copy:template": "cpx ./template/**/* ./game/",
2020
"copy": "run-p copy:*",
21+
"copy-all": "node copy-all.js ./corescript",
22+
"zip": "bestzip corescript.zip ./corescript/",
2123
"test": "run-s build copy",
2224
"unittest": "node ./tests/test-save.js",
23-
"start": "http-server ./game/"
25+
"start": "http-server ./game/",
26+
"package": "run-s build copy-all zip"
2427
},
2528
"author": "rpgtkoolmv team",
2629
"license": "MIT",
2730
"devDependencies": {
31+
"bestzip": "^1.1.3",
2832
"concat-with-sourcemaps": "^1.0.4",
2933
"cpx": "^1.5.0",
3034
"http-server": "^0.9.0",

plugins/Debug_ReportMemory.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,25 @@
1717
*
1818
*/
1919

20+
/*:ja
21+
* @plugindesc メモリ使用量を表示します。
22+
* @author RM CoreScript team
23+
*
24+
* @help
25+
* メモリ使用量を表示します。
26+
* size: 使用量です。単位はMPixelです。
27+
* totalCount: Bitmapの数です
28+
* requestCount: 先行読み込みの数です
29+
* reservedCount: 予約の数です
30+
*
31+
* もしプラグインパラメータのリミットを超えてもずっと数値が上がり
32+
* 続ける場合は、教えていただけると幸いです。
33+
*
34+
* @param Max Pixels In MPix
35+
* @default 20
36+
*
37+
*/
38+
2039
(function(){
2140
var parameters = PluginManager.parameters('Debug_ReportMemory');
2241
var pixels = +parameters['Max Pixels In MPix'] || 20;

plugins/Debug_ThrottleImage.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@
1010
* @default 2000
1111
*/
1212

13+
/*:ja
14+
* @plugindesc 画像読み込みを遅くします
15+
* @author RM CoreScript team
16+
*
17+
* @help
18+
* デバッグ用途で、画像読み込みを遅くします。
19+
*
20+
* @param Delay
21+
* @default 2000
22+
*/
23+
1324
(function(){
1425
var parameters = PluginManager.parameters('Debug_ThrottleImage');
1526
var delay = +parameters['Delay'] || 2000;

0 commit comments

Comments
 (0)