File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1290,15 +1290,15 @@ Game_Interpreter.prototype.command281 = function() {
12901290// Change Tileset
12911291Game_Interpreter . prototype . command282 = function ( ) {
12921292 var tileset = $dataTilesets [ this . _params [ 0 ] ] ;
1293- if ( ! this . _imageReservationId ) {
1293+ if ( ! this . _imageReservationId ) {
12941294 this . _imageReservationId = Utils . generateRuntimeId ( ) ;
1295-
1296- for ( var i = 0 ; i < tileset . tilesetNames . length ; i ++ ) {
1297- ImageManager . reserveTileset ( tileset . tilesetNames [ i ] , 0 , this . _imageReservationId ) ;
1298- }
12991295 }
13001296
1301- if ( ImageManager . isReady ( ) ) {
1297+ var allReady = tileset . tilesetNames . map ( function ( tilesetName ) {
1298+ return ImageManager . reserveTileset ( tilesetName , 0 , this . _imageReservationId ) ;
1299+ } , this ) . every ( function ( bitmap ) { return bitmap . isReady ( ) ; } ) ;
1300+
1301+ if ( allReady ) {
13021302 $gameMap . changeTileset ( this . _params [ 0 ] ) ;
13031303 ImageManager . releaseReservation ( this . _imageReservationId ) ;
13041304 this . _imageReservationId = null ;
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ Sprite_Animation.prototype.loadBitmaps = function() {
140140} ;
141141
142142Sprite_Animation . prototype . isReady = function ( ) {
143- return ImageManager . isReady ( ) ;
143+ return this . _bitmap1 && this . _bitmap1 . isReady ( ) && this . _bitmap2 && this . _bitmap2 . isReady ( ) ;
144144} ;
145145
146146Sprite_Animation . prototype . createSprites = function ( ) {
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ Window_Message.prototype.updateWait = function() {
134134
135135Window_Message . prototype . updateLoading = function ( ) {
136136 if ( this . _faceBitmap ) {
137- if ( ImageManager . isReady ( ) ) {
137+ if ( this . _faceBitmap . isReady ( ) ) {
138138 this . drawMessageFace ( ) ;
139139 this . _faceBitmap = null ;
140140 return false ;
You can’t perform that action at this time.
0 commit comments