mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
string -> str part 1 (nw)
This commit is contained in:
parent
84578407f9
commit
f2243d6020
@ -320,7 +320,7 @@ media_auditor::summary media_auditor::audit_samples()
|
||||
// string format
|
||||
//-------------------------------------------------
|
||||
|
||||
media_auditor::summary media_auditor::summarize(const char *name, astring *string)
|
||||
media_auditor::summary media_auditor::summarize(const char *name, astring *output)
|
||||
{
|
||||
if (m_record_list.count() == 0)
|
||||
{
|
||||
@ -338,60 +338,60 @@ media_auditor::summary media_auditor::summarize(const char *name, astring *strin
|
||||
continue;
|
||||
|
||||
// output the game name, file name, and length (if applicable)
|
||||
if (string != NULL)
|
||||
if (output != NULL)
|
||||
{
|
||||
string->catprintf("%-12s: %s", name, record->name());
|
||||
output->catprintf("%-12s: %s", name, record->name());
|
||||
if (record->expected_length() > 0)
|
||||
string->catprintf(" (%" I64FMT "d bytes)", record->expected_length());
|
||||
string->catprintf(" - ");
|
||||
output->catprintf(" (%" I64FMT "d bytes)", record->expected_length());
|
||||
output->catprintf(" - ");
|
||||
}
|
||||
|
||||
// use the substatus for finer details
|
||||
switch (record->substatus())
|
||||
{
|
||||
case audit_record::SUBSTATUS_GOOD_NEEDS_REDUMP:
|
||||
if (string != NULL) string->catprintf("NEEDS REDUMP\n");
|
||||
if (output != NULL) output->catprintf("NEEDS REDUMP\n");
|
||||
best_new_status = BEST_AVAILABLE;
|
||||
break;
|
||||
|
||||
case audit_record::SUBSTATUS_FOUND_NODUMP:
|
||||
if (string != NULL) string->catprintf("NO GOOD DUMP KNOWN\n");
|
||||
if (output != NULL) output->catprintf("NO GOOD DUMP KNOWN\n");
|
||||
best_new_status = BEST_AVAILABLE;
|
||||
break;
|
||||
|
||||
case audit_record::SUBSTATUS_FOUND_BAD_CHECKSUM:
|
||||
if (string != NULL)
|
||||
if (output != NULL)
|
||||
{
|
||||
astring tempstr;
|
||||
string->catprintf("INCORRECT CHECKSUM:\n");
|
||||
string->catprintf("EXPECTED: %s\n", record->expected_hashes().macro_string(tempstr));
|
||||
string->catprintf(" FOUND: %s\n", record->actual_hashes().macro_string(tempstr));
|
||||
output->catprintf("INCORRECT CHECKSUM:\n");
|
||||
output->catprintf("EXPECTED: %s\n", record->expected_hashes().macro_string(tempstr));
|
||||
output->catprintf(" FOUND: %s\n", record->actual_hashes().macro_string(tempstr));
|
||||
}
|
||||
break;
|
||||
|
||||
case audit_record::SUBSTATUS_FOUND_WRONG_LENGTH:
|
||||
if (string != NULL) string->catprintf("INCORRECT LENGTH: %" I64FMT "d bytes\n", record->actual_length());
|
||||
if (output != NULL) output->catprintf("INCORRECT LENGTH: %" I64FMT "d bytes\n", record->actual_length());
|
||||
break;
|
||||
|
||||
case audit_record::SUBSTATUS_NOT_FOUND:
|
||||
if (string != NULL)
|
||||
if (output != NULL)
|
||||
{
|
||||
device_t *shared_device = record->shared_device();
|
||||
if (shared_device == NULL)
|
||||
string->catprintf("NOT FOUND\n");
|
||||
output->catprintf("NOT FOUND\n");
|
||||
else
|
||||
string->catprintf("NOT FOUND (%s)\n", shared_device->shortname());
|
||||
output->catprintf("NOT FOUND (%s)\n", shared_device->shortname());
|
||||
}
|
||||
best_new_status = NOTFOUND;
|
||||
break;
|
||||
|
||||
case audit_record::SUBSTATUS_NOT_FOUND_NODUMP:
|
||||
if (string != NULL) string->catprintf("NOT FOUND - NO GOOD DUMP KNOWN\n");
|
||||
if (output != NULL) output->catprintf("NOT FOUND - NO GOOD DUMP KNOWN\n");
|
||||
best_new_status = BEST_AVAILABLE;
|
||||
break;
|
||||
|
||||
case audit_record::SUBSTATUS_NOT_FOUND_OPTIONAL:
|
||||
if (string != NULL) string->catprintf("NOT FOUND BUT OPTIONAL\n");
|
||||
if (output != NULL) output->catprintf("NOT FOUND BUT OPTIONAL\n");
|
||||
best_new_status = BEST_AVAILABLE;
|
||||
break;
|
||||
|
||||
|
160
src/emu/ui/ui.c
160
src/emu/ui/ui.c
@ -107,28 +107,28 @@ static slider_state *slider_current;
|
||||
// slider controls
|
||||
static slider_state *slider_alloc(running_machine &machine, const char *title, INT32 minval, INT32 defval, INT32 maxval, INT32 incval, slider_update update, void *arg);
|
||||
static slider_state *slider_init(running_machine &machine);
|
||||
static INT32 slider_volume(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_mixervol(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_adjuster(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_overclock(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_refresh(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_brightness(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_contrast(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_gamma(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_xscale(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_yscale(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_xoffset(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_yoffset(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_overxscale(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_overyscale(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_flicker(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_beam(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_volume(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_mixervol(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_adjuster(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_overclock(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_refresh(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_brightness(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_contrast(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_gamma(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_xscale(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_yscale(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_xoffset(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_yoffset(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_overxscale(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_overyscale(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_flicker(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_beam(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static char *slider_get_screen_desc(screen_device &screen);
|
||||
#ifdef MAME_DEBUG
|
||||
static INT32 slider_crossscale(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_crossoffset(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
static INT32 slider_crossscale(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
static INT32 slider_crossoffset(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
#endif
|
||||
|
||||
|
||||
@ -1977,12 +1977,12 @@ static slider_state *slider_init(running_machine &machine)
|
||||
// slider_volume - global volume slider callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_volume(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_volume(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
if (newval != SLIDER_NOCHANGE)
|
||||
machine.sound().set_attenuation(newval);
|
||||
if (string != NULL)
|
||||
string->printf("%3ddB", machine.sound().attenuation());
|
||||
if (str != NULL)
|
||||
str->printf("%3ddB", machine.sound().attenuation());
|
||||
return machine.sound().attenuation();
|
||||
}
|
||||
|
||||
@ -1992,7 +1992,7 @@ static INT32 slider_volume(running_machine &machine, void *arg, astring *string,
|
||||
// slider callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_mixervol(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_mixervol(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
mixer_input info;
|
||||
if (!machine.sound().indexed_mixer_input((FPTR)arg, info))
|
||||
@ -2003,8 +2003,8 @@ static INT32 slider_mixervol(running_machine &machine, void *arg, astring *strin
|
||||
if (newval > curval && (newval - curval) <= 4) newval += 4; // round up on increment
|
||||
info.stream->set_user_gain(info.inputnum, (float)newval * 0.001f);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%4.2f", info.stream->user_gain(info.inputnum));
|
||||
if (str != NULL)
|
||||
str->printf("%4.2f", info.stream->user_gain(info.inputnum));
|
||||
return floor(info.stream->user_gain(info.inputnum) * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2014,7 +2014,7 @@ static INT32 slider_mixervol(running_machine &machine, void *arg, astring *strin
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_adjuster(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_adjuster(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
ioport_field *field = (ioport_field *)arg;
|
||||
ioport_field::user_settings settings;
|
||||
@ -2025,8 +2025,8 @@ static INT32 slider_adjuster(running_machine &machine, void *arg, astring *strin
|
||||
settings.value = newval;
|
||||
field->set_user_settings(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%d%%", settings.value);
|
||||
if (str != NULL)
|
||||
str->printf("%d%%", settings.value);
|
||||
return settings.value;
|
||||
}
|
||||
|
||||
@ -2036,13 +2036,13 @@ static INT32 slider_adjuster(running_machine &machine, void *arg, astring *strin
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_overclock(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_overclock(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
device_t *cpu = (device_t *)arg;
|
||||
if (newval != SLIDER_NOCHANGE)
|
||||
cpu->set_clock_scale((float)newval * 0.001f);
|
||||
if (string != NULL)
|
||||
string->printf("%3.0f%%", floor(cpu->clock_scale() * 100.0f + 0.5f));
|
||||
if (str != NULL)
|
||||
str->printf("%3.0f%%", floor(cpu->clock_scale() * 100.0f + 0.5f));
|
||||
return floor(cpu->clock_scale() * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2051,7 +2051,7 @@ static INT32 slider_overclock(running_machine &machine, void *arg, astring *stri
|
||||
// slider_refresh - refresh rate slider callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_refresh(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_refresh(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
screen_device *screen = reinterpret_cast<screen_device *>(arg);
|
||||
double defrefresh = ATTOSECONDS_TO_HZ(screen->refresh_attoseconds());
|
||||
@ -2064,8 +2064,8 @@ static INT32 slider_refresh(running_machine &machine, void *arg, astring *string
|
||||
const rectangle &visarea = screen->visible_area();
|
||||
screen->configure(width, height, visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001));
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3ffps", ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds));
|
||||
if (str != NULL)
|
||||
str->printf("%.3ffps", ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds));
|
||||
refresh = ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds);
|
||||
return floor((refresh - defrefresh) * 1000.0f + 0.5f);
|
||||
}
|
||||
@ -2076,7 +2076,7 @@ static INT32 slider_refresh(running_machine &machine, void *arg, astring *string
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_brightness(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_brightness(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
screen_device *screen = reinterpret_cast<screen_device *>(arg);
|
||||
render_container::user_settings settings;
|
||||
@ -2087,8 +2087,8 @@ static INT32 slider_brightness(running_machine &machine, void *arg, astring *str
|
||||
settings.m_brightness = (float)newval * 0.001f;
|
||||
screen->container().set_user_settings(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_brightness);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_brightness);
|
||||
return floor(settings.m_brightness * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2098,7 +2098,7 @@ static INT32 slider_brightness(running_machine &machine, void *arg, astring *str
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_contrast(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_contrast(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
screen_device *screen = reinterpret_cast<screen_device *>(arg);
|
||||
render_container::user_settings settings;
|
||||
@ -2109,8 +2109,8 @@ static INT32 slider_contrast(running_machine &machine, void *arg, astring *strin
|
||||
settings.m_contrast = (float)newval * 0.001f;
|
||||
screen->container().set_user_settings(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_contrast);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_contrast);
|
||||
return floor(settings.m_contrast * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2119,7 +2119,7 @@ static INT32 slider_contrast(running_machine &machine, void *arg, astring *strin
|
||||
// slider_gamma - screen gamma slider callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_gamma(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_gamma(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
screen_device *screen = reinterpret_cast<screen_device *>(arg);
|
||||
render_container::user_settings settings;
|
||||
@ -2130,8 +2130,8 @@ static INT32 slider_gamma(running_machine &machine, void *arg, astring *string,
|
||||
settings.m_gamma = (float)newval * 0.001f;
|
||||
screen->container().set_user_settings(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_gamma);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_gamma);
|
||||
return floor(settings.m_gamma * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2141,7 +2141,7 @@ static INT32 slider_gamma(running_machine &machine, void *arg, astring *string,
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_xscale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_xscale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
screen_device *screen = reinterpret_cast<screen_device *>(arg);
|
||||
render_container::user_settings settings;
|
||||
@ -2152,8 +2152,8 @@ static INT32 slider_xscale(running_machine &machine, void *arg, astring *string,
|
||||
settings.m_xscale = (float)newval * 0.001f;
|
||||
screen->container().set_user_settings(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_xscale);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_xscale);
|
||||
return floor(settings.m_xscale * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2163,7 +2163,7 @@ static INT32 slider_xscale(running_machine &machine, void *arg, astring *string,
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_yscale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_yscale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
screen_device *screen = reinterpret_cast<screen_device *>(arg);
|
||||
render_container::user_settings settings;
|
||||
@ -2174,8 +2174,8 @@ static INT32 slider_yscale(running_machine &machine, void *arg, astring *string,
|
||||
settings.m_yscale = (float)newval * 0.001f;
|
||||
screen->container().set_user_settings(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_yscale);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_yscale);
|
||||
return floor(settings.m_yscale * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2185,7 +2185,7 @@ static INT32 slider_yscale(running_machine &machine, void *arg, astring *string,
|
||||
// slider callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_xoffset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_xoffset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
screen_device *screen = reinterpret_cast<screen_device *>(arg);
|
||||
render_container::user_settings settings;
|
||||
@ -2196,8 +2196,8 @@ static INT32 slider_xoffset(running_machine &machine, void *arg, astring *string
|
||||
settings.m_xoffset = (float)newval * 0.001f;
|
||||
screen->container().set_user_settings(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_xoffset);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_xoffset);
|
||||
return floor(settings.m_xoffset * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2207,7 +2207,7 @@ static INT32 slider_xoffset(running_machine &machine, void *arg, astring *string
|
||||
// slider callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_yoffset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_yoffset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
screen_device *screen = reinterpret_cast<screen_device *>(arg);
|
||||
render_container::user_settings settings;
|
||||
@ -2218,8 +2218,8 @@ static INT32 slider_yoffset(running_machine &machine, void *arg, astring *string
|
||||
settings.m_yoffset = (float)newval * 0.001f;
|
||||
screen->container().set_user_settings(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_yoffset);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_yoffset);
|
||||
return floor(settings.m_yoffset * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2229,7 +2229,7 @@ static INT32 slider_yoffset(running_machine &machine, void *arg, astring *string
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_overxscale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_overxscale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
laserdisc_device *laserdisc = (laserdisc_device *)arg;
|
||||
laserdisc_overlay_config settings;
|
||||
@ -2240,8 +2240,8 @@ static INT32 slider_overxscale(running_machine &machine, void *arg, astring *str
|
||||
settings.m_overscalex = (float)newval * 0.001f;
|
||||
laserdisc->set_overlay_config(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_overscalex);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_overscalex);
|
||||
return floor(settings.m_overscalex * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2251,7 +2251,7 @@ static INT32 slider_overxscale(running_machine &machine, void *arg, astring *str
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_overyscale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_overyscale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
laserdisc_device *laserdisc = (laserdisc_device *)arg;
|
||||
laserdisc_overlay_config settings;
|
||||
@ -2262,8 +2262,8 @@ static INT32 slider_overyscale(running_machine &machine, void *arg, astring *str
|
||||
settings.m_overscaley = (float)newval * 0.001f;
|
||||
laserdisc->set_overlay_config(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_overscaley);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_overscaley);
|
||||
return floor(settings.m_overscaley * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2273,7 +2273,7 @@ static INT32 slider_overyscale(running_machine &machine, void *arg, astring *str
|
||||
// slider callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
laserdisc_device *laserdisc = (laserdisc_device *)arg;
|
||||
laserdisc_overlay_config settings;
|
||||
@ -2284,8 +2284,8 @@ static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *st
|
||||
settings.m_overposx = (float)newval * 0.001f;
|
||||
laserdisc->set_overlay_config(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_overposx);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_overposx);
|
||||
return floor(settings.m_overposx * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2295,7 +2295,7 @@ static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *st
|
||||
// slider callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
laserdisc_device *laserdisc = (laserdisc_device *)arg;
|
||||
laserdisc_overlay_config settings;
|
||||
@ -2306,8 +2306,8 @@ static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *st
|
||||
settings.m_overposy = (float)newval * 0.001f;
|
||||
laserdisc->set_overlay_config(settings);
|
||||
}
|
||||
if (string != NULL)
|
||||
string->printf("%.3f", settings.m_overposy);
|
||||
if (str != NULL)
|
||||
str->printf("%.3f", settings.m_overposy);
|
||||
return floor(settings.m_overposy * 1000.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2317,13 +2317,13 @@ static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *st
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_flicker(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_flicker(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
vector_device *vector = NULL;
|
||||
if (newval != SLIDER_NOCHANGE)
|
||||
vector->set_flicker((float)newval * 0.1f);
|
||||
if (string != NULL)
|
||||
string->printf("%1.2f", vector->get_flicker());
|
||||
if (str != NULL)
|
||||
str->printf("%1.2f", vector->get_flicker());
|
||||
return floor(vector->get_flicker() * 10.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2333,13 +2333,13 @@ static INT32 slider_flicker(running_machine &machine, void *arg, astring *string
|
||||
// callback
|
||||
//-------------------------------------------------
|
||||
|
||||
static INT32 slider_beam(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_beam(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
vector_device *vector = NULL;
|
||||
if (newval != SLIDER_NOCHANGE)
|
||||
vector->set_beam((float)newval * 0.01f);
|
||||
if (string != NULL)
|
||||
string->printf("%1.2f", vector->get_beam());
|
||||
if (str != NULL)
|
||||
str->printf("%1.2f", vector->get_beam());
|
||||
return floor(vector->get_beam() * 100.0f + 0.5f);
|
||||
}
|
||||
|
||||
@ -2369,14 +2369,14 @@ static char *slider_get_screen_desc(screen_device &screen)
|
||||
//-------------------------------------------------
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
static INT32 slider_crossscale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_crossscale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
ioport_field *field = (ioport_field *)arg;
|
||||
|
||||
if (newval != SLIDER_NOCHANGE)
|
||||
field->set_crosshair_scale(float(newval) * 0.001);
|
||||
if (string != NULL)
|
||||
string->printf("%s %s %1.3f", "Crosshair Scale", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
|
||||
if (str != NULL)
|
||||
str->printf("%s %s %1.3f", "Crosshair Scale", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
|
||||
return floor(field->crosshair_scale() * 1000.0f + 0.5f);
|
||||
}
|
||||
#endif
|
||||
@ -2388,14 +2388,14 @@ static INT32 slider_crossscale(running_machine &machine, void *arg, astring *str
|
||||
//-------------------------------------------------
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
static INT32 slider_crossoffset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_crossoffset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
ioport_field *field = (ioport_field *)arg;
|
||||
|
||||
if (newval != SLIDER_NOCHANGE)
|
||||
field->set_crosshair_offset(float(newval) * 0.001f);
|
||||
if (string != NULL)
|
||||
string->printf("%s %s %1.3f", "Crosshair Offset", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
|
||||
if (str != NULL)
|
||||
str->printf("%s %s %1.3f", "Crosshair Offset", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
|
||||
return field->crosshair_offset();
|
||||
}
|
||||
#endif
|
||||
|
@ -93,7 +93,7 @@ enum
|
||||
|
||||
typedef UINT32 (*ui_callback)(running_machine &, render_container *, UINT32);
|
||||
|
||||
typedef INT32 (*slider_update)(running_machine &machine, void *arg, astring *string, INT32 newval);
|
||||
typedef INT32 (*slider_update)(running_machine &machine, void *arg, astring *str, INT32 newval);
|
||||
|
||||
struct slider_state
|
||||
{
|
||||
|
@ -2394,418 +2394,418 @@ static slider_state *slider_alloc(running_machine &machine, const char *title, I
|
||||
// assorted global slider accessors
|
||||
//============================================================
|
||||
|
||||
static INT32 slider_set(float *option, float scale, const char *fmt, astring *string, INT32 newval)
|
||||
static INT32 slider_set(float *option, float scale, const char *fmt, astring *str, INT32 newval)
|
||||
{
|
||||
if (option != NULL && newval != SLIDER_NOCHANGE) *option = (float)newval * scale;
|
||||
if (string != NULL) string->printf(fmt, *option);
|
||||
if (str != NULL) str->printf(fmt, *option);
|
||||
return floor(*option / scale + 0.5f);
|
||||
}
|
||||
|
||||
static INT32 slider_shadow_mask_alpha(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_shadow_mask_alpha(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
return slider_set(&(((hlsl_options*)arg)->shadow_mask_alpha), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->shadow_mask_alpha), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_shadow_mask_x_count(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_shadow_mask_x_count(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
hlsl_options *options = (hlsl_options*)arg;
|
||||
if (newval != SLIDER_NOCHANGE) options->shadow_mask_count_x = newval;
|
||||
if (string != NULL) string->printf("%d", options->shadow_mask_count_x);
|
||||
if (str != NULL) str->printf("%d", options->shadow_mask_count_x);
|
||||
options->params_dirty = true;
|
||||
return options->shadow_mask_count_x;
|
||||
}
|
||||
|
||||
static INT32 slider_shadow_mask_y_count(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_shadow_mask_y_count(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
hlsl_options *options = (hlsl_options*)arg;
|
||||
if (newval != SLIDER_NOCHANGE) options->shadow_mask_count_y = newval;
|
||||
if (string != NULL) string->printf("%d", options->shadow_mask_count_y);
|
||||
if (str != NULL) str->printf("%d", options->shadow_mask_count_y);
|
||||
options->params_dirty = true;
|
||||
return options->shadow_mask_count_y;
|
||||
}
|
||||
|
||||
static INT32 slider_shadow_mask_usize(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_shadow_mask_usize(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->shadow_mask_u_size), 1.0f / 32.0f, "%2.5f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->shadow_mask_u_size), 1.0f / 32.0f, "%2.5f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_shadow_mask_vsize(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_shadow_mask_vsize(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->shadow_mask_v_size), 1.0f / 32.0f, "%2.5f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->shadow_mask_v_size), 1.0f / 32.0f, "%2.5f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_curvature(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_curvature(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->curvature), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->curvature), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_pincushion(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_pincushion(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->pincushion), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->pincushion), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_scanline_alpha(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_scanline_alpha(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_alpha), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_alpha), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_scanline_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_scanline_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_scale), 0.05f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_scale), 0.05f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_scanline_height(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_scanline_height(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_height), 0.05f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_height), 0.05f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_scanline_bright_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_scanline_bright_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_bright_scale), 0.05f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_bright_scale), 0.05f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_scanline_bright_offset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_scanline_bright_offset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_bright_offset), 0.05f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_bright_offset), 0.05f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_scanline_offset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_scanline_offset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_offset), 0.05f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->scanline_offset), 0.05f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_defocus_x(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_defocus_x(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->defocus[0]), 0.5f, "%2.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->defocus[0]), 0.5f, "%2.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_defocus_y(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_defocus_y(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->defocus[1]), 0.5f, "%2.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->defocus[1]), 0.5f, "%2.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_converge_x(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_x[0]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_x[0]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_converge_y(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_y[0]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_y[0]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_converge_x(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_x[1]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_x[1]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_converge_y(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_y[1]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_y[1]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_converge_x(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_x[2]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_x[2]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_converge_y(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_y[2]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->converge_y[2]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_radial_converge_x(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_radial_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_x[0]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_x[0]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_radial_converge_y(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_radial_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_y[0]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_y[0]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_radial_converge_x(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_radial_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_x[1]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_x[1]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_radial_converge_y(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_radial_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_y[1]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_y[1]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_radial_converge_x(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_radial_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_x[2]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_x[2]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_radial_converge_y(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_radial_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_y[2]), 0.1f, "%3.1f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->radial_converge_y[2]), 0.1f, "%3.1f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_from_r(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_from_r(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->red_ratio[0]), 0.005f, "%2.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->red_ratio[0]), 0.005f, "%2.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_from_g(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_from_g(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->red_ratio[1]), 0.005f, "%2.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->red_ratio[1]), 0.005f, "%2.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_from_b(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_from_b(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->red_ratio[2]), 0.005f, "%2.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->red_ratio[2]), 0.005f, "%2.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_from_r(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_from_r(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->grn_ratio[0]), 0.005f, "%2.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->grn_ratio[0]), 0.005f, "%2.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_from_g(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_from_g(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->grn_ratio[1]), 0.005f, "%2.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->grn_ratio[1]), 0.005f, "%2.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_from_b(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_from_b(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->grn_ratio[2]), 0.005f, "%2.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->grn_ratio[2]), 0.005f, "%2.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_from_r(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_from_r(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->blu_ratio[0]), 0.005f, "%2.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->blu_ratio[0]), 0.005f, "%2.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_from_g(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_from_g(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->blu_ratio[1]), 0.005f, "%2.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->blu_ratio[1]), 0.005f, "%2.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_from_b(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_from_b(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->blu_ratio[2]), 0.005f, "%2.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->blu_ratio[2]), 0.005f, "%2.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_offset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_offset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->offset[0]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->offset[0]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_offset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_offset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->offset[1]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->offset[1]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_offset(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_offset(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->offset[2]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->offset[2]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->scale[0]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->scale[0]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->scale[1]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->scale[1]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->scale[2]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->scale[2]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_power(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_power(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->power[0]), 0.05f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->power[0]), 0.05f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_power(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_power(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->power[1]), 0.05f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->power[1]), 0.05f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_power(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_power(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->power[2]), 0.05f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->power[2]), 0.05f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_floor(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_floor(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->floor[0]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->floor[0]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_floor(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_floor(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->floor[1]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->floor[1]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_floor(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_floor(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->floor[2]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->floor[2]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_red_phosphor_life(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_red_phosphor_life(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->phosphor[0]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->phosphor[0]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_green_phosphor_life(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_green_phosphor_life(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->phosphor[1]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->phosphor[1]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_blue_phosphor_life(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_blue_phosphor_life(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->phosphor[2]), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->phosphor[2]), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_saturation(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_saturation(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->saturation), 0.01f, "%2.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->saturation), 0.01f, "%2.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_vector_attenuation(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_vector_attenuation(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->vector_length_scale), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->vector_length_scale), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_vector_length_max(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_vector_length_max(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->vector_length_ratio), 1.0f, "%4f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->vector_length_ratio), 1.0f, "%4f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_vector_bloom_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_vector_bloom_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->vector_bloom_scale), 0.001f, "%1.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->vector_bloom_scale), 0.001f, "%1.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_raster_bloom_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_raster_bloom_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->raster_bloom_scale), 0.001f, "%1.3f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->raster_bloom_scale), 0.001f, "%1.3f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl0_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl0_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level0_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level0_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl1_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl1_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level1_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level1_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl2_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl2_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level2_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level2_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl3_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl3_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level3_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level3_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl4_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl4_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level4_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level4_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl5_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl5_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level5_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level5_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl6_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl6_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level6_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level6_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl7_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl7_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level7_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level7_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl8_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl8_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level8_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level8_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl9_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl9_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level9_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level9_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
static INT32 slider_bloom_lvl10_scale(running_machine &machine, void *arg, astring *string, INT32 newval)
|
||||
static INT32 slider_bloom_lvl10_scale(running_machine &machine, void *arg, astring *str, INT32 newval)
|
||||
{
|
||||
((hlsl_options*)arg)->params_dirty = true;
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level10_weight), 0.01f, "%1.2f", string, newval);
|
||||
return slider_set(&(((hlsl_options*)arg)->bloom_level10_weight), 0.01f, "%1.2f", str, newval);
|
||||
}
|
||||
|
||||
//============================================================
|
||||
|
Loading…
Reference in New Issue
Block a user