xmame分析

一、输入接口:osd_get_code_value

二、显示接口:sysdep_display_update     SDL_UpdateRects

char *sysdep_display_update(mame_bitmap *bitmap,
rectangle *vis_area, rectangle *dirty_area,
  struct sysdep_palette_struct *palette, int keyb_leds, int flags);

mame_bitmap *bitmap:图像数据

struct _mame_bitmap
{
	int width,height;	/*位图的宽高 */
	int depth;			/* 像素大小 */
	void **line;		/* pointers to the start of each line - can be UINT8 **, UINT16 ** or UINT32 ** */

	/* 接受图像的另一种方法 */
	void *base;			/* 指向像素(0,0)的指针(针对填充进行了调整) */
	int rowpixels;		/* 每行像素数(包括填充) */
	int rowbytes;		/* 每行字节数(包括填充) */

	/* functions to render in the correct orientation */
	void (*plot)(struct _mame_bitmap *bitmap,int x,int y,pen_t pen);
	pen_t (*read)(struct _mame_bitmap *bitmap,int x,int y);
	void (*plot_box)(struct _mame_bitmap *bitmap,int x,int y,int width,int height,pen_t pen);
};

rectangle *vis_area:显示区域

rectangle *dirty_area:显示区域

struct _rectangle
{
	int min_x,max_x;
	int min_y,max_y;
};

struct sysdep_palette_struct *palette:调色板

struct sysdep_palette_struct
{
   int src_depth;//标志颜色格式,是否需要调色板。
/*
   		   15 555 direct rgb mode
   		   16 palettised mode
   		   32 888 direct rgb mode 
*/
   struct sysdep_palette_info *display_palette;
   unsigned int *lookup;  /* lookup table to be used for blitters to convert
                             the src palette to the display palette */
};

int keyb_leds, int flags:other

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值