diff options
Diffstat (limited to 'graphics/surface.cpp')
-rw-r--r-- | graphics/surface.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/graphics/surface.cpp b/graphics/surface.cpp index b90ddd23e8..929157203e 100644 --- a/graphics/surface.cpp +++ b/graphics/surface.cpp @@ -82,6 +82,14 @@ void Surface::free() { format = PixelFormat(); } +void Surface::init(uint16 width, uint16 height, uint16 newPitch, void *newPixels, const PixelFormat &f) { + w = width; + h = height; + pitch = newPitch; + pixels = newPixels; + format = f; +} + void Surface::copyFrom(const Surface &surf) { create(surf.w, surf.h, surf.format); if (surf.pitch == pitch) { |