Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Screen::drawZoomBlur(byte *surface, const byte *source, uint x, int y) {
- const byte *from;
- byte *to, *to2;
- CLIP(x, 54, 260);
- CLIP(y, 28, 136);
- x -= 53;
- y -= 28;
- source += y * SCREEN_W + x;
- from = source;
- to = surface;
- surface += 658;
- to2 = surface;
- for (int i = 0; i < 57; i++) {
- surface = to2;
- source = from;
- for (int j = 0; j < 108; j++) {
- byte color = *source;
- source++;
- *to =
- *(to-2) = *(to+2) =
- *(to-656) = *(to+656) =
- *(to-327) = *(to+327) =
- *(to-329) = *(to+329) = color;
- to += 3;
- }
- from += SCREEN_W;
- to2 += 984;
- }
- for (int i = 0; i < 168; i++) {
- memcpy(to + i*SCREEN_W, to + 658 + i*328, SCREEN_W);
- }
- }
Add Comment
Please, Sign In to add comment