summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/drawgfx.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-04-19 06:02:01 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-04-19 06:02:01 +0000
commitd971ce8f36eb00f27da0c2ef8c8b280d568db58c (patch)
tree70f11c500fa64702e29c0a502ec1941bf8610625 /src/emu/drawgfx.h
parent3628e7eaedd083da8d876a618a0af8486b114c55 (diff)
Privatized most of the m_machine pointers in the system to prevent
direct use.
Diffstat (limited to 'src/emu/drawgfx.h')
-rw-r--r--src/emu/drawgfx.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h
index 4a379f580ab..a715dfafb22 100644
--- a/src/emu/drawgfx.h
+++ b/src/emu/drawgfx.h
@@ -120,7 +120,10 @@ struct _gfx_layout
class gfx_element
{
public:
- running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
+ gfx_element(running_machine &machine)
+ : m_machine(machine) { }
+
+ running_machine &machine() const { return m_machine; }
UINT16 width; /* current pixel width of each element (changeble with source clipping) */
UINT16 height; /* current pixel height of each element (changeble with source clipping) */
@@ -146,8 +149,10 @@ public:
UINT8 * dirty; /* dirty array for detecting tiles that need decoding */
UINT32 dirtyseq; /* sequence number; incremented each time a tile is dirtied */
- running_machine *m_machine; /* pointer to the owning machine */
gfx_layout layout; /* copy of the original layout */
+
+private:
+ running_machine &m_machine; /* pointer to the owning machine */
};