summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/model3.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-12-17 11:10:30 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-12-17 11:10:30 +0100
commit174720a64ddeed98078139dc0e4dd7aed15f91d4 (patch)
treeb22e4fb4f1a210751cadc5aa01d73113b8e9857f /src/mame/video/model3.cpp
parentbe38cd71bb958d651ba91db8db439edc9c31b21e (diff)
removed auto_bitmap_ind*_alloc and auto_bitmap_rgb32_alloc and replaced with std::unique_ptr (nw)
auto_alloc_array to unique_ptr Added make_unique_clear
Diffstat (limited to 'src/mame/video/model3.cpp')
-rw-r--r--src/mame/video/model3.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/video/model3.cpp b/src/mame/video/model3.cpp
index 9e1e60be5d8..c73b05c0a72 100644
--- a/src/mame/video/model3.cpp
+++ b/src/mame/video/model3.cpp
@@ -43,8 +43,8 @@ public:
model3_renderer(model3_state &state, int width, int height)
: poly_manager<float, model3_polydata, 6, 50000>(state.machine())
{
- m_fb = auto_bitmap_rgb32_alloc(state.machine(), width, height);
- m_zb = auto_bitmap_ind32_alloc(state.machine(), width, height);
+ m_fb = std::make_unique<bitmap_rgb32>(width, height);
+ m_zb = std::make_unique<bitmap_ind32>(width, height);
}
void draw(bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -62,8 +62,8 @@ public:
void wait_for_polys();
private:
- bitmap_rgb32 *m_fb;
- bitmap_ind32 *m_zb;
+ std::unique_ptr<bitmap_rgb32> m_fb;
+ std::unique_ptr<bitmap_ind32> m_zb;
};
@@ -185,8 +185,8 @@ void model3_state::video_start()
m_texture_fifo = auto_alloc_array_clear(machine(), UINT32, 0x100000/4);
/* 2x 4MB texture sheets */
- m_texture_ram[0] = auto_alloc_array(machine(), UINT16, 0x400000/2);
- m_texture_ram[1] = auto_alloc_array(machine(), UINT16, 0x400000/2);
+ m_texture_ram[0] = std::make_unique<UINT16[]>(0x400000/2);
+ m_texture_ram[1] = std::make_unique<UINT16[]>(0x400000/2);
/* 1MB Display List RAM */
m_display_list_ram = auto_alloc_array_clear(machine(), UINT32, 0x100000/4);