alpine: Recolour HQ sprites
This commit is contained in:
@@ -155,6 +155,39 @@ replace_ground_sprites(4550, 'gfx/snow_grid.gimp.png', 1, 1)
|
||||
replace_sprites_template(2365, 8, 'gfx/infrastructure/tunnel_rail_grid_temperate.gimp.png', tmpl_infrastructure_railtunnels)
|
||||
replace_sprites_template(2389, 8, 'gfx/infrastructure_road_tunnel_grid.png', tmpl_temperate_road_tunnels_grid)
|
||||
|
||||
def tmpl_hq(func, **kw):
|
||||
func( 82, 8, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(162, 8, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(242, 8, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(322, 8, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(402, 8, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(482, 8, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(562, 8, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(642, 8, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(722, 8, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func( 2, 56, 59, 15, xofs=-26, yofs= 0, **kw)
|
||||
func( 66, 56, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(146, 56, 32, 18, xofs= 1, yofs= -3, **kw)
|
||||
func(194, 56, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(274, 56, 4, 5, xofs=-31, yofs= 12, **kw)
|
||||
func(290, 56, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(242, 200, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(322, 200, 64, 51, xofs=-31, yofs=-20, **kw)
|
||||
func(402, 200, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(482, 200, 64, 54, xofs=-31, yofs=-23, **kw)
|
||||
func(562, 200, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(642, 200, 64, 40, xofs=-31, yofs= -9, **kw)
|
||||
func(722, 200, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func( 2, 264, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func( 82, 264, 64, 73, xofs=-31, yofs=-42, **kw)
|
||||
func(162, 264, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(242, 264, 64, 37, xofs=-31, yofs= -6, **kw)
|
||||
func(322, 264, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
func(402, 264, 64, 77, xofs=-31, yofs=-46, **kw)
|
||||
func(482, 264, 64, 31, xofs=-31, yofs= 0, **kw)
|
||||
|
||||
replace_sprites_template(2603, 29, 'gfx/miscellaneous/hq.png', tmpl_hq)
|
||||
|
||||
|
||||
# shore sprites (replacing 16 seems to do these as well)
|
||||
# replace_shore_sprites(4062, 'gfx/water/seashore_grid_temperate.gimp.png', 1, 1)
|
||||
|
||||
@@ -109,8 +109,16 @@ def remap_file(f_in, f_out, palmap):
|
||||
im2.save(f_out)
|
||||
|
||||
|
||||
SOURCE_DIR = "/home/pavels/Projects/cmclient/local/ogfx-landscape-1.1.2-source/src/gfx"
|
||||
DEST_DIR = "gfx"
|
||||
|
||||
SOURCE_DIR = "/home/pavels/Builds/OpenGFX/sprites/png"
|
||||
land_palmap = gen_land_recolor()
|
||||
for fname in ("miscellaneous/hq.png",
|
||||
):
|
||||
remap_file(os.path.join(SOURCE_DIR, fname), os.path.join(DEST_DIR, fname), land_palmap)
|
||||
|
||||
|
||||
SOURCE_DIR = "/home/pavels/Projects/cmclient/local/ogfx-landscape-1.1.2-source/src/gfx"
|
||||
land_palmap = gen_land_recolor()
|
||||
for fname in ("grass_grid_temperate.gimp.png",
|
||||
"bare03_grid.gimp.png",
|
||||
@@ -137,6 +145,7 @@ for fname in ("infrastructure_road_tunnel_grid.png",
|
||||
remap_file(os.path.join(SOURCE_DIR, fname), os.path.join(DEST_DIR, fname), land_palmap)
|
||||
|
||||
|
||||
|
||||
def meadow_recolor(x):
|
||||
x = x.blend(spectra.rgb(0.7, 1, 0), ratio=0.2)
|
||||
return x.blend(spectra.rgb(1, 1, 0), ratio=0.4)
|
||||
|
||||
BIN
grf/alpine/gfx/miscellaneous/hq.png
Normal file
BIN
grf/alpine/gfx/miscellaneous/hq.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@@ -55,7 +55,7 @@ def fix_palette(img):
|
||||
assert (img.mode == 'P') # TODO
|
||||
pal = tuple(img.getpalette())
|
||||
if pal == PALETTE: return img
|
||||
print(f'Custom palette in file {self.filename}, converting...')
|
||||
print(f'Custom palette in file {img.filename}, converting...')
|
||||
# for i in range(256):
|
||||
# if tuple(pal[i * 3: i*3 + 3]) != PALETTE[i * 3: i*3 + 3]:
|
||||
# print(i, pal[i * 3: i*3 + 3], PALETTE[i * 3: i*3 + 3])
|
||||
|
||||
Reference in New Issue
Block a user