gfx.c
changeset 306 9ba288cacf0a
parent 298 0123c0489940
child 332 2e853c8bb691
equal deleted inserted replaced
305:eba98fc8d135 306:9ba288cacf0a
  1658 
  1658 
  1659 	// Make backup of stuff below cursor
  1659 	// Make backup of stuff below cursor
  1660 	memcpy_pitch(
  1660 	memcpy_pitch(
  1661 		_cursor_backup,
  1661 		_cursor_backup,
  1662 		_screen.dst_ptr + _cursor.draw_pos.x + _cursor.draw_pos.y * _screen.pitch,
  1662 		_screen.dst_ptr + _cursor.draw_pos.x + _cursor.draw_pos.y * _screen.pitch,
  1663 		_cursor.draw_size.x, _cursor.draw_size.y, _screen.width, _cursor.draw_size.x);
  1663 		_cursor.draw_size.x, _cursor.draw_size.y, _screen.pitch, _cursor.draw_size.x);
  1664 
  1664 
  1665 	// Draw cursor on screen
  1665 	// Draw cursor on screen
  1666 	_cur_dpi = &_screen;
  1666 	_cur_dpi = &_screen;
  1667 	DrawSprite(_cursor.sprite, _cursor.pos.x, _cursor.pos.y);
  1667 	DrawSprite(_cursor.sprite, _cursor.pos.x, _cursor.pos.y);
  1668 
  1668 
  1709 
  1709 
  1710 void DrawDirtyBlocks()
  1710 void DrawDirtyBlocks()
  1711 {
  1711 {
  1712 	byte *b = _dirty_blocks;
  1712 	byte *b = _dirty_blocks;
  1713 	int x=0,y=0;
  1713 	int x=0,y=0;
  1714 	int w = (_screen.width + 63) & ~63;
  1714 	const int w = (_screen.width + 63) & ~63;
  1715 	int h = _screen.height;
  1715 	const int h = (_screen.height + 7) & ~7;
  1716 
  1716 
  1717 	do {
  1717 	do {
  1718 		if (*b != 0) {
  1718 		if (*b != 0) {
  1719 			int left,top;
  1719 			int left,top;
  1720 			int right = x + 64;
  1720 			int right = x + 64;