summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/ui.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-01-17 09:26:29 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-01-17 09:26:29 +0000
commitd061ced59276808138b8a62ca99c6530d0b179bf (patch)
treee08630dd72dce81f385643006b35aa9a802e657b /src/emu/ui.c
parent14e2b9acf31db5fbc78a1ece0548130e4d7bed24 (diff)
Created new template class tagged_list which manages a simple list
along with a tagmap. Changed memory regions, input ports, and devices to use this class. For devices, converted typenext and classnext fields into methods which dynamically search for the next item. Changed a number of macros to use the features of the class, removing the need for a bunch of helper functions.
Diffstat (limited to 'src/emu/ui.c')
-rw-r--r--src/emu/ui.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c
index d0a835d964b..9a630a4d55b 100644
--- a/src/emu/ui.c
+++ b/src/emu/ui.c
@@ -978,7 +978,7 @@ astring &game_info_astring(running_machine *machine, astring &string)
/* count how many identical CPUs we have */
count = 1;
- for (scandevice = device->typenext; scandevice != NULL; scandevice = scandevice->typenext)
+ for (scandevice = device->typenext(); scandevice != NULL; scandevice = scandevice->typenext())
{
if (cpu_get_type(device) != cpu_get_type(scandevice) || device->clock != scandevice->clock)
break;
@@ -1007,7 +1007,7 @@ astring &game_info_astring(running_machine *machine, astring &string)
/* count how many identical sound chips we have */
count = 1;
- for (scandevice = device->typenext; scandevice != NULL; scandevice = scandevice->typenext)
+ for (scandevice = device->typenext(); scandevice != NULL; scandevice = scandevice->typenext())
{
if (sound_get_type(device) != sound_get_type(scandevice) || device->clock != scandevice->clock)
break;
@@ -1442,7 +1442,7 @@ static slider_state *slider_init(running_machine *machine)
}
/* add analog adjusters */
- for (port = machine->portlist.head; port != NULL; port = port->next)
+ for (port = machine->portlist.first(); port != NULL; port = port->next)
for (field = port->fieldlist; field != NULL; field = field->next)
if (field->type == IPT_ADJUSTER)
{
@@ -1507,7 +1507,7 @@ static slider_state *slider_init(running_machine *machine)
tailptr = &(*tailptr)->next;
}
- for (device = device_list_first(&machine->config->devicelist, LASERDISC); device != NULL; device = device_list_next(device, LASERDISC))
+ for (device = machine->config->devicelist.first(LASERDISC); device != NULL; device = device->typenext())
{
const laserdisc_config *config = (const laserdisc_config *)device->inline_config;
if (config->overupdate != NULL)
@@ -1550,7 +1550,7 @@ static slider_state *slider_init(running_machine *machine)
#ifdef MAME_DEBUG
/* add crosshair adjusters */
- for (port = machine->portlist.head; port != NULL; port = port->next)
+ for (port = machine->portlist.first(); port != NULL; port = port->next)
for (field = port->fieldlist; field != NULL; field = field->next)
if (field->crossaxis != CROSSHAIR_AXIS_NONE && field->player == 0)
{
@@ -1966,7 +1966,7 @@ static char *slider_get_screen_desc(const device_config *screen)
static char *slider_get_laserdisc_desc(const device_config *laserdisc)
{
- int ldcount = device_list_items(&laserdisc->machine->config->devicelist, LASERDISC);
+ int ldcount = laserdisc->machine->config->devicelist.count(LASERDISC);
static char descbuf[256];
if (ldcount > 1)