diff options
Diffstat (limited to 'src/mame/video/irobot.cpp')
-rw-r--r-- | src/mame/video/irobot.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/mame/video/irobot.cpp b/src/mame/video/irobot.cpp index 6ee40245158..0d97e8b0e95 100644 --- a/src/mame/video/irobot.cpp +++ b/src/mame/video/irobot.cpp @@ -41,7 +41,7 @@ PALETTE_INIT_MEMBER(irobot_state, irobot) { - const UINT8 *color_prom = memregion("proms")->base(); + const uint8_t *color_prom = memregion("proms")->base(); int i; /* convert the color prom for the text palette */ @@ -64,7 +64,7 @@ WRITE8_MEMBER(irobot_state::irobot_paletteram_w) { int r,g,b; int bits,intensity; - UINT32 color; + uint32_t color; color = ((data << 1) | (offset & 0x01)) ^ 0x1ff; intensity = color & 0x07; @@ -78,14 +78,14 @@ WRITE8_MEMBER(irobot_state::irobot_paletteram_w) } -void irobot_state::_irobot_poly_clear(UINT8 *bitmap_base) +void irobot_state::_irobot_poly_clear(uint8_t *bitmap_base) { memset(bitmap_base, 0, BITMAP_WIDTH * m_screen->height()); } void irobot_state::irobot_poly_clear() { - UINT8 *bitmap_base = m_bufsel ? m_polybitmap2.get() : m_polybitmap1.get(); + uint8_t *bitmap_base = m_bufsel ? m_polybitmap2.get() : m_polybitmap1.get(); _irobot_poly_clear(bitmap_base); } @@ -99,8 +99,8 @@ void irobot_state::video_start() { /* Setup 2 bitmaps for the polygon generator */ int height = m_screen->height(); - m_polybitmap1 = std::make_unique<UINT8[]>(BITMAP_WIDTH * height); - m_polybitmap2 = std::make_unique<UINT8[]>(BITMAP_WIDTH * height); + m_polybitmap1 = std::make_unique<uint8_t[]>(BITMAP_WIDTH * height); + m_polybitmap2 = std::make_unique<uint8_t[]>(BITMAP_WIDTH * height); /* clear the bitmaps so we start with valid palette look-up values for drawing */ _irobot_poly_clear(m_polybitmap1.get()); @@ -163,7 +163,7 @@ void irobot_state::video_start() modified from a routine written by Andrew Caldwell */ -void irobot_state::draw_line(UINT8 *polybitmap, int x1, int y1, int x2, int y2, int col) +void irobot_state::draw_line(uint8_t *polybitmap, int x1, int y1, int x2, int y2, int col) { int dx,dy,sx,sy,cx,cy; @@ -213,14 +213,14 @@ void irobot_state::draw_line(UINT8 *polybitmap, int x1, int y1, int x2, int y2, void irobot_state::irobot_run_video() { - UINT8 *polybitmap; - UINT16 *combase16 = (UINT16 *)m_combase; + uint8_t *polybitmap; + uint16_t *combase16 = (uint16_t *)m_combase; int sx,sy,ex,ey,sx2,ey2; int color; - UINT32 d1; + uint32_t d1; int lpnt,spnt,spnt2; int shp; - INT32 word1,word2; + int32_t word1,word2; logerror("Starting Polygon Generator, Clear=%d\n",m_vg_clear); @@ -266,7 +266,7 @@ void irobot_state::irobot_run_video() color = sy & 0x3f; sy = ROUND_TO_PIXEL(sy); sx = combase16[spnt+3]; - word1 = (INT16)combase16[spnt+2]; + word1 = (int16_t)combase16[spnt+2]; ex = sx + word1 * (ey - sy + 1); draw_line(polybitmap, ROUND_TO_PIXEL(sx),sy,ROUND_TO_PIXEL(ex),ey,color); spnt+=4; @@ -285,7 +285,7 @@ void irobot_state::irobot_run_video() sy = ROUND_TO_PIXEL(sy); spnt+=4; - word1 = (INT16)combase16[spnt]; + word1 = (int16_t)combase16[spnt]; ey = combase16[spnt+1]; if (word1 != -1 || ey != 0xffff) { @@ -294,7 +294,7 @@ void irobot_state::irobot_run_video() // sx += word1; - word2 = (INT16)combase16[spnt2]; + word2 = (int16_t)combase16[spnt2]; ey2 = ROUND_TO_PIXEL(combase16[spnt2+1]); spnt2+=2; @@ -318,7 +318,7 @@ void irobot_state::irobot_run_video() if (sy > ey) { - word1 = (INT16)combase16[spnt]; + word1 = (int16_t)combase16[spnt]; ey = combase16[spnt+1]; if (word1 == -1 && ey == 0xffff) break; @@ -330,7 +330,7 @@ void irobot_state::irobot_run_video() if (sy > ey2) { - word2 = (INT16)combase16[spnt2]; + word2 = (int16_t)combase16[spnt2]; ey2 = ROUND_TO_PIXEL(combase16[spnt2+1]); spnt2+=2; } @@ -345,10 +345,10 @@ void irobot_state::irobot_run_video() -UINT32 irobot_state::screen_update_irobot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t irobot_state::screen_update_irobot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 *videoram = m_videoram; - UINT8 *bitmap_base = m_bufsel ? m_polybitmap1.get() : m_polybitmap2.get(); + uint8_t *videoram = m_videoram; + uint8_t *bitmap_base = m_bufsel ? m_polybitmap1.get() : m_polybitmap2.get(); int x, y, offs; /* copy the polygon bitmap */ |