Esempio n. 1
0
        public static int generic_vh_start()
        {
            dirtybuffer = null;
            tmpbitmap = null;

            if (videoram_size[0] == 0)
            {
                System.Console.WriteLine("Error: generic_vh_start() called but videoram_size not initialized\n");
                return 1;
            }

            dirtybuffer = new bool[videoram_size[0]];
            Generic.SetDirtyBuffer(true);

            tmpbitmap = Mame.osd_new_bitmap(Mame.Machine.drv.screen_width, Mame.Machine.drv.screen_height, Mame.Machine.scrbitmap.depth);

            return 0;
        }
Esempio n. 2
0
        public static void vector_vh_update(Mame.osd_bitmap bitmap, int full_refresh)
        {
            int i;
            int temp_x, temp_y;

            /* copy parameters */
            vecbitmap = bitmap;
            vecwidth = bitmap.width;
            vecheight = bitmap.height;

            /* setup scaling */
            temp_x = (1 << (44 - vecshift)) / (Mame.Machine.drv.visible_area.max_x - Mame.Machine.drv.visible_area.min_x);
            temp_y = (1 << (44 - vecshift)) / (Mame.Machine.drv.visible_area.max_y - Mame.Machine.drv.visible_area.min_y);

            if ((Mame.Machine.orientation & Mame.ORIENTATION_SWAP_XY) != 0)
            {
                vector_scale_x = temp_x * vecheight;
                vector_scale_y = temp_y * vecwidth;
            }
            else
            {
                vector_scale_x = temp_x * vecwidth;
                vector_scale_y = temp_y * vecheight;
            }
            /* reset clipping area */
            xmin = 0; xmax = vecwidth; ymin = 0; ymax = vecheight;

            /* next call to vector_clear_list() is allowed to swap the lists */
            vector_runs = 0;

            /* mark pixels which are not idential in newlist and oldlist dirty */
            /* the old pixels which get removed are marked dirty immediately,  */
            /* new pixels are recognized by setting new.dirty                 */
            clever_mark_dirty();

            /* clear ALL pixels in the hidden map */
            vector_clear_pixels();

            /* Draw ALL lines into the hidden map. Mark only those lines with */
            /* new.dirty = 1 as dirty. Remember the pixel start/end indices  */
            int ni = 0;
            for (i = 0; i < new_index; i++)
            {
                if (new_list[ni].status == VCLIP)
                    vector_set_clip(new_list[ni].x, new_list[ni].y, new_list[ni].arg1, new_list[ni].arg2);
                else
                {
                    new_list[ni].arg1 = p_index;
                    vector_draw_to(new_list[ni].x, new_list[ni].y, new_list[ni].col, Tgamma[new_list[ni].intensity], new_list[ni].status);

                    new_list[ni].arg2 = p_index;
                }
                ni++;
            }
        }
Esempio n. 3
0
        public static int rallyx_vh_start()
        {
            if (Generic.generic_vh_start() != 0)
                return 1;

            dirtybuffer2 = new bool[Generic.videoram_size[0]];
            for (int i = 0; i < Generic.videoram_size[0]; i++) dirtybuffer2[i] = true;

            tmpbitmap1 = Mame.osd_create_bitmap(32 * 8, 32 * 8);

            return 0;
        }
Esempio n. 4
0
 public static void generic_bitmapped_vh_stop()
 {
     Mame.osd_free_bitmap(tmpbitmap);
     tmpbitmap = null;
 }
Esempio n. 5
0
        public static int generic_bitmapped_vh_start()
        {
            if ((tmpbitmap = Mame.osd_new_bitmap(Mame.Machine.drv.screen_width, Mame.Machine.drv.screen_height, Mame.Machine.scrbitmap.depth)) == null)
            {
                return 1;
            }

            return 0;
        }
Esempio n. 6
0
 public static void generic_vh_stop()
 {
     dirtybuffer = null;
     tmpbitmap = null;
 }