MCPcopy Create free account
hub / github.com/assaultcube/AC / scalesurface

Function scalesurface

source/src/texture.cpp:315–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315void 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
326bool silent_texture_load = false;
327

Callers 1

loadsurfaceFunction · 0.85

Calls 1

scaletextureFunction · 0.85

Tested by

no test coverage detected