import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;

/**
 *
 */

/**
 * @author general
 *
 */
public class GameCanvas extends Canvas implements Runnable {
 
 private int s_keyA ;
 
 private int s_keyB ;
 
 private int s_currentKey
 ;
 private int s_pressKey ;
 
 private int s_fastCurrentKey ;
 
 
 GameCanvas(){
  
  //    括号里的参数指的是线程类对象
  new Thread(this).start();
 }

 /* (非 Javadoc)
  * @see javax.microedition.lcdui.Canvas#paint(javax.microedition.lcdui.Graphics)
  */
 protected void paint(Graphics g) {
  
  updataKey();//每次更新按键

  if(is_HoldKey(Const.GK_DOWN))
  {
   System.out.println("持续按着下键");
  }
  
  if(is_anyKeyPressed())
  {
   System.out.println("按了一个任意键");
  }
  
  if(is_keyPressed(Const.GK_DOWN))
  {
   System.out.println("突然按了下键");
  }
  
 }

 /* (非 Javadoc)
  * @see java.lang.Runnable#run()
  */
 public void run() {
  
  while(true)
  {
   try {
    Thread.sleep(100);
   } catch (InterruptedException e) {
    e.printStackTrace();
   }
   
   this.repaint();
   this.serviceRepaints();
  }

 }

 protected void keyPressed(int keyCode) {
  
  s_keyA = getKey(keyCode);
  //将系统的按键值,转换为我们自己定义的值,自己定义的值也是有技巧的
        s_fastCurrentKey |= s_keyA;//这语句等价于s_fastCurrentKey = s_keyA     
 }

 
 
 protected void keyReleased(int keyCode) {
  s_keyB = getKey(keyCode);
  s_fastCurrentKey &= ~s_keyB ;//等价于s_fastCurrentKey = 0 ;
  System.out.println("释放后的s_fastCurrentKey等于:"+s_fastCurrentKey);
 }
 
 //更新按键
 private void updataKey()
 {
  if(s_currentKey != 0)//如果是持续按着的
  {
   s_pressKey = 0 ;
  }
  else//这里也固定了s_currentKey的初始值必须为0
  {
   //说明是突然按键
   s_pressKey = s_keyA ;
   
  }
  
  s_currentKey = s_fastCurrentKey ;//记录本次的按键值
  s_keyA = s_keyB = 0 ;
 }

 protected void keyRepeated(int keyCode) {
 }
 
 //用于判断是否突然按了某个键
 private boolean is_anyKeyPressed()
 {
  return s_pressKey != 0 ;
 }
 
 //判断是否持续按着某个键
 private boolean is_HoldKey(int keyCode)
 {
  return s_currentKey == getKey(keyCode);
 }

 
    private boolean is_keyPressed(int gameKey)
    {
            return (s_pressKey & gameKey) != 0;
    }

 //将系统按键转换为我们自己定义的值
    private static int getKey(int keyCode)
    {

        switch (keyCode)
        {

                case Const.STD_UP_ARROW:

                case Const.PADDLE_UP:

                case KEY_NUM2:

                        return Const.GK_UP;

                case Const.STD_DOWN_ARROW:

                case Const.PADDLE_DOWN:

                case KEY_NUM8:

                        return Const.GK_DOWN;

                case Const.STD_LEFT_ARROW:

                case Const.PADDLE_LEFT:

                case KEY_NUM4:

                        return Const.GK_LEFT;


                case Const.STD_RIGTH_ARROW:

                case Const.PADDLE_RIGHT:

                case KEY_NUM6:

                        return Const.GK_RIGHT;

                case Const.STD_M:

                case Const.PADDLE_CENTER:

                case KEY_NUM5:
                        return Const.GK_M;

                case KEY_NUM0:
                        return Const.GK_NUM0;


                case KEY_NUM1:
                        return Const.GK_NUM1;

                case KEY_NUM3:
                        return Const.GK_NUM3;


                case KEY_NUM9:
                        return Const.GK_NUM9;

                case KEY_NUM7:
                        return Const.GK_NUM7;


                case Const.STD_LEFT_SOFT:

                case Const.PADDLE_SOFT1:


             return Const.GK_RIGHT_SOFT;

               case Const.STD_RIGHT_SOFT:

               case Const.PADDLE_SOFT2:

                     return Const.GK_LEFT_SOFT;

                case Const.PADDLE_SOFT3:
                        return Const.GK_CENTER_SOFT;

    case KEY_POUND:
    case KEY_STAR:

     return 0;

                default:
                        return 0;
        }
    }
 
}

 

import javax.microedition.lcdui.*;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: </p>
 * @author unascribed
 * @version 1.0
 */

public class Const
{
 public final static int GS_SHOWINFO = 100 ;
    public static final boolean DEBUGGING = true;
    public static final boolean GODMODE = true;

    public final static int GRAVITY_VY     = 26 << 8;      // must big than the biggest speed
    public final static int GRAVITY_IGNORE = 26 << 8;      // down such a height will not considered as falling


    //运动到了移位运算符号,规律性很强,很好,很强大
   
    public static final int GK_UP = 1;
    public static final int GK_DOWN = 1 << 1;
    public static final int GK_LEFT = 1 << 2;
    public static final int GK_RIGHT = 1 << 3;
    public static final int GK_NUM0 = 1 << 4;
    public static final int GK_NUM1 = 1 << 5;
    public static final int GK_NUM2 = 1 << 6;
    public static final int GK_NUM3 = 1 << 7;
    public static final int GK_NUM4 = 1 << 8;
    public static final int GK_NUM5 = 1 << 9;
    public static final int GK_NUM6 = 1 << 10;
    public static final int GK_NUM7 = 1 << 11;
    public static final int GK_NUM8 = 1 << 12;
    public static final int GK_NUM9 = 1 << 13;
    public static final int GK_STAR = 1 << 14;
    public static final int GK_POUND = 1 << 15;
    public static final int GK_LEFT_SOFT = 1 << 16;
    public static final int GK_RIGHT_SOFT = 1 << 17;
    public static final int GK_CENTER_SOFT = 1 << 18;
    public static final int GK_M = 1 << 20;

    //首先这里的设定是有技巧的
   
    //这里我们一直都把问题给局限死了,他是怎么可能做的到的呢?怎么可能判断出里面的每一位呢,0和1是随便乱摆放
    //因此迟
   
   
   
   
    public static final int STD_UP_ARROW = -1;
    public static final int STD_DOWN_ARROW = -2;
    public static final int STD_LEFT_ARROW = -3;
    public static final int STD_RIGTH_ARROW = -4;
    public static final int STD_LEFT_SOFT = -6;
    public static final int STD_RIGHT_SOFT = -7;
    public static final int STD_M = -5;

    // moto triplets, V3 is negative value
    public static final int PADDLE_UP = 1;
    public static final int PADDLE_DOWN = 2;
    public static final int PADDLE_LEFT = 3;
    public static final int PADDLE_RIGHT = 4;
    public static final int PADDLE_FIRE = 20;
    public static final int PADDLE_SOFT1 = 6;
    public static final int PADDLE_SOFT2 = 7;
    public static final int PADDLE_SOFT3 = 23;
    public static final int PADDLE_CENTER = 5;

    public static final int DBL_PRESS_INTERVAL = 6;

    public static final int TOPLEFT = Graphics.TOP | Graphics.LEFT;
    public static final int TOPRIGHT = Graphics.TOP | Graphics.RIGHT;
    public static final int TOPCENTER = Graphics.TOP | Graphics.HCENTER;
    public static final int CENTER = Graphics.VCENTER | Graphics.HCENTER;
    public static final int BOTTOMLEFT = Graphics.BOTTOM | Graphics.LEFT;
    public static final int BOTTOMRIGHT = Graphics.BOTTOM | Graphics.RIGHT;
    public static final int BOTTOMCENTER = Graphics.BOTTOM | Graphics.HCENTER;

    public static final int TRANS_NONE = 0;
    public static final int TRANS_ROT90 = 5;
    public static final int TRANS_ROT180 = 3;
    public static final int TRANS_ROT270 = 6;
    public static final int TRANS_MIRROR = 2;
    public static final int TRANS_MIRROR_ROT90 = 7;
    public static final int TRANS_MIRROR_ROT180 = 1;
    public static final int TRANS_MIRROR_ROT270 = 4;

    public static final int FRAME_LIMIT = 80;
    public static final int RES_INDEX_LEN = 4;

    // game state
    public static final int GS_GAMELOFT = 0;
    public static final int GS_LEGAL = 1;
    public static final int GS_LOADING = 2;
    public static final int GS_SELECTSPY = 3;
    public static final int GS_MAINMENU = 5;
    public static final int GS_ABOUT = 6;
    public static final int GS_HELP = 7;
    // public static final int GS_OPTIONS = 8;
    public static final int GS_EXIT = 9;
    public static final int GS_LOADINGLEVEL = 10;
    public static final int GS_RUN = 11;
    public static final int GS_PAUSE = 12;
    public static final int GS_GAMEOVER = 13;
    public static final int GS_LEVELOVER = 14;
    public static final int GS_CONTROLS = 15;
    public static final int GS_WOOHP = 16;
    public static final int GS_LEVELS = 17;
    public static final int GS_DEBRIEF = 18;
    public static final int GS_DIALOG = 19;
    public static final int GS_TRAILER = 20;
    public static final int GS_END = 22;
   
    public static final int GS_SOUND_CONFIRM = 24;
    public static final int GS_NEWGAME_CONFIRM = 25;
    public static final int GS_AD = 26;  //advertisement
    public static final int GS_RESTART = 27;
    public static final int GS_BACK_TO_MAINMENU = 28;
    public static final int GS_DIALOGBOX = 29;
    public static final int GS_MINIGAME = 30;
    public static final int GS_EFFECT = 31;
//@#if hasMiniGame
//@    public final static int GS_REPORT = 32;
//@    public final static int GS_INPUTNAME = 33;
//@    public final static int GS_WAITING = 34;
//@    public final static int GS_OVERTIME = 35;
//@    public final static int GS_RANKING = 36;
//@#endif

    public static final int ABOUT_PPS = 3; //about text scrolling pixels per second

    public static final int[] BACKGROUND_X_FACTOR = {1,1,1,1,1,1,1,1,1,1};
    public static final int[] BACKGROUND_Y_FACTOR = {1,1,1,1,1,1,1,1,1,1};

    // Game Control
    public final static int NUM_MENU = 6;
//@#if hasMiniGame
//@    public final static int NUM_LEVEL = 9;
//@#else
    public final static int NUM_LEVEL = 6; // 8;
//@#endif
    // public final static int NUM_OPTION = 3;
    public final static int NUM_PAUSE_MENU = 6;

    // Actor parameters
//@#if NokiaAll
//@ final static int MAX_ACTOR_COUNT = 32;
//@#else
    final static int MAX_ACTOR_COUNT = 48;
//@#endif
    static final int MAX_PARAM = 10;
    static final int MAX_STATIC_ACTOR_COUNT = 250;
    static final int MAX_ACTOR_ROOM = 280;
    static final int MUMMY_FIRE_ACTION = 4;

    static final byte SPY_HP = 4;
    static final byte GUARD_HP = 6;
//@#if hasSpider
    static final byte SPIDER_HP = 24;
//@#endif

    static final short BONUS_ONDIE_Y = (30 << 8);

    // Game Option Mode
    public final static int MODE_EASY = 0;
    public final static int MODE_HARD = 1;
    public final static int MODE_SPECIAL = 2;

    // color
    public static final int COLOR_WHITE  = 0x00FFFFFF;
    public static final int COLOR_BLACK  = 0x00000000;
    public static final int COLOR_GRAY = 0x00808080;
    public static final int COLOR_RED    = 0x00FF0000;
    public static final int COLOR_DARKRED  = 0x00a80000;
    public static final int COLOR_ORANGE = 0x00FF658D;
    public static final int COLOR_YELLOW = 0x00FFFF00;
    public static final int COLOR_GREEN  = 0x0000FF00;
    public static final int COLOR_CYAN   = 0x0000FFFF;
    public static final int COLOR_BLUE   = 0x000000FF;
    public static final int COLOR_PURPLE = 0x00FF00FF;
    public static final int DEFAULT_WATER_COLOR = 0x7E;  //color for water in water animation
    public static final int CUSTOM_FONT_COLOR = 0x84F68C;  //color of customized font

    // physical param: using 4 bits, therefore between 0 and 15
    public static final int PHY_BORDER = -2;
    public static final int PHY_NONE = -1;
    public static final int PHY_DEATH = 0;
    public static final int PHY_WALL = 1;
    public static final int PHY_JETPACK_STOP = 2;
    public static final int PHY_UP15_A = 8;
    public static final int PHY_UP15_B = 9;
    public static final int PHY_UP15_C = 10;
    public static final int PHY_DOWN15_A = 11;
    public static final int PHY_DOWN15_B = 12;
    public static final int PHY_DOWN15_C = 13;
    public static final int PHY_FREE_STOP = 14;

    public static final int CHECK_LEFT = -11;
    public static final int CHECK_CENTER = 0;
    public static final int CHECK_RIGHT = 1;
    public static final int CHECK_TOP = -2;
    public static final int CHECK_BOTTOM = 2;

    // text alignment
    public final static int ALIGN_LINE = 0;
    public final static int ALIGN_LEFT = 1;
    public final static int ALIGN_CENTER = 2;
    public final static int ALIGN_RIGHT = 3;

    // progress bar
    public final static int PROGRESS_BAR_WIDTH = 136;
    public final static int PROGRESS_BAR_HEIGHT = 3;
    public final static int PROGRESS_BAR_BOTTOM_MARGIN = 30;

    final static int LEGAL_DISPLAY_FRAMES = 5;

    public static final short SCREEN_WIDTH = 240;

//@#if NokiaAll
//@ public static final short SCREEN_HEIGHT = 208;
//@ public static final short VIRTUALBAR_H = 0;
//@ public static final short CAMERA_HEIGHT = 180;
//@#else
//@#if isSanyo7400
//@    public static final short SCREEN_HEIGHT = 220;
//@#else
//@#if isSamsungA700
//@    public static final short SCREEN_HEIGHT = 220;
//@#else
    public static final short SCREEN_HEIGHT = 320; // SES700
//@#endif
//@#endif
    public static final short VIRTUALBAR_H = SCREEN_HEIGHT-320;
    public static final short CAMERA_HEIGHT = 280;
//@#endif

    // play field
    public static final short CAMERA_WIDTH = 240;
    public static final short CAMERA_LEFT = 0;
    public static final short CAMERA_TOP = 0;

    public static final short INTERFACE_HEIGHT = SCREEN_HEIGHT - CAMERA_HEIGHT-VIRTUALBAR_H;
    public static final short ITEM_GADGET_X = -208;
    public static final short ITEM_GADGET_Y = -32;

    public static final short FACE_X = 0 - 11;
    public static final short FACE_Y = 0-INTERFACE_HEIGHT;
    public static final short SHOW_X = 0-(CAMERA_WIDTH>>1);
    public static final short SHOW_Y = 0-INTERFACE_HEIGHT +3;
    public static final short BONUS_X = 0-150;
    public static final short BONUS_Y = 0-14;
    public static final short BONUS_NUM_X1 = 0-128;
    public static final short BONUS_NUM_Y1 = 0-11;
    public static final short BONUS_NUM_X0 = 0-135;
    public static final short BONUS_NUM_Y0 = 0-11;
    public static final short BONUS_NUM_X2 = 0-121;
    public static final short BONUS_NUM_Y2 = 0-11;

    public static final short HEART_X = 0-69;
    public static final short HEART_Y = 0-15;
    public static final short HEART_W = 18;

    // PHYSICAL TILE WIDTH*HEIGHT
    public static final byte MAP_LAYER = 3;
    public static final byte PHY_LAYER = 2;
    public static final byte TILE_WIDTH = 24;
    public static final byte TILE_HEIGHT = 24;


    // display
    final static int MENU_Y_OFFSET = 120;
    final static int MENU_X = 123;
    final static int MENU_Y=280;
    final static int MENU_X_OFFSET = 22;
    final static int MENU_WIDTH_OFFSET = 40;
    final static int MAINMENU_Y_OFFSET = 36;
    final static int MAINMENU_WIDTH = 80;
    final static int CONTROL_X = 25;
    final static int CONTROL_Y = 10;
    final static int CONTROL_KEY_Y = 30;
    final static int CONTROL_SOFT_Y = 110;
    final static int Y_GAMEOVER = 150;

    //display main menu
    public static final int MAIN_MENU_Y = SCREEN_HEIGHT - 36 - VIRTUALBAR_H;
    public static final int MAIN_MENU_ARROW_X1 = 50;
    public static final int MAIN_MENU_ARROW_X2 = 190;

    final static int LEGAL_POSX = 20;
    final static int LEGAL_POSY = 100;
    final static int LEGAL_WIDTH = CAMERA_WIDTH - 2 * LEGAL_POSX;

    // move from Game.jpp
    final static byte FONT_H = 21;

    // palette of the current fonts
    final static short FONT_DIALOG = 3;
    final static short FONT_COMMON = 0;
    final static short FONT_SELECT = 1;
    final static short FONT_OPTIONS = 0;
    final static short FONT_BOUNS1 = 2;
    final static short FONT_BOUNS = 3;
    final static short FONT_DIALOGS = 4;
    final static short FONT_DIALOGS1 = 2;
    final static short FONT_DIALOG1 = 3;

    // for draw score
    final static int SCORE_TOP = 25;
    final static int SCORE_COL1 = 30;
    final static int SCORE_COL2 = 100;
    final static int SCORE_CW = 40;
    final static int SCORE_LH = 12;
    final static int SCORE_FOOT = 132+FONT_H;
    final static int SCORE_BOTTOM = Const.SCREEN_HEIGHT - SCORE_LH;

    final static int COLOR_GREEN_DARK = 0xFF182018;
    final static int COLOR_GREEN_LIGHT = 0xFF294939;

    // for drawBg()

    final static int COLOR_MENU = 0xFFB4C5B5;
    final static int COLOR_MENU_X = 0;
    final static int COLOR_MENU_Y = 30;
    final static int COLOR_MENU_W = 78;
    final static int COLOR_MENU_H = 90;

    final static int COLOR_LIGHT_RANGE = 8;
    final static int COLOR_LIGHT_UNIT = 0x00081008;
    final static int COLOR_LIGHT = 0xFFB0E050 - COLOR_LIGHT_UNIT;
    final static int COLOR_LIGHT_X = 145;
    final static int COLOR_LIGHT_Y = 6;
    final static int COLOR_LIGHT_W = 10;
    final static int COLOR_LIGHT_H = 13;
    final static int COLOR_LIGHT1_UNIT = 0x00080808;
    final static int COLOR_LIGHT1 = 0xFF406840 - COLOR_LIGHT1_UNIT;
    final static int COLOR_LIGHT1_X = 141;
    final static int COLOR_LIGHT1_Y = 0;
    final static int COLOR_LIGHT1_W = 26;
    final static int COLOR_LIGHT1_H = 26;

    final static int COLOR_TITLE_SPEED = 4;
    final static int COLOR_TITLE_HIGHLIGHT_W = 4;
    final static int COLOR_TITLE_HIGHLIGHT = 0xFF80FF40;
    final static int COLOR_TITLE_UNIT = 0x00081004;
    final static int COLOR_TITLE = 0xFFC2C2C2;
    final static int COLOR_TITLE1 = 0xFF404040;
    final static int COLOR_TITLE_X = 31;
    final static int COLOR_TITLE_Y = 155;
    final static int COLOR_TITLE1_W = 99;
    final static int COLOR_TITLE1_H = 12;
    final static int COLOR_TITLE_W = 144; //99
    final static int COLOR_TITLE_H = 25;

    // for draw about
    static final int ABOUT_TOP_1 = 100;
    static final int ABOUT_TOP_2 = 80;
    static final int ABOUT_LINE_COUNT = 20;
    static final int ABOUT_IMAGE_TOP = 16;
    static final int ABOUT_TICK = 36;

    // for draw controls
    static final int CONTROLS_TOP_1 = 100;
    static final int CONTROLS_TOP_2 = 180;
    static final int CONTROLS_KEY_LINE_COUNT = 9;
    static final int CONTROLS_KEYSOFT_LINE_COUNT = 2;

    // for select spy
    static final int SPY_STARTX = -(Const.SCREEN_WIDTH - 3 * Const.SPY_ICON_WIDTH) / 2;
    static final int SPY_ENDY = -SCREEN_HEIGHT / 2;
  static final int SPY_WIDTH=SPY_STARTX+8;
    // for gadget
    public static final int STEP_ON_HEIGHT = 30;

    // for draw dialog
    final static int DIALOG_TEXT_LINE = 6;
    final static int DIALOG_SPACE = 4;
    final static int DIALOG_HALF_Y = (Const.SCREEN_HEIGHT - FONT_H * 2) /2;
    final static int HOR_LINE_X1 = 2;
    final static int HOR_LINE_X2 = Const.SCREEN_WIDTH - HOR_LINE_X1;
    final static int HOR_LINE1_Y = 18;
    final static int HOR_LINE2_Y = DIALOG_TEXT_LINE * FONT_H + DIALOG_SPACE * 3 + HOR_LINE1_Y;
    final static int HOR_LINE3_Y = HOR_LINE1_Y + DIALOG_HALF_Y;
    final static int HOR_LINE4_Y = HOR_LINE2_Y + DIALOG_HALF_Y;

    final static int VER_LINE1_X = DIALOG_SPACE * 2;
    final static int VER_LINE2_X = Const.SCREEN_WIDTH - VER_LINE1_X;
    final static int VER_LINE1_Y1 = HOR_LINE1_Y - DIALOG_SPACE;
    final static int VER_LINE1_Y2 = HOR_LINE2_Y + DIALOG_SPACE;
    final static int VER_LINE2_Y1 = HOR_LINE3_Y - DIALOG_SPACE;
    final static int VER_LINE2_Y2 = HOR_LINE4_Y + DIALOG_SPACE;

    final static int DIALOG_BOX_WIDTH = 110;
    final static int DIALOG_BOX_HEIGHT = HOR_LINE2_Y - HOR_LINE1_Y - DIALOG_SPACE * 2-53;
    final static int DIALOG_BOX_FRAME = 6;
    final static int DIALOG_BOX1_X = VER_LINE1_X + DIALOG_SPACE;
    final static int DIALOG_BOX1_Y = HOR_LINE1_Y + DIALOG_SPACE;
    final static int DIALOG_BOX2_X = VER_LINE2_X - DIALOG_SPACE - DIALOG_BOX_WIDTH;
    final static int DIALOG_BOX2_Y = HOR_LINE3_Y + DIALOG_SPACE;

    final static int IMAGE_BOX_WIDTH = 22;
    final static int IMAGE_BOX_HEIGHT = 28;
    final static int IMAGE_BOX1_X = DIALOG_BOX1_X + DIALOG_BOX_WIDTH + DIALOG_SPACE*2;
    final static int IMAGE_BOX1_Y = DIALOG_BOX1_Y;//HOR_LINE1_Y - DIALOG_SPACE;
    final static int IMAGE_BOX2_X = VER_LINE2_X - DIALOG_BOX_WIDTH - IMAGE_BOX_WIDTH - DIALOG_SPACE * 3;
    final static int IMAGE_BOX2_Y = DIALOG_BOX2_Y;//HOR_LINE3_Y - DIALOG_SPACE;

    final static int DIALOG_TEXT_AX = DIALOG_BOX1_X + 2;
    final static int DIALOG_TEXT_AY = DIALOG_BOX1_Y + 4;
    final static int DIALOG_TEXT_BX = DIALOG_BOX2_X + 2;
    final static int DIALOG_TEXT_BY = DIALOG_BOX2_Y + 4;
    final static int DIALOG_TEXT_WIDTH = DIALOG_BOX_WIDTH - 2;
    final static int DIALOG_STR_H=265; ;
    final static int DIALOG_INTER_H=-55;

    //For AI
    final static int FACE2BACK_DISTANCE = 50;

    final static int QUICKSAND_X_SPEED = 4 << 8;

    final static int BARREL_INTERVAL = 80;
    final static int BARREL_INITIAL_VX = 16;
    final static int BARREL_INITIAL_AY = 6;    // Perfect move when this value is 2,6,10,14.If value > 14 will appear some bugs.
    final static int BARREL_NORMAL_VX = 4;

    // final static int BRIDGE_WIDTH_TILE = 7;
    final static int SPY_INVINCIBLE_INTERVAL = 10;

    final static int MAX_Y_SPEED = (32 << 8);
    final static int DRIFTING_SPEED = (2 << 8);
    final static int MAX_Y_INVERT_DISTANCE = 10 * TILE_HEIGHT << 8;
    final static int SPY_JETPACK_AX = 1 << 8;
    final static int SPY_JETPACK_AY = 1 << 8;
    final static int SPY_JETPACK_MAX_VX = 9 << 8;
    final static int SPY_JETPACK_MAX_VY = 6 << 8;
    final static int SPY_SHAKE_X = 9 << 8;
    final static int SPY_JECTPACK_ADJUST_Y = 42 << 8;

//@#if hasMiniGame
//@    final static int MINI_GAME_UNIT = 18;  // pixels per meter
//@#endif

    final static int BONUS_INTERVAL = 20;

    final static int ICE_PLATFORM_INTERVAL = 30;
    final static int ICE_NORMAL_INTERVAL = 18;
    final static int ICE_NORMAL_OFFSET_Y = 5<<8;
    final static int ICE_NORMAL_OFFSET_NY = 10<<8;


    public final static int ACTOR_FRONTLAYER_POSZ = 70;
    public final static int SPY_NORMAL_POSZ = 60;
    public final static int ENEMY_NORMAL_POSZ = 40;
    public final static int ACTOR_MIDLAYER_POSZ = 30;
    public final static int ACTOR_BACKLAYER_POSZ = 20;
    public final static int ACTOR_MAPLAYER_POSZ = 10;

    public final static int SPY_JETPACK_SAFE_FRAME_COUNT = 15;
    public final static int HELP_OFFSET_Y = (80<<8);

    public final static int SWING_LENGTH = (90 << 8);
    public final static int SWING_HALF_X = (80 << 8);
    public final static int SWING_ORIGIN_Y = (50 << 8);
    public final static int SWING_CHANGEACTION = 30;
    public final static int SAM_LEG_LENGTH = (25 << 8);

    public final static int TEETER_STEP = 10;
    public final static int DANGER_IN_RANGE = (50 << 8);


    //    /| ------
    //      / |
    //     /  | oy
    //    /_hx| _    length
    //    \   |
    //     \  |
    //      \ |    ___

    public static final byte MAX_HALO_NUMBER = 3;

    public static final byte SPACE_LEVEL = 6;

    //Camera Const
    static final int CAMERA_SPEED = 30;

    static final int CAMERA_SCROLL_SPEED1 = 8;
    static final int JETPACK_LEVEL_1 = 3;
    static final int JETPACK_LEVEL_1_DX = CAMERA_WIDTH / 3;
    static final int CAMERA_SCROLL_MAX_SPEED1 = 16;

    static final int CAMERA_SCROLL_SPEED2 = 10;
    static final int JETPACK_LEVEL_2 = 6;
    static final int JETPACK_LEVEL_2_DX = CAMERA_WIDTH * 2 / 4 - 8;
    static final int CAMERA_SCROLL_MAX_SPEED2 = 30;

    static final int SLOPE_DIE_DISTANCE = 200;
    static final int ITEM_DIE_DISTANCE = 120;
    static final int OTHER_DIE_DISTANCE = 500;

    static final int SPY_ICON_WIDTH = 56;
    static final int SPY_ICON_HEIGHT = 45;

//@#if isHugeVersion
    final static int INTERFACE_FONT_X = 170;
    final static int INTERFACE_FONT_Y = 18;
//@#else
//@    final static int INTERFACE_FONT_X = 123;
//@    final static int INTERFACE_FONT_Y = 12;
//@#endif
    final static int FONT_W =8;
    final static int BOUNS_POSITION = 255;
    final static int FONT_CHAR_X=33;


    final static int SPY_FLOAT_AX = 2 << 7;
    final static int SPY_FLOAT_AY = 2 << 7;
    final static int SPY_FLOAT_MAX_VX = 6 << 8;
    final static int SPY_FLOAT_MAX_VY = 6 << 8;


//@#if hasMiniGame
//@    static final int CAMERA_SCROLL_SPEED3 = 10;
//@    static final int JETPACK_LEVEL_3 = 8;
//@    static final int JETPACK_LEVEL_3_DX = CAMERA_WIDTH * 2 / 4 - 8;
//@    static final int CAMERA_SCROLL_MAX_SPEED3 = 30;
//@    static final int CAMERA_LEVEL_3_AX_INTERVAL = 100;
//@#endif

    final static int SPY_CLIMB_ADJUST_X = 12 << 8;
    public final static int CAMERA_ADJUSTION = 0;
    static final int CAMERA_TEETER = 30;

    static final int DIALOG_X = 70;
//@#if isHugeVersion
    static final int DIALOG_Y = 12;
    static final int DIALOG_MAXWIDTH = 145;
//@#else
//@    static final int DIALOG_Y = 10;
//@    static final int DIALOG_MAXWIDTH = 120;
//@#endif

    final static int MENU_SOUND_X_OFFSET = MENU_X_OFFSET-20;
    final static int MENU_SOUND_OPTION_X_OFFSET = 60;
    final static int PAUSE_SOUND_X_OFFSET = 0-10;
    final static int PAUSE_SOUND_OPTION_X_OFFSET = 15;

    final static int SPY_SHAKE_ADJUST_LEFT = 12;
    final static int SPY_SHAKE_ADJUST_RIGHT = -6;

    final static byte MOVIE_HEIGHT = Const.SCREEN_HEIGHT / 6;
    final static byte MOVIE_ADD = MOVIE_HEIGHT / 4;

    static final int COMPLETE_LY = 110;
    static final int COMPLETE_SY = 112;
    static final int MISSION_OFFSETY = 2;
    static final int COMPLETE_OFFSETY = 24;

    final static int WOOHP_FRAME = 8;
    final static int WOOHP_STARTX = 88;
    final static int WOOHP_STARTY = 58;

    // final static int[] WOOHP_DESTX = {70, 117, 160};
    final static int WOOHP_DESTY = (CAMERA_HEIGHT + 137) / 2 + 10; // Woohp Height = 137

    final static int DEBRIEF_TOP_HEIGHT = (CAMERA_HEIGHT - 137) / 2;
    final static int DEBRIEF_BOTTOM_Y = (CAMERA_HEIGHT + 137) / 2 - 1;
    final static int DEBRIEF_BOTTOM_HEIGHT = (CAMERA_HEIGHT - 137) / 2 - 16 + 2; // DialogBox Height - Interface Height= 16;
   
    final static int WOOHP_TOP_HEIGHT = DEBRIEF_TOP_HEIGHT;
    final static int WOOHP_BOTTOM_Y = DEBRIEF_BOTTOM_Y;
    final static int WOOHP_BOTTOM_HEIGHT = DEBRIEF_BOTTOM_HEIGHT;

    static final int SPY_NAME_X = SCREEN_WIDTH/2-3;
    static final int SPY_NAME_Y = 170;

    static final int SPY_BOUNCE_ADJUST_Y = 0; // 22 << 8;

    static final int SPY_SELECT_X = SCREEN_WIDTH/2-3;
    static final int SPY_SELECT_Y = 80;
   
    static final int CLOVER_OFFSETX = 55;
    static final int SAM_OFFSETX = 0;
    static final int ALEX_OFFSETX = -55;
   
    //generated by convert.exe
//@#if NokiaAll
//@ #include "..\..\program\Nokia6600\o.txt"
//@#else
//@@ ..\..\program\SES700\o.txt
  public final static int ID_STR_ABOUT = 0;
  public final static int ID_LEGAL = 1;
  public final static int ID_STR_CONTROLS = 2;
  public final static int ID_STR_CONTROLS_KEY = 3;
  public final static int ID_STR_LEVEL = 4;
  public final static int ID_STR_ON = 5;
  public final static int ID_STR_OFF = 6;
  public final static int ID_EXIT_LEFT = 7;
  public final static int ID_EXIT_RIGHT = 8;
  public final static int ID_LEVEL_LEFT = 9;
  public final static int ID_LEVEL_RIGHT = 10;
  public final static int ID_OPTION_LEFT = 11;
  public final static int ID_OPTION_RIGHT = 12;
  public final static int ID_DIALOG_LEFT = 13;
  public final static int ID_DIALOG_RIGHT = 14;
  public final static int ID_GAMEOVER_LEFT = 15;
  public final static int ID_GAMEOVER_RIGHT = 16;
  public final static int ID_PAUSE_MENU0 = 17;
  public final static int ID_PAUSE_MENU1 = 18;
  public final static int ID_PAUSE_MENU2 = 19;
  public final static int ID_PAUSE_MENU3 = 20;
  public final static int ID_PAUSE_MENU4 = 21;
  public final static int ID_PAUSE_MENU5 = 22;
  public final static int ID_STR_MENU = 23;
  public final static int ID_STR_BONUS = 24;
  public final static int ID_SOUND_CONFIRM = 25;
  public final static int ID_RESET_GAME = 26;
  public final static int ID_CONFIRM_EXIT = 27;
  public final static int ID_RESTART_GAME = 28;
  public final static int ID_BACK_MENU = 29;
  public final static int ID_NAME_CLOVER = 30;
  public final static int ID_NAME_SAM = 31;
  public final static int ID_NAME_ALEX = 32;
  public final static int ID_NAME_SELECT = 33;
  public final static int ID_DIALOG00 = 34;
  public final static int ID_DIALOG00A = 35;
  public final static int ID_DIALOG00B = 36;
  public final static int ID_DIALOG00C = 37;
  public final static int ID_DIALOG01 = 38;
  public final static int ID_DIALOG02 = 39;
  public final static int ID_DIALOG03 = 40;
  public final static int ID_DIALOG04 = 41;
  public final static int ID_DIALOG05 = 42;
  public final static int ID_DIALOG06 = 43;
  public final static int ID_DIALOG07 = 44;
  public final static int ID_DIALOG08 = 45;
  public final static int ID_DIALOG09 = 46;
  public final static int ID_DIALOG10 = 47;
  public final static int ID_DIALOG11 = 48;
  public final static int ID_DIALOG12 = 49;
  public final static int ID_DIALOG13 = 50;
  public final static int ID_DIALOG14 = 51;
  public final static int ID_DIALOG15 = 52;
  public final static int ID_DIALOG16 = 53;
  public final static int ID_DIALOG17 = 54;
  public final static int ID_DIALOG17A = 55;
  public final static int ID_DIALOG18 = 56;
  public final static int ID_DIALOG19 = 57;
  public final static int ID_DIALOG20 = 58;
  public final static int ID_DIALOG21 = 59;
  public final static int ID_DIALOG22 = 60;
  public final static int ID_DIALOG23 = 61;
  public final static int ID_DIALOG24 = 62;
  public final static int ID_DIALOG25 = 63;
  public final static int ID_DIALOG26 = 64;
  public final static int ID_DIALOG27 = 65;
  public final static int ID_DIALOG28 = 66;
  public final static int ID_DIALOG29 = 67;
  public final static int ID_DIALOG30 = 68;
  public final static int ID_DIALOG31 = 69;
  public final static int ID_DIALOG32 = 70;
  public final static int ID_DIALOG33 = 71;
  public final static int ID_DIALOG35 = 72;
  public final static int ID_DIALOG36 = 73;
  public final static int ID_DIALOG37 = 74;
  public final static int ID_DIALOG38 = 75;
  public final static int ID_DIALOG39 = 76;
  public final static int ID_DIALOG40 = 77;
  public final static int ID_DIALOG41 = 78;
  public final static int ID_DIALOG42 = 79;
  public final static int ID_DIALOG43 = 80;
  public final static int ID_DIALOG44 = 81;
  public final static int ID_DIALOG45 = 82;
  public final static int ID_MISSION1_NAME = 83;
  public final static int ID_MISSION2_NAME = 84;
  public final static int ID_MISSION3_NAME = 85;
  public final static int ID_MISSION4_NAME = 86;
  public final static int ID_MISSION5_NAME = 87;
  public final static int ID_MISSION6_NAME = 88;
  public final static int ID_MISSION7_NAME = 89;
  public final static int ID_MISSION8_NAME = 90;
  public final static int ID_MISSION9_NAME = 91;
  public final static int ID_LEVEL_OVER1 = 92;
  public final static int ID_LEVEL_OVER2 = 93;
  public final static int ID_MISSION_FAILED = 94;
  public final static int ID_STR_MENU0 = 95;
  public final static int ID_STR_MENU1 = 96;
  public final static int ID_STR_MENU2 = 97;
  public final static int ID_STR_MENU3 = 98;
  public final static int ID_STR_MENU4 = 99;
  public final static int ID_STR_MENU5 = 100;
  public final static int ID_STR_MENU_ON = 101;
  public final static int ID_STR_MENU_OFF = 102;
  public final static int ID_SHADOW_PNG = 103;
  public final static int ID_WOOHP_PNG = 104;
  public final static int ID_OTHER_GIF = 105;
  public final static int ID_HELP_PNG = 106;
  public final static int ID_SHELF_PNG = 107;
  public final static int ID_BACKACTOR_PNG = 108;
  public final static int ID_INTERFACE_PNG = 109;
  public final static int ID_SAND_PNG = 110;
  public final static int ID_SPACE_PNG = 111;
  public final static int ID_MISC_PNG = 112;
  public final static int ID_ITEM_PNG = 113;
  public final static int ID_DOOR_PNG = 114;
  public final static int ID_SNOW_PNG = 115;
  public final static int ID_COVER_PNG = 116;
  public final static int ID_TREE_PNG = 117;
  public final static int ID_RING_PNG = 118;
  public final static int ID_BIG_FONT_PNG = 119;
  public final static int ID_FONT_PNG = 120;
  public final static int ID_MUMMY_PNG = 121;
  public final static int ID_SPIDER_PNG = 122;
  public final static int ID_NINJA_PNG = 123;
  public final static int ID_COMBO_PNG = 124;
  public final static int ID_WEAPON_PNG = 125;
  public final static int ID_HAIR_PNG = 126;
  public final static int ID_SPY_PNG = 127;
  public final static int ID_TILEKIT2_F_PNG = 128;
  public final static int ID_TILEKIT2_B_PNG = 129;
  public final static int ID_TILEKIT1_F_PNG = 130;
  public final static int ID_TILEKIT1_B_PNG = 131;

  public final static int ID_SOUND_LASER = 0;
  public final static int ID_SOUND_SUPER = 1;
  public final static int ID_SOUND_PUNCH = 2;
  public final static int ID_SOUND_BONUS = 3;
  public final static int ID_SOUND_BOUNCE = 4;
  public final static int ID_SOUND_THEME = 5;
  public final static int ID_SOUND_MENU_CONFIRM = 6;
  public final static int ID_SOUND_MISSION_START_EGYPT = 7;
  public final static int ID_SOUND_MISSION_START_MOUNT = 8;
  public final static int ID_SOUND_MISSION_START_SPACE = 9;
  public final static int ID_SOUND_MISSION_OVER = 10;

  public final static int ID_SPY = 0;
  public final static int SPY_STAND = 0;
  public final static int SPY_RUN = 1;
  public final static int SPY_JETPACK_DOWN_TRAILER = 2;
  public final static int SPY_JETPACK_LAND = 3;
  public final static int SPY_DUCK_BACK = 4;
  public final static int SPY_JETPACK_FLY_TRAILER = 5;
  public final static int SPY_JUMP_PREPARE = 6;
  public final static int SPY_JUMP_UP = 7;
  public final static int SPY_JUMP_DOWN = 8;
  public final static int SPY_BOUNCE = 9;
  public final static int SPY_JUMP_DOWN2 = 10;
  public final static int SPY_JUMP_DOWN3 = 11;
  public final static int SPY_HOLD = 12;
  public final static int SPY_CLIMB = 13;
  public final static int SPY_CLIMB_WALL = 14;
  public final static int SPY_CLIMB_OVER = 15;
  public final static int SPY_FALL = 16;
  public final static int SPY_HURT = 17;
  public final static int SPY_HURT1 = 18;
  public final static int SPY_HURT2 = 19;
  public final static int SPY_LOSE = 20;
  public final static int SPY_LOSE_FALL = 21;
  public final static int SPY_STRIKE1 = 22;
  public final static int SPY_STRIKE2 = 23;
  public final static int SPY_STRIKE3_1 = 24;
  public final static int SPY_STRIKE3_2 = 25;
  public final static int SPY_STRIKE3_3 = 26;
  public final static int SPY_STRIKE3_4 = 27;
  public final static int SPY_STRIKE3_5 = 28;
  public final static int SPY_PULLED = 29;
  public final static int SPY_SWING1 = 30;
  public final static int SPY_SWING2 = 31;
  public final static int SPY_SWING3 = 32;
  public final static int SPY_JETPACK_TAKEOFF = 33;
  public final static int SPY_JETPACK_FALL = 34;
  public final static int SPY_JETPACK_FLOAT = 35;
  public final static int SPY_JETPACK_UP = 36;
  public final static int SPY_JETPACK_DOWN = 37;
  public final static int SPY_JETPACK_HURT = 38;
  public final static int SPY_JETPACK_NOFIRE = 39;
  public final static int SPY_SHOOT = 40;
  public final static int SPY_STRIKE4 = 41;
  public final static int SPY_STRIKE5_1 = 42;
  public final static int SPY_STRIKE5_2 = 43;
  public final static int SPY_STRIKE6 = 44;
  public final static int SPY_STRIKE7 = 45;
  public final static int SPY_STRIKE8_1 = 46;
  public final static int SPY_STRIKE8_2 = 47;
  public final static int SPY_STRIKE9 = 48;
  public final static int SPY_GETOUT = 49;
  public final static int SPY_ENTER_BOX = 50;
  public final static int SPY_JUMP_OVER1 = 51;
  public final static int SPY_JUMP_OVER2 = 52;
  public final static int SPY_BOUNCE_UP1 = 53;
  public final static int SPY_BOUNCE_UP2 = 54;
  public final static int SPY_BOUNCE_UP3 = 55;
  public final static int SPY_BOUNCE_DOWN1 = 56;
  public final static int SPY_BOUNCE_DOWN2 = 57;
  public final static int SPY_BOUNCE_LAND = 58;
  public final static int SPY_PUSH = 59;
  public final static int SPY_TEETER1 = 60;
  public final static int SPY_TEETER2 = 61;
  public final static int SPY_TEETER3 = 62;
  public final static int SPY_TEETER4 = 63;
  public final static int SPY_INVISIBLE = 64;
  public final static int SPY_ONBALL = 65;
  public final static int SPY_SHAKE_IN = 66;
  public final static int SPY_SHAKE = 67;
  public final static int SPY_SHAKE_OUT = 68;
  public final static int SPY_BACK = 69;
  public final static int SPY_CRASH = 70;

  public final static int ID_HAIR = 1;
  public final static int HAIR_STAND = 0;
  public final static int HAIR_RUN = 1;
  public final static int HAIR_JETPACK_DOWN_TRAILER = 2;
  public final static int HAIR_JETPACK_LAND = 3;
  public final static int HAIR_DUCK_BACK = 4;
  public final static int HAIR_JETPACK_FLY_TRAILER = 5;
  public final static int HAIR_JUMP_PREPARE = 6;
  public final static int HAIR_JUMP_UP = 7;
  public final static int HAIR_JUMP_DOWN = 8;
  public final static int HAIR_BOUNCE = 9;
  public final static int HAIR_JUMP_DOWN2 = 10;
  public final static int HAIR_JUMP_DOWN3 = 11;
  public final static int HAIR_HOLD = 12;
  public final static int HAIR_CLIMB = 13;
  public final static int HAIR_CLIMB_WALL = 14;
  public final static int HAIR_CLIMB_OVER = 15;
  public final static int HAIR_FALL = 16;
  public final static int HAIR_HURT = 17;
  public final static int HAIR_HURT1 = 18;
  public final static int HAIR_HURT2 = 19;
  public final static int HAIR_LOSE = 20;
  public final static int HAIR_LOSE_FALL = 21;
  public final static int HAIR_STRIKE1 = 22;
  public final static int HAIR_STRIKE2 = 23;
  public final static int HAIR_STRIKE3_1 = 24;
  public final static int HAIR_STRIKE3_2 = 25;
  public final static int HAIR_STRIKE3_3 = 26;
  public final static int HAIR_STRIKE3_4 = 27;
  public final static int HAIR_STRIKE3_5 = 28;
  public final static int HAIR_PULLED = 29;
  public final static int HAIR_SWING1 = 30;
  public final static int HAIR_SWING2 = 31;
  public final static int HAIR_SWING3 = 32;
  public final static int HAIR_JETPACK_TAKEOFF = 33;
  public final static int HAIR_JETPACK_FALL = 34;
  public final static int HAIR_JETPACK_FLOAT = 35;
  public final static int HAIR_JETPACK_UP = 36;
  public final static int HAIR_JETPACK_DOWN = 37;
  public final static int HAIR_JETPACK_HURT = 38;
  public final static int HAIR_JETPACK_NOFIRE = 39;
  public final static int HAIR_SHOOT = 40;
  public final static int HAIR_STRIKE4 = 41;
  public final static int HAIR_STRIKE5_1 = 42;
  public final static int HAIR_STRIKE5_2 = 43;
  public final static int HAIR_STRIKE6 = 44;
  public final static int HAIR_STRIKE7 = 45;
  public final static int HAIR_STRIKE8_1 = 46;
  public final static int HAIR_STRIKE8_2 = 47;
  public final static int HAIR_STRIKE9 = 48;
  public final static int HAIR_GETOUT = 49;
  public final static int HAIR_ENTER_BOX = 50;
  public final static int HAIR_JUMP_OVER1 = 51;
  public final static int HAIR_JUMP_OVER2 = 52;
  public final static int HAIR_BOUNCE_UP1 = 53;
  public final static int HAIR_BOUNCE_UP2 = 54;
  public final static int HAIR_BOUNCE_UP3 = 55;
  public final static int HAIR_BOUNCE_DOWN1 = 56;
  public final static int HAIR_BOUNCE_DOWN2 = 57;
  public final static int HAIR_BOUNCE_LAND = 58;
  public final static int HAIR_PUSH = 59;
  public final static int HAIR_TEETER1 = 60;
  public final static int HAIR_TEETER2 = 61;
  public final static int HAIR_TEETER3 = 62;
  public final static int HAIR_TEETER4 = 63;
  public final static int HAIR_INVISIBLE = 64;
  public final static int HAIR_ONBALL = 65;
  public final static int HAIR_SHAKE_IN = 66;
  public final static int HAIR_SHAKE = 67;
  public final static int HAIR_SHAKE_OUT = 68;
  public final static int HAIR_BACK = 69;
  public final static int HAIR_CRASH = 70;

  public final static int ID_WEAPON = 2;
  public final static int WEAPON_FIRE_BORN = 0;
  public final static int WEAPON_FIRE_MOVE = 1;
  public final static int WEAPON_FIRE_DISAPPEAR = 2;
  public final static int WEAPON_FIRE_INVISIBLE = 3;
  public final static int WEAPON_FIRE_MOVE2 = 4;
  public final static int WEAPON_FIRE_DISAPPEAR2 = 5;

  public final static int ID_COMBO = 3;
  public final static int COMBO_STORE_ENERGY = 0;
  public final static int COMBO_FREE_ENERGY = 1;
  public final static int COMBO_FLASH = 2;
  public final static int COMBO_SPEED_LINE = 3;
  public final static int COMBO_INVISIBLE = 4;

  public final static int ID_NINJA = 4;
  public final static int NINJA_STAND = 0;
  public final static int NINJA_WAIT = 1;
  public final static int NINJA_RUN = 2;
  public final static int NINJA_HIDE = 3;
  public final static int NINJA_HIDEMOVE = 4;
  public final static int NINJA_JUMPOUT = 5;
  public final static int NINJA_STRIKE = 6;
  public final static int NINJA_REVOLVE_PREPARE1 = 7;
  public final static int NINJA_REVOLVE_PREPARE2 = 8;
  public final static int NINJA_REVOLVE = 9;
  public final static int NINJA_REVOLVE_LEFT1 = 10;
  public final static int NINJA_REVOLVE_RIGHT1 = 11;
  public final static int NINJA_REVOLVE_LEFT2 = 12;
  public final static int NINJA_REVOLVE_RIGHT2 = 13;
  public final static int NINJA_REVOLVE_END = 14;
  public final static int NINJA_DIZZY = 15;
  public final static int NINJA_HURT1 = 16;
  public final static int NINJA_HURT2 = 17;
  public final static int NINJA_HURT3 = 18;
  public final static int NINJA_BLOWN1 = 19;
  public final static int NINJA_BLOWN2 = 20;
  public final static int NINJA_FALL1 = 21;
  public final static int NINJA_FALL2 = 22;
  public final static int NINJA_FALL3 = 23;
  public final static int NINJA_FALL_BLOWN = 24;
  public final static int NINJA_LIE = 25;
  public final static int NINJA_STAND_UP = 26;
  public final static int NINJA_DIE = 27;
  public final static int NINJA_HURT4 = 28;
  public final static int NINJA_HURT5 = 29;
  public final static int NINJA_LIE2 = 30;
  public final static int NINJA_DIE2 = 31;

  public final static int ID_SPIDER = 5;
  public final static int SPIDER_STAND = 0;
  public final static int SPIDER_STAND_TRAILER = 1;
  public final static int SPIDER_WALK = 2;
  public final static int SPIDER_WALK_TRAILER = 3;
  public final static int SPIDER_HURT = 4;
  public final static int SPIDER_STRIKE = 5;
  public final static int SPIDER_PULL = 6;
  public final static int SPIDER_PULLOUT = 7;
  public final static int SPIDER_DIE = 8;
  public final static int SPIDER_WALK_AIR = 9;
  public final static int SPIDER_STRIKE_AIR = 10;
  public final static int SPIDER_FLY = 11;
  public final static int SPIDER_FLY_UP = 12;
  public final static int SPIDER_FLY_DOWN = 13;
  public final static int SPIDER_INVISIBLE = 14;
  public final static int SPIDER_INVISIBLE_FLY = 15;
  public final static int SPIDER_LASER_PREPARE_AIR = 16;
  public final static int SPIDER_LASER_AIR = 17;
  public final static int SPIDER_FADE = 18;
  public final static int SPIDER_MOVE = 19;
  public final static int SPIDER_BIG_LASER = 20;
  public final static int SPIDER_BIG_LASER_PREPARE = 21;
  public final static int SPIDER_JUMP_PREPARE = 22;
  public final static int SPIDER_JUMP_UP = 23;
  public final static int SPIDER_JUMP_DOWN = 24;
  public final static int SPIDER_GET_UP = 25;
  public final static int SPIDER_CLAW = 26;
  public final static int SPIDER_CLAWWAIT = 27;
  public final static int SPIDER_CLAWTRY = 28;
  public final static int SPIDER_CLAW_FALL = 29;
  public final static int SPIDER_STICK = 30;
  public final static int SPIDER_GETOUT = 31;
  public final static int SPIDER_CLAW_PREPARE = 32;

  public final static int ID_MUMMY = 6;
  public final static int MUMMY_STAND = 0;
  public final static int MUMMY_WALK = 1;
  public final static int MUMMY_WALK_BACK = 2;
  public final static int MUMMY_STRIKE = 3;
  public final static int MUMMY_GETUP_BACK = 4;
  public final static int MUMMY_HURT1 = 5;
  public final static int MUMMY_HURT2 = 6;
  public final static int MUMMY_HURT3 = 7;
  public final static int MUMMY_BLOWN1 = 8;
  public final static int MUMMY_BLOWN2 = 9;
  public final static int MUMMY_FALL1 = 10;
  public final static int MUMMY_FALL2 = 11;
  public final static int MUMMY_FALL3 = 12;
  public final static int MUMMY_FALL_BLOWN = 13;
  public final static int MUMMY_LIE = 14;
  public final static int MUMMY_STAND_UP = 15;
  public final static int MUMMY_DIE = 16;
  public final static int MUMMY_WAIT = 17;
  public final static int MUMMY_HURT4 = 18;
  public final static int MUMMY_LIE2 = 19;
  public final static int MUMMY_DIE2 = 20;
  public final static int MUMMY_TURN = 21;
  public final static int MUMMY_INCOVER = 22;
  public final static int MUMMY_RUSH_PREPARE = 23;
  public final static int MUMMY_RUSH = 24;
  public final static int MUMMY_DIZZY = 25;
  public final static int MUMMY_HURT5 = 26;
  public final static int MUMMY_BLOW = 27;
  public final static int MUMMY_PUSH_PREPARE = 28;
  public final static int MUMMY_PUSH = 29;
  public final static int MUMMY_ONTEETER = 30;
  public final static int MUMMY_BLOW_WAIT = 31;
  public final static int MUMMY_FOUND = 32;
  public final static int MUMMY_OPENDOOR = 33;
  public final static int MUMMY_PUSHBOX = 34;
  public final static int MUMMY_TRAILER_TURN = 35;
  public final static int MUMMY_TRAILER_WALK = 36;

  public final static int ID_FONT_S = 7;

  public final static int ID_FONT_B = 8;

  public final static int ID_RING = 9;
  public final static int RING_FREE = 0;
  public final static int RING_PULLING = 1;
  public final static int RING_PULLED = 2;
  public final static int RING_RELEASE = 3;
  public final static int RING_HANDLE = 4;
  public final static int RING_HANDLE_OPENING = 5;
  public final static int RING_HANDLE_OPEN = 6;
  public final static int RING_NODE = 7;

  public final static int ID_TREE = 10;
  public final static int TREE_SMALL_LEFT = 0;
  public final static int TREE_SMALL_LEFT_BOUNCE = 1;
  public final static int TREE_MIDDLE = 2;
  public final static int TREE_MIDDLE_BOUNCE = 3;
  public final static int TREE_BIG = 4;
  public final static int TREE_BIG_BOUNCE = 5;
  public final static int TREE_BIG_VER = 6;
  public final static int TREE_BIG_VER_BOUNCE = 7;

  public final static int ID_COVER = 11;
  public final static int COVER_VER_OPEN = 0;
  public final static int COVER_VER_OPEN2 = 1;
  public final static int COVER_HOR_OPEN = 2;
  public final static int COVER_VER_CLOSE = 3;
  public final static int COVER_VER_OPENING = 4;
  public final static int COVER_VER_CLOSING = 5;

  public final static int ID_BARREL = 12;
  public final static int BARREL_BARREL = 0;
  public final static int BARREL_BARREL_BORN = 1;
  public final static int BARREL_BARREL_STILL = 2;
  public final static int BARREL_DISAPPEAR = 3;
  public final static int BARREL_BARREL_R = 4;
  public final static int BARREL_BARREL_R_BORN = 5;
  public final static int BARREL_BARREL_R_STILL = 6;

  public final static int ID_MISC = 13;
  public final static int MISC_WALL = 0;
  public final static int MISC_WALL_BROKEN = 1;
  public final static int MISC_BOX = 2;
  public final static int MISC_BOX_BROKEN = 3;
  public final static int MISC_WALL_DESTROYED = 4;
  public final static int MISC_COFFIN_VER = 5;
  public final static int MISC_COFFIN_HOR = 6;
  public final static int MISC_HOR_CLOSE = 7;
  public final static int MISC_HOR_OPENING = 8;
  public final static int MISC_HOR_CLOSING = 9;
  public final static int MISC_POLE = 10;
  public final static int MISC_POLE_BEND = 11;
  public final static int MISC_POLE2 = 12;
  public final static int MISC_POLE2_BEND = 13;
  public final static int MISC_CROCK = 14;
  public final static int MISC_CROCK_TURN = 15;
  public final static int MISC_CROCK_OVER = 16;
  public final static int MISC_BRIDGE = 17;
  public final static int MISC_BRIDGE_OPENING = 18;
  public final static int MISC_BRIDGE_OPEN = 19;
  public final static int MISC_GATE = 20;
  public final static int MISC_GATE_OPENING = 21;
  public final static int MISC_GATE_CLOSING = 22;
  public final static int MISC_GATE_OPEN = 23;
  public final static int MISC_CHAIN = 24;
  public final static int MISC_MOVEPOLE = 25;
  public final static int MISC_MOVEPOLE_MOVING = 26;
  public final static int MISC_MOVEPOLE_FALL = 27;
  public final static int MISC_SANDPOLE = 28;
  public final static int MISC_FENCE = 29;
  public final static int MISC_FENCE_OPENING = 30;
  public final static int MISC_FENCE_OPEN = 31;

  public final static int ID_SNOWMISC = 14;
  public final static int SNOWMISC_SNOWBALL = 0;
  public final static int SNOWMISC_SNOWBALL_ROLL = 1;
  public final static int SNOWMISC_SNOWBALL_FALL = 2;
  public final static int SNOWMISC_SNOWBALL_BREAK = 3;
  public final static int SNOWMISC_ICE = 4;
  public final static int SNOWMISC_ICE_SLIDE = 5;
  public final static int SNOWMISC_ICE_BREAK = 6;
  public final static int SNOWMISC_ICE_DOWN = 7;
  public final static int SNOWMISC_ICE_PLATFORM = 8;
  public final static int SNOWMISC_CONE = 9;
  public final static int SNOWMISC_CONE_SHAKE = 10;
  public final static int SNOWMISC_CONE_FALL = 11;
  public final static int SNOWMISC_CONE_ONLAND = 12;
  public final static int SNOWMISC_HANGICE = 13;
  public final static int SNOWMISC_HANGICE_TOP = 14;
  public final static int SNOWMISC_HANGICE_FALL = 15;
  public final static int SNOWMISC_HANGICE_BREAKING = 16;
  public final static int SNOWMISC_ROCK = 17;
  public final static int SNOWMISC_ROCK_BOUNCE = 18;
  public final static int SNOWMISC_ROCK_LEFT = 19;
  public final static int SNOWMISC_ROCK_LEFT_BOUNCE = 20;
  public final static int SNOWMISC_ROCK_RIGHT = 21;
  public final static int SNOWMISC_ROCK_RIGHT_BOUNCE = 22;
  public final static int SNOWMISC_SNOWEXIT = 23;
  public final static int SNOWMISC_SPRAY = 24;

  public final static int ID_SPACEMISC = 15;
  public final static int SPACEMISC_LASER_EMITTER = 0;
  public final static int SPACEMISC_LASER = 1;
  public final static int SPACEMISC_LASER2 = 2;
  public final static int SPACEMISC_POLE = 3;
  public final static int SPACEMISC_FLOAT_LASER = 4;
  public final static int SPACEMISC_PLATFORM = 5;
  public final static int SPACEMISC_PLATFORM_BOUNCE = 6;
  public final static int SPACEMISC_PLATFORM_LEFT = 7;
  public final static int SPACEMISC_PLATFORM_LEFT_BOUNCE = 8;
  public final static int SPACEMISC_PLATFORM_RIGHT = 9;
  public final static int SPACEMISC_PLATFORM_RIGHT_BOUNCE = 10;
  public final static int SPACEMISC_SNOWBALL = 11;
  public final static int SPACEMISC_SNOWBALL_ROLL = 12;
  public final static int SPACEMISC_SNOWBALL_FALL = 13;
  public final static int SPACEMISC_SNOWBALL_BREAK = 14;
  public final static int SPACEMISC_STAIR = 15;
  public final static int SPACEMISC_BOX = 16;
  public final static int SPACEMISC_BOX_BREAK = 17;

  public final static int ID_DOOR = 16;
  public final static int DOOR_DOOR = 0;
  public final static int DOOR_DOOR_CLOSING = 1;
  public final static int DOOR_DOOR_OPENING = 2;
  public final static int DOOR_DOOR_OPEN = 3;
  public final static int DOOR_DOOR_COVER = 4;

  public final static int ID_ITEM = 17;
  public final static int ITEM_BONUS = 0;
  public final static int ITEM_RISE = 1;
  public final static int ITEM_DISAPPEAR = 2;
  public final static int ITEM_EXIT = 3;
  public final static int ITEM_LASER = 4;
  public final static int ITEM_LASER_INVISIBLE = 5;
  public final static int ITEM_LASER_INTERFACE = 6;
  public final static int ITEM_JETPACK = 7;
  public final static int ITEM_JETPACK_INTERFACE = 8;
  public final static int ITEM_WAISTBAND = 9;
  public final static int ITEM_WAISTBAND_INTERFACE = 10;
  public final static int ITEM_UMBRELLA = 11;
  public final static int ITEM_GADGETS = 12;
  public final static int ITEM_HANDLE = 13;
  public final static int ITEM_GADGETS_SHOW = 14;
  public final static int ITEM_GADGETS_FACT = 15;
  public final static int ITEM_GADGETS_LONG = 16;
  public final static int ITEM_INVISIBLE = 17;
  public final static int ITEM_HEART = 18;
  public final static int ITEM_HEART_GET = 19;

  public final static int ID_SWITCH = 18;
  public final static int SWITCH_TEETER1 = 0;
  public final static int SWITCH_TEETER2 = 1;
  public final static int SWITCH_TEETER3 = 2;
  public final static int SWITCH_TEETER4 = 3;
  public final static int SWITCH_TEETER5 = 4;
  public final static int SWITCH_TREADLE = 5;
  public final static int SWITCH_BUTTON = 6;
  public final static int SWITCH_TREADLE_OPEN = 7;
  public final static int SWITCH_BUTTON_PRESS = 8;
  public final static int SWITCH_LIFT_DOWN = 9;
  public final static int SWITCH_LIFT_DEFAULT_UP = 10;
  public final static int SWITCH_LIFT_DEFAULT_DOWN2 = 11;
  public final static int SWITCH_LIFT_DEFAULT_MOVEUP = 12;
  public final static int SWITCH_LIFT_DEFAULT_MOVEDOWN = 13;

  public final static int ID_SPACESWITCH = 19;
  public final static int SPACESWITCH_TEETER1 = 0;
  public final static int SPACESWITCH_TEETER2 = 1;
  public final static int SPACESWITCH_TEETER3 = 2;
  public final static int SPACESWITCH_TEETER4 = 3;
  public final static int SPACESWITCH_TEETER5 = 4;
  public final static int SPACESWITCH_TREADLE = 5;

  public final static int ID_SAND = 20;
  public final static int SAND_HOR1 = 0;
  public final static int SAND_HOR2 = 1;
  public final static int SAND_LAND = 2;
  public final static int SAND_LAND2 = 3;
  public final static int SAND_CORNER = 4;
  public final static int SAND_CORNER2 = 5;
  public final static int SAND_VER1 = 6;
  public final static int SAND_VER2 = 7;

  public final static int ID_BGACTOR = 21;
  public final static int BGACTOR_BLOCK = 0;
  public final static int BGACTOR_BLOCK_FALL = 1;
  public final static int BGACTOR_COVER = 2;
  public final static int BGACTOR_COVER2 = 3;
  public final static int BGACTOR_COVER3 = 4;
  public final static int BGACTOR_COVER4 = 5;
  public final static int BGACTOR_COVER5 = 6;
  public final static int BGACTOR_TIP = 7;

  public final static int ID_INTERFACE = 22;
  public final static int INTERFACE_SHOW = 0;
  public final static int INTERFACE_FACE1 = 1;
  public final static int INTERFACE_FACE2 = 2;
  public final static int INTERFACE_FACE3 = 3;
  public final static int INTERFACE_FACE01_BEGIN = 4;
  public final static int INTERFACE_FACE02_BEGIN = 5;
  public final static int INTERFACE_FACE03_BEGIN = 6;
  public final static int INTERFACE_FACE01_BLINK = 7;
  public final static int INTERFACE_FACE02_BLINK = 8;
  public final static int INTERFACE_FACE03_BLINK = 9;
  public final static int INTERFACE_EMOTION_FREE_1 = 10;
  public final static int INTERFACE_EMOTION_FREE_2 = 11;
  public final static int INTERFACE_EMOTION_FREE_3 = 12;
  public final static int INTERFACE_EMOTION_HEART_1 = 13;
  public final static int INTERFACE_EMOTION_HEART_2 = 14;
  public final static int INTERFACE_EMOTION_HEART_3 = 15;
  public final static int INTERFACE_EMOTION_SURPRISE_1 = 16;
  public final static int INTERFACE_EMOTION_SURPRISE_2 = 17;
  public final static int INTERFACE_EMOTION_SURPRISE_3 = 18;
  public final static int INTERFACE_EMOTION_HURT_1 = 19;
  public final static int INTERFACE_EMOTION_HURT_2 = 20;
  public final static int INTERFACE_EMOTION_HURT_3 = 21;
  public final static int INTERFACE_EMOTION_SAYS_1 = 22;
  public final static int INTERFACE_EMOTION_SAYS_2 = 23;
  public final static int INTERFACE_EMOTION_SAYS_3 = 24;
  public final static int INTERFACE_EMOTION_EYE_1 = 25;
  public final static int INTERFACE_EMOTION_EYE_2 = 26;
  public final static int INTERFACE_EMOTION_EYE_3 = 27;
  public final static int INTERFACE_EMOTION_LOSE_1 = 28;
  public final static int INTERFACE_EMOTION_LOSE_2 = 29;
  public final static int INTERFACE_EMOTION_LOSE_3 = 30;
  public final static int INTERFACE_EMOTION_ATTACK_1 = 31;
  public final static int INTERFACE_EMOTION_ATTACK_2 = 32;
  public final static int INTERFACE_EMOTION_ATTACK_3 = 33;
  public final static int INTERFACE_EMOTION_BONUS_1 = 34;
  public final static int INTERFACE_EMOTION_BONUS_2 = 35;
  public final static int INTERFACE_EMOTION_BONUS_3 = 36;
  public final static int INTERFACE_HEART = 37;
  public final static int INTERFACE_JERRY = 38;
  public final static int INTERFACE_DIALOG_BOX = 39;
  public final static int INTERFACE_INVISIBLE = 40;
  public final static int INTERFACE_FLOWER = 41;
  public final static int INTERFACE_EMOTION_FROWN_1 = 42;
  public final static int INTERFACE_EMOTION_FROWN_2 = 43;
  public final static int INTERFACE_EMOTION_FROWN_3 = 44;

  public final static int ID_BACKACTOR = 23;
  public final static int BACKACTOR_SLOPE = 0;
  public final static int BACKACTOR_SLOPE2 = 1;
  public final static int BACKACTOR_SLOPE3 = 2;
  public final static int BACKACTOR_SLOPE4 = 3;

  public final static int ID_SHELF = 24;
  public final static int SHELF_SHELF = 0;

  public final static int ID_HELP = 25;
  public final static int HELP_DANGER = 0;
  public final static int HELP_SPEEDUP = 1;
  public final static int HELP_SPEEDUP2 = 2;
  public final static int HELP_DANGER_IN = 3;
  public final static int HELP_DANGER_IN_UP = 4;
  public final static int HELP_DANGER_IN_DOWN = 5;
  public final static int HELP_PRESS_2 = 6;
  public final static int HELP_PRESS_4 = 7;
  public final static int HELP_PRESS_6 = 8;
  public final static int HELP_PRESS_5 = 9;
  public final static int HELP_PRESS_2_BARREL = 10;
  public final static int HELP_INVISIBLE = 11;
  public final static int HELP_INVISIBLE_LARGE = 12;
  public final static int HELP_DANGER_OUT = 13;
  public final static int HELP_GO_LEFT = 14;
  public final static int HELP_GO_RIGHT = 15;
  public final static int HELP_GO_UP = 16;
  public final static int HELP_GO_DOWN = 17;

  public final static int ID_HINT = 26;
  public final static int HINT_STATIC_CAMERA = 0;
  public final static int HINT_TRAILER1 = 1;
  public final static int HINT_TRAILER2 = 2;
  public final static int HINT_TRAILER3 = 3;
  public final static int HINT_TRAILER4 = 4;
  public final static int HINT_TRAILER5 = 5;
  public final static int HINT_TRAILER6 = 6;
  public final static int HINT_TRAILER7 = 7;
  public final static int HINT_TRAILER8 = 8;
  public final static int HINT_TRAILER9 = 9;
  public final static int HINT_TRAILER10 = 10;
  public final static int HINT_TRAILER11 = 11;
  public final static int HINT_INVISIBLE = 12;

  public final static int ID_WAKER = 27;
  public final static int WAKER_REBORN = 0;
  public final static int WAKER_MINIGAME = 1;
  public final static int WAKER_INVISIBLE = 2;
  public final static int WAKER_REBORN_LARGE = 3;
  public final static int WAKER_INVISIBLE_LARGE = 4;

  public final static int ID_WOOHP = 28;

  public final static int ID_SHADOW = 29;
  public final static int SHADOW_MIDDLE = 0;
  public final static int SHADOW_SMALL = 1;
  public final static int SHADOW_TINY = 2;
  public final static int SHADOW_INVISIBLE = 3;
  public final static int SHADOW_HALF = 4;
  public final static int SHADOW_MOVE = 5;

//@@
//@#endif

 public final static int ID_SOUND_KICK = ID_SOUND_PUNCH;
    public final static int SPIDER_FLYING_LEVEL = JETPACK_LEVEL_2;

    final static int LAST_EGYPT_STAGE = 2;
    final static int LAST_MOUNT_STAGE = 5;
   
}