public static int c1942_vh_start() { if (Generic.generic_vh_start() != 0) return 1; dirtybuffer2 = new byte[c1942_backgroundram_size[0]]; for (int i = 0; i < c1942_backgroundram_size[0]; i++) dirtybuffer2[i] = 1; /* the background area is twice as wide as the screen (actually twice as tall, */ /* because this is a vertical game) */ tmpbitmap2 = Mame.osd_create_bitmap(2 * Mame.Machine.drv.screen_width, Mame.Machine.drv.screen_height); return 0; }
public static int tecmo_vh_start() { if (Generic.generic_vh_start() != 0) return 1; dirtybuffer2 = new byte[Generic.videoram_size[0]]; for (int i = 0; i < Generic.videoram_size[0]; i++) dirtybuffer2[i] = 1; /* the background area is twice as wide as the screen */ tmpbitmap2 = Mame.osd_new_bitmap(2 * Mame.Machine.drv.screen_width, Mame.Machine.drv.screen_height, Mame.Machine.scrbitmap.depth); tmpbitmap3 = Mame.osd_new_bitmap(2 * Mame.Machine.drv.screen_width, Mame.Machine.drv.screen_height, Mame.Machine.scrbitmap.depth); /* 0x100 is the background color */ Mame.palette_transparent_color = 0x100; return 0; }
public override void vh_update(Mame.osd_bitmap bitmap, int full_refresh) { int i, pwidth, pheight; float scale; Mame.osd_bitmap vector_bitmap=new Mame.osd_bitmap(); Mame.rectangle rect=new Mame.rectangle(); if (llander_panel == null) { AvgDvg.dvg_screenrefresh(bitmap,full_refresh); return; } pwidth = llander_panel._artwork.width; pheight = llander_panel._artwork.height; vector_bitmap.width = bitmap.width; vector_bitmap.height = bitmap.height - pheight; vector_bitmap._private = bitmap._private; vector_bitmap.line = bitmap.line; AvgDvg.dvg_screenrefresh(vector_bitmap,full_refresh); if (full_refresh!=0) { rect.min_x = 0; rect.max_x = pwidth-1; rect.min_y = bitmap.height - pheight; rect.max_y = bitmap.height - 1; Mame.copybitmap(bitmap,llander_panel._artwork,false,false,0, bitmap.height - pheight, rect, Mame.TRANSPARENCY_NONE, 0); Mame.osd_mark_dirty (rect.min_x,rect.min_y,rect.max_x,rect.max_y,0); } scale = pwidth/800.0f; for (i=0;i<NUM_LIGHTS;i++) { if (lights_changed[i] || full_refresh!=0) { rect.min_x = (int)(scale * light_areas[i].min_x); rect.max_x = (int)(scale * light_areas[i].max_x); rect.min_y = (int)(bitmap.height - pheight + scale * light_areas[i].min_y); rect.max_y = (int)(bitmap.height - pheight + scale * light_areas[i].max_y); if (lights[i]) Mame.copybitmap(bitmap, llander_lit_panel._artwork, false,false,0, bitmap.height - pheight, rect, Mame.TRANSPARENCY_NONE, 0); else Mame.copybitmap(bitmap, llander_panel._artwork, false,false,0, bitmap.height - pheight, rect, Mame.TRANSPARENCY_NONE, 0); Mame.osd_mark_dirty(rect.min_x, rect.min_y, rect.max_x, rect.max_y, 0); lights_changed[i] = false; } } }
public static int dec8_vh_start() { uint[] pen_usage = Mame.Machine.gfx[1].pen_usage; pf1_bitmap = Mame.osd_create_bitmap(512, 512); pf2_bitmap = Mame.osd_create_bitmap(512, 512); tf2_bitmap = Mame.osd_create_bitmap(512, 512); pf_video = new _BytePtr(0x1000); pf_dirty = new bool[0x800]; for (int i = 0; i < 0x800; i++) pf_dirty[i] = true; /* Kludge: Find a blank tile */ blank_tile = 0; for (int i = 0; i < 0xfff; i++) if ((pen_usage[i] & ~1) == 0) { blank_tile = i; i = 0x1000; } /* Stupid kludge - fix it later :) */ shackled_priority = 0; if (Mame.Machine.gamedrv.name.CompareTo("breywood") == 0) shackled_priority = 1; if (Mame.Machine.gamedrv.name.CompareTo("shackled") == 0) shackled_priority = 1; return 0; }
public static int nemesis_vh_start() { Generic.tmpbitmap = Mame.osd_new_bitmap(2 * Mame.Machine.drv.screen_width, Mame.Machine.drv.screen_height, Mame.Machine.scrbitmap.depth); tmpbitmap2 = Mame.osd_new_bitmap(2 * Mame.Machine.drv.screen_width, Mame.Machine.drv.screen_height, Mame.Machine.scrbitmap.depth); tmpbitmap3 = Mame.osd_new_bitmap(2 * Mame.Machine.drv.screen_width, Mame.Machine.drv.screen_height, Mame.Machine.scrbitmap.depth); tmpbitmap4 = Mame.osd_new_bitmap(2 * Mame.Machine.drv.screen_width, Mame.Machine.drv.screen_height, Mame.Machine.scrbitmap.depth); char_dirty = new byte[2048]; for (int i = 0; i < 2048; i++) char_dirty[i] = 1; sprite_dirty = new byte[512]; for (int i = 0; i < 512; i++) sprite_dirty[i] = 1; sprite3216_dirty = new bool[256]; for (int i = 0; i < 256; i++) sprite3216_dirty[i] = true; sprite1632_dirty = new bool[256]; for (int i = 0; i < 256; i++) sprite1632_dirty[i] = true; sprite3232_dirty = new bool[256]; for (int i = 0; i < 128; i++) sprite3232_dirty[i] = true; sprite168_dirty = new bool[1024]; for (int i = 0; i < 1024; i++) sprite168_dirty[i] = true; sprite816_dirty = new bool[1024]; for (int i = 0; i < 32; i++) sprite816_dirty[i] = true; sprite6464_dirty = new bool[32]; for (int i = 0; i < 32; i++) sprite6464_dirty[i] = true; video1_dirty = new bool[0x800]; video2_dirty = new bool[0x800]; for (int i = 0; i < 0x800; i++) { video1_dirty[i] = true; video2_dirty[i] = true; } nemesis_characterram_gfx = new _BytePtr(nemesis_characterram_size[0]); Array.Clear(nemesis_characterram_gfx.buffer, nemesis_characterram_gfx.offset, nemesis_characterram_size[0]); //memset(nemesis_characterram_gfx, 0, nemesis_characterram_size); return 0; }