MCPcopy Create free account
hub / github.com/NetHack/NetHack / vesa_SetViewPort

Function vesa_SetViewPort

sys/msdos/vidvesa.c:1236–1249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1234}
1235
1236RESTORE_WARNING_FORMAT_NONLITERAL
1237
1238/* Set the size of the map viewport */
1239static void
1240vesa_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.

Callers 1

vesa_InitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected