我用WTK不能运行

源代码在线查看: const.java

软件大小: 486 K
上传用户: fpeisheng
关键词: WTK 运行
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.xiaoyu.rpggame;												public class Const				{				  //========按键值=========				  final static byte KEY_UP=-1;				  final static byte KEY_DOWN=-2;				  final static byte KEY_LEFT=-3;				  final static byte KEY_RIGHT=-4;				  final static byte KEY_SOFT_LEFT=-6;				  final static byte KEY_SOFT_RIGHT=-7;				  final static byte KEY_FIRE=-5;				  //==========END==========				  //=========当前屏幕状态=========				  final static byte GAME_LOGO=1;				  final static byte GAME_SCENE=2;				  final static byte GAME_FIGHT=3;				  final static byte GAME_PAUSE=4;				  final static byte GAME_HELP=5;				  final static byte GAME_TOOLS=6;				  final static byte GAME_SYSTEM=7;				  final static byte GAME_SYSTEM_TOOLS=8;				  final static byte GAME_ALERT=9;				  final static byte GAME_STATUE=10;				  final static byte GAME_SAVE=11;				  final static byte GAME_LOAD=12;				  final static byte GAME_TASK=13;				  final static byte GAME_OVER=14;				  final static byte GAME_VOL=15;				  final static byte GAME_DIALOG=16;				  //===========END=============				  // ==========主角动画序列==========				  /*final static byte HERO_UP_FRAME[]={0, 1, 2, 1};				  final static byte HERO_DOWN_FRAME[]={6, 7, 8, 7};				  final static byte HERO_LEFT_FRAME[]={9, 10, 11, 10};				  final static byte HERO_RIGHT_FRAME[]={3, 4, 5, 4};				  final static byte HERO_STAND_FRAME[]={9, 0, 3, 6};*/				  final static byte HERO_RIGHT_FRAME[]={0, 1, 2, 3, 2};				  final static byte HERO_DOWN_FRAME[]={4, 5, 6, 7, 6};				  final static byte HERO_UP_FRAME[]={8, 9, 10, 11, 10};				  final static byte HERO_LEFT_FRAME[]={12, 13, 14, 15, 14};				  final static byte HERO_STAND_FRAME[]={12, 8, 0, 4};				  				  //==========END==========				  //==========怪物动画序列=======				  final static byte ENEMY_RIGHT_FRAME[]={0, 1, 2, 3, 2};				  final static byte ENEMY_DOWN_FRAME[]={8, 9, 10, 11, 10};				  final static byte ENEMY_LEFT_FRAME[]={12, 13, 14, 15, 14};				  final static byte ENEMY_UP_FRAME[]={4, 5, 6, 7, 6};				  final static byte ENEMY_STAND_FRAME[]={4, 12, 8, 0};				  //===========END===========				  //==========战斗场景中状态=======				  //人物				  final static byte FIGHT_HERO_WAIT=1;				  final static byte FIGHT_HERO_SELECT=2;				  final static byte FIGHT_HERO_GO=3;				  final static byte FIGHT_HERO_ATTACK=4;				  final static byte FIGHT_HERO_RETURN=5;				  final static byte FIGHT_HERO_HURT=6;				  final static byte FIGHT_HERO_MAGIC_SELECT=12;				  final static byte FIGHT_HERO_MAGIC=13;				  //怪物				  final static byte FIGHT_ENEMY_WAIT=7;				  final static byte FIGHT_ENEMY_GO=8;				  final static byte FIGHT_ENEMY_ATTACK=9;				  final static byte FIGHT_ENEMY_RETURN=10;				  final static byte FIGHT_ENEMY_HURT=11;				  //===========END===========				  //============文字信息=========				  static String FIGHT_MENU[]=new String[]				  {				    "攻  击","魔  法","物  品", "逃  跑"				  };				  static String COMMAND[]=new String[]				  {				    "翻页","返回","退出","确定","系统", "物品","菜单",				  };				  static String PAUSE[]=new String[]				  {				    "回到游戏","声音设置","保存游戏","读取进度","退出游戏"				  };				  static String VOL[]=new String[]				      {					    "播   放","增大音量","减小音量","静     音"					  };				  static String[] SYSTEM=				  {					  "物品", "任务", "状态", "回到游戏"				  };				  static String LOADING= "读取中...";				  static String RMS_NAME= "GGHHHH";				  //===========END===========				  //战斗场景地图数据				  final static byte FIGHT_DATA[][]=new byte[][]				     {					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },					  { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 }				     };								  final static byte[][][] MAP_DATA = new byte[][][] {							{									{ 1, 6, 1, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,											20, 1 },									{ 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 15, 1, 1, 1, 1,											1, 1 },									{ 1, 3, 3, 1, 1, 1, 6, 1, 1, 1, 1, 3, 16, 17, 1, 1, 1, 1,											1, 1 },									{ 1, 3, 3, 1, 1, 6, 6, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,											1 },									{ 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,											1 },									{ 1, 1, 1, 1, 11, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 6, 1,											1 },									{ 1, 5, 1, 1, 2, 1, 12, 12, 1, 1, 1, 11, 2, 2, 11, 1, 6, 7,											6, 1 },									{ 1, 1, 1, 1, 2, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 6,											1, 1 },									{ 1, 1, 11, 1, 2, 13, 12, 12, 13, 1, 1, 10, 10, 10, 10, 1,											1, 1, 1, 1 },									{ 1, 11, 11, 11, 1, 14, 15, 12, 12, 1, 1, 9, 9, 9, 9, 3, 1,											1, 7, 1 },									{ 1, 1, 11, 1, 1, 16, 17, 12, 12, 1, 1, 1, 1, 3, 3, 1, 1,											1, 1, 1 },									{ 18, 18, 18, 21, 1, 12, 12, 12, 20, 1, 1, 18, 18, 21, 18,											18, 18, 18, 20, 18 },									{ 20, 18, 18, 19, 1, 13, 12, 12, 12, 1, 1, 19, 18, 20, 18,											18, 18, 19, 18, 18 },									{ 1, 1, 1, 1, 1, 12, 12, 12, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1,											1, 1 },									{ 1, 1, 1, 1, 3, 13, 12, 12, 13, 3, 1, 1, 4, 1, 1, 4, 1, 1,											1, 7 },									{ 1, 4, 1, 11, 3, 12, 12, 12, 12, 1, 1, 10, 10, 10, 1, 1,											1, 1, 1, 1 },									{ 1, 1, 11, 11, 1, 1, 12, 12, 1, 1, 1, 9, 9, 9, 1, 1, 1, 5,											1, 1 },									{ 1, 1, 11, 1, 1, 7, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1,											1 },									{ 7, 1, 1, 1, 1, 1, 1, 1, 1, 7, 4, 7, 1, 11, 1, 7, 1, 1, 1,											1 },									{ 1, 1, 1, 1, 6, 1, 6, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1,											1 } },														{									{ 2, 2, 2, 2, 2, 2, 20, 18, 19, 18, 18, 20, 18, 19, 18, 18,											18, 18, 18, 18 },									{ 1, 1, 1, 1, 12, 1, 21, 18, 18, 20, 18, 21, 18, 18, 18,											20, 18, 18, 21, 18 },									{ 1, 1, 1, 1, 12, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3,											1 },									{ 1, 1, 1, 12, 12, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,											2, 2 },									{ 5, 1, 1, 12, 12, 12, 1, 1, 11, 1, 1, 11, 1, 1, 1, 1, 1,											1, 1, 1 },									{ 10, 13, 12, 12, 12, 12, 12, 13, 10, 10, 10, 10, 3, 3, 3,											3, 3, 3, 3, 3 },									{ 8, 12, 14, 15, 12, 12, 12, 12, 8, 8, 8, 8, 2, 2, 2, 2, 2,											2, 2, 2 },									{ 9, 13, 16, 17, 12, 12, 12, 13, 9, 9, 9, 9, 3, 3, 3, 3, 3,											3, 3, 3 },									{ 6, 1, 1, 12, 12, 12, 1, 1, 7, 1, 1, 7, 1, 1, 7, 1, 3, 1,											6, 1 },									{ 1, 1, 1, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,											1, 1 },									{ 1, 1, 1, 1, 12, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1,											12, 12 },									{ 1, 1, 1, 1, 12, 1, 1, 1, 7, 1, 1, 7, 1, 1, 7, 1, 3, 1,											12, 3 },									{ 1, 1, 1, 5, 12, 5, 1, 1, 3, 1, 3, 1, 3, 1, 12, 12, 12,											12, 12, 3 },									{ 11, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,											2, 11, 2, 12, 3 },									{ 11, 1, 1, 1, 12, 1, 1, 1, 3, 1, 3, 1, 3, 1, 12, 12, 12,											12, 12, 3 },									{ 1, 1, 1, 1, 12, 1, 1, 1, 7, 1, 1, 7, 1, 1, 7, 1, 3, 1,											12, 3 },									{ 10, 10, 10, 10, 12, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3,											1, 12, 12 },									{ 9, 9, 9, 9, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,											2 },									{ 2, 2, 2, 2, 2, 21, 18, 20, 18, 18, 19, 18, 18, 21, 18,											20, 18, 18, 18, 21 },									{ 2, 2, 2, 2, 2, 20, 18, 18, 18, 18, 20, 18, 19, 18, 18,											18, 19, 18, 18, 20 } },									{										{ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20, 18, 19, 18, 18, 20,												18, 19, 18, 18, 18, 18, 18, 18, 20, 18, 18, 18, 20 },										{ 2, 1, 1, 1, 5, 1, 1, 1, 1, 12, 1, 21, 18, 18, 20, 18, 21,												18, 18, 18, 20, 18, 18, 21, 18, 18, 19, 18, 18, 21 },										{ 2, 1, 1, 1, 1, 1, 1, 1, 1, 12, 1, 3, 1, 1, 3, 1, 1, 3, 1,												1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3 },										{ 2, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 2, 2, 2, 2, 2, 2, 2,												2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },										{ 2, 1, 5, 1, 1, 5, 1, 1, 12, 12, 12, 1, 1, 11, 1, 1, 11,												1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1 },										{ 2, 1, 10, 10, 10, 10, 13, 12, 12, 12, 12, 12, 13, 10, 10,												10, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },										{ 2, 1, 8, 8, 8, 8, 12, 14, 15, 12, 12, 12, 12, 8, 8, 8, 8,												2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },										{ 2, 1, 9, 9, 9, 9, 13, 16, 17, 12, 12, 12, 13, 9, 9, 9, 9,												3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },										{ 2, 1, 6, 1, 1, 6, 1, 1, 12, 12, 12, 1, 1, 7, 1, 1, 7, 1,												1, 7, 1, 3, 1, 6, 1, 6, 1, 6, 1, 1 },										{ 2, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1,												1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1 },										{ 2, 1, 1, 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, 3, 1, 3, 1, 3, 1,												1, 1, 3, 1, 12, 12, 12, 12, 12, 12, 1 },										{ 2, 1, 1, 11, 1, 1, 1, 1, 1, 12, 1, 1, 1, 7, 1, 1, 7, 1,												1, 7, 1, 3, 1, 12, 3, 3, 3, 3, 12, 1 },										{ 2, 1, 11, 3, 11, 1, 1, 1, 5, 12, 5, 1, 1, 3, 1, 3, 1, 3,												1, 12, 12, 12, 12, 12, 3, 12, 12, 3, 12, 1 },										{ 2, 11, 3, 3, 3, 11, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12,												12, 12, 12, 12, 2, 11, 2, 12, 3, 14, 15, 3, 12, 1 },										{ 2, 11, 3, 11, 3, 11, 1, 1, 1, 12, 1, 1, 1, 3, 1, 3, 1, 3,												1, 12, 12, 12, 12, 12, 3, 16, 17, 3, 12, 1 },										{ 2, 2, 11, 3, 11, 1, 1, 1, 1, 12, 1, 1, 1, 7, 1, 1, 7, 1,												1, 7, 1, 3, 1, 12, 3, 3, 3, 3, 12, 1 },										{ 2, 1, 1, 1, 1, 10, 10, 10, 10, 12, 1, 1, 1, 3, 1, 3, 1,												3, 1, 1, 1, 3, 1, 12, 12, 12, 12, 12, 12, 1 },										{ 2, 1, 1, 1, 1, 9, 9, 9, 9, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2,												2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },										{ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 21, 18, 20, 18, 18, 19, 18,												18, 21, 18, 20, 18, 18, 18, 21, 18, 18, 18, 18, 21 },										{ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20, 18, 18, 18, 18, 20, 18,												19, 18, 18, 18, 19, 18, 18, 20, 18, 18, 19, 18, 18 } },								{ { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 },										{ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 } }																			  };				      				  //地图切换点,行,列,目标地图索引,可以写入地图数据中				  final static byte MAP_TRIGGER[][]=				  {				     {10,2,1},				     {1,1,0},				  };				  //战斗时移动得位置				  final static byte MOVE_STEPS=15;				  //战斗时水平和垂直方向得偏移量				  final static byte MOVE_STEP_X=5;				  final static byte MOVE_STEP_Y=5;				  //主角位置				  static short HERO_X=140;				  static short HERO_Y=100;				  //怪物位置				  static int ENEMY_X=HERO_X-MOVE_STEPS*MOVE_STEP_X-48;				  static int ENEMY_Y[]={HERO_Y,				                        HERO_Y-MOVE_STEPS*MOVE_STEP_Y,				                        HERO_Y+MOVE_STEPS*MOVE_STEP_Y};				  //人物初始属性常量				  final static byte HERO_HP=100;				  final static byte HERO_MP=100;				  final static byte HERO_AT=50;				  //怪物初始属性常量				  final static byte ENEMY_HP=100;				  final static byte ENEMY_MP=100;				  final static byte ENEMY_AT=5;				  //绘制血条长度				  final static byte SHOW_HP_LENGTH=20;				  //屏幕尺寸				  final static short SCREEN_WIDTH=176;				  final static short SCREEN_HEIGHT=208;				//  final static short SCREEN_WIDTH=240;				//  final static short SCREEN_HEIGHT=320;				  //屏幕提示框得尺寸				  final static short ALERT_SCREEN_WIDTH=120;				  final static short ALERT_SCREEN_HEIGHT=50;				  //帮助信息				  static String[][] HELP=new String[][]				  {				    {				      "  这是一款仿梦幻西",				      "游的RPG游戏,并在",				      "其中加入了一些新的",				      "新的元素,使其更加",				      "具有可玩性与趣味性",				      "绚丽的魔法,可爱的"				     },				     {				       "人物造型以及丰富的",				       "任务系统,将你带入",				       "一个梦幻般的时代。",				       "让你百玩不厌,使你",				       "的生活更加充满色彩",				       "  我们都是造物主最"				      },				      {				       "伟大的光荣,所以要",				       "快乐得从容! 现在一",				       "去开始我们的快乐之",				       "旅之梦幻情缘吧    ",				       "游戏操作方法:上下",				       "左右键控制人物行走"				      },				      {				       ",中心键用于选择以",				       "及与NPC对话等。",				       "----谨以此纪念那段",				       "迷失的大学生活!!"				      }				  };				  				  //对话信息				  //主角的对话				  static String[][][] DIALOGS = 				  {					  {						  {							  "梁风有信,", "秋月无边...&*^?", "这是什么地方", "唉-_-,还是先四处走走吧!"						  }						 					  },					  {						  {							  "小家伙,你愿意拜我为师吗?", "这是为师给你的见面礼.", "现在为师就传你本门的神功:唧唧歪歪...."						  }						  					  }				  };				  //NPC的对话				  static String[][] NPC_DIALOGS = 				  {					  {						  "小家伙,你愿意拜我为师吗?", "这是为师给你的见面礼.", "现在为师就传你本门的神功:唧唧歪歪...."					  }					  				  };				  //================物品相关===================				  final static String[] TOOLS_NAME={"红血散","金香玉","佛   手","金疮药", "神   水"};				  //道具属性:道具类型,hp补充,mp补充				  final static short TOOLS_PROPERTICE[][]=				  {				    {0,50,50},				    {1,100,100},				    {2,0,100},				    {3,50,0},				    {4, 200, 200}				  };				  final static String[] MAGIC_NAME={"唧唧歪歪", "竹叶神功"};				  				  //=================END====================				  public Const()				  {				  }				}							

相关资源