Guest User

Untitled

a guest
Jun 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. void Screen::drawZoomBlur(byte *surface, const byte *source, uint x, int y) {
  2. const byte *from;
  3. byte *to, *to2;
  4.  
  5. CLIP(x, 54, 260);
  6. CLIP(y, 28, 136);
  7.  
  8. x -= 53;
  9. y -= 28;
  10.  
  11. source += y * SCREEN_W + x;
  12.  
  13. from = source;
  14. to = surface;
  15. surface += 658;
  16. to2 = surface;
  17.  
  18. for (int i = 0; i < 57; i++) {
  19. surface = to2;
  20. source = from;
  21.  
  22. for (int j = 0; j < 108; j++) {
  23. byte color = *source;
  24. source++;
  25.  
  26. *to =
  27. *(to-2) = *(to+2) =
  28. *(to-656) = *(to+656) =
  29. *(to-327) = *(to+327) =
  30. *(to-329) = *(to+329) = color;
  31.  
  32. to += 3;
  33. }
  34.  
  35. from += SCREEN_W;
  36. to2 += 984;
  37. }
  38.  
  39. for (int i = 0; i < 168; i++) {
  40. memcpy(to + i*SCREEN_W, to + 658 + i*328, SCREEN_W);
  41. }
  42. }
Add Comment
Please, Sign In to add comment