summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/epic12in.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/epic12in.hxx')
-rw-r--r--src/devices/video/epic12in.hxx53
1 files changed, 24 insertions, 29 deletions
diff --git a/src/devices/video/epic12in.hxx b/src/devices/video/epic12in.hxx
index a74249f986e..c43e24cf480 100644
--- a/src/devices/video/epic12in.hxx
+++ b/src/devices/video/epic12in.hxx
@@ -4,8 +4,7 @@
void epic12_device::FUNCNAME(BLIT_PARAMS)
{
- uint32_t* gfx2;
- int y, yf;
+ int yf;
#if REALLY_SIMPLE == 0
colour_t s_clr;
@@ -30,27 +29,26 @@ void epic12_device::FUNCNAME(BLIT_PARAMS)
colour_t clr0;
#endif
-
#endif
#if REALLY_SIMPLE == 1
#if TRANSPARENT == 1
- uint32_t pen;
+ u32 pen;
#endif
#else
- uint32_t pen;
+ u32 pen;
#endif
- uint32_t *bmp;
+ u32 *bmp;
#if FLIPX == 1
src_x += (dimx-1);
#endif
- if (flipy) { yf = -1; src_y += (dimy-1); }
- else { yf = +1; }
+ if (flipy) { yf = -1; src_y += (dimy-1); }
+ else { yf = +1; }
int starty = 0;
- const int dst_y_end = dst_y_start+dimy;
+ const int dst_y_end = dst_y_start + dimy;
if (dst_y_start < clip->min_y)
starty = clip->min_y - dst_y_start;
@@ -61,13 +59,13 @@ void epic12_device::FUNCNAME(BLIT_PARAMS)
// check things are safe to draw (note, if the source would wrap round an edge of the 0x2000*0x1000 vram we don't draw.. not sure what the hw does anyway)
// ddpdfk triggers this on boss explosions so it needs fixing
#if FLIPX == 1
- if ((src_x &0x1fff) < ((src_x-(dimx-1))&0x1fff))
+ if ((src_x & 0x1fff) < ((src_x-(dimx-1)) & 0x1fff))
{
// popmessage("sprite gets clipped off src_x %04x dimx %04x\n", src_x, dimx);
return;
}
#else
- if ((src_x &0x1fff) > ((src_x+(dimx-1))&0x1fff))
+ if ((src_x & 0x1fff) > ((src_x+(dimx-1)) & 0x1fff))
{
// popmessage("sprite gets clipped off src_x %04x dimx %04x\n", src_x, dimx);
return;
@@ -75,7 +73,7 @@ void epic12_device::FUNCNAME(BLIT_PARAMS)
#endif
int startx = 0;
- const int dst_x_end = dst_x_start+dimx;
+ const int dst_x_end = dst_x_start + dimx;
if (dst_x_start < clip->min_x)
startx = clip->min_x - dst_x_start;
@@ -86,7 +84,7 @@ void epic12_device::FUNCNAME(BLIT_PARAMS)
// wrong/unsafe slowdown sim
if (dimy > starty && dimx > startx)
{
- blit_delay += (dimy - starty)*(dimx - startx);
+ blit_delay += (dimy - starty) * (dimx - startx);
//printf("delay is now %d\n", blit_delay);
}
@@ -94,48 +92,45 @@ void epic12_device::FUNCNAME(BLIT_PARAMS)
#if BLENDED == 1
#if _SMODE == 0
#if _DMODE == 0
- const uint8_t* salpha_table = colrtable[s_alpha];
- const uint8_t* dalpha_table = colrtable[d_alpha];
+ const u8* salpha_table = colrtable[s_alpha];
+ const u8* dalpha_table = colrtable[d_alpha];
#endif
#if _DMODE == 5
- const uint8_t* salpha_table = colrtable[s_alpha];
+ const u8* salpha_table = colrtable[s_alpha];
#endif
#if _DMODE == 1
- const uint8_t* salpha_table = colrtable[s_alpha];
+ const u8* salpha_table = colrtable[s_alpha];
#endif
#endif
#if _SMODE == 2
#if _DMODE == 0
-
- const uint8_t* dalpha_table = colrtable[d_alpha];
+ const u8* dalpha_table = colrtable[d_alpha];
#endif
#endif
#endif
-
-
- for (y = starty; y < dimy; y++)
+ for (int y = starty; y < dimy; y++)
{
bmp = &bitmap->pix(dst_y_start + y, dst_x_start+startx);
- const int ysrc_index = ((src_y + yf * y) & 0x0fff) * 0x2000;
- gfx2 = gfx + ysrc_index;
+ const int ysrc_index = ((src_y + yf * y) & 0x0fff) * 0x2000;
+ u32* gfx2 = gfx + ysrc_index;
#if FLIPX == 1
- gfx2 += (src_x-startx);
+ gfx2 += (src_x - startx);
#else
- gfx2 += (src_x+startx);
+ gfx2 += (src_x + startx);
#endif
#if 1
- const uint32_t* end = bmp+(dimx-startx);
+ const u32* end = bmp + (dimx - startx);
#else
// maybe we can do some SSE type optimizations on larger blocks? right now this just results in more code and slower compiling tho.
const int width = dimx-startx;
- const uint32_t* end = bmp+(width);
+ const u32* end = bmp+(width);
if (width<0) return;
@@ -155,7 +150,7 @@ void epic12_device::FUNCNAME(BLIT_PARAMS)
bigblocks--;
}
#endif
- while (bmp<end)
+ while (bmp < end)
{
#include "epic12pixel.hxx"
}