mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
Cleaned up sliders a bit in d3dhlsl, nw
This commit is contained in:
parent
cdee786a5d
commit
64135e73f9
5 changed files with 460 additions and 923 deletions
|
@ -110,6 +110,7 @@ function osdmodulesbuild()
|
||||||
MAME_DIR .. "src/osd/modules/render/bgfx/effectmanager.cpp",
|
MAME_DIR .. "src/osd/modules/render/bgfx/effectmanager.cpp",
|
||||||
MAME_DIR .. "src/osd/modules/render/bgfx/effectreader.cpp",
|
MAME_DIR .. "src/osd/modules/render/bgfx/effectreader.cpp",
|
||||||
MAME_DIR .. "src/osd/modules/render/bgfx/chain.cpp",
|
MAME_DIR .. "src/osd/modules/render/bgfx/chain.cpp",
|
||||||
|
MAME_DIR .. "src/osd/modules/render/bgfx/chainmanager.cpp",
|
||||||
MAME_DIR .. "src/osd/modules/render/bgfx/chainreader.cpp",
|
MAME_DIR .. "src/osd/modules/render/bgfx/chainreader.cpp",
|
||||||
MAME_DIR .. "src/osd/modules/render/bgfx/chainentry.cpp",
|
MAME_DIR .. "src/osd/modules/render/bgfx/chainentry.cpp",
|
||||||
MAME_DIR .. "src/osd/modules/render/bgfx/chainentryreader.cpp",
|
MAME_DIR .. "src/osd/modules/render/bgfx/chainentryreader.cpp",
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -9,6 +9,7 @@
|
||||||
#ifndef __WIN_D3DHLSL__
|
#ifndef __WIN_D3DHLSL__
|
||||||
#define __WIN_D3DHLSL__
|
#define __WIN_D3DHLSL__
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include "aviio.h"
|
#include "aviio.h"
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
|
@ -226,7 +227,7 @@ struct hlsl_options
|
||||||
float saturation;
|
float saturation;
|
||||||
|
|
||||||
// NTSC
|
// NTSC
|
||||||
bool yiq_enable;
|
int yiq_enable;
|
||||||
float yiq_jitter;
|
float yiq_jitter;
|
||||||
float yiq_cc;
|
float yiq_cc;
|
||||||
float yiq_a;
|
float yiq_a;
|
||||||
|
@ -261,6 +262,34 @@ struct hlsl_options
|
||||||
float bloom_level10_weight;
|
float bloom_level10_weight;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct slider_desc
|
||||||
|
{
|
||||||
|
const char * name;
|
||||||
|
int minval;
|
||||||
|
int defval;
|
||||||
|
int maxval;
|
||||||
|
int step;
|
||||||
|
int slider_type;
|
||||||
|
int screen_type;
|
||||||
|
int id;
|
||||||
|
float scale;
|
||||||
|
const char * format;
|
||||||
|
std::vector<const char *> strings;
|
||||||
|
};
|
||||||
|
|
||||||
|
class slider
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
slider(slider_desc *desc, void *value, bool *dirty) : m_desc(desc), m_value(value), m_dirty(dirty) { }
|
||||||
|
|
||||||
|
INT32 update(std::string *str, INT32 newval);
|
||||||
|
|
||||||
|
private:
|
||||||
|
slider_desc * m_desc;
|
||||||
|
void * m_value;
|
||||||
|
bool * m_dirty;
|
||||||
|
};
|
||||||
|
|
||||||
class shaders
|
class shaders
|
||||||
{
|
{
|
||||||
friend class effect;
|
friend class effect;
|
||||||
|
@ -296,7 +325,7 @@ public:
|
||||||
|
|
||||||
void window_save();
|
void window_save();
|
||||||
void window_record();
|
void window_record();
|
||||||
bool recording() { return avi_output_file != NULL; }
|
bool recording() { return avi_output_file != nullptr; }
|
||||||
|
|
||||||
void avi_update_snap(surface *surface);
|
void avi_update_snap(surface *surface);
|
||||||
void render_snapshot(surface *surface);
|
void render_snapshot(surface *surface);
|
||||||
|
@ -314,28 +343,7 @@ public:
|
||||||
|
|
||||||
// slider-related functions
|
// slider-related functions
|
||||||
slider_state *init_slider_list();
|
slider_state *init_slider_list();
|
||||||
|
void *get_slider_option(int id, int index = 0);
|
||||||
enum slider_screen_type
|
|
||||||
{
|
|
||||||
SLIDER_SCREEN_TYPE_NONE = 0,
|
|
||||||
SLIDER_SCREEN_TYPE_RASTER = 1,
|
|
||||||
SLIDER_SCREEN_TYPE_VECTOR = 2,
|
|
||||||
SLIDER_SCREEN_TYPE_LCD = 4,
|
|
||||||
SLIDER_SCREEN_TYPE_LCD_OR_RASTER = SLIDER_SCREEN_TYPE_RASTER | SLIDER_SCREEN_TYPE_LCD,
|
|
||||||
SLIDER_SCREEN_TYPE_ANY = SLIDER_SCREEN_TYPE_RASTER | SLIDER_SCREEN_TYPE_VECTOR | SLIDER_SCREEN_TYPE_LCD
|
|
||||||
};
|
|
||||||
|
|
||||||
struct slider_desc
|
|
||||||
{
|
|
||||||
const char * name;
|
|
||||||
int minval;
|
|
||||||
int defval;
|
|
||||||
int maxval;
|
|
||||||
int step;
|
|
||||||
int screen_type;
|
|
||||||
INT32(*adjustor)(running_machine &, void *, std::string *, INT32);
|
|
||||||
int id;
|
|
||||||
};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void blit(surface *dst, bool clear_dst, D3DPRIMITIVETYPE prim_type, UINT32 prim_index, UINT32 prim_count);
|
void blit(surface *dst, bool clear_dst, D3DPRIMITIVETYPE prim_type, UINT32 prim_index, UINT32 prim_count);
|
||||||
|
@ -442,6 +450,8 @@ private:
|
||||||
d3d_render_target * targethead;
|
d3d_render_target * targethead;
|
||||||
cache_target * cachehead;
|
cache_target * cachehead;
|
||||||
|
|
||||||
|
std::vector<slider*> sliders;
|
||||||
|
|
||||||
static slider_desc s_sliders[];
|
static slider_desc s_sliders[];
|
||||||
static hlsl_options last_options; // last used options
|
static hlsl_options last_options; // last used options
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
// CONSTANTS
|
// CONSTANTS
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
||||||
|
const uint16_t renderer_bgfx::CACHE_SIZE = 1024;
|
||||||
|
const uint32_t renderer_bgfx::PACKABLE_SIZE = 128;
|
||||||
|
const uint32_t renderer_bgfx::WHITE_HASH = 0x87654321;
|
||||||
|
|
||||||
//============================================================
|
//============================================================
|
||||||
// MACROS
|
// MACROS
|
||||||
//============================================================
|
//============================================================
|
||||||
|
|
|
@ -122,9 +122,9 @@ private:
|
||||||
uint32_t m_width[16];
|
uint32_t m_width[16];
|
||||||
uint32_t m_height[16];
|
uint32_t m_height[16];
|
||||||
uint32_t m_white[16*16];
|
uint32_t m_white[16*16];
|
||||||
enum : uint16_t { CACHE_SIZE = 1024 };
|
static const uint16_t CACHE_SIZE;
|
||||||
enum : uint32_t { PACKABLE_SIZE = 128 };
|
static const uint32_t PACKABLE_SIZE;
|
||||||
enum : UINT32 { WHITE_HASH = 0x87654321 };
|
static const uint32_t WHITE_HASH;
|
||||||
|
|
||||||
static bool s_window_set;
|
static bool s_window_set;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue