diff --git a/Source/Project64-video/Gfx_1.3.h b/Source/Project64-video/Gfx_1.3.h index 8d6908421..28a7efb97 100644 --- a/Source/Project64-video/Gfx_1.3.h +++ b/Source/Project64-video/Gfx_1.3.h @@ -161,13 +161,6 @@ extern "C" { extern GFX_INFO gfx; extern bool no_dlist; - enum - { - GFX_STIPPLE_DISABLE = 0x0, - GFX_STIPPLE_PATTERN = 0x1, - GFX_STIPPLE_ROTATE = 0x2, - }; - /****************************************************************** Function: CaptureScreen Purpose: This function dumps the current frame to a file diff --git a/Source/Project64-video/Renderer/OGLEScombiner.cpp b/Source/Project64-video/Renderer/OGLEScombiner.cpp index 000479d86..e92df5cd2 100644 --- a/Source/Project64-video/Renderer/OGLEScombiner.cpp +++ b/Source/Project64-video/Renderer/OGLEScombiner.cpp @@ -1708,16 +1708,16 @@ void gfxStippleMode(gfxStippleMode_t mode) WriteTrace(TraceGlitch, TraceDebug, "mode: %d", mode); switch (mode) { - case GR_STIPPLE_DISABLE: + case GFX_STIPPLE_DISABLE: dither_enabled = 0; glActiveTexture(GL_TEXTURE2); break; - case GR_STIPPLE_PATTERN: + case GFX_STIPPLE_PATTERN: setPattern(); dither_enabled = 1; glActiveTexture(GL_TEXTURE2); break; - case GR_STIPPLE_ROTATE: + case GFX_STIPPLE_ROTATE: setPattern(); dither_enabled = 1; glActiveTexture(GL_TEXTURE2); diff --git a/Source/Project64-video/Renderer/OGLcombiner.cpp b/Source/Project64-video/Renderer/OGLcombiner.cpp index 86ba9b898..74c96e068 100644 --- a/Source/Project64-video/Renderer/OGLcombiner.cpp +++ b/Source/Project64-video/Renderer/OGLcombiner.cpp @@ -1666,18 +1666,18 @@ void gfxStippleMode(gfxStippleMode_t mode) WriteTrace(TraceGlitch, TraceDebug, "mode: %d", mode); switch (mode) { - case GR_STIPPLE_DISABLE: + case GFX_STIPPLE_DISABLE: dither_enabled = 0; glActiveTextureARB(GL_TEXTURE2_ARB); glDisable(GL_TEXTURE_2D); break; - case GR_STIPPLE_PATTERN: + case GFX_STIPPLE_PATTERN: setPattern(); dither_enabled = 1; glActiveTextureARB(GL_TEXTURE2_ARB); glEnable(GL_TEXTURE_2D); break; - case GR_STIPPLE_ROTATE: + case GFX_STIPPLE_ROTATE: setPattern(); dither_enabled = 1; glActiveTextureARB(GL_TEXTURE2_ARB); diff --git a/Source/Project64-video/Renderer/types.h b/Source/Project64-video/Renderer/types.h index e612dd92d..8ede28df4 100644 --- a/Source/Project64-video/Renderer/types.h +++ b/Source/Project64-video/Renderer/types.h @@ -17,12 +17,18 @@ typedef uint8_t gfxAlpha_t; typedef uint32_t gfxColor_t; -typedef int32_t gfxStippleMode_t; typedef uint32_t gfxCCUColor_t; typedef uint32_t gfxACUColor_t; typedef uint32_t gfxTCCUColor_t; typedef uint32_t gfxTACUColor_t; +enum gfxStippleMode_t +{ + GFX_STIPPLE_DISABLE = 0x0, + GFX_STIPPLE_PATTERN = 0x1, + GFX_STIPPLE_ROTATE = 0x2, +}; + enum gfxMipMapLevelMask_t { GFX_MIPMAPLEVELMASK_EVEN = 1L << 0, diff --git a/Source/Project64-video/Settings.cpp b/Source/Project64-video/Settings.cpp index 23a5519e1..9be2b80ef 100644 --- a/Source/Project64-video/Settings.cpp +++ b/Source/Project64-video/Settings.cpp @@ -70,7 +70,7 @@ CSettings::CSettings() : 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_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_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 @@ -206,7 +206,7 @@ void CSettings::RegisterSettings(void) game_setting(Set_decrease_fillrect_edge, "decrease_fillrect_edge", false); game_setting(Set_texture_correction, "texture_correction", true); 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_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_texture_correction = GetSetting(Set_texture_correction) != 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); m_stipple_pattern = stipple_pattern > 0 ? (uint32_t)stipple_pattern : 0x3E0F83E0; m_force_microcheck = GetSetting(Set_force_microcheck) != 0; diff --git a/Source/Project64-video/Settings.h b/Source/Project64-video/Settings.h index 7daa78eb7..568b2177f 100644 --- a/Source/Project64-video/Settings.h +++ b/Source/Project64-video/Settings.h @@ -9,6 +9,7 @@ * * ****************************************************************************/ #pragma once +#include #include class CSettings @@ -143,13 +144,6 @@ public: LOD_Precise = 2, }; - enum StippleMode_t - { - STIPPLE_Disable = 0x0, - STIPPLE_Pattern = 0x1, - STIPPLE_Rotate = 0x2, - }; - enum ucode_t { 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 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 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 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 @@ -393,7 +387,7 @@ private: bool m_increase_texrect_edge; bool m_decrease_fillrect_edge; bool m_texture_correction; - StippleMode_t m_stipple_mode; + gfxStippleMode_t m_stipple_mode; uint32_t m_stipple_pattern; bool m_force_microcheck; bool m_force_quad3d; diff --git a/Source/Project64-video/Util.cpp b/Source/Project64-video/Util.cpp index 30ac682b3..99b80e14f 100644 --- a/Source/Project64-video/Util.cpp +++ b/Source/Project64-video/Util.cpp @@ -1843,13 +1843,13 @@ void update() } else { - gfxStippleMode(GR_STIPPLE_DISABLE); + gfxStippleMode(GFX_STIPPLE_DISABLE); } } else { //WriteTrace(TraceRDP, TraceDebug, " |- alpha compare: dither disabled"); - gfxStippleMode(GR_STIPPLE_DISABLE); + gfxStippleMode(GFX_STIPPLE_DISABLE); } } // Cull mode (leave this in for z-clipped triangles) @@ -1967,7 +1967,7 @@ void set_message_combiner() GFX_BLEND_ZERO, GFX_BLEND_ZERO); gfxAlphaTestFunction(GFX_CMP_ALWAYS); - gfxStippleMode(GR_STIPPLE_DISABLE); + gfxStippleMode(GFX_STIPPLE_DISABLE); gfxTexFilterMode(GFX_TMU0, GFX_TEXTUREFILTER_BILINEAR, GFX_TEXTUREFILTER_BILINEAR); gfxTexCombine(GFX_TMU1, GFX_COMBINE_FUNCTION_NONE, diff --git a/Source/Project64-video/rdp.cpp b/Source/Project64-video/rdp.cpp index cd1790350..09a6cbb41 100644 --- a/Source/Project64-video/rdp.cpp +++ b/Source/Project64-video/rdp.cpp @@ -2517,7 +2517,7 @@ void rdp_fillrect() gfxAlphaBlendFunction(GFX_BLEND_ONE, GFX_BLEND_ZERO, GFX_BLEND_ONE, GFX_BLEND_ZERO); gfxAlphaTestFunction(GFX_CMP_ALWAYS); - gfxStippleMode(GR_STIPPLE_DISABLE); + gfxStippleMode(GFX_STIPPLE_DISABLE); gfxCullMode(GFX_CULL_DISABLE); gfxFogMode(GFX_FOG_DISABLE);