[Video] FXTRUE/FXFALSE to true/false
This commit is contained in:
parent
db7518102d
commit
fe52233411
|
@ -10946,7 +10946,7 @@ static void ac_one_sub_t1_add_t0_mul_env()
|
|||
GFX_COMBINE_OTHER_TEXTURE);
|
||||
CA_ENV();
|
||||
A_T0_ADD_T1();
|
||||
cmb.tmu1_a_invert = FXTRUE;
|
||||
cmb.tmu1_a_invert = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15503,7 +15503,7 @@ void Combine()
|
|||
cmb.tex = 0;
|
||||
cmb.tmu0_func = cmb.tmu1_func = cmb.tmu0_a_func = cmb.tmu1_a_func = GFX_COMBINE_FUNCTION_ZERO;
|
||||
cmb.tmu0_fac = cmb.tmu1_fac = cmb.tmu0_a_fac = cmb.tmu1_a_fac = GFX_COMBINE_FACTOR_NONE;
|
||||
cmb.tmu0_invert = cmb.tmu0_a_invert = cmb.tmu1_invert = cmb.tmu1_a_invert = FXFALSE;
|
||||
cmb.tmu0_invert = cmb.tmu0_a_invert = cmb.tmu1_invert = cmb.tmu1_a_invert = false;
|
||||
|
||||
cmb.dc0_detailmax = cmb.dc1_detailmax = 0;
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ static gfxChipID_t SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaqu
|
|||
if (voodoo.tmem_ptr[GFX_TMU0] + texture_size < voodoo.tex_max_addr[0])
|
||||
{
|
||||
tmu = GFX_TMU0;
|
||||
gfxTexCombine(GFX_TMU1, GFX_COMBINE_FUNCTION_NONE, GFX_COMBINE_FACTOR_NONE, GFX_COMBINE_FUNCTION_NONE, GFX_COMBINE_FACTOR_NONE, FXFALSE, FXFALSE);
|
||||
gfxTexCombine(GFX_TMU0, GFX_COMBINE_FUNCTION_LOCAL, GFX_COMBINE_FACTOR_NONE, GFX_COMBINE_FUNCTION_LOCAL, GFX_COMBINE_FACTOR_NONE, FXFALSE, FXFALSE);
|
||||
gfxTexCombine(GFX_TMU1, GFX_COMBINE_FUNCTION_NONE, GFX_COMBINE_FACTOR_NONE, GFX_COMBINE_FUNCTION_NONE, GFX_COMBINE_FACTOR_NONE, false, false);
|
||||
gfxTexCombine(GFX_TMU0, GFX_COMBINE_FUNCTION_LOCAL, GFX_COMBINE_FACTOR_NONE, GFX_COMBINE_FUNCTION_LOCAL, GFX_COMBINE_FACTOR_NONE, false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -36,15 +36,15 @@ static gfxChipID_t SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaqu
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE,
|
||||
FXFALSE);
|
||||
false,
|
||||
false);
|
||||
gfxTexCombine(GFX_TMU0,
|
||||
GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
FXFALSE,
|
||||
FXFALSE);
|
||||
false,
|
||||
false);
|
||||
}
|
||||
gfxTextureFilterMode_t filter = (rdp.filter_mode != 2) ? GFX_TEXTUREFILTER_POINT_SAMPLED : GFX_TEXTUREFILTER_BILINEAR;
|
||||
gfxTexFilterMode(tmu, filter, filter);
|
||||
|
@ -57,12 +57,12 @@ static gfxChipID_t SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaqu
|
|||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
// GFX_COMBINE_OTHER_CONSTANT,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
false);
|
||||
if (opaque)
|
||||
{
|
||||
gfxAlphaTestFunction(GFX_CMP_ALWAYS);
|
||||
|
@ -80,7 +80,7 @@ static gfxChipID_t SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaqu
|
|||
}
|
||||
gfxDepthBufferFunction(GFX_CMP_ALWAYS);
|
||||
gfxCullMode(GFX_CULL_DISABLE);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
rdp.update |= UPDATE_COMBINE | UPDATE_ZBUF_ENABLED | UPDATE_CULL_MODE;
|
||||
return tmu;
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ static void DrawDepthBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
|
|||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_CONSTANT,
|
||||
FXFALSE);
|
||||
false);
|
||||
uint16_t * src = (uint16_t*)image;
|
||||
src += fb_info.ul_x + fb_info.ul_y * fb_info.width;
|
||||
uint32_t w_tail = width % 256;
|
||||
|
@ -471,33 +471,33 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_LOCAL_CONSTANT,
|
||||
GFX_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaBlendFunction(GFX_BLEND_SRC_ALPHA,
|
||||
GFX_BLEND_ONE_MINUS_SRC_ALPHA,
|
||||
GFX_BLEND_ONE,
|
||||
GFX_BLEND_ZERO);
|
||||
gfxDepthBufferFunction(GFX_CMP_ALWAYS);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
gfxCullMode(GFX_CULL_DISABLE);
|
||||
gfxTexCombine(GFX_TMU1,
|
||||
GFX_COMBINE_FUNCTION_NONE,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_NONE,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE,
|
||||
FXFALSE);
|
||||
false,
|
||||
false);
|
||||
gfxTexCombine(GFX_TMU0,
|
||||
GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE,
|
||||
FXFALSE);
|
||||
false,
|
||||
false);
|
||||
// gfxAuxBufferExt( GFX_BUFFER_AUXBUFFER );
|
||||
gfxTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GR_MIPMAPLEVELMASK_BOTH, &(t_info));
|
||||
float ul_x = (float)rdp.scissor.ul_x;
|
||||
|
@ -583,7 +583,7 @@ void DrawDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_CONSTANT,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxTexDownloadMipMap(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexSource(tmu, voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu], GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
float ul_x = fb_info.ul_x * rdp.scale_x + rdp.offset_x;
|
||||
|
|
|
@ -357,7 +357,7 @@ void DisplayLoadProgress(const wchar_t *format, ...)
|
|||
x = (1024 - len) / 2.0f;
|
||||
output(x, 360, 1, buf);
|
||||
gfxBufferSwap(0);
|
||||
gfxColorMask(FXTRUE, FXTRUE);
|
||||
gfxColorMask(true, true);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
}
|
||||
|
||||
|
@ -531,7 +531,7 @@ int InitGfx()
|
|||
|
||||
gfxDepthBufferMode(GFX_DEPTHBUFFER_ZBUFFER);
|
||||
gfxDepthBufferFunction(GFX_CMP_LESS);
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxDepthMask(true);
|
||||
|
||||
ChangeSize();
|
||||
|
||||
|
@ -542,12 +542,12 @@ int InitGfx()
|
|||
gfxDepthBufferMode(GFX_DEPTHBUFFER_ZBUFFER);
|
||||
gfxDepthBufferFunction(GFX_CMP_ALWAYS);
|
||||
gfxRenderBuffer(GFX_BUFFER_BACKBUFFER);
|
||||
gfxColorMask(FXTRUE, FXTRUE);
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxColorMask(true, true);
|
||||
gfxDepthMask(true);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
gfxBufferSwap(0);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
gfxTexFilterMode(GFX_TMU0, GFX_TEXTUREFILTER_BILINEAR, GFX_TEXTUREFILTER_BILINEAR);
|
||||
gfxTexFilterMode(GFX_TMU1, GFX_TEXTUREFILTER_BILINEAR, GFX_TEXTUREFILTER_BILINEAR);
|
||||
gfxTexClampMode(GFX_TMU0, GFX_TEXTURECLAMP_CLAMP, GFX_TEXTURECLAMP_CLAMP);
|
||||
|
@ -1039,8 +1039,8 @@ static void DrawFrameBuffer()
|
|||
if (to_fullscreen)
|
||||
GoToFullScreen();
|
||||
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxColorMask(FXTRUE, FXTRUE);
|
||||
gfxDepthMask(true);
|
||||
gfxColorMask(true, true);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
drawViRegBG();
|
||||
}
|
||||
|
@ -1242,7 +1242,7 @@ void newSwapBuffers()
|
|||
rdp.update |= UPDATE_SCISSOR | UPDATE_COMBINE | UPDATE_ZBUF_ENABLED | UPDATE_CULL_MODE;
|
||||
gfxClipWindow(0, 0, g_scr_res_x, g_scr_res_y);
|
||||
gfxDepthBufferFunction(GFX_CMP_ALWAYS);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
gfxCullMode(GFX_CULL_DISABLE);
|
||||
|
||||
if (g_capture_screen)
|
||||
|
@ -1273,7 +1273,7 @@ void newSwapBuffers()
|
|||
|
||||
gfxLfbInfo_t info;
|
||||
info.size = sizeof(gfxLfbInfo_t);
|
||||
if (gfxLfbLock(GFX_LFB_READ_ONLY, GFX_BUFFER_BACKBUFFER, GFX_LFBWRITEMODE_565, GFX_ORIGIN_UPPER_LEFT, FXFALSE, &info))
|
||||
if (gfxLfbLock(GFX_LFB_READ_ONLY, GFX_BUFFER_BACKBUFFER, GFX_LFBWRITEMODE_565, GFX_ORIGIN_UPPER_LEFT, false, &info))
|
||||
{
|
||||
AUTO_PTR<uint8_t> ssimg_buffer(new uint8_t[image_width * image_height * 3]);
|
||||
uint8_t * ssimg = ssimg_buffer.get();
|
||||
|
@ -1357,7 +1357,7 @@ void newSwapBuffers()
|
|||
|
||||
if (g_settings->wireframe() || g_settings->buff_clear() || (g_settings->hacks(CSettings::hack_PPL) && g_settings->ucode() == CSettings::ucode_S2DEX))
|
||||
{
|
||||
gfxDepthMask((g_settings->hacks(CSettings::hack_RE2) && g_settings->fb_depth_render_enabled()) ? FXFALSE : FXTRUE);
|
||||
gfxDepthMask((g_settings->hacks(CSettings::hack_RE2) && g_settings->fb_depth_render_enabled()) ? false : true);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
}
|
||||
|
||||
|
|
|
@ -560,7 +560,7 @@ bool gfxSstWinClose()
|
|||
}
|
||||
ExitFullScreen();
|
||||
#endif
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void gfxTextureBufferExt(gfxChipID_t tmu, uint32_t startAddress, gfxLOD_t lodmin, gfxLOD_t lodmax, gfxAspectRatio_t aspect, gfxTextureFormat_t fmt, uint32_t evenOdd)
|
||||
|
@ -955,7 +955,7 @@ uint32_t gfxGet(uint32_t pname, uint32_t plength, int32_t *params)
|
|||
break;
|
||||
case GR_LFB_PIXEL_PIPE:
|
||||
if (plength < 4 || params == NULL) return 0;
|
||||
params[0] = FXFALSE;
|
||||
params[0] = false;
|
||||
return 4;
|
||||
break;
|
||||
case GR_MAX_TEXTURE_ASPECT_RATIO:
|
||||
|
@ -965,7 +965,7 @@ uint32_t gfxGet(uint32_t pname, uint32_t plength, int32_t *params)
|
|||
break;
|
||||
case GR_NON_POWER_OF_TWO_TEXTURES:
|
||||
if (plength < 4 || params == NULL) return 0;
|
||||
params[0] = FXFALSE;
|
||||
params[0] = false;
|
||||
return 4;
|
||||
break;
|
||||
case GR_TEXTURE_ALIGN:
|
||||
|
@ -1390,7 +1390,7 @@ bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode,
|
|||
}
|
||||
}
|
||||
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gfxLfbUnlock(gfxLock_t type, gfxBuffer_t buffer)
|
||||
|
@ -1400,7 +1400,7 @@ bool gfxLfbUnlock(gfxLock_t type, gfxBuffer_t buffer)
|
|||
{
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxLfbUnlock : write only");
|
||||
}
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gfxLfbReadRegion(gfxBuffer_t src_buffer, uint32_t src_x, uint32_t src_y, uint32_t src_width, uint32_t src_height, uint32_t dst_stride, void *dst_data)
|
||||
|
@ -1461,7 +1461,7 @@ bool gfxLfbReadRegion(gfxBuffer_t src_buffer, uint32_t src_x, uint32_t src_y, ui
|
|||
free(buf);
|
||||
}
|
||||
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gfxLfbWriteRegion(gfxBuffer_t dst_buffer, uint32_t dst_x, uint32_t dst_y, gfxLfbSrcFmt_t src_format, uint32_t src_width, uint32_t src_height, bool pixelPipeline, int32_t src_stride, void *src_data)
|
||||
|
@ -1587,7 +1587,7 @@ bool gfxLfbWriteRegion(gfxBuffer_t dst_buffer, uint32_t dst_x, uint32_t dst_y, g
|
|||
}
|
||||
//glDrawBuffer(current_buffer);
|
||||
//glPopAttrib();
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* wrapper-specific glide extensions */
|
||||
|
|
|
@ -492,7 +492,7 @@ bool gfxSstWinOpen(gfxColorFormat_t color_format, gfxOriginLocation_t origin_loc
|
|||
if ((hDC = GetDC(g_hwnd_win)) == NULL)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceWarning, "GetDC on main window failed");
|
||||
return FXFALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((pfm = ChoosePixelFormat(hDC, &pfd)) == 0) {
|
||||
|
@ -503,19 +503,19 @@ bool gfxSstWinOpen(gfxColorFormat_t color_format, gfxOriginLocation_t origin_loc
|
|||
if (pfm == 0)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceWarning, "ChoosePixelFormat failed");
|
||||
return FXFALSE;
|
||||
return false;
|
||||
}
|
||||
if (SetPixelFormat(hDC, pfm, &pfd) == 0)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceWarning, "SetPixelFormat failed");
|
||||
return FXFALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((hGLRC = wglCreateContext(hDC)) == 0)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceWarning, "wglCreateContext failed!");
|
||||
gfxSstWinClose();
|
||||
return FXFALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
HGLRC CurrenthGLRC = wglGetCurrentContext();
|
||||
|
@ -526,7 +526,7 @@ bool gfxSstWinOpen(gfxColorFormat_t color_format, gfxOriginLocation_t origin_loc
|
|||
{
|
||||
WriteTrace(TraceGlitch, TraceWarning, "wglMakeCurrent failed!");
|
||||
gfxSstWinClose();
|
||||
return FXFALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
@ -860,7 +860,7 @@ bool gfxSstWinClose()
|
|||
//sleep(2);
|
||||
//m_pScreen = NULL;
|
||||
#endif
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void gfxTextureBufferExt(gfxChipID_t tmu, uint32_t startAddress, gfxLOD_t lodmin, gfxLOD_t lodmax, gfxAspectRatio_t aspect, gfxTextureFormat_t fmt, uint32_t evenOdd)
|
||||
|
@ -1271,7 +1271,7 @@ uint32_t gfxGet(uint32_t pname, uint32_t plength, int32_t *params)
|
|||
break;
|
||||
case GR_LFB_PIXEL_PIPE:
|
||||
if (plength < 4 || params == NULL) return 0;
|
||||
params[0] = FXFALSE;
|
||||
params[0] = false;
|
||||
return 4;
|
||||
break;
|
||||
case GR_MAX_TEXTURE_ASPECT_RATIO:
|
||||
|
@ -1281,7 +1281,7 @@ uint32_t gfxGet(uint32_t pname, uint32_t plength, int32_t *params)
|
|||
break;
|
||||
case GR_NON_POWER_OF_TWO_TEXTURES:
|
||||
if (plength < 4 || params == NULL) return 0;
|
||||
params[0] = FXFALSE;
|
||||
params[0] = false;
|
||||
return 4;
|
||||
break;
|
||||
case GR_TEXTURE_ALIGN:
|
||||
|
@ -1671,7 +1671,7 @@ bool gfxLfbLock(gfxLock_t type, gfxBuffer_t buffer, gfxLfbWriteMode_t writeMode,
|
|||
}
|
||||
|
||||
grDisplayGLError("gfxLfbLock");
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gfxLfbUnlock(gfxLock_t type, gfxBuffer_t buffer)
|
||||
|
@ -1681,7 +1681,7 @@ bool gfxLfbUnlock(gfxLock_t type, gfxBuffer_t buffer)
|
|||
{
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxLfbUnlock : write only");
|
||||
}
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gfxLfbReadRegion(gfxBuffer_t src_buffer, uint32_t src_x, uint32_t src_y, uint32_t src_width, uint32_t src_height, uint32_t dst_stride, void *dst_data)
|
||||
|
@ -1743,7 +1743,7 @@ bool gfxLfbReadRegion(gfxBuffer_t src_buffer, uint32_t src_x, uint32_t src_y, ui
|
|||
}
|
||||
|
||||
grDisplayGLError("gfxLfbReadRegion");
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gfxLfbWriteRegion(gfxBuffer_t dst_buffer, uint32_t dst_x, uint32_t dst_y, gfxLfbSrcFmt_t src_format, uint32_t src_width, uint32_t src_height, bool pixelPipeline, int32_t src_stride, void *src_data)
|
||||
|
@ -1871,7 +1871,7 @@ bool gfxLfbWriteRegion(gfxBuffer_t dst_buffer, uint32_t dst_x, uint32_t dst_y, g
|
|||
glPopAttrib();
|
||||
|
||||
grDisplayGLError("gfxLfbWriteRegion");
|
||||
return FXTRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* wrapper-specific glide extensions */
|
||||
|
@ -1933,7 +1933,7 @@ void gfxGetGammaTableExt(uint32_t /*nentries*/, uint32_t *red, uint32_t *green,
|
|||
blue[i] = aGammaRamp[2][i] >> 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void gfxGammaCorrectionRGB(float gammaR, float gammaG, float gammaB)
|
||||
{
|
||||
|
|
|
@ -258,9 +258,9 @@ int OpenTextureBuffer(COLOR_IMAGE & cimage)
|
|||
gfxRenderBuffer(GFX_BUFFER_TEXTUREBUFFER_EXT);
|
||||
gfxTextureBufferExt(texbuf->tmu, texbuf->tex_addr, texbuf->info.smallLodLog2, texbuf->info.largeLodLog2,
|
||||
texbuf->info.aspectRatioLog2, texbuf->info.format, GR_MIPMAPLEVELMASK_BOTH);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxDepthMask(true);
|
||||
gfxRenderBuffer(GFX_BUFFER_BACKBUFFER);
|
||||
rdp.texbufs[i].count--;
|
||||
if (j < rdp.texbufs[i].count)
|
||||
|
@ -300,9 +300,9 @@ int OpenTextureBuffer(COLOR_IMAGE & cimage)
|
|||
if (rdp.cur_image->clear && g_settings->fb_hwfbe_buf_clear_enabled() && cimage.changed)
|
||||
{
|
||||
rdp.cur_image->clear = FALSE;
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxDepthMask(true);
|
||||
}
|
||||
//*/
|
||||
// memset(gfx.RDRAM+cimage.addr, 0, cimage.width*cimage.height*cimage.size);
|
||||
|
@ -328,12 +328,12 @@ static gfxTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
|
|||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
// GFX_COMBINE_OTHER_CONSTANT,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
false);
|
||||
// gfxConstantColorValue (0xFFFFFFFF);
|
||||
gfxAlphaBlendFunction(GFX_BLEND_ONE, // use alpha compare, but not T0 alpha
|
||||
GFX_BLEND_ZERO,
|
||||
|
@ -341,7 +341,7 @@ static gfxTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
|
|||
GFX_BLEND_ZERO);
|
||||
gfxClipWindow(0, 0, g_scr_res_x, g_scr_res_y);
|
||||
gfxDepthBufferFunction(GFX_CMP_ALWAYS);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
gfxCullMode(GFX_CULL_DISABLE);
|
||||
gfxFogMode(GFX_FOG_DISABLE);
|
||||
gfxTextureFormat_t buf_format = (rdp.tbuff_tex) ? rdp.tbuff_tex->info.format : GFX_TEXFMT_RGB_565;
|
||||
|
@ -358,15 +358,15 @@ static gfxTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_NONE,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE,
|
||||
FXFALSE);
|
||||
false,
|
||||
false);
|
||||
gfxTexCombine(GFX_TMU0,
|
||||
color_source,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_ZERO,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE,
|
||||
FXTRUE);
|
||||
false,
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -375,15 +375,15 @@ static gfxTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_ZERO,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE,
|
||||
FXTRUE);
|
||||
false,
|
||||
true);
|
||||
gfxTexCombine(GFX_TMU0,
|
||||
GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
FXFALSE,
|
||||
FXFALSE);
|
||||
false,
|
||||
false);
|
||||
}
|
||||
return buf_format;
|
||||
}
|
||||
|
|
|
@ -675,8 +675,8 @@ void TexCache()
|
|||
}
|
||||
else
|
||||
{
|
||||
gfxColorCombine(cmb.c_fnc, cmb.c_fac, cmb.c_loc, cmb.c_oth, FXFALSE);
|
||||
gfxAlphaCombine(cmb.a_fnc, cmb.a_fac, cmb.a_loc, cmb.a_oth, FXFALSE);
|
||||
gfxColorCombine(cmb.c_fnc, cmb.c_fac, cmb.c_loc, cmb.c_oth, false);
|
||||
gfxAlphaCombine(cmb.a_fnc, cmb.a_fac, cmb.a_loc, cmb.a_oth, false);
|
||||
}
|
||||
gfxConstantColorValue(cmb.ccolor);
|
||||
gfxAlphaBlendFunction(cmb.abf1, cmb.abf2, GFX_BLEND_ZERO, GFX_BLEND_ZERO);
|
||||
|
|
|
@ -1776,15 +1776,15 @@ void update()
|
|||
}
|
||||
|
||||
if (rdp.flags & ZBUF_UPDATE)
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxDepthMask(true);
|
||||
else
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
gfxDepthBiasLevel(0);
|
||||
gfxDepthBufferFunction(GFX_CMP_ALWAYS);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1956,12 +1956,12 @@ void set_message_combiner()
|
|||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaBlendFunction(GFX_BLEND_ONE,
|
||||
GFX_BLEND_ZERO,
|
||||
GFX_BLEND_ZERO,
|
||||
|
@ -1974,13 +1974,13 @@ void set_message_combiner()
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_NONE,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE, FXFALSE);
|
||||
false, false);
|
||||
gfxTexCombine(GFX_TMU0,
|
||||
GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE, FXFALSE);
|
||||
false, false);
|
||||
gfxTexSource(GFX_TMU0,
|
||||
voodoo.tex_min_addr[GFX_TMU0] + offset_font,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
|
|
|
@ -667,7 +667,7 @@ static void CopyFrameBuffer(gfxBuffer_t buffer = GFX_BUFFER_BACKBUFFER)
|
|||
buffer,
|
||||
GFX_LFBWRITEMODE_565,
|
||||
GFX_ORIGIN_UPPER_LEFT,
|
||||
FXFALSE,
|
||||
false,
|
||||
&info))
|
||||
{
|
||||
uint16_t *ptr_src = (uint16_t*)info.lfbPtr;
|
||||
|
@ -2395,10 +2395,10 @@ void rdp_fillrect()
|
|||
if (!g_settings->hacks(CSettings::hack_Hyperbike) || rdp.ci_width > 64) //do not clear main depth buffer for aux depth buffers
|
||||
{
|
||||
update_scissor();
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxColorMask(FXFALSE, FXFALSE);
|
||||
gfxDepthMask(true);
|
||||
gfxColorMask(false, false);
|
||||
gfxBufferClear(0, 0, rdp.fill_color ? rdp.fill_color & 0xFFFF : 0xFFFF);
|
||||
gfxColorMask(FXTRUE, FXTRUE);
|
||||
gfxColorMask(true, true);
|
||||
rdp.update |= UPDATE_ZBUF_ENABLED;
|
||||
}
|
||||
ul_x = minval(maxval(ul_x, rdp.scissor_o.ul_x), rdp.scissor_o.lr_x);
|
||||
|
@ -2437,9 +2437,9 @@ void rdp_fillrect()
|
|||
((uint32_t)((float)((color & 0x07C0) >> 6) / 31.0f * 255.0f) << 16) |
|
||||
((uint32_t)((float)((color & 0x003E) >> 1) / 31.0f * 255.0f) << 8);
|
||||
}
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
gfxBufferClear(color, 0, 0xFFFF);
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxDepthMask(true);
|
||||
rdp.update |= UPDATE_ZBUF_ENABLED;
|
||||
WriteTrace(TraceRDP, TraceDebug, "Fillrect - cleared the texture buffer");
|
||||
return;
|
||||
|
@ -2506,13 +2506,13 @@ void rdp_fillrect()
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_LOCAL_CONSTANT,
|
||||
GFX_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
false);
|
||||
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_LOCAL_CONSTANT,
|
||||
GFX_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
false);
|
||||
|
||||
gfxAlphaBlendFunction(GFX_BLEND_ONE, GFX_BLEND_ZERO, GFX_BLEND_ONE, GFX_BLEND_ZERO);
|
||||
|
||||
|
@ -2522,7 +2522,7 @@ void rdp_fillrect()
|
|||
gfxCullMode(GFX_CULL_DISABLE);
|
||||
gfxFogMode(GFX_FOG_DISABLE);
|
||||
gfxDepthBufferFunction(GFX_CMP_ALWAYS);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
|
||||
rdp.update |= UPDATE_COMBINE | UPDATE_CULL_MODE | UPDATE_FOG_ENABLED | UPDATE_ZBUF_ENABLED;
|
||||
}
|
||||
|
@ -2544,7 +2544,7 @@ void rdp_fillrect()
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_LOCAL_CONSTANT,
|
||||
GFX_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxConstantColorValue((cmb.ccolor & 0xFFFFFF00) | (rdp.fog_color & 0xFF));
|
||||
rdp.update |= UPDATE_COMBINE;
|
||||
}
|
||||
|
@ -2721,9 +2721,9 @@ static void RestoreScale()
|
|||
rdp.view_trans[1] *= rdp.scale_y;
|
||||
rdp.update |= UPDATE_VIEWPORT | UPDATE_SCISSOR;
|
||||
//*
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxDepthMask(true);
|
||||
//*/
|
||||
}
|
||||
|
||||
|
@ -2970,7 +2970,7 @@ void rdp_setcolorimage()
|
|||
ptr_dst[x + y * width] = c;
|
||||
}
|
||||
}
|
||||
gfxLfbWriteRegion(GFX_BUFFER_BACKBUFFER, (uint32_t)rdp.offset_x, (uint32_t)rdp.offset_y, GFX_LFB_SRC_FMT_555, width, height, FXFALSE, width << 1, ptr_dst);
|
||||
gfxLfbWriteRegion(GFX_BUFFER_BACKBUFFER, (uint32_t)rdp.offset_x, (uint32_t)rdp.offset_y, GFX_LFB_SRC_FMT_555, width, height, false, width << 1, ptr_dst);
|
||||
delete[] ptr_dst;
|
||||
}
|
||||
}
|
||||
|
@ -3122,12 +3122,12 @@ void SetWireframeCol()
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_LOCAL_ITERATED,
|
||||
GFX_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_LOCAL_ITERATED,
|
||||
GFX_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaBlendFunction(GFX_BLEND_ONE,
|
||||
GFX_BLEND_ZERO,
|
||||
GFX_BLEND_ZERO,
|
||||
|
@ -3137,25 +3137,25 @@ void SetWireframeCol()
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_ZERO,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE, FXFALSE);
|
||||
false, false);
|
||||
gfxTexCombine(GFX_TMU1,
|
||||
GFX_COMBINE_FUNCTION_ZERO,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_ZERO,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE, FXFALSE);
|
||||
false, false);
|
||||
break;
|
||||
case CSettings::wfmode_RedOnly:
|
||||
gfxColorCombine(GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_LOCAL_CONSTANT,
|
||||
GFX_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_LOCAL_CONSTANT,
|
||||
GFX_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxConstantColorValue(0xFF0000FF);
|
||||
gfxAlphaBlendFunction(GFX_BLEND_ONE,
|
||||
GFX_BLEND_ZERO,
|
||||
|
@ -3166,13 +3166,13 @@ void SetWireframeCol()
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_ZERO,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE, FXFALSE);
|
||||
false, false);
|
||||
gfxTexCombine(GFX_TMU1,
|
||||
GFX_COMBINE_FUNCTION_ZERO,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_ZERO,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE, FXFALSE);
|
||||
false, false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ float set_sprite_combine_mode()
|
|||
cmb.tmu1_fac = cmb.tmu0_fac = GFX_COMBINE_FACTOR_NONE;
|
||||
cmb.tmu1_a_func = cmb.tmu0_a_func = GFX_COMBINE_FUNCTION_LOCAL;
|
||||
cmb.tmu1_a_fac = cmb.tmu0_a_fac = GFX_COMBINE_FACTOR_NONE;
|
||||
cmb.tmu1_invert = cmb.tmu0_invert = FXFALSE;
|
||||
cmb.tmu1_a_invert = cmb.tmu0_a_invert = FXFALSE;
|
||||
cmb.tmu1_invert = cmb.tmu0_invert = false;
|
||||
cmb.tmu1_a_invert = cmb.tmu0_a_invert = false;
|
||||
}
|
||||
|
||||
rdp.update |= UPDATE_COMBINE;
|
||||
|
@ -76,12 +76,12 @@ float set_sprite_combine_mode()
|
|||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaBlendFunction(GFX_BLEND_ONE,
|
||||
GFX_BLEND_ZERO,
|
||||
GFX_BLEND_ZERO,
|
||||
|
@ -149,31 +149,31 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
|||
GFX_COMBINE_FACTOR_NONE,
|
||||
GFX_COMBINE_FUNCTION_LOCAL,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
FXFALSE,
|
||||
FXFALSE);
|
||||
false,
|
||||
false);
|
||||
gfxTexCombine(GFX_TMU0,
|
||||
GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
FXFALSE,
|
||||
FXFALSE);
|
||||
false,
|
||||
false);
|
||||
gfxColorCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GFX_COMBINE_FACTOR_ONE,
|
||||
GFX_COMBINE_LOCAL_NONE,
|
||||
GFX_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
false);
|
||||
gfxAlphaBlendFunction(GFX_BLEND_ONE,
|
||||
GFX_BLEND_ZERO,
|
||||
GFX_BLEND_ONE,
|
||||
GFX_BLEND_ZERO);
|
||||
gfxDepthBufferFunction(GFX_CMP_ALWAYS);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxDepthMask(false);
|
||||
|
||||
gfxLOD_t LOD = g_scr_res_x > 1024 ? GFX_LOD_LOG2_2048 : GFX_LOD_LOG2_1024;
|
||||
|
||||
|
@ -202,7 +202,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
|||
gfxDrawTriangle(&v[2], &v[3], &v[1]);
|
||||
gfxRenderBuffer(GFX_BUFFER_BACKBUFFER);
|
||||
gfxAuxBufferExt(GFX_BUFFER_TEXTUREAUXBUFFER_EXT);
|
||||
gfxDepthMask(FXTRUE);
|
||||
gfxDepthMask(true);
|
||||
}
|
||||
|
||||
void DrawDepthImage(const DRAWIMAGE & d)
|
||||
|
@ -234,7 +234,7 @@ void DrawDepthImage(const DRAWIMAGE & d)
|
|||
dst[x + y*dst_width] = src[(int(x*scale_x_src) + int(y*scale_y_src)*src_width) ^ 1];
|
||||
}
|
||||
}
|
||||
gfxLfbWriteRegion(GFX_BUFFER_AUXBUFFER, 0, 0, GFX_LFB_SRC_FMT_ZA16, dst_width, dst_height, FXFALSE, dst_width << 1, dst);
|
||||
gfxLfbWriteRegion(GFX_BUFFER_AUXBUFFER, 0, 0, GFX_LFB_SRC_FMT_ZA16, dst_width, dst_height, false, dst_width << 1, dst);
|
||||
delete[] dst;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue