mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
#660: convert wrong modeltype to warning
This commit is contained in:
parent
1882fc2dbc
commit
0b79fa99ed
3 changed files with 27 additions and 11 deletions
|
@ -177,7 +177,9 @@ RE_Draw_StretchPicImplementation (int x, int y, int w, int h, const image_t *pic
|
|||
(x + w > vid.width) ||
|
||||
(y + h > vid.height))
|
||||
{
|
||||
ri.Sys_Error(ERR_FATAL, "%s: bad coordinates", __func__);
|
||||
R_Printf(PRINT_ALL, "%s: bad coordinates %dx%d[%dx%d]",
|
||||
__func__, x, y, w, h);
|
||||
return;
|
||||
}
|
||||
|
||||
VID_DamageBuffer(x, y);
|
||||
|
|
|
@ -855,8 +855,13 @@ R_DrawEntitiesOnList (void)
|
|||
R_AliasDrawModel(currententity, currentmodel);
|
||||
break;
|
||||
|
||||
default:
|
||||
case mod_brush:
|
||||
break;
|
||||
|
||||
default:
|
||||
R_Printf(PRINT_ALL, "%s: Bad modeltype %d\n",
|
||||
__func__, currentmodel->type);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -900,8 +905,13 @@ R_DrawEntitiesOnList (void)
|
|||
R_AliasDrawModel(currententity, currentmodel);
|
||||
break;
|
||||
|
||||
default:
|
||||
case mod_brush:
|
||||
break;
|
||||
|
||||
default:
|
||||
R_Printf(PRINT_ALL, "%s: Bad modeltype %d\n",
|
||||
__func__, currentmodel->type);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1453,7 +1463,8 @@ RE_BeginFrame( float camera_separation )
|
|||
// we need redraw everything
|
||||
VID_WholeDamageBuffer();
|
||||
// and backbuffer should be zeroed
|
||||
memset(swap_buffers + ((swap_current + 1)&1), 0, vid.height * vid.width * sizeof(pixel_t));
|
||||
memset(swap_buffers + ((swap_current + 1)&1), 0,
|
||||
vid.height * vid.width * sizeof(pixel_t));
|
||||
|
||||
vid_gamma->modified = false;
|
||||
sw_overbrightbits->modified = false;
|
||||
|
@ -2140,7 +2151,8 @@ RE_CleanFrame(void)
|
|||
int pitch;
|
||||
Uint32 *pixels;
|
||||
|
||||
memset(swap_buffers, 0, vid.height * vid.width * sizeof(pixel_t) * 2);
|
||||
memset(swap_buffers, 0,
|
||||
vid.height * vid.width * sizeof(pixel_t) * 2);
|
||||
|
||||
if (SDL_LockTexture(texture, NULL, (void**)&pixels, &pitch))
|
||||
{
|
||||
|
@ -2291,9 +2303,9 @@ SWimp_SetMode(int *pwidth, int *pheight, int mode, int fullscreen )
|
|||
|
||||
if(ri.GLimp_GetDesktopMode(&real_width, &real_height))
|
||||
{
|
||||
if (real_height)
|
||||
if (real_height && (real_height != *pheight))
|
||||
{
|
||||
*pwidth = (*pheight) * real_width / real_height;
|
||||
*pwidth = ((*pheight) * real_width) / real_height;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -355,8 +355,9 @@ void R_DrawEntitiesOnList (void)
|
|||
R_DrawSpriteModel(currententity, currentmodel);
|
||||
break;
|
||||
default:
|
||||
ri.Sys_Error(ERR_DROP, "%s, Bad modeltype", __func__);
|
||||
break;
|
||||
R_Printf(PRINT_ALL, "%s: Bad modeltype %d\n",
|
||||
__func__, currentmodel->type);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -394,8 +395,9 @@ void R_DrawEntitiesOnList (void)
|
|||
R_DrawSpriteModel(currententity, currentmodel);
|
||||
break;
|
||||
default:
|
||||
ri.Sys_Error(ERR_DROP, "%s, Bad modeltype", __func__);
|
||||
break;
|
||||
R_Printf(PRINT_ALL, "%s: Bad modeltype %d\n",
|
||||
__func__, currentmodel->type);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue