- some renamings
- reverted one unwanted change in vector.fx
This commit is contained in:
ImJezze 2015-10-26 19:49:17 +01:00
parent 7018c3d294
commit 21b577483b
7 changed files with 40 additions and 40 deletions

View File

@ -72,7 +72,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
float lengthModulate = 1.0f - clamp(Input.LineInfo.x / LengthParams.z, 0.0f, 1.0f);
float minLength = 2.0f - clamp(Input.LineInfo.x - 1.0f, 0.0f, 2.0f);
lengthModulate = lerp(lengthModulate, 2.0f, minLength * 0.5f);
lengthModulate = lerp(lengthModulate, 4.0f, minLength * 0.5f);
lengthModulate = lerp(1.0f, timeModulate * lengthModulate, LengthParams.y);
float4 outColor = Input.Color * float4(lengthModulate, lengthModulate, lengthModulate, 1.0f);

View File

@ -112,8 +112,8 @@ const options_entry emu_options::s_option_entries[] =
// vector options
{ NULL, NULL, OPTION_HEADER, "CORE VECTOR OPTIONS" },
{ OPTION_ANTIALIAS ";aa", "1", OPTION_BOOLEAN, "use antialiasing when drawing vectors" },
{ OPTION_BEAM_MIN, "1.0", OPTION_FLOAT, "set vector beam width minimum" },
{ OPTION_BEAM_MAX, "1.0", OPTION_FLOAT, "set vector beam width maximum" },
{ OPTION_BEAM_WIDTH_MIN, "1.0", OPTION_FLOAT, "set vector beam width minimum" },
{ OPTION_BEAM_WIDTH_MAX, "1.0", OPTION_FLOAT, "set vector beam width maximum" },
{ OPTION_BEAM_INTENSITY_WEIGHT, "0", OPTION_FLOAT, "set vector beam intensity weight " },
{ OPTION_FLICKER, "0", OPTION_FLOAT, "set vector flicker effect" },

View File

@ -119,8 +119,8 @@ enum
// core vector options
#define OPTION_ANTIALIAS "antialias"
#define OPTION_BEAM_MIN "beam_min"
#define OPTION_BEAM_MAX "beam_max"
#define OPTION_BEAM_WIDTH_MIN "beam_width_min"
#define OPTION_BEAM_WIDTH_MAX "beam_width_max"
#define OPTION_BEAM_INTENSITY_WEIGHT "beam_intensity_weight"
#define OPTION_FLICKER "flicker"
@ -298,8 +298,8 @@ public:
// core vector options
bool antialias() const { return bool_value(OPTION_ANTIALIAS); }
float beam_min() const { return float_value(OPTION_BEAM_MIN); }
float beam_max() const { return float_value(OPTION_BEAM_MAX); }
float beam_width_min() const { return float_value(OPTION_BEAM_WIDTH_MIN); }
float beam_width_max() const { return float_value(OPTION_BEAM_WIDTH_MAX); }
float beam_intensity_weight() const { return float_value(OPTION_BEAM_INTENSITY_WEIGHT); }
float flicker() const { return float_value(OPTION_FLICKER); }

View File

@ -124,8 +124,8 @@ static INT32 slider_overyscale(running_machine &machine, void *arg, std::string
static INT32 slider_overxoffset(running_machine &machine, void *arg, std::string *str, INT32 newval);
static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string *str, INT32 newval);
static INT32 slider_flicker(running_machine &machine, void *arg, std::string *str, INT32 newval);
static INT32 slider_beam_min(running_machine &machine, void *arg, std::string *str, INT32 newval);
static INT32 slider_beam_max(running_machine &machine, void *arg, std::string *str, INT32 newval);
static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::string *str, INT32 newval);
static INT32 slider_beam_width_max(running_machine &machine, void *arg, std::string *str, INT32 newval);
static INT32 slider_beam_intensity_weight(running_machine &machine, void *arg, std::string *str, INT32 newval);
static char *slider_get_screen_desc(screen_device &screen);
#ifdef MAME_DEBUG
@ -1969,9 +1969,9 @@ static slider_state *slider_init(running_machine &machine)
// add vector control
*tailptr = slider_alloc(machine, "Vector Flicker", 0, 0, 1000, 10, slider_flicker, NULL);
tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(machine, "Beam Width Minimum", 1, 100, 1000, 1, slider_beam_min, NULL);
*tailptr = slider_alloc(machine, "Beam Width Minimum", 1, 100, 1000, 1, slider_beam_width_min, NULL);
tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(machine, "Beam Width Maximum", 1, 100, 1000, 1, slider_beam_max, NULL);
*tailptr = slider_alloc(machine, "Beam Width Maximum", 1, 100, 1000, 1, slider_beam_width_max, NULL);
tailptr = &(*tailptr)->next;
*tailptr = slider_alloc(machine, "Beam Intensity Weight", -1000, 0, 1000, 10, slider_beam_intensity_weight, NULL);
tailptr = &(*tailptr)->next;
@ -2354,34 +2354,34 @@ static INT32 slider_flicker(running_machine &machine, void *arg, std::string *st
//-------------------------------------------------
// slider_beam_min - minimum vector beam width slider
// slider_beam_width_min - minimum vector beam width slider
// callback
//-------------------------------------------------
static INT32 slider_beam_min(running_machine &machine, void *arg, std::string *str, INT32 newval)
static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
vector_device *vector = NULL;
if (newval != SLIDER_NOCHANGE)
vector->set_beam_min(MIN((float)newval * 0.01f, vector->get_beam_max()));
vector->set_beam_width_min(MIN((float)newval * 0.01f, vector->get_beam_width_max()));
if (str != NULL)
strprintf(*str,"%1.2f", (double) vector->get_beam_min());
return floor(vector->get_beam_min() * 100.0f + 0.5f);
strprintf(*str,"%1.2f", (double) vector->get_beam_width_min());
return floor(vector->get_beam_width_min() * 100.0f + 0.5f);
}
//-------------------------------------------------
// slider_beam_max - maximum vector beam width slider
// slider_beam_width_max - maximum vector beam width slider
// callback
//-------------------------------------------------
static INT32 slider_beam_max(running_machine &machine, void *arg, std::string *str, INT32 newval)
static INT32 slider_beam_width_max(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
vector_device *vector = NULL;
if (newval != SLIDER_NOCHANGE)
vector->set_beam_max(MAX((float)newval * 0.01f, vector->get_beam_min()));
vector->set_beam_width_max(MAX((float)newval * 0.01f, vector->get_beam_width_min()));
if (str != NULL)
strprintf(*str,"%1.2f", (double) vector->get_beam_max());
return floor(vector->get_beam_max() * 100.0f + 0.5f);
strprintf(*str,"%1.2f", (double) vector->get_beam_width_max());
return floor(vector->get_beam_width_max() * 100.0f + 0.5f);
}

View File

@ -149,8 +149,8 @@ int vector_device::m_vector_index;
void vector_device::device_start()
{
/* Grab the settings for this session */
m_beam_width_min = machine().options().beam_min();
m_beam_width_max = machine().options().beam_max();
m_beam_width_min = machine().options().beam_width_min();
m_beam_width_max = machine().options().beam_width_max();
m_beam_intensity_weight = machine().options().beam_intensity_weight();
m_flicker = machine().options().flicker();
@ -160,9 +160,9 @@ void vector_device::device_start()
m_vector_list = auto_alloc_array_clear(machine(), point, MAX_POINTS);
}
void vector_device::set_flicker(float _flicker)
void vector_device::set_flicker(float newval)
{
m_flicker = _flicker;
m_flicker = newval;
}
float vector_device::get_flicker()
@ -170,29 +170,29 @@ float vector_device::get_flicker()
return m_flicker;
}
void vector_device::set_beam_min(float _beam)
void vector_device::set_beam_width_min(float newval)
{
m_beam_width_min = _beam;
m_beam_width_min = newval;
}
float vector_device::get_beam_min()
float vector_device::get_beam_width_min()
{
return m_beam_width_min;
}
void vector_device::set_beam_max(float _beam)
void vector_device::set_beam_width_max(float newval)
{
m_beam_width_max = _beam;
m_beam_width_max = newval;
}
float vector_device::get_beam_max()
float vector_device::get_beam_width_max()
{
return m_beam_width_max;
}
void vector_device::set_beam_intensity_weight(float _beam)
void vector_device::set_beam_intensity_weight(float newval)
{
m_beam_intensity_weight = _beam;
m_beam_intensity_weight = newval;
}
float vector_device::get_beam_intensity_weight()

View File

@ -45,16 +45,16 @@ public:
void add_point(int x, int y, rgb_t color, int intensity);
void add_clip(int minx, int miny, int maxx, int maxy);
void set_flicker(float m_flicker);
void set_flicker(float newval);
float get_flicker();
void set_beam_min(float _beam);
float get_beam_min();
void set_beam_width_min(float newval);
float get_beam_width_min();
void set_beam_max(float _beam);
float get_beam_max();
void set_beam_width_max(float newval);
float get_beam_width_max();
void set_beam_intensity_weight(float _beam);
void set_beam_intensity_weight(float newval);
float get_beam_intensity_weight();
// device-level overrides

View File

@ -96,7 +96,7 @@ bool sdl_osd_interface::video_init()
sdl_monitor_info::init();
// we need the beam width in a float, contrary to what the core does.
video_config.beamwidth = options().beam_min();
video_config.beamwidth = options().beam_width_min();
// initialize the window system so we can make windows
if (!window_init())