| 1234 | } |
| 1235 | |
| 1236 | RESTORE_WARNING_FORMAT_NONLITERAL |
| 1237 | |
| 1238 | /* Set the size of the map viewport */ |
| 1239 | static void |
| 1240 | vesa_SetViewPort(void) |
| 1241 | { |
| 1242 | unsigned y_reserved = (TOP_MAP_ROW + 5) * vesa_char_height; |
| 1243 | unsigned y_map = vesa_y_res - y_reserved; |
| 1244 | |
| 1245 | viewport_cols = vesa_x_res / iflags.wc_tile_width; |
| 1246 | viewport_rows = y_map / iflags.wc_tile_height; |
| 1247 | if (viewport_cols > COLNO) viewport_cols = COLNO; |
| 1248 | if (viewport_rows > ROWNO) viewport_rows = ROWNO; |
| 1249 | } |
| 1250 | |
| 1251 | /* |
| 1252 | * Switches modes of the video card. |