コード例 #1
0
ファイル: resource.py プロジェクト: 17night/thbattle
inventory.extend([(re.compile('^%s$' % pat), ldr) for pat, ldr in (
    ('thb-bgm_game',               ['bgm']),

    ('thb-modelogo-[a-z0-9_]+',    ['img']),

    ('thb-(win|lose)',             ['img']),

    ('thb-hurt',                   ['anim', [50, 50, 50, 50, 200, 30, 30, 30, 30, 2000]]),

    ('thb-card-[a-z0-9_]+',        ['img', 'card']),
    ('thb-card-small-[a-z0-9_]+',  ['img', 'card']),

    ('thb-cardnum',                ['img_grid', 2, 13, 'card']),  # FIXME: Screw this, meta should not be kept here
    ('thb-(small)?suit',           ['img_grid', 1, 4,  'card']),
    ('thb-smallnum',               ['img_grid', 2, 14, 'card']),

    ('thb-tag-sealarray',          ['anim', [83] * 36,  True]),
    ('thb-tag-wine',               ['anim', [150] * 3,  True]),
    ('thb-tag-lunadial',           ['anim', [200] * 10, True]),
    ('thb-tag-books',              ['img_grid', 1, 7]),
    ('thb-tag-[a-z_]+',            ['img']),

    ('thb-portrait-[a-z0-9_]+',    ['img_with_grayed', 'portrait']),

    ('thb-figure-[a-z_]+_alter',   ['encrypted_texture']),
    ('thb-figure-[a-z_]+',         ['lazytexture']),

    ('thb-hp(_bg)?',               ['img_with_grayed', 'portrait']),

    ('thb-num',                    ['img_grid', 1, 10, 'portrait']),

    ('thb-sound-[a-z0-9_]+',       ['sound']),

    ('thb-cv-[a-z0-9_-]+',         ['sound']),
)])
コード例 #2
0
ファイル: resource.py プロジェクト: yuansanjin/thbattle
inventory.extend([(re.compile('^%s$' % pat), ldr) for pat, ldr in (
    ('thb-bgm_game',               ['bgm']),

    ('thb-modelogo-[a-z0-9_]+',    ['img']),

    ('thb-(win|lose)',             ['img']),

    ('thb-hurt',                   ['anim', [50, 50, 50, 50, 200, 30, 30, 30, 30, 2000]]),

    ('thb-card-[a-z0-9_]+',        ['img', 'card']),
    ('thb-card-small-[a-z0-9_]+',  ['img', 'card']),

    ('thb-cardnum',                ['img_grid', 2, 13, 'card']),  # FIXME: Screw this, meta should not be kept here
    ('thb-(small)?suit',           ['img_grid', 1, 4,  'card']),
    ('thb-smallnum',               ['img_grid', 2, 14, 'card']),

    ('thb-tag-sealarray',          ['anim', [83] * 36,  True]),
    ('thb-tag-wine',               ['anim', [150] * 3,  True]),
    ('thb-tag-lunadial',           ['anim', [200] * 10, True]),
    ('thb-tag-keine_devoted',      ['anim', [150] * 13, True]),
    ('thb-tag-books',              ['img_grid', 1, 7]),
    ('thb-tag-[a-z_]+',            ['img']),

    ('thb-portrait-[a-z0-9_]+',    ['img_with_grayed', 'portrait']),

    ('thb-figure-[a-z_]+_alter',   ['encrypted_texture']),
    ('thb-figure-[a-z_]+',         ['lazytexture']),

    ('thb-hp(_bg)?',               ['img_with_grayed', 'portrait']),

    ('thb-num',                    ['img_grid', 1, 10, 'portrait']),

    ('thb-sound-[a-z0-9_]+',       ['sound']),

    ('thb-cv-[a-z0-9_-]+',         ['sound']),
)])
コード例 #3
0
    white = atlas.add(pyglet.image.ImageData(4, 4, 'RGBA', '\xFF'*64))
    c = white.tex_coords
    f = c[0:3]; t = c[6:9]
    white.tex_coords = ((f[0] + t[0]) / 2, (f[1] + t[1]) / 2, 0) * 4
    return white


inventory.extend([(re.compile('^%s$' % pat), ldr) for pat, ldr in (
    # (r'c-bgm_hall',            ['bgm']),

    (r'c-bg_[a-z_]+',          ['lazytexture']),

    (r'c-imagesel_.*',         ['img']),
    (r'c-icon',                ['imgdata']),

    (r'c-check',               ['img']),

    (r'c-(bgm|se)_volume',     ['img']),
    (r'c-vol_(icon|mute)',     ['img']),

    (r'c-(actor|turn)_frame',  ['anim', [50] * 9, True]),

    (r'c-ray',                 ['texture']),
    (r'c-pbar-[a-z]+',         ['img']),
    (r'c-buttons-[a-z_]+',     ['img_grid', 1, 4]),
    (r'c-sound-input',         ['sound']),
    (r'c-suit1[26]',           ['imgdata_grid', 1, 4]),
    (r'c-white',               ['white']),
    (r'c-font',                ['font']),
)])
コード例 #4
0
ファイル: resource.py プロジェクト: feisuzhu/thbattle
    white = atlas.add(pyglet.image.ImageData(4, 4, 'RGBA', '\xFF'*64))
    c = white.tex_coords
    f = c[0:3]; t = c[6:9]
    white.tex_coords = ((f[0] + t[0]) / 2, (f[1] + t[1]) / 2, 0) * 4
    return white


inventory.extend([(re.compile('^%s$' % pat), ldr) for pat, ldr in (
    (r'c-bgm_hall',            ['bgm']),

    (r'c-bg_[a-z_]+',          ['lazytexture']),

    (r'c-imagesel_.*',         ['img']),
    (r'c-icon',                ['imgdata']),

    (r'c-check',               ['img']),

    (r'c-(bgm|se)_volume',     ['img']),
    (r'c-vol_(icon|mute)',     ['img']),

    (r'c-(actor|turn)_frame',  ['anim', [50] * 9, True]),

    (r'c-ray',                 ['texture']),
    (r'c-pbar-[a-z]+',         ['img']),
    (r'c-buttons-[a-z_]+',     ['img_grid', 1, 4]),
    (r'c-sound-input',         ['sound']),
    (r'c-suit1[26]',           ['imgdata_grid', 1, 4]),
    (r'c-white',               ['white']),
    (r'c-font',                ['font']),
)])
コード例 #5
0
ファイル: resource.py プロジェクト: 17night/thbattle
    c = white.tex_coords
    f = c[0:3]
    t = c[6:9]
    white.tex_coords = ((f[0] + t[0]) / 2, (f[1] + t[1]) / 2, 0) * 4
    return white


inventory.extend(
    [
        (re.compile("^%s$" % pat), ldr)
        for pat, ldr in (
            (r"c-bgm_hall", ["bgm"]),
            (r"c-bg_[a-z_]+", ["lazytexture"]),
            (r"c-imagesel_.*", ["img"]),
            (r"c-icon", ["imgdata"]),
            (r"c-check", ["img"]),
            (r"c-(bgm|se)_volume", ["img"]),
            (r"c-vol_(icon|mute)", ["img"]),
            (r"c-(actor|turn)_frame", ["anim", [50] * 9, True]),
            (r"c-ray", ["texture"]),
            (r"c-pbar-[a-z]+", ["img"]),
            (r"c-buttons-[a-z_]+", ["img_grid", 1, 4]),
            (r"c-sound-input", ["sound"]),
            (r"c-suit1[26]", ["imgdata_grid", 1, 4]),
            (r"c-badges-.+", ["img"]),
            (r"c-white", ["white"]),
            (r"c-font", ["font"]),
        )
    ]
)
コード例 #6
0
ファイル: resource.py プロジェクト: feisuzhu/thbattle
get_atlas("portrait", (1024, 2048))

inventory.extend(
    [
        (re.compile("^%s$" % pat), ldr)
        for pat, ldr in (
            ("thb-bgm_game", ["bgm"]),
            ("thb-modelogo-[a-z0-9_]+", ["img"]),
            ("thb-(win|lose)", ["img"]),
            ("thb-hurt", ["anim", [50, 50, 50, 50, 200, 30, 30, 30, 30, 2000]]),
            ("thb-card-[a-z0-9_]+", ["img", "card"]),
            ("thb-card-small-[a-z0-9_]+", ["img", "card"]),
            ("thb-cardnum", ["img_grid", 2, 13, "card"]),  # FIXME: Screw this, meta should not be kept here
            ("thb-(small)?suit", ["img_grid", 1, 4, "card"]),
            ("thb-smallnum", ["img_grid", 2, 14, "card"]),
            ("thb-tag-sealarray", ["anim", [83] * 36, True]),
            ("thb-tag-wine", ["anim", [150] * 3, True]),
            ("thb-tag-lunadial", ["anim", [200] * 10, True]),
            ("thb-tag-books", ["img_grid", 1, 7]),
            ("thb-tag-[a-z_]+", ["img"]),
            ("thb-portrait-[a-z0-9_]+", ["img_with_grayed", "portrait"]),
            ("thb-figure-[a-z_]+_alter", ["encrypted_texture"]),
            ("thb-figure-[a-z_]+", ["lazytexture"]),
            ("thb-hp(_bg)?", ["img_with_grayed", "portrait"]),
            ("thb-num", ["img_grid", 1, 10, "portrait"]),
            ("thb-sound-[a-z0-9_]+", ["sound"]),
            ("thb-cv-[a-z0-9_-]+", ["sound"]),
        )
    ]
)