diff options
author | johndoe123 | 2011-09-19 14:46:53 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:39:40 +0200 |
commit | 2f670690bc1febbd402a5743f400c4463af7ebc7 (patch) | |
tree | 095e1504eecbe682838e010fe85349b457fa1181 /engines/neverhood/module3000.cpp | |
parent | fa695229bed037257099e6c082f7e50be1119882 (diff) | |
download | scummvm-rg350-2f670690bc1febbd402a5743f400c4463af7ebc7.tar.gz scummvm-rg350-2f670690bc1febbd402a5743f400c4463af7ebc7.tar.bz2 scummvm-rg350-2f670690bc1febbd402a5743f400c4463af7ebc7.zip |
NEVERHOOD: Add Scene::setPalette for simpled palette creation and use it
Diffstat (limited to 'engines/neverhood/module3000.cpp')
-rw-r--r-- | engines/neverhood/module3000.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/engines/neverhood/module3000.cpp b/engines/neverhood/module3000.cpp index 82bcc54ac4..e7714c08fd 100644 --- a/engines/neverhood/module3000.cpp +++ b/engines/neverhood/module3000.cpp @@ -795,7 +795,7 @@ Scene3009::Scene3009(NeverhoodEngine *vm, Module *parentModule, int which) _vm->_screen->clear(); setBackground(0xD000420C); - _palette = new Palette(_vm, 0xD000420C); + setPalette(0xD000420C); insertMouse435(0x04208D08, 20, 620); _ssFireCannonButton = addSprite(new SsScene3009FireCannonButton(_vm, this)); @@ -821,7 +821,7 @@ Scene3009::Scene3009(NeverhoodEngine *vm, Module *parentModule, int which) _smackerPlayer = addSmackerPlayer(new SmackerPlayer(_vm, this, kScene3009SmackerFileHashes[_cannonLocation], false, _keepVideo)); _smackerPlayer->setDrawPos(89, 37); - _palette->usePalette(); + _palette->usePalette(); // Use it again since the SmackerPlayer overrides the usage insertStaticSprite(0x8540252C, 400); @@ -1032,7 +1032,7 @@ bool Scene3009::isSymbolsPart2Solved() { } bool Scene3009::sub462E90() { - return /*_flag3 || */_flag4; + return _flag4; } // Scene3010 @@ -1153,10 +1153,7 @@ void SsScene3010DeadBoltButton::setSprite(uint32 fileHash) { _drawRect.y = 0; _drawRect.width = _spriteResource.getDimensions().width; _drawRect.height = _spriteResource.getDimensions().height; - _deltaRect.x = 0; - _deltaRect.y = 0; - _deltaRect.width = _spriteResource.getDimensions().width; - _deltaRect.height = _spriteResource.getDimensions().height; + _deltaRect = _drawRect; processDelta(); _needRefresh = true; StaticSprite::update(); @@ -1294,8 +1291,7 @@ Scene3010::Scene3010(NeverhoodEngine *vm, Module *parentModule, int which) _surfaceFlag = true; setBackground(0x80802626); - _palette = new Palette(_vm, 0x80802626); - _palette->usePalette(); + setPalette(0x80802626); for (int i = 0; i < 3; i++) { _asDeadBolts[i] = new AsScene3010DeadBolt(_vm, this, i, which == 1);//CHECKME @@ -1443,10 +1439,7 @@ SsScene3011Button::SsScene3011Button(NeverhoodEngine *vm, Scene *parentScene, bo _drawRect.y = 0; _drawRect.width = _spriteResource.getDimensions().width; _drawRect.height = _spriteResource.getDimensions().height; - _deltaRect.x = 0; - _deltaRect.y = 0; - _deltaRect.width = _spriteResource.getDimensions().width; - _deltaRect.height = _spriteResource.getDimensions().height; + _deltaRect = _drawRect; setVisible(false); processDelta(); _needRefresh = true; @@ -1546,9 +1539,7 @@ Scene3011::Scene3011(NeverhoodEngine *vm, Module *parentModule, int which) _index1 = getGlobalVar(0x2414C2F2); setBackground(0x92124A04); - - _palette = new Palette(_vm, 0xA4070114); - _palette->usePalette(); + setPalette(0xA4070114); addEntity(_palette); insertMouse435(0x24A00929, 20, 620); |