diff options
Diffstat (limited to 'src/mame/video/atarimo.h')
-rw-r--r-- | src/mame/video/atarimo.h | 137 |
1 files changed, 68 insertions, 69 deletions
diff --git a/src/mame/video/atarimo.h b/src/mame/video/atarimo.h index b8b08b2b2f8..a93295e7e94 100644 --- a/src/mame/video/atarimo.h +++ b/src/mame/video/atarimo.h @@ -50,8 +50,7 @@ #define MCFG_ATARI_MOTION_OBJECTS_ADD(_tag, _screen, _config) \ MCFG_DEVICE_ADD(_tag, ATARI_MOTION_OBJECTS, 0) \ MCFG_VIDEO_SET_SCREEN(_screen) \ - atari_motion_objects_device::static_set_config(*device, _config); \ - + atari_motion_objects_device::static_set_config(*device, _config); //************************************************************************** @@ -79,20 +78,20 @@ struct atari_motion_objects_config UINT16 m_maxcolors; // maximum number of colors (remove me) UINT8 m_transpen; // transparent pen index - entry m_link_entry; // mask for the link - dual_entry m_code_entry; // mask for the code index - dual_entry m_color_entry; // mask for the color/priority - entry m_xpos_entry; // mask for the X position - entry m_ypos_entry; // mask for the Y position - entry m_width_entry; // mask for the width, in tiles*/ - entry m_height_entry; // mask for the height, in tiles - entry m_hflip_entry; // mask for the horizontal flip - entry m_vflip_entry; // mask for the vertical flip - entry m_priority_entry; // mask for the priority - entry m_neighbor_entry; // mask for the neighbor - entry m_absolute_entry; // mask for absolute coordinates - entry m_special_entry; // mask for the special value - UINT16 m_specialvalue; // resulting value to indicate "special" + entry m_link_entry; // mask for the link + dual_entry m_code_entry; // mask for the code index + dual_entry m_color_entry; // mask for the color/priority + entry m_xpos_entry; // mask for the X position + entry m_ypos_entry; // mask for the Y position + entry m_width_entry; // mask for the width, in tiles*/ + entry m_height_entry; // mask for the height, in tiles + entry m_hflip_entry; // mask for the horizontal flip + entry m_vflip_entry; // mask for the vertical flip + entry m_priority_entry; // mask for the priority + entry m_neighbor_entry; // mask for the neighbor + entry m_absolute_entry; // mask for absolute coordinates + entry m_special_entry; // mask for the special value + UINT16 m_specialvalue; // resulting value to indicate "special" }; @@ -114,7 +113,7 @@ public: // static configuration helpers static void static_set_config(device_t &device, const atari_motion_objects_config &config); - + // getters int bank() const { return m_bank; } int xscroll() const { return m_xscroll; } @@ -133,7 +132,7 @@ public: // rendering virtual void draw(bitmap_ind16 &bitmap, const rectangle &cliprect); void apply_stain(bitmap_ind16 &bitmap, UINT16 *pf, UINT16 *mo, int x, int y); - + // memory access UINT16 &slipram(int offset) { return m_slipram[offset]; } @@ -173,11 +172,11 @@ private: UINT16 mask() const { return m_mask; } private: - UINT16 m_word; // word index - UINT16 m_shift; // shift amount - UINT16 m_mask; // final mask + UINT16 m_word; // word index + UINT16 m_shift; // shift amount + UINT16 m_mask; // final mask }; - + // a sprite parameter, which is a word index + shift + mask class dual_sprite_parameter { @@ -188,65 +187,65 @@ private: UINT16 mask() const { return m_lower.mask() | (m_upper.mask() << m_uppershift); } private: - sprite_parameter m_lower; // lower parameter - sprite_parameter m_upper; // upper parameter - UINT16 m_uppershift; // upper shift + sprite_parameter m_lower; // lower parameter + sprite_parameter m_upper; // upper parameter + UINT16 m_uppershift; // upper shift }; - + // parameter masks - sprite_parameter m_linkmask; // mask for the link - sprite_parameter m_gfxmask; // mask for the graphics bank - dual_sprite_parameter m_codemask; // mask for the code index - dual_sprite_parameter m_colormask; // mask for the color - sprite_parameter m_xposmask; // mask for the X position - sprite_parameter m_yposmask; // mask for the Y position - sprite_parameter m_widthmask; // mask for the width, in tiles*/ - sprite_parameter m_heightmask; // mask for the height, in tiles - sprite_parameter m_hflipmask; // mask for the horizontal flip - sprite_parameter m_vflipmask; // mask for the vertical flip - sprite_parameter m_prioritymask; // mask for the priority - sprite_parameter m_neighbormask; // mask for the neighbor - sprite_parameter m_absolutemask; // mask for absolute coordinates - sprite_parameter m_specialmask; // mask for the special value + sprite_parameter m_linkmask; // mask for the link + sprite_parameter m_gfxmask; // mask for the graphics bank + dual_sprite_parameter m_codemask; // mask for the code index + dual_sprite_parameter m_colormask; // mask for the color + sprite_parameter m_xposmask; // mask for the X position + sprite_parameter m_yposmask; // mask for the Y position + sprite_parameter m_widthmask; // mask for the width, in tiles*/ + sprite_parameter m_heightmask; // mask for the height, in tiles + sprite_parameter m_hflipmask; // mask for the horizontal flip + sprite_parameter m_vflipmask; // mask for the vertical flip + sprite_parameter m_prioritymask; // mask for the priority + sprite_parameter m_neighbormask; // mask for the neighbor + sprite_parameter m_absolutemask; // mask for absolute coordinates + sprite_parameter m_specialmask; // mask for the special value // derived tile information - int m_tilewidth; // width of non-rotated tile - int m_tileheight; // height of non-rotated tile - int m_tilexshift; // bits to shift X coordinate when drawing - int m_tileyshift; // bits to shift Y coordinate when drawing + int m_tilewidth; // width of non-rotated tile + int m_tileheight; // height of non-rotated tile + int m_tilexshift; // bits to shift X coordinate when drawing + int m_tileyshift; // bits to shift Y coordinate when drawing // derived bitmap information - int m_bitmapwidth; // width of the full playfield bitmap - int m_bitmapheight; // height of the full playfield bitmap - int m_bitmapxmask; // x coordinate mask for the playfield bitmap - int m_bitmapymask; // y coordinate mask for the playfield bitmap - + int m_bitmapwidth; // width of the full playfield bitmap + int m_bitmapheight; // height of the full playfield bitmap + int m_bitmapxmask; // x coordinate mask for the playfield bitmap + int m_bitmapymask; // y coordinate mask for the playfield bitmap + // derived sprite information - int m_entrycount; // number of entries per bank - int m_entrybits; // number of bits needed to represent entrycount - int m_spriterammask; // combined mask when accessing sprite RAM with raw addresses - int m_spriteramsize; // total size of sprite RAM, in entries - int m_slipshift; // log2(pixels_per_SLIP) - int m_sliprammask; // combined mask when accessing SLIP RAM with raw addresses - int m_slipramsize; // total size of SLIP RAM, in entries + int m_entrycount; // number of entries per bank + int m_entrybits; // number of bits needed to represent entrycount + int m_spriterammask; // combined mask when accessing sprite RAM with raw addresses + int m_spriteramsize; // total size of sprite RAM, in entries + int m_slipshift; // log2(pixels_per_SLIP) + int m_sliprammask; // combined mask when accessing SLIP RAM with raw addresses + int m_slipramsize; // total size of SLIP RAM, in entries // live state - emu_timer * m_force_update_timer; // timer for forced updating - UINT32 m_bank; // current bank number - UINT32 m_xscroll; // xscroll offset - UINT32 m_yscroll; // yscroll offset + emu_timer * m_force_update_timer; // timer for forced updating + UINT32 m_bank; // current bank number + UINT32 m_xscroll; // xscroll offset + UINT32 m_yscroll; // yscroll offset // arrays optional_shared_ptr<UINT16> m_slipram; // pointer to the SLIP RAM - dynamic_array<UINT16> m_codelookup; // lookup table for codes - dynamic_array<UINT8> m_colorlookup; // lookup table for colors - dynamic_array<UINT8> m_gfxlookup; // lookup table for graphics - - UINT16 m_activelist[MAX_PER_BANK*4]; // active list - UINT16 * m_activelast; // last entry in the active list - - UINT32 m_last_xpos; // (during processing) the previous X position - UINT32 m_next_xpos; // (during processing) the next X position + dynamic_array<UINT16> m_codelookup; // lookup table for codes + dynamic_array<UINT8> m_colorlookup; // lookup table for colors + dynamic_array<UINT8> m_gfxlookup; // lookup table for graphics + + UINT16 m_activelist[MAX_PER_BANK*4]; // active list + UINT16 * m_activelast; // last entry in the active list + + UINT32 m_last_xpos; // (during processing) the previous X position + UINT32 m_next_xpos; // (during processing) the next X position }; |