Deploying to built from @ 2f50155ad7 🚀

This commit is contained in:
pulsejet 2020-10-19 22:57:35 +00:00
parent 2c8df35ec7
commit ba28fbffbd
6 changed files with 893 additions and 247 deletions

544
gameasync/bitmap-map.js Normal file
View File

@ -0,0 +1,544 @@
var bitmapSizeMapping = {
"graphics/animations/001-action01": [960,384],
"graphics/animations/002-action02": [960,384],
"graphics/animations/003-attack01": [960,384],
"graphics/animations/004-attack02": [960,384],
"graphics/animations/005-attack03": [960,192],
"graphics/animations/006-weapon01": [960,768],
"graphics/animations/007-weapon02": [960,960],
"graphics/animations/008-weapon03": [960,768],
"graphics/animations/009-weapon04": [960,960],
"graphics/animations/010-weapon05": [960,576],
"graphics/animations/011-weapon06": [960,576],
"graphics/animations/012-heal01": [960,192],
"graphics/animations/013-heal02": [960,384],
"graphics/animations/014-heal03": [960,384],
"graphics/animations/015-fire01": [960,384],
"graphics/animations/016-ice01": [957,960],
"graphics/animations/017-thunder01": [960,384],
"graphics/animations/018-water01": [960,576],
"graphics/animations/019-earth01": [960,384],
"graphics/animations/020-wind01": [960,576],
"graphics/animations/021-light01": [960,576],
"graphics/animations/022-darkness01": [960,576],
"graphics/animations/023-burst01": [960,384],
"graphics/animations/024-support01": [959,384],
"graphics/animations/025-support02": [960,384],
"graphics/animations/026-support03": [960,192],
"graphics/animations/027-support04": [960,576],
"graphics/animations/028-state01": [960,384],
"graphics/animations/029-emotion01": [960,384],
"graphics/animations/030-explosion01": [960,384],
"graphics/animations/action01": [768,192],
"graphics/animations/action_aag": [960,192],
"graphics/animations/action_bf": [960,192],
"graphics/animations/action_btm92fs": [960,384],
"graphics/animations/action_btydog": [960,192],
"graphics/animations/action_eagle": [960,192],
"graphics/animations/action_famas": [960,192],
"graphics/animations/action_ls": [960,192],
"graphics/animations/action_m9": [960,192],
"graphics/animations/action_ss": [960,192],
"graphics/animations/action_vesper": [960,192],
"graphics/animations/anm_data": [768,192],
"graphics/animations/kn_attackb02": [960,576],
"graphics/animations/kn_exp": [960,192],
"graphics/animations/kn_slash": [960,384],
"graphics/animations/l_wing": [960,192],
"graphics/animations/laser1": [960,192],
"graphics/animations/vasper": [960,192],
"graphics/autotiles/machine1": [384,128],
"graphics/autotiles/machine2": [384,128],
"graphics/autotiles/machine3": [384,128],
"graphics/autotiles/machine4": [384,128],
"graphics/battlebacks/bt_back1": [640,320],
"graphics/battlebacks/bt_back2": [640,320],
"graphics/battlebacks/bt_back3": [640,320],
"graphics/battlers/battle_cain": [150,128],
"graphics/battlers/battle_jeik": [150,128],
"graphics/battlers/battle_nazo": [150,128],
"graphics/battlers/battle_siera": [150,128],
"graphics/battlers/blank": [96,96],
"graphics/battlers/en_aa": [178,260],
"graphics/battlers/en_ah": [360,270],
"graphics/battlers/en_bhound": [175,260],
"graphics/battlers/en_bit_left": [359,280],
"graphics/battlers/en_bit_right": [359,280],
"graphics/battlers/en_hex01": [234,270],
"graphics/battlers/en_hex01_b": [234,270],
"graphics/battlers/en_hex03": [346,270],
"graphics/battlers/en_hex03_b": [346,270],
"graphics/battlers/en_lucifer": [269,300],
"graphics/battlers/en_lucifer2": [269,300],
"graphics/battlers/en_m_head": [150,145],
"graphics/battlers/en_mbt": [350,200],
"graphics/battlers/en_mpd_": [125,200],
"graphics/battlers/en_nunf_": [125,200],
"graphics/battlers/en_nunsf_": [130,200],
"graphics/battlers/en_rbull": [228,270],
"graphics/battlers/en_rogue": [125,200],
"graphics/battlers/en_tooth_mpd": [211,260],
"graphics/battlers/en_tooth_nun": [211,260],
"graphics/battlers/en_tooth_rog": [209,260],
"graphics/battlers/face_cain": [96,96],
"graphics/battlers/face_nazo": [96,96],
"graphics/battlers/face_siera": [96,96],
"graphics/battlers/unknown": [96,96],
"graphics/characters/ag0": [256,256],
"graphics/characters/ag0_b": [256,256],
"graphics/characters/ag0_c": [256,256],
"graphics/characters/ag0_d": [256,256],
"graphics/characters/ag0_e": [256,256],
"graphics/characters/ag1": [256,256],
"graphics/characters/ag1_b": [256,256],
"graphics/characters/ag1_c": [256,256],
"graphics/characters/ag1_d": [256,256],
"graphics/characters/ag2": [256,256],
"graphics/characters/ag2_b": [256,256],
"graphics/characters/ag2_c": [256,256],
"graphics/characters/ag3": [256,256],
"graphics/characters/ag3_b": [256,256],
"graphics/characters/ag3_c": [256,256],
"graphics/characters/ag4": [256,256],
"graphics/characters/ag4_b": [256,256],
"graphics/characters/ag4_c": [256,256],
"graphics/characters/ag4_d": [384,384],
"graphics/characters/ag4_e": [256,256],
"graphics/characters/ag4_f": [512,512],
"graphics/characters/ag4_g": [512,512],
"graphics/characters/ag5": [256,256],
"graphics/characters/ag5_c": [256,256],
"graphics/characters/ag6": [256,256],
"graphics/characters/ag6_b": [256,256],
"graphics/characters/ag6_c": [512,512],
"graphics/characters/ag6_d": [512,512],
"graphics/characters/ag6_e": [256,256],
"graphics/characters/ag6_f": [256,256],
"graphics/characters/ag7": [288,288],
"graphics/characters/ag7_b": [288,288],
"graphics/characters/ag7_e": [384,384],
"graphics/characters/ag7c": [288,288],
"graphics/characters/ag7d": [288,288],
"graphics/characters/ag8": [256,256],
"graphics/characters/ag8_c": [256,256],
"graphics/characters/ag8_c2": [256,256],
"graphics/characters/ag8_d": [256,256],
"graphics/characters/ag8_e": [256,256],
"graphics/characters/ag8b": [256,256],
"graphics/characters/ag9": [512,512],
"graphics/characters/ag9_b": [512,512],
"graphics/characters/ag_c": [256,256],
"graphics/characters/ag_c_b": [256,256],
"graphics/characters/ag_field1": [512,512],
"graphics/characters/aghex5_c": [256,256],
"graphics/characters/agkn": [256,256],
"graphics/characters/agkn_b": [512,512],
"graphics/characters/agser": [512,512],
"graphics/characters/agw": [128,128],
"graphics/characters/broken_ag": [256,256],
"graphics/characters/broken_ag2": [256,256],
"graphics/characters/c4": [128,128],
"graphics/characters/cargo": [256,512],
"graphics/characters/en01": [128,128],
"graphics/characters/ev_door": [384,256],
"graphics/characters/ev_door1": [384,256],
"graphics/characters/generate": [432,384],
"graphics/characters/kn_abel": [128,192],
"graphics/characters/kn_akari": [128,128],
"graphics/characters/kn_armor1": [192,192],
"graphics/characters/kn_army": [128,192],
"graphics/characters/kn_army1": [128,192],
"graphics/characters/kn_bandt1": [128,192],
"graphics/characters/kn_bandt2": [192,192],
"graphics/characters/kn_bandt3": [256,192],
"graphics/characters/kn_body": [192,192],
"graphics/characters/kn_box": [128,128],
"graphics/characters/kn_cain": [128,192],
"graphics/characters/kn_cain0": [192,256],
"graphics/characters/kn_cain01": [256,256],
"graphics/characters/kn_cain1": [384,256],
"graphics/characters/kn_cain3": [256,256],
"graphics/characters/kn_cain4": [128,192],
"graphics/characters/kn_cain_down": [192,192],
"graphics/characters/kn_cain_ed": [128,192],
"graphics/characters/kn_cain_hasigo": [128,192],
"graphics/characters/kn_car1": [384,512],
"graphics/characters/kn_data": [512,384],
"graphics/characters/kn_disply": [384,128],
"graphics/characters/kn_disply2": [256,192],
"graphics/characters/kn_door": [128,256],
"graphics/characters/kn_door2": [128,256],
"graphics/characters/kn_ev1": [384,512],
"graphics/characters/kn_explos": [256,256],
"graphics/characters/kn_f_raven": [256,256],
"graphics/characters/kn_f_raven2": [256,256],
"graphics/characters/kn_fighter": [128,192],
"graphics/characters/kn_fighter2": [128,192],
"graphics/characters/kn_fighter3": [128,192],
"graphics/characters/kn_fighter4": [128,192],
"graphics/characters/kn_fire": [128,128],
"graphics/characters/kn_fire1": [192,192],
"graphics/characters/kn_gaitou": [192,128],
"graphics/characters/kn_gate": [384,256],
"graphics/characters/kn_general": [128,192],
"graphics/characters/kn_general_b": [128,192],
"graphics/characters/kn_hato": [128,192],
"graphics/characters/kn_heri_ah": [384,512],
"graphics/characters/kn_heri_ah2": [384,640],
"graphics/characters/kn_hexa00": [384,384],
"graphics/characters/kn_hexa00_b": [384,384],
"graphics/characters/kn_hexa00_c": [384,384],
"graphics/characters/kn_hexa00_d": [384,384],
"graphics/characters/kn_hexa01": [384,384],
"graphics/characters/kn_hexa01_b": [384,384],
"graphics/characters/kn_hexa01_c": [384,384],
"graphics/characters/kn_hexa02": [384,512],
"graphics/characters/kn_hexa02_b": [384,512],
"graphics/characters/kn_hexa03": [512,512],
"graphics/characters/kn_hexa03_b": [512,512],
"graphics/characters/kn_hexa05": [128,192],
"graphics/characters/kn_hexa05_b": [128,192],
"graphics/characters/kn_hexabox": [640,512],
"graphics/characters/kn_jyudan": [128,128],
"graphics/characters/kn_kernel": [128,192],
"graphics/characters/kn_light2": [256,128],
"graphics/characters/kn_light3": [128,384],
"graphics/characters/kn_mbt": [384,512],
"graphics/characters/kn_mecha": [128,192],
"graphics/characters/kn_merc1": [128,192],
"graphics/characters/kn_merc2": [128,192],
"graphics/characters/kn_merc3": [128,192],
"graphics/characters/kn_mpd": [128,192],
"graphics/characters/kn_mpd1": [128,192],
"graphics/characters/kn_nunsf": [128,192],
"graphics/characters/kn_operater": [192,192],
"graphics/characters/kn_ppl1": [128,192],
"graphics/characters/kn_ppl2": [128,192],
"graphics/characters/kn_ppl3": [128,192],
"graphics/characters/kn_ppl4": [128,192],
"graphics/characters/kn_ppl5": [128,192],
"graphics/characters/kn_ppl6": [128,192],
"graphics/characters/kn_pyson": [128,192],
"graphics/characters/kn_pyson_b": [128,192],
"graphics/characters/kn_raven": [384,512],
"graphics/characters/kn_sat": [1152,768],
"graphics/characters/kn_sat2": [640,384],
"graphics/characters/kn_sat3": [320,192],
"graphics/characters/kn_siera": [128,192],
"graphics/characters/kn_sold1": [128,192],
"graphics/characters/kn_varie": [128,192],
"graphics/characters/kn_varie_b": [128,192],
"graphics/characters/kn_zep_mei": [128,192],
"graphics/characters/missile": [288,128],
"graphics/characters/nanikaaru": [128,128],
"graphics/characters/point": [192,192],
"graphics/characters/railgun": [288,128],
"graphics/characters/tesra": [640,640],
"graphics/characters/wing": [256,256],
"graphics/fogs/fog02": [640,480],
"graphics/fogs/fog": [640,480],
"graphics/gameovers/gameover": [640,480],
"graphics/icons/icon_": [24,24],
"graphics/icons/icon_armor1": [24,24],
"graphics/icons/icon_barrier": [24,24],
"graphics/icons/icon_bomb": [24,24],
"graphics/icons/icon_c4": [24,24],
"graphics/icons/icon_card": [24,24],
"graphics/icons/icon_claw": [24,24],
"graphics/icons/icon_disk": [24,24],
"graphics/icons/icon_exmode": [24,24],
"graphics/icons/icon_face": [24,24],
"graphics/icons/icon_gimk": [24,24],
"graphics/icons/icon_gogle": [24,24],
"graphics/icons/icon_gun": [24,24],
"graphics/icons/icon_junk": [24,24],
"graphics/icons/icon_kaifuku": [24,24],
"graphics/icons/icon_key": [24,24],
"graphics/icons/icon_knife": [24,24],
"graphics/icons/icon_letter": [24,24],
"graphics/icons/icon_photo": [24,24],
"graphics/icons/icon_piace": [24,24],
"graphics/icons/icon_soukou": [24,24],
"graphics/icons/icon_stick": [24,24],
"graphics/icons/icon_tag": [24,24],
"graphics/icons/icon_vesper": [24,24],
"graphics/panoramas/op01": [640,480],
"graphics/panoramas/op10": [640,480],
"graphics/panoramas/p_city": [640,1280],
"graphics/pictures/6nin": [640,480],
"graphics/pictures/active01": [320,160],
"graphics/pictures/ajito_1": [320,48],
"graphics/pictures/back": [640,180],
"graphics/pictures/back00": [640,480],
"graphics/pictures/brain_data": [190,145],
"graphics/pictures/brain_data2": [190,145],
"graphics/pictures/brain_data3": [190,145],
"graphics/pictures/brain_data4": [190,145],
"graphics/pictures/brain_data5": [190,145],
"graphics/pictures/cherubim": [134,157],
"graphics/pictures/dandou": [64,192],
"graphics/pictures/dandou_yoko": [192,64],
"graphics/pictures/data": [320,160],
"graphics/pictures/data0": [320,160],
"graphics/pictures/data1": [320,160],
"graphics/pictures/data10": [320,160],
"graphics/pictures/data11": [320,160],
"graphics/pictures/data12": [320,160],
"graphics/pictures/data13": [320,160],
"graphics/pictures/data14": [320,160],
"graphics/pictures/data15": [320,160],
"graphics/pictures/data16": [320,160],
"graphics/pictures/data2": [320,160],
"graphics/pictures/data3": [320,160],
"graphics/pictures/data4": [320,160],
"graphics/pictures/data5": [320,160],
"graphics/pictures/data6": [320,160],
"graphics/pictures/data7": [320,160],
"graphics/pictures/data8": [320,160],
"graphics/pictures/data9": [320,160],
"graphics/pictures/data_plant": [160,100],
"graphics/pictures/demo01": [640,480],
"graphics/pictures/demo02": [640,480],
"graphics/pictures/demo03": [640,480],
"graphics/pictures/demo04": [640,471],
"graphics/pictures/demo05": [640,480],
"graphics/pictures/demo06": [640,480],
"graphics/pictures/demo07": [640,480],
"graphics/pictures/demo08": [360,240],
"graphics/pictures/demotext01": [640,100],
"graphics/pictures/demotext02": [640,71],
"graphics/pictures/demotext02b": [640,69],
"graphics/pictures/demotext03": [640,74],
"graphics/pictures/demotext03b": [640,68],
"graphics/pictures/demotext04": [640,80],
"graphics/pictures/demotext05": [640,72],
"graphics/pictures/demotext05b": [640,70],
"graphics/pictures/demotext06": [640,68],
"graphics/pictures/demotext06b": [640,64],
"graphics/pictures/ed_c_e": [360,240],
"graphics/pictures/ed_kn": [400,45],
"graphics/pictures/ed_mes01": [220,111],
"graphics/pictures/ed_mes02": [220,240],
"graphics/pictures/ed_mes03": [220,200],
"graphics/pictures/ed_mes04": [220,200],
"graphics/pictures/ed_mes05": [220,200],
"graphics/pictures/ed_mes06": [220,200],
"graphics/pictures/ed_mes07": [220,200],
"graphics/pictures/ed_mes08": [220,260],
"graphics/pictures/ed_mes09": [220,40],
"graphics/pictures/elice1": [400,420],
"graphics/pictures/elice2": [400,420],
"graphics/pictures/emblem": [128,154],
"graphics/pictures/ending1": [400,360],
"graphics/pictures/ending2": [400,360],
"graphics/pictures/ev_abel": [148,180],
"graphics/pictures/ev_abel2": [148,180],
"graphics/pictures/ev_alice2": [148,180],
"graphics/pictures/ev_cain": [148,180],
"graphics/pictures/ev_cain2": [148,180],
"graphics/pictures/ev_hexa05": [148,180],
"graphics/pictures/ev_hound00": [148,180],
"graphics/pictures/ev_hound01": [148,180],
"graphics/pictures/ev_hound02": [148,180],
"graphics/pictures/ev_hound03": [148,180],
"graphics/pictures/ev_hound04": [148,180],
"graphics/pictures/ev_hound05": [148,180],
"graphics/pictures/ev_nodata": [148,180],
"graphics/pictures/ev_siera": [148,180],
"graphics/pictures/ev_siera0": [148,180],
"graphics/pictures/ev_wachen": [148,180],
"graphics/pictures/ev_zax": [148,180],
"graphics/pictures/ex_ag": [220,64],
"graphics/pictures/ex_sat1": [320,160],
"graphics/pictures/ex_sat2": [160,100],
"graphics/pictures/field01": [320,160],
"graphics/pictures/field02": [320,160],
"graphics/pictures/field03": [320,160],
"graphics/pictures/field04": [320,160],
"graphics/pictures/k0": [280,32],
"graphics/pictures/k1": [280,32],
"graphics/pictures/k2": [280,32],
"graphics/pictures/k3": [280,32],
"graphics/pictures/k4": [280,32],
"graphics/pictures/k5": [280,32],
"graphics/pictures/k6": [280,32],
"graphics/pictures/k7": [280,32],
"graphics/pictures/k8": [280,32],
"graphics/pictures/k9": [280,32],
"graphics/pictures/kage": [640,480],
"graphics/pictures/kage2": [640,480],
"graphics/pictures/kage3": [640,480],
"graphics/pictures/kmax": [280,32],
"graphics/pictures/kn_credit0": [640,96],
"graphics/pictures/kn_credit1": [640,96],
"graphics/pictures/kn_light": [320,320],
"graphics/pictures/kn_title01": [640,480],
"graphics/pictures/kn_title02": [640,480],
"graphics/pictures/kn_title03": [640,480],
"graphics/pictures/last_laser1": [64,480],
"graphics/pictures/last_laser2": [300,480],
"graphics/pictures/last_laser3": [300,480],
"graphics/pictures/mail_1": [240,64],
"graphics/pictures/mail_2": [240,64],
"graphics/pictures/mes01": [320,160],
"graphics/pictures/mes01_2": [320,160],
"graphics/pictures/mes02": [320,160],
"graphics/pictures/mes03": [320,160],
"graphics/pictures/mes04": [320,160],
"graphics/pictures/mes05": [320,105],
"graphics/pictures/mes05_2": [320,105],
"graphics/pictures/mes05_3": [320,105],
"graphics/pictures/mes05_4": [320,105],
"graphics/pictures/mes06": [320,105],
"graphics/pictures/ms_back": [640,180],
"graphics/pictures/n_light": [640,480],
"graphics/pictures/n_vision": [120,24],
"graphics/pictures/op01": [620,460],
"graphics/pictures/op02": [620,460],
"graphics/pictures/op03": [620,460],
"graphics/pictures/op04": [620,460],
"graphics/pictures/op05": [620,460],
"graphics/pictures/op06": [620,460],
"graphics/pictures/op07": [620,460],
"graphics/pictures/op08": [620,460],
"graphics/pictures/op09": [620,460],
"graphics/pictures/op10": [620,460],
"graphics/pictures/op11": [620,460],
"graphics/pictures/op12": [620,460],
"graphics/pictures/op_demoke": [640,60],
"graphics/pictures/op_demokn": [640,60],
"graphics/pictures/op_demowwwf": [640,60],
"graphics/pictures/opn1": [640,80],
"graphics/pictures/opn2": [640,80],
"graphics/pictures/opn3": [638,38],
"graphics/pictures/optext01": [640,50],
"graphics/pictures/optext02": [640,90],
"graphics/pictures/optext03": [640,50],
"graphics/pictures/over01": [320,160],
"graphics/pictures/over02": [320,160],
"graphics/pictures/over03": [320,160],
"graphics/pictures/p01": [96,96],
"graphics/pictures/p02": [96,96],
"graphics/pictures/p03": [96,96],
"graphics/pictures/p04": [96,96],
"graphics/pictures/p05": [96,96],
"graphics/pictures/p06": [96,96],
"graphics/pictures/p07": [96,96],
"graphics/pictures/p08": [96,96],
"graphics/pictures/p09": [96,96],
"graphics/pictures/p10": [96,96],
"graphics/pictures/p11": [96,96],
"graphics/pictures/p12": [96,96],
"graphics/pictures/p13": [96,96],
"graphics/pictures/p14": [96,96],
"graphics/pictures/p15": [96,96],
"graphics/pictures/p16": [96,96],
"graphics/pictures/p17": [96,96],
"graphics/pictures/p18": [96,96],
"graphics/pictures/p19": [96,96],
"graphics/pictures/p20": [96,96],
"graphics/pictures/p21": [96,96],
"graphics/pictures/p22": [96,96],
"graphics/pictures/p23": [96,96],
"graphics/pictures/p24": [96,96],
"graphics/pictures/p_a37_01": [320,48],
"graphics/pictures/p_a37_02": [320,48],
"graphics/pictures/p_a37_03": [320,48],
"graphics/pictures/p_ajito_01": [320,48],
"graphics/pictures/p_ajito_f1": [320,48],
"graphics/pictures/p_ajito_f2": [320,48],
"graphics/pictures/p_ajito_f3": [320,48],
"graphics/pictures/p_base_01": [320,48],
"graphics/pictures/p_base_02": [320,48],
"graphics/pictures/p_base_03": [320,48],
"graphics/pictures/p_base_04": [320,48],
"graphics/pictures/p_base_f1": [320,48],
"graphics/pictures/p_base_f2": [320,48],
"graphics/pictures/p_fortcity": [320,36],
"graphics/pictures/p_grave_v": [320,36],
"graphics/pictures/p_plant": [320,48],
"graphics/pictures/p_prison01": [320,48],
"graphics/pictures/p_prison02": [320,48],
"graphics/pictures/p_prison03": [320,48],
"graphics/pictures/p_prison04": [320,48],
"graphics/pictures/p_sewer3": [320,48],
"graphics/pictures/p_sewer4": [320,48],
"graphics/pictures/p_shop01": [320,48],
"graphics/pictures/p_shop03": [320,48],
"graphics/pictures/p_shop04": [320,48],
"graphics/pictures/p_u_city01": [320,48],
"graphics/pictures/p_u_city02": [320,48],
"graphics/pictures/p_u_city03": [320,48],
"graphics/pictures/p_valie1": [320,48],
"graphics/pictures/p_valie2": [320,48],
"graphics/pictures/p_valie3": [320,48],
"graphics/pictures/p_valie_f1": [320,48],
"graphics/pictures/p_valie_f2": [320,48],
"graphics/pictures/p_valie_f3": [320,48],
"graphics/pictures/protected01": [160,128],
"graphics/pictures/rader00": [160,128],
"graphics/pictures/rader01": [160,128],
"graphics/pictures/rader02": [160,128],
"graphics/pictures/rader_map": [200,100],
"graphics/pictures/rader_vtol": [128,102],
"graphics/pictures/sat_las": [160,300],
"graphics/pictures/sat_teisi": [320,160],
"graphics/pictures/shop03": [320,48],
"graphics/pictures/short1": [640,480],
"graphics/pictures/short2": [640,480],
"graphics/pictures/shouheki": [420,420],
"graphics/pictures/stealth": [120,24],
"graphics/pictures/target": [128,128],
"graphics/pictures/targeting01": [320,160],
"graphics/pictures/targeting02": [320,160],
"graphics/pictures/vasper2": [200,200],
"graphics/pictures/vasper3": [200,200],
"graphics/pictures/vtol": [200,170],
"graphics/pictures/vtol_data": [128,160],
"graphics/pictures/vtol_shadow": [200,170],
"graphics/pictures/yajirusi_down": [96,96],
"graphics/pictures/yajirusi_left": [96,96],
"graphics/pictures/yajirusi_right": [96,96],
"graphics/pictures/yajirusi_up": [96,96],
"graphics/pictures/yami": [640,480],
"graphics/pictures/yami2": [640,480],
"graphics/tilesets/areti0": [256,1024],
"graphics/tilesets/army": [256,1600],
"graphics/tilesets/base": [256,1600],
"graphics/tilesets/city0": [256,1760],
"graphics/tilesets/city1": [256,1792],
"graphics/tilesets/city2": [256,1760],
"graphics/tilesets/coffin": [256,1600],
"graphics/tilesets/earth": [256,768],
"graphics/tilesets/factory": [256,1280],
"graphics/tilesets/fort": [256,1600],
"graphics/tilesets/fort2": [256,1600],
"graphics/tilesets/plant": [256,1600],
"graphics/tilesets/shop": [256,1280],
"graphics/tilesets/shop2": [256,1280],
"graphics/tilesets/sky": [256,2048],
"graphics/tilesets/trailer": [256,160],
"graphics/tilesets/under0": [256,1600],
"graphics/titles/kn_title1": [640,480],
"graphics/transitions/001-blind01": [640,480],
"graphics/transitions/002-blind02": [640,480],
"graphics/transitions/003-blind03": [640,480],
"graphics/transitions/004-blind04": [640,480],
"graphics/transitions/005-stripe01": [640,480],
"graphics/transitions/006-stripe02": [640,480],
"graphics/transitions/007-line01": [640,480],
"graphics/transitions/008-line02": [640,480],
"graphics/transitions/009-random01": [640,480],
"graphics/transitions/010-random02": [640,480],
"graphics/transitions/011-random03": [640,480],
"graphics/transitions/012-random04": [640,480],
"graphics/transitions/013-square01": [640,480],
"graphics/transitions/014-square02": [640,480],
"graphics/transitions/015-diamond01": [640,480],
"graphics/transitions/016-diamond02": [640,480],
"graphics/transitions/017-brick01": [640,480],
"graphics/transitions/018-brick02": [640,480],
"graphics/transitions/019-whorl01": [640,480],
"graphics/transitions/020-flat01": [640,480],
"graphics/windowskins/windowskin_kn": [192,128],
};

View File

@ -3,7 +3,8 @@ var mapping = {
"data": "Data?h=",
"game": "Game.ini?h=dc381d8eebb783f2162b101e9d104ea4",
"graphics": "Graphics?h=",
"mapping": "mapping.js?h=1e4630549991863a1c66bc4b882353d1",
"bitmap-map": "bitmap-map.js?h=8d29145a907a99d776f9603eb356d5fa",
"mapping": "mapping.js?h=1d3ccdbb24d72b3de00941bc04721c57",
"rgss": "rgss.rb?h=e4f6ce1cd6617eedd6e4704cfd0d263b",
"audio/bgm": "Audio/BGM?h=",
"audio/bgs": "Audio/BGS?h=",

View File

@ -8,6 +8,7 @@
<script src="js/localforage.min.js"></script>
<script src="js/drive.js"></script>
<script src="gameasync/mapping.js"></script>
<script src="gameasync/bitmap-map.js"></script>
<title>MKXP</title>
<style>
@ -74,8 +75,8 @@
#fullscreen {
position: fixed;
bottom: 20px;
right: 20px;
bottom: 10px;
right: 10px;
opacity: 0.5;
cursor: pointer;
}
@ -83,8 +84,8 @@
opacity: 1;
}
#fullscreen > svg {
height: 25px;
width: 25px;
height: 20px;
width: 20px;
}
#progress {
@ -129,11 +130,14 @@
#d-right { transform: translateX(100%); }
#ap-b { transform: translate(-130%, 90%); }
#ap-c { transform: translate(-15%, -25%); }
#ap-a {
#ap-a, #ap-ka {
height: 7vh; max-height: 7vw;
width: 7vh; max-width: 7vw;
top: 50%;
transform: translate(25%, 25%);
transform: translate(60%, -30%);
}
#ap-ka {
transform: translate(-20%, 70%);
}
</style>
</head>
@ -158,6 +162,7 @@
<div id="ap-c"></div>
<div id="ap-b"></div>
<div id="ap-a"></div>
<div id="ap-ka"></div>
</div>
</div>
@ -245,9 +250,7 @@
return canvas;
})(),
setStatus: function(text) {
}
setStatus: function(text) {}
};
window.setBusy = function() {
@ -267,6 +270,16 @@
console.error("An error occured!")
};
function preloadList(jsonArray) {
jsonArray.forEach((f) => {
const url = mapping[f.toLowerCase().replace(new RegExp("\\.[^/.]+$"), "")];
if (!url) return;
// Preload the asset
fetch('gameasync/' + url).then().catch();
});
}
window.fileLoadedAsync = function(file) {
document.title = wTitle;
@ -277,21 +290,16 @@
return response.json();
})
.then(function(jsonResponse) {
jsonResponse.forEach((f) => {
const url = mapping[f.toLowerCase().replace(new RegExp("\\.[^/.]+$"), "")];
if (!url) return;
// Preload the asset
setTimeout(() => {
fetch('gameasync/' + url).then().catch();
}, 1000);
});
preloadList(jsonResponse);
}, 200);
});
};
var hideTimer = 0;
function getLazyAsset(url, filename, callback) {
const xhr = new XMLHttpRequest();
xhr.responseType = "arraybuffer";
const pdiv = document.getElementById("progress");
let showTimer = 0;
let abortTimer = 0;
@ -308,10 +316,9 @@
pdiv.style.opacity = '0';
hideTimer = 0;
}, 500);
callback();
clearTimeout(showTimer);
clearTimeout(abortTimer);
callback(xhr.response);
}
}
xhr.onprogress = function (event) {
@ -340,9 +347,27 @@
}
document.title = wTitle;
</script>
<script>
// Load important files
preloadList([
'rgss.rb',
'data/scripts',
'data/actors',
'data/classes',
'data/skills',
'data/items',
'data/weapons',
'data/armors',
'data/enemies',
'data/troops',
'data/states',
'data/animations',
'data/tilesets',
'data/commonevents',
'data/system',
'data/mapinfos',
]);
// Load wasm then initialize
setTimeout(() => {
getLazyAsset('mkxp.wasm', 'Game engine', () => {
@ -350,7 +375,7 @@
s.setAttribute('src', 'mkxp.js');
document.body.appendChild(s);
});
}, 500);
}, 200);
function simulateKeyEvent(eventType, keyCode, charCode) {
var e = document.createEventObject ? document.createEventObject() : document.createEvent("Events");
@ -436,6 +461,7 @@
bindKey('ap-c', 67);
bindKey('ap-b', 88);
bindKey('ap-a', 90);
bindKey('ap-ka', 65);
const resize = function() {
const el = document.getElementById('canvas');
@ -450,7 +476,6 @@
window.addEventListener('resize', resize);
resize();
</script>
<!-- <script async type="text/javascript" src="mkxp.js"></script> -->

View File

@ -18,3 +18,79 @@ function _base64ToBytes(base64) {
}
return bytes;
}
// Canvas used for image generation
var generationCanvas = document.createElement('canvas')
window.loadFileAsync = function(fullPath, bitmap, callback) {
// noop
callback = callback || (() => {});
// Make cache object
if (!window.fileAsyncCache) window.fileAsyncCache = {};
// Check if already loaded
if (window.fileAsyncCache.hasOwnProperty(fullPath)) return callback();
// Show spinner
if (!bitmap && window.setBusy) window.setBusy();
// Get mapping key
const mappingKey = fullPath.toLowerCase().replace(new RegExp("\\.[^/.]+$"), "");
const mappingValue = mapping[mappingKey];
// Check if this is a folder
if (!mappingValue || mappingValue.endsWith("h=")) {
console.error("Skipping loading", fullPath, mappingValue);
return callback();
}
// Get target URL
const iurl = "gameasync/" + mappingValue;
// Get path and filename
const path = "/game/" + mappingValue.substring(0, mappingValue.lastIndexOf("/"));
const filename = mappingValue.substring(mappingValue.lastIndexOf("/") + 1).split("?")[0];
// Main loading function
const load = (cb1) => {
getLazyAsset(iurl, filename, (data) => {
FS.createPreloadedFile(path, filename, new Uint8Array(data), true, true, function() {
window.fileAsyncCache[fullPath] = 1;
if (!bitmap && window.setNotBusy) window.setNotBusy();
if (window.fileLoadedAsync) window.fileLoadedAsync(fullPath);
callback();
if (cb1) cb1();
}, console.error, false, false, () => {
try { FS.unlink(path + "/" + filename); } catch (err) {}
});
});
}
// Show progress if doing it synchronously only
if (bitmap && bitmapSizeMapping[mappingKey]) {
// Get image
const sm = bitmapSizeMapping[mappingKey];
generationCanvas.width = sm[0];
generationCanvas.height = sm[1];
// Create dummy from data uri
FS.createPreloadedFile(path, filename, generationCanvas.toDataURL(), true, true, function() {
// Return control to C++
callback(); callback = () => {};
// Lazy load and refresh
load(() => {
const reloadBitmap = Module.cwrap('reloadBitmap', 'number', ['number'])
reloadBitmap(bitmap);
});
}, console.error, false, false, () => {
try { FS.unlink(path + "/" + filename); } catch (err) {}
});
} else {
if (bitmap) {
console.warn('No sizemap for image', mappingKey);
}
load();
}
}

File diff suppressed because one or more lines are too long

BIN
mkxp.wasm

Binary file not shown.