Zexion pointed this one out to me a while ago. I was planning on updating the script and including that fix along with other new changes, but I slowly kept putting it off until I forgot about it. :T
This should go in the Tilemap#oy= method, close to the bottom of it.
# If layer is too far up screen, need to move it down
if @layer_sprites[0].y <= -(MAX_PRIORITY_LAYERS * 32) * @zoom_y
shift_amt = (($resolution.height/32.0).ceil + MAX_PRIORITY_LAYERS) * 32
layer = @layer_sprites.shift
layer.y += shift_amt * @zoom_y
layer.z += shift_amt
layer.bitmap.clear
@layer_sprites.push(layer)
#KK20
width = @layer_sprites[0].bitmap.width
num = @layer_sprites.size
@layer_sprites[num-5].bitmap.fill_rect(0,128,width,32,Color.new(0,0,0,0))
@layer_sprites[num-4].bitmap.fill_rect(0,96,width,32,Color.new(0,0,0,0))
@layer_sprites[num-3].bitmap.fill_rect(0,64,width,32,Color.new(0,0,0,0))
@layer_sprites[num-2].bitmap.fill_rect(0,32,width,32,Color.new(0,0,0,0))
@layer_sprites[num-1].bitmap.fill_rect(0,0,width,32,Color.new(0,0,0,0))
end
# If layer is too far down screen, need to move it up
if @layer_sprites[-1].y > (($resolution.height/32.0).ceil * 32) * @zoom_y
shift_amt = (($resolution.height/32.0).ceil + MAX_PRIORITY_LAYERS) * -32
layer = @layer_sprites.pop
layer.y += shift_amt * @zoom_y
layer.z += shift_amt
layer.bitmap.clear
@layer_sprites.unshift(layer)
#KK20
width = @layer_sprites[0].bitmap.width
@layer_sprites[0].bitmap.fill_rect(0,128,width,32,Color.new(0,0,0,0))
@layer_sprites[1].bitmap.fill_rect(0,96,width,32,Color.new(0,0,0,0))
@layer_sprites[2].bitmap.fill_rect(0,64,width,32,Color.new(0,0,0,0))
@layer_sprites[3].bitmap.fill_rect(0,32,width,32,Color.new(0,0,0,0))
@layer_sprites[4].bitmap.fill_rect(0,0,width,32,Color.new(0,0,0,0))
end
I probably should get back into fixing up this script again...