diff options
| author | 2016-05-22 20:06:00 +0200 | |
|---|---|---|
| committer | 2016-05-22 20:54:31 +0200 | |
| commit | 052fd0c608e8a4bb0ed300e4ac95638963127043 (patch) | |
| tree | fbe6e94537cce505778cc2a49443d461070130b0 /src/devices/video/vector.cpp | |
| parent | 92c2bdf9170662274f0c2ca1e3a30357f02ca977 (diff) | |
Moved extension of vector lines to where it belongs (nw)
Diffstat (limited to 'src/devices/video/vector.cpp')
| -rw-r--r-- | src/devices/video/vector.cpp | 56 |
1 files changed, 12 insertions, 44 deletions
diff --git a/src/devices/video/vector.cpp b/src/devices/video/vector.cpp index 993157e08de..8606fe666aa 100644 --- a/src/devices/video/vector.cpp +++ b/src/devices/video/vector.cpp @@ -27,6 +27,18 @@ * added two new tables Tinten and Tmerge (for 256 color support) * added find_color routine to build above tables .ac * + * Vector Team + * + * Brad Oliver + * Aaron Giles + * Bernd Wiebelt + * Allard van der Bas + * Al Kossow (VECSIM) + * Hedley Rainnie (VECSIM) + * Eric Smith (VECSIM) + * Neil Bradley (technical advice) + * Andrew Caldwell (anti-aliasing) + * **************************************************************************** */ #include "emu.h" @@ -35,25 +47,10 @@ #include "vector.h" -#define FLT_EPSILON 1E-5 - #define VECTOR_WIDTH_DENOM 512 #define MAX_POINTS 10000 -#define VECTOR_TEAM \ - "-* Vector Heads *-\n" \ - "Brad Oliver\n" \ - "Aaron Giles\n" \ - "Bernd Wiebelt\n" \ - "Allard van der Bas\n" \ - "Al Kossow (VECSIM)\n" \ - "Hedley Rainnie (VECSIM)\n" \ - "Eric Smith (VECSIM)\n" \ - "Neil Bradley (technical advice)\n" \ - "Andrew Caldwell (anti-aliasing)\n" \ - "- *** -\n" - float vector_options::s_flicker = 0.0f; float vector_options::s_beam_width_min = 0.0f; float vector_options::s_beam_width_max = 0.0f; @@ -154,10 +151,6 @@ UINT32 vector_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, float yscale = 1.0f / (65536 * visarea.height()); float xoffs = (float)visarea.min_x; float yoffs = (float)visarea.min_y; - float xratio = xscale / yscale; - float yratio = yscale / xscale; - xratio = (xratio < 1.0f) ? xratio : 1.0f; - yratio = (yratio < 1.0f) ? yratio : 1.0f; point *curpoint; int lastx = 0; @@ -188,31 +181,6 @@ UINT32 vector_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, coords.x1 = ((float)curpoint->x - xoffs) * xscale; coords.y1 = ((float)curpoint->y - yoffs) * yscale; - float xdistance = coords.x0 - coords.x1; - float ydistance = coords.y0 - coords.y1; - - // extend zero-length vector line (vector point) by 3/8 beam_width on both sides - if (fabs(xdistance) < FLT_EPSILON && - fabs(ydistance) < FLT_EPSILON) - { - coords.x0 += xratio * beam_width * 0.375f; - coords.y0 += yratio * beam_width * 0.375f; - coords.x1 -= xratio * beam_width * 0.375f; - coords.y1 -= yratio * beam_width * 0.375f; - } - // extend vector line by 3/8 beam_width on both sides - else - { - float length = sqrt(xdistance * xdistance + ydistance * ydistance); - float xdirection = xdistance / length; - float ydirection = ydistance / length; - - coords.x0 += xratio * beam_width * 0.375f * (xdirection / xratio); - coords.y0 += yratio * beam_width * 0.375f * (ydirection / yratio); - coords.x1 -= xratio * beam_width * 0.375f * (xdirection / xratio); - coords.y1 -= yratio * beam_width * 0.375f * (ydirection / yratio); - } - if (curpoint->intensity != 0) { screen.container().add_line( |
