Changeset 291:3e994b3f750d


Ignore:
Timestamp:
Sep 5, 2009, 4:12:22 PM (11 years ago)
Author:
Adrianna Pińska <adrianna.pinska@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@292
Message:

added chicken feet move cursor; removed unused cursors and cursor generation code

Files:
3 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • data/cursors/chkn.xbm

    r160 r291  
    1 #define im_width 16
    2 #define im_height 16
    3 static char im_bits[] = {
    4 0x1c,0x00,0x3c,0x3c,0x3e,0x7c,0x7c,0x7c,0xf8,0x3f,0xf8,0x7f,0xf8,0x3f,0xfc,
    5 0x3f,0xfc,0x3f,0xf8,0x1f,0xf8,0x1f,0xe0,0x1f,0xc0,0x0f,0x80,0x07,0xc0,0x07,
    6 0xe0,0x01
    7 };
     1#define chkn_width 16
     2#define chkn_height 16
     3#define chkn_x_hot 8
     4#define chkn_y_hot 8
     5static unsigned char chkn_bits[] = {
     6   0x00, 0x08, 0x00, 0x08, 0x80, 0x88, 0x00, 0x49, 0x00, 0x6b, 0x10, 0x3e,
     7   0x10, 0x1c, 0x11, 0x1d, 0x92, 0x08, 0xd6, 0x08, 0x7c, 0x08, 0x38, 0x00,
     8   0x38, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00 };
  • regenerate_pngs.py

    r274 r291  
    3737    svg_to_png(svg_name, png_name, width, height)
    3838
    39 def process_cursor(name, width, height, sprite_path, cursor_path):
    40     # We bounce through png to get something PIL understands
    41     svg_name = os.path.join(sprite_path, name) + '.svg'
    42     png_name = os.path.join(cursor_path, name) + '.png'
    43     xbm_name = os.path.join(cursor_path, name) + '.xbm'
    44     svg_to_png(svg_name, png_name, width, height)
    45     # We need to bounce through 'L' first to handle transparency OK
    46     pixeldata = open(png_name).convert('L')
    47     # Everything > 0 goes to white
    48     lut = [0] + [1]*255
    49     pixeldata.point(lut, mode='1').save(xbm_name)
    50     os.remove(png_name)
    51 
    5239TILE_PATH = "data/tiles"
    5340SPRITE_PATH = "data/sprites"
    5441IMAGE_PATH = "data/images"
    55 CURSOR_PATH = "data/cursors"
    5642
    5743SPRITES = [
     
    8773    ("boom3", 20, 20),
    8874    ("boom4", 20, 20),
    89     # other
    90     ("egg", 20, 20),
    9175]
    92 
    93 CURSORS = [
    94     ("chkn", 16, 16),
    95     ("egg", 16, 16),
    96     ]
    9776
    9877if __name__ == "__main__":
     
    10483    process_sprite("gameover_win", 800, 600, IMAGE_PATH)
    10584    process_sprite("gameover_lose", 800, 600, IMAGE_PATH)
    106     for name, width, height in CURSORS:
    107         process_cursor(name, width, height, SPRITE_PATH, CURSOR_PATH)
Note: See TracChangeset for help on using the changeset viewer.