| 313 | } |
| 314 | |
| 315 | void scalesurface(SDL_Surface *s, float scale) |
| 316 | { |
| 317 | uint dw = s->w*scale, dh = s->h*scale; |
| 318 | uchar *buf = new uchar[dw*dh*s->format->BytesPerPixel]; |
| 319 | scaletexture((uchar *)s->pixels, s->w, s->h, s->format->BytesPerPixel, buf, dw, dh); |
| 320 | delete[] (uchar *)s->pixels; |
| 321 | s->w = dw; |
| 322 | s->h = dh; |
| 323 | s->pixels = buf; |
| 324 | } |
| 325 | |
| 326 | bool silent_texture_load = false; |
| 327 |
no test coverage detected