()
| 351 | * Sets scr_vrect, the coordinates of the rendered window ================= |
| 352 | */ |
| 353 | private static void CalcVrect() { |
| 354 | int size; |
| 355 | |
| 356 | // bound viewsize |
| 357 | if (scr_viewsize.value < 40) |
| 358 | Cvar.getInstance().Set("viewsize", "40"); |
| 359 | if (scr_viewsize.value > 100) |
| 360 | Cvar.getInstance().Set("viewsize", "100"); |
| 361 | |
| 362 | size = (int) scr_viewsize.value; |
| 363 | |
| 364 | ClientGlobals.scr_vrect.width = ClientGlobals.viddef.getWidth() * size / 100; |
| 365 | ClientGlobals.scr_vrect.width &= ~7; |
| 366 | |
| 367 | ClientGlobals.scr_vrect.height = ClientGlobals.viddef.getHeight() * size / 100; |
| 368 | ClientGlobals.scr_vrect.height &= ~1; |
| 369 | |
| 370 | ClientGlobals.scr_vrect.x = (ClientGlobals.viddef.getWidth() - ClientGlobals.scr_vrect.width) / 2; |
| 371 | ClientGlobals.scr_vrect.y = (ClientGlobals.viddef.getHeight() - ClientGlobals.scr_vrect.height) / 2; |
| 372 | } |
| 373 | |
| 374 | /* |
| 375 | * ================= SCR_SizeUp_f |
no test coverage detected