diff options
author | 2008-04-06 22:02:39 +0000 | |
---|---|---|
committer | 2008-04-06 22:02:39 +0000 | |
commit | 8a914b3d22703ab8570fd441b8ebc22c04d91a23 (patch) | |
tree | 984c9d9259f0a2f5c44adc11a492eb106f0cd8a7 /src/mame/drivers/alg.c | |
parent | edb6e3de5a0610ff6e2166904a7f36e543956449 (diff) |
Renamed input port functions:
readinputport -> input_port_read_indexed
readinputportbytag -> input_port_read
readinputportbytag_safe -> input_port_read_safe
Added machine parameter to input port functions. Updated
many drivers to accomplish this.
Diffstat (limited to 'src/mame/drivers/alg.c')
-rw-r--r-- | src/mame/drivers/alg.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c index 3284f16dc9a..5fe9ec1886c 100644 --- a/src/mame/drivers/alg.c +++ b/src/mame/drivers/alg.c @@ -22,6 +22,7 @@ #include "driver.h" #include "render.h" +#include "deprecat.h" #include "includes/amiga.h" #include "machine/laserdsc.h" @@ -50,8 +51,8 @@ static int get_lightgun_pos(const device_config *screen, int player, int *x, int { const rectangle *visarea = video_screen_get_visible_area(screen); - int xpos = readinputportbytag_safe((player == 0) ? "GUN1X" : "GUN2X", -1); - int ypos = readinputportbytag_safe((player == 0) ? "GUN1Y" : "GUN2Y", -1); + int xpos = input_port_read_safe(screen->machine, (player == 0) ? "GUN1X" : "GUN2X", -1); + int ypos = input_port_read_safe(screen->machine, (player == 0) ? "GUN1Y" : "GUN2Y", -1); if (xpos == -1 || ypos == -1) return FALSE; @@ -251,14 +252,14 @@ static CUSTOM_INPUT( lightgun_pos_r ) static CUSTOM_INPUT( lightgun_trigger_r ) { /* read the trigger control based on the input select */ - return (readinputportbytag("TRIGGERS") >> input_select) & 1; + return (input_port_read(machine, "TRIGGERS") >> input_select) & 1; } static CUSTOM_INPUT( lightgun_holster_r ) { /* read the holster control based on the input select */ - return (readinputportbytag("TRIGGERS") >> (2 + input_select)) & 1; + return (input_port_read(machine, "TRIGGERS") >> (2 + input_select)) & 1; } @@ -287,7 +288,7 @@ static void alg_cia_0_porta_w(UINT8 data) static UINT8 alg_cia_0_porta_r(void) { - return readinputportbytag("FIRE") | 0x3f; + return input_port_read(Machine, "FIRE") | 0x3f; } |