[Video] Make gfxStippleMode_t an enum
This commit is contained in:
parent
6350243590
commit
05a4cce447
|
@ -161,13 +161,6 @@ extern "C" {
|
||||||
extern GFX_INFO gfx;
|
extern GFX_INFO gfx;
|
||||||
extern bool no_dlist;
|
extern bool no_dlist;
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
GFX_STIPPLE_DISABLE = 0x0,
|
|
||||||
GFX_STIPPLE_PATTERN = 0x1,
|
|
||||||
GFX_STIPPLE_ROTATE = 0x2,
|
|
||||||
};
|
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
Function: CaptureScreen
|
Function: CaptureScreen
|
||||||
Purpose: This function dumps the current frame to a file
|
Purpose: This function dumps the current frame to a file
|
||||||
|
|
|
@ -1708,16 +1708,16 @@ void gfxStippleMode(gfxStippleMode_t mode)
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "mode: %d", mode);
|
WriteTrace(TraceGlitch, TraceDebug, "mode: %d", mode);
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case GR_STIPPLE_DISABLE:
|
case GFX_STIPPLE_DISABLE:
|
||||||
dither_enabled = 0;
|
dither_enabled = 0;
|
||||||
glActiveTexture(GL_TEXTURE2);
|
glActiveTexture(GL_TEXTURE2);
|
||||||
break;
|
break;
|
||||||
case GR_STIPPLE_PATTERN:
|
case GFX_STIPPLE_PATTERN:
|
||||||
setPattern();
|
setPattern();
|
||||||
dither_enabled = 1;
|
dither_enabled = 1;
|
||||||
glActiveTexture(GL_TEXTURE2);
|
glActiveTexture(GL_TEXTURE2);
|
||||||
break;
|
break;
|
||||||
case GR_STIPPLE_ROTATE:
|
case GFX_STIPPLE_ROTATE:
|
||||||
setPattern();
|
setPattern();
|
||||||
dither_enabled = 1;
|
dither_enabled = 1;
|
||||||
glActiveTexture(GL_TEXTURE2);
|
glActiveTexture(GL_TEXTURE2);
|
||||||
|
|
|
@ -1666,18 +1666,18 @@ void gfxStippleMode(gfxStippleMode_t mode)
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "mode: %d", mode);
|
WriteTrace(TraceGlitch, TraceDebug, "mode: %d", mode);
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case GR_STIPPLE_DISABLE:
|
case GFX_STIPPLE_DISABLE:
|
||||||
dither_enabled = 0;
|
dither_enabled = 0;
|
||||||
glActiveTextureARB(GL_TEXTURE2_ARB);
|
glActiveTextureARB(GL_TEXTURE2_ARB);
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
break;
|
break;
|
||||||
case GR_STIPPLE_PATTERN:
|
case GFX_STIPPLE_PATTERN:
|
||||||
setPattern();
|
setPattern();
|
||||||
dither_enabled = 1;
|
dither_enabled = 1;
|
||||||
glActiveTextureARB(GL_TEXTURE2_ARB);
|
glActiveTextureARB(GL_TEXTURE2_ARB);
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
break;
|
break;
|
||||||
case GR_STIPPLE_ROTATE:
|
case GFX_STIPPLE_ROTATE:
|
||||||
setPattern();
|
setPattern();
|
||||||
dither_enabled = 1;
|
dither_enabled = 1;
|
||||||
glActiveTextureARB(GL_TEXTURE2_ARB);
|
glActiveTextureARB(GL_TEXTURE2_ARB);
|
||||||
|
|
|
@ -17,12 +17,18 @@
|
||||||
|
|
||||||
typedef uint8_t gfxAlpha_t;
|
typedef uint8_t gfxAlpha_t;
|
||||||
typedef uint32_t gfxColor_t;
|
typedef uint32_t gfxColor_t;
|
||||||
typedef int32_t gfxStippleMode_t;
|
|
||||||
typedef uint32_t gfxCCUColor_t;
|
typedef uint32_t gfxCCUColor_t;
|
||||||
typedef uint32_t gfxACUColor_t;
|
typedef uint32_t gfxACUColor_t;
|
||||||
typedef uint32_t gfxTCCUColor_t;
|
typedef uint32_t gfxTCCUColor_t;
|
||||||
typedef uint32_t gfxTACUColor_t;
|
typedef uint32_t gfxTACUColor_t;
|
||||||
|
|
||||||
|
enum gfxStippleMode_t
|
||||||
|
{
|
||||||
|
GFX_STIPPLE_DISABLE = 0x0,
|
||||||
|
GFX_STIPPLE_PATTERN = 0x1,
|
||||||
|
GFX_STIPPLE_ROTATE = 0x2,
|
||||||
|
};
|
||||||
|
|
||||||
enum gfxMipMapLevelMask_t
|
enum gfxMipMapLevelMask_t
|
||||||
{
|
{
|
||||||
GFX_MIPMAPLEVELMASK_EVEN = 1L << 0,
|
GFX_MIPMAPLEVELMASK_EVEN = 1L << 0,
|
||||||
|
|
|
@ -70,7 +70,7 @@ CSettings::CSettings() :
|
||||||
m_increase_texrect_edge(false), // add 1 to lower right corner coordinates of texrect
|
m_increase_texrect_edge(false), // add 1 to lower right corner coordinates of texrect
|
||||||
m_decrease_fillrect_edge(false), // sub 1 from lower right corner coordinates of fillrect
|
m_decrease_fillrect_edge(false), // sub 1 from lower right corner coordinates of fillrect
|
||||||
m_texture_correction(false), // enable perspective texture correction emulation. is on by default
|
m_texture_correction(false), // enable perspective texture correction emulation. is on by default
|
||||||
m_stipple_mode(STIPPLE_Disable), //used for dithered alpha emulation
|
m_stipple_mode(GFX_STIPPLE_DISABLE), //used for dithered alpha emulation
|
||||||
m_stipple_pattern(0), //used for dithered alpha emulation
|
m_stipple_pattern(0), //used for dithered alpha emulation
|
||||||
m_force_microcheck(false), //check microcode each frame, for mixed F3DEX-S2DEX games
|
m_force_microcheck(false), //check microcode each frame, for mixed F3DEX-S2DEX games
|
||||||
m_force_quad3d(false), //force 0xb5 command to be quad, not line 3d
|
m_force_quad3d(false), //force 0xb5 command to be quad, not line 3d
|
||||||
|
@ -206,7 +206,7 @@ void CSettings::RegisterSettings(void)
|
||||||
game_setting(Set_decrease_fillrect_edge, "decrease_fillrect_edge", false);
|
game_setting(Set_decrease_fillrect_edge, "decrease_fillrect_edge", false);
|
||||||
game_setting(Set_texture_correction, "texture_correction", true);
|
game_setting(Set_texture_correction, "texture_correction", true);
|
||||||
game_setting(Set_pal230, "pal230", false);
|
game_setting(Set_pal230, "pal230", false);
|
||||||
game_setting(Set_stipple_mode, "stipple_mode", STIPPLE_Rotate);
|
game_setting(Set_stipple_mode, "stipple_mode", GFX_STIPPLE_ROTATE);
|
||||||
|
|
||||||
game_setting(Set_stipple_pattern, "stipple_pattern", 0x3E0F83E0);
|
game_setting(Set_stipple_pattern, "stipple_pattern", 0x3E0F83E0);
|
||||||
game_setting(Set_force_microcheck, "force_microcheck", false);
|
game_setting(Set_force_microcheck, "force_microcheck", false);
|
||||||
|
@ -751,7 +751,7 @@ void CSettings::ReadGameSettings(const char * name)
|
||||||
m_decrease_fillrect_edge = GetSetting(Set_decrease_fillrect_edge) != 0;
|
m_decrease_fillrect_edge = GetSetting(Set_decrease_fillrect_edge) != 0;
|
||||||
m_texture_correction = GetSetting(Set_texture_correction) != 0;
|
m_texture_correction = GetSetting(Set_texture_correction) != 0;
|
||||||
m_pal230 = GetSetting(Set_pal230) != 0;
|
m_pal230 = GetSetting(Set_pal230) != 0;
|
||||||
m_stipple_mode = (StippleMode_t)GetSetting(Set_stipple_mode);
|
m_stipple_mode = (gfxStippleMode_t)GetSetting(Set_stipple_mode);
|
||||||
int stipple_pattern = GetSetting(Set_stipple_pattern);
|
int stipple_pattern = GetSetting(Set_stipple_pattern);
|
||||||
m_stipple_pattern = stipple_pattern > 0 ? (uint32_t)stipple_pattern : 0x3E0F83E0;
|
m_stipple_pattern = stipple_pattern > 0 ? (uint32_t)stipple_pattern : 0x3E0F83E0;
|
||||||
m_force_microcheck = GetSetting(Set_force_microcheck) != 0;
|
m_force_microcheck = GetSetting(Set_force_microcheck) != 0;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
* *
|
* *
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include <Project64-video/Renderer/types.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class CSettings
|
class CSettings
|
||||||
|
@ -143,13 +144,6 @@ public:
|
||||||
LOD_Precise = 2,
|
LOD_Precise = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum StippleMode_t
|
|
||||||
{
|
|
||||||
STIPPLE_Disable = 0x0,
|
|
||||||
STIPPLE_Pattern = 0x1,
|
|
||||||
STIPPLE_Rotate = 0x2,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum ucode_t
|
enum ucode_t
|
||||||
{
|
{
|
||||||
uCode_NotFound = -2,
|
uCode_NotFound = -2,
|
||||||
|
@ -250,7 +244,7 @@ public:
|
||||||
inline bool increase_texrect_edge(void) const { return m_increase_texrect_edge; } // add 1 to lower right corner coordinates of texrect
|
inline bool increase_texrect_edge(void) const { return m_increase_texrect_edge; } // add 1 to lower right corner coordinates of texrect
|
||||||
inline bool decrease_fillrect_edge(void) const { return m_decrease_fillrect_edge; }; // sub 1 from lower right corner coordinates of fillrect
|
inline bool decrease_fillrect_edge(void) const { return m_decrease_fillrect_edge; }; // sub 1 from lower right corner coordinates of fillrect
|
||||||
inline bool texture_correction(void) const { return m_texture_correction; } // enable perspective texture correction emulation. is on by default
|
inline bool texture_correction(void) const { return m_texture_correction; } // enable perspective texture correction emulation. is on by default
|
||||||
inline StippleMode_t stipple_mode(void) const { return m_stipple_mode; } //used for dithered alpha emulation
|
inline gfxStippleMode_t stipple_mode(void) const { return m_stipple_mode; } //used for dithered alpha emulation
|
||||||
inline uint32_t stipple_pattern(void) const { return m_stipple_pattern; } //used for dithered alpha emulation
|
inline uint32_t stipple_pattern(void) const { return m_stipple_pattern; } //used for dithered alpha emulation
|
||||||
inline bool force_microcheck(void) const { return m_force_microcheck; } //check microcode each frame, for mixed F3DEX-S2DEX games
|
inline bool force_microcheck(void) const { return m_force_microcheck; } //check microcode each frame, for mixed F3DEX-S2DEX games
|
||||||
inline bool force_quad3d(void) const { return m_force_quad3d; } //force 0xb5 command to be quad, not line 3d
|
inline bool force_quad3d(void) const { return m_force_quad3d; } //force 0xb5 command to be quad, not line 3d
|
||||||
|
@ -393,7 +387,7 @@ private:
|
||||||
bool m_increase_texrect_edge;
|
bool m_increase_texrect_edge;
|
||||||
bool m_decrease_fillrect_edge;
|
bool m_decrease_fillrect_edge;
|
||||||
bool m_texture_correction;
|
bool m_texture_correction;
|
||||||
StippleMode_t m_stipple_mode;
|
gfxStippleMode_t m_stipple_mode;
|
||||||
uint32_t m_stipple_pattern;
|
uint32_t m_stipple_pattern;
|
||||||
bool m_force_microcheck;
|
bool m_force_microcheck;
|
||||||
bool m_force_quad3d;
|
bool m_force_quad3d;
|
||||||
|
|
|
@ -1843,13 +1843,13 @@ void update()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gfxStippleMode(GR_STIPPLE_DISABLE);
|
gfxStippleMode(GFX_STIPPLE_DISABLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//WriteTrace(TraceRDP, TraceDebug, " |- alpha compare: dither disabled");
|
//WriteTrace(TraceRDP, TraceDebug, " |- alpha compare: dither disabled");
|
||||||
gfxStippleMode(GR_STIPPLE_DISABLE);
|
gfxStippleMode(GFX_STIPPLE_DISABLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Cull mode (leave this in for z-clipped triangles)
|
// Cull mode (leave this in for z-clipped triangles)
|
||||||
|
@ -1967,7 +1967,7 @@ void set_message_combiner()
|
||||||
GFX_BLEND_ZERO,
|
GFX_BLEND_ZERO,
|
||||||
GFX_BLEND_ZERO);
|
GFX_BLEND_ZERO);
|
||||||
gfxAlphaTestFunction(GFX_CMP_ALWAYS);
|
gfxAlphaTestFunction(GFX_CMP_ALWAYS);
|
||||||
gfxStippleMode(GR_STIPPLE_DISABLE);
|
gfxStippleMode(GFX_STIPPLE_DISABLE);
|
||||||
gfxTexFilterMode(GFX_TMU0, GFX_TEXTUREFILTER_BILINEAR, GFX_TEXTUREFILTER_BILINEAR);
|
gfxTexFilterMode(GFX_TMU0, GFX_TEXTUREFILTER_BILINEAR, GFX_TEXTUREFILTER_BILINEAR);
|
||||||
gfxTexCombine(GFX_TMU1,
|
gfxTexCombine(GFX_TMU1,
|
||||||
GFX_COMBINE_FUNCTION_NONE,
|
GFX_COMBINE_FUNCTION_NONE,
|
||||||
|
|
|
@ -2517,7 +2517,7 @@ void rdp_fillrect()
|
||||||
gfxAlphaBlendFunction(GFX_BLEND_ONE, GFX_BLEND_ZERO, GFX_BLEND_ONE, GFX_BLEND_ZERO);
|
gfxAlphaBlendFunction(GFX_BLEND_ONE, GFX_BLEND_ZERO, GFX_BLEND_ONE, GFX_BLEND_ZERO);
|
||||||
|
|
||||||
gfxAlphaTestFunction(GFX_CMP_ALWAYS);
|
gfxAlphaTestFunction(GFX_CMP_ALWAYS);
|
||||||
gfxStippleMode(GR_STIPPLE_DISABLE);
|
gfxStippleMode(GFX_STIPPLE_DISABLE);
|
||||||
|
|
||||||
gfxCullMode(GFX_CULL_DISABLE);
|
gfxCullMode(GFX_CULL_DISABLE);
|
||||||
gfxFogMode(GFX_FOG_DISABLE);
|
gfxFogMode(GFX_FOG_DISABLE);
|
||||||
|
|
Loading…
Reference in New Issue