summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/segahang.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-02 19:46:02 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-02 19:46:02 +0000
commitd3dc6db3f82a027276a37bae04f523a2d2c9f4dc (patch)
tree79e59e625bee745089068da0bfab162cc7626151 /src/mame/includes/segahang.h
parent08b42aabaadb7d4027139c43ae1968438a3d2c57 (diff)
Created new sprite device base class, which manages a bitmap
and a sparse bitmap for tracking which areas got updated. This allows sprites to be rendered independently to their own bitmap and then mixed in a final step. Converted the Sega sprite device over to this new model, and moved the mixing steps out of the sprite implementations and into the driver- specific video updates where it belongs. [Aaron Giles] Added some further methods and helpers to the bitmap_t and rectangle classes. [Aaron Giles] Created a sega_16bit_common_base class which handles the common Sega palette RAM mappings and open bus reads. [Aaron Giles]
Diffstat (limited to 'src/mame/includes/segahang.h')
-rw-r--r--src/mame/includes/segahang.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mame/includes/segahang.h b/src/mame/includes/segahang.h
index 03a9f3759b8..7c2767132c8 100644
--- a/src/mame/includes/segahang.h
+++ b/src/mame/includes/segahang.h
@@ -41,22 +41,24 @@
#include "machine/i8255.h"
#include "machine/segaic16.h"
#include "video/segaic16.h"
+#include "video/sega16sp.h"
// ======================> segahang_state
-class segahang_state : public driver_device
+class segahang_state : public sega_16bit_common_base
{
public:
// construction/destruction
segahang_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
+ : sega_16bit_common_base(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_subcpu(*this, "subcpu"),
m_soundcpu(*this, "soundcpu"),
m_mcu(*this, "mcu"),
m_i8255_1(*this, "i8255_1"),
m_i8255_2(*this, "i8255_2"),
+ m_sprites(*this, "sprites"),
m_workram(*this, "workram"),
m_sharrier_video(false),
m_adc_select(0)
@@ -87,6 +89,7 @@ public:
DECLARE_DRIVER_INIT(enduror);
DECLARE_DRIVER_INIT(endurobl);
DECLARE_DRIVER_INIT(endurob2);
+
// video updates
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -116,7 +119,8 @@ protected:
optional_device<i8751_device> m_mcu;
required_device<i8255_device> m_i8255_1;
required_device<i8255_device> m_i8255_2;
-
+ required_device<sega_16bit_sprite_device> m_sprites;
+
// memory pointers
required_shared_ptr<UINT16> m_workram;
@@ -126,4 +130,5 @@ protected:
// internal state
UINT8 m_adc_select;
+ bool m_shadow;
};