⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avalnche.c

📁 这个是延伸mame的在wince平台下的游戏模拟器的代码
💻 C
字号:
/***************************************************************************

  vidhrdw.c

  Functions to emulate the video hardware of the machine.

  The video display is just a 256x256 bitmap in memory ($0000-$1FFF).
  We decode it as 8x1 characters for convenience.  Note that the top
  two rows are not displayed since $0000-$01FF is used by the 6502 for
  temporary storage and stack space.

***************************************************************************/

#include "driver.h"
#include "vidhrdw/generic.h"

/***************************************************************************

  Draw the game screen in the given osd_bitmap.
  Do NOT call osd_update_display() from this function, it will be called by
  the main emulation engine.

***************************************************************************/

void avalnche_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh)
{
	int offs;

	/* for every character in the Video RAM, check if it has been modified */
	/* since last time and update it accordingly. */
	/* Don't bother checking 0x0000-0x01FF since we won't draw it anyways */
	for (offs = videoram_size - 1;offs >= 0x200;offs--)
	{
		if (dirtybuffer[offs])
		{
			int sx,sy,color;

			/* decode modified background */
			decodechar(Machine->gfx[0],offs,videoram,
						Machine->drv->gfxdecodeinfo[0].gfxlayout);

			dirtybuffer[offs] = 0;

			sx = 8 * (offs % 32);
			sy = (offs / 32);

			color = 0;
			drawgfx(tmpbitmap,Machine->gfx[0],
					offs,color,
					0,0,sx,sy,
					&Machine->drv->visible_area,TRANSPARENCY_NONE,0);

			if (!full_refresh)
				drawgfx(bitmap,Machine->gfx[0],
					offs,color,
					0,0,sx,sy,
					&Machine->drv->visible_area,TRANSPARENCY_NONE,0);
		}
	}

	if (full_refresh)
		/* copy the character mapped graphics */
		copybitmap(bitmap,tmpbitmap,0,0,0,0,&Machine->drv->visible_area,TRANSPARENCY_NONE,0);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -