summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/ssingles.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-04-01 06:50:56 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-04-01 06:50:56 +0000
commit8409f7d3233f0dd5d211f68e564ca4ebb662f8bf (patch)
tree3edea78fc971015d4b0799f6c5999657685df573 /src/mame/drivers/ssingles.c
parent86afc9b913dd13338a8888f27bb13d1548ef8f33 (diff)
Final bulk rename for 0.142: ensure that all members of
driver_device classes have an m_ prefix on them. When we eventually move functions using these into member functions, we will be able to remove the state-> pointers, and having the member variables prefixed will allow them to be distinguished from local variables. Some regex'es used (plus manually fixing the remaining stuff): In src/mame/... state->([a-zA-Z_][^_][a-zA-Z0-9_]*) state->m_\1 state->([^m]_[a-zA-Z0-9_]*) state->m_\1 state->m_save_item state->save_item state->m_save_pointer state->save_pointer (AM_BASE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 (AM_BASE_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_][a-zA-Z0-9_]* *, *)([a-zA-Z_][^_]) \1m_\2m_\3 (AM_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 m__ m_ In src/mame/includes/... (\t[a-zA-Z0-9_<>]+[ \t]+[&*]*[ \t]*)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2 (\t[a-zA-Z0-9_<>]+[ \t]*[&*]*[ \t]+)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2
Diffstat (limited to 'src/mame/drivers/ssingles.c')
-rw-r--r--src/mame/drivers/ssingles.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mame/drivers/ssingles.c b/src/mame/drivers/ssingles.c
index e2694b9a768..940bf3d9b45 100644
--- a/src/mame/drivers/ssingles.c
+++ b/src/mame/drivers/ssingles.c
@@ -156,10 +156,10 @@ public:
ssingles_state(running_machine &machine, const driver_device_config_base &config)
: driver_device(machine, config) { }
- UINT8 videoram[VMEM_SIZE];
- UINT8 colorram[VMEM_SIZE];
- UINT8 prot_data;
- pen_t pens[NUM_PENS];
+ UINT8 m_videoram[VMEM_SIZE];
+ UINT8 m_colorram[VMEM_SIZE];
+ UINT8 m_prot_data;
+ pen_t m_pens[NUM_PENS];
};
//fake palette
@@ -188,7 +188,7 @@ static MC6845_UPDATE_ROW( update_row )
{
int address=((ma>>1)+(cx>>1))&0xff;
- cell=state->videoram[address]+(state->colorram[address]<<8);
+ cell=state->m_videoram[address]+(state->m_colorram[address]<<8);
tile_address=((cell&0x3ff)<<4)+ra;
palette=(cell>>10)&0x1c;
@@ -206,7 +206,7 @@ static MC6845_UPDATE_ROW( update_row )
for(x=7;x>=0;--x)
{
- *BITMAP_ADDR32(bitmap, y, (cx<<3)|(x)) = state->pens[palette+((b1&1)|((b0&1)<<1))];
+ *BITMAP_ADDR32(bitmap, y, (cx<<3)|(x)) = state->m_pens[palette+((b1&1)|((b0&1)<<1))];
b0>>=1;
b1>>=1;
}
@@ -230,13 +230,13 @@ static const mc6845_interface mc6845_intf =
static WRITE8_HANDLER(ssingles_videoram_w)
{
ssingles_state *state = space->machine().driver_data<ssingles_state>();
- state->videoram[offset]=data;
+ state->m_videoram[offset]=data;
}
static WRITE8_HANDLER(ssingles_colorram_w)
{
ssingles_state *state = space->machine().driver_data<ssingles_state>();
- state->colorram[offset]=data;
+ state->m_colorram[offset]=data;
}
@@ -248,7 +248,7 @@ static VIDEO_START(ssingles)
int i;
for(i=0;i<NUM_PENS;++i)
{
- state->pens[i]=MAKE_RGB(ssingles_colors[3*i], ssingles_colors[3*i+1], ssingles_colors[3*i+2]);
+ state->m_pens[i]=MAKE_RGB(ssingles_colors[3*i], ssingles_colors[3*i+1], ssingles_colors[3*i+2]);
}
}
}
@@ -267,14 +267,14 @@ static READ8_HANDLER(c000_r)
{
ssingles_state *state = space->machine().driver_data<ssingles_state>();
- return state->prot_data;
+ return state->m_prot_data;
}
static READ8_HANDLER(c001_r)
{
ssingles_state *state = space->machine().driver_data<ssingles_state>();
- state->prot_data=0xc4;
+ state->m_prot_data=0xc4;
return 0;
}
@@ -282,7 +282,7 @@ static WRITE8_HANDLER(c001_w)
{
ssingles_state *state = space->machine().driver_data<ssingles_state>();
- state->prot_data^=data^0x11;
+ state->m_prot_data^=data^0x11;
}
static CUSTOM_INPUT(controls_r)
@@ -549,8 +549,8 @@ static DRIVER_INIT(ssingles)
{
ssingles_state *state = machine.driver_data<ssingles_state>();
- state->save_item(NAME(state->videoram));
- state->save_item(NAME(state->colorram));
+ state->save_item(NAME(state->m_videoram));
+ state->save_item(NAME(state->m_colorram));
}
GAME( 1983, ssingles, 0, ssingles, ssingles, ssingles, ROT90, "Ent. Ent. Ltd", "Swinging Singles", GAME_SUPPORTS_SAVE | GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND )