* Repaints a specific rectangle of the screen. * * @param left,top,right,bottom The area of the screen that needs repainting * @pre The rectangle should have been previously marked dirty with \c AddDirtyBlock. * @see AddDirtyBlock * @see DrawDirtyBlocks * @ingroup dirty * */
| 1424 | * |
| 1425 | */ |
| 1426 | void RedrawScreenRect(int left, int top, int right, int bottom) |
| 1427 | { |
| 1428 | assert(right <= _screen.width && bottom <= _screen.height); |
| 1429 | if (_cursor.visible) { |
| 1430 | if (right > _cursor.draw_pos.x && |
| 1431 | left < _cursor.draw_pos.x + _cursor.draw_size.x && |
| 1432 | bottom > _cursor.draw_pos.y && |
| 1433 | top < _cursor.draw_pos.y + _cursor.draw_size.y) { |
| 1434 | UndrawMouseCursor(); |
| 1435 | } |
| 1436 | } |
| 1437 | |
| 1438 | if (_networking) NetworkUndrawChatMessage(); |
| 1439 | |
| 1440 | DrawOverlappedWindowForAll(left, top, right, bottom); |
| 1441 | |
| 1442 | VideoDriver::GetInstance()->MakeDirty(left, top, right - left, bottom - top); |
| 1443 | } |
| 1444 | |
| 1445 | /** |
| 1446 | * Repaints the rectangle blocks which are marked as 'dirty'. |
no test coverage detected