[Glide64] rename fullscreen to GfxInitDone
This commit is contained in:
parent
5a4ea8ad1f
commit
2b9cdb12c3
|
@ -15574,12 +15574,9 @@ void Combine()
|
||||||
if (cmb.cmb_ext_use || cmb.tex_cmb_ext_use)
|
if (cmb.cmb_ext_use || cmb.tex_cmb_ext_use)
|
||||||
{
|
{
|
||||||
//have to draw something to allow use of standard combine functions
|
//have to draw something to allow use of standard combine functions
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
VERTEX v;
|
VERTEX v;
|
||||||
memset(&v, 0, sizeof(v));
|
memset(&v, 0, sizeof(v));
|
||||||
grDrawPoint(&v);
|
grDrawPoint(&v);
|
||||||
}
|
|
||||||
cmb.cmb_ext_use = 0;
|
cmb.cmb_ext_use = 0;
|
||||||
cmb.tex_cmb_ext_use = 0;
|
cmb.tex_cmb_ext_use = 0;
|
||||||
}
|
}
|
||||||
|
@ -15737,8 +15734,6 @@ void Combine()
|
||||||
//*/
|
//*/
|
||||||
rdp.tex = cmb.tex;
|
rdp.tex = cmb.tex;
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
TBUFF_COLOR_IMAGE * aTBuff[2] = { 0, 0 };
|
TBUFF_COLOR_IMAGE * aTBuff[2] = { 0, 0 };
|
||||||
if (rdp.aTBuffTex[0])
|
if (rdp.aTBuffTex[0])
|
||||||
aTBuff[rdp.aTBuffTex[0]->tile] = rdp.aTBuffTex[0];
|
aTBuff[rdp.aTBuffTex[0]->tile] = rdp.aTBuffTex[0];
|
||||||
|
@ -15791,7 +15786,6 @@ void Combine()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
grChromakeyMode(GR_CHROMAKEY_DISABLE);
|
grChromakeyMode(GR_CHROMAKEY_DISABLE);
|
||||||
}
|
|
||||||
cmb.shade_mod_hash = (rdp.cmb_flags + rdp.cmb_flags_2) * (rdp.prim_color + rdp.env_color + rdp.K5);
|
cmb.shade_mod_hash = (rdp.cmb_flags + rdp.cmb_flags_2) * (rdp.prim_color + rdp.env_color + rdp.K5);
|
||||||
|
|
||||||
LRDP(" | + Combine end\n");
|
LRDP(" | + Combine end\n");
|
||||||
|
|
|
@ -170,7 +170,7 @@ wxNotebook(parent, id, pos, size, 0)
|
||||||
#ifdef TEXTURE_FILTER
|
#ifdef TEXTURE_FILTER
|
||||||
if (settings.texenh_options)
|
if (settings.texenh_options)
|
||||||
{
|
{
|
||||||
if (!fullscreen)
|
if (!GfxInitDone)
|
||||||
{
|
{
|
||||||
grGlideInit();
|
grGlideInit();
|
||||||
grSstSelect(settings.card_id);
|
grSstSelect(settings.card_id);
|
||||||
|
@ -184,7 +184,7 @@ wxNotebook(parent, id, pos, size, 0)
|
||||||
voodoo.sup_32bit_tex = TRUE;
|
voodoo.sup_32bit_tex = TRUE;
|
||||||
else
|
else
|
||||||
voodoo.sup_32bit_tex = FALSE;
|
voodoo.sup_32bit_tex = FALSE;
|
||||||
if (!fullscreen)
|
if (!GfxInitDone)
|
||||||
grGlideShutdown();
|
grGlideShutdown();
|
||||||
|
|
||||||
TexturePanel = new wxPanel(this, wxID_ANY);
|
TexturePanel = new wxPanel(this, wxID_ANY);
|
||||||
|
|
|
@ -273,7 +273,7 @@ extern "C" {
|
||||||
__inline void FRDP_E(const char * /*fmt*/, ...) {}
|
__inline void FRDP_E(const char * /*fmt*/, ...) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int fullscreen;
|
extern int GfxInitDone;
|
||||||
extern int romopen;
|
extern int romopen;
|
||||||
extern int to_fullscreen;
|
extern int to_fullscreen;
|
||||||
extern int debugging;
|
extern int debugging;
|
||||||
|
|
|
@ -80,7 +80,7 @@ GFX_INFO gfx;
|
||||||
wxWindow * GFXWindow = NULL;
|
wxWindow * GFXWindow = NULL;
|
||||||
|
|
||||||
int to_fullscreen = FALSE;
|
int to_fullscreen = FALSE;
|
||||||
int fullscreen = FALSE;
|
int GfxInitDone = FALSE;
|
||||||
int romopen = FALSE;
|
int romopen = FALSE;
|
||||||
GrContext_t gfx_context = 0;
|
GrContext_t gfx_context = 0;
|
||||||
int debugging = FALSE;
|
int debugging = FALSE;
|
||||||
|
@ -799,8 +799,6 @@ void DisplayLoadProgress(const wchar_t *format, ...)
|
||||||
// XXX: convert to multibyte
|
// XXX: convert to multibyte
|
||||||
wcstombs(buf, wbuf, INFO_BUF);
|
wcstombs(buf, wbuf, INFO_BUF);
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
float x;
|
float x;
|
||||||
set_message_combiner();
|
set_message_combiner();
|
||||||
output(382, 380, 1, "LOADING TEXTURES. PLEASE WAIT...");
|
output(382, 380, 1, "LOADING TEXTURES. PLEASE WAIT...");
|
||||||
|
@ -811,13 +809,14 @@ void DisplayLoadProgress(const wchar_t *format, ...)
|
||||||
grColorMask(FXTRUE, FXTRUE);
|
grColorMask(FXTRUE, FXTRUE);
|
||||||
grBufferClear(0, 0, 0xFFFF);
|
grBufferClear(0, 0, 0xFFFF);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int InitGfx()
|
int InitGfx()
|
||||||
{
|
{
|
||||||
if (fullscreen)
|
if (GfxInitDone)
|
||||||
|
{
|
||||||
ReleaseGfx();
|
ReleaseGfx();
|
||||||
|
}
|
||||||
|
|
||||||
OPEN_RDP_LOG(); // doesn't matter if opens again; it will check for it
|
OPEN_RDP_LOG(); // doesn't matter if opens again; it will check for it
|
||||||
OPEN_RDP_E_LOG();
|
OPEN_RDP_E_LOG();
|
||||||
|
@ -929,7 +928,7 @@ int InitGfx()
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
fullscreen = TRUE;
|
GfxInitDone = TRUE;
|
||||||
to_fullscreen = FALSE;
|
to_fullscreen = FALSE;
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
|
@ -1132,7 +1131,7 @@ void ReleaseGfx()
|
||||||
// Shutdown glide
|
// Shutdown glide
|
||||||
grGlideShutdown();
|
grGlideShutdown();
|
||||||
|
|
||||||
fullscreen = FALSE;
|
GfxInitDone = FALSE;
|
||||||
rdp.window_changed = TRUE;
|
rdp.window_changed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1233,21 +1232,6 @@ void CALL ReadScreen(void **dest, int *width, int *height)
|
||||||
uint8_t * line = buff;
|
uint8_t * line = buff;
|
||||||
*dest = (void*)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;
|
GrLfbInfo_t info;
|
||||||
info.size = sizeof(GrLfbInfo_t);
|
info.size = sizeof(GrLfbInfo_t);
|
||||||
if (grLfbLock(GR_LFB_READ_ONLY,
|
if (grLfbLock(GR_LFB_READ_ONLY,
|
||||||
|
@ -1362,7 +1346,7 @@ EXPORT void CALL ChangeWindow(void)
|
||||||
// Go to fullscreen at next dlist
|
// Go to fullscreen at next dlist
|
||||||
// This is for compatibility with 1964, which reloads the plugin
|
// This is for compatibility with 1964, which reloads the plugin
|
||||||
// when switching to fullscreen
|
// when switching to fullscreen
|
||||||
if (!fullscreen)
|
if (!GfxInitDone)
|
||||||
{
|
{
|
||||||
to_fullscreen = TRUE;
|
to_fullscreen = TRUE;
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
|
@ -1420,7 +1404,6 @@ void CALL CloseDLL(void)
|
||||||
settings.ghq_use = 0;
|
settings.ghq_use = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (fullscreen)
|
|
||||||
ReleaseGfx();
|
ReleaseGfx();
|
||||||
ZLUT_release();
|
ZLUT_release();
|
||||||
ClearCache();
|
ClearCache();
|
||||||
|
@ -1688,7 +1671,7 @@ void CALL RomClosed(void)
|
||||||
CLOSE_RDP_E_LOG();
|
CLOSE_RDP_E_LOG();
|
||||||
rdp.window_changed = TRUE;
|
rdp.window_changed = TRUE;
|
||||||
romopen = FALSE;
|
romopen = FALSE;
|
||||||
if (fullscreen && evoodoo)
|
if (evoodoo)
|
||||||
ReleaseGfx();
|
ReleaseGfx();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1777,14 +1760,12 @@ void CALL RomOpen(void)
|
||||||
OPEN_RDP_E_LOG();
|
OPEN_RDP_E_LOG();
|
||||||
|
|
||||||
// ** EVOODOO EXTENSIONS **
|
// ** EVOODOO EXTENSIONS **
|
||||||
if (!fullscreen)
|
if (!GfxInitDone)
|
||||||
{
|
{
|
||||||
grGlideInit();
|
grGlideInit();
|
||||||
grSstSelect(0);
|
grSstSelect(0);
|
||||||
}
|
}
|
||||||
const char *extensions = grGetString(GR_EXTENSION);
|
const char *extensions = grGetString(GR_EXTENSION);
|
||||||
if (!fullscreen)
|
|
||||||
{
|
|
||||||
grGlideShutdown();
|
grGlideShutdown();
|
||||||
|
|
||||||
if (strstr(extensions, "EVOODOO"))
|
if (strstr(extensions, "EVOODOO"))
|
||||||
|
@ -1794,7 +1775,6 @@ void CALL RomOpen(void)
|
||||||
|
|
||||||
if (evoodoo)
|
if (evoodoo)
|
||||||
InitGfx();
|
InitGfx();
|
||||||
}
|
|
||||||
|
|
||||||
if (strstr(extensions, "ROMNAME"))
|
if (strstr(extensions, "ROMNAME"))
|
||||||
{
|
{
|
||||||
|
@ -1857,21 +1837,14 @@ void drawNoFullscreenMessage();
|
||||||
|
|
||||||
static void DrawFrameBuffer()
|
static void DrawFrameBuffer()
|
||||||
{
|
{
|
||||||
if (!fullscreen)
|
|
||||||
{
|
|
||||||
drawNoFullscreenMessage();
|
|
||||||
}
|
|
||||||
if (to_fullscreen)
|
if (to_fullscreen)
|
||||||
GoToFullScreen();
|
GoToFullScreen();
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
grDepthMask(FXTRUE);
|
grDepthMask(FXTRUE);
|
||||||
grColorMask(FXTRUE, FXTRUE);
|
grColorMask(FXTRUE, FXTRUE);
|
||||||
grBufferClear(0, 0, 0xFFFF);
|
grBufferClear(0, 0, 0xFFFF);
|
||||||
drawViRegBG();
|
drawViRegBG();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
Function: UpdateScreen
|
Function: UpdateScreen
|
||||||
|
@ -1896,9 +1869,10 @@ void CALL UpdateScreen(void)
|
||||||
LRDP(out_buf);
|
LRDP(out_buf);
|
||||||
|
|
||||||
uint32_t width = (*gfx.VI_WIDTH_REG) << 1;
|
uint32_t width = (*gfx.VI_WIDTH_REG) << 1;
|
||||||
if (fullscreen && (*gfx.VI_ORIGIN_REG > width))
|
if (*gfx.VI_ORIGIN_REG > width)
|
||||||
|
{
|
||||||
update_screen_count++;
|
update_screen_count++;
|
||||||
|
}
|
||||||
#ifdef FPS
|
#ifdef FPS
|
||||||
// vertical interrupt has occurred, increment counter
|
// vertical interrupt has occurred, increment counter
|
||||||
vi_count++;
|
vi_count++;
|
||||||
|
@ -1998,9 +1972,6 @@ void newSwapBuffers()
|
||||||
|
|
||||||
LRDP("swapped\n");
|
LRDP("swapped\n");
|
||||||
|
|
||||||
// Allow access to the whole screen
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
rdp.update |= UPDATE_SCISSOR | UPDATE_COMBINE | UPDATE_ZBUF_ENABLED | UPDATE_CULL_MODE;
|
rdp.update |= UPDATE_SCISSOR | UPDATE_COMBINE | UPDATE_ZBUF_ENABLED | UPDATE_CULL_MODE;
|
||||||
grClipWindow(0, 0, settings.scr_res_x, settings.scr_res_y);
|
grClipWindow(0, 0, settings.scr_res_x, settings.scr_res_y);
|
||||||
grDepthBufferFunction(GR_CMP_ALWAYS);
|
grDepthBufferFunction(GR_CMP_ALWAYS);
|
||||||
|
@ -2108,7 +2079,6 @@ void newSwapBuffers()
|
||||||
}
|
}
|
||||||
output(120.0f, 0.0f, 1, message, 0);
|
output(120.0f, 0.0f, 1, message, 0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (capture_screen)
|
if (capture_screen)
|
||||||
{
|
{
|
||||||
|
@ -2243,7 +2213,7 @@ void newSwapBuffers()
|
||||||
grLfbUnlock(GR_LFB_READ_ONLY, GR_BUFFER_BACKBUFFER);
|
grLfbUnlock(GR_LFB_READ_ONLY, GR_BUFFER_BACKBUFFER);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullscreen && debugging)
|
if (debugging)
|
||||||
{
|
{
|
||||||
debug_keys();
|
debug_keys();
|
||||||
debug_cacheviewer();
|
debug_cacheviewer();
|
||||||
|
@ -2253,8 +2223,6 @@ void newSwapBuffers()
|
||||||
if (settings.frame_buffer & fb_read_back_to_screen)
|
if (settings.frame_buffer & fb_read_back_to_screen)
|
||||||
DrawWholeFrameBufferToScreen();
|
DrawWholeFrameBufferToScreen();
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
if (fb_hwfbe_enabled && !(settings.hacks&hack_RE2) && !evoodoo)
|
if (fb_hwfbe_enabled && !(settings.hacks&hack_RE2) && !evoodoo)
|
||||||
grAuxBufferExt(GR_BUFFER_AUXBUFFER);
|
grAuxBufferExt(GR_BUFFER_AUXBUFFER);
|
||||||
LOG("BUFFER SWAPPED\n");
|
LOG("BUFFER SWAPPED\n");
|
||||||
|
@ -2281,13 +2249,10 @@ void newSwapBuffers()
|
||||||
voodoo.gamma_correction = 0;
|
voodoo.gamma_correction = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (_debugger.capture)
|
if (_debugger.capture)
|
||||||
debug_capture();
|
debug_capture();
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
if (debugging || settings.wireframe || settings.buff_clear || (settings.hacks&hack_PPL && settings.ucode == 6))
|
if (debugging || settings.wireframe || settings.buff_clear || (settings.hacks&hack_PPL && settings.ucode == 6))
|
||||||
{
|
{
|
||||||
if (settings.hacks&hack_RE2 && fb_depth_render_enabled)
|
if (settings.hacks&hack_RE2 && fb_depth_render_enabled)
|
||||||
|
@ -2305,11 +2270,11 @@ void newSwapBuffers()
|
||||||
grColorMask (FXTRUE, FXTRUE);
|
grColorMask (FXTRUE, FXTRUE);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
|
||||||
|
|
||||||
if (settings.frame_buffer & fb_read_back_to_screen2)
|
if (settings.frame_buffer & fb_read_back_to_screen2)
|
||||||
|
{
|
||||||
DrawWholeFrameBufferToScreen();
|
DrawWholeFrameBufferToScreen();
|
||||||
|
}
|
||||||
frame_count++;
|
frame_count++;
|
||||||
|
|
||||||
// Open/close debugger?
|
// Open/close debugger?
|
||||||
|
@ -2374,10 +2339,10 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
switch (msg)
|
switch (msg)
|
||||||
{
|
{
|
||||||
case WM_ACTIVATEAPP:
|
case WM_ACTIVATEAPP:
|
||||||
if (wParam == TRUE && !fullscreen) rdp.window_changed = TRUE;
|
if (wParam == TRUE && !GfxInitDone) rdp.window_changed = TRUE;
|
||||||
break;
|
break;
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
if (!fullscreen) rdp.window_changed = TRUE;
|
if (!GfxInitDone) rdp.window_changed = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* case WM_DESTROY:
|
/* case WM_DESTROY:
|
||||||
|
|
|
@ -210,7 +210,6 @@ static TBUFF_COLOR_IMAGE * AllocateTextureBuffer(COLOR_IMAGE & cimage)
|
||||||
int OpenTextureBuffer(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);
|
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;
|
int found = FALSE, search = TRUE;
|
||||||
TBUFF_COLOR_IMAGE *texbuf = 0;
|
TBUFF_COLOR_IMAGE *texbuf = 0;
|
||||||
|
@ -419,7 +418,7 @@ static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
|
||||||
|
|
||||||
int CloseTextureBuffer(int draw)
|
int CloseTextureBuffer(int draw)
|
||||||
{
|
{
|
||||||
if (!fullscreen || !rdp.cur_image)
|
if (!rdp.cur_image)
|
||||||
{
|
{
|
||||||
LRDP("CloseTextureBuffer KO\n");
|
LRDP("CloseTextureBuffer KO\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -471,8 +470,6 @@ int CloseTextureBuffer(int draw)
|
||||||
|
|
||||||
int CopyTextureBuffer(COLOR_IMAGE & fb_from, COLOR_IMAGE & fb_to)
|
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);
|
FRDP("CopyTextureBuffer from %08x to %08x\n", fb_from.addr, fb_to.addr);
|
||||||
if (rdp.cur_image)
|
if (rdp.cur_image)
|
||||||
{
|
{
|
||||||
|
@ -537,8 +534,6 @@ int CopyTextureBuffer(COLOR_IMAGE & fb_from, COLOR_IMAGE & fb_to)
|
||||||
|
|
||||||
int CopyDepthBuffer()
|
int CopyDepthBuffer()
|
||||||
{
|
{
|
||||||
if (!fullscreen)
|
|
||||||
return FALSE;
|
|
||||||
LRDP("CopyDepthBuffer. ");
|
LRDP("CopyDepthBuffer. ");
|
||||||
float bound = 1024.0f;
|
float bound = 1024.0f;
|
||||||
GrLOD_t LOD = GR_LOD_LOG2_1024;
|
GrLOD_t LOD = GR_LOD_LOG2_1024;
|
||||||
|
@ -592,7 +587,7 @@ int CopyDepthBuffer()
|
||||||
|
|
||||||
int SwapTextureBuffer()
|
int SwapTextureBuffer()
|
||||||
{
|
{
|
||||||
if (!fullscreen || !rdp.tbuff_tex)
|
if (!rdp.tbuff_tex)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
LRDP("SwapTextureBuffer.");
|
LRDP("SwapTextureBuffer.");
|
||||||
COLOR_IMAGE ci;
|
COLOR_IMAGE ci;
|
||||||
|
|
|
@ -501,7 +501,6 @@ void GetTexInfo(int id, int tile)
|
||||||
|
|
||||||
int ChooseBestTmu(int tmu1, int tmu2)
|
int ChooseBestTmu(int tmu1, int tmu2)
|
||||||
{
|
{
|
||||||
if (!fullscreen) return tmu1;
|
|
||||||
if (voodoo.tex_UMA) return 0;
|
if (voodoo.tex_UMA) return 0;
|
||||||
|
|
||||||
if (tmu1 >= voodoo.num_tmu) return tmu2;
|
if (tmu1 >= voodoo.num_tmu) return tmu2;
|
||||||
|
@ -733,8 +732,6 @@ void TexCache()
|
||||||
rdp.t1 = tmu_1;
|
rdp.t1 = tmu_1;
|
||||||
|
|
||||||
// SET the combiner
|
// SET the combiner
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
if (rdp.allow_combine)
|
if (rdp.allow_combine)
|
||||||
{
|
{
|
||||||
// Now actually combine
|
// Now actually combine
|
||||||
|
@ -821,25 +818,19 @@ void TexCache()
|
||||||
grTexDetailControl(tmu_0, cmb.dc0_lodbias, cmb.dc0_detailscale, cmb.dc0_detailmax);
|
grTexDetailControl(tmu_0, cmb.dc0_lodbias, cmb.dc0_detailscale, cmb.dc0_detailmax);
|
||||||
grTexLodBiasValue(tmu_0, cmb.lodbias0);
|
grTexLodBiasValue(tmu_0, cmb.lodbias0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ((rdp.tex & 1) && tmu_0 < voodoo.num_tmu)
|
if ((rdp.tex & 1) && tmu_0 < voodoo.num_tmu)
|
||||||
{
|
{
|
||||||
if (aTBuff[0] && aTBuff[0]->cache)
|
if (aTBuff[0] && aTBuff[0]->cache)
|
||||||
{
|
{
|
||||||
LRDP(" | |- Hires tex T0 found in cache.\n");
|
LRDP(" | |- Hires tex T0 found in cache.\n");
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
rdp.cur_cache[0] = aTBuff[0]->cache;
|
rdp.cur_cache[0] = aTBuff[0]->cache;
|
||||||
rdp.cur_cache[0]->last_used = frame_count;
|
rdp.cur_cache[0]->last_used = frame_count;
|
||||||
rdp.cur_cache[0]->uses = rdp.debug_n;
|
rdp.cur_cache[0]->uses = rdp.debug_n;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (tex_found[0][tmu_0] != -1)
|
else if (tex_found[0][tmu_0] != -1)
|
||||||
{
|
{
|
||||||
LRDP(" | |- T0 found in cache.\n");
|
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]];
|
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_n[0] = tex_found[0][tmu_0];
|
||||||
rdp.cur_cache[0] = cache;
|
rdp.cur_cache[0] = cache;
|
||||||
|
@ -850,7 +841,6 @@ void TexCache()
|
||||||
GR_MIPMAPLEVELMASK_BOTH,
|
GR_MIPMAPLEVELMASK_BOTH,
|
||||||
&cache->t_info);
|
&cache->t_info);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
LoadTex(0, tmu_0);
|
LoadTex(0, tmu_0);
|
||||||
}
|
}
|
||||||
|
@ -859,18 +849,13 @@ void TexCache()
|
||||||
if (aTBuff[1] && aTBuff[1]->cache)
|
if (aTBuff[1] && aTBuff[1]->cache)
|
||||||
{
|
{
|
||||||
LRDP(" | |- Hires tex T1 found in cache.\n");
|
LRDP(" | |- Hires tex T1 found in cache.\n");
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
rdp.cur_cache[1] = aTBuff[1]->cache;
|
rdp.cur_cache[1] = aTBuff[1]->cache;
|
||||||
rdp.cur_cache[1]->last_used = frame_count;
|
rdp.cur_cache[1]->last_used = frame_count;
|
||||||
rdp.cur_cache[1]->uses = rdp.debug_n;
|
rdp.cur_cache[1]->uses = rdp.debug_n;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (tex_found[1][tmu_1] != -1)
|
else if (tex_found[1][tmu_1] != -1)
|
||||||
{
|
{
|
||||||
LRDP(" | |- T1 found in cache.\n");
|
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]];
|
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_n[1] = tex_found[1][tmu_1];
|
||||||
rdp.cur_cache[1] = cache;
|
rdp.cur_cache[1] = cache;
|
||||||
|
@ -881,13 +866,10 @@ void TexCache()
|
||||||
GR_MIPMAPLEVELMASK_BOTH,
|
GR_MIPMAPLEVELMASK_BOTH,
|
||||||
&cache->t_info);
|
&cache->t_info);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
LoadTex(1, tmu_1);
|
LoadTex(1, tmu_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
int tmu_v[2];
|
int tmu_v[2];
|
||||||
|
|
||||||
tmu_v[0] = tmu_0;
|
tmu_v[0] = tmu_0;
|
||||||
|
@ -963,7 +945,6 @@ void TexCache()
|
||||||
if (aTBuff[i] && (rdp.tex&(i + 1)))
|
if (aTBuff[i] && (rdp.tex&(i + 1)))
|
||||||
SelectTBuffTex(aTBuff[i]);
|
SelectTBuffTex(aTBuff[i]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
LRDP(" | +- TexCache End\n");
|
LRDP(" | +- TexCache End\n");
|
||||||
}
|
}
|
||||||
|
@ -1623,8 +1604,6 @@ void LoadTex(int id, int tmu)
|
||||||
cache->lod = lod;
|
cache->lod = lod;
|
||||||
cache->aspect = aspect;
|
cache->aspect = aspect;
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
#ifdef TEXTURE_FILTER // Hiroshi Morii <koolsmoky@users.sourceforge.net>
|
#ifdef TEXTURE_FILTER // Hiroshi Morii <koolsmoky@users.sourceforge.net>
|
||||||
if (settings.ghq_use)
|
if (settings.ghq_use)
|
||||||
{
|
{
|
||||||
|
@ -1783,7 +1762,6 @@ void LoadTex(int id, int tmu)
|
||||||
cache->realheight = real_y;
|
cache->realheight = real_y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Load the texture into texture memory
|
// Load the texture into texture memory
|
||||||
|
|
|
@ -1620,8 +1620,6 @@ static void render_tri(uint16_t linew, int old_interpolate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
if (settings.wireframe)
|
if (settings.wireframe)
|
||||||
{
|
{
|
||||||
SetWireframeCol();
|
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));
|
grDrawVertexArray(GR_TRIANGLE_FAN, n, rdp.vtx_buffer ? (&vtx_list2) : (&vtx_list1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (_debugger.capture) add_tri(rdp.vtxbuf, n, TRI_TRIANGLE);
|
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.
|
//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.
|
//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);
|
// 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);
|
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,
|
FRDP(" |- scissor - (%d, %d) -> (%d, %d)\n", rdp.scissor.ul_x, rdp.scissor.ul_y, rdp.scissor.lr_x, rdp.scissor.lr_y);
|
||||||
rdp.scissor.lr_x, rdp.scissor.lr_y);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1910,8 +1905,6 @@ void update()
|
||||||
rdp.update ^= UPDATE_TEXTURE;
|
rdp.update ^= UPDATE_TEXTURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
// Z buffer
|
// Z buffer
|
||||||
if (rdp.update & UPDATE_ZBUF_ENABLED)
|
if (rdp.update & UPDATE_ZBUF_ENABLED)
|
||||||
{
|
{
|
||||||
|
@ -2095,13 +2088,10 @@ void update()
|
||||||
grFogMode(GR_FOG_DISABLE);
|
grFogMode(GR_FOG_DISABLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (rdp.update & UPDATE_VIEWPORT)
|
if (rdp.update & UPDATE_VIEWPORT)
|
||||||
{
|
{
|
||||||
rdp.update ^= UPDATE_VIEWPORT;
|
rdp.update ^= UPDATE_VIEWPORT;
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
float scale_x = (float)fabs(rdp.view_scale[0]);
|
float scale_x = (float)fabs(rdp.view_scale[0]);
|
||||||
float scale_y = (float)fabs(rdp.view_scale[1]);
|
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);
|
grClipWindow(rdp.scissor.ul_x, rdp.scissor.ul_y, rdp.scissor.lr_x, rdp.scissor.lr_y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (rdp.update & UPDATE_SCISSOR)
|
if (rdp.update & UPDATE_SCISSOR)
|
||||||
|
{
|
||||||
update_scissor();
|
update_scissor();
|
||||||
|
}
|
||||||
|
|
||||||
LRDP(" + update end\n");
|
LRDP(" + update end\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -459,8 +459,6 @@ static void copyWhiteToRDRAM()
|
||||||
|
|
||||||
static void CopyFrameBuffer(GrBuffer_t buffer = GR_BUFFER_BACKBUFFER)
|
static void CopyFrameBuffer(GrBuffer_t buffer = GR_BUFFER_BACKBUFFER)
|
||||||
{
|
{
|
||||||
if (!fullscreen)
|
|
||||||
return;
|
|
||||||
FRDP("CopyFrameBuffer: %08lx... ", rdp.cimg);
|
FRDP("CopyFrameBuffer: %08lx... ", rdp.cimg);
|
||||||
|
|
||||||
// don't bother to write the stuff in asm... the slow part is the read from video card,
|
// 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);
|
SoftLocker lock(mutexProcessDList);
|
||||||
if (!lock.IsOk()) //mutex is busy
|
if (!lock.IsOk()) //mutex is busy
|
||||||
{
|
{
|
||||||
if (!fullscreen)
|
|
||||||
drawNoFullscreenMessage();
|
|
||||||
// Set an interrupt to allow the game to continue
|
// Set an interrupt to allow the game to continue
|
||||||
*gfx.MI_INTR_REG |= 0x20;
|
*gfx.MI_INTR_REG |= 0x20;
|
||||||
gfx.CheckInterrupts();
|
gfx.CheckInterrupts();
|
||||||
|
@ -675,14 +671,6 @@ EXPORT void CALL ProcessDList(void)
|
||||||
|
|
||||||
LOG("ProcessDList ()\n");
|
LOG("ProcessDList ()\n");
|
||||||
|
|
||||||
if (!fullscreen)
|
|
||||||
{
|
|
||||||
drawNoFullscreenMessage();
|
|
||||||
// Set an interrupt to allow the game to continue
|
|
||||||
*gfx.MI_INTR_REG |= 0x20;
|
|
||||||
gfx.CheckInterrupts();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reset)
|
if (reset)
|
||||||
{
|
{
|
||||||
reset = 0;
|
reset = 0;
|
||||||
|
@ -710,9 +698,6 @@ EXPORT void CALL ProcessDList(void)
|
||||||
if (to_fullscreen)
|
if (to_fullscreen)
|
||||||
GoToFullScreen();
|
GoToFullScreen();
|
||||||
|
|
||||||
if (!fullscreen && !settings.run_in_window)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Clear out the RDP log
|
// Clear out the RDP log
|
||||||
#ifdef RDP_LOGGING
|
#ifdef RDP_LOGGING
|
||||||
if (settings.logging && settings.log_clear)
|
if (settings.logging && settings.log_clear)
|
||||||
|
@ -860,7 +845,8 @@ EXPORT void CALL ProcessDList(void)
|
||||||
} while (!rdp.halt);
|
} while (!rdp.halt);
|
||||||
}
|
}
|
||||||
#ifdef CATCH_EXCEPTIONS
|
#ifdef CATCH_EXCEPTIONS
|
||||||
} catch (...) {
|
}
|
||||||
|
catch (...) {
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
{
|
{
|
||||||
ReleaseGfx ();
|
ReleaseGfx ();
|
||||||
|
@ -1510,8 +1496,6 @@ static void rdp_texrect()
|
||||||
apply_shade_mods(&vptr[i]);
|
apply_shade_mods(&vptr[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
if (rdp.fog_mode >= RDP::fog_blend)
|
if (rdp.fog_mode >= RDP::fog_blend)
|
||||||
{
|
{
|
||||||
float fog;
|
float fog;
|
||||||
|
@ -1558,11 +1542,6 @@ static void rdp_texrect()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rdp.tri_n += 2;
|
rdp.tri_n += 2;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rdp.tri_n += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
delete[] vnew;
|
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)
|
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");
|
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
|
if (!(settings.hacks&hack_Hyperbike) || rdp.ci_width > 64) //do not clear main depth buffer for aux depth buffers
|
||||||
{
|
{
|
||||||
update_scissor();
|
update_scissor();
|
||||||
|
@ -2395,7 +2372,6 @@ static void rdp_fillrect()
|
||||||
}
|
}
|
||||||
dst += zi_width_in_dwords;
|
dst += zi_width_in_dwords;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2425,7 +2401,6 @@ static void rdp_fillrect()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update scissor
|
// Update scissor
|
||||||
if (fullscreen)
|
|
||||||
update_scissor();
|
update_scissor();
|
||||||
|
|
||||||
if (settings.decrease_fillrect_edge && rdp.cycle_mode == 0)
|
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);
|
FRDP(" - %d, %d, %d, %d\n", s_ul_x, s_ul_y, s_lr_x, s_lr_y);
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
grFogMode(GR_FOG_DISABLE);
|
grFogMode(GR_FOG_DISABLE);
|
||||||
|
|
||||||
const float Z = (rdp.cycle_mode == 3) ? 0.0f : set_sprite_combine_mode();
|
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);
|
grAlphaTestFunction(GR_CMP_ALWAYS);
|
||||||
if (grStippleModeExt)
|
if (grStippleModeExt)
|
||||||
|
{
|
||||||
grStippleModeExt(GR_STIPPLE_DISABLE);
|
grStippleModeExt(GR_STIPPLE_DISABLE);
|
||||||
|
}
|
||||||
|
|
||||||
grCullMode(GR_CULL_DISABLE);
|
grCullMode(GR_CULL_DISABLE);
|
||||||
grFogMode(GR_FOG_DISABLE);
|
grFogMode(GR_FOG_DISABLE);
|
||||||
|
@ -2517,8 +2492,10 @@ static void rdp_fillrect()
|
||||||
{
|
{
|
||||||
AllowShadeMods(v, 4);
|
AllowShadeMods(v, 4);
|
||||||
for (int k = 0; k < 4; k++)
|
for (int k = 0; k < 4; k++)
|
||||||
|
{
|
||||||
apply_shade_mods(&v[k]);
|
apply_shade_mods(&v[k]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ((rdp.othermode_l & 0x4000) && ((rdp.othermode_l >> 16) == 0x0550)) //special blender mode for Bomberman64
|
if ((rdp.othermode_l & 0x4000) && ((rdp.othermode_l >> 16) == 0x0550)) //special blender mode for Bomberman64
|
||||||
{
|
{
|
||||||
grAlphaCombine(GR_COMBINE_FUNCTION_LOCAL,
|
grAlphaCombine(GR_COMBINE_FUNCTION_LOCAL,
|
||||||
|
@ -2560,9 +2537,6 @@ static void rdp_fillrect()
|
||||||
add_tri(v1, 3, TRI_FILLRECT);
|
add_tri(v1, 3, TRI_FILLRECT);
|
||||||
rdp.tri_n++;
|
rdp.tri_n++;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
rdp.tri_n += 2;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rdp.tri_n += 2;
|
rdp.tri_n += 2;
|
||||||
|
@ -2721,12 +2695,9 @@ static void RestoreScale()
|
||||||
rdp.view_trans[1] *= rdp.scale_y;
|
rdp.view_trans[1] *= rdp.scale_y;
|
||||||
rdp.update |= UPDATE_VIEWPORT | UPDATE_SCISSOR;
|
rdp.update |= UPDATE_VIEWPORT | UPDATE_SCISSOR;
|
||||||
//*
|
//*
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
grDepthMask(FXFALSE);
|
grDepthMask(FXFALSE);
|
||||||
grBufferClear(0, 0, 0xFFFF);
|
grBufferClear(0, 0, 0xFFFF);
|
||||||
grDepthMask(FXTRUE);
|
grDepthMask(FXTRUE);
|
||||||
}
|
|
||||||
//*/
|
//*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3129,8 +3100,6 @@ static void rsp_reserved3()
|
||||||
|
|
||||||
void SetWireframeCol()
|
void SetWireframeCol()
|
||||||
{
|
{
|
||||||
if (!fullscreen) return;
|
|
||||||
|
|
||||||
switch (settings.wfmode)
|
switch (settings.wfmode)
|
||||||
{
|
{
|
||||||
//case 0: // normal colors, don't do anything
|
//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();
|
update();
|
||||||
for (int k = 0; k < nbVtxs - 1; k++)
|
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)
|
static void rdp_triangle(int shade, int texture, int zbuffer)
|
||||||
{
|
{
|
||||||
|
@ -4231,8 +4197,6 @@ void CALL ProcessRDPList(void)
|
||||||
SoftLocker lock(mutexProcessDList);
|
SoftLocker lock(mutexProcessDList);
|
||||||
if (!lock.IsOk()) //mutex is busy
|
if (!lock.IsOk()) //mutex is busy
|
||||||
{
|
{
|
||||||
if (!fullscreen)
|
|
||||||
drawNoFullscreenMessage();
|
|
||||||
// Set an interrupt to allow the game to continue
|
// Set an interrupt to allow the game to continue
|
||||||
*gfx.MI_INTR_REG |= 0x20;
|
*gfx.MI_INTR_REG |= 0x20;
|
||||||
gfx.CheckInterrupts();
|
gfx.CheckInterrupts();
|
||||||
|
|
|
@ -246,7 +246,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
||||||
|
|
||||||
void DrawDepthImage(const DRAWIMAGE & d)
|
void DrawDepthImage(const DRAWIMAGE & d)
|
||||||
{
|
{
|
||||||
if (!fullscreen || !fb_depth_render_enabled)
|
if (!fb_depth_render_enabled)
|
||||||
return;
|
return;
|
||||||
if (d.imageH > d.imageW)
|
if (d.imageH > d.imageW)
|
||||||
return;
|
return;
|
||||||
|
@ -442,8 +442,6 @@ void DrawImage(DRAWIMAGE & d)
|
||||||
if (rdp.cycle_mode == 2)
|
if (rdp.cycle_mode == 2)
|
||||||
rdp.allow_combine = 0;
|
rdp.allow_combine = 0;
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
{
|
|
||||||
if (rdp.ci_width == 512 && !no_dlist)
|
if (rdp.ci_width == 512 && !no_dlist)
|
||||||
grClipWindow(0, 0, settings.scr_res_x, settings.scr_res_y);
|
grClipWindow(0, 0, settings.scr_res_x, settings.scr_res_y);
|
||||||
else if (d.scaleX == 1.0f && d.scaleY == 1.0f)
|
else if (d.scaleX == 1.0f && d.scaleY == 1.0f)
|
||||||
|
@ -451,7 +449,6 @@ void DrawImage(DRAWIMAGE & d)
|
||||||
else
|
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)));
|
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;
|
rdp.update |= UPDATE_SCISSOR;
|
||||||
}
|
|
||||||
|
|
||||||
// Texture ()
|
// Texture ()
|
||||||
rdp.cur_tile = 0;
|
rdp.cur_tile = 0;
|
||||||
|
@ -548,7 +545,6 @@ void DrawImage(DRAWIMAGE & d)
|
||||||
apply_shade_mods(&(v[s]));
|
apply_shade_mods(&(v[s]));
|
||||||
ConvertCoordsConvert(v, 4);
|
ConvertCoordsConvert(v, 4);
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
grDrawVertexArrayContiguous(GR_TRIANGLE_STRIP, 4, v, sizeof(VERTEX));
|
grDrawVertexArrayContiguous(GR_TRIANGLE_STRIP, 4, v, sizeof(VERTEX));
|
||||||
|
|
||||||
if (_debugger.capture)
|
if (_debugger.capture)
|
||||||
|
@ -605,8 +601,6 @@ void DrawImage(DRAWIMAGE & d)
|
||||||
|
|
||||||
void DrawHiresImage(DRAWIMAGE & d, int screensize = FALSE)
|
void DrawHiresImage(DRAWIMAGE & d, int screensize = FALSE)
|
||||||
{
|
{
|
||||||
if (!fullscreen)
|
|
||||||
return;
|
|
||||||
TBUFF_COLOR_IMAGE *tbuff_tex = rdp.tbuff_tex;
|
TBUFF_COLOR_IMAGE *tbuff_tex = rdp.tbuff_tex;
|
||||||
if (rdp.motionblur)
|
if (rdp.motionblur)
|
||||||
rdp.tbuff_tex = &(rdp.texbufs[rdp.cur_tex_buf ^ 1].images[0]);
|
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;
|
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);
|
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
|
||||||
}
|
}
|
||||||
|
@ -1698,7 +1692,7 @@ void uc6_sprite2d()
|
||||||
}
|
}
|
||||||
rdp.update |= UPDATE_ZBUF_ENABLED | UPDATE_VIEWPORT;
|
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);
|
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue