public final static String[] FILESNAME={"a_0","a_1","a_10","a_11","a_12","a_2","a_3","a_4","a_5","a_6","a_7","a_8","a_9","appar","bomb","boss0","boss1","boss1_1","boss1_2","boss1_3","boss2","boss2_0","boss2_1","boss2_2","boss2_e1","boss2_e2","button","cp","e0","e1","e2","e6","fireEffect","fog_0 copy","fog_0","fog_1","font","fontbg","home","house_0","house_1","house_2","house_3","housebomb","i0","i1","i2","i3","i6","interfacebg","key","menubg","menuchoose","menuFont_0","menuFont_1","monternet","num","openbg","paotai","passorfail","pit0","pit1","plane","prop0","prop1","prop2","prop3","prop4","prop5","prop6","prop7","prop8","prop9","propicon","rankpass","result","role","select","shoot","shoot1","shoot2","shoot3","shoot4","shoot5","shoot6","shoptitle","show","smallcannon","smallicon","smoke","sp","tankbomb","title","trainfire","trainway"};

public final static byte IMG_A_0=0;
public final static byte IMG_A_1=1;
public final static byte IMG_A_10=2;
public final static byte IMG_A_11=3;
public final static byte IMG_A_12=4;
public final static byte IMG_A_2=5;
public final static byte IMG_A_3=6;
public final static byte IMG_A_4=7;
public final static byte IMG_A_5=8;
public final static byte IMG_A_6=9;
public final static byte IMG_A_7=10;
public final static byte IMG_A_8=11;
public final static byte IMG_A_9=12;
public final static byte IMG_APPAR=13;
public final static byte IMG_BOMB=14;
public final static byte IMG_BOSS0=15;
public final static byte IMG_BOSS1=16;
public final static byte IMG_BOSS1_1=17;
public final static byte IMG_BOSS1_2=18;
public final static byte IMG_BOSS1_3=19;
public final static byte IMG_BOSS2=20;
public final static byte IMG_BOSS2_0=21;
public final static byte IMG_BOSS2_1=22;
public final static byte IMG_BOSS2_2=23;
public final static byte IMG_BOSS2_E1=24;
public final static byte IMG_BOSS2_E2=25;
public final static byte IMG_BUTTON=26;
public final static byte IMG_CP=27;
public final static byte IMG_E0=28;
public final static byte IMG_E1=29;
public final static byte IMG_E2=30;
public final static byte IMG_E6=31;
public final static byte IMG_FIREEFFECT=32;
public final static byte IMG_FOG_0 COPY=33;
public final static byte IMG_FOG_0=34;
public final static byte IMG_FOG_1=35;
public final static byte IMG_FONT=36;
public final static byte IMG_FONTBG=37;
public final static byte IMG_HOME=38;
public final static byte IMG_HOUSE_0=39;
public final static byte IMG_HOUSE_1=40;
public final static byte IMG_HOUSE_2=41;
public final static byte IMG_HOUSE_3=42;
public final static byte IMG_HOUSEBOMB=43;
public final static byte IMG_I0=44;
public final static byte IMG_I1=45;
public final static byte IMG_I2=46;
public final static byte IMG_I3=47;
public final static byte IMG_I6=48;
public final static byte IMG_INTERFACEBG=49;
public final static byte IMG_KEY=50;
public final static byte IMG_MENUBG=51;
public final static byte IMG_MENUCHOOSE=52;
public final static byte IMG_MENUFONT_0=53;
public final static byte IMG_MENUFONT_1=54;
public final static byte IMG_MONTERNET=55;
public final static byte IMG_NUM=56;
public final static byte IMG_OPENBG=57;
public final static byte IMG_PAOTAI=58;
public final static byte IMG_PASSORFAIL=59;
public final static byte IMG_PIT0=60;
public final static byte IMG_PIT1=61;
public final static byte IMG_PLANE=62;
public final static byte IMG_PROP0=63;
public final static byte IMG_PROP1=64;
public final static byte IMG_PROP2=65;
public final static byte IMG_PROP3=66;
public final static byte IMG_PROP4=67;
public final static byte IMG_PROP5=68;
public final static byte IMG_PROP6=69;
public final static byte IMG_PROP7=70;
public final static byte IMG_PROP8=71;
public final static byte IMG_PROP9=72;
public final static byte IMG_PROPICON=73;
public final static byte IMG_RANKPASS=74;
public final static byte IMG_RESULT=75;
public final static byte IMG_ROLE=76;
public final static byte IMG_SELECT=77;
public final static byte IMG_SHOOT=78;
public final static byte IMG_SHOOT1=79;
public final static byte IMG_SHOOT2=80;
public final static byte IMG_SHOOT3=81;
public final static byte IMG_SHOOT4=82;
public final static byte IMG_SHOOT5=83;
public final static byte IMG_SHOOT6=84;
public final static byte IMG_SHOPTITLE=85;
public final static byte IMG_SHOW=86;
public final static byte IMG_SMALLCANNON=87;
public final static byte IMG_SMALLICON=88;
public final static byte IMG_SMOKE=89;
public final static byte IMG_SP=90;
public final static byte IMG_TANKBOMB=91;
public final static byte IMG_TITLE=92;
public final static byte IMG_TRAINFIRE=93;
public final static byte IMG_TRAINWAY=94;

public final static Image loadImage(byte imgIndex){
   byte[] imgData=loadImageData(imgIndex);
    return Image.createImage(imgData, 0, imgData.length);
}

public final static byte[] loadImageData(byte imgIndex){
  InputStream is= "".getClass().getResourceAsStream("/imgPackage.dat");
  int offset=0;
  int len=0;
  byte[] imgData=null;
  try{
    switch(imgIndex){ 
      case IMG_A_0:
        offset=0;
        len=242;
        break;
      case IMG_A_1:
        offset=242;
        len=264;
        break;
      case IMG_A_10:
        offset=506;
        len=208;
        break;
      case IMG_A_11:
        offset=714;
        len=212;
        break;
      case IMG_A_12:
        offset=926;
        len=215;
        break;
      case IMG_A_2:
        offset=1141;
        len=281;
        break;
      case IMG_A_3:
        offset=1422;
        len=337;
        break;
      case IMG_A_4:
        offset=1759;
        len=300;
        break;
      case IMG_A_5:
        offset=2059;
        len=322;
        break;
      case IMG_A_6:
        offset=2381;
        len=340;
        break;
      case IMG_A_7:
        offset=2721;
        len=301;
        break;
      case IMG_A_8:
        offset=3022;
        len=322;
        break;
      case IMG_A_9:
        offset=3344;
        len=339;
        break;
      case IMG_APPAR:
        offset=3683;
        len=1073;
        break;
      case IMG_BOMB:
        offset=4756;
        len=463;
        break;
      case IMG_BOSS0:
        offset=5219;
        len=2568;
        break;
      case IMG_BOSS1:
        offset=7787;
        len=2215;
        break;
      case IMG_BOSS1_1:
        offset=10002;
        len=504;
        break;
      case IMG_BOSS1_2:
        offset=10506;
        len=304;
        break;
      case IMG_BOSS1_3:
        offset=10810;
        len=254;
        break;
      case IMG_BOSS2:
        offset=11064;
        len=8670;
        break;
      case IMG_BOSS2_0:
        offset=19734;
        len=438;
        break;
      case IMG_BOSS2_1:
        offset=20172;
        len=319;
        break;
      case IMG_BOSS2_2:
        offset=20491;
        len=363;
        break;
      case IMG_BOSS2_E1:
        offset=20854;
        len=619;
        break;
      case IMG_BOSS2_E2:
        offset=21473;
        len=1442;
        break;
      case IMG_BUTTON:
        offset=22915;
        len=421;
        break;
      case IMG_CP:
        offset=23336;
        len=1506;
        break;
      case IMG_E0:
        offset=24842;
        len=907;
        break;
      case IMG_E1:
        offset=25749;
        len=754;
        break;
      case IMG_E2:
        offset=26503;
        len=867;
        break;
      case IMG_E6:
        offset=27370;
        len=1368;
        break;
      case IMG_FIREEFFECT:
        offset=28738;
        len=474;
        break;
      case IMG_FOG_0 COPY:
        offset=29212;
        len=2917;
        break;
      case IMG_FOG_0:
        offset=32129;
        len=219;
        break;
      case IMG_FOG_1:
        offset=32348;
        len=223;
        break;
      case IMG_FONT:
        offset=32571;
        len=2751;
        break;
      case IMG_FONTBG:
        offset=35322;
        len=315;
        break;
      case IMG_HOME:
        offset=35637;
        len=2908;
        break;
      case IMG_HOUSE_0:
        offset=38545;
        len=1208;
        break;
      case IMG_HOUSE_1:
        offset=39753;
        len=2213;
        break;
      case IMG_HOUSE_2:
        offset=41966;
        len=2212;
        break;
      case IMG_HOUSE_3:
        offset=44178;
        len=3600;
        break;
      case IMG_HOUSEBOMB:
        offset=47778;
        len=2830;
        break;
      case IMG_I0:
        offset=50608;
        len=418;
        break;
      case IMG_I1:
        offset=51026;
        len=405;
        break;
      case IMG_I2:
        offset=51431;
        len=409;
        break;
      case IMG_I3:
        offset=51840;
        len=287;
        break;
      case IMG_I6:
        offset=52127;
        len=506;
        break;
      case IMG_INTERFACEBG:
        offset=52633;
        len=2566;
        break;
      case IMG_KEY:
        offset=55199;
        len=752;
        break;
      case IMG_MENUBG:
        offset=55951;
        len=6635;
        break;
      case IMG_MENUCHOOSE:
        offset=62586;
        len=229;
        break;
      case IMG_MENUFONT_0:
        offset=62815;
        len=1314;
        break;
      case IMG_MENUFONT_1:
        offset=64129;
        len=1676;
        break;
      case IMG_MONTERNET:
        offset=65805;
        len=1059;
        break;
      case IMG_NUM:
        offset=66864;
        len=558;
        break;
      case IMG_OPENBG:
        offset=67422;
        len=25136;
        break;
      case IMG_PAOTAI:
        offset=92558;
        len=1463;
        break;
      case IMG_PASSORFAIL:
        offset=94021;
        len=2681;
        break;
      case IMG_PIT0:
        offset=96702;
        len=630;
        break;
      case IMG_PIT1:
        offset=97332;
        len=646;
        break;
      case IMG_PLANE:
        offset=97978;
        len=979;
        break;
      case IMG_PROP0:
        offset=98957;
        len=408;
        break;
      case IMG_PROP1:
        offset=99365;
        len=408;
        break;
      case IMG_PROP2:
        offset=99773;
        len=481;
        break;
      case IMG_PROP3:
        offset=100254;
        len=367;
        break;
      case IMG_PROP4:
        offset=100621;
        len=401;
        break;
      case IMG_PROP5:
        offset=101022;
        len=428;
        break;
      case IMG_PROP6:
        offset=101450;
        len=433;
        break;
      case IMG_PROP7:
        offset=101883;
        len=477;
        break;
      case IMG_PROP8:
        offset=102360;
        len=514;
        break;
      case IMG_PROP9:
        offset=102874;
        len=330;
        break;
      case IMG_PROPICON:
        offset=103204;
        len=10732;
        break;
      case IMG_RANKPASS:
        offset=113936;
        len=14107;
        break;
      case IMG_RESULT:
        offset=128043;
        len=1076;
        break;
      case IMG_ROLE:
        offset=129119;
        len=1090;
        break;
      case IMG_SELECT:
        offset=130209;
        len=1384;
        break;
      case IMG_SHOOT:
        offset=131593;
        len=190;
        break;
      case IMG_SHOOT1:
        offset=131783;
        len=203;
        break;
      case IMG_SHOOT2:
        offset=131986;
        len=202;
        break;
      case IMG_SHOOT3:
        offset=132188;
        len=248;
        break;
      case IMG_SHOOT4:
        offset=132436;
        len=353;
        break;
      case IMG_SHOOT5:
        offset=132789;
        len=223;
        break;
      case IMG_SHOOT6:
        offset=133012;
        len=305;
        break;
      case IMG_SHOPTITLE:
        offset=133317;
        len=2376;
        break;
      case IMG_SHOW:
        offset=135693;
        len=214;
        break;
      case IMG_SMALLCANNON:
        offset=135907;
        len=379;
        break;
      case IMG_SMALLICON:
        offset=136286;
        len=2773;
        break;
      case IMG_SMOKE:
        offset=139059;
        len=431;
        break;
      case IMG_SP:
        offset=139490;
        len=3795;
        break;
      case IMG_TANKBOMB:
        offset=143285;
        len=1971;
        break;
      case IMG_TITLE:
        offset=145256;
        len=678;
        break;
      case IMG_TRAINFIRE:
        offset=145934;
        len=235;
        break;
      case IMG_TRAINWAY:
        offset=146169;
        len=327;
        break;
    }
    imgData = new byte[len]; 
    is.skip(offset);
    is.read(imgData, 0, len);
    is.close();
   }
  catch(Exception e){}
  return imgData;
}

int[] offsetArray={0,242,242,264,506,208,714,212,926,215,1141,281,1422,337,1759,300,2059,322,2381,340,2721,301,3022,322,3344,339,3683,1073,4756,463,5219,2568,7787,2215,10002,504,10506,304,10810,254,11064,8670,19734,438,20172,319,20491,363,20854,619,21473,1442,22915,421,23336,1506,24842,907,25749,754,26503,867,27370,1368,28738,474,29212,2917,32129,219,32348,223,32571,2751,35322,315,35637,2908,38545,1208,39753,2213,41966,2212,44178,3600,47778,2830,50608,418,51026,405,51431,409,51840,287,52127,506,52633,2566,55199,752,55951,6635,62586,229,62815,1314,64129,1676,65805,1059,66864,558,67422,25136,92558,1463,94021,2681,96702,630,97332,646,97978,979,98957,408,99365,408,99773,481,100254,367,100621,401,101022,428,101450,433,101883,477,102360,514,102874,330,103204,10732,113936,14107,128043,1076,129119,1090,130209,1384,131593,190,131783,203,131986,202,132188,248,132436,353,132789,223,133012,305,133317,2376,135693,214,135907,379,136286,2773,139059,431,139490,3795,143285,1971,145256,678,145934,235,146169,327};

