aboutsummaryrefslogtreecommitdiff
path: root/graphics/surface.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-07 12:24:59 -0700
committerJohannes Schickel2013-08-07 12:24:59 -0700
commit7f8308e0eb50c4e13ec0684619b5474983a93a66 (patch)
tree0a057f01385a11d99add1e294f70891a8e8bf6c9 /graphics/surface.cpp
parent6e9390feb8166d5f9d6c6fdfe00a336b4f71de4c (diff)
parente5f0c42a65f38611272542a144228753e0496493 (diff)
downloadscummvm-rg350-7f8308e0eb50c4e13ec0684619b5474983a93a66.tar.gz
scummvm-rg350-7f8308e0eb50c4e13ec0684619b5474983a93a66.tar.bz2
scummvm-rg350-7f8308e0eb50c4e13ec0684619b5474983a93a66.zip
Merge pull request #365 from lordhoto/protected-pixels
Make Graphics::Surface::pixels protected.
Diffstat (limited to 'graphics/surface.cpp')
-rw-r--r--graphics/surface.cpp8
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) {