mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
Bulk conversion of bitmap_t * to bitmap_t & . With this change the
parameters for the global SCREEN_UPDATE callback match the parameters for the driver_device version. Added allocate() and deallocate() methods to bitmap_t to permit cleaner handling of bitmaps in drivers and modern devices. [Aaron Giles]
This commit is contained in:
parent
1ded844ee7
commit
80cd316a2a
@ -93,9 +93,9 @@ struct _render_font
|
||||
INLINE FUNCTIONS
|
||||
***************************************************************************/
|
||||
|
||||
INLINE int pixel_is_set(bitmap_t *bitmap, int y, int x)
|
||||
INLINE int pixel_is_set(bitmap_t &bitmap, int y, int x)
|
||||
{
|
||||
return (bitmap->pix32(y, x) & 0xffffff) == 0;
|
||||
return (bitmap.pix32(y, x) & 0xffffff) == 0;
|
||||
}
|
||||
|
||||
|
||||
@ -258,26 +258,26 @@ error:
|
||||
characters in the given font
|
||||
-------------------------------------------------*/
|
||||
|
||||
static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
|
||||
static int bitmap_to_chars(bitmap_t &bitmap, render_font *font)
|
||||
{
|
||||
int rowstart = 0;
|
||||
int x, y;
|
||||
|
||||
/* loop over rows */
|
||||
while (rowstart < bitmap->height())
|
||||
while (rowstart < bitmap.height())
|
||||
{
|
||||
int rowend, baseline, colstart;
|
||||
int chstart;
|
||||
|
||||
/* find the top of the row */
|
||||
for ( ; rowstart < bitmap->height(); rowstart++)
|
||||
for ( ; rowstart < bitmap.height(); rowstart++)
|
||||
if (pixel_is_set(bitmap, rowstart, 0))
|
||||
break;
|
||||
if (rowstart >= bitmap->height())
|
||||
if (rowstart >= bitmap.height())
|
||||
break;
|
||||
|
||||
/* find the bottom of the row */
|
||||
for (rowend = rowstart + 1; rowend < bitmap->height(); rowend++)
|
||||
for (rowend = rowstart + 1; rowend < bitmap.height(); rowend++)
|
||||
if (!pixel_is_set(bitmap, rowend, 0))
|
||||
{
|
||||
rowend--;
|
||||
@ -325,20 +325,20 @@ static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
|
||||
|
||||
/* scan the column to find characters */
|
||||
colstart = 0;
|
||||
while (colstart < bitmap->width())
|
||||
while (colstart < bitmap.width())
|
||||
{
|
||||
render_font_char *ch = &font->chars[chstart];
|
||||
int colend;
|
||||
|
||||
/* find the start of the character */
|
||||
for ( ; colstart < bitmap->width(); colstart++)
|
||||
for ( ; colstart < bitmap.width(); colstart++)
|
||||
if (pixel_is_set(bitmap, rowend + 2, colstart))
|
||||
break;
|
||||
if (colstart >= bitmap->width())
|
||||
if (colstart >= bitmap.width())
|
||||
break;
|
||||
|
||||
/* find the end of the character */
|
||||
for (colend = colstart + 1; colend < bitmap->width(); colend++)
|
||||
for (colend = colstart + 1; colend < bitmap.width(); colend++)
|
||||
if (!pixel_is_set(bitmap, rowend + 2, colend))
|
||||
{
|
||||
colend--;
|
||||
@ -382,7 +382,7 @@ static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
|
||||
}
|
||||
|
||||
/* return non-zero (TRUE) if we errored */
|
||||
return (rowstart < bitmap->height());
|
||||
return (rowstart < bitmap.height());
|
||||
}
|
||||
|
||||
|
||||
@ -438,7 +438,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* parse the PNG into characters */
|
||||
error = bitmap_to_chars(bitmap, font);
|
||||
error = bitmap_to_chars(*bitmap, font);
|
||||
delete bitmap;
|
||||
if (error)
|
||||
break;
|
||||
|
@ -1117,17 +1117,17 @@ SCREEN_UPDATE( tms340x0 )
|
||||
params.heblnk = params.hsblnk = cliprect.max_x + 1;
|
||||
|
||||
/* blank out the blank regions */
|
||||
if (bitmap->bpp() == 16)
|
||||
if (bitmap.bpp() == 16)
|
||||
{
|
||||
UINT16 *dest = &bitmap->pix16(cliprect.min_y);
|
||||
UINT16 *dest = &bitmap.pix16(cliprect.min_y);
|
||||
for (x = cliprect.min_x; x < params.heblnk; x++)
|
||||
dest[x] = blackpen;
|
||||
for (x = params.hsblnk; x <= cliprect.max_y; x++)
|
||||
dest[x] = blackpen;
|
||||
}
|
||||
else if (bitmap->bpp() == 32)
|
||||
else if (bitmap.bpp() == 32)
|
||||
{
|
||||
UINT32 *dest = &bitmap->pix32(cliprect.min_y);
|
||||
UINT32 *dest = &bitmap.pix32(cliprect.min_y);
|
||||
for (x = cliprect.min_x; x < params.heblnk; x++)
|
||||
dest[x] = blackpen;
|
||||
for (x = params.hsblnk; x <= cliprect.max_y; x++)
|
||||
|
@ -196,7 +196,7 @@ struct _tms34010_config
|
||||
const char *screen_tag; /* the screen operated on */
|
||||
UINT32 pixclock; /* the pixel clock (0 means don't adjust screen size) */
|
||||
int pixperclock; /* pixels per clock */
|
||||
void (*scanline_callback)(screen_device &screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params);
|
||||
void (*scanline_callback)(screen_device &screen, bitmap_t &bitmap, int scanline, const tms34010_display_params *params);
|
||||
void (*output_int)(device_t *device, int state); /* output interrupt callback */
|
||||
void (*to_shiftreg)(address_space *space, offs_t, UINT16 *); /* shift register write */
|
||||
void (*from_shiftreg)(address_space *space, offs_t, UINT16 *); /* shift register read */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -196,84 +196,84 @@ void gfx_element_build_temporary(gfx_element *gfx, running_machine &machine, UIN
|
||||
/* ----- core graphics drawing ----- */
|
||||
|
||||
/* specific drawgfx implementations for each transparency type */
|
||||
void drawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty);
|
||||
void drawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen);
|
||||
void drawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen);
|
||||
void drawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transmask);
|
||||
void drawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, const UINT8 *pentable, const pen_t *shadowtable);
|
||||
void drawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen, UINT8 alpha);
|
||||
void drawgfx_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty);
|
||||
void drawgfx_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen);
|
||||
void drawgfx_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen);
|
||||
void drawgfx_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transmask);
|
||||
void drawgfx_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, const UINT8 *pentable, const pen_t *shadowtable);
|
||||
void drawgfx_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 transpen, UINT8 alpha);
|
||||
|
||||
|
||||
|
||||
/* ----- zoomed graphics drawing ----- */
|
||||
|
||||
/* specific drawgfxzoom implementations for each transparency type */
|
||||
void drawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley);
|
||||
void drawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen);
|
||||
void drawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen);
|
||||
void drawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transmask);
|
||||
void drawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, const UINT8 *pentable, const pen_t *shadowtable);
|
||||
void drawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen, UINT8 alpha);
|
||||
void drawgfxzoom_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley);
|
||||
void drawgfxzoom_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen);
|
||||
void drawgfxzoom_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen);
|
||||
void drawgfxzoom_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transmask);
|
||||
void drawgfxzoom_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, const UINT8 *pentable, const pen_t *shadowtable);
|
||||
void drawgfxzoom_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, UINT32 transpen, UINT8 alpha);
|
||||
|
||||
|
||||
|
||||
/* ----- priority masked graphics drawing ----- */
|
||||
|
||||
/* specific pdrawgfx implementations for each transparency type */
|
||||
void pdrawgfx_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask);
|
||||
void pdrawgfx_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, UINT32 transpen);
|
||||
void pdrawgfx_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, UINT32 transpen);
|
||||
void pdrawgfx_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, UINT32 transmask);
|
||||
void pdrawgfx_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
|
||||
void pdrawgfx_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t *priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
|
||||
void pdrawgfx_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask);
|
||||
void pdrawgfx_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, UINT32 transpen);
|
||||
void pdrawgfx_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, UINT32 transpen);
|
||||
void pdrawgfx_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, UINT32 transmask);
|
||||
void pdrawgfx_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
|
||||
void pdrawgfx_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, bitmap_t &priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
|
||||
|
||||
|
||||
|
||||
/* ----- priority masked zoomed graphics drawing ----- */
|
||||
|
||||
/* specific pdrawgfxzoom implementations for each transparency type */
|
||||
void pdrawgfxzoom_opaque(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask);
|
||||
void pdrawgfxzoom_transpen(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, UINT32 transpen);
|
||||
void pdrawgfxzoom_transpen_raw(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, UINT32 transpen);
|
||||
void pdrawgfxzoom_transmask(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, UINT32 transmask);
|
||||
void pdrawgfxzoom_transtable(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
|
||||
void pdrawgfxzoom_alpha(bitmap_t *dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t *priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
|
||||
void pdrawgfxzoom_opaque(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask);
|
||||
void pdrawgfxzoom_transpen(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, UINT32 transpen);
|
||||
void pdrawgfxzoom_transpen_raw(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, UINT32 transpen);
|
||||
void pdrawgfxzoom_transmask(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, UINT32 transmask);
|
||||
void pdrawgfxzoom_transtable(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, const UINT8 *pentable, const pen_t *shadowtable);
|
||||
void pdrawgfxzoom_alpha(bitmap_t &dest, const rectangle &cliprect, const gfx_element *gfx, UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty, UINT32 scalex, UINT32 scaley, bitmap_t &priority, UINT32 pmask, UINT32 transpen, UINT8 alpha);
|
||||
|
||||
|
||||
|
||||
/* ----- scanline copying ----- */
|
||||
|
||||
/* copy pixels from an 8bpp buffer to a single scanline of a bitmap */
|
||||
void draw_scanline8(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT8 *srcptr, const pen_t *paldata);
|
||||
void draw_scanline8(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT8 *srcptr, const pen_t *paldata);
|
||||
|
||||
/* copy pixels from a 16bpp buffer to a single scanline of a bitmap */
|
||||
void draw_scanline16(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT16 *srcptr, const pen_t *paldata);
|
||||
void draw_scanline16(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT16 *srcptr, const pen_t *paldata);
|
||||
|
||||
/* copy pixels from a 32bpp buffer to a single scanline of a bitmap */
|
||||
void draw_scanline32(bitmap_t *bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, const pen_t *paldata);
|
||||
void draw_scanline32(bitmap_t &bitmap, INT32 destx, INT32 desty, INT32 length, const UINT32 *srcptr, const pen_t *paldata);
|
||||
|
||||
|
||||
|
||||
/* ----- scanline extraction ----- */
|
||||
|
||||
/* copy pixels from a single scanline of a bitmap to an 8bpp buffer */
|
||||
void extract_scanline8(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT8 *destptr);
|
||||
void extract_scanline8(bitmap_t &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT8 *destptr);
|
||||
|
||||
/* copy pixels from a single scanline of a bitmap to a 16bpp buffer */
|
||||
void extract_scanline16(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT16 *destptr);
|
||||
void extract_scanline16(bitmap_t &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT16 *destptr);
|
||||
|
||||
/* copy pixels from a single scanline of a bitmap to a 32bpp buffer */
|
||||
void extract_scanline32(bitmap_t *bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT32 *destptr);
|
||||
void extract_scanline32(bitmap_t &bitmap, INT32 srcx, INT32 srcy, INT32 length, UINT32 *destptr);
|
||||
|
||||
|
||||
|
||||
/* ----- bitmap copying ----- */
|
||||
|
||||
/* copy from one bitmap to another, copying all unclipped pixels */
|
||||
void copybitmap(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect);
|
||||
void copybitmap(bitmap_t &dest, bitmap_t &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect);
|
||||
|
||||
/* copy from one bitmap to another, copying all unclipped pixels except those that match transpen */
|
||||
void copybitmap_trans(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect, UINT32 transpen);
|
||||
void copybitmap_trans(bitmap_t &dest, bitmap_t &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect, UINT32 transpen);
|
||||
|
||||
/*
|
||||
Copy a bitmap onto another with scroll and wraparound.
|
||||
@ -288,10 +288,10 @@ void copybitmap_trans(bitmap_t *dest, bitmap_t *src, int flipx, int flipy, INT32
|
||||
*/
|
||||
|
||||
/* copy from one bitmap to another, copying all unclipped pixels, and applying scrolling to one or more rows/colums */
|
||||
void copyscrollbitmap(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect);
|
||||
void copyscrollbitmap(bitmap_t &dest, bitmap_t &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect);
|
||||
|
||||
/* copy from one bitmap to another, copying all unclipped pixels except those that match transpen, and applying scrolling to one or more rows/colums */
|
||||
void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen);
|
||||
void copyscrollbitmap_trans(bitmap_t &dest, bitmap_t &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen);
|
||||
|
||||
/*
|
||||
Copy a bitmap applying rotation, zooming, and arbitrary distortion.
|
||||
@ -323,10 +323,10 @@ void copyscrollbitmap_trans(bitmap_t *dest, bitmap_t *src, UINT32 numrows, const
|
||||
*/
|
||||
|
||||
/* copy from one bitmap to another, with zoom and rotation, copying all unclipped pixels */
|
||||
void copyrozbitmap(bitmap_t *dest, const rectangle &cliprect, bitmap_t *src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound);
|
||||
void copyrozbitmap(bitmap_t &dest, const rectangle &cliprect, bitmap_t &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound);
|
||||
|
||||
/* copy from one bitmap to another, with zoom and rotation, copying all unclipped pixels whose values do not match transpen */
|
||||
void copyrozbitmap_trans(bitmap_t *dest, const rectangle &cliprect, bitmap_t *src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound, UINT32 transparent_color);
|
||||
void copyrozbitmap_trans(bitmap_t &dest, const rectangle &cliprect, bitmap_t &src, INT32 startx, INT32 starty, INT32 incxx, INT32 incxy, INT32 incyx, INT32 incyy, int wraparound, UINT32 transparent_color);
|
||||
|
||||
|
||||
|
||||
|
@ -58,10 +58,13 @@
|
||||
/* special priority type meaning "none" */
|
||||
typedef struct { char dummy[3]; } NO_PRIORITY;
|
||||
|
||||
extern bitmap_t drawgfx_dummy_priority_bitmap;
|
||||
#define DECLARE_NO_PRIORITY bitmap_t &priority = drawgfx_dummy_priority_bitmap;
|
||||
|
||||
|
||||
/* macros for using the optional priority */
|
||||
#define PRIORITY_VALID(x) (sizeof(x) != sizeof(NO_PRIORITY))
|
||||
#define PRIORITY_ADDR(p,t,y,x) (PRIORITY_VALID(t) ? (&(p)->pix<t>(y, x)) : NULL)
|
||||
#define PRIORITY_ADDR(p,t,y,x) (PRIORITY_VALID(t) ? (&(p).pix<t>(y, x)) : NULL)
|
||||
#define PRIORITY_ADVANCE(t,p,i) do { if (PRIORITY_VALID(t)) (p) += (i); } while (0)
|
||||
|
||||
|
||||
@ -355,7 +358,7 @@ while (0) \
|
||||
/*
|
||||
Assumed input parameters or local variables:
|
||||
|
||||
bitmap_t *dest - the bitmap to render to
|
||||
bitmap_t &dest - the bitmap to render to
|
||||
const rectangle &cliprect - a clipping rectangle (assumed to be clipped to the size of 'dest')
|
||||
const gfx_element *gfx - pointer to the gfx_element to render
|
||||
UINT32 code - index of the entry within gfx_element
|
||||
@ -364,7 +367,7 @@ while (0) \
|
||||
int flipy - non-zero means render bottom-to-top instead of top-to-bottom
|
||||
INT32 destx - the top-left X coordinate to render to
|
||||
INT32 desty - the top-left Y coordinate to render to
|
||||
bitmap_t *priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy)
|
||||
bitmap_t &priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy)
|
||||
*/
|
||||
|
||||
|
||||
@ -378,13 +381,13 @@ do { \
|
||||
INT32 curx, cury; \
|
||||
INT32 dy; \
|
||||
\
|
||||
assert(dest != NULL); \
|
||||
assert(dest.valid()); \
|
||||
assert(gfx != NULL); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
|
||||
assert(cliprect.min_x >= 0); \
|
||||
assert(cliprect.max_x < dest->width()); \
|
||||
assert(cliprect.max_x < dest.width()); \
|
||||
assert(cliprect.min_y >= 0); \
|
||||
assert(cliprect.max_y < dest->height()); \
|
||||
assert(cliprect.max_y < dest.height()); \
|
||||
\
|
||||
/* ignore empty/invalid cliprects */ \
|
||||
if (cliprect.empty()) \
|
||||
@ -456,7 +459,7 @@ do { \
|
||||
for (cury = desty; cury <= destendy; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
|
||||
const UINT8 *srcptr = srcdata; \
|
||||
srcdata += dy; \
|
||||
\
|
||||
@ -491,7 +494,7 @@ do { \
|
||||
for (cury = desty; cury <= destendy; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
|
||||
const UINT8 *srcptr = srcdata; \
|
||||
srcdata += dy; \
|
||||
\
|
||||
@ -538,7 +541,7 @@ do { \
|
||||
for (cury = desty; cury <= destendy; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
|
||||
const UINT8 *srcptr = srcdata; \
|
||||
srcdata += dy; \
|
||||
\
|
||||
@ -579,7 +582,7 @@ do { \
|
||||
for (cury = desty; cury <= destendy; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
|
||||
const UINT8 *srcptr = srcdata; \
|
||||
srcdata += dy; \
|
||||
\
|
||||
@ -621,7 +624,7 @@ do { \
|
||||
/*
|
||||
Assumed input parameters or local variables:
|
||||
|
||||
bitmap_t *dest - the bitmap to render to
|
||||
bitmap_t &dest - the bitmap to render to
|
||||
const rectangle &cliprect - a clipping rectangle (assumed to be clipped to the size of 'dest')
|
||||
const gfx_element *gfx - pointer to the gfx_element to render
|
||||
UINT32 code - index of the entry within gfx_element
|
||||
@ -632,7 +635,7 @@ do { \
|
||||
INT32 desty - the top-left Y coordinate to render to
|
||||
UINT32 scalex - the 16.16 scale factor in the X dimension
|
||||
UINT32 scaley - the 16.16 scale factor in the Y dimension
|
||||
bitmap_t *priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy)
|
||||
bitmap_t &priority - the priority bitmap (even if PRIORITY_TYPE is NO_PRIORITY, at least needs a dummy)
|
||||
*/
|
||||
|
||||
|
||||
@ -647,13 +650,13 @@ do { \
|
||||
INT32 curx, cury; \
|
||||
INT32 dx, dy; \
|
||||
\
|
||||
assert(dest != NULL); \
|
||||
assert(dest.valid()); \
|
||||
assert(gfx != NULL); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
|
||||
assert(cliprect.min_x >= 0); \
|
||||
assert(cliprect.max_x < dest->width()); \
|
||||
assert(cliprect.max_x < dest.width()); \
|
||||
assert(cliprect.min_y >= 0); \
|
||||
assert(cliprect.max_y < dest->height()); \
|
||||
assert(cliprect.max_y < dest.height()); \
|
||||
\
|
||||
/* ignore empty/invalid cliprects */ \
|
||||
if (cliprect.empty()) \
|
||||
@ -734,7 +737,7 @@ do { \
|
||||
for (cury = desty; cury <= destendy; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
|
||||
const UINT8 *srcptr = srcdata + (srcy >> 16) * gfx->line_modulo; \
|
||||
INT32 cursrcx = srcx; \
|
||||
srcy += dy; \
|
||||
@ -773,7 +776,7 @@ do { \
|
||||
for (cury = desty; cury <= destendy; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
|
||||
const UINT8 *srcptr = srcdata + (srcy >> 16) * gfx->line_modulo; \
|
||||
INT32 cursrcx = srcx; \
|
||||
srcy += dy; \
|
||||
@ -822,13 +825,13 @@ do { \
|
||||
INT32 curx, cury; \
|
||||
INT32 dx, dy; \
|
||||
\
|
||||
assert(dest != NULL); \
|
||||
assert(src != NULL); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
|
||||
assert(dest.valid()); \
|
||||
assert(src.valid()); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
|
||||
assert(cliprect.min_x >= 0); \
|
||||
assert(cliprect.max_x < dest->width()); \
|
||||
assert(cliprect.max_x < dest.width()); \
|
||||
assert(cliprect.min_y >= 0); \
|
||||
assert(cliprect.max_y < dest->height()); \
|
||||
assert(cliprect.max_y < dest.height()); \
|
||||
\
|
||||
/* ignore empty/invalid cliprects */ \
|
||||
if (cliprect.empty()) \
|
||||
@ -836,10 +839,10 @@ do { \
|
||||
\
|
||||
/* standard setup; dx counts bytes in X, dy counts pixels in Y */ \
|
||||
dx = 1; \
|
||||
dy = src->rowpixels(); \
|
||||
dy = src.rowpixels(); \
|
||||
\
|
||||
/* compute final pixel in X and exit if we are entirely clipped */ \
|
||||
destendx = destx + src->width() - 1; \
|
||||
destendx = destx + src.width() - 1; \
|
||||
if (destx > cliprect.max_x || destendx < cliprect.min_x) \
|
||||
break; \
|
||||
\
|
||||
@ -856,7 +859,7 @@ do { \
|
||||
destendx = cliprect.max_x; \
|
||||
\
|
||||
/* compute final pixel in Y and exit if we are entirely clipped */ \
|
||||
destendy = desty + src->height() - 1; \
|
||||
destendy = desty + src.height() - 1; \
|
||||
if (desty > cliprect.max_y || destendy < cliprect.min_y) \
|
||||
break; \
|
||||
\
|
||||
@ -875,14 +878,14 @@ do { \
|
||||
/* apply X flipping */ \
|
||||
if (flipx) \
|
||||
{ \
|
||||
srcx = src->width() - 1 - srcx; \
|
||||
srcx = src.width() - 1 - srcx; \
|
||||
dx = -dx; \
|
||||
} \
|
||||
\
|
||||
/* apply Y flipping */ \
|
||||
if (flipy) \
|
||||
{ \
|
||||
srcy = src->height() - 1 - srcy; \
|
||||
srcy = src.height() - 1 - srcy; \
|
||||
dy = -dy; \
|
||||
} \
|
||||
\
|
||||
@ -891,7 +894,7 @@ do { \
|
||||
leftovers = (destendx + 1 - destx) - 4 * numblocks; \
|
||||
\
|
||||
/* compute the address of the first source pixel of the first row */ \
|
||||
srcdata = &src->pix<PIXEL_TYPE>(srcy, srcx); \
|
||||
srcdata = &src.pix<PIXEL_TYPE>(srcy, srcx); \
|
||||
\
|
||||
/* non-flipped case */ \
|
||||
if (!flipx) \
|
||||
@ -900,7 +903,7 @@ do { \
|
||||
for (cury = desty; cury <= destendy; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
|
||||
const PIXEL_TYPE *srcptr = srcdata; \
|
||||
srcdata += dy; \
|
||||
\
|
||||
@ -935,7 +938,7 @@ do { \
|
||||
for (cury = desty; cury <= destendy; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, destx); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, destx); \
|
||||
const PIXEL_TYPE *srcptr = srcdata; \
|
||||
srcdata += dy; \
|
||||
\
|
||||
@ -996,23 +999,23 @@ do { \
|
||||
\
|
||||
g_profiler.start(PROFILER_COPYBITMAP); \
|
||||
\
|
||||
assert(dest != NULL); \
|
||||
assert(src != NULL); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
|
||||
assert(dest.valid()); \
|
||||
assert(dest.valid()); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
|
||||
assert(cliprect.min_x >= 0); \
|
||||
assert(cliprect.max_x < dest->width()); \
|
||||
assert(cliprect.max_x < dest.width()); \
|
||||
assert(cliprect.min_y >= 0); \
|
||||
assert(cliprect.max_y < dest->height()); \
|
||||
assert(!wraparound || (src->width() & (src->width() - 1)) == 0); \
|
||||
assert(!wraparound || (src->height() & (src->height() - 1)) == 0); \
|
||||
assert(cliprect.max_y < dest.height()); \
|
||||
assert(!wraparound || (src.width() & (src.width() - 1)) == 0); \
|
||||
assert(!wraparound || (src.height() & (src.height() - 1)) == 0); \
|
||||
\
|
||||
/* ignore empty/invalid cliprects */ \
|
||||
if (cliprect.empty()) \
|
||||
break; \
|
||||
\
|
||||
/* compute fixed-point 16.16 size of the source bitmap */ \
|
||||
srcfixwidth = src->width() << 16; \
|
||||
srcfixheight = src->height() << 16; \
|
||||
srcfixwidth = src.width() << 16; \
|
||||
srcfixheight = src.height() << 16; \
|
||||
\
|
||||
/* advance the starting coordinates to the top-left of the cliprect */ \
|
||||
startx += cliprect.min_x * incxx + cliprect.min_y * incyx; \
|
||||
@ -1032,7 +1035,7 @@ do { \
|
||||
for (cury = cliprect.min_y; cury <= cliprect.max_y; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, cliprect.min_x); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, cliprect.min_x); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, cliprect.min_x); \
|
||||
const PIXEL_TYPE *srcptr; \
|
||||
INT32 srcx = startx; \
|
||||
INT32 srcy = starty; \
|
||||
@ -1042,7 +1045,7 @@ do { \
|
||||
/* check srcy for the whole row at once */ \
|
||||
if ((UINT32)srcy < srcfixheight) \
|
||||
{ \
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16); \
|
||||
\
|
||||
/* iterate over unrolled blocks of 4 */ \
|
||||
for (curx = 0; curx < numblocks; curx++) \
|
||||
@ -1093,8 +1096,8 @@ do { \
|
||||
for (cury = cliprect.min_y; cury <= cliprect.max_y; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, cliprect.min_x); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, cliprect.min_x); \
|
||||
const PIXEL_TYPE *srcptr = &src->pix<PIXEL_TYPE>(starty >> 16); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, cliprect.min_x); \
|
||||
const PIXEL_TYPE *srcptr = &src.pix<PIXEL_TYPE>(starty >> 16); \
|
||||
INT32 srcx = startx; \
|
||||
\
|
||||
starty = (starty + incyy) & srcfixheight; \
|
||||
@ -1140,7 +1143,7 @@ do { \
|
||||
for (cury = cliprect.min_y; cury <= cliprect.max_y; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, cliprect.min_x); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, cliprect.min_x); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, cliprect.min_x); \
|
||||
const PIXEL_TYPE *srcptr; \
|
||||
INT32 srcx = startx; \
|
||||
INT32 srcy = starty; \
|
||||
@ -1153,7 +1156,7 @@ do { \
|
||||
{ \
|
||||
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
|
||||
{ \
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[0], priptr[0], srcptr[0]); \
|
||||
} \
|
||||
srcx += incxx; \
|
||||
@ -1161,7 +1164,7 @@ do { \
|
||||
\
|
||||
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
|
||||
{ \
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[1], priptr[1], srcptr[0]); \
|
||||
} \
|
||||
srcx += incxx; \
|
||||
@ -1169,7 +1172,7 @@ do { \
|
||||
\
|
||||
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
|
||||
{ \
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[2], priptr[2], srcptr[0]); \
|
||||
} \
|
||||
srcx += incxx; \
|
||||
@ -1177,7 +1180,7 @@ do { \
|
||||
\
|
||||
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
|
||||
{ \
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[3], priptr[3], srcptr[0]); \
|
||||
} \
|
||||
srcx += incxx; \
|
||||
@ -1192,7 +1195,7 @@ do { \
|
||||
{ \
|
||||
if ((UINT32)srcx < srcfixwidth && (UINT32)srcy < srcfixheight) \
|
||||
{ \
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[0], priptr[0], srcptr[0]); \
|
||||
} \
|
||||
srcx += incxx; \
|
||||
@ -1216,7 +1219,7 @@ do { \
|
||||
for (cury = cliprect.min_y; cury <= cliprect.max_y; cury++) \
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, cury, cliprect.min_x); \
|
||||
PIXEL_TYPE *destptr = &dest->pix<PIXEL_TYPE>(cury, cliprect.min_x); \
|
||||
PIXEL_TYPE *destptr = &dest.pix<PIXEL_TYPE>(cury, cliprect.min_x); \
|
||||
const PIXEL_TYPE *srcptr; \
|
||||
INT32 srcx = startx; \
|
||||
INT32 srcy = starty; \
|
||||
@ -1227,22 +1230,22 @@ do { \
|
||||
/* iterate over unrolled blocks of 4 */ \
|
||||
for (curx = 0; curx < numblocks; curx++) \
|
||||
{ \
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[0], priptr[0], srcptr[0]); \
|
||||
srcx = (srcx + incxx) & srcfixwidth; \
|
||||
srcy = (srcy + incxy) & srcfixheight; \
|
||||
\
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[1], priptr[1], srcptr[0]); \
|
||||
srcx = (srcx + incxx) & srcfixwidth; \
|
||||
srcy = (srcy + incxy) & srcfixheight; \
|
||||
\
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[2], priptr[2], srcptr[0]); \
|
||||
srcx = (srcx + incxx) & srcfixwidth; \
|
||||
srcy = (srcy + incxy) & srcfixheight; \
|
||||
\
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[3], priptr[3], srcptr[0]); \
|
||||
srcx = (srcx + incxx) & srcfixwidth; \
|
||||
srcy = (srcy + incxy) & srcfixheight; \
|
||||
@ -1254,7 +1257,7 @@ do { \
|
||||
/* iterate over leftover pixels */ \
|
||||
for (curx = 0; curx < leftovers; curx++) \
|
||||
{ \
|
||||
srcptr = &src->pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
srcptr = &src.pix<PIXEL_TYPE>(srcy >> 16, srcx >> 16); \
|
||||
PIXEL_OP(destptr[0], priptr[0], srcptr[0]); \
|
||||
srcx = (srcx + incxx) & srcfixwidth; \
|
||||
srcy = (srcy + incxy) & srcfixheight; \
|
||||
@ -1276,7 +1279,7 @@ do { \
|
||||
/*
|
||||
Assumed input parameters or local variables:
|
||||
|
||||
bitmap_t *bitmap - the bitmap to copy to
|
||||
bitmap_t &bitmap - the bitmap to copy to
|
||||
INT32 destx - the X coordinate to copy to
|
||||
INT32 desty - the Y coordinate to copy to
|
||||
INT32 length - the total number of pixels to copy
|
||||
@ -1286,17 +1289,17 @@ do { \
|
||||
|
||||
#define DRAWSCANLINE_CORE(PIXEL_TYPE, PIXEL_OP, PRIORITY_TYPE) \
|
||||
do { \
|
||||
assert(bitmap != NULL); \
|
||||
assert(bitmap.valid()); \
|
||||
assert(destx >= 0); \
|
||||
assert(destx + length <= bitmap->width()); \
|
||||
assert(destx + length <= bitmap.width()); \
|
||||
assert(desty >= 0); \
|
||||
assert(desty < bitmap->height()); \
|
||||
assert(desty < bitmap.height()); \
|
||||
assert(srcptr != NULL); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority != NULL); \
|
||||
assert(!PRIORITY_VALID(PRIORITY_TYPE) || priority.valid()); \
|
||||
\
|
||||
{ \
|
||||
PRIORITY_TYPE *priptr = PRIORITY_ADDR(priority, PRIORITY_TYPE, desty, destx); \
|
||||
PIXEL_TYPE *destptr = &bitmap->pix<PIXEL_TYPE>(desty, destx); \
|
||||
PIXEL_TYPE *destptr = &bitmap.pix<PIXEL_TYPE>(desty, destx); \
|
||||
\
|
||||
/* iterate over unrolled blocks of 4 */ \
|
||||
while (length >= 4) \
|
||||
@ -1332,7 +1335,7 @@ do { \
|
||||
/*
|
||||
Assumed input parameters:
|
||||
|
||||
bitmap_t *bitmap - the bitmap to extract from
|
||||
bitmap_t &bitmap - the bitmap to extract from
|
||||
INT32 srcx - the X coordinate to begin extraction
|
||||
INT32 srcy - the Y coordinate to begin extraction
|
||||
INT32 length - the total number of pixels to extract
|
||||
@ -1341,15 +1344,15 @@ do { \
|
||||
|
||||
#define EXTRACTSCANLINE_CORE(PIXEL_TYPE) \
|
||||
do { \
|
||||
assert(bitmap != NULL); \
|
||||
assert(bitmap.valid()); \
|
||||
assert(srcx >= 0); \
|
||||
assert(srcx + length <= bitmap->width()); \
|
||||
assert(srcx + length <= bitmap.width()); \
|
||||
assert(srcy >= 0); \
|
||||
assert(srcy < bitmap->height()); \
|
||||
assert(srcy < bitmap.height()); \
|
||||
assert(destptr != NULL); \
|
||||
\
|
||||
{ \
|
||||
const PIXEL_TYPE *srcptr = &bitmap->pix<PIXEL_TYPE>(srcy, srcx); \
|
||||
const PIXEL_TYPE *srcptr = &bitmap.pix<PIXEL_TYPE>(srcy, srcx); \
|
||||
\
|
||||
/* iterate over unrolled blocks of 4 */ \
|
||||
while (length >= 4) \
|
||||
|
@ -146,7 +146,6 @@ running_machine::running_machine(const machine_config &_config, osd_interface &o
|
||||
pens(NULL),
|
||||
colortable(NULL),
|
||||
shadow_table(NULL),
|
||||
priority_bitmap(NULL),
|
||||
debug_flags(0),
|
||||
memory_data(NULL),
|
||||
palette_data(NULL),
|
||||
|
@ -415,7 +415,7 @@ public:
|
||||
const pen_t * pens; // remapped palette pen numbers
|
||||
colortable_t * colortable; // global colortable for remapping
|
||||
pen_t * shadow_table; // table for looking up a shadowed pen
|
||||
bitmap_t * priority_bitmap; // priority bitmap
|
||||
bitmap_t priority_bitmap; // priority bitmap
|
||||
|
||||
// debugger-related information
|
||||
UINT32 debug_flags; // the current debug flags
|
||||
|
@ -210,17 +210,17 @@ INLINE void add_and_clamp_track(ldcore_data *ldcore, INT32 delta)
|
||||
given color pattern
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void fillbitmap_yuy16(bitmap_t *bitmap, UINT8 yval, UINT8 cr, UINT8 cb)
|
||||
INLINE void fillbitmap_yuy16(bitmap_t &bitmap, UINT8 yval, UINT8 cr, UINT8 cb)
|
||||
{
|
||||
UINT16 color0 = (yval << 8) | cb;
|
||||
UINT16 color1 = (yval << 8) | cr;
|
||||
int x, y;
|
||||
|
||||
/* write 32 bits of color (2 pixels at a time) */
|
||||
for (y = 0; y < bitmap->height(); y++)
|
||||
for (y = 0; y < bitmap.height(); y++)
|
||||
{
|
||||
UINT16 *dest = &bitmap->pix16(y);
|
||||
for (x = 0; x < bitmap->width() / 2; x++)
|
||||
UINT16 *dest = &bitmap.pix16(y);
|
||||
for (x = 0; x < bitmap.width() / 2; x++)
|
||||
{
|
||||
*dest++ = color0;
|
||||
*dest++ = color1;
|
||||
@ -903,7 +903,7 @@ static void process_track_data(device_t *device)
|
||||
|
||||
/* render the display if present */
|
||||
if (ldcore->avconfig.video != NULL && ldcore->intf.overlay != NULL)
|
||||
(*ldcore->intf.overlay)(ld, ldcore->avconfig.video);
|
||||
(*ldcore->intf.overlay)(ld, *ldcore->avconfig.video);
|
||||
|
||||
/* pass the audio to the callback */
|
||||
if (ldcore->config.audio != NULL)
|
||||
@ -1201,11 +1201,11 @@ SCREEN_UPDATE( laserdisc )
|
||||
/* scale the cliprect to the overlay size and then call the update callback */
|
||||
clip.min_x = ldcore->config.overclip_min_x;
|
||||
clip.max_x = ldcore->config.overclip_max_x;
|
||||
clip.min_y = cliprect.min_y * overbitmap->height() / bitmap->height();
|
||||
clip.min_y = cliprect.min_y * overbitmap->height() / bitmap.height();
|
||||
if (cliprect.min_y == visarea.min_y)
|
||||
clip.min_y = MIN(clip.min_y, ldcore->config.overclip_min_y);
|
||||
clip.max_y = (cliprect.max_y + 1) * overbitmap->height() / bitmap->height() - 1;
|
||||
(*ldcore->config.overupdate)(screen, overbitmap, clip);
|
||||
clip.max_y = (cliprect.max_y + 1) * overbitmap->height() / bitmap.height() - 1;
|
||||
(*ldcore->config.overupdate)(screen, *overbitmap, clip);
|
||||
}
|
||||
|
||||
/* if this is the last update, do the rendering */
|
||||
@ -1373,7 +1373,7 @@ static void init_video(device_t *device)
|
||||
|
||||
/* first allocate a YUY16 bitmap at 2x the height */
|
||||
frame->bitmap = auto_alloc(device->machine(), bitmap_t(ldcore->width, ldcore->height * 2, BITMAP_FORMAT_YUY16));
|
||||
fillbitmap_yuy16(frame->bitmap, 40, 109, 240);
|
||||
fillbitmap_yuy16(*frame->bitmap, 40, 109, 240);
|
||||
|
||||
/* make a copy of the bitmap that clips out the VBI and horizontal blanking areas */
|
||||
frame->visbitmap = auto_alloc(device->machine(), bitmap_t(&frame->bitmap->pix16(44, frame->bitmap->width() * 8 / 720),
|
||||
@ -1384,7 +1384,7 @@ static void init_video(device_t *device)
|
||||
|
||||
/* allocate an empty frame of the same size */
|
||||
ldcore->emptyframe = auto_bitmap_alloc(device->machine(), ldcore->width, ldcore->height * 2, BITMAP_FORMAT_YUY16);
|
||||
fillbitmap_yuy16(ldcore->emptyframe, 0, 128, 128);
|
||||
fillbitmap_yuy16(*ldcore->emptyframe, 0, 128, 128);
|
||||
|
||||
/* allocate texture for rendering */
|
||||
ldcore->videoenable = TRUE;
|
||||
|
@ -135,7 +135,7 @@ struct _laserdisc_state
|
||||
typedef void (*laserdisc_init_func)(laserdisc_state *ld);
|
||||
typedef void (*laserdisc_vsync_func)(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
|
||||
typedef INT32 (*laserdisc_update_func)(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
|
||||
typedef void (*laserdisc_overlay_func)(laserdisc_state *ld, bitmap_t *bitmap);
|
||||
typedef void (*laserdisc_overlay_func)(laserdisc_state *ld, bitmap_t &bitmap);
|
||||
typedef void (*laserdisc_w_func)(laserdisc_state *ld, UINT8 prev, UINT8 newval);
|
||||
typedef UINT8 (*laserdisc_r_func)(laserdisc_state *ld);
|
||||
|
||||
|
@ -129,7 +129,7 @@ struct _ldplayer_data
|
||||
static void pr8210_init(laserdisc_state *ld);
|
||||
static void pr8210_vsync(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
|
||||
static INT32 pr8210_update(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
|
||||
static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap);
|
||||
static void pr8210_overlay(laserdisc_state *ld, bitmap_t &bitmap);
|
||||
static void pr8210_control_w(laserdisc_state *ld, UINT8 prev, UINT8 data);
|
||||
|
||||
static TIMER_CALLBACK( vsync_off );
|
||||
@ -143,9 +143,9 @@ static WRITE8_HANDLER( pr8210_port2_w );
|
||||
static READ8_HANDLER( pr8210_t0_r );
|
||||
static READ8_HANDLER( pr8210_t1_r );
|
||||
|
||||
static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, float xstart);
|
||||
static void overlay_erase(bitmap_t *bitmap, float xstart, float xend);
|
||||
static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart);
|
||||
static void overlay_draw_group(bitmap_t &bitmap, const UINT8 *text, int count, float xstart);
|
||||
static void overlay_erase(bitmap_t &bitmap, float xstart, float xend);
|
||||
static void overlay_draw_char(bitmap_t &bitmap, UINT8 ch, float xstart);
|
||||
|
||||
static void simutrek_init(laserdisc_state *ld);
|
||||
static void simutrek_vsync(laserdisc_state *ld, const vbi_metadata *vbi, int fieldnum, attotime curtime);
|
||||
@ -413,7 +413,7 @@ static INT32 pr8210_update(laserdisc_state *ld, const vbi_metadata *vbi, int fie
|
||||
player data
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void pr8210_overlay(laserdisc_state *ld, bitmap_t *bitmap)
|
||||
static void pr8210_overlay(laserdisc_state *ld, bitmap_t &bitmap)
|
||||
{
|
||||
ldplayer_data *player = ld->player;
|
||||
|
||||
@ -881,7 +881,7 @@ static READ8_HANDLER( pr8210_t1_r )
|
||||
characters
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, float xstart)
|
||||
static void overlay_draw_group(bitmap_t &bitmap, const UINT8 *text, int count, float xstart)
|
||||
{
|
||||
int skip = TRUE;
|
||||
int x;
|
||||
@ -904,15 +904,15 @@ static void overlay_draw_group(bitmap_t *bitmap, const UINT8 *text, int count, f
|
||||
where the text overlay will be displayed
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void overlay_erase(bitmap_t *bitmap, float xstart, float xend)
|
||||
static void overlay_erase(bitmap_t &bitmap, float xstart, float xend)
|
||||
{
|
||||
UINT32 xmin = (UINT32)(xstart * 256.0f * (float)bitmap->width());
|
||||
UINT32 xmax = (UINT32)(xend * 256.0f * (float)bitmap->width());
|
||||
UINT32 xmin = (UINT32)(xstart * 256.0f * (float)bitmap.width());
|
||||
UINT32 xmax = (UINT32)(xend * 256.0f * (float)bitmap.width());
|
||||
UINT32 x, y;
|
||||
|
||||
for (y = OVERLAY_Y; y < (OVERLAY_Y + (OVERLAY_Y_PIXELS + 2) * OVERLAY_PIXEL_HEIGHT); y++)
|
||||
{
|
||||
UINT16 *dest = &bitmap->pix16(y, xmin >> 8);
|
||||
UINT16 *dest = &bitmap.pix16(y, xmin >> 8);
|
||||
UINT16 ymin, ymax, yres;
|
||||
|
||||
ymax = *dest >> 8;
|
||||
@ -942,10 +942,10 @@ static void overlay_erase(bitmap_t *bitmap, float xstart, float xend)
|
||||
of the text overlay
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart)
|
||||
static void overlay_draw_char(bitmap_t &bitmap, UINT8 ch, float xstart)
|
||||
{
|
||||
UINT32 xminbase = (UINT32)(xstart * 256.0f * (float)bitmap->width());
|
||||
UINT32 xsize = (UINT32)(OVERLAY_PIXEL_WIDTH * 256.0f * (float)bitmap->width());
|
||||
UINT32 xminbase = (UINT32)(xstart * 256.0f * (float)bitmap.width());
|
||||
UINT32 xsize = (UINT32)(OVERLAY_PIXEL_WIDTH * 256.0f * (float)bitmap.width());
|
||||
const UINT8 *chdataptr = &text_bitmap[ch & 0x3f][0];
|
||||
UINT32 x, y, xx, yy;
|
||||
|
||||
@ -961,7 +961,7 @@ static void overlay_draw_char(bitmap_t *bitmap, UINT8 ch, float xstart)
|
||||
UINT32 xmax = xmin + xsize;
|
||||
for (yy = 0; yy < OVERLAY_PIXEL_HEIGHT; yy++)
|
||||
{
|
||||
UINT16 *dest = &bitmap->pix16(OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8);
|
||||
UINT16 *dest = &bitmap.pix16(OVERLAY_Y + (y + 1) * OVERLAY_PIXEL_HEIGHT + yy, xmin >> 8);
|
||||
UINT16 ymin, ymax, yres;
|
||||
|
||||
ymax = 0xff;
|
||||
|
@ -449,11 +449,11 @@ static UINT32 s3c24xx_lcd_dma_read_bits( device_t *device, int count)
|
||||
static void s3c24xx_lcd_render_tpal( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 color = s3c24xx_get_color_tpal( device);
|
||||
for (int y = s3c24xx->lcd.vpos_min; y <= s3c24xx->lcd.vpos_max; y++)
|
||||
{
|
||||
UINT32 *scanline = &bitmap->pix32(y, s3c24xx->lcd.hpos_min);
|
||||
UINT32 *scanline = &bitmap.pix32(y, s3c24xx->lcd.hpos_min);
|
||||
for (int x = s3c24xx->lcd.hpos_min; x <= s3c24xx->lcd.hpos_max; x++)
|
||||
{
|
||||
*scanline++ = color;
|
||||
@ -464,8 +464,8 @@ static void s3c24xx_lcd_render_tpal( device_t *device)
|
||||
static void s3c24xx_lcd_render_stn_01( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -487,7 +487,7 @@ static void s3c24xx_lcd_render_stn_01( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -496,8 +496,8 @@ static void s3c24xx_lcd_render_stn_01( device_t *device)
|
||||
static void s3c24xx_lcd_render_stn_02( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -511,7 +511,7 @@ static void s3c24xx_lcd_render_stn_02( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -520,8 +520,8 @@ static void s3c24xx_lcd_render_stn_02( device_t *device)
|
||||
static void s3c24xx_lcd_render_stn_04( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -535,7 +535,7 @@ static void s3c24xx_lcd_render_stn_04( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -544,8 +544,8 @@ static void s3c24xx_lcd_render_stn_04( device_t *device)
|
||||
static void s3c24xx_lcd_render_stn_08( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -559,7 +559,7 @@ static void s3c24xx_lcd_render_stn_08( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -568,8 +568,8 @@ static void s3c24xx_lcd_render_stn_08( device_t *device)
|
||||
static void s3c24xx_lcd_render_stn_12_p( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
*scanline++ = s3c24xx_get_color_stn_12( device, s3c24xx_lcd_dma_read_bits( device, 12));
|
||||
@ -579,7 +579,7 @@ static void s3c24xx_lcd_render_stn_12_p( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -587,8 +587,8 @@ static void s3c24xx_lcd_render_stn_12_p( device_t *device)
|
||||
static void s3c24xx_lcd_render_stn_12_u( device_t *device) // not tested
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -602,7 +602,7 @@ static void s3c24xx_lcd_render_stn_12_u( device_t *device) // not tested
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -611,8 +611,8 @@ static void s3c24xx_lcd_render_stn_12_u( device_t *device) // not tested
|
||||
static void s3c24xx_lcd_render_tft_01( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -626,7 +626,7 @@ static void s3c24xx_lcd_render_tft_01( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -635,8 +635,8 @@ static void s3c24xx_lcd_render_tft_01( device_t *device)
|
||||
static void s3c24xx_lcd_render_tft_02( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -650,7 +650,7 @@ static void s3c24xx_lcd_render_tft_02( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -659,8 +659,8 @@ static void s3c24xx_lcd_render_tft_02( device_t *device)
|
||||
static void s3c24xx_lcd_render_tft_04( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -674,7 +674,7 @@ static void s3c24xx_lcd_render_tft_04( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -683,8 +683,8 @@ static void s3c24xx_lcd_render_tft_04( device_t *device)
|
||||
static void s3c24xx_lcd_render_tft_08( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -698,7 +698,7 @@ static void s3c24xx_lcd_render_tft_08( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -707,8 +707,8 @@ static void s3c24xx_lcd_render_tft_08( device_t *device)
|
||||
static void s3c24xx_lcd_render_tft_16( device_t *device)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
bitmap_t *bitmap = s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
bitmap_t &bitmap = *s3c24xx->lcd.bitmap[0];
|
||||
UINT32 *scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
UINT32 data = s3c24xx_lcd_dma_read( device);
|
||||
@ -722,7 +722,7 @@ static void s3c24xx_lcd_render_tft_16( device_t *device)
|
||||
s3c24xx->lcd.vpos++;
|
||||
if (s3c24xx->lcd.vpos > s3c24xx->lcd.vpos_max) s3c24xx->lcd.vpos = s3c24xx->lcd.vpos_min;
|
||||
s3c24xx->lcd.hpos = s3c24xx->lcd.hpos_min;
|
||||
scanline = &bitmap->pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
scanline = &bitmap.pix32(s3c24xx->lcd.vpos, s3c24xx->lcd.hpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -781,14 +781,14 @@ static void s3c24xx_video_start( device_t *device, running_machine &machine)
|
||||
s3c24xx->lcd.bitmap[1] = screen->alloc_compatible_bitmap();
|
||||
}
|
||||
|
||||
static void bitmap_blend( bitmap_t *bitmap_dst, bitmap_t *bitmap_src_1, bitmap_t *bitmap_src_2)
|
||||
static void bitmap_blend( bitmap_t &bitmap_dst, bitmap_t &bitmap_src_1, bitmap_t &bitmap_src_2)
|
||||
{
|
||||
for (int y = 0; y < bitmap_dst->height(); y++)
|
||||
for (int y = 0; y < bitmap_dst.height(); y++)
|
||||
{
|
||||
UINT32 *line0 = &bitmap_src_1->pix32(y);
|
||||
UINT32 *line1 = &bitmap_src_2->pix32(y);
|
||||
UINT32 *line2 = &bitmap_dst->pix32(y);
|
||||
for (int x = 0; x < bitmap_dst->width(); x++)
|
||||
UINT32 *line0 = &bitmap_src_1.pix32(y);
|
||||
UINT32 *line1 = &bitmap_src_2.pix32(y);
|
||||
UINT32 *line2 = &bitmap_dst.pix32(y);
|
||||
for (int x = 0; x < bitmap_dst.width(); x++)
|
||||
{
|
||||
UINT32 color0 = line0[x];
|
||||
UINT32 color1 = line1[x];
|
||||
@ -806,19 +806,19 @@ static void bitmap_blend( bitmap_t *bitmap_dst, bitmap_t *bitmap_src_1, bitmap_t
|
||||
}
|
||||
}
|
||||
|
||||
static UINT32 s3c24xx_video_update( device_t *device, screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
static UINT32 s3c24xx_video_update( device_t *device, screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
s3c24xx_t *s3c24xx = get_token( device);
|
||||
if (s3c24xx->lcd.regs.lcdcon1 & (1 << 0))
|
||||
{
|
||||
if (s3c24xx->lcd.framerate >= 1195)
|
||||
{
|
||||
bitmap_blend( bitmap, s3c24xx->lcd.bitmap[0], s3c24xx->lcd.bitmap[1]);
|
||||
copybitmap( s3c24xx->lcd.bitmap[1], s3c24xx->lcd.bitmap[0], 0, 0, 0, 0, cliprect);
|
||||
bitmap_blend( bitmap, *s3c24xx->lcd.bitmap[0], *s3c24xx->lcd.bitmap[1]);
|
||||
copybitmap( *s3c24xx->lcd.bitmap[1], *s3c24xx->lcd.bitmap[0], 0, 0, 0, 0, cliprect);
|
||||
}
|
||||
else
|
||||
{
|
||||
copybitmap( bitmap, s3c24xx->lcd.bitmap[0], 0, 0, 0, 0, cliprect);
|
||||
copybitmap( bitmap, *s3c24xx->lcd.bitmap[0], 0, 0, 0, 0, cliprect);
|
||||
}
|
||||
s3c24xx_lcd_dma_init( device);
|
||||
}
|
||||
|
@ -23,8 +23,8 @@
|
||||
/* utilities */
|
||||
static void resample_argb_bitmap_average(UINT32 *dest, UINT32 drowpixels, UINT32 dwidth, UINT32 dheight, const UINT32 *source, UINT32 srowpixels, UINT32 swidth, UINT32 sheight, const render_color *color, UINT32 dx, UINT32 dy);
|
||||
static void resample_argb_bitmap_bilinear(UINT32 *dest, UINT32 drowpixels, UINT32 dwidth, UINT32 dheight, const UINT32 *source, UINT32 srowpixels, UINT32 swidth, UINT32 sheight, const render_color *color, UINT32 dx, UINT32 dy);
|
||||
static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasalpha);
|
||||
static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasalpha);
|
||||
static void copy_png_to_bitmap(bitmap_t &bitmap, const png_info *png, bool *hasalpha);
|
||||
static void copy_png_alpha_to_bitmap(bitmap_t &bitmap, const png_info *png, bool *hasalpha);
|
||||
|
||||
|
||||
|
||||
@ -610,7 +610,7 @@ bitmap_t *render_load_png(emu_file &file, const char *dirname, const char *filen
|
||||
{
|
||||
bitmap = global_alloc(bitmap_t(png.width, png.height, BITMAP_FORMAT_ARGB32));
|
||||
if (bitmap != NULL)
|
||||
copy_png_to_bitmap(bitmap, &png, hasalpha);
|
||||
copy_png_to_bitmap(*bitmap, &png, hasalpha);
|
||||
}
|
||||
|
||||
/* alpha case */
|
||||
@ -619,7 +619,7 @@ bitmap_t *render_load_png(emu_file &file, const char *dirname, const char *filen
|
||||
if (png.width == alphadest->width() && png.height == alphadest->height())
|
||||
{
|
||||
bitmap = alphadest;
|
||||
copy_png_alpha_to_bitmap(bitmap, &png, hasalpha);
|
||||
copy_png_alpha_to_bitmap(*bitmap, &png, hasalpha);
|
||||
}
|
||||
}
|
||||
|
||||
@ -634,7 +634,7 @@ bitmap_t *render_load_png(emu_file &file, const char *dirname, const char *filen
|
||||
bitmap
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasalpha)
|
||||
static void copy_png_to_bitmap(bitmap_t &bitmap, const png_info *png, bool *hasalpha)
|
||||
{
|
||||
UINT8 accumalpha = 0xff;
|
||||
UINT8 *src;
|
||||
@ -651,7 +651,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
|
||||
/* determine alpha and expand to 32bpp */
|
||||
UINT8 alpha = (*src < png->num_trans) ? png->trans[*src] : 0xff;
|
||||
accumalpha &= alpha;
|
||||
bitmap->pix32(y, x) = MAKE_ARGB(alpha, png->palette[*src * 3], png->palette[*src * 3 + 1], png->palette[*src * 3 + 2]);
|
||||
bitmap.pix32(y, x) = MAKE_ARGB(alpha, png->palette[*src * 3], png->palette[*src * 3 + 1], png->palette[*src * 3 + 2]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -662,7 +662,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
|
||||
src = png->image;
|
||||
for (y = 0; y < png->height; y++)
|
||||
for (x = 0; x < png->width; x++, src++)
|
||||
bitmap->pix32(y, x) = MAKE_ARGB(0xff, *src, *src, *src);
|
||||
bitmap.pix32(y, x) = MAKE_ARGB(0xff, *src, *src, *src);
|
||||
}
|
||||
|
||||
/* handle 32bpp non-alpha case */
|
||||
@ -672,7 +672,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
|
||||
src = png->image;
|
||||
for (y = 0; y < png->height; y++)
|
||||
for (x = 0; x < png->width; x++, src += 3)
|
||||
bitmap->pix32(y, x) = MAKE_ARGB(0xff, src[0], src[1], src[2]);
|
||||
bitmap.pix32(y, x) = MAKE_ARGB(0xff, src[0], src[1], src[2]);
|
||||
}
|
||||
|
||||
/* handle 32bpp alpha case */
|
||||
@ -684,7 +684,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
|
||||
for (x = 0; x < png->width; x++, src += 4)
|
||||
{
|
||||
accumalpha &= src[3];
|
||||
bitmap->pix32(y, x) = MAKE_ARGB(src[3], src[0], src[1], src[2]);
|
||||
bitmap.pix32(y, x) = MAKE_ARGB(src[3], src[0], src[1], src[2]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -699,7 +699,7 @@ static void copy_png_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasa
|
||||
to the alpha channel of a bitmap
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool *hasalpha)
|
||||
static void copy_png_alpha_to_bitmap(bitmap_t &bitmap, const png_info *png, bool *hasalpha)
|
||||
{
|
||||
UINT8 accumalpha = 0xff;
|
||||
UINT8 *src;
|
||||
@ -713,10 +713,10 @@ static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool
|
||||
for (y = 0; y < png->height; y++)
|
||||
for (x = 0; x < png->width; x++, src++)
|
||||
{
|
||||
rgb_t pixel = bitmap->pix32(y, x);
|
||||
rgb_t pixel = bitmap.pix32(y, x);
|
||||
UINT8 alpha = compute_brightness(MAKE_RGB(png->palette[*src * 3], png->palette[*src * 3 + 1], png->palette[*src * 3 + 2]));
|
||||
accumalpha &= alpha;
|
||||
bitmap->pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
|
||||
bitmap.pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
|
||||
}
|
||||
}
|
||||
|
||||
@ -728,9 +728,9 @@ static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool
|
||||
for (y = 0; y < png->height; y++)
|
||||
for (x = 0; x < png->width; x++, src++)
|
||||
{
|
||||
rgb_t pixel = bitmap->pix32(y, x);
|
||||
rgb_t pixel = bitmap.pix32(y, x);
|
||||
accumalpha &= *src;
|
||||
bitmap->pix32(y, x) = MAKE_ARGB(*src, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
|
||||
bitmap.pix32(y, x) = MAKE_ARGB(*src, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
|
||||
}
|
||||
}
|
||||
|
||||
@ -742,10 +742,10 @@ static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool
|
||||
for (y = 0; y < png->height; y++)
|
||||
for (x = 0; x < png->width; x++, src += 3)
|
||||
{
|
||||
rgb_t pixel = bitmap->pix32(y, x);
|
||||
rgb_t pixel = bitmap.pix32(y, x);
|
||||
UINT8 alpha = compute_brightness(MAKE_RGB(src[0], src[1], src[2]));
|
||||
accumalpha &= alpha;
|
||||
bitmap->pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
|
||||
bitmap.pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
|
||||
}
|
||||
}
|
||||
|
||||
@ -757,10 +757,10 @@ static void copy_png_alpha_to_bitmap(bitmap_t *bitmap, const png_info *png, bool
|
||||
for (y = 0; y < png->height; y++)
|
||||
for (x = 0; x < png->width; x++, src += 4)
|
||||
{
|
||||
rgb_t pixel = bitmap->pix32(y, x);
|
||||
rgb_t pixel = bitmap.pix32(y, x);
|
||||
UINT8 alpha = compute_brightness(MAKE_RGB(src[0], src[1], src[2]));
|
||||
accumalpha &= alpha;
|
||||
bitmap->pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
|
||||
bitmap.pix32(y, x) = MAKE_ARGB(alpha, RGB_RED(pixel), RGB_GREEN(pixel), RGB_BLUE(pixel));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -979,14 +979,11 @@ void screen_device::finalize_burnin()
|
||||
scaledvis.max_y = m_visarea.max_y * m_burnin->height() / m_height;
|
||||
|
||||
// wrap a bitmap around the subregion we care about
|
||||
bitmap_t *finalmap = auto_alloc(machine(), bitmap_t(scaledvis.max_x + 1 - scaledvis.min_x,
|
||||
scaledvis.max_y + 1 - scaledvis.min_y,
|
||||
BITMAP_FORMAT_ARGB32));
|
||||
|
||||
bitmap_t finalmap(scaledvis.max_x + 1 - scaledvis.min_x, scaledvis.max_y + 1 - scaledvis.min_y, BITMAP_FORMAT_ARGB32);
|
||||
int srcwidth = m_burnin->width();
|
||||
int srcheight = m_burnin->height();
|
||||
int dstwidth = finalmap->width();
|
||||
int dstheight = finalmap->height();
|
||||
int dstwidth = finalmap.width();
|
||||
int dstheight = finalmap.height();
|
||||
int xstep = (srcwidth << 16) / dstwidth;
|
||||
int ystep = (srcheight << 16) / dstheight;
|
||||
|
||||
@ -1010,7 +1007,7 @@ void screen_device::finalize_burnin()
|
||||
for (int y = 0, srcy = 0; y < dstheight; y++, srcy += ystep)
|
||||
{
|
||||
UINT64 *src = &m_burnin->pix64(srcy >> 16);
|
||||
UINT32 *dst = &finalmap->pix32(y);
|
||||
UINT32 *dst = &finalmap.pix32(y);
|
||||
for (int x = 0, srcx = 0; x < dstwidth; x++, srcx += xstep)
|
||||
{
|
||||
int brightness = (UINT64)(maxval - src[srcx >> 16]) * 255 / (maxval - minval);
|
||||
@ -1074,7 +1071,7 @@ void screen_device::load_effect_overlay(const char *filename)
|
||||
bool screen_device::screen_update(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (m_screen_update != NULL) {
|
||||
return (*m_screen_update)(*this, &bitmap, cliprect);
|
||||
return (*m_screen_update)(*this, bitmap, cliprect);
|
||||
} else {
|
||||
return machine().driver_data<driver_device>()->screen_update(*this, bitmap, cliprect);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ class screen_device;
|
||||
// callback that is called to notify of a change in the VBLANK state
|
||||
typedef delegate<void (screen_device &, bool)> vblank_state_delegate;
|
||||
|
||||
typedef UINT32 (*screen_update_func)(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect);
|
||||
typedef UINT32 (*screen_update_func)(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
|
||||
typedef void (*screen_eof_func)(screen_device &screen);
|
||||
|
||||
|
||||
@ -255,7 +255,7 @@ extern const device_type SCREEN;
|
||||
//**************************************************************************
|
||||
|
||||
#define SCREEN_UPDATE_NAME(name) screen_update_##name
|
||||
#define SCREEN_UPDATE(name) UINT32 SCREEN_UPDATE_NAME(name)(screen_device &screen, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
#define SCREEN_UPDATE(name) UINT32 SCREEN_UPDATE_NAME(name)(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
|
||||
#define SCREEN_UPDATE_CALL(name) SCREEN_UPDATE_NAME(name)(screen, bitmap, cliprect)
|
||||
|
||||
#define SCREEN_EOF_NAME(name) screen_eof_##name
|
||||
|
@ -470,15 +470,15 @@ WRITE_LINE_MEMBER( cdp1864_device::evs_w )
|
||||
// update_screen -
|
||||
//-------------------------------------------------
|
||||
|
||||
void cdp1864_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void cdp1864_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (m_disp)
|
||||
{
|
||||
copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
|
||||
copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, cliprect);
|
||||
m_bitmap->fill(CDP1864_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8, cliprect);
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap->fill(get_black_pen(machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(machine()), cliprect);
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( aoe_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( evs_w );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -539,7 +539,7 @@ void cdp1869_device::sound_stream_update(sound_stream &stream, stream_sample_t *
|
||||
// draw_line - draw character line
|
||||
//-------------------------------------------------
|
||||
|
||||
void cdp1869_device::draw_line(bitmap_t *bitmap, const rectangle &rect, int x, int y, UINT8 data, int color)
|
||||
void cdp1869_device::draw_line(bitmap_t &bitmap, const rectangle &rect, int x, int y, UINT8 data, int color)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -549,20 +549,20 @@ void cdp1869_device::draw_line(bitmap_t *bitmap, const rectangle &rect, int x, i
|
||||
{
|
||||
if (data & 0x80)
|
||||
{
|
||||
bitmap->pix16(y, x) = color;
|
||||
bitmap.pix16(y, x) = color;
|
||||
|
||||
if (!m_fresvert)
|
||||
{
|
||||
bitmap->pix16(y + 1, x) = color;
|
||||
bitmap.pix16(y + 1, x) = color;
|
||||
}
|
||||
|
||||
if (!m_freshorz)
|
||||
{
|
||||
bitmap->pix16(y, x + 1) = color;
|
||||
bitmap.pix16(y, x + 1) = color;
|
||||
|
||||
if (!m_fresvert)
|
||||
{
|
||||
bitmap->pix16(y + 1, x + 1) = color;
|
||||
bitmap.pix16(y + 1, x + 1) = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -583,7 +583,7 @@ void cdp1869_device::draw_line(bitmap_t *bitmap, const rectangle &rect, int x, i
|
||||
// draw_char - draw character
|
||||
//-------------------------------------------------
|
||||
|
||||
void cdp1869_device::draw_char(bitmap_t *bitmap, const rectangle &rect, int x, int y, UINT16 pma)
|
||||
void cdp1869_device::draw_char(bitmap_t &bitmap, const rectangle &rect, int x, int y, UINT16 pma)
|
||||
{
|
||||
UINT8 pmd = read_page_ram_byte(pma);
|
||||
|
||||
@ -907,7 +907,7 @@ READ_LINE_MEMBER( cdp1869_device::pal_ntsc_r )
|
||||
// update_screen - update screen
|
||||
//-------------------------------------------------
|
||||
|
||||
void cdp1869_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void cdp1869_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
rectangle screen_rect, outer;
|
||||
|
||||
@ -935,7 +935,7 @@ void cdp1869_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
}
|
||||
|
||||
outer &= cliprect;
|
||||
bitmap->fill(m_bkg, outer);
|
||||
bitmap.fill(m_bkg, outer);
|
||||
|
||||
if (!m_dispoff)
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ public:
|
||||
DECLARE_READ_LINE_MEMBER( predisplay_r );
|
||||
DECLARE_READ_LINE_MEMBER( pal_ntsc_r );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
@ -260,8 +260,8 @@ protected:
|
||||
inline int get_pen(int ccb0, int ccb1, int pcb);
|
||||
|
||||
void initialize_palette();
|
||||
void draw_line(bitmap_t *bitmap, const rectangle &rect, int x, int y, UINT8 data, int color);
|
||||
void draw_char(bitmap_t *bitmap, const rectangle &rect, int x, int y, UINT16 pma);
|
||||
void draw_line(bitmap_t &bitmap, const rectangle &rect, int x, int y, UINT8 data, int color);
|
||||
void draw_char(bitmap_t &bitmap, const rectangle &rect, int x, int y, UINT16 pma);
|
||||
|
||||
private:
|
||||
devcb_resolved_read_line m_in_pal_ntsc_func;
|
||||
|
@ -509,11 +509,11 @@ void mos6560_raster_interrupt_gen( device_t *device )
|
||||
main screen bitmap
|
||||
-------------------------------------------------*/
|
||||
|
||||
UINT32 mos6560_video_update( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
|
||||
UINT32 mos6560_video_update( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
mos6560_state *mos6560 = get_safe_token(device);
|
||||
|
||||
copybitmap(bitmap, mos6560->bitmap, 0, 0, 0, 0, cliprect);
|
||||
copybitmap(bitmap, *mos6560->bitmap, 0, 0, 0, 0, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ WRITE8_DEVICE_HANDLER( mos6560_port_w );
|
||||
READ8_DEVICE_HANDLER( mos6560_port_r );
|
||||
|
||||
void mos6560_raster_interrupt_gen( device_t *device );
|
||||
UINT32 mos6560_video_update( device_t *device, bitmap_t *bitmap, const rectangle &cliprect );
|
||||
UINT32 mos6560_video_update( device_t *device, bitmap_t &bitmap, const rectangle &cliprect );
|
||||
|
||||
|
||||
#endif /* __MOS6560_H__ */
|
||||
|
@ -159,7 +159,7 @@ static UINT8 tile_draw(tilemap_t *tmap, const UINT8 *pendata, UINT32 x0, UINT32
|
||||
static UINT8 tile_apply_bitmask(tilemap_t *tmap, const UINT8 *maskdata, UINT32 x0, UINT32 y0, UINT8 category, UINT8 flags);
|
||||
|
||||
/* drawing helpers */
|
||||
static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t *dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask);
|
||||
static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t &dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask);
|
||||
static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit, int xpos, int ypos);
|
||||
static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
|
||||
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound);
|
||||
@ -304,7 +304,7 @@ void tilemap_init(running_machine &machine)
|
||||
|
||||
if (screen_width != 0 && screen_height != 0)
|
||||
{
|
||||
machine.priority_bitmap = auto_bitmap_alloc(machine, screen_width, screen_height, BITMAP_FORMAT_INDEXED8);
|
||||
machine.priority_bitmap.allocate(screen_width, screen_height, BITMAP_FORMAT_INDEXED8);
|
||||
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(tilemap_exit), &machine));
|
||||
}
|
||||
}
|
||||
@ -776,11 +776,11 @@ int tilemap_get_scrolly(tilemap_t *tmap, int which)
|
||||
(updated) internal pixmap for a tilemap
|
||||
-------------------------------------------------*/
|
||||
|
||||
bitmap_t *tilemap_get_pixmap(tilemap_t *tmap)
|
||||
bitmap_t &tilemap_get_pixmap(tilemap_t *tmap)
|
||||
{
|
||||
/* ensure all the tiles are up-to-date and then return the pixmap */
|
||||
pixmap_update(tmap);
|
||||
return tmap->pixmap;
|
||||
return *tmap->pixmap;
|
||||
}
|
||||
|
||||
|
||||
@ -789,11 +789,11 @@ bitmap_t *tilemap_get_pixmap(tilemap_t *tmap)
|
||||
(updated) internal flagsmap for a tilemap
|
||||
-------------------------------------------------*/
|
||||
|
||||
bitmap_t *tilemap_get_flagsmap(tilemap_t *tmap)
|
||||
bitmap_t &tilemap_get_flagsmap(tilemap_t *tmap)
|
||||
{
|
||||
/* ensure all the tiles are up-to-date and then return the flagsmap */
|
||||
pixmap_update(tmap);
|
||||
return tmap->flagsmap;
|
||||
return *tmap->flagsmap;
|
||||
}
|
||||
|
||||
|
||||
@ -821,7 +821,7 @@ UINT8 *tilemap_get_tile_flags(tilemap_t *tmap)
|
||||
priority/priority_mask to the priority bitmap
|
||||
-------------------------------------------------*/
|
||||
|
||||
void tilemap_draw_primask(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority, UINT8 priority_mask)
|
||||
void tilemap_draw_primask(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority, UINT8 priority_mask)
|
||||
{
|
||||
UINT32 width, height;
|
||||
blit_parameters blit;
|
||||
@ -945,7 +945,7 @@ g_profiler.stop();
|
||||
priority_mask to the priority bitmap
|
||||
-------------------------------------------------*/
|
||||
|
||||
void tilemap_draw_roz_primask(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap,
|
||||
void tilemap_draw_roz_primask(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap,
|
||||
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
|
||||
int wraparound, UINT32 flags, UINT8 priority, UINT8 priority_mask)
|
||||
{
|
||||
@ -1025,14 +1025,14 @@ void tilemap_size_by_index(running_machine &machine, int number, UINT32 *width,
|
||||
priority)
|
||||
-------------------------------------------------*/
|
||||
|
||||
void tilemap_draw_by_index(running_machine &machine, bitmap_t *dest, int number, UINT32 scrollx, UINT32 scrolly)
|
||||
void tilemap_draw_by_index(running_machine &machine, bitmap_t &dest, int number, UINT32 scrollx, UINT32 scrolly)
|
||||
{
|
||||
tilemap_t *tmap = indexed_tilemap(machine, number);
|
||||
blit_parameters blit;
|
||||
int xpos,ypos;
|
||||
|
||||
/* set up for the blit, using hard-coded parameters (no priority, etc) */
|
||||
configure_blit_parameters(&blit, tmap, dest, dest->cliprect(), TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0, 0xff);
|
||||
configure_blit_parameters(&blit, tmap, dest, dest.cliprect(), TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0, 0xff);
|
||||
|
||||
/* compute the effective scroll positions */
|
||||
scrollx = tmap->width - scrollx % tmap->width;
|
||||
@ -1516,13 +1516,13 @@ static UINT8 tile_apply_bitmask(tilemap_t *tmap, const UINT8 *maskdata, UINT32 x
|
||||
and indexed drawing code
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t *dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask)
|
||||
static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_t &dest, const rectangle &cliprect, UINT32 flags, UINT8 priority, UINT8 priority_mask)
|
||||
{
|
||||
/* start with nothing */
|
||||
memset(blit, 0, sizeof(*blit));
|
||||
|
||||
/* set the target bitmap */
|
||||
blit->bitmap = dest;
|
||||
blit->bitmap = &dest;
|
||||
blit->cliprect = cliprect;
|
||||
|
||||
/* set the priority code and alpha */
|
||||
@ -1530,7 +1530,7 @@ static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bi
|
||||
blit->alpha = (flags & TILEMAP_DRAW_ALPHA_FLAG) ? (flags >> 24) : 0xff;
|
||||
|
||||
/* if no destination, just render priority */
|
||||
if (dest == NULL)
|
||||
if (!dest.valid())
|
||||
{
|
||||
blit->draw_masked = scanline_draw_masked_null;
|
||||
blit->draw_opaque = scanline_draw_opaque_null;
|
||||
@ -1539,7 +1539,7 @@ static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bi
|
||||
/* otherwise get the appropriate callbacks for the format and flags */
|
||||
else
|
||||
{
|
||||
switch (dest->format())
|
||||
switch (dest.format())
|
||||
{
|
||||
case BITMAP_FORMAT_RGB32:
|
||||
blit->draw_masked = (blit->alpha < 0xff) ? scanline_draw_masked_rgb32_alpha : scanline_draw_masked_rgb32;
|
||||
@ -1598,8 +1598,8 @@ static void configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bi
|
||||
|
||||
static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit, int xpos, int ypos)
|
||||
{
|
||||
bitmap_t *priority_bitmap = tmap->machine().priority_bitmap;
|
||||
bitmap_t *dest = blit->bitmap;
|
||||
bitmap_t &priority_bitmap = tmap->machine().priority_bitmap;
|
||||
bitmap_t &dest = *blit->bitmap;
|
||||
const UINT16 *source_baseaddr;
|
||||
const UINT8 *mask_baseaddr;
|
||||
void *dest_baseaddr = NULL;
|
||||
@ -1622,12 +1622,12 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
|
||||
return;
|
||||
|
||||
/* look up priority and destination base addresses for y1 */
|
||||
priority_baseaddr = &priority_bitmap->pix8(y1, xpos);
|
||||
if (dest != NULL)
|
||||
priority_baseaddr = &priority_bitmap.pix8(y1, xpos);
|
||||
if (dest.valid())
|
||||
{
|
||||
dest_bytespp = dest->bpp() / 8;
|
||||
dest_line_pitch_bytes = dest->rowbytes();
|
||||
dest_baseaddr = dest->raw_pixptr(y1, xpos);
|
||||
dest_bytespp = dest.bpp() / 8;
|
||||
dest_line_pitch_bytes = dest.rowbytes();
|
||||
dest_baseaddr = dest.raw_pixptr(y1, xpos);
|
||||
}
|
||||
|
||||
/* convert screen coordinates to source tilemap coordinates */
|
||||
@ -1711,7 +1711,7 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
|
||||
|
||||
dest0 = (UINT8 *)dest0 + dest_line_pitch_bytes;
|
||||
source0 += tmap->pixmap->rowpixels();
|
||||
pmap0 += priority_bitmap->rowpixels();
|
||||
pmap0 += priority_bitmap.rowpixels();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1726,7 +1726,7 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
|
||||
dest0 = (UINT8 *)dest0 + dest_line_pitch_bytes;
|
||||
source0 += tmap->pixmap->rowpixels();
|
||||
mask0 += tmap->flagsmap->rowpixels();
|
||||
pmap0 += priority_bitmap->rowpixels();
|
||||
pmap0 += priority_bitmap.rowpixels();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1741,7 +1741,7 @@ static void tilemap_draw_instance(tilemap_t *tmap, const blit_parameters *blit,
|
||||
break;
|
||||
|
||||
/* advance to the next row on all our bitmaps */
|
||||
priority_baseaddr += priority_bitmap->rowpixels() * (nexty - y);
|
||||
priority_baseaddr += priority_bitmap.rowpixels() * (nexty - y);
|
||||
source_baseaddr += tmap->pixmap->rowpixels() * (nexty - y);
|
||||
mask_baseaddr += tmap->flagsmap->rowpixels() * (nexty - y);
|
||||
dest_baseaddr = (UINT8 *)dest_baseaddr + dest_line_pitch_bytes * (nexty - y);
|
||||
@ -1778,14 +1778,14 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
|
||||
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound)
|
||||
{
|
||||
const pen_t *clut = &tmap->machine().pens[blit->tilemap_priority_code >> 16];
|
||||
bitmap_t *priority_bitmap = tmap->machine().priority_bitmap;
|
||||
bitmap_t *destbitmap = blit->bitmap;
|
||||
bitmap_t *srcbitmap = tmap->pixmap;
|
||||
bitmap_t *flagsmap = tmap->flagsmap;
|
||||
const int xmask = srcbitmap->width()-1;
|
||||
const int ymask = srcbitmap->height()-1;
|
||||
const int widthshifted = srcbitmap->width() << 16;
|
||||
const int heightshifted = srcbitmap->height() << 16;
|
||||
bitmap_t &priority_bitmap = tmap->machine().priority_bitmap;
|
||||
bitmap_t &destbitmap = *blit->bitmap;
|
||||
bitmap_t &srcbitmap = *tmap->pixmap;
|
||||
bitmap_t &flagsmap = *tmap->flagsmap;
|
||||
const int xmask = srcbitmap.width()-1;
|
||||
const int ymask = srcbitmap.height()-1;
|
||||
const int widthshifted = srcbitmap.width() << 16;
|
||||
const int heightshifted = srcbitmap.height() << 16;
|
||||
UINT32 priority = blit->tilemap_priority_code;
|
||||
UINT8 mask = blit->mask;
|
||||
UINT8 value = blit->value;
|
||||
@ -1801,7 +1801,7 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
|
||||
UINT8 *pri;
|
||||
const UINT16 *src;
|
||||
const UINT8 *maskptr;
|
||||
int destadvance = destbitmap->bpp() / 8;
|
||||
int destadvance = destbitmap.bpp() / 8;
|
||||
|
||||
/* pre-advance based on the cliprect */
|
||||
startx += blit->cliprect.min_x * incxx + blit->cliprect.min_y * incyx;
|
||||
@ -1839,10 +1839,10 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
|
||||
cy = starty >> 16;
|
||||
|
||||
/* get source and priority pointers */
|
||||
pri = &priority_bitmap->pix8(sy, sx);
|
||||
src = &srcbitmap->pix16(cy);
|
||||
maskptr = &flagsmap->pix8(cy);
|
||||
dest = destbitmap->raw_pixptr(sy, sx);
|
||||
pri = &priority_bitmap.pix8(sy, sx);
|
||||
src = &srcbitmap.pix16(cy);
|
||||
maskptr = &flagsmap.pix8(cy);
|
||||
dest = destbitmap.raw_pixptr(sy, sx);
|
||||
|
||||
/* loop over columns */
|
||||
while (x <= ex && cx < widthshifted)
|
||||
@ -1880,16 +1880,16 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
|
||||
cy = starty;
|
||||
|
||||
/* get dest and priority pointers */
|
||||
dest = destbitmap->raw_pixptr(sy, sx);
|
||||
pri = &priority_bitmap->pix8(sy, sx);
|
||||
dest = destbitmap.raw_pixptr(sy, sx);
|
||||
pri = &priority_bitmap.pix8(sy, sx);
|
||||
|
||||
/* loop over columns */
|
||||
while (x <= ex)
|
||||
{
|
||||
/* plot if we match the mask */
|
||||
if ((flagsmap->pix8((cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
|
||||
if ((flagsmap.pix8((cy >> 16) & ymask, (cx >> 16) & xmask) & mask) == value)
|
||||
{
|
||||
ROZ_PLOT_PIXEL(srcbitmap->pix16((cy >> 16) & ymask, (cx >> 16) & xmask));
|
||||
ROZ_PLOT_PIXEL(srcbitmap.pix16((cy >> 16) & ymask, (cx >> 16) & xmask));
|
||||
*pri = (*pri & (priority >> 8)) | priority;
|
||||
}
|
||||
|
||||
@ -1920,17 +1920,17 @@ static void tilemap_draw_roz_core(tilemap_t *tmap, const blit_parameters *blit,
|
||||
cy = starty;
|
||||
|
||||
/* get dest and priority pointers */
|
||||
dest = destbitmap->raw_pixptr(sy, sx);
|
||||
pri = &priority_bitmap->pix8(sy, sx);
|
||||
dest = destbitmap.raw_pixptr(sy, sx);
|
||||
pri = &priority_bitmap.pix8(sy, sx);
|
||||
|
||||
/* loop over columns */
|
||||
while (x <= ex)
|
||||
{
|
||||
/* plot if we're within the bitmap and we match the mask */
|
||||
if (cx < widthshifted && cy < heightshifted)
|
||||
if ((flagsmap->pix8(cy >> 16, cx >> 16) & mask) == value)
|
||||
if ((flagsmap.pix8(cy >> 16, cx >> 16) & mask) == value)
|
||||
{
|
||||
ROZ_PLOT_PIXEL(srcbitmap->pix16(cy >> 16, cx >> 16));
|
||||
ROZ_PLOT_PIXEL(srcbitmap.pix16(cy >> 16, cx >> 16));
|
||||
*pri = (*pri & (priority >> 8)) | priority;
|
||||
}
|
||||
|
||||
|
@ -505,10 +505,10 @@ int tilemap_get_scrolly(tilemap_t *tmap, int col);
|
||||
/* ----- internal map access ----- */
|
||||
|
||||
/* return a pointer to the (updated) internal pixmap for a tilemap */
|
||||
bitmap_t *tilemap_get_pixmap(tilemap_t *tmap);
|
||||
bitmap_t &tilemap_get_pixmap(tilemap_t *tmap);
|
||||
|
||||
/* return a pointer to the (updated) internal flagsmap for a tilemap */
|
||||
bitmap_t *tilemap_get_flagsmap(tilemap_t *tmap);
|
||||
bitmap_t &tilemap_get_flagsmap(tilemap_t *tmap);
|
||||
|
||||
/* return a pointer to the (updated) internal per-tile flags for a tilemap */
|
||||
UINT8 *tilemap_get_tile_flags(tilemap_t *tmap);
|
||||
@ -518,11 +518,11 @@ UINT8 *tilemap_get_tile_flags(tilemap_t *tmap);
|
||||
/* ----- tilemap rendering ----- */
|
||||
|
||||
/* draw a tilemap to the destination with clipping; pixels apply priority/priority_mask to the priority bitmap */
|
||||
void tilemap_draw_primask(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority, UINT8 priority_mask);
|
||||
void tilemap_draw_primask(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority, UINT8 priority_mask);
|
||||
|
||||
/* draw a tilemap to the destination with clipping and arbitrary rotate/zoom; */
|
||||
/* pixels apply priority/priority_mask to the priority bitmap */
|
||||
void tilemap_draw_roz_primask(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap,
|
||||
void tilemap_draw_roz_primask(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap,
|
||||
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
|
||||
int wraparound, UINT32 flags, UINT8 priority, UINT8 priority_mask);
|
||||
|
||||
@ -537,7 +537,7 @@ int tilemap_count(running_machine &machine);
|
||||
void tilemap_size_by_index(running_machine &machine, int number, UINT32 *width, UINT32 *height);
|
||||
|
||||
/* render an indexed tilemap with fixed characteristics (no priority) */
|
||||
void tilemap_draw_by_index(running_machine &machine, bitmap_t *dest, int number, UINT32 scrollx, UINT32 scrolly);
|
||||
void tilemap_draw_by_index(running_machine &machine, bitmap_t &dest, int number, UINT32 scrollx, UINT32 scrolly);
|
||||
|
||||
|
||||
|
||||
@ -595,7 +595,7 @@ INLINE void tilemap_map_pen_to_layer(tilemap_t *tmap, int group, pen_t pen, UINT
|
||||
tilemap_draw_primask
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void tilemap_draw(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority)
|
||||
INLINE void tilemap_draw(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap, UINT32 flags, UINT8 priority)
|
||||
{
|
||||
tilemap_draw_primask(dest, cliprect, tmap, flags, priority, 0xff);
|
||||
}
|
||||
@ -606,7 +606,7 @@ INLINE void tilemap_draw(bitmap_t *dest, const rectangle &cliprect, tilemap_t *t
|
||||
tilemap_draw_roz_primask
|
||||
-------------------------------------------------*/
|
||||
|
||||
INLINE void tilemap_draw_roz(bitmap_t *dest, const rectangle &cliprect, tilemap_t *tmap,
|
||||
INLINE void tilemap_draw_roz(bitmap_t &dest, const rectangle &cliprect, tilemap_t *tmap,
|
||||
UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy,
|
||||
int wraparound, UINT32 flags, UINT8 priority)
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ static void palette_handler(running_machine &machine, render_container *containe
|
||||
|
||||
/* graphics set handling */
|
||||
static void gfxset_handle_keys(running_machine &machine, ui_gfx_state *state, int xcells, int ycells);
|
||||
static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, int index, bitmap_t *bitmap, int dstx, int dsty, int color, int rotate);
|
||||
static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, int index, bitmap_t &bitmap, int dstx, int dsty, int color, int rotate);
|
||||
static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state, int xcells, int ycells, gfx_element *gfx);
|
||||
static void gfxset_handler(running_machine &machine, render_container *container, ui_gfx_state *state);
|
||||
|
||||
@ -736,7 +736,7 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state,
|
||||
|
||||
/* only render if there is data */
|
||||
if (index < gfx->total_elements)
|
||||
gfxset_draw_item(machine, gfx, index, state->bitmap, cellbounds.min_x, cellbounds.min_y, state->gfxset.color[set], state->gfxset.rotate[set]);
|
||||
gfxset_draw_item(machine, gfx, index, *state->bitmap, cellbounds.min_x, cellbounds.min_y, state->gfxset.color[set], state->gfxset.rotate[set]);
|
||||
|
||||
/* otherwise, fill with transparency */
|
||||
else
|
||||
@ -761,7 +761,7 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state,
|
||||
the view
|
||||
-------------------------------------------------*/
|
||||
|
||||
static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, int index, bitmap_t *bitmap, int dstx, int dsty, int color, int rotate)
|
||||
static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, int index, bitmap_t &bitmap, int dstx, int dsty, int color, int rotate)
|
||||
{
|
||||
static const pen_t default_palette[] =
|
||||
{
|
||||
@ -785,7 +785,7 @@ static void gfxset_draw_item(running_machine &machine, const gfx_element *gfx, i
|
||||
/* loop over rows in the cell */
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
UINT32 *dest = &bitmap->pix32(dsty + y, dstx);
|
||||
UINT32 *dest = &bitmap.pix32(dsty + y, dstx);
|
||||
const UINT8 *src = gfx_element_get_data(gfx, index);
|
||||
|
||||
/* loop over columns in the cell */
|
||||
@ -1066,7 +1066,7 @@ static void tilemap_update_bitmap(running_machine &machine, ui_gfx_state *state,
|
||||
/* handle the redraw */
|
||||
if (state->bitmap_dirty)
|
||||
{
|
||||
tilemap_draw_by_index(machine, state->bitmap, state->tilemap.which, state->tilemap.xoffs, state->tilemap.yoffs);
|
||||
tilemap_draw_by_index(machine, *state->bitmap, state->tilemap.which, state->tilemap.xoffs, state->tilemap.yoffs);
|
||||
|
||||
/* reset the texture to force an update */
|
||||
state->texture->set_bitmap(state->bitmap, NULL, screen_texformat, palette);
|
||||
|
@ -345,7 +345,7 @@ void video_manager::save_snapshot(screen_device *screen, emu_file &file)
|
||||
|
||||
// now do the actual work
|
||||
const rgb_t *palette = (machine().palette != NULL) ? palette_entry_list_adjusted(machine().palette) : NULL;
|
||||
png_error error = png_write_bitmap(file, &pnginfo, m_snap_bitmap, machine().total_colors(), palette);
|
||||
png_error error = png_write_bitmap(file, &pnginfo, *m_snap_bitmap, machine().total_colors(), palette);
|
||||
if (error != PNGERR_NONE)
|
||||
mame_printf_error("Error generating PNG for snapshot: png_error = %d\n", error);
|
||||
|
||||
@ -465,7 +465,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
|
||||
{
|
||||
// start the capture
|
||||
int rate = (machine().primary_screen != NULL) ? ATTOSECONDS_TO_HZ(machine().primary_screen->frame_period().attoseconds) : screen_device::DEFAULT_FRAME_RATE;
|
||||
png_error pngerr = mng_capture_start(*m_mngfile, m_snap_bitmap, rate);
|
||||
png_error pngerr = mng_capture_start(*m_mngfile, *m_snap_bitmap, rate);
|
||||
if (pngerr != PNGERR_NONE)
|
||||
return end_recording();
|
||||
|
||||
@ -1244,7 +1244,7 @@ void video_manager::record_frame()
|
||||
if (m_avifile != NULL)
|
||||
{
|
||||
// write the next frame
|
||||
avi_error avierr = avi_append_video_frame_rgb32(m_avifile, m_snap_bitmap);
|
||||
avi_error avierr = avi_append_video_frame_rgb32(m_avifile, *m_snap_bitmap);
|
||||
if (avierr != AVIERR_NONE)
|
||||
{
|
||||
g_profiler.stop();
|
||||
@ -1267,7 +1267,7 @@ void video_manager::record_frame()
|
||||
|
||||
// write the next frame
|
||||
const rgb_t *palette = (machine().palette != NULL) ? palette_entry_list_adjusted(machine().palette) : NULL;
|
||||
png_error error = mng_capture_frame(*m_mngfile, &pnginfo, m_snap_bitmap, machine().total_colors(), palette);
|
||||
png_error error = mng_capture_frame(*m_mngfile, &pnginfo, *m_snap_bitmap, machine().total_colors(), palette);
|
||||
png_free(&pnginfo);
|
||||
if (error != PNGERR_NONE)
|
||||
{
|
||||
@ -1291,21 +1291,21 @@ void video_manager::record_frame()
|
||||
invalid palette index
|
||||
-------------------------------------------------*/
|
||||
|
||||
void video_assert_out_of_range_pixels(running_machine &machine, bitmap_t *bitmap)
|
||||
void video_assert_out_of_range_pixels(running_machine &machine, bitmap_t &bitmap)
|
||||
{
|
||||
#ifdef MAME_DEBUG
|
||||
int maxindex = palette_get_max_index(machine.palette);
|
||||
int x, y;
|
||||
|
||||
// this only applies to indexed16 bitmaps
|
||||
if (bitmap->format() != BITMAP_FORMAT_INDEXED16)
|
||||
if (bitmap.format() != BITMAP_FORMAT_INDEXED16)
|
||||
return;
|
||||
|
||||
// iterate over rows
|
||||
for (y = 0; y < bitmap->height(); y++)
|
||||
for (y = 0; y < bitmap.height(); y++)
|
||||
{
|
||||
UINT16 *rowbase = &bitmap->pix16(y);
|
||||
for (x = 0; x < bitmap->width(); x++)
|
||||
UINT16 *rowbase = &bitmap.pix16(y);
|
||||
for (x = 0; x < bitmap.width(); x++)
|
||||
assert(rowbase[x] < maxindex);
|
||||
}
|
||||
#endif
|
||||
|
@ -204,7 +204,7 @@ private:
|
||||
// ----- debugging helpers -----
|
||||
|
||||
// assert if any pixels in the given bitmap contain an invalid palette index
|
||||
void video_assert_out_of_range_pixels(running_machine &machine, bitmap_t *bitmap);
|
||||
void video_assert_out_of_range_pixels(running_machine &machine, bitmap_t &bitmap);
|
||||
|
||||
|
||||
#endif /* __VIDEO_H__ */
|
||||
|
@ -1580,9 +1580,9 @@ void sega315_5378_device::update_palette()
|
||||
}
|
||||
|
||||
|
||||
void sega315_5124_device::update_video( bitmap_t *bitmap, const rectangle &cliprect )
|
||||
void sega315_5124_device::update_video( bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
copybitmap(bitmap, m_tmpbitmap, 0, 0, 0, 0, cliprect);
|
||||
copybitmap(bitmap, *m_tmpbitmap, 0, 0, 0, 0, cliprect);
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
bitmap_t *get_y1_bitmap() { return m_y1_bitmap; };
|
||||
|
||||
/* update the screen */
|
||||
void update_video( bitmap_t *bitmap, const rectangle &cliprect );
|
||||
void update_video( bitmap_t &bitmap, const rectangle &cliprect );
|
||||
|
||||
virtual void set_sega315_5124_compatibility_mode( bool sega315_5124_compatibility_mode ) { };
|
||||
|
||||
|
@ -251,14 +251,14 @@ WRITE_LINE_MEMBER( cdp1861_device::disp_off_w )
|
||||
// update_screen -
|
||||
//-------------------------------------------------
|
||||
|
||||
void cdp1861_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void cdp1861_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (m_disp)
|
||||
{
|
||||
copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
|
||||
copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, cliprect);
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap->fill(get_black_pen(machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(machine()), cliprect);
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( disp_on_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( disp_off_w );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -213,8 +213,8 @@ WRITE_LINE_MEMBER( cdp1862_device::con_w )
|
||||
// update_screen -
|
||||
//-------------------------------------------------
|
||||
|
||||
void cdp1862_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void cdp1862_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
|
||||
copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, cliprect);
|
||||
m_bitmap->fill(CDP1862_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8, cliprect);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( bkg_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( con_w );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -222,6 +222,6 @@ WRITE_LINE_MEMBER( crt9021_device::vsync_w )
|
||||
// update_screen - update screen
|
||||
//-------------------------------------------------
|
||||
|
||||
void crt9021_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void crt9021_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( retbl_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( vsync_w );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -287,7 +287,7 @@ VIDEO_START( generic_bitmapped )
|
||||
|
||||
SCREEN_UPDATE( generic_bitmapped )
|
||||
{
|
||||
copybitmap(bitmap, screen.machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect);
|
||||
copybitmap(bitmap, *screen.machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1159,7 +1159,7 @@ void h63484_device::device_reset()
|
||||
// draw_graphics_line -
|
||||
//-------------------------------------------------
|
||||
|
||||
void h63484_device::draw_graphics_line(bitmap_t *bitmap, const rectangle &cliprect, int y, int layer_n)
|
||||
void h63484_device::draw_graphics_line(bitmap_t &bitmap, const rectangle &cliprect, int y, int layer_n)
|
||||
{
|
||||
int x;
|
||||
int pitch;
|
||||
@ -1188,7 +1188,7 @@ void h63484_device::draw_graphics_line(bitmap_t *bitmap, const rectangle &clipre
|
||||
// update_screen -
|
||||
//-------------------------------------------------
|
||||
|
||||
void h63484_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void h63484_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if(m_dcr & 0x8000) // correct?
|
||||
{
|
||||
|
@ -26,8 +26,8 @@
|
||||
#define H63484_INTERFACE(name) \
|
||||
const h63484_interface (name) =
|
||||
|
||||
typedef void (*h63484_display_pixels_func)(device_t *device, bitmap_t *bitmap, int y, int x, UINT16 data);
|
||||
#define H63484_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t *bitmap, int y, int x, UINT16 data)
|
||||
typedef void (*h63484_display_pixels_func)(device_t *device, bitmap_t &bitmap, int y, int x, UINT16 data);
|
||||
#define H63484_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t &bitmap, int y, int x, UINT16 data)
|
||||
|
||||
// ======================> h63484_interface
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
DECLARE_READ8_MEMBER( vram_r );
|
||||
DECLARE_WRITE8_MEMBER( vram_w );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
|
||||
|
||||
@ -89,7 +89,7 @@ private:
|
||||
UINT16 video_registers_r(int offset);
|
||||
void video_registers_w(int offset);
|
||||
int translate_command(UINT16 data);
|
||||
void draw_graphics_line(bitmap_t *bitmap, const rectangle &cliprect, int y, int layer_n);
|
||||
void draw_graphics_line(bitmap_t &bitmap, const rectangle &cliprect, int y, int layer_n);
|
||||
|
||||
|
||||
screen_device *m_screen;
|
||||
|
@ -271,7 +271,7 @@ WRITE_LINE_MEMBER( hd44102_device::cs2_w )
|
||||
// update_screen - update screen
|
||||
//-------------------------------------------------
|
||||
|
||||
void hd44102_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void hd44102_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
for (int y = 0; y < 50; y++)
|
||||
{
|
||||
@ -288,7 +288,7 @@ void hd44102_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int color = (m_status & STATUS_DISPLAY_OFF) ? 0 : BIT(data, z % 8);
|
||||
|
||||
bitmap->pix16(sy, sx) = color;
|
||||
bitmap.pix16(sy, sx) = color;
|
||||
}
|
||||
|
||||
z++;
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( cs2_w );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -406,7 +406,7 @@ WRITE8_MEMBER( hd61830_device::data_w )
|
||||
// draw_scanline - draw one graphics scanline
|
||||
//-------------------------------------------------
|
||||
|
||||
void hd61830_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 ra)
|
||||
void hd61830_device::draw_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 ra)
|
||||
{
|
||||
for (int sx = 0; sx < m_hn; sx++)
|
||||
{
|
||||
@ -414,7 +414,7 @@ void hd61830_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect,
|
||||
|
||||
for (int x = 0; x < m_hp; x++)
|
||||
{
|
||||
bitmap->pix16(y, (sx * m_hp) + x) = BIT(data, x);
|
||||
bitmap.pix16(y, (sx * m_hp) + x) = BIT(data, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -424,7 +424,7 @@ void hd61830_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect,
|
||||
// update_graphics - draw graphics mode screen
|
||||
//-------------------------------------------------
|
||||
|
||||
void hd61830_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void hd61830_device::update_graphics(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
for (int y = 0; y < m_nx; y++)
|
||||
{
|
||||
@ -444,7 +444,7 @@ void hd61830_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect
|
||||
// draw_char - draw a char
|
||||
//-------------------------------------------------
|
||||
|
||||
void hd61830_device::draw_char(bitmap_t *bitmap, const rectangle &cliprect, UINT16 ma, int x, int y, UINT8 md)
|
||||
void hd61830_device::draw_char(bitmap_t &bitmap, const rectangle &cliprect, UINT16 ma, int x, int y, UINT8 md)
|
||||
{
|
||||
for (int cl = 0; cl < m_vp; cl++)
|
||||
{
|
||||
@ -505,7 +505,7 @@ void hd61830_device::draw_char(bitmap_t *bitmap, const rectangle &cliprect, UINT
|
||||
}
|
||||
|
||||
if (sy < m_screen->height() && sx < m_screen->width())
|
||||
bitmap->pix16(sy, sx) = pixel;
|
||||
bitmap.pix16(sy, sx) = pixel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -515,7 +515,7 @@ void hd61830_device::draw_char(bitmap_t *bitmap, const rectangle &cliprect, UINT
|
||||
// update_text - draw text mode screen
|
||||
//-------------------------------------------------
|
||||
|
||||
void hd61830_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void hd61830_device::update_text(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
for (int y = 0; y < (m_nx / m_vp); y++)
|
||||
{
|
||||
@ -534,7 +534,7 @@ void hd61830_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
// update_screen - update screen
|
||||
//-------------------------------------------------
|
||||
|
||||
void hd61830_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void hd61830_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (m_mcr & MODE_DISPLAY_ON)
|
||||
{
|
||||
@ -549,7 +549,7 @@ void hd61830_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap->fill(0, cliprect);
|
||||
bitmap.fill(0, cliprect);
|
||||
}
|
||||
|
||||
m_blink++;
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
DECLARE_READ8_MEMBER( data_r );
|
||||
DECLARE_WRITE8_MEMBER( data_w );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
@ -87,10 +87,10 @@ protected:
|
||||
private:
|
||||
void set_busy_flag();
|
||||
|
||||
void draw_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 ra);
|
||||
void update_graphics(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void draw_char(bitmap_t *bitmap, const rectangle &cliprect, UINT16 ma, int x, int y, UINT8 md);
|
||||
void update_text(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void draw_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 ra);
|
||||
void update_graphics(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
void draw_char(bitmap_t &bitmap, const rectangle &cliprect, UINT16 ma, int x, int y, UINT8 md);
|
||||
void update_text(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
devcb_resolved_read8 m_in_rd_func;
|
||||
|
||||
|
@ -460,7 +460,7 @@ WRITE8_DEVICE_HANDLER( i8275_dack_w )
|
||||
}
|
||||
|
||||
/* Screen Update */
|
||||
void i8275_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void i8275_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
i8275_t *i8275 = get_safe_token(device);
|
||||
i8275->ypos = 0;
|
||||
@ -474,7 +474,7 @@ void i8275_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
i8275->fifo_write = 0;
|
||||
|
||||
if ((i8275->status_reg & I8275_STATUS_VIDEO_ENABLE)==0) {
|
||||
bitmap->fill(get_black_pen(device->machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(device->machine()), cliprect);
|
||||
} else {
|
||||
// if value < 16 it is visible otherwise not
|
||||
i8275->cursor_blink_cnt++;
|
||||
|
@ -51,7 +51,7 @@ READ8_DEVICE_HANDLER ( i8275_r );
|
||||
WRITE8_DEVICE_HANDLER ( i8275_w );
|
||||
|
||||
/* updates the screen */
|
||||
void i8275_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void i8275_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
WRITE8_DEVICE_HANDLER( i8275_dack_w );
|
||||
|
||||
|
@ -58,9 +58,9 @@ void k053250_t::device_reset()
|
||||
}
|
||||
|
||||
// utility function to render a clipped scanline vertically or horizontally
|
||||
inline void k053250_t::pdraw_scanline32(bitmap_t *bitmap, const pen_t *palette, UINT8 *source,
|
||||
inline void k053250_t::pdraw_scanline32(bitmap_t &bitmap, const pen_t *palette, UINT8 *source,
|
||||
const rectangle &cliprect, int linepos, int scroll, int zoom,
|
||||
UINT32 clipmask, UINT32 wrapmask, UINT32 orientation, bitmap_t *priority, UINT8 pri)
|
||||
UINT32 clipmask, UINT32 wrapmask, UINT32 orientation, bitmap_t &priority, UINT8 pri)
|
||||
{
|
||||
// a sixteen-bit fixed point resolution should be adequate to our application
|
||||
#define FIXPOINT_PRECISION 16
|
||||
@ -162,16 +162,16 @@ inline void k053250_t::pdraw_scanline32(bitmap_t *bitmap, const pen_t *palette,
|
||||
// calculate target increment for horizontal scanlines which is exactly one
|
||||
dst_adv = 1;
|
||||
dst_offset = dst_length;
|
||||
pri_base = &priority->pix8(linepos, dst_start + dst_offset);
|
||||
dst_base = &bitmap->pix32(linepos, dst_start + dst_length);
|
||||
pri_base = &priority.pix8(linepos, dst_start + dst_offset);
|
||||
dst_base = &bitmap.pix32(linepos, dst_start + dst_length);
|
||||
}
|
||||
else
|
||||
{
|
||||
// calculate target increment for vertical scanlines which is the bitmap's pitch value
|
||||
dst_adv = bitmap->rowpixels();
|
||||
dst_adv = bitmap.rowpixels();
|
||||
dst_offset= dst_length * dst_adv;
|
||||
pri_base = &priority->pix8(dst_start, linepos + dst_offset);
|
||||
dst_base = &bitmap->pix32(dst_start, linepos + dst_offset);
|
||||
pri_base = &priority.pix8(dst_start, linepos + dst_offset);
|
||||
dst_base = &bitmap.pix32(dst_start, linepos + dst_offset);
|
||||
}
|
||||
|
||||
// generalized
|
||||
@ -221,7 +221,7 @@ inline void k053250_t::pdraw_scanline32(bitmap_t *bitmap, const pen_t *palette,
|
||||
#undef FIXPOINT_PRECISION_HALF
|
||||
}
|
||||
|
||||
void k053250_t::draw( bitmap_t *bitmap, const rectangle &cliprect, int colorbase, int flags, int priority )
|
||||
void k053250_t::draw( bitmap_t &bitmap, const rectangle &cliprect, int colorbase, int flags, int priority )
|
||||
{
|
||||
UINT8 *pix_ptr;
|
||||
const pen_t *pal_base, *pal_ptr;
|
||||
@ -307,7 +307,7 @@ void k053250_t::draw( bitmap_t *bitmap, const rectangle &cliprect, int colorbase
|
||||
if (orientation & ORIENTATION_FLIP_Y)
|
||||
{
|
||||
linedata_adv = -linedata_adv; // traverse line RAM backward in Y flipped scenarioes
|
||||
linedata_offs += bitmap->height() - 1; // and get info for the first line from the bottom
|
||||
linedata_offs += bitmap.height() - 1; // and get info for the first line from the bottom
|
||||
}
|
||||
|
||||
dst_wrapmask = ~0; // scanlines don't seem to wrap horizontally in normal orientation
|
||||
@ -334,7 +334,7 @@ void k053250_t::draw( bitmap_t *bitmap, const rectangle &cliprect, int colorbase
|
||||
if (orientation & ORIENTATION_FLIP_X)
|
||||
{
|
||||
linedata_adv = -linedata_adv; // traverse line RAM backward in X flipped scenarioes
|
||||
linedata_offs += bitmap->width() - 1; // and get info for the first line from the bottom
|
||||
linedata_offs += bitmap.width() - 1; // and get info for the first line from the bottom
|
||||
}
|
||||
|
||||
if (src_clipmask)
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(ram_w);
|
||||
DECLARE_READ16_MEMBER(rom_r);
|
||||
|
||||
void draw( bitmap_t *bitmap, const rectangle &cliprect, int colorbase, int flags, int priority );
|
||||
void draw( bitmap_t &bitmap, const rectangle &cliprect, int colorbase, int flags, int priority );
|
||||
|
||||
protected:
|
||||
void device_start();
|
||||
@ -46,9 +46,9 @@ private:
|
||||
|
||||
void unpack_nibbles();
|
||||
void dma(int limiter);
|
||||
static void pdraw_scanline32(bitmap_t *bitmap, const pen_t *palette, UINT8 *source,
|
||||
static void pdraw_scanline32(bitmap_t &bitmap, const pen_t *palette, UINT8 *source,
|
||||
const rectangle &cliprect, int linepos, int scroll, int zoom,
|
||||
UINT32 clipmask, UINT32 wrapmask, UINT32 orientation, bitmap_t *priority, UINT8 pri);
|
||||
UINT32 clipmask, UINT32 wrapmask, UINT32 orientation, bitmap_t &priority, UINT8 pri);
|
||||
};
|
||||
|
||||
extern const device_type K053250;
|
||||
|
@ -688,9 +688,9 @@ void mc6845_device::update_cursor_state()
|
||||
}
|
||||
|
||||
|
||||
void mc6845_device::update(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void mc6845_device::update(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
assert(bitmap != NULL);
|
||||
assert(bitmap.valid());
|
||||
|
||||
if (m_has_valid_parameters)
|
||||
{
|
||||
|
@ -25,22 +25,22 @@
|
||||
class mc6845_device;
|
||||
|
||||
/* callback definitions */
|
||||
typedef void * (*mc6845_begin_update_func)(mc6845_device *device, bitmap_t *bitmap, const rectangle &cliprect);
|
||||
#define MC6845_BEGIN_UPDATE(name) void *name(mc6845_device *device, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
typedef void * (*mc6845_begin_update_func)(mc6845_device *device, bitmap_t &bitmap, const rectangle &cliprect);
|
||||
#define MC6845_BEGIN_UPDATE(name) void *name(mc6845_device *device, bitmap_t &bitmap, const rectangle &cliprect)
|
||||
|
||||
|
||||
typedef void (*mc6845_update_row_func)(mc6845_device *device, bitmap_t *bitmap,
|
||||
typedef void (*mc6845_update_row_func)(mc6845_device *device, bitmap_t &bitmap,
|
||||
const rectangle &cliprect, UINT16 ma, UINT8 ra,
|
||||
UINT16 y, UINT8 x_count, INT8 cursor_x, void *param);
|
||||
|
||||
|
||||
#define MC6845_UPDATE_ROW(name) void name(mc6845_device *device, bitmap_t *bitmap, \
|
||||
#define MC6845_UPDATE_ROW(name) void name(mc6845_device *device, bitmap_t &bitmap, \
|
||||
const rectangle &cliprect, UINT16 ma, UINT8 ra, \
|
||||
UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
|
||||
|
||||
|
||||
typedef void (*mc6845_end_update_func)(mc6845_device *device, bitmap_t *bitmap, const rectangle &cliprect, void *param);
|
||||
#define MC6845_END_UPDATE(name) void name(mc6845_device *device, bitmap_t *bitmap, const rectangle &cliprect, void *param)
|
||||
typedef void (*mc6845_end_update_func)(mc6845_device *device, bitmap_t &bitmap, const rectangle &cliprect, void *param);
|
||||
#define MC6845_END_UPDATE(name) void name(mc6845_device *device, bitmap_t &bitmap, const rectangle &cliprect, void *param)
|
||||
|
||||
|
||||
typedef void (*mc6845_on_update_addr_changed_func)(mc6845_device *device, int address, int strobe);
|
||||
@ -148,7 +148,7 @@ public:
|
||||
/* updates the screen -- this will call begin_update(),
|
||||
followed by update_row() reapeatedly and after all row
|
||||
updating is complete, end_update() */
|
||||
void update(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -317,7 +317,7 @@ void msm6255_device::update_cursor()
|
||||
// draw_scanline -
|
||||
//-------------------------------------------------
|
||||
|
||||
void msm6255_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 ma, UINT8 ra)
|
||||
void msm6255_device::draw_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 ma, UINT8 ra)
|
||||
{
|
||||
UINT8 hp = (m_pr & PR_HP_MASK) + 1;
|
||||
UINT8 hn = (m_hnr & HNR_HN_MASK) + 1;
|
||||
@ -344,7 +344,7 @@ void msm6255_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect,
|
||||
|
||||
for (x = 0; x < hp; x++)
|
||||
{
|
||||
bitmap->pix16(y, (sx * hp) + x) = BIT(data, 7);
|
||||
bitmap.pix16(y, (sx * hp) + x) = BIT(data, 7);
|
||||
|
||||
data <<= 1;
|
||||
}
|
||||
@ -358,7 +358,7 @@ void msm6255_device::draw_scanline(bitmap_t *bitmap, const rectangle &cliprect,
|
||||
// update_graphics -
|
||||
//-------------------------------------------------
|
||||
|
||||
void msm6255_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void msm6255_device::update_graphics(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
UINT8 hn = (m_hnr & HNR_HN_MASK) + 1;
|
||||
UINT8 nx = (m_dvr & DVR_DN_MASK) + 1;
|
||||
@ -386,7 +386,7 @@ void msm6255_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect
|
||||
// update_text -
|
||||
//-------------------------------------------------
|
||||
|
||||
void msm6255_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void msm6255_device::update_text(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
UINT8 hn = (m_hnr & HNR_HN_MASK) + 1;
|
||||
UINT8 vp = (m_pr & PR_VP_MASK) + 1;
|
||||
@ -417,7 +417,7 @@ void msm6255_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
// update_screen - update screen
|
||||
//-------------------------------------------------
|
||||
|
||||
void msm6255_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void msm6255_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (m_mor & MOR_DISPLAY_ON)
|
||||
{
|
||||
@ -432,6 +432,6 @@ void msm6255_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap->fill(get_black_pen(machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(machine()), cliprect);
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
@ -79,9 +79,9 @@ protected:
|
||||
private:
|
||||
inline UINT8 read_video_data(UINT16 ma, UINT8 ra);
|
||||
void update_cursor();
|
||||
void draw_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 ma, UINT8 ra);
|
||||
void update_graphics(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_text(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void draw_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 ma, UINT8 ra);
|
||||
void update_graphics(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
void update_text(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
screen_device *m_screen;
|
||||
|
||||
|
@ -445,7 +445,7 @@ VIDEO_START( pc_cga_superimpose )
|
||||
static MC6845_UPDATE_ROW( cga_text_inten_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
@ -484,7 +484,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_update_row )
|
||||
static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
@ -522,7 +522,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row )
|
||||
static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
@ -560,7 +560,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row )
|
||||
static MC6845_UPDATE_ROW( cga_text_blink_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
@ -603,7 +603,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row )
|
||||
static MC6845_UPDATE_ROW( cga_text_blink_update_row_si )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
@ -654,7 +654,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row_si )
|
||||
static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
@ -701,7 +701,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row )
|
||||
static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
@ -758,7 +758,7 @@ static const UINT8 yc_lut[16][8] =
|
||||
static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
@ -801,7 +801,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row )
|
||||
static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
|
||||
@ -836,7 +836,7 @@ static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row )
|
||||
static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
UINT8 fg = cga.color_select & 0x0F;
|
||||
int i;
|
||||
running_machine &machine = device->machine();
|
||||
@ -1218,7 +1218,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
|
||||
// proc = cga_pgfx_4bpp;
|
||||
//
|
||||
|
||||
//INLINE void pgfx_plot_unit_4bpp(bitmap_t *bitmap,
|
||||
//INLINE void pgfx_plot_unit_4bpp(bitmap_t &bitmap,
|
||||
// int x, int y, int offs)
|
||||
//{
|
||||
// int color, values[2];
|
||||
@ -1239,7 +1239,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
|
||||
// color = ((values[0] & 0x3) << 1) |
|
||||
// ((values[1] & 2) >> 1) |
|
||||
// ((values[1] & 1) << 3);
|
||||
// bitmap->pix16(y, x+i) = Machine->pens[color];
|
||||
// bitmap.pix16(y, x+i) = Machine->pens[color];
|
||||
// values[0]>>=2;
|
||||
// values[1]>>=2;
|
||||
// }
|
||||
@ -1253,7 +1253,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
|
||||
// Second plane at CGA_base + 0x4000 / 0x6000
|
||||
//***************************************************************************/
|
||||
//
|
||||
//static void cga_pgfx_4bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
|
||||
//static void cga_pgfx_4bpp(bitmap_t &bitmap, struct mscrtc6845 *crtc)
|
||||
//{
|
||||
// int i, sx, sy, sh;
|
||||
// int offs = mscrtc6845_get_start(crtc)*2;
|
||||
@ -1286,7 +1286,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
|
||||
//
|
||||
//
|
||||
//
|
||||
//INLINE void pgfx_plot_unit_2bpp(bitmap_t *bitmap,
|
||||
//INLINE void pgfx_plot_unit_2bpp(bitmap_t &bitmap,
|
||||
// int x, int y, const UINT16 *palette, int offs)
|
||||
//{
|
||||
// int i;
|
||||
@ -1314,7 +1314,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
|
||||
// values[1] = values[1] << 1;
|
||||
// }
|
||||
//
|
||||
// dest = &bitmap->pix16(y, x);
|
||||
// dest = &bitmap.pix16(y, x);
|
||||
// *(dest++) = palette[(bmap[0] >> 6) & 0x03];
|
||||
// *(dest++) = palette[(bmap[0] >> 4) & 0x03];
|
||||
// *(dest++) = palette[(bmap[0] >> 2) & 0x03];
|
||||
@ -1333,7 +1333,7 @@ static WRITE32_HANDLER( pc_cga32le_w ) { write32le_with_write8_handler(pc_cga8_w
|
||||
// cga fetches 2 byte per mscrtc6845 access (not modeled here)!
|
||||
//***************************************************************************/
|
||||
//
|
||||
//static void cga_pgfx_2bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
|
||||
//static void cga_pgfx_2bpp(bitmap_t &bitmap, struct mscrtc6845 *crtc)
|
||||
//{
|
||||
// int i, sx, sy, sh;
|
||||
// int offs = mscrtc6845_get_start(crtc)*2;
|
||||
@ -1417,7 +1417,7 @@ static struct
|
||||
static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row )
|
||||
{
|
||||
UINT8 *videoram = cga.videoram;
|
||||
UINT16 *p = &bitmap->pix16(y);
|
||||
UINT16 *p = &bitmap.pix16(y);
|
||||
UINT16 offset_base = ra << 13;
|
||||
int j;
|
||||
running_machine &machine = device->machine();
|
||||
|
@ -103,7 +103,7 @@ SCREEN_UPDATE( pc_video )
|
||||
if ((pc_current_width > 100) && (pc_current_height > 100))
|
||||
screen.set_visible_area(0, pc_current_width-1, 0, pc_current_height-1);
|
||||
|
||||
bitmap->fill(0, cliprect);
|
||||
bitmap.fill(0, cliprect);
|
||||
}
|
||||
|
||||
video_update(bitmap);
|
||||
@ -991,7 +991,7 @@ static VIDEO_RESET( vga )
|
||||
pc_vga_reset(machine);
|
||||
}
|
||||
|
||||
static void vga_vh_text(bitmap_t *bitmap)
|
||||
static void vga_vh_text(bitmap_t &bitmap)
|
||||
{
|
||||
UINT8 ch, attr;
|
||||
UINT8 bits;
|
||||
@ -1019,9 +1019,9 @@ static void vga_vh_text(bitmap_t *bitmap)
|
||||
attr = vga.memory[(pos<<2) + 1];
|
||||
font = vga.memory+2+(ch<<(5+2))+FONT1;
|
||||
|
||||
for (h = MAX(-line, 0); (h < height) && (line+h < MIN(TEXT_LINES, bitmap->height())); h++)
|
||||
for (h = MAX(-line, 0); (h < height) && (line+h < MIN(TEXT_LINES, bitmap.height())); h++)
|
||||
{
|
||||
bitmapline = &bitmap->pix16(line+h);
|
||||
bitmapline = &bitmap.pix16(line+h);
|
||||
bits = font[h<<2];
|
||||
|
||||
assert(bitmapline);
|
||||
@ -1051,14 +1051,14 @@ static void vga_vh_text(bitmap_t *bitmap)
|
||||
(h<=CRTC_CURSOR_BOTTOM)&&(h<height)&&(line+h<TEXT_LINES);
|
||||
h++)
|
||||
{
|
||||
bitmap->plot_box(column*width, line+h, width, 1, vga.pens[attr&0xf]);
|
||||
bitmap.plot_box(column*width, line+h, width, 1, vga.pens[attr&0xf]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void vga_vh_ega(bitmap_t *bitmap)
|
||||
static void vga_vh_ega(bitmap_t &bitmap)
|
||||
{
|
||||
int pos, line, column, c, addr, i;
|
||||
int height = CRTC_CHAR_HEIGHT;
|
||||
@ -1069,7 +1069,7 @@ static void vga_vh_ega(bitmap_t *bitmap)
|
||||
for (addr=EGA_START_ADDRESS, pos=0, line=0; line<LINES;
|
||||
line += height, addr=(addr+EGA_LINE_LENGTH)&0x3ffff)
|
||||
{
|
||||
bitmapline = &bitmap->pix16(line);
|
||||
bitmapline = &bitmap.pix16(line);
|
||||
|
||||
for (pos=addr, c=0, column=0; column<EGA_COLUMNS; column++, c+=8, pos=(pos+4)&0x3ffff)
|
||||
{
|
||||
@ -1097,13 +1097,13 @@ static void vga_vh_ega(bitmap_t *bitmap)
|
||||
if (line + i >= LINES)
|
||||
break;
|
||||
|
||||
newbitmapline = &bitmap->pix16(line+i);
|
||||
newbitmapline = &bitmap.pix16(line+i);
|
||||
memcpy(newbitmapline, bitmapline, EGA_COLUMNS * 8 * sizeof(UINT16));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void vga_vh_vga(bitmap_t *bitmap)
|
||||
static void vga_vh_vga(bitmap_t &bitmap)
|
||||
{
|
||||
int pos, line, column, c, addr, curr_addr;
|
||||
UINT16 *bitmapline;
|
||||
@ -1117,7 +1117,7 @@ static void vga_vh_vga(bitmap_t *bitmap)
|
||||
curr_addr = addr;
|
||||
if(line == (vga.line_compare & 0x3ff))
|
||||
curr_addr = 0;
|
||||
bitmapline = &bitmap->pix16(line);
|
||||
bitmapline = &bitmap.pix16(line);
|
||||
addr %= vga.svga_intf.vram_size;
|
||||
for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=8, pos+=0x20)
|
||||
{
|
||||
@ -1142,7 +1142,7 @@ static void vga_vh_vga(bitmap_t *bitmap)
|
||||
curr_addr = addr;
|
||||
if(line == (vga.line_compare & 0x3ff))
|
||||
curr_addr = 0;
|
||||
bitmapline = &bitmap->pix16(line);
|
||||
bitmapline = &bitmap.pix16(line);
|
||||
addr %= vga.svga_intf.vram_size;
|
||||
for (pos=curr_addr, c=0, column=0; column<VGA_COLUMNS; column++, c+=8, pos+=0x08)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef PC_VGA_H
|
||||
#define PC_VGA_H
|
||||
|
||||
typedef void (*pc_video_update_proc)(bitmap_t *bitmap);
|
||||
typedef void (*pc_video_update_proc)(bitmap_t &bitmap);
|
||||
|
||||
MACHINE_CONFIG_EXTERN( pcvideo_vga );
|
||||
|
||||
|
@ -317,17 +317,17 @@ void psxgpu_device::DebugCheckKeys( void )
|
||||
#endif
|
||||
}
|
||||
|
||||
int psxgpu_device::DebugMeshDisplay( bitmap_t *bitmap, const rectangle &cliprect )
|
||||
int psxgpu_device::DebugMeshDisplay( bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
if( m_debug.mesh )
|
||||
{
|
||||
copybitmap( bitmap, m_debug.mesh, 0, 0, 0, 0, cliprect );
|
||||
copybitmap( bitmap, *m_debug.mesh, 0, 0, 0, 0, cliprect );
|
||||
}
|
||||
m_debug.b_clear = 1;
|
||||
return m_debug.b_mesh;
|
||||
}
|
||||
|
||||
int psxgpu_device::DebugTextureDisplay( bitmap_t *bitmap )
|
||||
int psxgpu_device::DebugTextureDisplay( bitmap_t &bitmap )
|
||||
{
|
||||
UINT32 n_y;
|
||||
|
||||
@ -600,7 +600,7 @@ void psxgpu_device::psx_gpu_init( int n_gputype )
|
||||
machine().save().register_postload( save_prepost_delegate( FUNC( psxgpu_device::updatevisiblearea ), this ) );
|
||||
}
|
||||
|
||||
void psxgpu_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void psxgpu_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
UINT32 n_x;
|
||||
UINT32 n_y;
|
||||
@ -628,7 +628,7 @@ void psxgpu_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
if( ( n_gpustatus & ( 1 << 0x17 ) ) != 0 )
|
||||
{
|
||||
/* todo: only draw to necessary area */
|
||||
bitmap->fill(0, cliprect);
|
||||
bitmap.fill(0, cliprect);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -710,7 +710,7 @@ void psxgpu_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
while( n_line > 0 )
|
||||
{
|
||||
UINT16 *p_n_src = p_p_vram[ n_y + n_displaystarty ] + ((n_x + n_displaystartx) * 3);
|
||||
UINT16 *p_n_dest = &bitmap->pix16(n_y + n_top, n_x + n_left);
|
||||
UINT16 *p_n_dest = &bitmap.pix16(n_y + n_top, n_x + n_left);
|
||||
|
||||
n_column = n_columns;
|
||||
while( n_column > 0 )
|
||||
|
@ -181,7 +181,7 @@ public:
|
||||
psxgpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
WRITE32_MEMBER( write );
|
||||
READ32_MEMBER( read );
|
||||
void dma_read( UINT32 n_address, INT32 n_size );
|
||||
@ -221,8 +221,8 @@ protected:
|
||||
void DebugMesh( int n_coordx, int n_coordy );
|
||||
void DebugMeshEnd( void );
|
||||
void DebugCheckKeys( void );
|
||||
int DebugMeshDisplay( bitmap_t *bitmap, const rectangle &cliprect );
|
||||
int DebugTextureDisplay( bitmap_t *bitmap );
|
||||
int DebugMeshDisplay( bitmap_t &bitmap, const rectangle &cliprect );
|
||||
int DebugTextureDisplay( bitmap_t &bitmap );
|
||||
#endif
|
||||
|
||||
INT32 m_n_tx;
|
||||
|
@ -136,7 +136,7 @@ INLINE const s2636_interface *get_interface( device_t *device )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void draw_sprite( UINT8 *gfx, int color, int y, int x, int expand, int or_mode, bitmap_t *bitmap, const rectangle &cliprect )
|
||||
static void draw_sprite( UINT8 *gfx, int color, int y, int x, int expand, int or_mode, bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
int sy;
|
||||
|
||||
@ -173,9 +173,9 @@ static void draw_sprite( UINT8 *gfx, int color, int y, int x, int expand, int or
|
||||
continue;
|
||||
|
||||
if (or_mode)
|
||||
bitmap->pix16(ty, tx) = 0x08 | bitmap->pix16(ty, tx) | color;
|
||||
bitmap.pix16(ty, tx) = 0x08 | bitmap.pix16(ty, tx) | color;
|
||||
else
|
||||
bitmap->pix16(ty, tx) = 0x08 | color;
|
||||
bitmap.pix16(ty, tx) = 0x08 | color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -215,7 +215,7 @@ static int check_collision( device_t *device, int spriteno1, int spriteno2, cons
|
||||
int expand2 = (s2636->work_ram[0xc0] >> (spriteno2 << 1)) & 0x03;
|
||||
|
||||
/* draw first sprite */
|
||||
draw_sprite(attr1, 1, y1, x1, expand1, FALSE, s2636->collision_bitmap, cliprect);
|
||||
draw_sprite(attr1, 1, y1, x1, expand1, FALSE, *s2636->collision_bitmap, cliprect);
|
||||
|
||||
/* get fingerprint */
|
||||
for (x = x1; x < x1 + SPRITE_WIDTH; x++)
|
||||
@ -229,7 +229,7 @@ static int check_collision( device_t *device, int spriteno1, int spriteno2, cons
|
||||
}
|
||||
|
||||
/* black out second sprite */
|
||||
draw_sprite(attr2, 0, y2, x2, expand2, FALSE, s2636->collision_bitmap, cliprect);
|
||||
draw_sprite(attr2, 0, y2, x2, expand2, FALSE, *s2636->collision_bitmap, cliprect);
|
||||
|
||||
/* remove fingerprint */
|
||||
for (x = x1; x < x1 + SPRITE_WIDTH; x++)
|
||||
@ -254,7 +254,7 @@ static int check_collision( device_t *device, int spriteno1, int spriteno2, cons
|
||||
*
|
||||
*************************************/
|
||||
|
||||
bitmap_t *s2636_update( device_t *device, const rectangle &cliprect )
|
||||
bitmap_t &s2636_update( device_t *device, const rectangle &cliprect )
|
||||
{
|
||||
s2636_state *s2636 = get_safe_token(device);
|
||||
UINT8 collision = 0;
|
||||
@ -277,7 +277,7 @@ bitmap_t *s2636_update( device_t *device, const rectangle &cliprect )
|
||||
color = (s2636->work_ram[0xc1 + (spriteno >> 1)] >> ((spriteno & 1) ? 0 : 3)) & 0x07;
|
||||
expand = (s2636->work_ram[0xc0] >> (spriteno << 1)) & 0x03;
|
||||
|
||||
draw_sprite(attr, color, y, x, expand, TRUE, s2636->bitmap, cliprect);
|
||||
draw_sprite(attr, color, y, x, expand, TRUE, *s2636->bitmap, cliprect);
|
||||
|
||||
/* bail if no shadow sprites */
|
||||
if ((attr[0x0b] == 0xff) || (attr[0x0d] == 0xfe))
|
||||
@ -289,7 +289,7 @@ bitmap_t *s2636_update( device_t *device, const rectangle &cliprect )
|
||||
{
|
||||
y = y + SPRITE_HEIGHT + attr[0x0d];
|
||||
|
||||
draw_sprite(attr, color, y, x, expand, TRUE, s2636->bitmap, cliprect);
|
||||
draw_sprite(attr, color, y, x, expand, TRUE, *s2636->bitmap, cliprect);
|
||||
}
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ bitmap_t *s2636_update( device_t *device, const rectangle &cliprect )
|
||||
|
||||
s2636->work_ram[0xcb] = collision;
|
||||
|
||||
return s2636->bitmap;
|
||||
return *s2636->bitmap;
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ DECLARE_LEGACY_DEVICE(S2636, s2636);
|
||||
D0-D2 of each pixel is the pixel color
|
||||
D3 indicates whether the S2636 drew this pixel - 0 = not drawn, 1 = drawn */
|
||||
|
||||
bitmap_t *s2636_update( device_t *device, const rectangle &cliprect );
|
||||
bitmap_t &s2636_update( device_t *device, const rectangle &cliprect );
|
||||
WRITE8_DEVICE_HANDLER( s2636_work_ram_w );
|
||||
READ8_DEVICE_HANDLER( s2636_work_ram_r );
|
||||
|
||||
|
@ -206,7 +206,7 @@ void saa5050_frame_advance( device_t *device )
|
||||
saa5050->frame_count = 0;
|
||||
}
|
||||
|
||||
void saa5050_update( device_t *device, bitmap_t *bitmap, const rectangle &cliprect )
|
||||
void saa5050_update( device_t *device, bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
saa5050_state *saa5050 = get_safe_token(device);
|
||||
int code, colour;
|
||||
|
@ -41,7 +41,7 @@ DECLARE_LEGACY_DEVICE(SAA5050, saa5050);
|
||||
DEVICE I/O FUNCTIONS
|
||||
***************************************************************************/
|
||||
|
||||
void saa5050_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void saa5050_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
|
||||
void saa5050_frame_advance(device_t *device);
|
||||
|
||||
GFXDECODE_EXTERN( saa5050 );
|
||||
|
@ -582,7 +582,7 @@ WRITE8_MEMBER( sed1330_device::data_w )
|
||||
// draw_text_scanline -
|
||||
//-------------------------------------------------
|
||||
|
||||
void sed1330_device::draw_text_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 va)
|
||||
void sed1330_device::draw_text_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 va)
|
||||
{
|
||||
int sx, x;
|
||||
|
||||
@ -599,7 +599,7 @@ void sed1330_device::draw_text_scanline(bitmap_t *bitmap, const rectangle &clipr
|
||||
{
|
||||
for (x = 0; x < m_crx; x++)
|
||||
{
|
||||
bitmap->pix16(y, (sx * m_fx) + x) = 1;
|
||||
bitmap.pix16(y, (sx * m_fx) + x) = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -610,7 +610,7 @@ void sed1330_device::draw_text_scanline(bitmap_t *bitmap, const rectangle &clipr
|
||||
{
|
||||
for (x = 0; x < m_crx; x++)
|
||||
{
|
||||
bitmap->pix16(y, (sx * m_fx) + x) = 1;
|
||||
bitmap.pix16(y, (sx * m_fx) + x) = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -623,7 +623,7 @@ void sed1330_device::draw_text_scanline(bitmap_t *bitmap, const rectangle &clipr
|
||||
// draw_graphics_scanline -
|
||||
//-------------------------------------------------
|
||||
|
||||
void sed1330_device::draw_graphics_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 va)
|
||||
void sed1330_device::draw_graphics_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 va)
|
||||
{
|
||||
int sx, x;
|
||||
|
||||
@ -633,7 +633,7 @@ void sed1330_device::draw_graphics_scanline(bitmap_t *bitmap, const rectangle &c
|
||||
|
||||
for (x = 0; x < m_fx; x++)
|
||||
{
|
||||
bitmap->pix16(y, (sx * m_fx) + x) = BIT(data, 7);
|
||||
bitmap.pix16(y, (sx * m_fx) + x) = BIT(data, 7);
|
||||
data <<= 1;
|
||||
}
|
||||
}
|
||||
@ -644,7 +644,7 @@ void sed1330_device::draw_graphics_scanline(bitmap_t *bitmap, const rectangle &c
|
||||
// update_graphics -
|
||||
//-------------------------------------------------
|
||||
|
||||
void sed1330_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void sed1330_device::update_graphics(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
}
|
||||
|
||||
@ -653,7 +653,7 @@ void sed1330_device::update_graphics(bitmap_t *bitmap, const rectangle &cliprect
|
||||
// update_text -
|
||||
//-------------------------------------------------
|
||||
|
||||
void sed1330_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void sed1330_device::update_text(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int y;
|
||||
|
||||
@ -686,7 +686,7 @@ void sed1330_device::update_text(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
// update_screen -
|
||||
//-------------------------------------------------
|
||||
|
||||
void sed1330_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void sed1330_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (m_d)
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
DECLARE_READ8_MEMBER( data_r );
|
||||
DECLARE_WRITE8_MEMBER( data_w );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
@ -64,10 +64,10 @@ protected:
|
||||
inline void writebyte(offs_t address, UINT8 m_data);
|
||||
inline void increment_csr();
|
||||
|
||||
void draw_text_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 va);
|
||||
void draw_graphics_scanline(bitmap_t *bitmap, const rectangle &cliprect, int y, UINT16 va);
|
||||
void update_graphics(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_text(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void draw_text_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 va);
|
||||
void draw_graphics_scanline(bitmap_t &bitmap, const rectangle &cliprect, int y, UINT16 va);
|
||||
void update_graphics(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
void update_text(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
private:
|
||||
int m_bf; // busy flag
|
||||
|
@ -571,9 +571,9 @@ void tms9928a_device::device_timer(emu_timer &timer, device_timer_id id, int par
|
||||
}
|
||||
|
||||
|
||||
void tms9928a_device::update( bitmap_t *bitmap, const rectangle &cliprect )
|
||||
void tms9928a_device::update( bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
copybitmap( bitmap, m_tmpbmp, 0, 0, 0, 0, cliprect );
|
||||
copybitmap( bitmap, *m_tmpbmp, 0, 0, 0, 0, cliprect );
|
||||
}
|
||||
|
||||
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( register_write );
|
||||
|
||||
/* update the screen */
|
||||
void update( bitmap_t *bitmap, const rectangle &cliprect );
|
||||
void update( bitmap_t &bitmap, const rectangle &cliprect );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -606,7 +606,7 @@ void upd3301_device::draw_scanline()
|
||||
int csr = m_cm && m_cursor_blink && ((y / m_r) == m_cy) && (sx == m_cx);
|
||||
int gpa = 0; // TODO
|
||||
|
||||
m_display_cb(this, m_bitmap, y, sx, cc, lc, hlgt, rvv, vsp, sl0, sl12, csr, gpa);
|
||||
m_display_cb(this, *m_bitmap, y, sx, cc, lc, hlgt, rvv, vsp, sl0, sl12, csr, gpa);
|
||||
}
|
||||
}
|
||||
|
||||
@ -618,12 +618,12 @@ void upd3301_device::draw_scanline()
|
||||
// update_screen -
|
||||
//-------------------------------------------------
|
||||
|
||||
void upd3301_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
void upd3301_device::update_screen(bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
if (m_status & STATUS_VE)
|
||||
{
|
||||
m_y = 0;
|
||||
m_bitmap = bitmap;
|
||||
m_bitmap = &bitmap;
|
||||
m_data_fifo_pos = 0;
|
||||
m_attr_fifo_pos = 0;
|
||||
|
||||
@ -648,6 +648,6 @@ void upd3301_device::update_screen(bitmap_t *bitmap, const rectangle &cliprect)
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap->fill(get_black_pen(machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(machine()), cliprect);
|
||||
}
|
||||
}
|
||||
|
@ -66,8 +66,8 @@
|
||||
|
||||
// ======================> upd3301_display_pixels_func
|
||||
|
||||
typedef void (*upd3301_display_pixels_func)(device_t *device, bitmap_t *bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa);
|
||||
#define UPD3301_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t *bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa)
|
||||
typedef void (*upd3301_display_pixels_func)(device_t *device, bitmap_t &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa);
|
||||
#define UPD3301_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_t &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa)
|
||||
|
||||
|
||||
// ======================> upd3301_interface
|
||||
@ -103,7 +103,7 @@ public:
|
||||
DECLARE_READ_LINE_MEMBER( hrtc_r );
|
||||
DECLARE_READ_LINE_MEMBER( vrtc_r );
|
||||
|
||||
void update_screen(bitmap_t *bitmap, const rectangle &cliprect);
|
||||
void update_screen(bitmap_t &bitmap, const rectangle &cliprect);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -100,7 +100,7 @@ static void v9938_cpu_to_vdp (UINT8 V);
|
||||
static UINT8 v9938_command_unit_w (UINT8 Op);
|
||||
static UINT8 v9938_vdp_to_cpu (void);
|
||||
static void v9938_set_mode (void);
|
||||
static void v9938_refresh_line (running_machine &machine, bitmap_t *bmp, int line);
|
||||
static void v9938_refresh_line (running_machine &machine, bitmap_t &bmp, int line);
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@ -478,7 +478,7 @@ WRITE8_HANDLER (v9938_1_command_w)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
void v9938_init (running_machine &machine, int which, screen_device &screen, bitmap_t *bitmap, int model, int vram_size, void (*callback)(running_machine &, int) )
|
||||
void v9938_init (running_machine &machine, int which, screen_device &screen, bitmap_t &bitmap, int model, int vram_size, void (*callback)(running_machine &, int) )
|
||||
{
|
||||
vdp = &vdps[which];
|
||||
|
||||
@ -488,7 +488,7 @@ void v9938_init (running_machine &machine, int which, screen_device &screen, bit
|
||||
vdp->VdpEngine = NULL;
|
||||
|
||||
vdp->screen = &screen;
|
||||
vdp->bitmap = bitmap;
|
||||
vdp->bitmap = &bitmap;
|
||||
vdp->model = model;
|
||||
vdp->vram_size = vram_size;
|
||||
vdp->INTCallback = callback;
|
||||
@ -1222,7 +1222,7 @@ static void v9938_set_mode (void)
|
||||
vdp->mode = i;
|
||||
}
|
||||
|
||||
static void v9938_refresh_16 (running_machine &machine, bitmap_t *bmp, int line)
|
||||
static void v9938_refresh_16 (running_machine &machine, bitmap_t &bmp, int line)
|
||||
{
|
||||
const pen_t *pens = machine.pens;
|
||||
int i, double_lines;
|
||||
@ -1236,17 +1236,17 @@ static void v9938_refresh_16 (running_machine &machine, bitmap_t *bmp, int line)
|
||||
if (vdp->contReg[9] & 0x08)
|
||||
{
|
||||
vdp->size_now = RENDER_HIGH;
|
||||
ln = &bmp->pix16(line*2+((vdp->statReg[2]>>1)&1));
|
||||
ln = &bmp.pix16(line*2+((vdp->statReg[2]>>1)&1));
|
||||
}
|
||||
else
|
||||
{
|
||||
ln = &bmp->pix16(line*2);
|
||||
ln2 = &bmp->pix16(line*2+1);
|
||||
ln = &bmp.pix16(line*2);
|
||||
ln2 = &bmp.pix16(line*2+1);
|
||||
double_lines = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
ln = &bmp->pix16(line);
|
||||
ln = &bmp.pix16(line);
|
||||
|
||||
if ( !(vdp->contReg[1] & 0x40) || (vdp->statReg[2] & 0x40) )
|
||||
{
|
||||
@ -1282,7 +1282,7 @@ static void v9938_refresh_16 (running_machine &machine, bitmap_t *bmp, int line)
|
||||
memcpy (ln2, ln, (512 + 32) * 2);
|
||||
}
|
||||
|
||||
static void v9938_refresh_line (running_machine &machine, bitmap_t *bmp, int line)
|
||||
static void v9938_refresh_line (running_machine &machine, bitmap_t &bmp, int line)
|
||||
{
|
||||
int ind16, ind256;
|
||||
|
||||
@ -1514,7 +1514,7 @@ int v9938_interrupt (running_machine &machine, int which)
|
||||
{
|
||||
scanline = (vdp->scanline - scanline_start) & 255;
|
||||
|
||||
v9938_refresh_line (machine, vdp->bitmap, scanline);
|
||||
v9938_refresh_line (machine, *vdp->bitmap, scanline);
|
||||
}
|
||||
|
||||
max = (vdp->contReg[9] & 2) ? 313 : 262;
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define RENDER_LOW (1)
|
||||
#define RENDER_AUTO (2)
|
||||
|
||||
void v9938_init (running_machine &machine, int which, screen_device &screen, bitmap_t *bitmap, int model, int vram_size, void (*callback)(running_machine &, int) );
|
||||
void v9938_init (running_machine &machine, int which, screen_device &screen, bitmap_t &bitmap, int model, int vram_size, void (*callback)(running_machine &, int) );
|
||||
void v9938_reset (int which);
|
||||
int v9938_interrupt (running_machine &machine, int which);
|
||||
void v9938_set_sprite_limit (int which, int);
|
||||
|
@ -96,7 +96,7 @@ static render_texture *get_vector_texture(float dx, float dy, float intensity)
|
||||
|
||||
height = lbucket * VECTOR_WIDTH_DENOM / TEXTURE_LENGTH_BUCKETS;
|
||||
tex->bitmap = global_alloc(bitmap_t(TEXTURE_WIDTH, height, BITMAP_FORMAT_ARGB32));
|
||||
tex->bitmap->fill(MAKE_ARGB(0xff,0xff,0xff,0xff));
|
||||
tex->bitmap.fill(MAKE_ARGB(0xff,0xff,0xff,0xff));
|
||||
|
||||
totalint = 1.0f;
|
||||
for (x = TEXTURE_WIDTH / 2 - 1; x >= 0; x--)
|
||||
@ -109,10 +109,10 @@ static render_texture *get_vector_texture(float dx, float dy, float intensity)
|
||||
{
|
||||
UINT32 *pix;
|
||||
|
||||
pix = (UINT32 *)bitmap->base + y * bitmap->rowpixels + x;
|
||||
pix = (UINT32 *)bitmap.base + y * bitmap.rowpixels + x;
|
||||
*pix = MAKE_ARGB((RGB_ALPHA(*pix) * intensity) >> 8,0xff,0xff,0xff);
|
||||
|
||||
pix = (UINT32 *)bitmap->base + y * bitmap->rowpixels + (TEXTURE_WIDTH - 1 - x);
|
||||
pix = (UINT32 *)bitmap.base + y * bitmap.rowpixels + (TEXTURE_WIDTH - 1 - x);
|
||||
*pix = MAKE_ARGB((RGB_ALPHA(*pix) * intensity) >> 8,0xff,0xff,0xff);
|
||||
}
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ INLINE voodoo_state *get_safe_token(device_t *device)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
int voodoo_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
voodoo_state *v = get_safe_token(device);
|
||||
int changed = v->fbi.video_changed;
|
||||
@ -343,7 +343,7 @@ int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
/* if we are blank, just fill with black */
|
||||
if (v->type <= VOODOO_2 && FBIINIT1_SOFTWARE_BLANK(v->reg[fbiInit1].u))
|
||||
{
|
||||
bitmap->fill(0, cliprect);
|
||||
bitmap.fill(0, cliprect);
|
||||
return changed;
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
if (y >= v->fbi.yoffs)
|
||||
{
|
||||
UINT16 *src = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[drawbuf]) + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs;
|
||||
UINT32 *dst = &bitmap->pix32(y);
|
||||
UINT32 *dst = &bitmap.pix32(y);
|
||||
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
|
||||
dst[x] = v->fbi.pen[src[x]];
|
||||
}
|
||||
@ -450,7 +450,7 @@ int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
|
||||
{
|
||||
UINT16 *src = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs) + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs;
|
||||
UINT32 *dst = &bitmap->pix32(y);
|
||||
UINT32 *dst = &bitmap.pix32(y);
|
||||
for (x = cliprect.min_x; x <= cliprect.max_x; x++)
|
||||
dst[x] = ((src[x] << 8) & 0xff0000) | ((src[x] >> 0) & 0xff00) | ((src[x] >> 8) & 0xff);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ struct _voodoo_config
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
int voodoo_update(device_t *device, bitmap_t *bitmap, const rectangle &cliprect);
|
||||
int voodoo_update(device_t *device, bitmap_t &bitmap, const rectangle &cliprect);
|
||||
int voodoo_get_type(device_t *device);
|
||||
int voodoo_is_stalled(device_t *device);
|
||||
void voodoo_set_init_enable(device_t *device, UINT32 newval);
|
||||
|
@ -250,15 +250,15 @@ static avi_error soundbuf_write_chunk(avi_file *file, UINT32 framenum);
|
||||
static avi_error soundbuf_flush(avi_file *file, int only_flush_full);
|
||||
|
||||
/* RGB helpers */
|
||||
static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t *bitmap, UINT8 *data, UINT32 numbytes);
|
||||
static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t &bitmap, UINT8 *data, UINT32 numbytes);
|
||||
|
||||
/* YUY helpers */
|
||||
static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t *bitmap);
|
||||
static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t *bitmap, UINT8 *data, UINT32 numbytes);
|
||||
static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t &bitmap);
|
||||
static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t &bitmap, UINT8 *data, UINT32 numbytes);
|
||||
|
||||
/* HuffYUV helpers */
|
||||
static avi_error huffyuv_extract_tables(avi_stream *stream, const UINT8 *chunkdata, UINT32 size);
|
||||
static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t *bitmap);
|
||||
static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t &bitmap);
|
||||
|
||||
/* debugging */
|
||||
static void printf_chunk_recursive(avi_file *file, avi_chunk *chunk, int indent);
|
||||
@ -793,7 +793,7 @@ UINT32 avi_first_sample_in_frame(avi_file *file, UINT32 framenum)
|
||||
converting to YUY16 format
|
||||
-------------------------------------------------*/
|
||||
|
||||
avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t *bitmap)
|
||||
avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t &bitmap)
|
||||
{
|
||||
avi_error avierr = AVIERR_NONE;
|
||||
UINT32 bytes_read, chunkid;
|
||||
@ -814,7 +814,7 @@ avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t *
|
||||
return AVIERR_INVALID_FRAME;
|
||||
|
||||
/* we only support YUY-style bitmaps (16bpp) */
|
||||
if (bitmap->format() != BITMAP_FORMAT_YUY16 || bitmap->width() < stream->width || bitmap->height() < stream->height)
|
||||
if (bitmap.format() != BITMAP_FORMAT_YUY16 || bitmap.width() < stream->width || bitmap.height() < stream->height)
|
||||
return AVIERR_INVALID_BITMAP;
|
||||
|
||||
/* expand the tempbuffer to hold the data if necessary */
|
||||
@ -957,7 +957,7 @@ avi_error avi_read_sound_samples(avi_file *file, int channel, UINT32 firstsample
|
||||
of video in YUY16 format
|
||||
-------------------------------------------------*/
|
||||
|
||||
avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t *bitmap)
|
||||
avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t &bitmap)
|
||||
{
|
||||
avi_stream *stream = get_video_stream(file);
|
||||
avi_error avierr;
|
||||
@ -968,7 +968,7 @@ avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t *bitmap)
|
||||
return AVIERR_UNSUPPORTED_VIDEO_FORMAT;
|
||||
|
||||
/* double check bitmap format */
|
||||
if (bitmap->format() != BITMAP_FORMAT_YUY16)
|
||||
if (bitmap.format() != BITMAP_FORMAT_YUY16)
|
||||
return AVIERR_INVALID_BITMAP;
|
||||
|
||||
/* write out any sound data first */
|
||||
@ -1003,7 +1003,7 @@ avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t *bitmap)
|
||||
of video in RGB32 format
|
||||
-------------------------------------------------*/
|
||||
|
||||
avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t *bitmap)
|
||||
avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t &bitmap)
|
||||
{
|
||||
avi_stream *stream = get_video_stream(file);
|
||||
avi_error avierr;
|
||||
@ -1018,7 +1018,7 @@ avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t *bitmap)
|
||||
return AVIERR_UNSUPPORTED_VIDEO_FORMAT;
|
||||
|
||||
/* double check bitmap format */
|
||||
if (bitmap->format() != BITMAP_FORMAT_RGB32)
|
||||
if (bitmap.format() != BITMAP_FORMAT_RGB32)
|
||||
return AVIERR_INVALID_BITMAP;
|
||||
|
||||
/* write out any sound data first */
|
||||
@ -2343,17 +2343,17 @@ static avi_error soundbuf_flush(avi_file *file, int only_flush_full)
|
||||
bitmap to an RGB encoded frame
|
||||
-------------------------------------------------*/
|
||||
|
||||
static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t *bitmap, UINT8 *data, UINT32 numbytes)
|
||||
static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t &bitmap, UINT8 *data, UINT32 numbytes)
|
||||
{
|
||||
int height = MIN(stream->height, bitmap->height());
|
||||
int width = MIN(stream->width, bitmap->width());
|
||||
int height = MIN(stream->height, bitmap.height());
|
||||
int width = MIN(stream->width, bitmap.width());
|
||||
UINT8 *dataend = data + numbytes;
|
||||
int x, y;
|
||||
|
||||
/* compressed video */
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
const UINT32 *source = &bitmap->pix32(y);
|
||||
const UINT32 *source = &bitmap.pix32(y);
|
||||
UINT8 *dest = data + (stream->height - 1 - y) * stream->width * 3;
|
||||
|
||||
for (x = 0; x < width && dest < dataend; x++)
|
||||
@ -2394,7 +2394,7 @@ static avi_error rgb32_compress_to_rgb(avi_stream *stream, const bitmap_t *bitma
|
||||
encoded frame to a YUY16 bitmap
|
||||
-------------------------------------------------*/
|
||||
|
||||
static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t *bitmap)
|
||||
static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t &bitmap)
|
||||
{
|
||||
const UINT16 *dataend = (const UINT16 *)(data + numbytes);
|
||||
int x, y;
|
||||
@ -2403,7 +2403,7 @@ static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data,
|
||||
for (y = 0; y < stream->height; y++)
|
||||
{
|
||||
const UINT16 *source = (const UINT16 *)data + y * stream->width;
|
||||
UINT16 *dest = &bitmap->pix16(y);
|
||||
UINT16 *dest = &bitmap.pix16(y);
|
||||
|
||||
/* switch off the compression */
|
||||
switch (stream->format)
|
||||
@ -2433,7 +2433,7 @@ static avi_error yuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data,
|
||||
bitmap to a YUV encoded frame
|
||||
-------------------------------------------------*/
|
||||
|
||||
static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t *bitmap, UINT8 *data, UINT32 numbytes)
|
||||
static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t &bitmap, UINT8 *data, UINT32 numbytes)
|
||||
{
|
||||
const UINT16 *dataend = (const UINT16 *)(data + numbytes);
|
||||
int x, y;
|
||||
@ -2441,7 +2441,7 @@ static avi_error yuy16_compress_to_yuy(avi_stream *stream, const bitmap_t *bitma
|
||||
/* compressed video */
|
||||
for (y = 0; y < stream->height; y++)
|
||||
{
|
||||
const UINT16 *source = &bitmap->pix16(y);
|
||||
const UINT16 *source = &bitmap.pix16(y);
|
||||
UINT16 *dest = (UINT16 *)data + y * stream->width;
|
||||
|
||||
/* switch off the compression */
|
||||
@ -2611,7 +2611,7 @@ error:
|
||||
HuffYUV-encoded frame to a YUY16 bitmap
|
||||
-------------------------------------------------*/
|
||||
|
||||
static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t *bitmap)
|
||||
static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *data, UINT32 numbytes, bitmap_t &bitmap)
|
||||
{
|
||||
huffyuv_data *huffyuv = stream->huffyuv;
|
||||
int prevlines = (stream->height > 288) ? 2 : 1;
|
||||
@ -2625,7 +2625,7 @@ static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *da
|
||||
/* compressed video */
|
||||
for (y = 0; y < stream->height; y++)
|
||||
{
|
||||
UINT16 *dest = &bitmap->pix16(y);
|
||||
UINT16 *dest = &bitmap.pix16(y);
|
||||
|
||||
/* handle the first four bytes independently */
|
||||
x = 0;
|
||||
@ -2713,8 +2713,8 @@ static avi_error huffyuv_decompress_to_yuy16(avi_stream *stream, const UINT8 *da
|
||||
lastprevy = lastprevcb = lastprevcr = 0;
|
||||
for (y = 0; y < stream->height; y++)
|
||||
{
|
||||
UINT16 *prevrow = &bitmap->pix16(y - prevlines);
|
||||
UINT16 *dest = &bitmap->pix16(y);
|
||||
UINT16 *prevrow = &bitmap.pix16(y - prevlines);
|
||||
UINT16 *dest = &bitmap.pix16(y);
|
||||
|
||||
/* handle the first four bytes independently */
|
||||
x = 0;
|
||||
|
@ -143,11 +143,11 @@ const char *avi_error_string(avi_error err);
|
||||
const avi_movie_info *avi_get_movie_info(avi_file *file);
|
||||
UINT32 avi_first_sample_in_frame(avi_file *file, UINT32 framenum);
|
||||
|
||||
avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t *bitmap);
|
||||
avi_error avi_read_video_frame_yuy16(avi_file *file, UINT32 framenum, bitmap_t &bitmap);
|
||||
avi_error avi_read_sound_samples(avi_file *file, int channel, UINT32 firstsample, UINT32 numsamples, INT16 *output);
|
||||
|
||||
avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t *bitmap);
|
||||
avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t *bitmap);
|
||||
avi_error avi_append_video_frame_yuy16(avi_file *file, const bitmap_t &bitmap);
|
||||
avi_error avi_append_video_frame_rgb32(avi_file *file, const bitmap_t &bitmap);
|
||||
avi_error avi_append_sound_samples(avi_file *file, int channel, const INT16 *samples, UINT32 numsamples, UINT32 sampleskip);
|
||||
|
||||
#endif
|
||||
|
@ -56,53 +56,22 @@
|
||||
|
||||
bitmap_t::bitmap_t()
|
||||
: m_alloc(NULL),
|
||||
m_base(NULL),
|
||||
m_rowpixels(0),
|
||||
m_width(0),
|
||||
m_height(0),
|
||||
m_format(BITMAP_FORMAT_INVALID),
|
||||
m_bpp(0),
|
||||
m_palette(NULL),
|
||||
m_cliprect(0, 0, 0, 0)
|
||||
m_palette(NULL)
|
||||
{
|
||||
// deallocate intializes all other fields
|
||||
deallocate();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// bitmap_t - basic constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bitmap_t::bitmap_t(int width, int height, bitmap_format format, int xslop, int yslop)
|
||||
: m_alloc(NULL),
|
||||
m_base(NULL),
|
||||
m_rowpixels((width + 2 * xslop + 7) & ~7),
|
||||
m_width(width),
|
||||
m_height(height),
|
||||
m_format(format),
|
||||
m_bpp(format_to_bpp(format)),
|
||||
m_palette(NULL),
|
||||
m_cliprect(0, width - 1, 0, height - 1)
|
||||
m_palette(NULL)
|
||||
{
|
||||
// fail if invalid format
|
||||
if (m_bpp == 0)
|
||||
throw std::bad_alloc();
|
||||
|
||||
// allocate memory for the bitmap itself
|
||||
size_t allocbytes = m_rowpixels * (m_height + 2 * yslop) * m_bpp / 8;
|
||||
m_alloc = new UINT8[allocbytes];
|
||||
|
||||
// clear to 0 by default
|
||||
memset(m_alloc, 0, allocbytes);
|
||||
|
||||
// compute the base
|
||||
m_base = m_alloc + (m_rowpixels * yslop + xslop) * (m_bpp / 8);
|
||||
// allocate intializes all other fields
|
||||
allocate(width, height, format, xslop, yslop);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// bitmap_t - basic constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
bitmap_t::bitmap_t(void *base, int width, int height, int rowpixels, bitmap_format format)
|
||||
: m_alloc(NULL),
|
||||
m_base(base),
|
||||
@ -126,12 +95,64 @@ bitmap_t::bitmap_t(void *base, int width, int height, int rowpixels, bitmap_form
|
||||
|
||||
bitmap_t::~bitmap_t()
|
||||
{
|
||||
// dereference the palette
|
||||
if (m_palette != NULL)
|
||||
palette_deref(m_palette);
|
||||
// delete any existing stuff
|
||||
deallocate();
|
||||
}
|
||||
|
||||
// free any allocated memory
|
||||
|
||||
//-------------------------------------------------
|
||||
// allocate -- (re)allocate memory for the bitmap
|
||||
// at the given size, destroying anything that
|
||||
// already exists
|
||||
//-------------------------------------------------
|
||||
|
||||
void bitmap_t::allocate(int width, int height, bitmap_format format, int xslop, int yslop)
|
||||
{
|
||||
// delete any existing stuff
|
||||
deallocate();
|
||||
|
||||
// initialize fields
|
||||
m_rowpixels = (width + 2 * xslop + 7) & ~7;
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
m_format = format;
|
||||
m_bpp = format_to_bpp(format);
|
||||
if (m_bpp == 0)
|
||||
throw std::bad_alloc();
|
||||
m_cliprect.set(0, width - 1, 0, height - 1);
|
||||
|
||||
// allocate memory for the bitmap itself
|
||||
size_t allocbytes = m_rowpixels * (m_height + 2 * yslop) * m_bpp / 8;
|
||||
m_alloc = new UINT8[allocbytes];
|
||||
|
||||
// clear to 0 by default
|
||||
memset(m_alloc, 0, allocbytes);
|
||||
|
||||
// compute the base
|
||||
m_base = m_alloc + (m_rowpixels * yslop + xslop) * (m_bpp / 8);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// deallocate -- reset to an invalid bitmap,
|
||||
// deleting all allocated stuff
|
||||
//-------------------------------------------------
|
||||
|
||||
void bitmap_t::deallocate()
|
||||
{
|
||||
// delete any existing stuff
|
||||
set_palette(NULL);
|
||||
delete[] m_alloc;
|
||||
m_alloc = NULL;
|
||||
m_base = NULL;
|
||||
|
||||
// reset all fields
|
||||
m_rowpixels = 0;
|
||||
m_width = 0;
|
||||
m_height = 0;
|
||||
m_format = BITMAP_FORMAT_INVALID;
|
||||
m_bpp = 0;
|
||||
m_cliprect.set(0, -1, 0, -1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -137,10 +137,13 @@ public:
|
||||
INT32 rowbytes() const { return m_rowpixels * m_bpp / 8; }
|
||||
UINT8 bpp() const { return m_bpp; }
|
||||
bitmap_format format() const { return m_format; }
|
||||
bool valid() const { return (m_format != BITMAP_FORMAT_INVALID); }
|
||||
palette_t *palette() const { return m_palette; }
|
||||
const rectangle &cliprect() const { return m_cliprect; }
|
||||
|
||||
// helpers
|
||||
// operations
|
||||
void allocate(int width, int height, bitmap_format format, int xslop = 0, int yslop = 0);
|
||||
void deallocate();
|
||||
void clone_existing(const bitmap_t &srcbitmap);
|
||||
void set_palette(palette_t *palette);
|
||||
void fill(rgb_t color) { fill(color, m_cliprect); }
|
||||
|
@ -904,14 +904,14 @@ static png_error write_deflated_chunk(core_file *fp, UINT8 *data, UINT32 type, U
|
||||
bitmap to a palettized image
|
||||
-------------------------------------------------*/
|
||||
|
||||
static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap_t *bitmap, int palette_length, const rgb_t *palette)
|
||||
static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette)
|
||||
{
|
||||
int rowbytes;
|
||||
int x, y;
|
||||
|
||||
/* set the common info */
|
||||
pnginfo->width = bitmap->width();
|
||||
pnginfo->height = bitmap->height();
|
||||
pnginfo->width = bitmap.width();
|
||||
pnginfo->height = bitmap.height();
|
||||
pnginfo->bit_depth = 8;
|
||||
pnginfo->color_type = 3;
|
||||
pnginfo->num_palette = 256;
|
||||
@ -943,7 +943,7 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
|
||||
/* copy in the pixels, specifying a NULL filter */
|
||||
for (y = 0; y < pnginfo->height; y++)
|
||||
{
|
||||
UINT16 *src = &bitmap->pix16(y);
|
||||
UINT16 *src = &bitmap.pix16(y);
|
||||
UINT8 *dst = pnginfo->image + y * (rowbytes + 1);
|
||||
|
||||
/* store the filter byte, then copy the data */
|
||||
@ -961,15 +961,15 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
|
||||
bitmap to an RGB image
|
||||
-------------------------------------------------*/
|
||||
|
||||
static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *bitmap, int palette_length, const rgb_t *palette)
|
||||
static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette)
|
||||
{
|
||||
int alpha = (bitmap->format() == BITMAP_FORMAT_ARGB32);
|
||||
int alpha = (bitmap.format() == BITMAP_FORMAT_ARGB32);
|
||||
int rowbytes;
|
||||
int x, y;
|
||||
|
||||
/* set the common info */
|
||||
pnginfo->width = bitmap->width();
|
||||
pnginfo->height = bitmap->height();
|
||||
pnginfo->width = bitmap.width();
|
||||
pnginfo->height = bitmap.height();
|
||||
pnginfo->bit_depth = 8;
|
||||
pnginfo->color_type = alpha ? 6 : 2;
|
||||
rowbytes = pnginfo->width * (alpha ? 4 : 3);
|
||||
@ -982,15 +982,15 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
|
||||
/* copy in the pixels, specifying a NULL filter */
|
||||
for (y = 0; y < pnginfo->height; y++)
|
||||
{
|
||||
UINT32 *src32 = &bitmap->pix32(y);
|
||||
UINT16 *src16 = &bitmap->pix16(y);
|
||||
UINT32 *src32 = &bitmap.pix32(y);
|
||||
UINT16 *src16 = &bitmap.pix16(y);
|
||||
UINT8 *dst = pnginfo->image + y * (rowbytes + 1);
|
||||
|
||||
/* store the filter byte, then copy the data */
|
||||
*dst++ = 0;
|
||||
|
||||
/* 16bpp palettized format */
|
||||
if (bitmap->format() == BITMAP_FORMAT_INDEXED16)
|
||||
if (bitmap.format() == BITMAP_FORMAT_INDEXED16)
|
||||
{
|
||||
for (x = 0; x < pnginfo->width; x++)
|
||||
{
|
||||
@ -1002,7 +1002,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
|
||||
}
|
||||
|
||||
/* RGB formats */
|
||||
else if (bitmap->format() == BITMAP_FORMAT_RGB15)
|
||||
else if (bitmap.format() == BITMAP_FORMAT_RGB15)
|
||||
{
|
||||
for (x = 0; x < pnginfo->width; x++)
|
||||
{
|
||||
@ -1014,7 +1014,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
|
||||
}
|
||||
|
||||
/* 32-bit RGB direct */
|
||||
else if (bitmap->format() == BITMAP_FORMAT_RGB32)
|
||||
else if (bitmap.format() == BITMAP_FORMAT_RGB32)
|
||||
{
|
||||
for (x = 0; x < pnginfo->width; x++)
|
||||
{
|
||||
@ -1026,7 +1026,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
|
||||
}
|
||||
|
||||
/* 32-bit ARGB direct */
|
||||
else if (bitmap->format() == BITMAP_FORMAT_ARGB32)
|
||||
else if (bitmap.format() == BITMAP_FORMAT_ARGB32)
|
||||
{
|
||||
for (x = 0; x < pnginfo->width; x++)
|
||||
{
|
||||
@ -1052,14 +1052,14 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t *
|
||||
chunks to the given file
|
||||
-------------------------------------------------*/
|
||||
|
||||
static png_error write_png_stream(core_file *fp, png_info *pnginfo, const bitmap_t *bitmap, int palette_length, const rgb_t *palette)
|
||||
static png_error write_png_stream(core_file *fp, png_info *pnginfo, const bitmap_t &bitmap, int palette_length, const rgb_t *palette)
|
||||
{
|
||||
UINT8 tempbuff[16];
|
||||
png_text *text;
|
||||
png_error error;
|
||||
|
||||
/* create an unfiltered image in either palette or RGB form */
|
||||
if (bitmap->format() == BITMAP_FORMAT_INDEXED16 && palette_length <= 256)
|
||||
if (bitmap.format() == BITMAP_FORMAT_INDEXED16 && palette_length <= 256)
|
||||
error = convert_bitmap_to_image_palette(pnginfo, bitmap, palette_length, palette);
|
||||
else
|
||||
error = convert_bitmap_to_image_rgb(pnginfo, bitmap, palette_length, palette);
|
||||
@ -1108,7 +1108,7 @@ handle_error:
|
||||
|
||||
|
||||
|
||||
png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t *bitmap, int palette_length, const UINT32 *palette)
|
||||
png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette)
|
||||
{
|
||||
png_info pnginfo;
|
||||
png_error error;
|
||||
@ -1143,7 +1143,7 @@ png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t *bitmap, int
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
png_error mng_capture_start(core_file *fp, bitmap_t *bitmap, double rate)
|
||||
png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate)
|
||||
{
|
||||
UINT8 mhdr[28];
|
||||
png_error error;
|
||||
@ -1152,8 +1152,8 @@ png_error mng_capture_start(core_file *fp, bitmap_t *bitmap, double rate)
|
||||
return PNGERR_FILE_ERROR;
|
||||
|
||||
memset(mhdr, 0, 28);
|
||||
put_32bit(mhdr + 0, bitmap->width());
|
||||
put_32bit(mhdr + 4, bitmap->height());
|
||||
put_32bit(mhdr + 0, bitmap.width());
|
||||
put_32bit(mhdr + 4, bitmap.height());
|
||||
put_32bit(mhdr + 8, rate);
|
||||
put_32bit(mhdr + 24, 0x0041); /* Simplicity profile */
|
||||
/* frame count and play time unspecified because
|
||||
@ -1165,7 +1165,7 @@ png_error mng_capture_start(core_file *fp, bitmap_t *bitmap, double rate)
|
||||
return PNGERR_NONE;
|
||||
}
|
||||
|
||||
png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t *bitmap, int palette_length, const UINT32 *palette)
|
||||
png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette)
|
||||
{
|
||||
return write_png_stream(fp, info, bitmap, palette_length, palette);
|
||||
}
|
||||
|
@ -156,10 +156,10 @@ png_error png_read_bitmap(core_file *fp, bitmap_t **bitmap);
|
||||
png_error png_expand_buffer_8bit(png_info *p);
|
||||
|
||||
png_error png_add_text(png_info *pnginfo, const char *keyword, const char *text);
|
||||
png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t *bitmap, int palette_length, const UINT32 *palette);
|
||||
png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette);
|
||||
|
||||
png_error mng_capture_start(core_file *fp, bitmap_t *bitmap, double rate);
|
||||
png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t *bitmap, int palette_length, const UINT32 *palette);
|
||||
png_error mng_capture_start(core_file *fp, bitmap_t &bitmap, double rate);
|
||||
png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int palette_length, const UINT32 *palette);
|
||||
png_error mng_capture_stop(core_file *fp);
|
||||
|
||||
#endif /* __PNG_H__ */
|
||||
|
@ -90,7 +90,7 @@ static VIDEO_START(k3)
|
||||
state->m_bg_tilemap = tilemap_create(machine, get_k3_bg_tile_info, tilemap_scan_rows, 16, 16, 32, 64);
|
||||
}
|
||||
|
||||
static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
|
||||
static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
k3_state *state = machine.driver_data<k3_state>();
|
||||
const gfx_element *gfx = machine.gfx[0];
|
||||
|
@ -1520,7 +1520,7 @@ static SCREEN_UPDATE( 39in1 )
|
||||
|
||||
for(y = 0; y <= (state->m_lcd_regs.lccr2 & PXA255_LCCR2_LPP); y++)
|
||||
{
|
||||
UINT32 *d = &bitmap->pix32(y);
|
||||
UINT32 *d = &bitmap.pix32(y);
|
||||
for(x = 0; x <= (state->m_lcd_regs.lccr1 & PXA255_LCCR1_PPL); x++)
|
||||
{
|
||||
d[x] = state->m_pxa255_lcd_palette[state->m_pxa255_lcd_framebuffer[y*((state->m_lcd_regs.lccr1 & PXA255_LCCR1_PPL) + 1) + x]];
|
||||
|
@ -88,7 +88,7 @@ static SCREEN_UPDATE( ace )
|
||||
int offs;
|
||||
|
||||
/* first of all, fill the screen with the background color */
|
||||
bitmap->fill(0, cliprect);
|
||||
bitmap.fill(0, cliprect);
|
||||
|
||||
drawgfx_opaque(bitmap, cliprect, screen.machine().gfx[1],
|
||||
0,
|
||||
|
@ -115,7 +115,7 @@ static SCREEN_UPDATE( acefruit )
|
||||
|
||||
for( y = 0; y < 8; y++ )
|
||||
{
|
||||
UINT16 *dst = &bitmap->pix16(y + ( row * 8 ), x + ( col * 16 ) );
|
||||
UINT16 *dst = &bitmap.pix16(y + ( row * 8 ), x + ( col * 16 ) );
|
||||
*( dst ) = *( gfxdata + ( ( spriterow + y ) * gfx->line_modulo ) + ( ( spriteindex % 64 ) >> 1 ) );
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ static SCREEN_UPDATE( acefruit )
|
||||
{
|
||||
for( y = 0; y < 8; y++ )
|
||||
{
|
||||
UINT16 *dst = &bitmap->pix16(y + ( row * 8 ), x + ( col * 16 ) );
|
||||
UINT16 *dst = &bitmap.pix16(y + ( row * 8 ), x + ( col * 16 ) );
|
||||
*( dst ) = 0;
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ static TILE_GET_INFO( ac_get_tx_tile_info )
|
||||
0);
|
||||
}
|
||||
|
||||
static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority, int pri_mask)
|
||||
static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority, int pri_mask)
|
||||
{
|
||||
acommand_state *state = machine.driver_data<acommand_state>();
|
||||
UINT16 *spriteram16 = state->m_spriteram;
|
||||
@ -203,38 +203,38 @@ g & 40
|
||||
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f*/
|
||||
static const UINT8 led_fill[0x10] = { 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x00,0x00,0x00,0x00,0x00,0x00};
|
||||
|
||||
static void draw_led(bitmap_t *bitmap, int x, int y,UINT8 value)
|
||||
static void draw_led(bitmap_t &bitmap, int x, int y,UINT8 value)
|
||||
{
|
||||
bitmap->plot_box(x, y, 6, 10, 0x00000000);
|
||||
bitmap.plot_box(x, y, 6, 10, 0x00000000);
|
||||
|
||||
/*a*/
|
||||
bitmap->pix16(y+0, x+1) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+0, x+2) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+0, x+3) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+0, x+1) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+0, x+2) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+0, x+3) = ((led_fill[value] & 0x0001) ? LED_ON : LED_OFF);
|
||||
/*b*/
|
||||
bitmap->pix16(y+1, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+2, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+3, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+1, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+2, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+3, x+4) = ((led_fill[value] & 0x0002) ? LED_ON : LED_OFF);
|
||||
/*c*/
|
||||
bitmap->pix16(y+5, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+6, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+7, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+5, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+6, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+7, x+4) = ((led_fill[value] & 0x0004) ? LED_ON : LED_OFF);
|
||||
/*d*/
|
||||
bitmap->pix16(y+8, x+1) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+8, x+2) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+8, x+3) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+8, x+1) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+8, x+2) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+8, x+3) = ((led_fill[value] & 0x0008) ? LED_ON : LED_OFF);
|
||||
/*e*/
|
||||
bitmap->pix16(y+5, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+6, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+7, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+5, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+6, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+7, x+0) = ((led_fill[value] & 0x0010) ? LED_ON : LED_OFF);
|
||||
/*f*/
|
||||
bitmap->pix16(y+1, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+2, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+3, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+1, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+2, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+3, x+0) = ((led_fill[value] & 0x0020) ? LED_ON : LED_OFF);
|
||||
/*g*/
|
||||
bitmap->pix16(y+4, x+1) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+4, x+2) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
|
||||
bitmap->pix16(y+4, x+3) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+4, x+1) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+4, x+2) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
|
||||
bitmap.pix16(y+4, x+3) = ((led_fill[value] & 0x0040) ? LED_ON : LED_OFF);
|
||||
}
|
||||
|
||||
|
||||
|
@ -183,7 +183,7 @@ void adp_state::video_start()
|
||||
|
||||
static H63484_DISPLAY_PIXELS( acrtc_display_pixels )
|
||||
{
|
||||
bitmap->pix16(y, x) = data & 0xf;
|
||||
bitmap.pix16(y, x) = data & 0xf;
|
||||
}
|
||||
|
||||
bool adp_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
|
||||
@ -191,7 +191,7 @@ bool adp_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rec
|
||||
bitmap.fill(0, cliprect);
|
||||
|
||||
/* graphics */
|
||||
m_h63484->update_screen(&bitmap, cliprect);
|
||||
m_h63484->update_screen(bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -216,10 +216,10 @@ static SCREEN_UPDATE( adp )
|
||||
{
|
||||
b &= (HD63484_RAM_SIZE - 1);
|
||||
src = hd63484_ram_r(state->m_hd63484, b, 0xffff);
|
||||
bitmap->pix16(y, x ) = ((src & 0x000f) >> 0) << 0;
|
||||
bitmap->pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0;
|
||||
bitmap->pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0;
|
||||
bitmap->pix16(y, x + 3) = ((src & 0xf000) >> 12) << 0;
|
||||
bitmap.pix16(y, x ) = ((src & 0x000f) >> 0) << 0;
|
||||
bitmap.pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0;
|
||||
bitmap.pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0;
|
||||
bitmap.pix16(y, x + 3) = ((src & 0xf000) >> 12) << 0;
|
||||
b++;
|
||||
}
|
||||
}
|
||||
@ -243,10 +243,10 @@ if (!screen.machine().input().code_pressed(KEYCODE_O)) // debug: toggle window
|
||||
|
||||
if (x <= w && x + sx >= 0 && x + sx < (hd63484_regs_r(state->m_hd63484, 0xca/2, 0xffff) & 0x0fff) * 4)
|
||||
{
|
||||
bitmap->pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0;
|
||||
bitmap->pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0;
|
||||
bitmap->pix16(y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0;
|
||||
bitmap->pix16(y, x + sx + 3) = ((src & 0xf000) >> 12) << 0;
|
||||
bitmap.pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0;
|
||||
bitmap.pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0;
|
||||
bitmap.pix16(y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0;
|
||||
bitmap.pix16(y, x + sx + 3) = ((src & 0xf000) >> 12) << 0;
|
||||
}
|
||||
b++;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ static VIDEO_START( hanaroku )
|
||||
{
|
||||
}
|
||||
|
||||
static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
|
||||
static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
albazc_state *state = machine.driver_data<albazc_state>();
|
||||
int i;
|
||||
@ -79,7 +79,7 @@ static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rect
|
||||
|
||||
static SCREEN_UPDATE(hanaroku)
|
||||
{
|
||||
bitmap->fill(0x1f0, cliprect); // ???
|
||||
bitmap.fill(0x1f0, cliprect); // ???
|
||||
draw_sprites(screen.machine(), bitmap, cliprect);
|
||||
return 0;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ SCREEN_UPDATE(aristmk6)
|
||||
|
||||
popmessage("%d %d %04x %d",state->m_test_x,state->m_test_y,state->m_start_offs,state->m_type);
|
||||
|
||||
bitmap->fill(get_black_pen(screen.machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(screen.machine()), cliprect);
|
||||
|
||||
count = (state->m_start_offs);
|
||||
|
||||
@ -87,7 +87,7 @@ SCREEN_UPDATE(aristmk6)
|
||||
b = (b << 3) | (b & 0x7);
|
||||
|
||||
if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
bitmap->pix32(y, x) = r | g<<8 | b<<16;
|
||||
bitmap.pix32(y, x) = r | g<<8 | b<<16;
|
||||
|
||||
count+=2;
|
||||
}
|
||||
@ -98,7 +98,7 @@ SCREEN_UPDATE(aristmk6)
|
||||
color = blit_ram[count];
|
||||
|
||||
if((x)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
bitmap->pix32(y, x) = screen.machine().pens[color];
|
||||
bitmap.pix32(y, x) = screen.machine().pens[color];
|
||||
|
||||
count++;
|
||||
}
|
||||
|
@ -134,20 +134,20 @@ static WRITE8_HANDLER( spaceint_videoram_w )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
static void plot_byte( running_machine &machine, bitmap_t *bitmap, UINT8 y, UINT8 x, UINT8 data, UINT8 color )
|
||||
static void plot_byte( running_machine &machine, bitmap_t &bitmap, UINT8 y, UINT8 x, UINT8 data, UINT8 color )
|
||||
{
|
||||
astinvad_state *state = machine.driver_data<astinvad_state>();
|
||||
pen_t fore_pen = MAKE_RGB(pal1bit(color >> 0), pal1bit(color >> 2), pal1bit(color >> 1));
|
||||
UINT8 flip_xor = state->m_screen_flip & 7;
|
||||
|
||||
bitmap->pix32(y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK;
|
||||
bitmap->pix32(y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK;
|
||||
bitmap->pix32(y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : RGB_BLACK;
|
||||
bitmap->pix32(y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : RGB_BLACK;
|
||||
bitmap->pix32(y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : RGB_BLACK;
|
||||
bitmap->pix32(y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : RGB_BLACK;
|
||||
bitmap->pix32(y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : RGB_BLACK;
|
||||
bitmap->pix32(y, x + (7 ^ flip_xor)) = (data & 0x80) ? fore_pen : RGB_BLACK;
|
||||
bitmap.pix32(y, x + (0 ^ flip_xor)) = (data & 0x01) ? fore_pen : RGB_BLACK;
|
||||
bitmap.pix32(y, x + (1 ^ flip_xor)) = (data & 0x02) ? fore_pen : RGB_BLACK;
|
||||
bitmap.pix32(y, x + (2 ^ flip_xor)) = (data & 0x04) ? fore_pen : RGB_BLACK;
|
||||
bitmap.pix32(y, x + (3 ^ flip_xor)) = (data & 0x08) ? fore_pen : RGB_BLACK;
|
||||
bitmap.pix32(y, x + (4 ^ flip_xor)) = (data & 0x10) ? fore_pen : RGB_BLACK;
|
||||
bitmap.pix32(y, x + (5 ^ flip_xor)) = (data & 0x20) ? fore_pen : RGB_BLACK;
|
||||
bitmap.pix32(y, x + (6 ^ flip_xor)) = (data & 0x40) ? fore_pen : RGB_BLACK;
|
||||
bitmap.pix32(y, x + (7 ^ flip_xor)) = (data & 0x80) ? fore_pen : RGB_BLACK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,7 +90,7 @@ static VIDEO_START( astrocorp )
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect )
|
||||
static void draw_sprites( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
astrocorp_state *state = machine.driver_data<astrocorp_state>();
|
||||
UINT16 *source = state->m_spriteram;
|
||||
@ -143,9 +143,9 @@ static SCREEN_UPDATE(astrocorp)
|
||||
astrocorp_state *state = screen.machine().driver_data<astrocorp_state>();
|
||||
|
||||
if (state->m_screen_enable & 1)
|
||||
copybitmap(bitmap, state->m_bitmap, 0,0,0,0, cliprect);
|
||||
copybitmap(bitmap, *state->m_bitmap, 0,0,0,0, cliprect);
|
||||
else
|
||||
bitmap->fill(get_black_pen(screen.machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(screen.machine()), cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -163,7 +163,7 @@ static WRITE16_HANDLER( astrocorp_draw_sprites_w )
|
||||
UINT16 now = COMBINE_DATA(&state->m_draw_sprites);
|
||||
|
||||
if (!old && now)
|
||||
draw_sprites(space->machine(), state->m_bitmap, space->machine().primary_screen->visible_area());
|
||||
draw_sprites(space->machine(), *state->m_bitmap, space->machine().primary_screen->visible_area());
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( astrocorp_eeprom_w )
|
||||
|
@ -376,7 +376,7 @@ static WRITE8_HANDLER( tomahawk_video_control_2_w )
|
||||
}
|
||||
|
||||
|
||||
static void video_update_common( running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, pen_t *pens )
|
||||
static void video_update_common( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, pen_t *pens )
|
||||
{
|
||||
astrof_state *state = machine.driver_data<astrof_state>();
|
||||
offs_t offs;
|
||||
@ -410,9 +410,9 @@ static void video_update_common( running_machine &machine, bitmap_t *bitmap, con
|
||||
pen_t pen = (data & 0x01) ? fore_pen : back_pen;
|
||||
|
||||
if (state->m_flipscreen)
|
||||
bitmap->pix32(y, 255 - x) = pen;
|
||||
bitmap.pix32(y, 255 - x) = pen;
|
||||
else
|
||||
bitmap->pix32(y, x) = pen;
|
||||
bitmap.pix32(y, x) = pen;
|
||||
|
||||
x = x + 1;
|
||||
data = data >> 1;
|
||||
|
@ -154,7 +154,7 @@ static SCREEN_UPDATE( atarisy4 )
|
||||
for (y = cliprect.min_y; y <= cliprect.max_y; ++y)
|
||||
{
|
||||
UINT16 *src = &state->m_screen_ram[(offset + (4096 * y)) / 2];
|
||||
UINT32 *dest = &bitmap->pix32(y, cliprect.min_x);
|
||||
UINT32 *dest = &bitmap.pix32(y, cliprect.min_x);
|
||||
int x;
|
||||
|
||||
for (x = cliprect.min_x; x < cliprect.max_x; x += 2)
|
||||
|
@ -66,7 +66,7 @@ static SCREEN_UPDATE( avalnche )
|
||||
else
|
||||
pen = (data & 0x80) ? RGB_BLACK : RGB_WHITE;
|
||||
|
||||
bitmap->pix32(y, x) = pen;
|
||||
bitmap.pix32(y, x) = pen;
|
||||
|
||||
data = data << 1;
|
||||
x = x + 1;
|
||||
|
@ -94,8 +94,8 @@ static SCREEN_UPDATE( backfire_left )
|
||||
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
|
||||
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
|
||||
|
||||
screen.machine().priority_bitmap->fill(0);
|
||||
bitmap->fill(0x100, cliprect);
|
||||
screen.machine().priority_bitmap.fill(0);
|
||||
bitmap.fill(0x100, cliprect);
|
||||
|
||||
if (state->m_left_priority[0] == 0)
|
||||
{
|
||||
@ -127,8 +127,8 @@ static SCREEN_UPDATE( backfire_right )
|
||||
deco16ic_pf_update(state->m_deco_tilegen1, state->m_pf1_rowscroll, state->m_pf2_rowscroll);
|
||||
deco16ic_pf_update(state->m_deco_tilegen2, state->m_pf3_rowscroll, state->m_pf4_rowscroll);
|
||||
|
||||
screen.machine().priority_bitmap->fill(0);
|
||||
bitmap->fill(0x500, cliprect);
|
||||
screen.machine().priority_bitmap.fill(0);
|
||||
bitmap.fill(0x500, cliprect);
|
||||
|
||||
if (state->m_right_priority[0] == 0)
|
||||
{
|
||||
|
@ -180,7 +180,7 @@ static SCREEN_UPDATE( beaminv )
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
pen_t pen = (data & 0x01) ? RGB_WHITE : RGB_BLACK;
|
||||
bitmap->pix32(y, x) = pen;
|
||||
bitmap.pix32(y, x) = pen;
|
||||
|
||||
data = data >> 1;
|
||||
x = x + 1;
|
||||
|
@ -465,7 +465,7 @@ static SCREEN_UPDATE( berzerk )
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
pen_t pen = (data & 0x80) ? pens[color >> 4] : RGB_BLACK;
|
||||
bitmap->pix32(y, x) = pen;
|
||||
bitmap.pix32(y, x) = pen;
|
||||
|
||||
x = x + 1;
|
||||
data = data << 1;
|
||||
@ -474,7 +474,7 @@ static SCREEN_UPDATE( berzerk )
|
||||
for (; i < 8; i++)
|
||||
{
|
||||
pen_t pen = (data & 0x80) ? pens[color & 0x0f] : RGB_BLACK;
|
||||
bitmap->pix32(y, x) = pen;
|
||||
bitmap.pix32(y, x) = pen;
|
||||
|
||||
x = x + 1;
|
||||
data = data << 1;
|
||||
|
@ -107,7 +107,7 @@ Note: sprite chip is different than the other Big Striker sets and they
|
||||
include several similiarities with other Playmark games (including
|
||||
the sprite end code and the data being offset (i.e. spriteram starting from 0x16/2))
|
||||
*/
|
||||
static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect)
|
||||
static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bestleag_state *state = machine.driver_data<bestleag_state>();
|
||||
UINT16 *spriteram16 = state->m_spriteram;
|
||||
|
@ -376,7 +376,7 @@ static SCREEN_UPDATE( bfcobra )
|
||||
{
|
||||
UINT16 y_offset = (y + state->m_v_scroll) * 256;
|
||||
src = &state->m_video_ram[offset + y_offset];
|
||||
dest = &bitmap->pix32(y);
|
||||
dest = &bitmap.pix32(y);
|
||||
|
||||
for (x = cliprect.min_x; x <= cliprect.max_x / 2; ++x)
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ static TIMER_DEVICE_CALLBACK( big10_interrupt )
|
||||
static VIDEO_START( big10 )
|
||||
{
|
||||
VIDEO_START_CALL(generic_bitmapped);
|
||||
v9938_init (machine, 0, *machine.primary_screen, machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, big10_vdp_interrupt);
|
||||
v9938_init (machine, 0, *machine.primary_screen, *machine.generic.tmpbitmap, MODEL_V9938, VDP_MEM, big10_vdp_interrupt);
|
||||
v9938_reset(0);
|
||||
}
|
||||
|
||||
|
@ -462,7 +462,7 @@ static SCREEN_UPDATE(bingor)
|
||||
bingor_state *state = screen.machine().driver_data<bingor_state>();
|
||||
int x,y,count;
|
||||
|
||||
bitmap->fill(get_black_pen(screen.machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(screen.machine()), cliprect);
|
||||
|
||||
count = (0x2000/2);
|
||||
|
||||
@ -475,22 +475,22 @@ static SCREEN_UPDATE(bingor)
|
||||
color = (state->m_blit_ram[count] & 0xf000)>>12;
|
||||
|
||||
if((x+3)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
bitmap->pix32(y, x+3) = screen.machine().pens[color];
|
||||
bitmap.pix32(y, x+3) = screen.machine().pens[color];
|
||||
|
||||
color = (state->m_blit_ram[count] & 0x0f00)>>8;
|
||||
|
||||
if((x+2)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
bitmap->pix32(y, x+2) = screen.machine().pens[color];
|
||||
bitmap.pix32(y, x+2) = screen.machine().pens[color];
|
||||
|
||||
color = (state->m_blit_ram[count] & 0x00f0)>>4;
|
||||
|
||||
if((x+1)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
bitmap->pix32(y, x+1) = screen.machine().pens[color];
|
||||
bitmap.pix32(y, x+1) = screen.machine().pens[color];
|
||||
|
||||
color = (state->m_blit_ram[count] & 0x000f)>>0;
|
||||
|
||||
if((x+0)<screen.visible_area().max_x && ((y)+0)<screen.visible_area().max_y)
|
||||
bitmap->pix32(y, x+0) = screen.machine().pens[color];
|
||||
bitmap.pix32(y, x+0) = screen.machine().pens[color];
|
||||
|
||||
count++;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ static VIDEO_START( blackt96 )
|
||||
{
|
||||
}
|
||||
|
||||
static void draw_strip(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int stripnum, int xbase, int ybase, int bg)
|
||||
static void draw_strip(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int stripnum, int xbase, int ybase, int bg)
|
||||
{
|
||||
blackt96_state *state = machine.driver_data<blackt96_state>();
|
||||
const gfx_element *gfxspr = machine.gfx[1];
|
||||
@ -98,7 +98,7 @@ static void draw_strip(running_machine &machine, bitmap_t *bitmap, const rectang
|
||||
|
||||
}
|
||||
|
||||
static void draw_main(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int bg)
|
||||
static void draw_main(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int bg)
|
||||
{
|
||||
blackt96_state *state = machine.driver_data<blackt96_state>();
|
||||
|
||||
@ -135,7 +135,7 @@ static SCREEN_UPDATE( blackt96 )
|
||||
int x,y;
|
||||
const gfx_element *gfx = screen.machine().gfx[2];
|
||||
|
||||
bitmap->fill(get_black_pen(screen.machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(screen.machine()), cliprect);
|
||||
|
||||
draw_main(screen.machine(),bitmap,cliprect,1);
|
||||
draw_main(screen.machine(),bitmap,cliprect,0);
|
||||
|
@ -101,7 +101,7 @@ static SCREEN_UPDATE(blitz68k)
|
||||
{
|
||||
for(x = 0; x < 512; x++)
|
||||
{
|
||||
bitmap->pix32(y, x) = screen.machine().pens[*src++];
|
||||
bitmap.pix32(y, x) = screen.machine().pens[*src++];
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,10 +123,10 @@ static SCREEN_UPDATE(blitz68k_noblit)
|
||||
for(x = 0; x < 512; )
|
||||
{
|
||||
UINT16 pen = *src++;
|
||||
bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 8) & 0xf];
|
||||
bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 12) & 0xf];
|
||||
bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 0) & 0xf];
|
||||
bitmap->pix32(y, x++) = screen.machine().pens[(pen >> 4) & 0xf];
|
||||
bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 8) & 0xf];
|
||||
bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 12) & 0xf];
|
||||
bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 0) & 0xf];
|
||||
bitmap.pix32(y, x++) = screen.machine().pens[(pen >> 4) & 0xf];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ static SCREEN_UPDATE( bmcbowl )
|
||||
*/
|
||||
|
||||
int x,y,z,pixdat;
|
||||
bitmap->fill(get_black_pen(screen.machine()), cliprect);
|
||||
bitmap.fill(get_black_pen(screen.machine()), cliprect);
|
||||
|
||||
z=0;
|
||||
for (y=0;y<230;y++)
|
||||
@ -150,30 +150,30 @@ static SCREEN_UPDATE( bmcbowl )
|
||||
pixdat = state->m_vid2[0x8000+z];
|
||||
|
||||
if(pixdat&0xff)
|
||||
bitmap->pix16(y, x+1) = (pixdat&0xff);
|
||||
bitmap.pix16(y, x+1) = (pixdat&0xff);
|
||||
if(pixdat>>8)
|
||||
bitmap->pix16(y, x) = (pixdat>>8);
|
||||
bitmap.pix16(y, x) = (pixdat>>8);
|
||||
|
||||
pixdat = state->m_vid2[z];
|
||||
|
||||
if(pixdat&0xff)
|
||||
bitmap->pix16(y, x+1) = (pixdat&0xff);
|
||||
bitmap.pix16(y, x+1) = (pixdat&0xff);
|
||||
if(pixdat>>8)
|
||||
bitmap->pix16(y, x) = (pixdat>>8);
|
||||
bitmap.pix16(y, x) = (pixdat>>8);
|
||||
|
||||
pixdat = state->m_vid1[0x8000+z];
|
||||
|
||||
if(pixdat&0xff)
|
||||
bitmap->pix16(y, x+1) = (pixdat&0xff);
|
||||
bitmap.pix16(y, x+1) = (pixdat&0xff);
|
||||
if(pixdat>>8)
|
||||
bitmap->pix16(y, x) = (pixdat>>8);
|
||||
bitmap.pix16(y, x) = (pixdat>>8);
|
||||
|
||||
pixdat = state->m_vid1[z];
|
||||
|
||||
if(pixdat&0xff)
|
||||
bitmap->pix16(y, x+1) = (pixdat&0xff);
|
||||
bitmap.pix16(y, x+1) = (pixdat&0xff);
|
||||
if(pixdat>>8)
|
||||
bitmap->pix16(y, x) = (pixdat>>8);
|
||||
bitmap.pix16(y, x) = (pixdat>>8);
|
||||
|
||||
z++;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ static WRITE32_HANDLER( ms32_bg1_ram_w )
|
||||
|
||||
/* ROZ Layers */
|
||||
|
||||
static void draw_roz(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, int priority, int chip)
|
||||
static void draw_roz(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, int priority, int chip)
|
||||
{
|
||||
bnstars_state *state = machine.driver_data<bnstars_state>();
|
||||
/* TODO: registers 0x40/4 / 0x44/4 and 0x50/4 / 0x54/4 are used, meaning unknown */
|
||||
@ -351,7 +351,7 @@ static WRITE32_HANDLER( ms32_pal1_ram_w )
|
||||
|
||||
|
||||
/* SPRITES based on tetrisp2 for now, readd priority bits later */
|
||||
static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle &cliprect, UINT32 *sprram_top, size_t sprram_size, int region)
|
||||
static void draw_sprites(running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect, UINT32 *sprram_top, size_t sprram_size, int region)
|
||||
{
|
||||
bnstars_state *state = machine.driver_data<bnstars_state>();
|
||||
/***************************************************************************
|
||||
@ -515,9 +515,9 @@ static SCREEN_UPDATE(bnstars_left)
|
||||
{
|
||||
bnstars_state *state = screen.machine().driver_data<bnstars_state>();
|
||||
|
||||
screen.machine().priority_bitmap->fill(0, cliprect);
|
||||
screen.machine().priority_bitmap.fill(0, cliprect);
|
||||
|
||||
bitmap->fill(0, cliprect); /* bg color */
|
||||
bitmap.fill(0, cliprect); /* bg color */
|
||||
|
||||
|
||||
tilemap_set_scrollx(state->m_ms32_bg_tilemap[0], 0, state->m_ms32_bg0_scroll[0x00/4] + state->m_ms32_bg0_scroll[0x08/4] + 0x10 );
|
||||
@ -540,9 +540,9 @@ static SCREEN_UPDATE(bnstars_right)
|
||||
{
|
||||
bnstars_state *state = screen.machine().driver_data<bnstars_state>();
|
||||
|
||||
screen.machine().priority_bitmap->fill(0, cliprect);
|
||||
screen.machine().priority_bitmap.fill(0, cliprect);
|
||||
|
||||
bitmap->fill(0x8000+0, cliprect); /* bg color */
|
||||
bitmap.fill(0x8000+0, cliprect); /* bg color */
|
||||
|
||||
|
||||
tilemap_set_scrollx(state->m_ms32_bg_tilemap[1], 0, state->m_ms32_bg1_scroll[0x00/4] + state->m_ms32_bg1_scroll[0x08/4] + 0x10 );
|
||||
|
@ -109,7 +109,7 @@ static PALETTE_INIT( boxer )
|
||||
palette_set_color(machine,3, MAKE_RGB(0x00,0x00,0x00));
|
||||
}
|
||||
|
||||
static void draw_boxer( running_machine &machine, bitmap_t* bitmap, const rectangle &cliprect )
|
||||
static void draw_boxer( running_machine &machine, bitmap_t &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
boxer_state *state = machine.driver_data<boxer_state>();
|
||||
int n;
|
||||
@ -162,7 +162,7 @@ static SCREEN_UPDATE( boxer )
|
||||
boxer_state *state = screen.machine().driver_data<boxer_state>();
|
||||
int i, j;
|
||||
|
||||
bitmap->fill(1, cliprect);
|
||||
bitmap.fill(1, cliprect);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user