[Glide64] Remove unused variables

4fc96fee08
This commit is contained in:
zilmar 2015-10-11 21:12:32 +11:00
parent 7d43d10dd5
commit bca97d42aa
7 changed files with 5 additions and 31 deletions

View File

@ -317,7 +317,7 @@ bool DrawFrameBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
FRDP("DrawFrameBufferToScreen. ul_x=%d, ul_y=%d, lr_x=%d, lr_y=%d, size=%d, addr=%08lx\n", fb_info.ul_x, fb_info.ul_y, fb_info.lr_x, fb_info.lr_y, fb_info.size, fb_info.addr);
GrTexInfo t_info;
wxUint8 * image = gfx.RDRAM+fb_info.addr;
wxUint32 texwidth, texheight;
wxUint32 texwidth;
float scale;
if (width <= 256)
{
@ -335,12 +335,10 @@ bool DrawFrameBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
if (height <= (texwidth>>1))
{
t_info.aspectRatioLog2 = GR_ASPECT_LOG2_2x1;
texheight = texwidth>>1;
}
else
{
t_info.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
texheight = texwidth;
}
if (fb_info.size == 2)
@ -588,7 +586,7 @@ void DrawDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
FRDP("DrawDepthBufferToScreen. ul_x=%d, ul_y=%d, lr_x=%d, lr_y=%d, size=%d, addr=%08lx\n", fb_info.ul_x, fb_info.ul_y, fb_info.lr_x, fb_info.lr_y, fb_info.size, fb_info.addr);
GrTexInfo t_info;
wxUint8 * image = gfx.RDRAM+fb_info.addr;
wxUint32 texwidth, texheight;
wxUint32 texwidth;
float scale;
if (width <= 256)
{
@ -606,12 +604,10 @@ void DrawDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
if (height <= (texwidth>>1))
{
t_info.aspectRatioLog2 = GR_ASPECT_LOG2_2x1;
texheight = texwidth>>1;
}
else
{
t_info.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
texheight = texwidth;
}
wxUint16 * tex = (wxUint16*)texture_buffer;

View File

@ -359,14 +359,13 @@ static void mod_tex_scale_col_add_col (wxUint16 *dst, int size, wxUint32 color0,
static void mod_tex_add_col (wxUint16 *dst, int size, wxUint32 color)
{
wxUint32 cr, cg, cb, ca;
wxUint32 cr, cg, cb;
wxUint16 col;
wxUint8 a, r, g, b;
cr = (color >> 12) & 0xF;
cg = (color >> 8) & 0xF;
cb = (color >> 4) & 0xF;
ca = color & 0xF;
for (int i=0; i<size; i++)
{
@ -540,7 +539,6 @@ static void mod_tex_mul_col (wxUint16 *dst, int size, wxUint32 color)
wxUint16 col;
wxUint8 r, g, b;
wxUint16 a;
float percent, percent_i;
cr = (float)((color >> 12) & 0xF)/16.0f;
cg = (float)((color >> 8) & 0xF)/16.0f;
@ -550,8 +548,6 @@ static void mod_tex_mul_col (wxUint16 *dst, int size, wxUint32 color)
{
col = *dst;
a = col & 0xF000;
percent = (a >> 12) / 15.0f;
percent_i = 1.0f - percent;
r = (wxUint8)(cr * ((col & 0x0F00) >> 8));
g = (wxUint8)(cg * ((col & 0x00F0) >> 4));
b = (wxUint8)(cb * (col & 0x000F));

View File

@ -593,10 +593,7 @@ static void uc2_moveword ()
int index_y = index_x >> 2;
index_x &= 3;
float fpart = (float)fabs(rdp.combined[index_y][index_x] - (int)rdp.combined[index_y][index_x]);
rdp.combined[index_y][index_x] = (short)(rdp.cmd1>>16);
fpart = (float)fabs(rdp.combined[index_y][index_x+1] - (int)rdp.combined[index_y][index_x+1]);
rdp.combined[index_y][index_x+1] = (short)(rdp.cmd1&0xFFFF);
}

View File

@ -66,11 +66,9 @@ static float set_sprite_combine_mode ()
float Z = 0.0f;
if ((rdp.othermode_l & 0x00000030) && rdp.cycle_mode < 2)
{
wxUint16 prim_dz = 0;
if (rdp.zsrc == 1)
{
Z = rdp.prim_depth;
prim_dz = rdp.prim_dz;
}
FRDP ("prim_depth = %d, prim_dz = %d\n", rdp.prim_depth, rdp.prim_dz);
Z = ScaleZ(Z);

View File

@ -37,7 +37,6 @@ void Super2xSaI_8888(uint32 *srcPtr, uint32 *destPtr, uint32 width, uint32 heigh
#define SAI_Q_INTERPOLATE SAI_Q_INTERPOLATE_8888
uint32 destWidth = width << 1;
uint32 destHeight = height << 1;
uint32 color4, color5, color6;
uint32 color1, color2, color3;

View File

@ -38,11 +38,9 @@ int need_to_compile;
static GLhandleARB fragment_shader_object;
static GLhandleARB fragment_depth_shader_object;
static GLhandleARB fragment_bw_shader_object;
static GLhandleARB vertex_shader_object;
static GLhandleARB program_object_default;
static GLhandleARB program_object_depth;
static GLhandleARB program_object_bw;
static GLhandleARB program_object;
static int constant_color_location;
static int ccolor0_location;
@ -87,16 +85,6 @@ static const char* fragment_shader_default =
" gl_FragColor = texture2D(texture0, vec2(gl_TexCoord[0])); \n"
;
static const char* fragment_shader_depth =
" gl_FragDepth = dot(texture2D(texture0, vec2(gl_TexCoord[0])), vec4(32*64*32/65536.0, 64*32/65536.0, 32/65536.0, 0))*0.5 + 0.5; \n"
;
static const char* fragment_shader_bw =
" vec4 readtex0 = texture2D(texture0, vec2(gl_TexCoord[0])); \n"
" gl_FragColor = vec4(vec3(readtex0.b), \n"
" readtex0.r + readtex0.g * 8.0 / 256.0); \n"
;
static const char* fragment_shader_readtex0color =
" vec4 readtex0 = texture2D(texture0, vec2(gl_TexCoord[0])); \n"
;

View File

@ -762,7 +762,7 @@ int isWglExtensionSupported(const char *extension)
FX_ENTRY GrContext_t FX_CALL
grSstWinOpenExt(
HWND hWnd,
HWND hWnd,
GrScreenResolution_t screen_resolution,
GrScreenRefresh_t refresh_rate,
GrColorFormat_t color_format,
@ -787,7 +787,7 @@ grSstWinOpenExt(
FX_ENTRY GrContext_t FX_CALL
grSstWinOpen(
HWND hWnd,
HWND hWnd,
GrScreenResolution_t screen_resolution,
GrScreenRefresh_t refresh_rate,
GrColorFormat_t color_format,