diff options
| author | Johannes Schickel | 2011-05-01 16:54:45 +0200 |
|---|---|---|
| committer | Johannes Schickel | 2011-05-01 16:54:45 +0200 |
| commit | 71bdb86e028db9556611f88b3686ce93312a8131 (patch) | |
| tree | 3c24233044a8e72bd8ecd73b981f50c725d5d282 /engines/parallaction | |
| parent | 89b63e3adb4692c9659f8b133727ccc1e2af75b4 (diff) | |
| parent | 8ff527ac4ef4237e63c0802a22eb0f942089e6c4 (diff) | |
| download | scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.gz scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.bz2 scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.zip | |
Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16
Conflicts:
graphics/png.cpp
Diffstat (limited to 'engines/parallaction')
| -rw-r--r-- | engines/parallaction/balloons.cpp | 6 | ||||
| -rw-r--r-- | engines/parallaction/disk.cpp | 2 | ||||
| -rw-r--r-- | engines/parallaction/disk_br.cpp | 2 | ||||
| -rw-r--r-- | engines/parallaction/disk_ns.cpp | 2 | ||||
| -rw-r--r-- | engines/parallaction/graphics.cpp | 4 | ||||
| -rw-r--r-- | engines/parallaction/gui_br.cpp | 2 | ||||
| -rw-r--r-- | engines/parallaction/gui_ns.cpp | 4 | ||||
| -rw-r--r-- | engines/parallaction/input.cpp | 6 | ||||
| -rw-r--r-- | engines/parallaction/inventory.cpp | 2 |
9 files changed, 15 insertions, 15 deletions
diff --git a/engines/parallaction/balloons.cpp b/engines/parallaction/balloons.cpp index 527f2d2812..2cf6eebf2a 100644 --- a/engines/parallaction/balloons.cpp +++ b/engines/parallaction/balloons.cpp @@ -304,7 +304,7 @@ int BalloonManager_ns::createBalloon(int16 w, int16 h, int16 winding, uint16 bor int16 real_h = (winding == -1) ? h : h + 9; balloon->surface = new Graphics::Surface; - balloon->surface->create(w, real_h, 1); + balloon->surface->create(w, real_h, Graphics::PixelFormat::createFormatCLUT8()); balloon->surface->fillRect(Common::Rect(w, real_h), BALLOON_TRANSPARENT_COLOR_NS); Common::Rect r(w, h); @@ -578,7 +578,7 @@ Graphics::Surface *BalloonManager_br::expandBalloon(Frames *data, int frameNum) rect.translate(-rect.left, -rect.top); Graphics::Surface *surf = new Graphics::Surface; - surf->create(rect.width(), rect.height(), 1); + surf->create(rect.width(), rect.height(), Graphics::PixelFormat::createFormatCLUT8()); _vm->_gfx->unpackBlt(rect, data->getData(frameNum), data->getRawSize(frameNum), surf, LAYER_FOREGROUND, 100, BALLOON_TRANSPARENT_COLOR_BR); @@ -670,7 +670,7 @@ int BalloonManager_br::createBalloon(int16 w, int16 h, uint16 borderThickness) { Balloon *balloon = &_intBalloons[id]; balloon->surface = new Graphics::Surface; - balloon->surface->create(w, h, 1); + balloon->surface->create(w, h, Graphics::PixelFormat::createFormatCLUT8()); Common::Rect rect(w, h); balloon->surface->fillRect(rect, 1); diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index a577b16d08..d996b72e90 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -39,7 +39,7 @@ void ILBMLoader::setupBuffer(uint32 w, uint32 h) { _surf = new Graphics::Surface; assert(_surf); } - _surf->create(w, h, 1); + _surf->create(w, h, Graphics::PixelFormat::createFormatCLUT8()); _mode = Graphics::ILBMDecoder::ILBM_UNPACK_PLANES; _intBuffer = (byte*)_surf->pixels; break; diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp index e0342f74f7..cea4091ee9 100644 --- a/engines/parallaction/disk_br.cpp +++ b/engines/parallaction/disk_br.cpp @@ -228,7 +228,7 @@ void DosDisk_br::loadBitmap(Common::SeekableReadStream &stream, Graphics::Surfac stream.skip(768); } - surf.create(width, height, 1); + surf.create(width, height, Graphics::PixelFormat::createFormatCLUT8()); stream.read(surf.pixels, width * height); } diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp index 7c14a31535..e695fa8798 100644 --- a/engines/parallaction/disk_ns.cpp +++ b/engines/parallaction/disk_ns.cpp @@ -474,7 +474,7 @@ void DosDisk_ns::loadBackground(BackgroundInfo& info, const char *filename) { } // read bitmap, mask and path data and extract them into the 3 buffers - info.bg.create(info.width, info.height, 1); + info.bg.create(info.width, info.height, Graphics::PixelFormat::createFormatCLUT8()); createMaskAndPathBuffers(info); unpackBackground(stream, (byte*)info.bg.pixels, info._mask->data, info._path->data); diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index c9504f1898..d33e733677 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -523,7 +523,7 @@ void Gfx::invertBackground(const Common::Rect& r) { void setupLabelSurface(Graphics::Surface &surf, uint w, uint h) { - surf.create(w, h, 1); + surf.create(w, h, Graphics::PixelFormat::createFormatCLUT8()); surf.fillRect(Common::Rect(w,h), LABEL_TRANSPARENT_COLOR); } @@ -859,7 +859,7 @@ void Gfx::setBackground(uint type, BackgroundInfo *info) { int height = CLIP(info->height, (int)_vm->_screenHeight, info->height); if (width != _backBuffer.w || height != _backBuffer.h) { - _backBuffer.create(width, height, 1); + _backBuffer.create(width, height, Graphics::PixelFormat::createFormatCLUT8()); } } diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp index cfc7b12453..41e3082464 100644 --- a/engines/parallaction/gui_br.cpp +++ b/engines/parallaction/gui_br.cpp @@ -484,7 +484,7 @@ public: _y = 90; Graphics::Surface *surf = new Graphics::Surface; - surf->create(w, 110, 1); + surf->create(w, 110, Graphics::PixelFormat::createFormatCLUT8()); surf->fillRect(Common::Rect(0, 0, w, 110), 12); surf->fillRect(Common::Rect(10, 10, w-10, 100), 15); diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp index eb94b076f1..6b863cc808 100644 --- a/engines/parallaction/gui_ns.cpp +++ b/engines/parallaction/gui_ns.cpp @@ -475,7 +475,7 @@ class SelectCharacterInputState_NS : public MenuInputState { public: SelectCharacterInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("selectcharacter", helper), _vm(vm) { _keys = (_vm->getPlatform() == Common::kPlatformAmiga && (_vm->getFeatures() & GF_LANG_MULT)) ? _amigaKeys : _pcKeys; - _block.create(BLOCK_WIDTH, BLOCK_HEIGHT, 1); + _block.create(BLOCK_WIDTH, BLOCK_HEIGHT, Graphics::PixelFormat::createFormatCLUT8()); _labels[0] = 0; _labels[1] = 0; @@ -626,7 +626,7 @@ public: _vm->_soundManI->stopMusic(); _vm->showSlide("password"); - _emptySlots.create(BLOCK_WIDTH * 8, BLOCK_HEIGHT, 1); + _emptySlots.create(BLOCK_WIDTH * 8, BLOCK_HEIGHT, Graphics::PixelFormat::createFormatCLUT8()); Common::Rect rect(SLOT_X, SLOT_Y, SLOT_X + BLOCK_WIDTH * 8, SLOT_Y + BLOCK_HEIGHT); _vm->_gfx->grabBackground(rect, _emptySlots); diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp index 95ea547b87..3a47b14deb 100644 --- a/engines/parallaction/input.cpp +++ b/engines/parallaction/input.cpp @@ -487,7 +487,7 @@ void Input::initCursors() { _donnaCursor = _vm->_disk->loadPointer("pointer3"); Graphics::Surface *surf = new Graphics::Surface; - surf->create(_mouseComboProps_BR._width, _mouseComboProps_BR._height, 1); + surf->create(_mouseComboProps_BR._width, _mouseComboProps_BR._height, Graphics::PixelFormat::createFormatCLUT8()); _comboArrow = new SurfaceToFrames(surf); // TODO: choose the pointer depending on the active character @@ -496,12 +496,12 @@ void Input::initCursors() { } else { // TODO: Where are the Amiga cursors? Graphics::Surface *surf1 = new Graphics::Surface; - surf1->create(_mouseComboProps_BR._width, _mouseComboProps_BR._height, 1); + surf1->create(_mouseComboProps_BR._width, _mouseComboProps_BR._height, Graphics::PixelFormat::createFormatCLUT8()); _comboArrow = new SurfaceToFrames(surf1); // TODO: scale mouse cursor (see staticres.cpp) Graphics::Surface *surf2 = new Graphics::Surface; - surf2->create(32, 16, 1); + surf2->create(32, 16, Graphics::PixelFormat::createFormatCLUT8()); memcpy(surf2->pixels, _resMouseArrow_BR_Amiga, 32*16); _mouseArrow = new SurfaceToFrames(surf2); } diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp index 76c4e2ce36..2412cc6445 100644 --- a/engines/parallaction/inventory.cpp +++ b/engines/parallaction/inventory.cpp @@ -141,7 +141,7 @@ void Parallaction::closeInventory() { InventoryRenderer::InventoryRenderer(Parallaction *vm, InventoryProperties *props, Inventory *inv) : _vm(vm), _props(props), _inv(inv) { - _surf.create(_props->_width, _props->_height, 1); + _surf.create(_props->_width, _props->_height, Graphics::PixelFormat::createFormatCLUT8()); } InventoryRenderer::~InventoryRenderer() { |
