1
1
// license:BSD-3-Clause
2
2
// 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
5
5
6
6
#pragma once
7
7
@@ -52,6 +52,7 @@ class cclimber_state : public driver_device
52
52
protected:
53
53
virtual void machine_start () override ;
54
54
virtual void machine_reset () override { m_maincpu->pulse_input_line (INPUT_LINE_RESET, attotime::zero); }
55
+ virtual void video_start () override ;
55
56
56
57
required_device<cpu_device> m_maincpu;
57
58
optional_device<cpu_device> m_audiocpu;
@@ -89,7 +90,6 @@ class cclimber_state : public driver_device
89
90
void cclimber_draw_bigsprite (screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
90
91
void toprollr_draw_sprites (bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx);
91
92
92
-
93
93
private:
94
94
optional_shared_ptr<uint8_t > m_column_scroll;
95
95
optional_shared_ptr<uint8_t > m_decrypted_opcodes;
@@ -99,7 +99,6 @@ class cclimber_state : public driver_device
99
99
uint8_t bagmanf_a000_r ();
100
100
void bagmanf_vblank_irq (int state);
101
101
102
- DECLARE_VIDEO_START (cclimber);
103
102
void cclimber_palette (palette_device &palette) const ;
104
103
105
104
uint32_t screen_update_cclimber (screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -122,13 +121,15 @@ class swimmer_state : public cclimber_state
122
121
cclimber_state (mconfig, type, tag),
123
122
m_swimmer_background_color (*this , " bgcolor" ),
124
123
m_soundlatch (*this , " soundlatch" )
125
- {}
124
+ { }
126
125
127
- void swimmer_root (machine_config &config);
128
126
void swimmer (machine_config &config);
129
127
void au (machine_config &config);
130
128
void guzzler (machine_config &config);
131
129
130
+ protected:
131
+ virtual void video_start () override ;
132
+
132
133
private:
133
134
optional_shared_ptr<uint8_t > m_swimmer_background_color;
134
135
optional_device<generic_latch_8_device> m_soundlatch;
@@ -145,19 +146,16 @@ class swimmer_state : public cclimber_state
145
146
void au_map (address_map &map);
146
147
void guzzler_map (address_map &map);
147
148
148
- static rgb_t au_palette (u32 raw);
149
-
150
149
void swimmer_palette (palette_device &palette) const ;
151
150
void swimmer_draw_sprites (bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element* gfx);
152
151
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; }
154
154
TILE_GET_INFO_MEMBER (swimmer_get_pf_tile_info);
155
- DECLARE_VIDEO_START (swimmer);
156
- DECLARE_VIDEO_START (au);
157
155
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 ;
161
159
162
160
static constexpr int SWIMMER_BG_SPLIT = 0x18 * 8 ;
163
161
};
@@ -171,12 +169,15 @@ class toprollr_state : public cclimber_state
171
169
m_toprollr_bg_coloram (*this , " bg_coloram" ),
172
170
m_bank1 (*this , " bank1" ),
173
171
m_bank1d (*this , " bank1d" )
174
- {}
172
+ { }
175
173
176
174
void toprollr (machine_config &config);
177
175
178
176
void init_toprollr ();
179
177
178
+ protected:
179
+ virtual void video_start () override ;
180
+
180
181
private:
181
182
optional_shared_ptr<uint8_t > m_toprollr_bg_videoram;
182
183
optional_shared_ptr<uint8_t > m_toprollr_bg_coloram;
@@ -193,18 +194,17 @@ class toprollr_state : public cclimber_state
193
194
TILE_GET_INFO_MEMBER (toprollr_get_pf_tile_info);
194
195
TILE_GET_INFO_MEMBER (toprollr_get_bs_tile_info);
195
196
TILE_GET_INFO_MEMBER (toproller_get_bg_tile_info);
196
- DECLARE_VIDEO_START (toprollr);
197
197
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 ;
200
200
};
201
201
202
202
class yamato_state : public cclimber_state
203
203
{
204
204
public:
205
205
yamato_state (const machine_config &mconfig, device_type type, const char * tag) :
206
206
cclimber_state (mconfig, type, tag)
207
- {}
207
+ { }
208
208
209
209
void yamato (machine_config &config);
210
210
@@ -225,10 +225,10 @@ class yamato_state : public cclimber_state
225
225
void yamato_palette (palette_device &palette) const ;
226
226
uint32_t screen_update_yamato (screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
227
227
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 ;
230
230
231
231
static constexpr int YAMATO_SKY_PEN_BASE = 0x60 ;
232
232
};
233
233
234
- #endif // MAME_NICHIBUT_CCLIMBER_H
234
+ #endif // MAME_NICHIBUTSU_CCLIMBER_H
0 commit comments