summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/sega/calorie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/sega/calorie.cpp')
-rw-r--r--src/mame/sega/calorie.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mame/sega/calorie.cpp b/src/mame/sega/calorie.cpp
index 734defb6bce..4f39ce3fa55 100644
--- a/src/mame/sega/calorie.cpp
+++ b/src/mame/sega/calorie.cpp
@@ -90,6 +90,8 @@ Notes:
#include "tilemap.h"
+namespace {
+
class calorie_state : public driver_device
{
public:
@@ -174,8 +176,6 @@ void calorie_state::video_start()
uint32_t calorie_state::screen_update_calorie(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- int x;
-
if (m_bg_bank & 0x10)
{
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
@@ -186,7 +186,7 @@ uint32_t calorie_state::screen_update_calorie(screen_device &screen, bitmap_ind1
m_fg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
}
- for (x = 0x400; x >= 0; x -= 4)
+ for (int x = m_sprites.bytes() - 4; x >= 0; x -= 4)
{
int xpos, ypos, tileno, color, flipx, flipy;
@@ -211,7 +211,7 @@ uint32_t calorie_state::screen_update_calorie(screen_device &screen, bitmap_ind1
if (m_sprites[x + 1] & 0x10)
{
- /* 32x32 sprites */
+ /* 32x32 sprites */
m_gfxdecode->gfx(3)->transpen(bitmap,cliprect, tileno | 0x40, color, flipx, flipy, xpos, ypos - 31, 0);
}
else
@@ -591,6 +591,8 @@ void calorie_state::init_calorieb()
memcpy(m_decrypted_opcodes, memregion("maincpu")->base() + 0x10000, 0x8000);
}
+} // anonymous namespace
+
/*************************************
*