Skip to content

Commit

Permalink
[Video] FXTRUE/FXFALSE to true/false
Browse files Browse the repository at this point in the history
  • Loading branch information
project64 committed Aug 9, 2017
1 parent db75181 commit fe52233
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 108 deletions.
4 changes: 2 additions & 2 deletions Source/Project64-video/Combine.cpp
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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;

Expand Down
36 changes: 18 additions & 18 deletions Source/Project64-video/FBtoScreen.cpp
Expand Up @@ -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
{
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions Source/Project64-video/Main.cpp
Expand Up @@ -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);
}

Expand Down Expand Up @@ -531,7 +531,7 @@ int InitGfx()

gfxDepthBufferMode(GFX_DEPTHBUFFER_ZBUFFER);
gfxDepthBufferFunction(GFX_CMP_LESS);
gfxDepthMask(FXTRUE);
gfxDepthMask(true);

ChangeSize();

Expand All @@ -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);
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}

Expand Down
14 changes: 7 additions & 7 deletions Source/Project64-video/Renderer/OGLESglitchmain.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 */
Expand Down
26 changes: 13 additions & 13 deletions Source/Project64-video/Renderer/OGLglitchmain.cpp
Expand Up @@ -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) {
Expand All @@ -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();
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit fe52233

Please sign in to comment.