mirror of
https://github.com/holub/mame
synced 2025-06-21 19:56:53 +03:00
for bool type use true and false (nw)
This commit is contained in:
parent
49bd91f3de
commit
6f5e223853
@ -499,7 +499,7 @@ void a78_cart_slot_device::call_unload()
|
||||
has an admissible header
|
||||
-------------------------------------------------*/
|
||||
|
||||
int a78_cart_slot_device::verify_header(char *header)
|
||||
bool a78_cart_slot_device::verify_header(char *header)
|
||||
{
|
||||
const char *magic = "ATARI7800";
|
||||
|
||||
|
@ -128,7 +128,7 @@ private:
|
||||
device_a78_cart_interface* m_cart;
|
||||
int m_type;
|
||||
|
||||
int verify_header(char *header);
|
||||
bool verify_header(char *header);
|
||||
int validate_header(int head, bool log);
|
||||
void internal_header_logging(UINT8 *header, UINT32 len);
|
||||
};
|
||||
|
@ -213,7 +213,7 @@ static const char *sega8_get_slot(int type)
|
||||
call load
|
||||
-------------------------------------------------*/
|
||||
|
||||
int sega8_cart_slot_device::verify_cart( UINT8 *magic, int size )
|
||||
bool sega8_cart_slot_device::verify_cart( UINT8 *magic, int size )
|
||||
{
|
||||
int retval = IMAGE_VERIFY_FAIL;
|
||||
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
|
||||
void setup_ram();
|
||||
void internal_header_logging(UINT8 *ROM, UINT32 len, UINT32 nvram_len);
|
||||
int verify_cart(UINT8 *magic, int size);
|
||||
bool verify_cart(UINT8 *magic, int size);
|
||||
void set_lphaser_xoffset(UINT8 *rom, int size);
|
||||
|
||||
void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); }
|
||||
|
@ -73,10 +73,10 @@ void cassette_image_device::device_config_complete()
|
||||
bool cassette_image_device::is_motor_on()
|
||||
{
|
||||
if ((m_state & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED)
|
||||
return FALSE;
|
||||
return false;
|
||||
if ((m_state & CASSETTE_MASK_MOTOR) != CASSETTE_MOTOR_ENABLED)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
virtual bool must_be_loaded() const override { return 0; }
|
||||
virtual bool is_reset_on_load() const override { return 0; }
|
||||
virtual const char *file_extensions() const override { return "mid"; }
|
||||
virtual bool core_opens_image_file() const override { return FALSE; }
|
||||
virtual bool core_opens_image_file() const override { return false; }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
virtual bool must_be_loaded() const override { return 0; }
|
||||
virtual bool is_reset_on_load() const override { return 0; }
|
||||
virtual const char *file_extensions() const override { return "mid"; }
|
||||
virtual bool core_opens_image_file() const override { return FALSE; }
|
||||
virtual bool core_opens_image_file() const override { return false; }
|
||||
|
||||
virtual void tx(UINT8 state) { rx_w(state); }
|
||||
|
||||
|
@ -332,7 +332,7 @@ CMDERR debugger_console::execute_command(const char *command, bool echo)
|
||||
printf(">%s\n", command);
|
||||
|
||||
/* parse and execute */
|
||||
result = internal_parse_command(command, TRUE);
|
||||
result = internal_parse_command(command, true);
|
||||
|
||||
/* display errors */
|
||||
if (result != CMDERR_NONE)
|
||||
|
@ -101,7 +101,7 @@ class software_part;
|
||||
class software_info;
|
||||
|
||||
// device image interface function types
|
||||
typedef delegate<int (device_image_interface &)> device_image_load_delegate;
|
||||
typedef delegate<bool (device_image_interface &)> device_image_load_delegate;
|
||||
typedef delegate<void (device_image_interface &)> device_image_func_delegate;
|
||||
// legacy
|
||||
typedef void (*device_image_partialhash_func)(util::hash_collection &, const unsigned char *, unsigned long, const char *);
|
||||
@ -110,15 +110,15 @@ typedef void (*device_image_partialhash_func)(util::hash_collection &, const uns
|
||||
// MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define IMAGE_INIT_PASS FALSE
|
||||
#define IMAGE_INIT_FAIL TRUE
|
||||
#define IMAGE_VERIFY_PASS FALSE
|
||||
#define IMAGE_VERIFY_FAIL TRUE
|
||||
#define IMAGE_INIT_PASS false
|
||||
#define IMAGE_INIT_FAIL true
|
||||
#define IMAGE_VERIFY_PASS false
|
||||
#define IMAGE_VERIFY_FAIL true
|
||||
|
||||
#define DEVICE_IMAGE_LOAD_MEMBER_NAME(_name) device_image_load_##_name
|
||||
#define DEVICE_IMAGE_LOAD_NAME(_class,_name) _class::DEVICE_IMAGE_LOAD_MEMBER_NAME(_name)
|
||||
#define DECLARE_DEVICE_IMAGE_LOAD_MEMBER(_name) int DEVICE_IMAGE_LOAD_MEMBER_NAME(_name)(device_image_interface &image)
|
||||
#define DEVICE_IMAGE_LOAD_MEMBER(_class,_name) int DEVICE_IMAGE_LOAD_NAME(_class,_name)(device_image_interface &image)
|
||||
#define DECLARE_DEVICE_IMAGE_LOAD_MEMBER(_name) bool DEVICE_IMAGE_LOAD_MEMBER_NAME(_name)(device_image_interface &image)
|
||||
#define DEVICE_IMAGE_LOAD_MEMBER(_class,_name) bool DEVICE_IMAGE_LOAD_NAME(_class,_name)(device_image_interface &image)
|
||||
#define DEVICE_IMAGE_LOAD_DELEGATE(_class,_name) device_image_load_delegate(&DEVICE_IMAGE_LOAD_NAME(_class,_name),#_class "::device_image_load_" #_name, downcast<_class *>(device->owner()))
|
||||
|
||||
#define DEVICE_IMAGE_UNLOAD_MEMBER_NAME(_name) device_image_unload_##_name
|
||||
@ -149,12 +149,12 @@ public:
|
||||
|
||||
virtual void device_compute_hash(util::hash_collection &hashes, const void *data, size_t length, const char *types) const;
|
||||
|
||||
virtual bool call_load() { return FALSE; }
|
||||
virtual bool call_create(int format_type, util::option_resolution *format_options) { return FALSE; }
|
||||
virtual bool call_load() { return false; }
|
||||
virtual bool call_create(int format_type, util::option_resolution *format_options) { return false; }
|
||||
virtual void call_unload() { }
|
||||
virtual std::string call_display() { return std::string(); }
|
||||
virtual device_image_partialhash_func get_partial_hash() const { return nullptr; }
|
||||
virtual bool core_opens_image_file() const { return TRUE; }
|
||||
virtual bool core_opens_image_file() const { return true; }
|
||||
virtual iodevice_t image_type() const = 0;
|
||||
virtual bool is_readable() const = 0;
|
||||
virtual bool is_writeable() const = 0;
|
||||
@ -194,7 +194,7 @@ public:
|
||||
int image_feof() { check_for_file(); return m_file->eof(); }
|
||||
void *ptr() {check_for_file(); return const_cast<void *>(m_file->buffer()); }
|
||||
// configuration access
|
||||
void set_init_phase() { m_init_phase = TRUE; }
|
||||
void set_init_phase() { m_init_phase = true; }
|
||||
|
||||
const char* longname() const { return m_longname.c_str(); }
|
||||
const char* manufacturer() const { return m_manufacturer.c_str(); }
|
||||
|
@ -718,7 +718,7 @@ bool input_seq::is_valid() const
|
||||
// non-switch items can't have a NOT
|
||||
input_item_class itemclass = code.item_class();
|
||||
if (itemclass != ITEM_CLASS_SWITCH && lastcode == not_code)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// absolute/relative items must all be the same class
|
||||
if ((lastclass == ITEM_CLASS_ABSOLUTE && itemclass != ITEM_CLASS_ABSOLUTE) ||
|
||||
|
@ -576,13 +576,13 @@ int rom_load_manager::open_rom_file(const char *regiontag, const rom_entry *romp
|
||||
// is actually a concatenation of: listname + setname + parentname
|
||||
// separated by '%' (parentname being present only for clones)
|
||||
std::string tag1(regiontag), tag2, tag3, tag4, tag5;
|
||||
bool is_list = FALSE;
|
||||
bool has_parent = FALSE;
|
||||
bool is_list = false;
|
||||
bool has_parent = false;
|
||||
|
||||
int separator1 = tag1.find_first_of('%');
|
||||
if (separator1 != -1)
|
||||
{
|
||||
is_list = TRUE;
|
||||
is_list = true;
|
||||
|
||||
// we are loading through softlists, split the listname from the regiontag
|
||||
tag4.assign(tag1.substr(separator1 + 1, tag1.length() - separator1 + 1));
|
||||
@ -593,7 +593,7 @@ int rom_load_manager::open_rom_file(const char *regiontag, const rom_entry *romp
|
||||
int separator2 = tag4.find_first_of('%');
|
||||
if (separator2 != -1)
|
||||
{
|
||||
has_parent = TRUE;
|
||||
has_parent = true;
|
||||
|
||||
// we are loading a clone through softlists, split the setname from the parentname
|
||||
tag5.assign(tag4.substr(separator2 + 1, tag4.length() - separator2 + 1));
|
||||
@ -983,13 +983,13 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_
|
||||
// is actually a concatenation of: listname + setname + parentname
|
||||
// separated by '%' (parentname being present only for clones)
|
||||
std::string tag1(locationtag), tag2, tag3, tag4, tag5;
|
||||
bool is_list = FALSE;
|
||||
bool has_parent = FALSE;
|
||||
bool is_list = false;
|
||||
bool has_parent = false;
|
||||
|
||||
int separator1 = tag1.find_first_of('%');
|
||||
if (separator1 != -1)
|
||||
{
|
||||
is_list = TRUE;
|
||||
is_list = true;
|
||||
|
||||
// we are loading through softlists, split the listname from the regiontag
|
||||
tag4.assign(tag1.substr(separator1 + 1, tag1.length() - separator1 + 1));
|
||||
@ -1000,7 +1000,7 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_
|
||||
int separator2 = tag4.find_first_of('%');
|
||||
if (separator2 != -1)
|
||||
{
|
||||
has_parent = TRUE;
|
||||
has_parent = true;
|
||||
|
||||
// we are loading a clone through softlists, split the setname from the parentname
|
||||
tag5.assign(tag4.substr(separator2 + 1, tag4.length() - separator2 + 1));
|
||||
@ -1357,7 +1357,7 @@ void rom_load_manager::load_software_part_region(device_t &device, software_list
|
||||
|
||||
/* now process the entries in the region */
|
||||
if (ROMREGION_ISROMDATA(region))
|
||||
process_rom_entries(locationtag.c_str(), region, region + 1, &device, TRUE);
|
||||
process_rom_entries(locationtag.c_str(), region, region + 1, &device, true);
|
||||
else if (ROMREGION_ISDISKDATA(region))
|
||||
process_disk_entries(regiontag.c_str(), region, region + 1, locationtag.c_str());
|
||||
}
|
||||
@ -1370,7 +1370,7 @@ void rom_load_manager::load_software_part_region(device_t &device, software_list
|
||||
}
|
||||
|
||||
/* display the results and exit */
|
||||
display_rom_load_results(TRUE);
|
||||
display_rom_load_results(true);
|
||||
}
|
||||
|
||||
|
||||
@ -1422,7 +1422,7 @@ void rom_load_manager::process_region_list()
|
||||
#endif
|
||||
|
||||
/* now process the entries in the region */
|
||||
process_rom_entries(device.shortname(), region, region + 1, &device, FALSE);
|
||||
process_rom_entries(device.shortname(), region, region + 1, &device, false);
|
||||
}
|
||||
else if (ROMREGION_ISDISKDATA(region))
|
||||
process_disk_entries(regiontag.c_str(), region, region + 1, nullptr);
|
||||
@ -1483,5 +1483,5 @@ rom_load_manager::rom_load_manager(running_machine &machine)
|
||||
process_region_list();
|
||||
|
||||
/* display the results and exit */
|
||||
display_rom_load_results(FALSE);
|
||||
display_rom_load_results(false);
|
||||
}
|
||||
|
@ -1143,14 +1143,14 @@ bool screen_device::update_partial(int scanline)
|
||||
if (machine().video().skip_this_frame())
|
||||
{
|
||||
LOG_PARTIAL_UPDATES(("skipped due to frameskipping\n"));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// skip if this screen is not visible anywhere
|
||||
if (!machine().render().is_live(*this))
|
||||
{
|
||||
LOG_PARTIAL_UPDATES(("skipped because screen not live\n"));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1620,7 +1620,7 @@ void cli_frontend::getsoftlist(const char *gamename)
|
||||
{
|
||||
FILE *out = stdout;
|
||||
std::unordered_set<std::string> list_map;
|
||||
bool isfirst = TRUE;
|
||||
bool isfirst = true;
|
||||
|
||||
driver_enumerator drivlist(m_options);
|
||||
while (drivlist.next())
|
||||
@ -1629,7 +1629,7 @@ void cli_frontend::getsoftlist(const char *gamename)
|
||||
if (core_strwildcmp(gamename, swlistdev.list_name()) == 0 && list_map.insert(swlistdev.list_name()).second)
|
||||
if (!swlistdev.get_info().empty())
|
||||
{
|
||||
if (isfirst) { fprintf( out, SOFTLIST_XML_BEGIN); isfirst = FALSE; }
|
||||
if (isfirst) { fprintf( out, SOFTLIST_XML_BEGIN); isfirst = false; }
|
||||
output_single_softlist(out, swlistdev);
|
||||
}
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ void info_xml_creator::output_one()
|
||||
{
|
||||
if (field.type() == IPT_KEYBOARD)
|
||||
{
|
||||
if (!new_kbd) new_kbd = TRUE;
|
||||
if (!new_kbd) new_kbd = true;
|
||||
field.set_player(field.player() + kbd_offset);
|
||||
}
|
||||
else
|
||||
@ -355,11 +355,11 @@ void info_xml_creator::output_one()
|
||||
|
||||
void info_xml_creator::output_one_device(device_t &device, const char *devtag)
|
||||
{
|
||||
bool has_speaker = FALSE, has_input = FALSE;
|
||||
bool has_speaker = false, has_input = false;
|
||||
// check if the device adds speakers to the system
|
||||
sound_interface_iterator snditer(device);
|
||||
if (snditer.first() != nullptr)
|
||||
has_speaker = TRUE;
|
||||
has_speaker = true;
|
||||
// generate input list
|
||||
ioport_list portlist;
|
||||
std::string errors;
|
||||
@ -370,7 +370,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag)
|
||||
for (ioport_field &field : port.second->fields())
|
||||
if (field.type() >= IPT_START1 && field.type() < IPT_UI_FIRST)
|
||||
{
|
||||
has_input = TRUE;
|
||||
has_input = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -894,7 +894,7 @@ void info_xml_creator::output_input(const ioport_list &portlist)
|
||||
for (auto &port : portlist)
|
||||
{
|
||||
int ctrl_type = CTRL_DIGITAL_BUTTONS;
|
||||
bool ctrl_analog = FALSE;
|
||||
bool ctrl_analog = false;
|
||||
for (ioport_field &field : port.second->fields())
|
||||
{
|
||||
// track the highest player number
|
||||
@ -996,75 +996,75 @@ void info_xml_creator::output_input(const ioport_list &portlist)
|
||||
case IPT_AD_STICK_X:
|
||||
case IPT_AD_STICK_Y:
|
||||
case IPT_AD_STICK_Z:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_analog = true;
|
||||
ctrl_type = CTRL_ANALOG_JOYSTICK;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "stick";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||
break;
|
||||
|
||||
case IPT_PADDLE:
|
||||
case IPT_PADDLE_V:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_analog = true;
|
||||
ctrl_type = CTRL_ANALOG_PADDLE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "paddle";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||
break;
|
||||
|
||||
case IPT_PEDAL:
|
||||
case IPT_PEDAL2:
|
||||
case IPT_PEDAL3:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_analog = true;
|
||||
ctrl_type = CTRL_ANALOG_PEDAL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "pedal";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||
break;
|
||||
|
||||
case IPT_LIGHTGUN_X:
|
||||
case IPT_LIGHTGUN_Y:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_analog = true;
|
||||
ctrl_type = CTRL_ANALOG_LIGHTGUN;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "lightgun";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||
break;
|
||||
|
||||
case IPT_POSITIONAL:
|
||||
case IPT_POSITIONAL_V:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_analog = true;
|
||||
ctrl_type = CTRL_ANALOG_POSITIONAL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "positional";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||
break;
|
||||
|
||||
case IPT_DIAL:
|
||||
case IPT_DIAL_V:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_analog = true;
|
||||
ctrl_type = CTRL_ANALOG_DIAL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "dial";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||
break;
|
||||
|
||||
case IPT_TRACKBALL_X:
|
||||
case IPT_TRACKBALL_Y:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_analog = true;
|
||||
ctrl_type = CTRL_ANALOG_TRACKBALL;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "trackball";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||
break;
|
||||
|
||||
case IPT_MOUSE_X:
|
||||
case IPT_MOUSE_Y:
|
||||
ctrl_analog = TRUE;
|
||||
ctrl_analog = true;
|
||||
ctrl_type = CTRL_ANALOG_MOUSE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mouse";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = TRUE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||
break;
|
||||
|
||||
// map buttons
|
||||
@ -1084,12 +1084,12 @@ void info_xml_creator::output_input(const ioport_list &portlist)
|
||||
case IPT_BUTTON14:
|
||||
case IPT_BUTTON15:
|
||||
case IPT_BUTTON16:
|
||||
ctrl_analog = FALSE;
|
||||
ctrl_analog = false;
|
||||
if (control_info[field.player() * CTRL_COUNT + ctrl_type].type == nullptr)
|
||||
{
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "only_buttons";
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = FALSE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = false;
|
||||
}
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons = std::max(control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons, field.type() - IPT_BUTTON1 + 1);
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||
@ -1184,7 +1184,7 @@ void info_xml_creator::output_input(const ioport_list &portlist)
|
||||
if (field.delta() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].keydelta = field.delta();
|
||||
if (field.analog_reverse() != 0)
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reverse = TRUE;
|
||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reverse = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1196,7 +1196,7 @@ void info_xml_creator::output_input(const ioport_list &portlist)
|
||||
// for lightguns) and therefore we really need this separate loop.
|
||||
for (int i = 0; i < CTRL_PCOUNT; i++)
|
||||
{
|
||||
bool fix_done = FALSE;
|
||||
bool fix_done = false;
|
||||
for (int j = 1; j < CTRL_COUNT; j++)
|
||||
if (control_info[i * CTRL_COUNT].type != nullptr && control_info[i * CTRL_COUNT + j].type != nullptr && !fix_done)
|
||||
{
|
||||
@ -1205,7 +1205,7 @@ void info_xml_creator::output_input(const ioport_list &portlist)
|
||||
control_info[i * CTRL_COUNT + j].maxbuttons = std::max(control_info[i * CTRL_COUNT + j].maxbuttons, control_info[i * CTRL_COUNT].maxbuttons);
|
||||
|
||||
memset(&control_info[i * CTRL_COUNT], 0, sizeof(control_info[0]));
|
||||
fix_done = TRUE;
|
||||
fix_done = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ menu_file_manager::menu_file_manager(mame_ui_manager &mui, render_container &con
|
||||
else
|
||||
m_warnings.clear();
|
||||
|
||||
m_curr_selected = FALSE;
|
||||
m_curr_selected = false;
|
||||
}
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ void menu_file_manager::handle()
|
||||
selected_device = (device_image_interface *) event->itemref;
|
||||
if (selected_device != nullptr)
|
||||
{
|
||||
m_curr_selected = TRUE;
|
||||
m_curr_selected = true;
|
||||
floppy_image_device *floppy_device = dynamic_cast<floppy_image_device *>(selected_device);
|
||||
if (floppy_device != nullptr)
|
||||
{
|
||||
|
@ -281,7 +281,7 @@ void mame_ui_manager::display_startup_screens(bool first_time)
|
||||
// disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,
|
||||
// or if we are debugging
|
||||
if (!first_time || (str > 0 && str < 60*5) || &machine().system() == &GAME_NAME(___empty) || (machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
|
||||
show_gameinfo = show_warnings = show_mandatory_fileman = FALSE;
|
||||
show_gameinfo = show_warnings = show_mandatory_fileman = false;
|
||||
|
||||
#if defined(EMSCRIPTEN)
|
||||
// also disable for the JavaScript port since the startup screens do not run asynchronously
|
||||
|
@ -343,13 +343,13 @@ struct sector_header
|
||||
bool dsk_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
|
||||
{
|
||||
UINT8 header[0x100];
|
||||
bool extendformat = FALSE;
|
||||
bool extendformat = false;
|
||||
|
||||
UINT64 image_size = io_generic_size(io);
|
||||
|
||||
io_generic_read(io, &header, 0, sizeof(header));
|
||||
if ( memcmp( header, EXT_FORMAT_HEADER, 16 ) ==0) {
|
||||
extendformat = TRUE;
|
||||
extendformat = true;
|
||||
}
|
||||
|
||||
int heads = header[0x31];
|
||||
|
@ -1945,7 +1945,7 @@ avi_file::error avi_file_impl::append_sound_samples(int channel, const std::int1
|
||||
m_soundbuf_chansamples[channel] = sampoffset;
|
||||
|
||||
/* flush any full sound chunks to disk */
|
||||
return soundbuf_flush(TRUE);
|
||||
return soundbuf_flush(true);
|
||||
}
|
||||
|
||||
|
||||
|
@ -352,7 +352,7 @@ void coleco_state::machine_reset()
|
||||
m_last_nmi_state = 0;
|
||||
}
|
||||
|
||||
//static int coleco_cart_verify(const UINT8 *cartdata, size_t size)
|
||||
//static bool coleco_cart_verify(const UINT8 *cartdata, size_t size)
|
||||
//{
|
||||
// int retval = IMAGE_VERIFY_FAIL;
|
||||
//
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
void lviv_update_memory ();
|
||||
void lviv_setup_snapshot (UINT8 * data);
|
||||
void dump_registers();
|
||||
int lviv_verify_snapshot (UINT8 * data, UINT32 size);
|
||||
bool lviv_verify_snapshot (UINT8 * data, UINT32 size);
|
||||
DECLARE_SNAPSHOT_LOAD_MEMBER( lviv );
|
||||
DECLARE_INPUT_CHANGED_MEMBER(lviv_reset);
|
||||
};
|
||||
|
@ -181,7 +181,7 @@ public:
|
||||
void lynx_timer_count_down(int which);
|
||||
UINT32 lynx_time_factor(int val);
|
||||
void lynx_uart_reset();
|
||||
int lynx_verify_cart (char *header, int kind);
|
||||
bool lynx_verify_cart (char *header, int kind);
|
||||
DECLARE_QUICKLOAD_LOAD_MEMBER( lynx );
|
||||
|
||||
protected:
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
UINT8 read_dsw();
|
||||
void microtan_set_irq_line();
|
||||
void store_key(int key);
|
||||
int microtan_verify_snapshot(UINT8 *data, int size);
|
||||
bool microtan_verify_snapshot(UINT8 *data, int size);
|
||||
int parse_intel_hex(UINT8 *snapshot_buff, char *src);
|
||||
int parse_zillion_hex(UINT8 *snapshot_buff, char *src);
|
||||
void microtan_set_cpu_regs(const UINT8 *snapshot_buff, int base);
|
||||
|
@ -281,7 +281,7 @@ void lviv_state::dump_registers()
|
||||
logerror("HL = %04x\n", (unsigned) m_maincpu->state_int(I8085_HL));
|
||||
}
|
||||
|
||||
int lviv_state::lviv_verify_snapshot (UINT8 * data, UINT32 size)
|
||||
bool lviv_state::lviv_verify_snapshot (UINT8 * data, UINT32 size)
|
||||
{
|
||||
const char* tag = "LVOV/DUMP/2.0/";
|
||||
|
||||
|
@ -2030,7 +2030,7 @@ void lynx_state::machine_start()
|
||||
|
||||
****************************************/
|
||||
|
||||
int lynx_state::lynx_verify_cart (char *header, int kind)
|
||||
bool lynx_state::lynx_verify_cart (char *header, int kind)
|
||||
{
|
||||
if (kind)
|
||||
{
|
||||
|
@ -522,7 +522,7 @@ void microtan_state::machine_reset()
|
||||
output().set_led_value(1, (m_keyrows[3] & 0x80) ? 0 : 1);
|
||||
}
|
||||
|
||||
int microtan_state::microtan_verify_snapshot(UINT8 *data, int size)
|
||||
bool microtan_state::microtan_verify_snapshot(UINT8 *data, int size)
|
||||
{
|
||||
if (size == 8263)
|
||||
{
|
||||
|
@ -464,10 +464,10 @@ class input_module_base : public input_module
|
||||
public:
|
||||
input_module_base(const char *type, const char* name)
|
||||
: input_module(type, name),
|
||||
m_input_enabled(FALSE),
|
||||
m_mouse_enabled(FALSE),
|
||||
m_lightgun_enabled(FALSE),
|
||||
m_input_paused(FALSE),
|
||||
m_input_enabled(false),
|
||||
m_mouse_enabled(false),
|
||||
m_lightgun_enabled(false),
|
||||
m_input_paused(false),
|
||||
m_options(nullptr)
|
||||
{
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ protected:
|
||||
{
|
||||
// Only handle raw input data
|
||||
if (!input_enabled() || eventid != INPUT_EVENT_RAWINPUT)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
HRAWINPUT rawinputdevice = *static_cast<HRAWINPUT*>(eventdata);
|
||||
|
||||
@ -535,11 +535,11 @@ protected:
|
||||
|
||||
// ignore if not enabled
|
||||
if (!input_enabled())
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// determine the size of databuffer we need
|
||||
if ((*get_rawinput_data)(rawinputdevice, RID_INPUT, nullptr, &size, sizeof(RAWINPUTHEADER)) != 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// if necessary, allocate a temporary buffer and fetch the data
|
||||
if (size > sizeof(small_buffer))
|
||||
@ -547,7 +547,7 @@ protected:
|
||||
larger_buffer = std::make_unique<BYTE[]>(size);
|
||||
data = larger_buffer.get();
|
||||
if (data == nullptr)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// fetch the data and process the appropriate message types
|
||||
@ -567,7 +567,7 @@ protected:
|
||||
if (input->header.hDevice == devinfo->device_handle())
|
||||
{
|
||||
devinfo->queue_events(input, 1);
|
||||
result = TRUE;
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
bool handle_input_event(input_event eventid, void *eventdata) override
|
||||
{
|
||||
if (!input_enabled())
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
KeyPressEventArgs *args;
|
||||
|
||||
@ -107,10 +107,10 @@ public:
|
||||
for (int i = 0; i < devicelist()->size(); i++)
|
||||
downcast<win32_keyboard_device*>(devicelist()->at(i))->queue_events(args, 1);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -231,13 +231,13 @@ public:
|
||||
bool handle_input_event(input_event eventid, void *eventdata) override
|
||||
{
|
||||
if (!input_enabled() || !mouse_enabled() || eventid != INPUT_EVENT_MOUSE_BUTTON)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
auto args = static_cast<MouseButtonEventArgs*>(eventdata);
|
||||
for (int i = 0; i < devicelist()->size(); i++)
|
||||
downcast<win32_mouse_device*>(devicelist()->at(i))->queue_events(args, 1);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -540,19 +540,19 @@ bool shaders::init(d3d_base *d3dintf, running_machine *machine, renderer_d3d9 *r
|
||||
options->scanline_bright_offset = winoptions.screen_scanline_bright_offset();
|
||||
options->scanline_jitter = winoptions.screen_scanline_jitter();
|
||||
options->hum_bar_alpha = winoptions.screen_hum_bar_alpha();
|
||||
get_vector(winoptions.screen_defocus(), 2, options->defocus, TRUE);
|
||||
get_vector(winoptions.screen_converge_x(), 3, options->converge_x, TRUE);
|
||||
get_vector(winoptions.screen_converge_y(), 3, options->converge_y, TRUE);
|
||||
get_vector(winoptions.screen_radial_converge_x(), 3, options->radial_converge_x, TRUE);
|
||||
get_vector(winoptions.screen_radial_converge_y(), 3, options->radial_converge_y, TRUE);
|
||||
get_vector(winoptions.screen_red_ratio(), 3, options->red_ratio, TRUE);
|
||||
get_vector(winoptions.screen_grn_ratio(), 3, options->grn_ratio, TRUE);
|
||||
get_vector(winoptions.screen_blu_ratio(), 3, options->blu_ratio, TRUE);
|
||||
get_vector(winoptions.screen_offset(), 3, options->offset, TRUE);
|
||||
get_vector(winoptions.screen_scale(), 3, options->scale, TRUE);
|
||||
get_vector(winoptions.screen_power(), 3, options->power, TRUE);
|
||||
get_vector(winoptions.screen_floor(), 3, options->floor, TRUE);
|
||||
get_vector(winoptions.screen_phosphor(), 3, options->phosphor, TRUE);
|
||||
get_vector(winoptions.screen_defocus(), 2, options->defocus, true);
|
||||
get_vector(winoptions.screen_converge_x(), 3, options->converge_x, true);
|
||||
get_vector(winoptions.screen_converge_y(), 3, options->converge_y, true);
|
||||
get_vector(winoptions.screen_radial_converge_x(), 3, options->radial_converge_x, true);
|
||||
get_vector(winoptions.screen_radial_converge_y(), 3, options->radial_converge_y, true);
|
||||
get_vector(winoptions.screen_red_ratio(), 3, options->red_ratio, true);
|
||||
get_vector(winoptions.screen_grn_ratio(), 3, options->grn_ratio, true);
|
||||
get_vector(winoptions.screen_blu_ratio(), 3, options->blu_ratio, true);
|
||||
get_vector(winoptions.screen_offset(), 3, options->offset, true);
|
||||
get_vector(winoptions.screen_scale(), 3, options->scale, true);
|
||||
get_vector(winoptions.screen_power(), 3, options->power, true);
|
||||
get_vector(winoptions.screen_floor(), 3, options->floor, true);
|
||||
get_vector(winoptions.screen_phosphor(), 3, options->phosphor, true);
|
||||
options->saturation = winoptions.screen_saturation();
|
||||
options->yiq_enable = winoptions.screen_yiq_enable();
|
||||
options->yiq_jitter = winoptions.screen_yiq_jitter();
|
||||
@ -572,7 +572,7 @@ bool shaders::init(d3d_base *d3dintf, running_machine *machine, renderer_d3d9 *r
|
||||
options->vector_length_ratio = winoptions.screen_vector_length_ratio();
|
||||
options->bloom_blend_mode = winoptions.screen_bloom_blend_mode();
|
||||
options->bloom_scale = winoptions.screen_bloom_scale();
|
||||
get_vector(winoptions.screen_bloom_overdrive(), 3, options->bloom_overdrive, TRUE);
|
||||
get_vector(winoptions.screen_bloom_overdrive(), 3, options->bloom_overdrive, true);
|
||||
options->bloom_level0_weight = winoptions.screen_bloom_lvl0_weight();
|
||||
options->bloom_level1_weight = winoptions.screen_bloom_lvl1_weight();
|
||||
options->bloom_level2_weight = winoptions.screen_bloom_lvl2_weight();
|
||||
|
@ -854,7 +854,7 @@ try_again:
|
||||
D3DRTYPE_TEXTURE, m_screen_format);
|
||||
if (FAILED(result) && m_texture_manager->is_dynamic_supported())
|
||||
{
|
||||
m_texture_manager->set_dynamic_supported(FALSE);
|
||||
m_texture_manager->set_dynamic_supported(false);
|
||||
goto try_again;
|
||||
}
|
||||
if (FAILED(result))
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
{
|
||||
if (!m_signalled)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
@ -406,7 +406,7 @@ void winwindow_process_events_periodic(running_machine &machine)
|
||||
// update once every 1/8th of a second
|
||||
if (currticks - last_event_check < std::chrono::milliseconds(1000 / 8))
|
||||
return;
|
||||
winwindow_process_events(machine, TRUE, FALSE);
|
||||
winwindow_process_events(machine, TRUE, false);
|
||||
}
|
||||
|
||||
|
||||
@ -415,13 +415,13 @@ void winwindow_process_events_periodic(running_machine &machine)
|
||||
// is_mame_window
|
||||
//============================================================
|
||||
|
||||
static BOOL is_mame_window(HWND hwnd)
|
||||
static bool is_mame_window(HWND hwnd)
|
||||
{
|
||||
for (auto window : osd_common_t::s_window_list)
|
||||
if (window->platform_window<HWND>() == hwnd)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline static BOOL handle_mouse_button(windows_osd_interface *osd, int button, int down, int x, int y)
|
||||
|
Loading…
Reference in New Issue
Block a user