Merge pull request #365 from lordhoto/protected-pixels

Make Graphics::Surface::pixels protected.
This commit is contained in:
Johannes Schickel 2013-08-07 12:24:59 -07:00
commit 7f8308e0eb
158 changed files with 597 additions and 595 deletions

View file

@ -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) {