[Glide64] rename fullscreen to GfxInitDone

This commit is contained in:
zilmar 2016-01-21 04:12:15 +11:00
parent 5a4ea8ad1f
commit 2b9cdb12c3
9 changed files with 982 additions and 1101 deletions

View File

@ -15574,12 +15574,9 @@ void Combine()
if (cmb.cmb_ext_use || cmb.tex_cmb_ext_use)
{
//have to draw something to allow use of standard combine functions
if (fullscreen)
{
VERTEX v;
memset(&v, 0, sizeof(v));
grDrawPoint(&v);
}
cmb.cmb_ext_use = 0;
cmb.tex_cmb_ext_use = 0;
}
@ -15737,8 +15734,6 @@ void Combine()
//*/
rdp.tex = cmb.tex;
if (fullscreen)
{
TBUFF_COLOR_IMAGE * aTBuff[2] = { 0, 0 };
if (rdp.aTBuffTex[0])
aTBuff[rdp.aTBuffTex[0]->tile] = rdp.aTBuffTex[0];
@ -15791,7 +15786,6 @@ void Combine()
}
else
grChromakeyMode(GR_CHROMAKEY_DISABLE);
}
cmb.shade_mod_hash = (rdp.cmb_flags + rdp.cmb_flags_2) * (rdp.prim_color + rdp.env_color + rdp.K5);
LRDP(" | + Combine end\n");

View File

@ -170,7 +170,7 @@ wxNotebook(parent, id, pos, size, 0)
#ifdef TEXTURE_FILTER
if (settings.texenh_options)
{
if (!fullscreen)
if (!GfxInitDone)
{
grGlideInit();
grSstSelect(settings.card_id);
@ -184,7 +184,7 @@ wxNotebook(parent, id, pos, size, 0)
voodoo.sup_32bit_tex = TRUE;
else
voodoo.sup_32bit_tex = FALSE;
if (!fullscreen)
if (!GfxInitDone)
grGlideShutdown();
TexturePanel = new wxPanel(this, wxID_ANY);

View File

@ -273,7 +273,7 @@ extern "C" {
__inline void FRDP_E(const char * /*fmt*/, ...) {}
#endif
extern int fullscreen;
extern int GfxInitDone;
extern int romopen;
extern int to_fullscreen;
extern int debugging;

View File

@ -80,7 +80,7 @@ GFX_INFO gfx;
wxWindow * GFXWindow = NULL;
int to_fullscreen = FALSE;
int fullscreen = FALSE;
int GfxInitDone = FALSE;
int romopen = FALSE;
GrContext_t gfx_context = 0;
int debugging = FALSE;
@ -799,8 +799,6 @@ void DisplayLoadProgress(const wchar_t *format, ...)
// XXX: convert to multibyte
wcstombs(buf, wbuf, INFO_BUF);
if (fullscreen)
{
float x;
set_message_combiner();
output(382, 380, 1, "LOADING TEXTURES. PLEASE WAIT...");
@ -811,13 +809,14 @@ void DisplayLoadProgress(const wchar_t *format, ...)
grColorMask(FXTRUE, FXTRUE);
grBufferClear(0, 0, 0xFFFF);
}
}
#endif
int InitGfx()
{
if (fullscreen)
if (GfxInitDone)
{
ReleaseGfx();
}
OPEN_RDP_LOG(); // doesn't matter if opens again; it will check for it
OPEN_RDP_E_LOG();
@ -929,7 +928,7 @@ int InitGfx()
return FALSE;
}
fullscreen = TRUE;
GfxInitDone = TRUE;
to_fullscreen = FALSE;
#ifdef __WINDOWS__
@ -1132,7 +1131,7 @@ void ReleaseGfx()
// Shutdown glide
grGlideShutdown();
fullscreen = FALSE;
GfxInitDone = FALSE;
rdp.window_changed = TRUE;
}
@ -1233,21 +1232,6 @@ void CALL ReadScreen(void **dest, int *width, int *height)
uint8_t * line = buff;
*dest = (void*)buff;
if (!fullscreen)
{
for (uint32_t y = 0; y < settings.res_y; y++)
{
for (uint32_t x = 0; x < settings.res_x; x++)
{
line[x * 3] = 0x20;
line[x * 3 + 1] = 0x7f;
line[x * 3 + 2] = 0x40;
}
}
LOG("ReadScreen. not in the fullscreen!\n");
return;
}
GrLfbInfo_t info;
info.size = sizeof(GrLfbInfo_t);
if (grLfbLock(GR_LFB_READ_ONLY,
@ -1362,7 +1346,7 @@ EXPORT void CALL ChangeWindow(void)
// Go to fullscreen at next dlist
// This is for compatibility with 1964, which reloads the plugin
// when switching to fullscreen
if (!fullscreen)
if (!GfxInitDone)
{
to_fullscreen = TRUE;
#ifdef __WINDOWS__
@ -1420,7 +1404,6 @@ void CALL CloseDLL(void)
settings.ghq_use = 0;
}
#endif
if (fullscreen)
ReleaseGfx();
ZLUT_release();
ClearCache();
@ -1688,7 +1671,7 @@ void CALL RomClosed(void)
CLOSE_RDP_E_LOG();
rdp.window_changed = TRUE;
romopen = FALSE;
if (fullscreen && evoodoo)
if (evoodoo)
ReleaseGfx();
}
@ -1777,14 +1760,12 @@ void CALL RomOpen(void)
OPEN_RDP_E_LOG();
// ** EVOODOO EXTENSIONS **
if (!fullscreen)
if (!GfxInitDone)
{
grGlideInit();
grSstSelect(0);
}
const char *extensions = grGetString(GR_EXTENSION);
if (!fullscreen)
{
grGlideShutdown();
if (strstr(extensions, "EVOODOO"))
@ -1794,7 +1775,6 @@ void CALL RomOpen(void)
if (evoodoo)
InitGfx();
}
if (strstr(extensions, "ROMNAME"))
{
@ -1857,21 +1837,14 @@ void drawNoFullscreenMessage();
static void DrawFrameBuffer()
{
if (!fullscreen)
{
drawNoFullscreenMessage();
}
if (to_fullscreen)
GoToFullScreen();
if (fullscreen)
{
grDepthMask(FXTRUE);
grColorMask(FXTRUE, FXTRUE);
grBufferClear(0, 0, 0xFFFF);
drawViRegBG();
}
}
/******************************************************************
Function: UpdateScreen
@ -1896,9 +1869,10 @@ void CALL UpdateScreen(void)
LRDP(out_buf);
uint32_t width = (*gfx.VI_WIDTH_REG) << 1;
if (fullscreen && (*gfx.VI_ORIGIN_REG > width))
if (*gfx.VI_ORIGIN_REG > width)
{
update_screen_count++;
}
#ifdef FPS
// vertical interrupt has occurred, increment counter
vi_count++;
@ -1998,9 +1972,6 @@ void newSwapBuffers()
LRDP("swapped\n");
// Allow access to the whole screen
if (fullscreen)
{
rdp.update |= UPDATE_SCISSOR | UPDATE_COMBINE | UPDATE_ZBUF_ENABLED | UPDATE_CULL_MODE;
grClipWindow(0, 0, settings.scr_res_x, settings.scr_res_y);
grDepthBufferFunction(GR_CMP_ALWAYS);
@ -2108,7 +2079,6 @@ void newSwapBuffers()
}
output(120.0f, 0.0f, 1, message, 0);
}
}
if (capture_screen)
{
@ -2243,7 +2213,7 @@ void newSwapBuffers()
grLfbUnlock(GR_LFB_READ_ONLY, GR_BUFFER_BACKBUFFER);
}
if (fullscreen && debugging)
if (debugging)
{
debug_keys();
debug_cacheviewer();
@ -2253,8 +2223,6 @@ void newSwapBuffers()
if (settings.frame_buffer & fb_read_back_to_screen)
DrawWholeFrameBufferToScreen();
if (fullscreen)
{
if (fb_hwfbe_enabled && !(settings.hacks&hack_RE2) && !evoodoo)
grAuxBufferExt(GR_BUFFER_AUXBUFFER);
LOG("BUFFER SWAPPED\n");
@ -2281,13 +2249,10 @@ void newSwapBuffers()
voodoo.gamma_correction = 0;
}
}
}
if (_debugger.capture)
debug_capture();
if (fullscreen)
{
if (debugging || settings.wireframe || settings.buff_clear || (settings.hacks&hack_PPL && settings.ucode == 6))
{
if (settings.hacks&hack_RE2 && fb_depth_render_enabled)
@ -2305,11 +2270,11 @@ void newSwapBuffers()
grColorMask (FXTRUE, FXTRUE);
}
*/
}
if (settings.frame_buffer & fb_read_back_to_screen2)
{
DrawWholeFrameBufferToScreen();
}
frame_count++;
// Open/close debugger?
@ -2374,10 +2339,10 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
switch (msg)
{
case WM_ACTIVATEAPP:
if (wParam == TRUE && !fullscreen) rdp.window_changed = TRUE;
if (wParam == TRUE && !GfxInitDone) rdp.window_changed = TRUE;
break;
case WM_PAINT:
if (!fullscreen) rdp.window_changed = TRUE;
if (!GfxInitDone) rdp.window_changed = TRUE;
break;
/* case WM_DESTROY:

View File

@ -210,7 +210,6 @@ static TBUFF_COLOR_IMAGE * AllocateTextureBuffer(COLOR_IMAGE & cimage)
int OpenTextureBuffer(COLOR_IMAGE & cimage)
{
FRDP("OpenTextureBuffer. cur_tex_buf: %d, addr: %08lx, width: %d, height: %d", rdp.cur_tex_buf, cimage.addr, cimage.width, cimage.height);
if (!fullscreen) return FALSE;
int found = FALSE, search = TRUE;
TBUFF_COLOR_IMAGE *texbuf = 0;
@ -419,7 +418,7 @@ static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
int CloseTextureBuffer(int draw)
{
if (!fullscreen || !rdp.cur_image)
if (!rdp.cur_image)
{
LRDP("CloseTextureBuffer KO\n");
return FALSE;
@ -471,8 +470,6 @@ int CloseTextureBuffer(int draw)
int CopyTextureBuffer(COLOR_IMAGE & fb_from, COLOR_IMAGE & fb_to)
{
if (!fullscreen)
return FALSE;
FRDP("CopyTextureBuffer from %08x to %08x\n", fb_from.addr, fb_to.addr);
if (rdp.cur_image)
{
@ -537,8 +534,6 @@ int CopyTextureBuffer(COLOR_IMAGE & fb_from, COLOR_IMAGE & fb_to)
int CopyDepthBuffer()
{
if (!fullscreen)
return FALSE;
LRDP("CopyDepthBuffer. ");
float bound = 1024.0f;
GrLOD_t LOD = GR_LOD_LOG2_1024;
@ -592,7 +587,7 @@ int CopyDepthBuffer()
int SwapTextureBuffer()
{
if (!fullscreen || !rdp.tbuff_tex)
if (!rdp.tbuff_tex)
return FALSE;
LRDP("SwapTextureBuffer.");
COLOR_IMAGE ci;

View File

@ -501,7 +501,6 @@ void GetTexInfo(int id, int tile)
int ChooseBestTmu(int tmu1, int tmu2)
{
if (!fullscreen) return tmu1;
if (voodoo.tex_UMA) return 0;
if (tmu1 >= voodoo.num_tmu) return tmu2;
@ -733,8 +732,6 @@ void TexCache()
rdp.t1 = tmu_1;
// SET the combiner
if (fullscreen)
{
if (rdp.allow_combine)
{
// Now actually combine
@ -821,25 +818,19 @@ void TexCache()
grTexDetailControl(tmu_0, cmb.dc0_lodbias, cmb.dc0_detailscale, cmb.dc0_detailmax);
grTexLodBiasValue(tmu_0, cmb.lodbias0);
}
}
if ((rdp.tex & 1) && tmu_0 < voodoo.num_tmu)
{
if (aTBuff[0] && aTBuff[0]->cache)
{
LRDP(" | |- Hires tex T0 found in cache.\n");
if (fullscreen)
{
rdp.cur_cache[0] = aTBuff[0]->cache;
rdp.cur_cache[0]->last_used = frame_count;
rdp.cur_cache[0]->uses = rdp.debug_n;
}
}
else if (tex_found[0][tmu_0] != -1)
{
LRDP(" | |- T0 found in cache.\n");
if (fullscreen)
{
CACHE_LUT *cache = voodoo.tex_UMA ? &rdp.cache[0][tex_found[0][0]] : &rdp.cache[tmu_0][tex_found[0][tmu_0]];
rdp.cur_cache_n[0] = tex_found[0][tmu_0];
rdp.cur_cache[0] = cache;
@ -850,7 +841,6 @@ void TexCache()
GR_MIPMAPLEVELMASK_BOTH,
&cache->t_info);
}
}
else
LoadTex(0, tmu_0);
}
@ -859,18 +849,13 @@ void TexCache()
if (aTBuff[1] && aTBuff[1]->cache)
{
LRDP(" | |- Hires tex T1 found in cache.\n");
if (fullscreen)
{
rdp.cur_cache[1] = aTBuff[1]->cache;
rdp.cur_cache[1]->last_used = frame_count;
rdp.cur_cache[1]->uses = rdp.debug_n;
}
}
else if (tex_found[1][tmu_1] != -1)
{
LRDP(" | |- T1 found in cache.\n");
if (fullscreen)
{
CACHE_LUT *cache = voodoo.tex_UMA ? &rdp.cache[0][tex_found[1][0]] : &rdp.cache[tmu_1][tex_found[1][tmu_1]];
rdp.cur_cache_n[1] = tex_found[1][tmu_1];
rdp.cur_cache[1] = cache;
@ -881,13 +866,10 @@ void TexCache()
GR_MIPMAPLEVELMASK_BOTH,
&cache->t_info);
}
}
else
LoadTex(1, tmu_1);
}
if (fullscreen)
{
int tmu_v[2];
tmu_v[0] = tmu_0;
@ -963,7 +945,6 @@ void TexCache()
if (aTBuff[i] && (rdp.tex&(i + 1)))
SelectTBuffTex(aTBuff[i]);
}
}
LRDP(" | +- TexCache End\n");
}
@ -1623,8 +1604,6 @@ void LoadTex(int id, int tmu)
cache->lod = lod;
cache->aspect = aspect;
if (fullscreen)
{
#ifdef TEXTURE_FILTER // Hiroshi Morii <koolsmoky@users.sourceforge.net>
if (settings.ghq_use)
{
@ -1783,7 +1762,6 @@ void LoadTex(int id, int tmu)
cache->realheight = real_y;
}
}
}
#endif
// Load the texture into texture memory

View File

@ -1620,8 +1620,6 @@ static void render_tri(uint16_t linew, int old_interpolate)
}
}
*/
if (fullscreen)
{
if (settings.wireframe)
{
SetWireframeCol();
@ -1698,7 +1696,6 @@ static void render_tri(uint16_t linew, int old_interpolate)
grDrawVertexArray(GR_TRIANGLE_FAN, n, rdp.vtx_buffer ? (&vtx_list2) : (&vtx_list1));
}
}
}
if (_debugger.capture) add_tri(rdp.vtxbuf, n, TRI_TRIANGLE);
}
@ -1792,10 +1789,8 @@ void update_scissor()
//grClipWindow specifies the hardware clipping window. Any pixels outside the clipping window are rejected.
//Values are inclusive for minimum x and y values and exclusive for maximum x and y values.
// grClipWindow (rdp.scissor.ul_x?rdp.scissor.ul_x+1:0, rdp.scissor.ul_y?rdp.scissor.ul_y+1:0, rdp.scissor.lr_x, rdp.scissor.lr_y);
if (fullscreen)
grClipWindow(rdp.scissor.ul_x, rdp.scissor.ul_y, rdp.scissor.lr_x, rdp.scissor.lr_y);
FRDP(" |- scissor - (%d, %d) -> (%d, %d)\n", rdp.scissor.ul_x, rdp.scissor.ul_y,
rdp.scissor.lr_x, rdp.scissor.lr_y);
FRDP(" |- scissor - (%d, %d) -> (%d, %d)\n", rdp.scissor.ul_x, rdp.scissor.ul_y, rdp.scissor.lr_x, rdp.scissor.lr_y);
}
}
@ -1910,8 +1905,6 @@ void update()
rdp.update ^= UPDATE_TEXTURE;
}
if (fullscreen)
{
// Z buffer
if (rdp.update & UPDATE_ZBUF_ENABLED)
{
@ -2095,13 +2088,10 @@ void update()
grFogMode(GR_FOG_DISABLE);
}
}
}
if (rdp.update & UPDATE_VIEWPORT)
{
rdp.update ^= UPDATE_VIEWPORT;
if (fullscreen)
{
float scale_x = (float)fabs(rdp.view_scale[0]);
float scale_y = (float)fabs(rdp.view_scale[1]);
@ -2120,10 +2110,11 @@ void update()
grClipWindow(rdp.scissor.ul_x, rdp.scissor.ul_y, rdp.scissor.lr_x, rdp.scissor.lr_y);
}
}
}
if (rdp.update & UPDATE_SCISSOR)
{
update_scissor();
}
LRDP(" + update end\n");
}

View File

@ -459,8 +459,6 @@ static void copyWhiteToRDRAM()
static void CopyFrameBuffer(GrBuffer_t buffer = GR_BUFFER_BACKBUFFER)
{
if (!fullscreen)
return;
FRDP("CopyFrameBuffer: %08lx... ", rdp.cimg);
// don't bother to write the stuff in asm... the slow part is the read from video card,
@ -653,8 +651,6 @@ EXPORT void CALL ProcessDList(void)
SoftLocker lock(mutexProcessDList);
if (!lock.IsOk()) //mutex is busy
{
if (!fullscreen)
drawNoFullscreenMessage();
// Set an interrupt to allow the game to continue
*gfx.MI_INTR_REG |= 0x20;
gfx.CheckInterrupts();
@ -675,14 +671,6 @@ EXPORT void CALL ProcessDList(void)
LOG("ProcessDList ()\n");
if (!fullscreen)
{
drawNoFullscreenMessage();
// Set an interrupt to allow the game to continue
*gfx.MI_INTR_REG |= 0x20;
gfx.CheckInterrupts();
}
if (reset)
{
reset = 0;
@ -710,9 +698,6 @@ EXPORT void CALL ProcessDList(void)
if (to_fullscreen)
GoToFullScreen();
if (!fullscreen && !settings.run_in_window)
return;
// Clear out the RDP log
#ifdef RDP_LOGGING
if (settings.logging && settings.log_clear)
@ -860,7 +845,8 @@ EXPORT void CALL ProcessDList(void)
} while (!rdp.halt);
}
#ifdef CATCH_EXCEPTIONS
} catch (...) {
}
catch (...) {
if (fullscreen)
{
ReleaseGfx ();
@ -1510,8 +1496,6 @@ static void rdp_texrect()
apply_shade_mods(&vptr[i]);
}
if (fullscreen)
{
if (rdp.fog_mode >= RDP::fog_blend)
{
float fog;
@ -1558,11 +1542,6 @@ static void rdp_texrect()
}
else
rdp.tri_n += 2;
}
else
{
rdp.tri_n += 2;
}
delete[] vnew;
}
@ -2365,8 +2344,6 @@ static void rdp_fillrect()
if ((rdp.cimg == rdp.zimg) || (fb_emulation_enabled && rdp.ci_count > 0 && rdp.frame_buffers[rdp.ci_count - 1].status == ci_zimg) || pd_multiplayer)
{
LRDP("Fillrect - cleared the depth buffer\n");
if (fullscreen)
{
if (!(settings.hacks&hack_Hyperbike) || rdp.ci_width > 64) //do not clear main depth buffer for aux depth buffers
{
update_scissor();
@ -2395,7 +2372,6 @@ static void rdp_fillrect()
}
dst += zi_width_in_dwords;
}
}
}
return;
}
@ -2425,7 +2401,6 @@ static void rdp_fillrect()
}
// Update scissor
if (fullscreen)
update_scissor();
if (settings.decrease_fillrect_edge && rdp.cycle_mode == 0)
@ -2451,8 +2426,6 @@ static void rdp_fillrect()
FRDP(" - %d, %d, %d, %d\n", s_ul_x, s_ul_y, s_lr_x, s_lr_y);
if (fullscreen)
{
grFogMode(GR_FOG_DISABLE);
const float Z = (rdp.cycle_mode == 3) ? 0.0f : set_sprite_combine_mode();
@ -2500,7 +2473,9 @@ static void rdp_fillrect()
grAlphaTestFunction(GR_CMP_ALWAYS);
if (grStippleModeExt)
{
grStippleModeExt(GR_STIPPLE_DISABLE);
}
grCullMode(GR_CULL_DISABLE);
grFogMode(GR_FOG_DISABLE);
@ -2517,8 +2492,10 @@ static void rdp_fillrect()
{
AllowShadeMods(v, 4);
for (int k = 0; k < 4; k++)
{
apply_shade_mods(&v[k]);
}
}
if ((rdp.othermode_l & 0x4000) && ((rdp.othermode_l >> 16) == 0x0550)) //special blender mode for Bomberman64
{
grAlphaCombine(GR_COMBINE_FUNCTION_LOCAL,
@ -2560,9 +2537,6 @@ static void rdp_fillrect()
add_tri(v1, 3, TRI_FILLRECT);
rdp.tri_n++;
}
else
rdp.tri_n += 2;
}
else
{
rdp.tri_n += 2;
@ -2721,12 +2695,9 @@ static void RestoreScale()
rdp.view_trans[1] *= rdp.scale_y;
rdp.update |= UPDATE_VIEWPORT | UPDATE_SCISSOR;
//*
if (fullscreen)
{
grDepthMask(FXFALSE);
grBufferClear(0, 0, 0xFFFF);
grDepthMask(FXTRUE);
}
//*/
}
@ -3129,8 +3100,6 @@ static void rsp_reserved3()
void SetWireframeCol()
{
if (!fullscreen) return;
switch (settings.wfmode)
{
//case 0: // normal colors, don't do anything
@ -3902,8 +3871,6 @@ void lle_triangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer,
}
}
if (fullscreen)
{
update();
for (int k = 0; k < nbVtxs - 1; k++)
{
@ -3986,7 +3953,6 @@ void lle_triangle(uint32_t w1, uint32_t w2, int shade, int texture, int zbuffer,
}
}
}
}
static void rdp_triangle(int shade, int texture, int zbuffer)
{
@ -4231,8 +4197,6 @@ void CALL ProcessRDPList(void)
SoftLocker lock(mutexProcessDList);
if (!lock.IsOk()) //mutex is busy
{
if (!fullscreen)
drawNoFullscreenMessage();
// Set an interrupt to allow the game to continue
*gfx.MI_INTR_REG |= 0x20;
gfx.CheckInterrupts();

View File

@ -246,7 +246,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
void DrawDepthImage(const DRAWIMAGE & d)
{
if (!fullscreen || !fb_depth_render_enabled)
if (!fb_depth_render_enabled)
return;
if (d.imageH > d.imageW)
return;
@ -442,8 +442,6 @@ void DrawImage(DRAWIMAGE & d)
if (rdp.cycle_mode == 2)
rdp.allow_combine = 0;
if (fullscreen)
{
if (rdp.ci_width == 512 && !no_dlist)
grClipWindow(0, 0, settings.scr_res_x, settings.scr_res_y);
else if (d.scaleX == 1.0f && d.scaleY == 1.0f)
@ -451,7 +449,6 @@ void DrawImage(DRAWIMAGE & d)
else
grClipWindow(rdp.scissor.ul_x, rdp.scissor.ul_y, min(rdp.scissor.lr_x, (uint32_t)((d.frameX + d.imageW / d.scaleX + 0.5f)*rdp.scale_x)), min(rdp.scissor.lr_y, (uint32_t)((d.frameY + d.imageH / d.scaleY + 0.5f)*rdp.scale_y)));
rdp.update |= UPDATE_SCISSOR;
}
// Texture ()
rdp.cur_tile = 0;
@ -548,7 +545,6 @@ void DrawImage(DRAWIMAGE & d)
apply_shade_mods(&(v[s]));
ConvertCoordsConvert(v, 4);
if (fullscreen)
grDrawVertexArrayContiguous(GR_TRIANGLE_STRIP, 4, v, sizeof(VERTEX));
if (_debugger.capture)
@ -605,8 +601,6 @@ void DrawImage(DRAWIMAGE & d)
void DrawHiresImage(DRAWIMAGE & d, int screensize = FALSE)
{
if (!fullscreen)
return;
TBUFF_COLOR_IMAGE *tbuff_tex = rdp.tbuff_tex;
if (rdp.motionblur)
rdp.tbuff_tex = &(rdp.texbufs[rdp.cur_tex_buf ^ 1].images[0]);
@ -985,7 +979,7 @@ static void uc6_draw_polygons(VERTEX v[4])
}
rdp.update |= UPDATE_ZBUF_ENABLED | UPDATE_VIEWPORT;
if (fullscreen && settings.fog && (rdp.flags & FOG_ENABLED))
if (settings.fog && (rdp.flags & FOG_ENABLED))
{
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
}
@ -1698,7 +1692,7 @@ void uc6_sprite2d()
}
rdp.update |= UPDATE_ZBUF_ENABLED | UPDATE_VIEWPORT;
if (fullscreen && settings.fog && (rdp.flags & FOG_ENABLED))
if (settings.fog && (rdp.flags & FOG_ENABLED))
{
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
}