Battle BG fixes
This commit is contained in:
parent
ab81dafe52
commit
2d4d44d224
|
@ -139,11 +139,8 @@ static func generate_palette_from_colorarray(colors: PoolColorArray, format:=Ima
|
||||||
static func make_tile_atlas(tile_images) -> Image:
|
static func make_tile_atlas(tile_images) -> Image:
|
||||||
var image = Image.new()
|
var image = Image.new()
|
||||||
image.create(128, 128, false, INDEX_FORMAT)
|
image.create(128, 128, false, INDEX_FORMAT)
|
||||||
var tile = 0
|
for tile in len(tile_images):
|
||||||
for y in tile_images.size()/16:
|
image.blit_rect(tile_images[tile], TILE_RECT, Vector2((tile%16)*8, (tile/16)*8))
|
||||||
for x in 16:
|
|
||||||
image.blit_rect(tile_images[tile], TILE_RECT, Vector2(x*8, y*8))
|
|
||||||
tile += 1
|
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -83,9 +83,9 @@ static func apply_battle_tilemap_flips(buffer: StreamPeer, tilemap: Array):
|
||||||
tile_i += 1
|
tile_i += 1
|
||||||
|
|
||||||
static func add_anim_palettes(buffer: StreamPeer, palettes: Array):
|
static func add_anim_palettes(buffer: StreamPeer, palettes: Array):
|
||||||
# TODO: check if the very first entry is added too
|
|
||||||
var pal1_id: int = palettes[0][0]
|
var pal1_id: int = palettes[0][0]
|
||||||
var pal2_id: int = palettes[0][1]
|
var pal2_id: int = palettes[0][1]
|
||||||
|
palettes.pop_back() # Cycles look more correct without the first palettes
|
||||||
while true:
|
while true:
|
||||||
var b := buffer.get_u8()
|
var b := buffer.get_u8()
|
||||||
if b == 0xFF:
|
if b == 0xFF:
|
||||||
|
|
Loading…
Reference in New Issue