private static final short scorp_framestart[] = { 0, 18, 35, 50, 68, 81 };
private static final short scorp_frameoffset[] = { 2, 1, 0, 1, 0 };
private static final short scorp_flipstart[] = { 63, 46, 31, 13, 0 };
private static final short scorp_flipoffset[] = { 2, 2, 1, 3, -1 };
private static final byte scorp_fireseq[] = { 0,2,2,3,3,2,2,2 };
private static final byte scorp_deathseq[] = { 4 };
private static final short arab_framestart[] = { 0, 18, 36, 59, 78, 100, 112 };
private static final short arab_frameoffset[] = { 3, 3, 2, 3, 5, 0 };
private static final short arab_flipstart[] = { 94, 76, 53, 34, 12, 0 };
private static final short arab_flipoffset[] = { 3, 3, 9, 4, 5, 0 };
private static final byte arab_fireseq[] = { 0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 };
private static final byte arab_deathseq[] = { 4,3,3,3,3 };
private static final short mummy_framestart[] = { 0, 18, 37, 53, 67, 99, 129 };
private static final short mummy_frameoffset[] = { 4, 0, 3, 2, 11, 10 };
private static final short mummy_flipstart[] = { 111, 92, 76, 62, 30, 0 };
private static final short mummy_flipoffset[] = { 4, 9, 3, 2, 11, 10 };
private static final byte mummy_fireseq[] = { 0,3,3,2,2,2,1,1,0,0 };
private static final byte mummy_deathseq[] = { 5,4,4,4,4 };
private static final short sandboss_framestart[] = { 0, 26, 52, 79, 118, 152 };
private static final short sandboss_flipstart[] = { 126, 100, 73, 34, 0 };
private static final short sandboss_flipoffset[] = { 8, 7, 11, 17, 9 };
private static final byte sandboss_fireseq[] = { 0,2,2,2,1,1,1,1 };
private static final byte sandboss_deathseq[] = { 4,3,3,3,3,3 };
private static final MonsterInfo miScorp = new MonsterInfo();
private static final MonsterInfo miMummy = new MonsterInfo();
private static final MonsterInfo miArab = new MonsterInfo();
private static final MonsterInfo miSandBoss = new MonsterInfo();
private static final MonsterInfo miScorpBox = new MonsterInfo();
private static final MonsterInfo miChildScorp = new MonsterInfo();
private static final MonsterInfo miPlayer = new MonsterInfo();
private static final MonsterInfo monsterinfo[] =
{ miScorp, miMummy, miArab, miSandBoss, miScorpBox };
private final static int PROJECTILE_RADIUS = 6;
private final static int PROJECTILE_DIAMETER = 12;
private final static int MAXPROJECTILES = 6;
private static final Monster playerprojectiles[] = new Monster[MAXPROJECTILES];
private static final Monster enemyprojectiles[] = new Monster[MAXPROJECTILES];
private static int nplayerprojs;
private static int nmonsterprojs;
private static final short magic2_framestart[] = { 0, 11, 21, 35, 50, 63 };
private static final short magic2_frameoffset[] = { 0, 0, 2, 2, 1 };
private static final byte magic2_deathseq[] = { 4, 4, 3, 3, 2, 2, 1, 1 };
private static final short magic3_framestart[] = { 0, 11, 29, 49, 74 };
private static final short magic3_frameoffset[] = { 0, 4, 5, 7 };
private static final byte magic3_deathseq[] = { 3, 2, 1, 3, 3, 2, 2, 1, 1 };
private static final MonsterInfo magictype[] = new MonsterInfo[3];
private static final short arabfire_framestart[] = { 0, 7 };
private static final short arabfire_frameoffset[] = { -1 };
private static final short wind_framestart[] =
{ 0, 18, 36 };
private static final short wind_frameoffset[] = { 4, 4 };
private static int winx1, winx2, winy1, winy1sc, winy2;
private static final int MOVESPEED = 2;
private static final int RUNSPEED = 4;
private static final int MAXYSPEED = 6;
private static final int JUMPXSPEED = 2;
private static final int JUMPYSPEED = 10;
private static final int FALLXSPEED = 1;
private static final int GRAVITY = 1;
private static final int CELLSIZE = 5;
//final int STEPHEIGHT = CELLSIZE;
private static final int PL_HEIGHT = 25;
private static final int PL_WIDTH = 12;
private final int JUMPPADXSPEED = 2;
private final int JUMPPADYSPEED = 15;
private static final byte PL_STAND = 0;
private static final byte PL_WALK1 = 1;
private static final byte PL_WALK2 = 2;
private static final byte PL_WALK3 = 3;
private static final byte PL_DOWN = 4;
private static final byte PL_JUMP = 5;
private static final byte PL_INAIR = 6;
private static final byte PL_DUCK = 7;
private static final byte PL_DIE = 8;
private static final byte PL_DEAD = 9;
private static final byte PL_FIST1 = 10;
private static final byte PL_FIST2 = 11;
private static final byte PL_CAST1 = 12;
private static final byte PL_CAST2 = 13;
private static final int PL_NUMJUMPTICKS = 5;
private static final byte pl_jumpframes[] = { PL_JUMP, PL_DOWN, PL_DOWN, PL_DOWN, PL_DOWN };
private static final int PL_WAITAFTERFALL = 5;
private static final int PL_NUMFISTTICKS = 5;
private static final byte pl_fistframes[] = { PL_STAND, PL_FIST2, PL_FIST2, PL_FIST1, PL_FIST1 };
private static final int PL_NUMCASTTICKS = 7;
private static final byte pl_castframes[] = { PL_STAND, PL_CAST2, PL_CAST2, PL_CAST2, PL_CAST1, PL_CAST1, PL_CAST1 };
private static final int PL_NUMDIETICKS = 5;
private static final byte pl_dieframes[] = { PL_DEAD, PL_DIE, PL_DIE, PL_DIE, PL_DIE };
private static final int REASON_LAND = 0;
private static final int REASON_JUMP = 1;
private static final int REASON_DIE = 2;
private static final int REASON_FIST = 3;
private static final int REASON_CAST = 4;
private static final int MONSTERRESPAWNDELAY = 600;
private final static int MAXCHILDREN = 5;
private static final Monster[] children = new Monster[MAXCHILDREN];
private static final int maxsimultmonsters = 4;
private static final int PORTWIDTH = 128;
private static final int PORTHEIGHT = 113;
private static final int UPPERHEIGHT = 8;
private static final int LOWERHEIGHT = 7;
private static final int LOWERPANELY = UPPERHEIGHT+PORTHEIGHT;
private static final int IND_BMNUMBER = 0;
private static final int IND_X = 1;
private static final int IND_Y = 2;
private static final int IND_WID = 3;
private static final int IND_HEI = 4;
private static final int IND_DX = 5;
private static final int IND_DY = 6;
private static final int IND_TILED = 7;
static final int IND_SOLIDITY = 8;
static short picinfo[][];
private int numpicinfos;
public static boolean gameinprogress;
private static int tick;
static Mobj mobiles[];
static Mobj seenmobjs[];
static Mobj mobjunrol[];
static final int MAXSEENMONSTERS = 10;
static Monster monsterunrol[];
static int maxscen, maxdead, maxmobjs, maxmonsters;
static int nseenmobjs;
static int div_back_front;
static int div_front_tech;
static int div_tech_monsters;
static Mobj screen = new Mobj();
static int nmobiles;
private static int startskill;
private static boolean firsttime;
static int nscen;
static byte scennum[];
static short scenx[], sceny[];
static int ndead;
static byte deadnum[];
static short deadx1[], deady1[], deadx2[], deady2[];
static int dead_frontthreshold;
static int nmonsters;
static short mon_x1[];
static short mon_y2[];
static short mon_data1[];
static short mon_data2[];
static short mon_data3[];
static short mon_data4[];
static byte mon_hp[];
static MonsterInfo mon_info[];
static int mon_tick[];
static byte mon_frame[];
private static Image imgJumpPadX;
static int scx, scy, oldscx, oldscy;
static int blocknumx, blocknumy;
static int blockstepx, blockstepy;
static int maxbmcount;
private static short[] blockmap;
private static short[][] bm_thinkers;
public static Monster player;
private static int xspeed,yspeed;
private static int normyspeed;
private static int player_waitticks;
private static int player_waitreason;
private static boolean player_bumpwall;
private static int player_duckdepth;
private static int player_maxhp;
private static int origplayery1;
private static Mobj supporter;
private static int platspeed;
private static int player_weapon;
private static int player_usedweapon;
private static boolean player_hithead;
static int score;
private static int scoreaccum;
private static final int ammoleft[] = new int[3];
private final static int GODTICK = 17*6;
private static int player_godtime;
private static int player_castcountdown;
private static int runcount;
private static int player_step;
private static int lives;
private static int player_castrate;
private static boolean player_sunk;
private static Mobj jumppad;
private static int padframe;
private static final int NUMPADFRAMES = 8;
private static final int PADAPEX = 4;
private static final int PADXAPEX = 5;
private static final int PADXHEIGHT = 13;
private static final int PADXWIDTH = 21;
private static int paddontmovecount;
private static final int MSGR_DEATH = 0;
private static final int MSGR_DONE = 1;
private static final int MSGR_GAMEOVER = 2;
private static int messagereason;
private static int messagecountdown;
private static final int MESSAGEDELAY = 50;
private static int origpx1, origpy2;