summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2013-05-20 06:51:25 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2013-05-20 06:51:25 +0000
commit1c05ccc93bd32a9bb5a50f18e2e8bd29c3511e25 (patch)
tree7133a7cea14e7c27e731c320b87663971b1a31d3 /src/osd
parentcae878c9b438a4b88678db213db9c4aed215b5cc (diff)
Cleanups and version bumpmame0148u5
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/sdl/debugqtdasmwindow.h6
-rw-r--r--src/osd/sdl/debugqtlogwindow.h4
-rw-r--r--src/osd/sdl/debugqtmainwindow.c2
-rw-r--r--src/osd/sdl/debugqtmainwindow.h6
-rw-r--r--src/osd/sdl/debugqtmemorywindow.c14
-rw-r--r--src/osd/sdl/debugqtmemorywindow.h8
-rw-r--r--src/osd/sdl/debugqtview.h4
-rw-r--r--src/osd/sdl/debugqtwindow.h8
-rw-r--r--src/osd/windows/d3d9intf.c1
-rw-r--r--src/osd/windows/d3dcomm.h159
-rw-r--r--src/osd/windows/d3dhlsl.c6
-rw-r--r--src/osd/windows/d3dhlsl.h71
-rw-r--r--src/osd/windows/d3dintf.h1
-rw-r--r--src/osd/windows/drawd3d.c123
-rw-r--r--src/osd/windows/drawd3d.h125
-rw-r--r--src/osd/windows/winmain.c26
-rw-r--r--src/osd/windows/winmain.h4
17 files changed, 280 insertions, 288 deletions
diff --git a/src/osd/sdl/debugqtdasmwindow.h b/src/osd/sdl/debugqtdasmwindow.h
index 633a6029b74..f723fad55dc 100644
--- a/src/osd/sdl/debugqtdasmwindow.h
+++ b/src/osd/sdl/debugqtdasmwindow.h
@@ -52,13 +52,13 @@ public:
m_rightBar(0)
{
}
-
+
~DasmWindowQtConfig() {}
-
+
// Settings
int m_cpu;
int m_rightBar;
-
+
void buildFromQWidget(QWidget* widget);
void applyToQWidget(QWidget* widget);
void addToXmlDataNode(xml_data_node* node) const;
diff --git a/src/osd/sdl/debugqtlogwindow.h b/src/osd/sdl/debugqtlogwindow.h
index 18fce1ea760..812da3715ad 100644
--- a/src/osd/sdl/debugqtlogwindow.h
+++ b/src/osd/sdl/debugqtlogwindow.h
@@ -35,9 +35,9 @@ public:
WindowQtConfig(WIN_TYPE_LOG)
{
}
-
+
~LogWindowQtConfig() {}
-
+
void buildFromQWidget(QWidget* widget);
void applyToQWidget(QWidget* widget);
void addToXmlDataNode(xml_data_node* node) const;
diff --git a/src/osd/sdl/debugqtmainwindow.c b/src/osd/sdl/debugqtmainwindow.c
index cc4223a3e23..fab7fddc440 100644
--- a/src/osd/sdl/debugqtmainwindow.c
+++ b/src/osd/sdl/debugqtmainwindow.c
@@ -125,7 +125,7 @@ void MainWindow::setProcessor(device_t* processor)
void MainWindow::closeEvent(QCloseEvent* event)
{
debugActQuit();
-
+
// Insure the window doesn't disappear before we get a chance to save its parameters
event->ignore();
}
diff --git a/src/osd/sdl/debugqtmainwindow.h b/src/osd/sdl/debugqtmainwindow.h
index f01ea0bb716..8d25bf60a2a 100644
--- a/src/osd/sdl/debugqtmainwindow.h
+++ b/src/osd/sdl/debugqtmainwindow.h
@@ -171,13 +171,13 @@ public:
m_rightBar(0),
m_windowState()
{}
-
+
~MainWindowQtConfig() {}
-
+
// Settings
int m_rightBar;
QByteArray m_windowState;
-
+
void buildFromQWidget(QWidget* widget);
void applyToQWidget(QWidget* widget);
void addToXmlDataNode(xml_data_node* node) const;
diff --git a/src/osd/sdl/debugqtmemorywindow.c b/src/osd/sdl/debugqtmemorywindow.c
index 29ad1e291a6..1297d787266 100644
--- a/src/osd/sdl/debugqtmemorywindow.c
+++ b/src/osd/sdl/debugqtmemorywindow.c
@@ -293,18 +293,18 @@ void DebuggerMemView::mousePressEvent(QMouseEvent* event)
address_space* addressSpace = source->space();
const int nativeDataWidth = addressSpace->data_width() / 8;
const UINT64 memValue = debug_read_memory(*addressSpace,
- addressSpace->address_to_byte(address),
- nativeDataWidth,
- true);
- const offs_t pc = source->device()->debug()->track_mem_pc_from_space_address_data(addressSpace->spacenum(),
- address,
- memValue);
+ addressSpace->address_to_byte(address),
+ nativeDataWidth,
+ true);
+ const offs_t pc = source->device()->debug()->track_mem_pc_from_space_address_data(addressSpace->spacenum(),
+ address,
+ memValue);
if (pc != (offs_t)(-1))
{
// TODO: You can specify a box that the tooltip stays alive within - might be good?
const QString addressAndPc = QString("Address %1 written at PC=%2").arg(address, 2, 16).arg(pc, 2, 16);
QToolTip::showText(QCursor::pos(), addressAndPc, NULL);
-
+
// Copy the PC into the clipboard as well
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(QString("%1").arg(pc, 2, 16));
diff --git a/src/osd/sdl/debugqtmemorywindow.h b/src/osd/sdl/debugqtmemorywindow.h
index 88ddd9f58fe..b48ea03645c 100644
--- a/src/osd/sdl/debugqtmemorywindow.h
+++ b/src/osd/sdl/debugqtmemorywindow.h
@@ -54,10 +54,10 @@ public:
DebuggerMemView(const debug_view_type& type,
running_machine* machine,
QWidget* parent=NULL)
- : DebuggerView(type, machine, parent)
+ : DebuggerView(type, machine, parent)
{}
virtual ~DebuggerMemView() {}
-
+
protected:
void mousePressEvent(QMouseEvent* event);
};
@@ -79,13 +79,13 @@ public:
}
~MemoryWindowQtConfig() {}
-
+
// Settings
int m_reverse;
int m_addressMode;
int m_chunkSize;
int m_memoryRegion;
-
+
void buildFromQWidget(QWidget* widget);
void applyToQWidget(QWidget* widget);
void addToXmlDataNode(xml_data_node* node) const;
diff --git a/src/osd/sdl/debugqtview.h b/src/osd/sdl/debugqtview.h
index fd78760d169..16ce1f48fbd 100644
--- a/src/osd/sdl/debugqtview.h
+++ b/src/osd/sdl/debugqtview.h
@@ -12,8 +12,8 @@ class DebuggerView : public QAbstractScrollArea
public:
DebuggerView(const debug_view_type& type,
- running_machine* machine,
- QWidget* parent=NULL);
+ running_machine* machine,
+ QWidget* parent=NULL);
virtual ~DebuggerView();
void paintEvent(QPaintEvent* event);
diff --git a/src/osd/sdl/debugqtwindow.h b/src/osd/sdl/debugqtwindow.h
index 63dddc6ea42..9ae0852d3a3 100644
--- a/src/osd/sdl/debugqtwindow.h
+++ b/src/osd/sdl/debugqtwindow.h
@@ -77,17 +77,17 @@ public:
m_next(NULL)
{}
virtual ~WindowQtConfig() {}
-
+
// Settings
WindowType m_type;
QPoint m_size;
QPoint m_position;
-
+
// Dues for becoming a member of a simple_list
WindowQtConfig* m_next;
WindowQtConfig* next() const { return m_next; }
-
-
+
+
virtual void buildFromQWidget(QWidget* widget);
virtual void applyToQWidget(QWidget* widget);
virtual void addToXmlDataNode(xml_data_node* node) const;
diff --git a/src/osd/windows/d3d9intf.c b/src/osd/windows/d3d9intf.c
index 3f0002b3d61..0c0a60bccb0 100644
--- a/src/osd/windows/d3d9intf.c
+++ b/src/osd/windows/d3d9intf.c
@@ -67,7 +67,6 @@ static direct3dx9_loadeffect_ptr g_load_effect = NULL;
namespace d3d
{
-
//============================================================
// PROTOTYPES
//============================================================
diff --git a/src/osd/windows/d3dcomm.h b/src/osd/windows/d3dcomm.h
index f2e8270099c..ec3ee2e97c9 100644
--- a/src/osd/windows/d3dcomm.h
+++ b/src/osd/windows/d3dcomm.h
@@ -48,7 +48,6 @@
namespace d3d
{
-
class texture_info;
class renderer;
@@ -92,35 +91,35 @@ public:
texture_manager(renderer *d3d);
~texture_manager();
- void update_textures();
+ void update_textures();
- void create_resources();
- void delete_resources();
+ void create_resources();
+ void delete_resources();
- texture_info * find_texinfo(const render_texinfo *texture, UINT32 flags);
- UINT32 texture_compute_hash(const render_texinfo *texture, UINT32 flags);
+ texture_info * find_texinfo(const render_texinfo *texture, UINT32 flags);
+ UINT32 texture_compute_hash(const render_texinfo *texture, UINT32 flags);
- texture_info * get_texlist() { return m_texlist; }
- void set_texlist(texture_info *texlist) { m_texlist = texlist; }
- bool is_dynamic_supported() { return (bool)m_dynamic_supported; }
- void set_dynamic_supported(bool dynamic_supported) { m_dynamic_supported = dynamic_supported; }
- bool is_stretch_supported() { return (bool)m_stretch_supported; }
- D3DFORMAT get_yuv_format() { return m_yuv_format; }
+ texture_info * get_texlist() { return m_texlist; }
+ void set_texlist(texture_info *texlist) { m_texlist = texlist; }
+ bool is_dynamic_supported() { return (bool)m_dynamic_supported; }
+ void set_dynamic_supported(bool dynamic_supported) { m_dynamic_supported = dynamic_supported; }
+ bool is_stretch_supported() { return (bool)m_stretch_supported; }
+ D3DFORMAT get_yuv_format() { return m_yuv_format; }
- DWORD get_texture_caps() { return m_texture_caps; }
- DWORD get_max_texture_aspect() { return m_texture_max_aspect; }
- DWORD get_max_texture_width() { return m_texture_max_width; }
- DWORD get_max_texture_height() { return m_texture_max_height; }
+ DWORD get_texture_caps() { return m_texture_caps; }
+ DWORD get_max_texture_aspect() { return m_texture_max_aspect; }
+ DWORD get_max_texture_width() { return m_texture_max_width; }
+ DWORD get_max_texture_height() { return m_texture_max_height; }
- texture_info * get_default_texture() { return m_default_texture; }
- texture_info * get_vector_texture() { return m_vector_texture; }
+ texture_info * get_default_texture() { return m_default_texture; }
+ texture_info * get_vector_texture() { return m_vector_texture; }
- renderer * get_d3d() { return m_renderer; }
+ renderer * get_d3d() { return m_renderer; }
private:
- renderer * m_renderer;
+ renderer * m_renderer;
- texture_info * m_texlist; // list of active textures
+ texture_info * m_texlist; // list of active textures
int m_dynamic_supported; // are dynamic textures supported?
int m_stretch_supported; // is StretchRect with point filtering supported?
D3DFORMAT m_yuv_format; // format to use for YUV textures
@@ -131,10 +130,10 @@ private:
DWORD m_texture_max_height; // texture maximum height
bitmap_argb32 m_vector_bitmap; // experimental: bitmap for vectors
- texture_info * m_vector_texture; // experimental: texture for vectors
+ texture_info * m_vector_texture; // experimental: texture for vectors
bitmap_rgb32 m_default_bitmap; // experimental: default bitmap
- texture_info * m_default_texture; // experimental: default texture
+ texture_info * m_default_texture; // experimental: default texture
};
@@ -145,66 +144,66 @@ public:
texture_info(texture_manager *manager, const render_texinfo *texsource, UINT32 flags);
~texture_info();
- render_texinfo & get_texinfo() { return m_texinfo; }
+ render_texinfo & get_texinfo() { return m_texinfo; }
- int get_width() { return m_rawdims.c.x; }
- int get_height() { return m_rawdims.c.y; }
- int get_xscale() { return m_xprescale; }
- int get_yscale() { return m_yprescale; }
+ int get_width() { return m_rawdims.c.x; }
+ int get_height() { return m_rawdims.c.y; }
+ int get_xscale() { return m_xprescale; }
+ int get_yscale() { return m_yprescale; }
- UINT32 get_flags() { return m_flags; }
+ UINT32 get_flags() { return m_flags; }
- void set_data(const render_texinfo *texsource, UINT32 flags);
+ void set_data(const render_texinfo *texsource, UINT32 flags);
- texture_info * get_next() { return m_next; }
- texture_info * get_prev() { return m_prev; }
+ texture_info * get_next() { return m_next; }
+ texture_info * get_prev() { return m_prev; }
- UINT32 get_hash() { return m_hash; }
+ UINT32 get_hash() { return m_hash; }
- void set_next(texture_info *next) { m_next = next; }
- void set_prev(texture_info *prev) { m_prev = prev; }
+ void set_next(texture_info *next) { m_next = next; }
+ void set_prev(texture_info *prev) { m_prev = prev; }
- bool paused() { return m_cur_frame == m_prev_frame; }
- void advance_frame() { m_prev_frame = m_cur_frame; }
- void increment_frame_count() { m_cur_frame++; }
- void mask_frame_count(int mask) { m_cur_frame %= mask; }
+ bool paused() { return m_cur_frame == m_prev_frame; }
+ void advance_frame() { m_prev_frame = m_cur_frame; }
+ void increment_frame_count() { m_cur_frame++; }
+ void mask_frame_count(int mask) { m_cur_frame %= mask; }
- int get_cur_frame() { return m_cur_frame; }
- int get_prev_frame() { return m_prev_frame; }
+ int get_cur_frame() { return m_cur_frame; }
+ int get_prev_frame() { return m_prev_frame; }
- texture * get_tex() { return m_d3dtex; }
- surface * get_surface() { return m_d3dsurface; }
- texture * get_finaltex() { return m_d3dfinaltex; }
+ texture * get_tex() { return m_d3dtex; }
+ surface * get_surface() { return m_d3dsurface; }
+ texture * get_finaltex() { return m_d3dfinaltex; }
- vec2f & get_uvstart() { return m_start; }
- vec2f & get_uvstop() { return m_stop; }
- vec2f & get_rawdims() { return m_rawdims; }
+ vec2f & get_uvstart() { return m_start; }
+ vec2f & get_uvstop() { return m_stop; }
+ vec2f & get_rawdims() { return m_rawdims; }
private:
void prescale();
void compute_size(int texwidth, int texheight);
- texture_manager * m_texture_manager; // texture manager pointer
-
- renderer * m_renderer; // renderer pointer
-
- texture_info * m_next; // next texture in the list
- texture_info * m_prev; // prev texture in the list
-
- UINT32 m_hash; // hash value for the texture
- UINT32 m_flags; // rendering flags
- render_texinfo m_texinfo; // copy of the texture info
- vec2f m_start; // beggining UV coordinates
- vec2f m_stop; // ending UV coordinates
- vec2f m_rawdims; // raw dims of the texture
- int m_type; // what type of texture are we?
- int m_xborderpix, m_yborderpix; // number of border pixels on X/Y
- int m_xprescale, m_yprescale; // X/Y prescale factor
- int m_cur_frame; // what is our current frame?
- int m_prev_frame; // what was our last frame? (used to determine pause state)
- texture * m_d3dtex; // Direct3D texture pointer
- surface * m_d3dsurface; // Direct3D offscreen plain surface pointer
- texture * m_d3dfinaltex; // Direct3D final (post-scaled) texture
+ texture_manager * m_texture_manager; // texture manager pointer
+
+ renderer * m_renderer; // renderer pointer
+
+ texture_info * m_next; // next texture in the list
+ texture_info * m_prev; // prev texture in the list
+
+ UINT32 m_hash; // hash value for the texture
+ UINT32 m_flags; // rendering flags
+ render_texinfo m_texinfo; // copy of the texture info
+ vec2f m_start; // beggining UV coordinates
+ vec2f m_stop; // ending UV coordinates
+ vec2f m_rawdims; // raw dims of the texture
+ int m_type; // what type of texture are we?
+ int m_xborderpix, m_yborderpix; // number of border pixels on X/Y
+ int m_xprescale, m_yprescale; // X/Y prescale factor
+ int m_cur_frame; // what is our current frame?
+ int m_prev_frame; // what was our last frame? (used to determine pause state)
+ texture * m_d3dtex; // Direct3D texture pointer
+ surface * m_d3dsurface; // Direct3D offscreen plain surface pointer
+ texture * m_d3dfinaltex; // Direct3D final (post-scaled) texture
int m_target_index; // Direct3D target index
};
@@ -223,18 +222,18 @@ public:
float prim_width, float prim_height);
D3DPRIMITIVETYPE get_type() { return m_type; }
- UINT32 get_count() { return m_count; }
- UINT32 get_vertcount() { return m_numverts; }
- UINT32 get_flags() { return m_flags; }
+ UINT32 get_count() { return m_count; }
+ UINT32 get_vertcount() { return m_numverts; }
+ UINT32 get_flags() { return m_flags; }
- d3d::texture_info * get_texture() { return m_texture; }
- DWORD get_modmode() { return m_modmode; }
+ d3d::texture_info * get_texture() { return m_texture; }
+ DWORD get_modmode() { return m_modmode; }
- float get_line_time() { return m_line_time; }
- float get_line_length() { return m_line_length; }
+ float get_line_time() { return m_line_time; }
+ float get_line_length() { return m_line_length; }
- float get_prim_width() { return m_prim_width; }
- float get_prim_height() { return m_prim_height; }
+ float get_prim_width() { return m_prim_width; }
+ float get_prim_height() { return m_prim_height; }
private:
@@ -243,14 +242,14 @@ private:
UINT32 m_numverts; // total number of vertices
UINT32 m_flags; // rendering flags
- texture_info * m_texture; // pointer to texture info
+ texture_info * m_texture; // pointer to texture info
DWORD m_modmode; // texture modulation mode
float m_line_time; // used by vectors
float m_line_length; // used by vectors
- float m_prim_width; // used by quads
- float m_prim_height; // used by quads
+ float m_prim_width; // used by quads
+ float m_prim_height; // used by quads
};
}; // d3d
diff --git a/src/osd/windows/d3dhlsl.c b/src/osd/windows/d3dhlsl.c
index 87522ec2808..f81b8870c26 100644
--- a/src/osd/windows/d3dhlsl.c
+++ b/src/osd/windows/d3dhlsl.c
@@ -88,7 +88,6 @@ static file_error open_next(d3d::renderer *d3d, emu_file &file, const char *temp
namespace d3d
{
-
hlsl_options shaders::s_hlsl_presets[4] =
{
{ // 25% Shadow mask, 50% Scanlines, 3% Pincushion, 0 defocus, No Tint, 0.9 Exponent, 5% Floor, 25% Phosphor Return, 120% Saturation
@@ -2131,7 +2130,7 @@ void shaders::render_quad(poly_info *poly, int vertnum)
float weight4567[4] = { options->bloom_level4_weight, options->bloom_level5_weight,
options->bloom_level6_weight, options->bloom_level7_weight };
float weight89A[3] = { options->bloom_level8_weight, options->bloom_level9_weight,
- options->bloom_level10_weight };
+ options->bloom_level10_weight };
(*d3dintf->effect.set_vector)(curr_effect, "Level0123Weight", 4, weight0123);
(*d3dintf->effect.set_vector)(curr_effect, "Level4567Weight", 4, weight4567);
(*d3dintf->effect.set_vector)(curr_effect, "Level89AWeight", 3, weight89A);
@@ -2302,7 +2301,7 @@ void shaders::render_quad(poly_info *poly, int vertnum)
float weight4567[4] = { options->bloom_level4_weight, options->bloom_level5_weight,
options->bloom_level6_weight, options->bloom_level7_weight };
float weight89A[3] = { options->bloom_level8_weight, options->bloom_level9_weight,
- options->bloom_level10_weight };
+ options->bloom_level10_weight };
(*d3dintf->effect.set_vector)(curr_effect, "Level0123Weight", 4, weight0123);
(*d3dintf->effect.set_vector)(curr_effect, "Level4567Weight", 4, weight4567);
(*d3dintf->effect.set_vector)(curr_effect, "Level89AWeight", 3, weight89A);
@@ -3432,4 +3431,3 @@ static file_error open_next(d3d::renderer *d3d, emu_file &file, const char *temp
file.set_openflags(origflags);
return file.open(fname);
}
-
diff --git a/src/osd/windows/d3dhlsl.h b/src/osd/windows/d3dhlsl.h
index ad08466a6a0..035f5d3b359 100644
--- a/src/osd/windows/d3dhlsl.h
+++ b/src/osd/windows/d3dhlsl.h
@@ -49,7 +49,7 @@
//============================================================
#define HLSL_VECTOR (1)
-#define CRT_BLOOM (1)
+#define CRT_BLOOM (1)
//============================================================
// TYPE DEFINITIONS
@@ -57,7 +57,6 @@
namespace d3d
{
-
class render_target;
class cache_target;
class renderer;
@@ -172,7 +171,7 @@ public:
void init_fsfx_quad(void *vertbuf);
void set_texture(texture_info *texture);
- render_target * find_render_target(texture_info *info);
+ render_target * find_render_target(texture_info *info);
void remove_render_target(texture_info *texture);
void remove_render_target(int width, int height, UINT32 screen_index, UINT32 page_index);
void remove_render_target(render_target *rt);
@@ -196,11 +195,11 @@ private:
bool register_texture(texture_info *texture, int width, int height, int xscale, int yscale);
- render_target* find_render_target(int width, int height, UINT32 screen_index, UINT32 page_index);
- cache_target * find_cache_target(UINT32 screen_index, int width, int height);
+ render_target* find_render_target(int width, int height, UINT32 screen_index, UINT32 page_index);
+ cache_target * find_cache_target(UINT32 screen_index, int width, int height);
void remove_cache_target(cache_target *cache);
- base * d3dintf; // D3D interface
+ base * d3dintf; // D3D interface
win_window_info * window; // D3D window info
bool master_enable; // overall enable flag
@@ -218,7 +217,7 @@ private:
int prescale_size_y; // prescale size y
int preset; // preset, if relevant
bitmap_argb32 shadow_bitmap; // shadow mask bitmap for post-processing shader
- texture_info * shadow_texture; // shadow mask texture for post-processing shader
+ texture_info * shadow_texture; // shadow mask texture for post-processing shader
hlsl_options * options; // current uniform state
D3DPRIMITIVETYPE vecbuf_type;
UINT32 vecbuf_index;
@@ -229,20 +228,20 @@ private:
int avi_frame; // AVI frame
attotime avi_frame_period; // AVI frame period
attotime avi_next_frame_time; // AVI next frame time
- surface * avi_copy_surface; // AVI destination surface in system memory
- texture * avi_copy_texture; // AVI destination texture in system memory
- surface * avi_final_target; // AVI upscaled surface
- texture * avi_final_texture; // AVI upscaled texture
+ surface * avi_copy_surface; // AVI destination surface in system memory
+ texture * avi_copy_texture; // AVI destination texture in system memory
+ surface * avi_final_target; // AVI upscaled surface
+ texture * avi_final_texture; // AVI upscaled texture
- surface * black_surface; // black dummy surface
- texture * black_texture; // black dummy texture
+ surface * black_surface; // black dummy surface
+ texture * black_texture; // black dummy texture
bool render_snap; // whether or not to take HLSL post-render snapshot
bool snap_rendered; // whether we just rendered our HLSL post-render shot or not
- surface * snap_copy_target; // snapshot destination surface in system memory
- texture * snap_copy_texture; // snapshot destination surface in system memory
- surface * snap_target; // snapshot upscaled surface
- texture * snap_texture; // snapshot upscaled texture
+ surface * snap_copy_target; // snapshot destination surface in system memory
+ texture * snap_copy_texture; // snapshot destination surface in system memory
+ surface * snap_target; // snapshot upscaled surface
+ texture * snap_texture; // snapshot upscaled texture
int snap_width; // snapshot width
int snap_height; // snapshot height
bool lines_pending; // whether or not we have lines to flush on the next quad
@@ -250,32 +249,32 @@ private:
bool initialized; // whether or not we're initialize
// HLSL effects
- surface * backbuffer; // pointer to our device's backbuffer
- effect * curr_effect; // pointer to the currently active effect object
- effect * default_effect; // pointer to the primary-effect object
- effect * prescale_effect; // pointer to the prescale-effect object
- effect * post_effect; // pointer to the post-effect object
- effect * pincushion_effect; // pointer to the pincushion-effect object
- effect * focus_effect; // pointer to the focus-effect object
- effect * phosphor_effect; // pointer to the phosphor-effect object
- effect * deconverge_effect; // pointer to the deconvergence-effect object
- effect * color_effect; // pointer to the color-effect object
- effect * yiq_encode_effect; // pointer to the YIQ encoder effect object
- effect * yiq_decode_effect; // pointer to the YIQ decoder effect object
+ surface * backbuffer; // pointer to our device's backbuffer
+ effect * curr_effect; // pointer to the currently active effect object
+ effect * default_effect; // pointer to the primary-effect object
+ effect * prescale_effect; // pointer to the prescale-effect object
+ effect * post_effect; // pointer to the post-effect object
+ effect * pincushion_effect; // pointer to the pincushion-effect object
+ effect * focus_effect; // pointer to the focus-effect object
+ effect * phosphor_effect; // pointer to the phosphor-effect object
+ effect * deconverge_effect; // pointer to the deconvergence-effect object
+ effect * color_effect; // pointer to the color-effect object
+ effect * yiq_encode_effect; // pointer to the YIQ encoder effect object
+ effect * yiq_decode_effect; // pointer to the YIQ decoder effect object
#if (HLSL_VECTOR || CRT_BLOOM)
- effect * bloom_effect; // pointer to the bloom composite effect
- effect * downsample_effect; // pointer to the bloom downsample effect
+ effect * bloom_effect; // pointer to the bloom composite effect
+ effect * downsample_effect; // pointer to the bloom downsample effect
#endif
#if (HLSL_VECTOR)
- effect * vector_effect; // pointer to the vector-effect object
+ effect * vector_effect; // pointer to the vector-effect object
#endif
- vertex * fsfx_vertices; // pointer to our full-screen-quad object
+ vertex * fsfx_vertices; // pointer to our full-screen-quad object
public:
- render_target * targethead;
- cache_target * cachehead;
+ render_target * targethead;
+ cache_target * cachehead;
- static hlsl_options s_hlsl_presets[4];
+ static hlsl_options s_hlsl_presets[4];
};
};
diff --git a/src/osd/windows/d3dintf.h b/src/osd/windows/d3dintf.h
index a0a68f7fea7..8b72732d025 100644
--- a/src/osd/windows/d3dintf.h
+++ b/src/osd/windows/d3dintf.h
@@ -68,7 +68,6 @@
namespace d3d
{
-
//============================================================
// TYPE DEFINITIONS
//============================================================
diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c
index 8e58163f6a2..686df150f5e 100644
--- a/src/osd/windows/drawd3d.c
+++ b/src/osd/windows/drawd3d.c
@@ -362,7 +362,6 @@ static int drawd3d_window_draw(win_window_info *window, HDC dc, int update)
namespace d3d
{
-
void renderer::set_texture(texture_info *texture)
{
if (texture != m_last_texture)
@@ -651,59 +650,59 @@ texture_info *texture_manager::find_texinfo(const render_texinfo *texinfo, UINT3
/*int checkidx = 0;
for (texture = m_renderer->get_texture_manager()->get_texlist(); texture != NULL; texture = texture->get_next())
{
- printf("Checking texture index %d\n", checkidx);
- UINT32 test_screen = (UINT32)texture->get_texinfo().osddata >> 1;
- UINT32 test_page = (UINT32)texture->get_texinfo().osddata & 1;
- UINT32 prim_screen = (UINT32)texinfo->osddata >> 1;
- UINT32 prim_page = (UINT32)texinfo->osddata & 1;
- if (test_screen != prim_screen || test_page != prim_page)
- {
- printf("No screen/page match: %d vs. %d, %d vs. %d\n", test_screen, prim_screen, test_page, prim_page);
- continue;
- }
-
- if (texture->get_hash() == hash &&
- texture->get_texinfo().base == texinfo->base &&
- texture->get_texinfo().width == texinfo->width &&
- texture->get_texinfo().height == texinfo->height &&
- ((texture->get_flags() ^ flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0)
- {
- // Reject a texture if it belongs to an out-of-date render target, so as to cause the HLSL system to re-cache
- if (m_renderer->get_shaders()->enabled() && texinfo->width != 0 && texinfo->height != 0 && (flags & PRIMFLAG_SCREENTEX_MASK) != 0)
- {
- if (m_renderer->get_shaders()->find_render_target(texture) != NULL)
- {
- return texture;
- }
- }
- else
- {
- return texture;
- }
- }
-
- if (texture->get_hash() != hash)
- {
- printf("No hash match: %d vs. %d\n", texture->get_hash(), hash);
- }
- if (texture->get_texinfo().base != texinfo->base)
- {
- printf("No base match\n");
- }
- if (texture->get_texinfo().width != texinfo->width)
- {
- printf("No width match: %d vs. %d\n", texture->get_texinfo().width, texinfo->width);
- }
- if (texture->get_texinfo().height != texinfo->height)
- {
- printf("No height match: %d vs. %d\n", texture->get_texinfo().height, texinfo->height);
- }
- if (((texture->get_flags() ^ flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) != 0)
- {
- printf("No flag match: %08x & %08x = %08x\n", texture->get_flags(), flags, ((texture->get_flags() ^ flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)));
- }
- printf("\n");
- checkidx++;
+ printf("Checking texture index %d\n", checkidx);
+ UINT32 test_screen = (UINT32)texture->get_texinfo().osddata >> 1;
+ UINT32 test_page = (UINT32)texture->get_texinfo().osddata & 1;
+ UINT32 prim_screen = (UINT32)texinfo->osddata >> 1;
+ UINT32 prim_page = (UINT32)texinfo->osddata & 1;
+ if (test_screen != prim_screen || test_page != prim_page)
+ {
+ printf("No screen/page match: %d vs. %d, %d vs. %d\n", test_screen, prim_screen, test_page, prim_page);
+ continue;
+ }
+
+ if (texture->get_hash() == hash &&
+ texture->get_texinfo().base == texinfo->base &&
+ texture->get_texinfo().width == texinfo->width &&
+ texture->get_texinfo().height == texinfo->height &&
+ ((texture->get_flags() ^ flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0)
+ {
+ // Reject a texture if it belongs to an out-of-date render target, so as to cause the HLSL system to re-cache
+ if (m_renderer->get_shaders()->enabled() && texinfo->width != 0 && texinfo->height != 0 && (flags & PRIMFLAG_SCREENTEX_MASK) != 0)
+ {
+ if (m_renderer->get_shaders()->find_render_target(texture) != NULL)
+ {
+ return texture;
+ }
+ }
+ else
+ {
+ return texture;
+ }
+ }
+
+ if (texture->get_hash() != hash)
+ {
+ printf("No hash match: %d vs. %d\n", texture->get_hash(), hash);
+ }
+ if (texture->get_texinfo().base != texinfo->base)
+ {
+ printf("No base match\n");
+ }
+ if (texture->get_texinfo().width != texinfo->width)
+ {
+ printf("No width match: %d vs. %d\n", texture->get_texinfo().width, texinfo->width);
+ }
+ if (texture->get_texinfo().height != texinfo->height)
+ {
+ printf("No height match: %d vs. %d\n", texture->get_texinfo().height, texinfo->height);
+ }
+ if (((texture->get_flags() ^ flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) != 0)
+ {
+ printf("No flag match: %08x & %08x = %08x\n", texture->get_flags(), flags, ((texture->get_flags() ^ flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)));
+ }
+ printf("\n");
+ checkidx++;
}
printf("\n\n\n\n");*/
@@ -733,7 +732,7 @@ texture_info *texture_manager::find_texinfo(const render_texinfo *texinfo, UINT3
texture->get_texinfo().base == texinfo->base &&
((texture->get_flags() ^ flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0 &&
(texture->get_texinfo().width != texinfo->width ||
- texture->get_texinfo().height != texinfo->height))
+ texture->get_texinfo().height != texinfo->height))
{
m_renderer->get_shaders()->remove_render_target(texture);
}
@@ -1835,9 +1834,9 @@ void renderer::draw_quad(const render_primitive *prim)
}
void poly_info::init(D3DPRIMITIVETYPE type, UINT32 count, UINT32 numverts,
- UINT32 flags, texture_info *texture, UINT32 modmode,
- float line_time, float line_length,
- float prim_width, float prim_height)
+ UINT32 flags, texture_info *texture, UINT32 modmode,
+ float line_time, float line_length,
+ float prim_width, float prim_height)
{
init(type, count, numverts, flags, texture, modmode, prim_width, prim_height);
m_line_time = line_time;
@@ -1845,8 +1844,8 @@ void poly_info::init(D3DPRIMITIVETYPE type, UINT32 count, UINT32 numverts,
}
void poly_info::init(D3DPRIMITIVETYPE type, UINT32 count, UINT32 numverts,
- UINT32 flags, texture_info *texture, UINT32 modmode,
- float prim_width, float prim_height)
+ UINT32 flags, texture_info *texture, UINT32 modmode,
+ float prim_width, float prim_height)
{
m_type = type;
m_count = count;
@@ -1963,7 +1962,7 @@ void renderer::primitive_flush_pending()
{
// add the primitives
result = (*d3dintf->device.draw_primitive)(m_device, m_poly[polynum].get_type(), vertnum,
- m_poly[polynum].get_count());
+ m_poly[polynum].get_count());
if (result != D3D_OK) mame_printf_verbose("Direct3D: Error %08X during device draw_primitive call\n", (int)result);
}
@@ -3007,4 +3006,4 @@ bool render_target::init(renderer *d3d, base *d3dintf, int width, int height, in
return true;
}
-}; \ No newline at end of file
+};
diff --git a/src/osd/windows/drawd3d.h b/src/osd/windows/drawd3d.h
index 8cc464f090b..95d34ebb6a0 100644
--- a/src/osd/windows/drawd3d.h
+++ b/src/osd/windows/drawd3d.h
@@ -59,7 +59,6 @@
namespace d3d
{
-
class cache_target;
class render_target;
class renderer;
@@ -133,100 +132,100 @@ public:
renderer(win_window_info *window);
~renderer();
- int initialize();
+ int initialize();
- int device_create();
- int device_create_resources();
- void device_delete();
- void device_delete_resources();
+ int device_create();
+ int device_create_resources();
+ void device_delete();
+ void device_delete_resources();
- int device_verify_caps();
- int device_test_cooperative();
+ int device_verify_caps();
+ int device_test_cooperative();
- int config_adapter_mode();
- void pick_best_mode();
- int get_adapter_for_monitor();
+ int config_adapter_mode();
+ void pick_best_mode();
+ int get_adapter_for_monitor();
- int update_window_size();
+ int update_window_size();
- int pre_window_draw_check();
- void begin_frame();
- void end_frame();
+ int pre_window_draw_check();
+ void begin_frame();
+ void end_frame();
- void draw_line(const render_primitive *prim);
- void draw_quad(const render_primitive *prim);
- void batch_vector(const render_primitive *prim, float line_time);
- void batch_vectors();
+ void draw_line(const render_primitive *prim);
+ void draw_quad(const render_primitive *prim);
+ void batch_vector(const render_primitive *prim, float line_time);
+ void batch_vectors();
- vertex * mesh_alloc(int numverts);
+ vertex * mesh_alloc(int numverts);
- void update_textures();
+ void update_textures();
- void process_primitives();
- void primitive_flush_pending();
+ void process_primitives();
+ void primitive_flush_pending();
- void set_texture(texture_info *texture);
- void set_filter(int filter);
- void set_wrap(D3DTEXTUREADDRESS wrap);
- void set_modmode(DWORD modmode);
- void set_blendmode(int blendmode);
- void reset_render_states();
+ void set_texture(texture_info *texture);
+ void set_filter(int filter);
+ void set_wrap(D3DTEXTUREADDRESS wrap);
+ void set_modmode(DWORD modmode);
+ void set_blendmode(int blendmode);
+ void reset_render_states();
// Setters / getters
- int get_adapter() { return m_adapter; }
- int get_width() { return m_width; }
- int get_height() { return m_height; }
- int get_refresh() { return m_refresh; }
+ int get_adapter() { return m_adapter; }
+ int get_width() { return m_width; }
+ int get_height() { return m_height; }
+ int get_refresh() { return m_refresh; }
- win_window_info * get_window() { return m_window; }
+ win_window_info * get_window() { return m_window; }
- device * get_device() { return m_device; }
- present_parameters * get_presentation() { return &m_presentation; }
+ device * get_device() { return m_device; }
+ present_parameters * get_presentation() { return &m_presentation; }
- vertex_buffer * get_vertex_buffer() { return m_vertexbuf; }
- vertex * get_locked_buffer() { return m_lockedbuf; }
- VOID ** get_locked_buffer_ptr() { return (VOID **)&m_lockedbuf; }
- void set_locked_buffer(vertex *lockedbuf) { m_lockedbuf = lockedbuf; }
+ vertex_buffer * get_vertex_buffer() { return m_vertexbuf; }
+ vertex * get_locked_buffer() { return m_lockedbuf; }
+ VOID ** get_locked_buffer_ptr() { return (VOID **)&m_lockedbuf; }
+ void set_locked_buffer(vertex *lockedbuf) { m_lockedbuf = lockedbuf; }
- void set_restarting(bool restarting) { m_restarting = restarting; }
- bool is_mod2x_supported() { return (bool)m_mod2x_supported; }
- bool is_mod4x_supported() { return (bool)m_mod4x_supported; }
+ void set_restarting(bool restarting) { m_restarting = restarting; }
+ bool is_mod2x_supported() { return (bool)m_mod2x_supported; }
+ bool is_mod4x_supported() { return (bool)m_mod4x_supported; }
- D3DFORMAT get_screen_format() { return m_screen_format; }
+ D3DFORMAT get_screen_format() { return m_screen_format; }
D3DFORMAT get_pixel_format() { return m_pixformat; }
D3DDISPLAYMODE get_origmode() { return m_origmode; }
- UINT32 get_last_texture_flags() { return m_last_texture_flags; }
+ UINT32 get_last_texture_flags() { return m_last_texture_flags; }
- texture_manager * get_texture_manager() { return m_texture_manager; }
- texture_info * get_default_texture() { return m_texture_manager->get_default_texture(); }
- texture_info * get_vector_texture() { return m_texture_manager->get_vector_texture(); }
+ texture_manager * get_texture_manager() { return m_texture_manager; }
+ texture_info * get_default_texture() { return m_texture_manager->get_default_texture(); }
+ texture_info * get_vector_texture() { return m_texture_manager->get_vector_texture(); }
- shaders * get_shaders() { return m_shaders; }
+ shaders * get_shaders() { return m_shaders; }
private:
int m_adapter; // ordinal adapter number
- int m_width; // current width
- int m_height; // current height
+ int m_width; // current width
+ int m_height; // current height
int m_refresh; // current refresh rate
int m_create_error_count; // number of consecutive create errors
win_window_info * m_window; // current window info
- device * m_device; // pointer to the Direct3DDevice object
+ device * m_device; // pointer to the Direct3DDevice object
int m_gamma_supported; // is full screen gamma supported?
- present_parameters m_presentation; // set of presentation parameters
+ present_parameters m_presentation; // set of presentation parameters
D3DDISPLAYMODE m_origmode; // original display mode for the adapter
D3DFORMAT m_pixformat; // pixel format we are using
- vertex_buffer * m_vertexbuf; // pointer to the vertex buffer object
- vertex * m_lockedbuf; // pointer to the locked vertex buffer
+ vertex_buffer * m_vertexbuf; // pointer to the vertex buffer object
+ vertex * m_lockedbuf; // pointer to the locked vertex buffer
int m_numverts; // number of accumulated vertices
- vertex * m_vectorbatch; // pointer to the vector batch buffer
- int m_batchindex; // current index into the vector batch
+ vertex * m_vectorbatch; // pointer to the vector batch buffer
+ int m_batchindex; // current index into the vector batch
- poly_info m_poly[VERTEX_BUFFER_SIZE/3];// array to hold polygons as they are created
+ poly_info m_poly[VERTEX_BUFFER_SIZE/3];// array to hold polygons as they are created
int m_numpolys; // number of accumulated polygons
bool m_restarting; // if we're restarting
@@ -235,22 +234,22 @@ private:
int m_mod4x_supported; // is D3DTOP_MODULATE4X supported?
D3DFORMAT m_screen_format; // format to use for screen textures
- texture_info * m_last_texture; // previous texture
+ texture_info * m_last_texture; // previous texture
UINT32 m_last_texture_flags; // previous texture flags
int m_last_blendenable; // previous blendmode
int m_last_blendop; // previous blendmode
int m_last_blendsrc; // previous blendmode
int m_last_blenddst; // previous blendmode
int m_last_filter; // previous texture filter
- D3DTEXTUREADDRESS m_last_wrap; // previous wrap state
+ D3DTEXTUREADDRESS m_last_wrap; // previous wrap state
DWORD m_last_modmode; // previous texture modulation
void * m_hlsl_buf; // HLSL vertex data
- shaders * m_shaders; // HLSL interface
+ shaders * m_shaders; // HLSL interface
- texture_manager * m_texture_manager; // texture manager
+ texture_manager * m_texture_manager; // texture manager
- int m_line_count;
+ int m_line_count;
};
};
diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c
index 2c0615875c3..b57fd4782f6 100644
--- a/src/osd/windows/winmain.c
+++ b/src/osd/windows/winmain.c
@@ -398,19 +398,19 @@ const options_entry windows_options::s_option_entries[] =
{ WINOPTION_VECTOR_LENGTH_RATIO";vecsize", "4.0", OPTION_FLOAT, "Vector fade length (4.0 - vectors fade the most at and above 4 pixels, etc.)" },
/* Bloom below this line */
{ NULL, NULL, OPTION_HEADER, "BLOOM POST-PROCESSING OPTIONS" },
- { WINOPTION_VECTOR_BLOOM_SCALE, "0.3", OPTION_FLOAT, "Intensity factor for vector bloom" },
- { WINOPTION_RASTER_BLOOM_SCALE, "0.25", OPTION_FLOAT, "Intensity factor for raster bloom" },
- { WINOPTION_BLOOM_LEVEL0_WEIGHT, "1.0", OPTION_FLOAT, "Bloom level 0 (full-size target) weight" },
- { WINOPTION_BLOOM_LEVEL1_WEIGHT, "0.21", OPTION_FLOAT, "Bloom level 1 (half-size target) weight" },
- { WINOPTION_BLOOM_LEVEL2_WEIGHT, "0.19", OPTION_FLOAT, "Bloom level 2 (quarter-size target) weight" },
- { WINOPTION_BLOOM_LEVEL3_WEIGHT, "0.17", OPTION_FLOAT, "Bloom level 3 (.) weight" },
- { WINOPTION_BLOOM_LEVEL4_WEIGHT, "0.15", OPTION_FLOAT, "Bloom level 4 (.) weight" },
- { WINOPTION_BLOOM_LEVEL5_WEIGHT, "0.14", OPTION_FLOAT, "Bloom level 5 (.) weight" },
- { WINOPTION_BLOOM_LEVEL6_WEIGHT, "0.13", OPTION_FLOAT, "Bloom level 6 (.) weight" },
- { WINOPTION_BLOOM_LEVEL7_WEIGHT, "0.12", OPTION_FLOAT, "Bloom level 7 (.) weight" },
- { WINOPTION_BLOOM_LEVEL8_WEIGHT, "0.11", OPTION_FLOAT, "Bloom level 8 (.) weight" },
- { WINOPTION_BLOOM_LEVEL9_WEIGHT, "0.10", OPTION_FLOAT, "Bloom level 9 (.) weight" },
- { WINOPTION_BLOOM_LEVEL10_WEIGHT, "0.09", OPTION_FLOAT, "Bloom level 10 (1x1 target) weight" },
+ { WINOPTION_VECTOR_BLOOM_SCALE, "0.3", OPTION_FLOAT, "Intensity factor for vector bloom" },
+ { WINOPTION_RASTER_BLOOM_SCALE, "0.25", OPTION_FLOAT, "Intensity factor for raster bloom" },
+ { WINOPTION_BLOOM_LEVEL0_WEIGHT, "1.0", OPTION_FLOAT, "Bloom level 0 (full-size target) weight" },
+ { WINOPTION_BLOOM_LEVEL1_WEIGHT, "0.21", OPTION_FLOAT, "Bloom level 1 (half-size target) weight" },
+ { WINOPTION_BLOOM_LEVEL2_WEIGHT, "0.19", OPTION_FLOAT, "Bloom level 2 (quarter-size target) weight" },
+ { WINOPTION_BLOOM_LEVEL3_WEIGHT, "0.17", OPTION_FLOAT, "Bloom level 3 (.) weight" },
+ { WINOPTION_BLOOM_LEVEL4_WEIGHT, "0.15", OPTION_FLOAT, "Bloom level 4 (.) weight" },
+ { WINOPTION_BLOOM_LEVEL5_WEIGHT, "0.14", OPTION_FLOAT, "Bloom level 5 (.) weight" },
+ { WINOPTION_BLOOM_LEVEL6_WEIGHT, "0.13", OPTION_FLOAT, "Bloom level 6 (.) weight" },
+ { WINOPTION_BLOOM_LEVEL7_WEIGHT, "0.12", OPTION_FLOAT, "Bloom level 7 (.) weight" },
+ { WINOPTION_BLOOM_LEVEL8_WEIGHT, "0.11", OPTION_FLOAT, "Bloom level 8 (.) weight" },
+ { WINOPTION_BLOOM_LEVEL9_WEIGHT, "0.10", OPTION_FLOAT, "Bloom level 9 (.) weight" },
+ { WINOPTION_BLOOM_LEVEL10_WEIGHT, "0.09", OPTION_FLOAT, "Bloom level 10 (1x1 target) weight" },
// per-window options
{ NULL, NULL, OPTION_HEADER, "PER-WINDOW VIDEO OPTIONS" },
diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h
index 66ff631ed06..3726de0d450 100644
--- a/src/osd/windows/winmain.h
+++ b/src/osd/windows/winmain.h
@@ -133,8 +133,8 @@
#define WINOPTION_VECTOR_TIME_PERIOD "vector_time_period"
#define WINOPTION_VECTOR_LENGTH_SCALE "vector_length_scale"
#define WINOPTION_VECTOR_LENGTH_RATIO "vector_length_ratio"
-#define WINOPTION_VECTOR_BLOOM_SCALE "vector_bloom_scale"
-#define WINOPTION_RASTER_BLOOM_SCALE "raster_bloom_scale"
+#define WINOPTION_VECTOR_BLOOM_SCALE "vector_bloom_scale"
+#define WINOPTION_RASTER_BLOOM_SCALE "raster_bloom_scale"
#define WINOPTION_BLOOM_LEVEL0_WEIGHT "bloom_lvl0_weight"
#define WINOPTION_BLOOM_LEVEL1_WEIGHT "bloom_lvl1_weight"
#define WINOPTION_BLOOM_LEVEL2_WEIGHT "bloom_lvl2_weight"