From aa7c44a070ac6b33411749b66014f80a953b70c5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 29 May 2012 14:16:31 +0200 Subject: GOB: Hook up the PE cursors to v7 loadCursor Addy Junior / Adibou2 now shows proper cursors. Thanks to clone2727 for the constant nagging. :P --- engines/gob/surface.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'engines/gob/surface.cpp') diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp index e294209ed7..3af19f891d 100644 --- a/engines/gob/surface.cpp +++ b/engines/gob/surface.cpp @@ -280,6 +280,18 @@ Surface::Surface(uint16 width, uint16 height, uint8 bpp, byte *vidMem) : _ownVidMem = false; } +Surface::Surface(uint16 width, uint16 height, uint8 bpp, const byte *vidMem) : + _width(width), _height(height), _bpp(bpp), _vidMem(0) { + + assert((_width > 0) && (_height > 0)); + assert((_bpp == 1) || (_bpp == 2)); + + _vidMem = new byte[_bpp * _width * _height]; + _ownVidMem = true; + + memcpy(_vidMem, vidMem, _bpp * _width * _height); +} + Surface::~Surface() { if (_ownVidMem) delete[] _vidMem; -- cgit v1.2.3