首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 游戏天堂 > 游戏开发 > SKVM
【标  题】:SKVM
【关键字】:SKVM
【来  源】:http://blog.csdn.net/chinavfeng/archive/2007/04/18/1569178.aspx

SKVM

版本 SK-VM 1.3.4 

//**************屏幕大小*****************************************

GIGA     120*146
SD1000   120*119
SD1010
SD1020
V710     128*145
AP1000   128*128
IM5000   128*144
IM6400  
SK1000   128*128
V330     176*184
X230     120*149
X250
X290     120*146
X350     128*112  4Gray
X400     120*144  4Gray
X460     128*112  4Gray
X789     128*146
240320   240*320

//******相当于KeyCodes的按键*********************

public static final int KEY_CLR            = 8;
public static final int KEY_COML         = 129; //左软键
public static final int KEY_COMC        = 130;
public static final int KEY_COMR        = 131; //右软键
public static final int KEY_UP              = 141; //方向键上
public static final int KEY_LEFT          = 142; //左
public static final int KEY_RIGHT       = 145; //右
public static final int KEY_DOWN       = 146; //下
public static final int KEY_FIRE           = 148; //fire
public static final int KEY_CALL          = 190;
public static final int KEY_END           = 191;
public static final int KEY_FLIP_OPEN    = 192;
public static final int KEY_FLIP_CLOSE  = 193;
public static final int KEY_VOL_UP          = 194;
public static final int KEY_VOL_DOWN   = 195;

public static final int KEY_NUM0 = 48;
public static final int KEY_NUM1 = 49;
public static final int KEY_NUM2 = 50;
public static final int KEY_NUM3 = 51;
public static final int KEY_NUM4 = 52;
public static final int KEY_NUM5 = 53;
public static final int KEY_NUM6 = 54;
public static final int KEY_NUM7 = 55;
public static final int KEY_NUM8 = 56;
public static final int KEY_NUM9 = 57;
public static final int KEY_STAR = 42;
public static final int KEY_POUND = 35;

//****笔记**************************************************************
//********************************************************************
      temp = g2d.createMaskableImage(48,32);//产生48*32的可以被设为透明图片
      Graphics gg = temp.getGraphics();//产生画笔
      Graphics2D gg2d = Graphics2D.getGraphics2D(gg);//得到画笔
      for(int i=0;i<48*32;i++){
        if(i%48<24){
           gg2d.setPixelMask(i%48,i/48,true);//透明(全透明,包括以后画上去的,即此部分在图片上永远透明)
        }else{
          gg2d.setPixelMask(i%48,i/48,false);//不透明
        }
      }
//**************************************************
//产生透明的
      gg.setColor(0xff0000);//填充一种没有的颜色,最好差值越大越好
      gg.fillRect(0,0,48,32);
      gg.drawImage(ren,0,0,0);//将所要的图片绘制到图片上
      for(int i=0;i<48*32;i++){
        if(gg2d.getPixel(i%48,i/48) == 0xff0000){//将不要的部分设为透明
          gg2d.setPixelMask(i%48,i/48,true);
        }
      }
//*************************************************
//skvm播放声音
 private void playMusic(String url){//播放声音
  AudioClip clip = null;
  try {
    clip = AudioSystem.getAudioClip("mmf");

   InputStream is = getClass().getResourceAsStream(url);//"/snd0.mmf"
   byte[] buffer = new byte[is.available()];
   is.read(buffer);
   clip.open(buffer, 0, buffer.length);
   clip.play();
   clip.close();
   }
   catch (Exception e) {e.printStackTrace();
   }
 }

浅谈Ogre的四元数与旋转-1:【上一篇】
NVIDIA Geforce 8 系列显卡规格表:【下一篇】
【相关文章】
没有相关文章
【随机文章】
  • 纯虚类,纯虚函数
  • 浅议VDSL和ADSL混插技术
  • 基于mysql的bind
  • LOTUS新手必读的学习资源
  • 小议Domain Model
  • 解开屏保的密码
  • disksuit Mirror
  • 谈数据库集群的原理与性能
  • 平台相关性与平台无关性
  • 如果2007年的业界发生一个改变的话,你希望它是什么?
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.