diff options
author | bmcphail <bmcphail@vcmame.net> | 2019-02-26 10:06:57 -0500 |
---|---|---|
committer | bmcphail <bmcphail@vcmame.net> | 2019-02-26 10:06:57 -0500 |
commit | 461380aa637c8e2f3f0238877613142610a41b24 (patch) | |
tree | b65b1162ea03f2166e7b9468b957aef75e439957 | |
parent | b5758a744aa657c0c080bb29b643b73d79297911 (diff) |
Bac06 - remove camel case, remove mapping hack in favour of tilemap.h change NW
-rw-r--r-- | src/emu/tilemap.h | 1 | ||||
-rw-r--r-- | src/mame/video/decbac06.cpp | 23 |
2 files changed, 15 insertions, 9 deletions
diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h index 7acd649e2e0..d0c929658ef 100644 --- a/src/emu/tilemap.h +++ b/src/emu/tilemap.h @@ -535,6 +535,7 @@ public: void set_flip(u32 attributes) { if (m_attributes != attributes) { m_attributes = attributes; mappings_update(); } } // dirtying + void mark_mapping_dirty() { mappings_update(); } void mark_tile_dirty(tilemap_memory_index memindex); void mark_all_dirty() { m_all_tiles_dirty = true; m_all_tiles_clean = false; } diff --git a/src/mame/video/decbac06.cpp b/src/mame/video/decbac06.cpp index 051d79ed126..f3a6de15792 100644 --- a/src/mame/video/decbac06.cpp +++ b/src/mame/video/decbac06.cpp @@ -381,21 +381,26 @@ void deco_bac06_device::deco_bac06_pf_draw_bootleg(bitmap_ind16 &bitmap,const re WRITE16_MEMBER( deco_bac06_device::pf_control_0_w ) { - int oldRegister0 = m_pf_control_0[0]; + int old_register0 = m_pf_control_0[0]; offset &= 3; COMBINE_DATA(&m_pf_control_0[offset]); - bool dirtyAll = false; + bool dirty_all = false; if (offset==0) { - if ((oldRegister0&2)!=(m_pf_control_0[offset]&2)) + if ((old_register0&2)!=(m_pf_control_0[offset]&2)) { - int flip = m_flip_screen; - set_flip_screen(flip^1); - set_flip_screen(flip); // Hack to force tilemap.cpp mappings_update() to be called - dirtyAll = true; + // The tilemap has changed from row major to column major or vice versa. + // Must force an update of the mapping. + m_pf8x8_tilemap[0]->mark_mapping_dirty(); + m_pf8x8_tilemap[1]->mark_mapping_dirty(); + m_pf8x8_tilemap[2]->mark_mapping_dirty(); + m_pf16x16_tilemap[0]->mark_mapping_dirty(); + m_pf16x16_tilemap[1]->mark_mapping_dirty(); + m_pf16x16_tilemap[2]->mark_mapping_dirty(); + dirty_all = true; } } if (offset==2) @@ -408,12 +413,12 @@ WRITE16_MEMBER( deco_bac06_device::pf_control_0_w ) if (strcmp(machine().system().name,"stadhero")) printf("tilemap ram bank change to %d\n", newbank&1); - dirtyAll = true; + dirty_all = true; m_rambank = newbank&1; } } - if (dirtyAll) + if (dirty_all) { m_pf8x8_tilemap[0]->mark_all_dirty(); m_pf8x8_tilemap[1]->mark_all_dirty(); |