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

Function onPaint

win/win32/mhmap.c:1124–1142  ·  view source on GitHub ↗

on WM_PAINT */

Source from the content-addressed store, hash-verified

1122
1123/* on WM_PAINT */
1124void
1125onPaint(HWND hWnd)
1126{
1127 PNHMapWindow data = (PNHMapWindow) GetWindowLongPtr(hWnd, GWLP_USERDATA);
1128
1129 PAINTSTRUCT ps;
1130 HDC hFrontBufferDC = BeginPaint(hWnd, &ps);
1131
1132 /* stretch back buffer onto front buffer window */
1133 int frontWidth = COLNO * data->xFrontTile;
1134 int frontHeight = ROWNO * data->yFrontTile;
1135
1136 StretchBlt(hFrontBufferDC,
1137 data->map_orig.x - (data->xPos * data->xFrontTile),
1138 data->map_orig.y - (data->yPos * data->yFrontTile), frontWidth, frontHeight,
1139 data->backBufferDC, 0, 0, data->backWidth, data->backHeight, SRCCOPY);
1140
1141 EndPaint(hWnd, &ps);
1142}
1143
1144/* on WM_VSCROLL */
1145void

Callers 1

MapWndProcFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected