From e0358a4ce4ca36802866483fc2c2fef9ad61a90a Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 11 Jan 2016 13:23:03 +0100 Subject: [PATCH] get rid of global_alloc (nw) --- src/emu/crsshair.cpp | 4 +--- src/emu/crsshair.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/emu/crsshair.cpp b/src/emu/crsshair.cpp index 1e47bde6bf9..a4bee628ae9 100644 --- a/src/emu/crsshair.cpp +++ b/src/emu/crsshair.cpp @@ -154,8 +154,6 @@ void crosshair_manager::exit() { machine().render().texture_free(m_texture[player]); m_texture[player] = nullptr; - - global_free(m_bitmap[player]); m_bitmap[player] = nullptr; } } @@ -173,7 +171,7 @@ void crosshair_manager::create_bitmap(int player) /* if we have a bitmap and texture for this player, kill it */ if (m_bitmap[player] == nullptr) { - m_bitmap[player] = global_alloc(bitmap_argb32); + m_bitmap[player] = std::make_unique(); m_texture[player] = machine().render().texture_alloc(render_texture::hq_scale); } diff --git a/src/emu/crsshair.h b/src/emu/crsshair.h index 5dbc31f082f..91becc37f58 100644 --- a/src/emu/crsshair.h +++ b/src/emu/crsshair.h @@ -89,7 +89,7 @@ private: UINT8 m_used[MAX_PLAYERS]; /* usage per player */ UINT8 m_mode[MAX_PLAYERS]; /* visibility mode per player */ UINT8 m_visible[MAX_PLAYERS]; /* visibility per player */ - bitmap_argb32 * m_bitmap[MAX_PLAYERS]; /* bitmap per player */ + std::unique_ptr m_bitmap[MAX_PLAYERS]; /* bitmap per player */ render_texture * m_texture[MAX_PLAYERS]; /* texture per player */ screen_device * m_screen[MAX_PLAYERS]; /* the screen on which this player's crosshair is drawn */ float m_x[MAX_PLAYERS]; /* current X position */