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

📄 bsktball.c

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

  vidhrdw.c

  Functions to emulate the video hardware of the machine.

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

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

unsigned char *bsktball_motion;

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

  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 bsktball_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh)
{
    int offs,motion;

    /* for every character in the Video RAM, check if it has been modified */
	/* since last time and update it accordingly. */
	for (offs = videoram_size - 1;offs >= 0;offs--)
	{
                if (dirtybuffer[offs])
                {
                        int charcode;
                        int sx,sy;
						int flipx;
                        int color;

                        dirtybuffer[offs]=0;

                        charcode = videoram[offs];

                        color = (charcode & 0x40) >> 6;
						flipx = (charcode & 0x80) >> 7;

                        charcode = ((charcode & 0x0F) << 2) | ((charcode & 0x30) >> 4);

                        sx = 8 * (offs % 32);
                        sy = 8 * (offs / 32);
                        drawgfx(tmpbitmap,Machine->gfx[0],
                                charcode, color,
								flipx,0,sx,sy,
					&Machine->drv->visible_area,TRANSPARENCY_NONE,0);
                }
	}

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

	for (motion=0;motion<16;motion++)
	{
		int pic,sx,sy,color,flipx;

		pic = bsktball_motion[motion*4];
		sy = 28*8 - bsktball_motion[motion*4 + 1];
		sx = bsktball_motion[motion*4 + 2];
		color = bsktball_motion[motion*4 + 3];

		flipx = (pic & 0x80) >> 7;
		pic = (pic & 0x3F);
        color = (color & 0x3F);

        drawgfx(bitmap,Machine->gfx[1],
                pic, color,
				flipx,0,sx,sy,
				&Machine->drv->visible_area,TRANSPARENCY_PEN,0);
	}
}

⌨️ 快捷键说明

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