11//  license:BSD-3-Clause
22//  copyright-holders:Nicola Salmoria
3- #ifndef  MAME_NICHIBUT_CCLIMBER_H 
4- #define  MAME_NICHIBUT_CCLIMBER_H 
3+ #ifndef  MAME_NICHIBUTSU_CCLIMBER_H 
4+ #define  MAME_NICHIBUTSU_CCLIMBER_H 
55
66#pragma  once
77
@@ -52,6 +52,7 @@ class cclimber_state : public driver_device
5252protected: 
5353	virtual  void  machine_start () override ;
5454	virtual  void  machine_reset () override  { m_maincpu->pulse_input_line (INPUT_LINE_RESET, attotime::zero); }
55+ 	virtual  void  video_start () override ;
5556
5657	required_device<cpu_device> m_maincpu;
5758	optional_device<cpu_device> m_audiocpu;
@@ -89,7 +90,6 @@ class cclimber_state : public driver_device
8990	void  cclimber_draw_bigsprite (screen_device &screen, bitmap_ind16 &bitmap, const  rectangle &cliprect);
9091	void  toprollr_draw_sprites (bitmap_ind16 &bitmap, const  rectangle &cliprect, gfx_element *gfx);
9192
92- 
9393private: 
9494	optional_shared_ptr<uint8_t > m_column_scroll;
9595	optional_shared_ptr<uint8_t > m_decrypted_opcodes;
@@ -99,7 +99,6 @@ class cclimber_state : public driver_device
9999	uint8_t  bagmanf_a000_r ();
100100	void  bagmanf_vblank_irq (int  state);
101101
102- 	DECLARE_VIDEO_START (cclimber);
103102	void  cclimber_palette (palette_device &palette) const ;
104103
105104	uint32_t  screen_update_cclimber (screen_device &screen, bitmap_ind16 &bitmap, const  rectangle &cliprect);
@@ -122,13 +121,15 @@ class swimmer_state : public cclimber_state
122121		cclimber_state (mconfig, type, tag),
123122		m_swimmer_background_color (*this , " bgcolor" 
124123		m_soundlatch (*this , " soundlatch" 
125- 	{}
124+ 	{  }
126125
127- 	void  swimmer_root (machine_config &config);
128126	void  swimmer (machine_config &config);
129127	void  au (machine_config &config);
130128	void  guzzler (machine_config &config);
131129
130+ protected: 
131+ 	virtual  void  video_start () override ;
132+ 
132133private: 
133134	optional_shared_ptr<uint8_t > m_swimmer_background_color;
134135	optional_device<generic_latch_8_device> m_soundlatch;
@@ -145,19 +146,16 @@ class swimmer_state : public cclimber_state
145146	void  au_map (address_map &map);
146147	void  guzzler_map (address_map &map);
147148
148- 	static  rgb_t  au_palette (u32  raw);
149- 
150149	void  swimmer_palette (palette_device &palette) const ;
151150	void  swimmer_draw_sprites (bitmap_ind16 &bitmap, const  rectangle &cliprect, gfx_element* gfx);
152151	uint32_t  screen_update_swimmer (screen_device &screen, bitmap_ind16 &bitmap, const  rectangle &cliprect);
153- 	void  swimmer_set_background_pen ();
152+ 	void  set_background_pen ();
153+ 	void  set_sidepen (uint16_t  pen) { m_sidepen = pen; }
154154	TILE_GET_INFO_MEMBER (swimmer_get_pf_tile_info);
155- 	DECLARE_VIDEO_START (swimmer);
156- 	DECLARE_VIDEO_START (au);
157155
158- 	bool  m_swimmer_side_background_enabled  = false ;
159- 	bool  m_swimmer_palettebank  = false ;
160- 	int  m_swimmer_sidepen  = 0x120 ;
156+ 	bool  m_side_background_enabled  = false ;
157+ 	bool  m_palettebank  = false ;
158+ 	uint16_t  m_sidepen  = 0 ;
161159
162160	static  constexpr  int  SWIMMER_BG_SPLIT = 0x18  * 8 ;
163161};
@@ -171,12 +169,15 @@ class toprollr_state : public cclimber_state
171169		m_toprollr_bg_coloram (*this , " bg_coloram" 
172170		m_bank1 (*this , " bank1" 
173171		m_bank1d (*this , " bank1d" 
174- 	{}
172+ 	{  }
175173
176174	void  toprollr (machine_config &config);
177175
178176	void  init_toprollr ();
179177
178+ protected: 
179+ 	virtual  void  video_start () override ;
180+ 
180181private: 
181182	optional_shared_ptr<uint8_t > m_toprollr_bg_videoram;
182183	optional_shared_ptr<uint8_t > m_toprollr_bg_coloram;
@@ -193,18 +194,17 @@ class toprollr_state : public cclimber_state
193194	TILE_GET_INFO_MEMBER (toprollr_get_pf_tile_info);
194195	TILE_GET_INFO_MEMBER (toprollr_get_bs_tile_info);
195196	TILE_GET_INFO_MEMBER (toproller_get_bg_tile_info);
196- 	DECLARE_VIDEO_START (toprollr);
197197
198- 	tilemap_t  *m_toproller_bg_tilemap  = nullptr ;
199- 	uint8_t  m_toprollr_rombank  = 0U ;
198+ 	tilemap_t  *m_bg_tilemap  = nullptr ;
199+ 	uint8_t  m_rombank  = 0 ;
200200};
201201
202202class  yamato_state  : public  cclimber_state 
203203{
204204public: 
205205	yamato_state (const  machine_config &mconfig, device_type type, const  char * tag) :
206206		cclimber_state (mconfig, type, tag)
207- 	{}
207+ 	{  }
208208
209209	void  yamato (machine_config &config);
210210
@@ -225,10 +225,10 @@ class yamato_state : public cclimber_state
225225	void  yamato_palette (palette_device &palette) const ;
226226	uint32_t  screen_update_yamato (screen_device &screen, bitmap_ind16 &bitmap, const  rectangle &cliprect);
227227
228- 	uint8_t  m_yamato_p0 = 0U ;
229- 	uint8_t  m_yamato_p1 = 0U ;
228+ 	uint8_t  m_yamato_p0 = 0 ;
229+ 	uint8_t  m_yamato_p1 = 0 ;
230230
231231	static  constexpr  int  YAMATO_SKY_PEN_BASE = 0x60 ;
232232};
233233
234- #endif  //  MAME_NICHIBUT_CCLIMBER_H 
234+ #endif  //  MAME_NICHIBUTSU_CCLIMBER_H 
0 commit comments