summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/pegasus.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-08-01 18:46:56 +1000
committer Vas Crabb <vas@vastheman.com>2016-08-01 18:47:22 +1000
commit15e7be7ac8e4127e9fc0f9b5c248f4a73ba85703 (patch)
tree71346f2c2d1ac08e0e9c9f4dea8f2537af380143 /src/mame/drivers/pegasus.cpp
parentc4c05c9735a5b956de128d6017027658b6c61a8e (diff)
Turn image init/validate into scoped enums to avoid accidental casts to/from integer and boolean types
The image error should also be turned into a scoped enum - the menus were assuming it was the same thing as an init result
Diffstat (limited to 'src/mame/drivers/pegasus.cpp')
-rw-r--r--src/mame/drivers/pegasus.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mame/drivers/pegasus.cpp b/src/mame/drivers/pegasus.cpp
index 034ae2ef0d4..e3af28d9586 100644
--- a/src/mame/drivers/pegasus.cpp
+++ b/src/mame/drivers/pegasus.cpp
@@ -78,7 +78,7 @@ public:
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_DRIVER_INIT(pegasus);
TIMER_DEVICE_CALLBACK_MEMBER(pegasus_firq);
- int load_cart(device_image_interface &image, generic_slot_device *slot, const char *reg_tag);
+ image_init_result load_cart(device_image_interface &image, generic_slot_device *slot, const char *reg_tag);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp00_load) { return load_cart(image, m_exp_00, "0000"); }
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp01_load) { return load_cart(image, m_exp_01, "1000"); }
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(exp02_load) { return load_cart(image, m_exp_02, "2000"); }
@@ -413,7 +413,7 @@ void pegasus_state::pegasus_decrypt_rom(UINT8 *ROM)
}
}
-int pegasus_state::load_cart(device_image_interface &image, generic_slot_device *slot, const char *reg_tag)
+image_init_result pegasus_state::load_cart(device_image_interface &image, generic_slot_device *slot, const char *reg_tag)
{
UINT32 size = slot->common_get_size(reg_tag);
bool any_socket = false;
@@ -421,7 +421,7 @@ int pegasus_state::load_cart(device_image_interface &image, generic_slot_device
if (size > 0x1000)
{
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
- return IMAGE_INIT_FAIL;
+ return image_init_result::FAIL;
}
if (image.software_entry() != nullptr && size == 0)
@@ -437,7 +437,7 @@ int pegasus_state::load_cart(device_image_interface &image, generic_slot_device
"Attempted to load a file that does not work in this socket.\n"
"Please check \"Usage\" field in the software list for the correct socket(s) to use.");
image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.c_str());
- return IMAGE_INIT_FAIL;
+ return image_init_result::FAIL;
}
}
@@ -447,7 +447,7 @@ int pegasus_state::load_cart(device_image_interface &image, generic_slot_device
// raw images have to be decrypted (in particular the ones from softlist)
pegasus_decrypt_rom(slot->get_rom_base());
- return IMAGE_INIT_PASS;
+ return image_init_result::PASS;
}
void pegasus_state::machine_start()