# HG changeset patch # User Adrianna PiƄska # Date 1252167142 0 # Node ID 3e994b3f750d758676d2ea80cf642330593b6b8e # Parent 664bba9be40abf045844b2efa757a944022d71bf added chicken feet move cursor; removed unused cursors and cursor generation code diff -r 664bba9be40a -r 3e994b3f750d data/cursors/chkn.xbm --- a/data/cursors/chkn.xbm Sat Sep 05 16:07:48 2009 +0000 +++ b/data/cursors/chkn.xbm Sat Sep 05 16:12:22 2009 +0000 @@ -1,7 +1,8 @@ -#define im_width 16 -#define im_height 16 -static char im_bits[] = { -0x1c,0x00,0x3c,0x3c,0x3e,0x7c,0x7c,0x7c,0xf8,0x3f,0xf8,0x7f,0xf8,0x3f,0xfc, -0x3f,0xfc,0x3f,0xf8,0x1f,0xf8,0x1f,0xe0,0x1f,0xc0,0x0f,0x80,0x07,0xc0,0x07, -0xe0,0x01 -}; +#define chkn_width 16 +#define chkn_height 16 +#define chkn_x_hot 8 +#define chkn_y_hot 8 +static unsigned char chkn_bits[] = { + 0x00, 0x08, 0x00, 0x08, 0x80, 0x88, 0x00, 0x49, 0x00, 0x6b, 0x10, 0x3e, + 0x10, 0x1c, 0x11, 0x1d, 0x92, 0x08, 0xd6, 0x08, 0x7c, 0x08, 0x38, 0x00, + 0x38, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00 }; diff -r 664bba9be40a -r 3e994b3f750d data/cursors/egg.xbm --- a/data/cursors/egg.xbm Sat Sep 05 16:07:48 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#define im_width 16 -#define im_height 16 -static char im_bits[] = { -0xf8,0x03,0xfc,0x07,0xfe,0x0f,0xfe,0x0f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff, -0x1f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xfe,0x0f,0xfc,0x07, -0xf8,0x03 -}; diff -r 664bba9be40a -r 3e994b3f750d data/sprites/egg.png Binary file data/sprites/egg.png has changed diff -r 664bba9be40a -r 3e994b3f750d data/sprites/egg.svg --- a/data/sprites/egg.svg Sat Sep 05 16:07:48 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff -r 664bba9be40a -r 3e994b3f750d regenerate_pngs.py --- a/regenerate_pngs.py Sat Sep 05 16:07:48 2009 +0000 +++ b/regenerate_pngs.py Sat Sep 05 16:12:22 2009 +0000 @@ -36,23 +36,9 @@ png_name = os.path.join(sprite_path, name) + ".png" svg_to_png(svg_name, png_name, width, height) -def process_cursor(name, width, height, sprite_path, cursor_path): - # We bounce through png to get something PIL understands - svg_name = os.path.join(sprite_path, name) + '.svg' - png_name = os.path.join(cursor_path, name) + '.png' - xbm_name = os.path.join(cursor_path, name) + '.xbm' - svg_to_png(svg_name, png_name, width, height) - # We need to bounce through 'L' first to handle transparency OK - pixeldata = open(png_name).convert('L') - # Everything > 0 goes to white - lut = [0] + [1]*255 - pixeldata.point(lut, mode='1').save(xbm_name) - os.remove(png_name) - TILE_PATH = "data/tiles" SPRITE_PATH = "data/sprites" IMAGE_PATH = "data/images" -CURSOR_PATH = "data/cursors" SPRITES = [ # chicken bits @@ -86,15 +72,8 @@ ("boom2", 20, 20), ("boom3", 20, 20), ("boom4", 20, 20), - # other - ("egg", 20, 20), ] -CURSORS = [ - ("chkn", 16, 16), - ("egg", 16, 16), - ] - if __name__ == "__main__": process_svg_folder("data/tiles", 20, 20) process_svg_folder("data/icons", 40, 40) @@ -103,5 +82,3 @@ process_sprite("splash", 800, 600, IMAGE_PATH) process_sprite("gameover_win", 800, 600, IMAGE_PATH) process_sprite("gameover_lose", 800, 600, IMAGE_PATH) - for name, width, height in CURSORS: - process_cursor(name, width, height, SPRITE_PATH, CURSOR_PATH)