trunk/src/mame/video/champbas.c
| r250133 | r250134 | |
| 129 | 129 | |
| 130 | 130 | |
| 131 | 131 | |
| 132 | /************************************* |
| 133 | * |
| 134 | * Callbacks for the TileMap code |
| 135 | * |
| 136 | *************************************/ |
| 137 | |
| 132 | 138 | TILE_GET_INFO_MEMBER(champbas_state::champbas_get_bg_tile_info) |
| 133 | 139 | { |
| 134 | 140 | int code = m_vram[tile_index] | (m_gfx_bank << 8); |
| r250133 | r250134 | |
| 147 | 153 | |
| 148 | 154 | |
| 149 | 155 | |
| 156 | /************************************* |
| 157 | * |
| 158 | * Video system start |
| 159 | * |
| 160 | *************************************/ |
| 161 | |
| 150 | 162 | VIDEO_START_MEMBER(champbas_state,champbas) |
| 151 | 163 | { |
| 152 | 164 | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(champbas_state::champbas_get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); |
| r250133 | r250134 | |
| 159 | 171 | |
| 160 | 172 | |
| 161 | 173 | |
| 174 | /************************************* |
| 175 | * |
| 176 | * Memory handlers |
| 177 | * |
| 178 | *************************************/ |
| 179 | |
| 162 | 180 | WRITE8_MEMBER(champbas_state::tilemap_w) |
| 163 | 181 | { |
| 164 | 182 | m_vram[offset] = data; |
| r250133 | r250134 | |
| 189 | 207 | |
| 190 | 208 | |
| 191 | 209 | |
| 210 | /************************************* |
| 211 | * |
| 212 | * Video update |
| 213 | * |
| 214 | *************************************/ |
| 215 | |
| 192 | 216 | void champbas_state::champbas_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 193 | 217 | { |
| 194 | 218 | gfx_element* const gfx = m_gfxdecode->gfx(1); |
| r250133 | r250134 | |
| 267 | 291 | } |
| 268 | 292 | |
| 269 | 293 | |
| 270 | | |
| 271 | 294 | UINT32 champbas_state::screen_update_champbas(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 272 | 295 | { |
| 273 | 296 | m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |