mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Optimisation of tilemap
This commit is contained in:
@@ -112,9 +112,9 @@ class CustomTilemap
|
|||||||
@flash = nil
|
@flash = nil
|
||||||
@oxFlash = 0
|
@oxFlash = 0
|
||||||
@oyFlash = 0
|
@oyFlash = 0
|
||||||
@priotiles = []
|
@priotiles = {}
|
||||||
@priotilesfast = []
|
@priotilesfast = []
|
||||||
@prioautotiles = []
|
@prioautotiles = {}
|
||||||
@autosprites = []
|
@autosprites = []
|
||||||
@framecount = [0,0,0,0,0,0,0,0] # For autotiles
|
@framecount = [0,0,0,0,0,0,0,0] # For autotiles
|
||||||
@tilesetChanged = true
|
@tilesetChanged = true
|
||||||
@@ -376,7 +376,7 @@ class CustomTilemap
|
|||||||
def addTile(tiles,count,xpos,ypos,id)
|
def addTile(tiles,count,xpos,ypos,id)
|
||||||
terrain = @terrain_tags[id]
|
terrain = @terrain_tags[id]
|
||||||
priority = @priorities[id]
|
priority = @priorities[id]
|
||||||
if id>=384
|
if id >= 384 # Tileset tile
|
||||||
if count>=tiles.length
|
if count>=tiles.length
|
||||||
sprite = CustomTilemapSprite.new(@viewport)
|
sprite = CustomTilemapSprite.new(@viewport)
|
||||||
tiles.push(sprite,0)
|
tiles.push(sprite,0)
|
||||||
@@ -390,7 +390,7 @@ class CustomTilemap
|
|||||||
sprite.tone = @tone
|
sprite.tone = @tone
|
||||||
sprite.color = @color
|
sprite.color = @color
|
||||||
getRegularTile(sprite,id)
|
getRegularTile(sprite,id)
|
||||||
else
|
else # Autotile
|
||||||
if count>=tiles.length
|
if count>=tiles.length
|
||||||
sprite = CustomTilemapSprite.new(@viewport)
|
sprite = CustomTilemapSprite.new(@viewport)
|
||||||
tiles.push(sprite,1)
|
tiles.push(sprite,1)
|
||||||
@@ -491,7 +491,8 @@ class CustomTilemap
|
|||||||
end
|
end
|
||||||
|
|
||||||
def refresh_tileset
|
def refresh_tileset
|
||||||
i = 0; len = @regularTileInfo.length
|
i = 0
|
||||||
|
len = @regularTileInfo.length
|
||||||
while i < len
|
while i < len
|
||||||
if @regularTileInfo[i]
|
if @regularTileInfo[i]
|
||||||
@regularTileInfo[i].dispose
|
@regularTileInfo[i].dispose
|
||||||
@@ -513,7 +514,8 @@ class CustomTilemap
|
|||||||
id = @map_data[x, y, z]
|
id = @map_data[x, y, z]
|
||||||
next if id == 0
|
next if id == 0
|
||||||
next if @priorities[id] == 0 && !PBTerrain.hasReflections?(@terrain_tags[id])
|
next if @priorities[id] == 0 && !PBTerrain.hasReflections?(@terrain_tags[id])
|
||||||
@priotiles.push([x,y,z,id])
|
@priotiles[[x, y]] = [] if !@priotiles[[x, y]]
|
||||||
|
@priotiles[[x, y]].push([z, id])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -522,7 +524,8 @@ class CustomTilemap
|
|||||||
end
|
end
|
||||||
|
|
||||||
def refresh_autotiles
|
def refresh_autotiles
|
||||||
i = 0; len = @autotileInfo.length
|
i = 0
|
||||||
|
len = @autotileInfo.length
|
||||||
while i < len
|
while i < len
|
||||||
if @autotileInfo[i]
|
if @autotileInfo[i]
|
||||||
@autotileInfo[i].dispose
|
@autotileInfo[i].dispose
|
||||||
@@ -530,7 +533,8 @@ class CustomTilemap
|
|||||||
end
|
end
|
||||||
i += 1
|
i += 1
|
||||||
end
|
end
|
||||||
i = 0; len = @autosprites.length
|
i = 0
|
||||||
|
len = @autosprites.length
|
||||||
while i < len
|
while i < len
|
||||||
if @autosprites[i]
|
if @autosprites[i]
|
||||||
@autosprites[i].dispose
|
@autosprites[i].dispose
|
||||||
@@ -558,16 +562,14 @@ class CustomTilemap
|
|||||||
else
|
else
|
||||||
for y in 0...ysize
|
for y in 0...ysize
|
||||||
for x in 0...xsize
|
for x in 0...xsize
|
||||||
haveautotile = false
|
|
||||||
for z in 0...zsize
|
for z in 0...zsize
|
||||||
id = @map_data[x, y, z]
|
id = @map_data[x, y, z]
|
||||||
next if id==0 || id>=384
|
next if id == 0 || id >= 384 # Skip non-autotiles
|
||||||
next if @priorities[id] != 0 || PBTerrain.hasReflections?(@terrain_tags[id])
|
next if @priorities[id] != 0 || PBTerrain.hasReflections?(@terrain_tags[id])
|
||||||
next if @framecount[id / 48 - 1] < 2
|
next if @framecount[id / 48 - 1] < 2
|
||||||
haveautotile = true
|
@prioautotiles[[x, y]] = true
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@prioautotiles.push([x,y]) if haveautotile
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@fullyrefreshedautos = true
|
@fullyrefreshedautos = true
|
||||||
@@ -587,8 +589,7 @@ class CustomTilemap
|
|||||||
if @layer0clip && @viewport.ox == 0 && @viewport.oy == 0
|
if @layer0clip && @viewport.ox == 0 && @viewport.oy == 0
|
||||||
@layer0.ox = 0
|
@layer0.ox = 0
|
||||||
@layer0.oy = 0
|
@layer0.oy = 0
|
||||||
@layer0.src_rect.set(ptX.round,ptY.round,
|
@layer0.src_rect.set(ptX.round, ptY.round, @viewport.rect.width, @viewport.rect.height)
|
||||||
@viewport.rect.width,@viewport.rect.height)
|
|
||||||
else
|
else
|
||||||
@layer0.ox = ptX.round
|
@layer0.ox = ptX.round
|
||||||
@layer0.oy = ptY.round
|
@layer0.oy = ptY.round
|
||||||
@@ -612,8 +613,8 @@ class CustomTilemap
|
|||||||
yStart = @oyLayer0 / theight
|
yStart = @oyLayer0 / theight
|
||||||
yStart = 0 if yStart < 0
|
yStart = 0 if yStart < 0
|
||||||
xEnd = xStart + (width / twidth) + 1
|
xEnd = xStart + (width / twidth) + 1
|
||||||
yEnd = yStart+(height/theight)+1
|
|
||||||
xEnd = xsize if xEnd > xsize
|
xEnd = xsize if xEnd > xsize
|
||||||
|
yEnd = yStart + (height / theight) + 1
|
||||||
yEnd = ysize if yEnd > ysize
|
yEnd = ysize if yEnd > ysize
|
||||||
return true if xStart >= xEnd || yStart >= yEnd
|
return true if xStart >= xEnd || yStart >= yEnd
|
||||||
trans = Color.new(0, 0, 0, 0)
|
trans = Color.new(0, 0, 0, 0)
|
||||||
@@ -625,23 +626,19 @@ class CustomTilemap
|
|||||||
if !@fullyrefreshedautos
|
if !@fullyrefreshedautos
|
||||||
for y in yStart..yEnd
|
for y in yStart..yEnd
|
||||||
for x in xStart..xEnd
|
for x in xStart..xEnd
|
||||||
haveautotile = false
|
|
||||||
for z in zrange
|
for z in zrange
|
||||||
id = mapdata[x, y, z]
|
id = mapdata[x, y, z]
|
||||||
next if !id || id<48 || id>=384
|
next if !id || id < 48 || id >= 384 # Skip non-autotiles
|
||||||
prioid = @priorities[id]
|
prioid = @priorities[id]
|
||||||
next if prioid != 0 || PBTerrain.hasReflections?(@terrain_tags[id])
|
next if prioid != 0 || PBTerrain.hasReflections?(@terrain_tags[id])
|
||||||
fcount = @framecount[id / 48 - 1]
|
fcount = @framecount[id / 48 - 1]
|
||||||
next if !fcount || fcount < 2
|
next if !fcount || fcount < 2
|
||||||
if !haveautotile
|
|
||||||
haveautotile = true
|
|
||||||
overallcount += 1
|
overallcount += 1
|
||||||
xpos = (x * twidth) - @oxLayer0
|
xpos = (x * twidth) - @oxLayer0
|
||||||
ypos = (y * theight) - @oyLayer0
|
ypos = (y * theight) - @oyLayer0
|
||||||
bitmap.fill_rect(xpos, ypos, twidth, theight, trans) if overallcount <= 2000
|
bitmap.fill_rect(xpos, ypos, twidth, theight, trans) if overallcount <= 2000
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
|
||||||
for z in zrange
|
for z in zrange
|
||||||
id = mapdata[x, y, z]
|
id = mapdata[x, y, z]
|
||||||
next if !id || id < 48
|
next if !id || id < 48
|
||||||
@@ -651,9 +648,9 @@ class CustomTilemap
|
|||||||
xpos = (x * twidth) - @oxLayer0
|
xpos = (x * twidth) - @oxLayer0
|
||||||
ypos = (y * theight) - @oyLayer0
|
ypos = (y * theight) - @oyLayer0
|
||||||
count = addTile(@autosprites, count, xpos, ypos, id)
|
count = addTile(@autosprites, count, xpos, ypos, id)
|
||||||
next
|
elsif id >= 384 # Tileset tiles
|
||||||
elsif id>=384
|
temprect.set(((id - 384) & 7) * @tileSrcWidth,
|
||||||
temprect.set(((id - 384)&7)*@tileSrcWidth,((id - 384)>>3)*@tileSrcHeight,
|
((id - 384) >> 3) * @tileSrcHeight,
|
||||||
@tileSrcWidth, @tileSrcHeight)
|
@tileSrcWidth, @tileSrcHeight)
|
||||||
xpos = (x * twidth) - @oxLayer0
|
xpos = (x * twidth) - @oxLayer0
|
||||||
ypos = (y * theight) - @oyLayer0
|
ypos = (y * theight) - @oyLayer0
|
||||||
@@ -662,7 +659,7 @@ class CustomTilemap
|
|||||||
else
|
else
|
||||||
bitmap.blt(xpos, ypos, @tileset, temprect)
|
bitmap.blt(xpos, ypos, @tileset, temprect)
|
||||||
end
|
end
|
||||||
else
|
else # Autotiles
|
||||||
tilebitmap = @autotileInfo[id]
|
tilebitmap = @autotileInfo[id]
|
||||||
if !tilebitmap
|
if !tilebitmap
|
||||||
anim = autotileFrame(id)
|
anim = autotileFrame(id)
|
||||||
@@ -683,15 +680,14 @@ class CustomTilemap
|
|||||||
if !@priorect || !@priorectautos ||
|
if !@priorect || !@priorectautos ||
|
||||||
@priorect[0] != xStart || @priorect[1] != yStart ||
|
@priorect[0] != xStart || @priorect[1] != yStart ||
|
||||||
@priorect[2] != xEnd || @priorect[3] != yEnd
|
@priorect[2] != xEnd || @priorect[3] != yEnd
|
||||||
@priorectautos = @prioautotiles.find_all { |tile|
|
|
||||||
x = tile[0]
|
|
||||||
y = tile[1]
|
|
||||||
# "next" means "return" here
|
|
||||||
next !(x<xStart || x>xEnd || y<yStart || y>yEnd)
|
|
||||||
}
|
|
||||||
@priorect = [xStart, yStart, xEnd, yEnd]
|
@priorect = [xStart, yStart, xEnd, yEnd]
|
||||||
|
@priorectautos = []
|
||||||
|
for y in yStart..yEnd
|
||||||
|
for x in xStart..xEnd
|
||||||
|
@priorectautos.push([x, y]) if @prioautotiles[[x, y]]
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
# echoln ["autos",@priorect,@priorectautos.length,@prioautotiles.length]
|
|
||||||
for tile in @priorectautos
|
for tile in @priorectautos
|
||||||
x = tile[0]
|
x = tile[0]
|
||||||
y = tile[1]
|
y = tile[1]
|
||||||
@@ -706,15 +702,16 @@ class CustomTilemap
|
|||||||
next if !id || id < 48
|
next if !id || id < 48
|
||||||
prioid = @priorities[id]
|
prioid = @priorities[id]
|
||||||
next if prioid != 0 || PBTerrain.hasReflections?(@terrain_tags[id])
|
next if prioid != 0 || PBTerrain.hasReflections?(@terrain_tags[id])
|
||||||
if id>=384
|
if id >= 384 # Tileset tiles
|
||||||
temprect.set(((id - 384)&7)*@tileSrcWidth,((id - 384)>>3)*@tileSrcHeight,
|
temprect.set(((id - 384) & 7) * @tileSrcWidth,
|
||||||
|
((id - 384) >> 3) * @tileSrcHeight,
|
||||||
@tileSrcWidth, @tileSrcHeight)
|
@tileSrcWidth, @tileSrcHeight)
|
||||||
if @diffsizes
|
if @diffsizes
|
||||||
bitmap.stretch_blt(Rect.new(xpos, ypos, twidth, theight), @tileset, temprect)
|
bitmap.stretch_blt(Rect.new(xpos, ypos, twidth, theight), @tileset, temprect)
|
||||||
else
|
else
|
||||||
bitmap.blt(xpos, ypos, @tileset, temprect)
|
bitmap.blt(xpos, ypos, @tileset, temprect)
|
||||||
end
|
end
|
||||||
else
|
else # Autotiles
|
||||||
tilebitmap = @autotileInfo[id]
|
tilebitmap = @autotileInfo[id]
|
||||||
if !tilebitmap
|
if !tilebitmap
|
||||||
anim = autotileFrame(id)
|
anim = autotileFrame(id)
|
||||||
@@ -739,8 +736,7 @@ class CustomTilemap
|
|||||||
if @layer0clip
|
if @layer0clip
|
||||||
@layer0.ox = 0
|
@layer0.ox = 0
|
||||||
@layer0.oy = 0
|
@layer0.oy = 0
|
||||||
@layer0.src_rect.set(width>>2,height>>2,
|
@layer0.src_rect.set(width >> 2, height >> 2, @viewport.rect.width, @viewport.rect.height)
|
||||||
@viewport.rect.width,@viewport.rect.height)
|
|
||||||
else
|
else
|
||||||
@layer0.ox = (width >> 2)
|
@layer0.ox = (width >> 2)
|
||||||
@layer0.oy = (height >> 2)
|
@layer0.oy = (height >> 2)
|
||||||
@@ -753,8 +749,8 @@ class CustomTilemap
|
|||||||
yStart = @oyLayer0 / theight
|
yStart = @oyLayer0 / theight
|
||||||
yStart = 0 if yStart < 0
|
yStart = 0 if yStart < 0
|
||||||
xEnd = xStart + (width / twidth) + 1
|
xEnd = xStart + (width / twidth) + 1
|
||||||
yEnd = yStart+(height/theight)+1
|
|
||||||
xEnd = xsize if xEnd >= xsize
|
xEnd = xsize if xEnd >= xsize
|
||||||
|
yEnd = yStart + (height / theight) + 1
|
||||||
yEnd = ysize if yEnd >= ysize
|
yEnd = ysize if yEnd >= ysize
|
||||||
if xStart < xEnd && yStart < yEnd
|
if xStart < xEnd && yStart < yEnd
|
||||||
tmprect = Rect.new(0, 0, 0, 0)
|
tmprect = Rect.new(0, 0, 0, 0)
|
||||||
@@ -767,15 +763,16 @@ class CustomTilemap
|
|||||||
xpos = (x * twidth) - @oxLayer0
|
xpos = (x * twidth) - @oxLayer0
|
||||||
id = mapdata[x, y, z]
|
id = mapdata[x, y, z]
|
||||||
next if id == 0 || @priorities[id] != 0 || PBTerrain.hasReflections?(@terrain_tags[id])
|
next if id == 0 || @priorities[id] != 0 || PBTerrain.hasReflections?(@terrain_tags[id])
|
||||||
if id>=384
|
if id >= 384 # Tileset tiles
|
||||||
tmprect.set( ((id - 384)&7)*@tileSrcWidth,((id - 384)>>3)*@tileSrcHeight,
|
tmprect.set(((id - 384) & 7) * @tileSrcWidth,
|
||||||
|
((id - 384) >> 3) * @tileSrcHeight,
|
||||||
@tileSrcWidth, @tileSrcHeight)
|
@tileSrcWidth, @tileSrcHeight)
|
||||||
if @diffsizes
|
if @diffsizes
|
||||||
bitmap.stretch_blt(Rect.new(xpos, ypos, twidth, theight), @tileset, tmprect)
|
bitmap.stretch_blt(Rect.new(xpos, ypos, twidth, theight), @tileset, tmprect)
|
||||||
else
|
else
|
||||||
bitmap.blt(xpos, ypos, @tileset, tmprect)
|
bitmap.blt(xpos, ypos, @tileset, tmprect)
|
||||||
end
|
end
|
||||||
else
|
else # Autotiles
|
||||||
frames = @framecount[id / 48 - 1]
|
frames = @framecount[id / 48 - 1]
|
||||||
if frames <= 1
|
if frames <= 1
|
||||||
frame = 0
|
frame = 0
|
||||||
@@ -807,50 +804,30 @@ class CustomTilemap
|
|||||||
xsize = @map_data.xsize
|
xsize = @map_data.xsize
|
||||||
ysize = @map_data.ysize
|
ysize = @map_data.ysize
|
||||||
minX = (@ox / @tileWidth) - 1
|
minX = (@ox / @tileWidth) - 1
|
||||||
minX = 0 if minX<0
|
minX.clamp(0, xsize - 1)
|
||||||
minX = xsize-1 if minX>=xsize
|
|
||||||
maxX = ((@ox + @viewport.rect.width) / @tileWidth) + 1
|
maxX = ((@ox + @viewport.rect.width) / @tileWidth) + 1
|
||||||
maxX = 0 if maxX<0
|
maxX.clamp(0, xsize - 1)
|
||||||
maxX = xsize-1 if maxX>=xsize
|
|
||||||
minY = (@oy / @tileHeight) - 1
|
minY = (@oy / @tileHeight) - 1
|
||||||
minY = 0 if minY<0
|
minY.clamp(0, ysize - 1)
|
||||||
minY = ysize-1 if minY>=ysize
|
|
||||||
maxY = ((@oy + @viewport.rect.height) / @tileHeight) + 1
|
maxY = ((@oy + @viewport.rect.height) / @tileHeight) + 1
|
||||||
maxY = 0 if maxY<0
|
maxY.clamp(0, ysize - 1)
|
||||||
maxY = ysize-1 if maxY>=ysize
|
|
||||||
count = 0
|
count = 0
|
||||||
if minX < maxX && minY < maxY
|
if minX < maxX && minY < maxY
|
||||||
@usedsprites = usesprites || @usedsprites
|
@usedsprites = usesprites || @usedsprites
|
||||||
if @layer0
|
@layer0.visible = false if usesprites && @layer0
|
||||||
@layer0.visible = false if usesprites
|
|
||||||
end
|
|
||||||
if @fullyrefreshed
|
|
||||||
if !@priotilesrect || !@priotilesfast ||
|
if !@priotilesrect || !@priotilesfast ||
|
||||||
@priotilesrect[0]!=minX ||
|
@priotilesrect[0] != minX || @priotilesrect[1] != minY ||
|
||||||
@priotilesrect[1]!=minY ||
|
@priotilesrect[2] != maxX || @priotilesrect[3] != maxY
|
||||||
@priotilesrect[2]!=maxX ||
|
|
||||||
@priotilesrect[3]!=maxY
|
|
||||||
@priotilesfast = @priotiles.find_all { |tile|
|
|
||||||
x = tile[0]
|
|
||||||
y = tile[1]
|
|
||||||
# "next" means "return" here
|
|
||||||
next !(x<minX || x>maxX || y<minY || y>maxY)
|
|
||||||
}
|
|
||||||
@priotilesrect = [minX, minY, maxX, maxY]
|
@priotilesrect = [minX, minY, maxX, maxY]
|
||||||
|
@priotilesfast = []
|
||||||
|
if @fullyrefreshed
|
||||||
|
for y in minY..maxY
|
||||||
|
for x in minX..maxX
|
||||||
|
next if !@priotiles[[x, y]]
|
||||||
|
@priotiles[[x, y]].each { |tile| @priotilesfast.push([x, y, tile[0], tile[1]]) }
|
||||||
end
|
end
|
||||||
# echoln [minX,minY,maxX,maxY,@priotilesfast.length,@priotiles.length]
|
|
||||||
for prio in @priotilesfast
|
|
||||||
xpos = (prio[0]*@tileWidth)-@ox
|
|
||||||
ypos = (prio[1]*@tileHeight)-@oy
|
|
||||||
count = addTile(@tiles,count,xpos,ypos,prio[3])
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if !@priotilesrect || !@priotilesfast ||
|
|
||||||
@priotilesrect[0]!=minX ||
|
|
||||||
@priotilesrect[1]!=minY ||
|
|
||||||
@priotilesrect[2]!=maxX ||
|
|
||||||
@priotilesrect[3]!=maxY
|
|
||||||
@priotilesfast=[]
|
|
||||||
for z in 0...@map_data.zsize
|
for z in 0...@map_data.zsize
|
||||||
for y in minY..maxY
|
for y in minY..maxY
|
||||||
for x in minX..maxX
|
for x in minX..maxX
|
||||||
@@ -861,7 +838,7 @@ class CustomTilemap
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@priotilesrect = [minX,minY,maxX,maxY]
|
end
|
||||||
end
|
end
|
||||||
for prio in @priotilesfast
|
for prio in @priotilesfast
|
||||||
xpos = (prio[0] * @tileWidth) - @ox
|
xpos = (prio[0] * @tileWidth) - @ox
|
||||||
@@ -869,10 +846,10 @@ class CustomTilemap
|
|||||||
count = addTile(@tiles, count, xpos, ypos, prio[3])
|
count = addTile(@tiles, count, xpos, ypos, prio[3])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
if count < @tiles.length
|
if count < @tiles.length
|
||||||
bigchange = (count<=(@tiles.length*2/3)) && (@tiles.length*2/3)>25
|
bigchange = (count <= (@tiles.length * 2 / 3)) && @tiles.length > 40
|
||||||
j = count; len = @tiles.length
|
j = count
|
||||||
|
len = @tiles.length
|
||||||
while j < len
|
while j < len
|
||||||
sprite = @tiles[j]
|
sprite = @tiles[j]
|
||||||
@tiles[j + 1] = -1
|
@tiles[j + 1] = -1
|
||||||
@@ -923,15 +900,9 @@ class CustomTilemap
|
|||||||
refresh_autotiles
|
refresh_autotiles
|
||||||
repaintAutotiles
|
repaintAutotiles
|
||||||
end
|
end
|
||||||
if @flashChanged
|
refresh_flash if @flashChanged
|
||||||
refresh_flash
|
refresh_tileset if @tilesetChanged
|
||||||
end
|
@flash.opacity = FlashOpacity[(Graphics.frame_count / 2) % 6] if @flash
|
||||||
if @tilesetChanged
|
|
||||||
refresh_tileset
|
|
||||||
end
|
|
||||||
if @flash
|
|
||||||
@flash.opacity = FlashOpacity[(Graphics.frame_count/2) % 6]
|
|
||||||
end
|
|
||||||
mustrefresh = (@oldOx != @ox || @oldOy != @oy || @tilesetChanged || @autotiles.changed)
|
mustrefresh = (@oldOx != @ox || @oldOy != @oy || @tilesetChanged || @autotiles.changed)
|
||||||
if @viewport.ox != @oldViewportOx || @viewport.oy != @oldViewportOy
|
if @viewport.ox != @oldViewportOx || @viewport.oy != @oldViewportOy
|
||||||
mustrefresh = true
|
mustrefresh = true
|
||||||
@@ -939,7 +910,7 @@ class CustomTilemap
|
|||||||
@oldViewportOy = @viewport.oy
|
@oldViewportOy = @viewport.oy
|
||||||
end
|
end
|
||||||
refresh if mustrefresh
|
refresh if mustrefresh
|
||||||
if (Graphics.frame_count % Animated_Autotiles_Frames == 0) || @nowshown
|
if (Graphics.frame_count % Animated_Autotiles_Frames) == 0 || @nowshown
|
||||||
repaintAutotiles
|
repaintAutotiles
|
||||||
refresh(true)
|
refresh(true)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user