diff options
author | Paul Gilbert | 2013-11-05 08:19:02 -0500 |
---|---|---|
committer | Paul Gilbert | 2013-11-05 08:19:02 -0500 |
commit | 974348c77130867151a7443aad53ec18ba82fd00 (patch) | |
tree | 99422c49c1930887ed2b155caab3abda65f00fa5 /engines/tsage/ringworld2 | |
parent | c0f9455b281d62e8089c47ddbed04135c6ed5f20 (diff) | |
download | scummvm-rg350-974348c77130867151a7443aad53ec18ba82fd00.tar.gz scummvm-rg350-974348c77130867151a7443aad53ec18ba82fd00.tar.bz2 scummvm-rg350-974348c77130867151a7443aad53ec18ba82fd00.zip |
TSAGE: Implemented R2R shadowing effect
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_logic.cpp | 20 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 36 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.h | 2 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.cpp | 34 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes3.h | 4 |
5 files changed, 39 insertions, 57 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp index 5cda153e59..b495a7e052 100644 --- a/engines/tsage/ringworld2/ringworld2_logic.cpp +++ b/engines/tsage/ringworld2/ringworld2_logic.cpp @@ -1326,26 +1326,6 @@ bool SceneActor::startAction(CursorType action, Event &event) { GfxSurface SceneActor::getFrame() { GfxSurface frame = SceneObject::getFrame(); - // TODO: Proper effects handling - switch (_effect) { - case EFFECT_NONE: - case EFFECT_SHADOW: - // TODO: Figure out purpose of setting image flags to 64, and getting - // scene priorities -1 or _shade - break; - case EFFECT_SHADED: - // TODO: Transposing using R2_GLOBALS._pixelArrayMap - break; - case EFFECT_2: - // No effect - break; - case EFFECT_4: - break; - default: - // TODO: Default effect - break; - } - return frame; } diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index 1247000cd2..1b75ed4fdd 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -868,7 +868,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { _palette1.loadPalette(1101); R2_GLOBALS._player.postInit(); R2_GLOBALS._player.disableControl(); - R2_GLOBALS._player._effect = EFFECT_SHADOW; + R2_GLOBALS._player._effect = EFFECT_SHADOW_MAP; R2_GLOBALS._player._shadowMap = _shadowPaletteMap; R2_GLOBALS._player.setup(1102, 3, 2); R2_GLOBALS._player.setObjectWrapper(NULL); @@ -894,7 +894,7 @@ void Scene1100::postInit(SceneObjectList *OwnerList) { _shipFormationShadow.setup(1102, 6, 2); _shipFormationShadow._moveRate = 30; _shipFormationShadow._moveDiff.x = 2; - _shipFormationShadow._effect = EFFECT_SHADOW; + _shipFormationShadow._effect = EFFECT_SHADOW_MAP; _shipFormationShadow._shadowMap = _shadowPaletteMap; R2_GLOBALS._sound1.play(86); @@ -1084,8 +1084,7 @@ void Scene1100::signal() { case 11: { setAction(&_sequenceManager1, this, 1106, &_animation, &_laserShot, &_leftImpacts, NULL); - // CHECKME: Shadow effect should be set next to shadowmap - R2_GLOBALS._player._effect = EFFECT_SHADOW; + R2_GLOBALS._player._effect = EFFECT_SHADOW_MAP; R2_GLOBALS._player.setup(1102, 3, 2); R2_GLOBALS._player.setPosition(Common::Point(-50, 131)); R2_GLOBALS._sound2.play(84); @@ -6909,7 +6908,7 @@ void Scene1500::postInit(SceneObjectList *OwnerList) { _starshipShadow.postInit(); _starshipShadow.setup(1401, 1, 1); - _starshipShadow._effect = EFFECT_SHADOW; + _starshipShadow._effect = EFFECT_SHADOW_MAP; _starshipShadow.fixPriority(10); _starshipShadow._shadowMap = _shadowPaletteMap; @@ -6921,7 +6920,7 @@ void Scene1500::postInit(SceneObjectList *OwnerList) { if (R2_GLOBALS._sceneManager._previousScene != 1010) { _smallShipShadow.postInit(); _smallShipShadow.setup(1401, 2, 1); - _smallShipShadow._effect = EFFECT_SHADOW; + _smallShipShadow._effect = EFFECT_SHADOW_MAP; _smallShipShadow.fixPriority(10); _smallShipShadow._shadowMap = _shadowPaletteMap; @@ -10570,17 +10569,17 @@ void Scene1700::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._sound1.play(134); - _actor1.postInit(); - _actor1.fixPriority(10); + _playerShadow.postInit(); + _playerShadow.fixPriority(10); if (R2_GLOBALS._player._characterIndex == R2_QUINN) - _actor1.setVisage(1112); + _playerShadow.setVisage(1112); else - _actor1.setVisage(1111); + _playerShadow.setVisage(1111); - _actor1._effect = EFFECT_SHADOW; - _actor1._shadowMap = _shadowPaletteMap; - R2_GLOBALS._player._linkedActor = &_actor1; + _playerShadow._effect = EFFECT_SHADOW_MAP; + _playerShadow._shadowMap = _shadowPaletteMap; + R2_GLOBALS._player._linkedActor = &_playerShadow; _actor2.postInit(); _actor2.fixPriority(10); @@ -10589,7 +10588,7 @@ void Scene1700::postInit(SceneObjectList *OwnerList) { else _actor2.setVisage(1112); - _actor2._effect = EFFECT_SHADOW; + _actor2._effect = EFFECT_SHADOW_MAP; _actor2._shadowMap = _shadowPaletteMap; _actor12._linkedActor = &_actor2; @@ -10611,7 +10610,7 @@ void Scene1700::postInit(SceneObjectList *OwnerList) { _ledgeHopper.setPosition(Common::Point(220, 137)); _ledgeHopper.setDetails(1700, 6, -1, -1, 1, (SceneItem *) NULL); - _actor1.hide(); + _playerShadow.hide(); _actor2.hide(); R2_GLOBALS._events.setCursor(CURSOR_WALK); _stripManager.start(539, this); @@ -10788,7 +10787,8 @@ void Scene1700::signal() { case 40: R2_GLOBALS._player.disableControl(); _sceneMode = 1704; - setAction(&_sequenceManager, this, 1704, &R2_GLOBALS._player, &_actor12, &_actor10, &_ledgeHopper, &_actor1, &_actor2, NULL); + setAction(&_sequenceManager, this, 1704, &R2_GLOBALS._player, &_actor12, + &_actor10, &_ledgeHopper, &_playerShadow, &_actor2, NULL); break; case 50: if (R2_GLOBALS._player._characterIndex == R2_QUINN) @@ -11527,7 +11527,7 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { else _playerShadow.setVisage(1110); - _playerShadow._effect = EFFECT_SHADOW; + _playerShadow._effect = EFFECT_SHADOW_MAP; _playerShadow._shadowMap = _shadowPaletteMap; R2_GLOBALS._player._linkedActor = &_playerShadow; @@ -11539,7 +11539,7 @@ void Scene1800::postInit(SceneObjectList *OwnerList) { else _companionShadow.setVisage(1111); - _companionShadow._effect = EFFECT_SHADOW; + _companionShadow._effect = EFFECT_SHADOW_MAP; _companionShadow._shadowMap = _shadowPaletteMap; _companion._linkedActor = &_companionShadow; diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h index c9b6244cb4..48088981f2 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.h +++ b/engines/tsage/ringworld2/ringworld2_scenes1.h @@ -749,7 +749,7 @@ public: SpeakerSeeker _seekerSpeaker; NamedHotspot _item1; Item2 _item2; - SceneActor _actor1; + SceneActor _playerShadow; SceneActor _actor2; SceneActor _slabWest; SceneActor _slabEast; diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp index dd01c3d8d9..6eda26db2f 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp @@ -5204,18 +5204,20 @@ void Scene3800::enterArea() { R2_GLOBALS._player.setStrip(3); R2_GLOBALS._player.changeZoom(-1); R2_GLOBALS._player._moveDiff = Common::Point(3, 2); - _balloonQuinn.postInit(); - _balloonQuinn.fixPriority(10); - _balloonQuinn.changeZoom(-1); - _balloonQuinn.setVisage(1110); - _balloonQuinn._effect = EFFECT_SHADOW; - _balloonQuinn._shadowMap = this->_shadowPaletteMap; - R2_GLOBALS._player._linkedActor = &_balloonQuinn; + + _quinnShadow.postInit(); + _quinnShadow.fixPriority(10); + _quinnShadow.changeZoom(-1); + _quinnShadow.setVisage(1110); + _quinnShadow._effect = EFFECT_SHADOW_MAP; + _quinnShadow._shadowMap = this->_shadowPaletteMap; + R2_GLOBALS._player._linkedActor = &_quinnShadow; + switch (R2_GLOBALS._sceneManager._previousScene) { case 2600: _balloon.postInit(); _harness.postInit(); - _balloonQuinn.hide(); + _quinnShadow.hide(); _sceneMode = 3800; setAction(&_sequenceManager1, this, 3800, &R2_GLOBALS._player, &_balloon, &_harness, NULL); @@ -5361,7 +5363,7 @@ void Scene3800::signal() { g_globals->_sceneManager.changeScene(3900); break; case 3800: - _balloonQuinn.show(); + _quinnShadow.show(); _balloon.remove(); _harness.remove(); R2_GLOBALS._player.enableControl(); @@ -5514,13 +5516,13 @@ void Scene3900::postInit(SceneObjectList *OwnerList) { R2_GLOBALS._player.changeZoom(-1); R2_GLOBALS._player._moveDiff = Common::Point(3, 2); - _linkedQuinn.postInit(); - _linkedQuinn.fixPriority(10); - _linkedQuinn.changeZoom(-1); - _linkedQuinn.setVisage(1110); - _linkedQuinn._effect = EFFECT_SHADOW; - _linkedQuinn._shadowMap = _shadowPaletteMap; - R2_GLOBALS._player._linkedActor = &_linkedQuinn; + _quinnShadow.postInit(); + _quinnShadow.fixPriority(10); + _quinnShadow.changeZoom(-1); + _quinnShadow.setVisage(1110); + _quinnShadow._effect = EFFECT_SHADOW_MAP; + _quinnShadow._shadowMap = _shadowPaletteMap; + R2_GLOBALS._player._linkedActor = &_quinnShadow; if ((R2_GLOBALS._desertPreviousDirection == 2) && (R2_GLOBALS._sceneManager._previousScene != 2700)) { // loadScene(3825); diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.h b/engines/tsage/ringworld2/ringworld2_scenes3.h index 48236ee300..6191b750be 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.h +++ b/engines/tsage/ringworld2/ringworld2_scenes3.h @@ -786,7 +786,7 @@ class Scene3800 : public SceneExt { public: SceneObject _balloon; SceneObject _harness; - SceneActor _balloonQuinn; + SceneActor _quinnShadow; NamedHotspot _background; NorthExit _northExit; EastExit _eastExit; @@ -833,7 +833,7 @@ class Scene3900 : public SceneExt { virtual void changeScene(); }; public: - SceneActor _linkedQuinn; + SceneActor _quinnShadow; NamedHotspot _background; NorthExit _northExit; EastExit _eastExit; |