[Video] move g_scr_res_x, g_scr_res_y, g_res_x, g_res_y in to Renderer.h

This commit is contained in:
zilmar 2017-05-17 18:13:04 +10:00
parent 9e0a875290
commit c324e3b8fb
14 changed files with 19 additions and 29 deletions

View File

@ -11,6 +11,7 @@
* version 2 of the License, or (at your option) any later version. *
* *
****************************************************************************/
#include <Project64-video/Renderer/Renderer.h>
#include <stdarg.h>
#include <string.h>
@ -21,8 +22,6 @@
//
// output - output debugger text
//
extern int g_scr_res_x, g_scr_res_y;
void output(float x, float y, int scale, const char *fmt, ...)
{
float scale_1024 = g_scr_res_x / 1024.0f;
@ -62,4 +61,4 @@ void output(float x, float y, int scale, const char *fmt, ...)
x += 8;
}
}
}

View File

@ -11,13 +11,12 @@
* version 2 of the License, or (at your option) any later version. *
* *
****************************************************************************/
#include <Project64-video/Renderer/Renderer.h>
#include "Gfx_1.3.h"
#include "FBtoScreen.h"
#include "TexCache.h"
#include <Project64-video/trace.h>
extern int g_scr_res_x, g_scr_res_y;
static int SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaque)
{
int tmu;
@ -280,7 +279,7 @@ bool DrawFrameBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
uint32_t width = fb_info.lr_x - fb_info.ul_x + 1;
uint32_t height = fb_info.lr_y - fb_info.ul_y + 1;
uint32_t max_size = minval(voodoo.max_tex_size, 512);
if (width >(uint32_t)max_size || height > (uint32_t)max_size)
if (width > (uint32_t)max_size || height > (uint32_t)max_size)
{
DrawFrameBufferToScreen256(fb_info);
return true;

View File

@ -101,8 +101,6 @@ static unsigned long g_windowedExStyle, g_windowedStyle;
bool g_fullscreen;
#endif // _WIN32
extern int g_scr_res_x, g_res_x, g_scr_res_y, g_res_y;
void ChangeSize()
{
WriteTrace(TraceResolution, TraceDebug, "Start");

View File

@ -139,8 +139,7 @@ typedef struct
} fb;
int nbAuxBuffers, current_buffer;
int g_scr_res_x, g_width, widtho, heighto, g_scr_res_y, g_height;
int g_res_x, g_res_y;
int g_width, widtho, heighto, g_height;
int saved_width, saved_height;
int blend_func_separate_support;
int npot_support;
@ -1590,7 +1589,7 @@ grLfbLock(GrLock_t type, GrBuffer_t buffer, GrLfbWriteMode_t writeMode,
}
return FXTRUE;
}
}
FX_ENTRY FxBool FX_CALL
grLfbUnlock(GrLock_t type, GrBuffer_t buffer)
@ -1824,7 +1823,7 @@ grLfbWriteRegion(GrBuffer_t dst_buffer,
//glDrawBuffer(current_buffer);
//glPopAttrib();
return FXTRUE;
}
}
/* wrapper-specific glide extensions */

View File

@ -11,6 +11,7 @@
* version 2 of the License, or (at your option) any later version. *
* *
****************************************************************************/
#include <Project64-video/Renderer/Renderer.h>
#include <stdio.h>
#ifdef _WIN32
#include <windows.h>

View File

@ -282,8 +282,7 @@ typedef struct
} fb;
int nbAuxBuffers, current_buffer;
int g_scr_res_x, g_width, widtho, heighto, g_scr_res_y, g_height;
int g_res_x, g_res_y;
int g_width, widtho, heighto, g_height;
int saved_width, saved_height;
int blend_func_separate_support;
int npot_support;
@ -595,7 +594,7 @@ grSstWinOpen(
#endif // _WIN32
nbTextureUnits = 0;
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &nbTextureUnits);
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint *)&nbTextureUnits);
if (nbTextureUnits == 1) WriteTrace(TraceGlitch, TraceWarning, "You need a video card that has at least 2 texture units");
nbAuxBuffers = 0;

View File

@ -11,6 +11,7 @@
* version 2 of the License, or (at your option) any later version. *
* *
****************************************************************************/
#include <Project64-video/Renderer/Renderer.h>
#ifdef _WIN32
#include <windows.h>
#else // _WIN32

View File

@ -13,4 +13,5 @@
****************************************************************************/
#include <Project64-video/Renderer/Renderer.h>
int32_t nbTextureUnits = 0;
uint32_t nbTextureUnits = 0;
uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;

View File

@ -14,4 +14,5 @@
#pragma once
#include <Project64-video/Renderer/types.h>
extern int32_t nbTextureUnits;
extern uint32_t nbTextureUnits;
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;

View File

@ -147,7 +147,6 @@ void vbo_disable();
#define FOG_ATTR 4
extern int w_buffer_mode;
extern int nbTextureUnits;
extern int g_width, g_height, widtho, heighto;
extern int tex0_width, tex0_height, tex1_width, tex1_height;
extern float lambda;

View File

@ -18,8 +18,6 @@
#include "CRC.h"
#include <Project64-video/trace.h>
extern int g_scr_res_x, g_res_x, g_scr_res_y, g_res_y;
static TBUFF_COLOR_IMAGE * AllocateTextureBuffer(COLOR_IMAGE & cimage)
{
TBUFF_COLOR_IMAGE texbuf;

View File

@ -30,8 +30,6 @@
VERTEX *vtx_list1[32]; // vertex indexing
VERTEX *vtx_list2[32];
extern int g_scr_res_x, g_scr_res_y;
//
// util_init - initialize data for the functions in this file
//

View File

@ -148,8 +148,6 @@ void microcheck();
static int reset = 0;
static CSettings::ucode_t g_old_ucode = CSettings::uCode_Unsupported;
extern int g_scr_res_x, g_res_x, g_scr_res_y, g_res_y;
void RDP::Reset()
{
memset(this, 0, sizeof(RDP_Base));
@ -651,9 +649,9 @@ EXPORT void CALL ProcessDList(void)
rdp_log << out_buf;
#endif
} while (!rdp.halt);
}
}
#ifdef CATCH_EXCEPTIONS
}
}
catch (...) {
if (g_fullscreen)
{
@ -668,7 +666,7 @@ EXPORT void CALL ProcessDList(void)
DisplayError("The GFX plugin caused an exception and has been disabled");
to_fullscreen = TRUE;
return;
}
}
#endif
if (g_settings->fb_emulation_enabled())

View File

@ -11,6 +11,7 @@
* version 2 of the License, or (at your option) any later version. *
* *
****************************************************************************/
#include <Project64-video/Renderer/Renderer.h>
#include <Project64-video/rdp.h>
#include <Project64-video/Gfx_1.3.h>
#include <Project64-video/trace.h>
@ -21,8 +22,6 @@
#include "TexBuffer.h"
#include "ucode06.h"
extern int g_scr_res_x, g_res_x, g_scr_res_y, g_res_y;
// STANDARD DRAWIMAGE - draws a 2d image based on the following structure
float set_sprite_combine_mode()