diff options
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/blue_force/blueforce_scenes0.h | 2 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_ui.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/blue_force/blueforce_ui.h | 2 | ||||
-rw-r--r-- | engines/tsage/core.cpp | 9 | ||||
-rw-r--r-- | engines/tsage/core.h | 4 | ||||
-rw-r--r-- | engines/tsage/ringworld/ringworld_scenes10.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/scenes.cpp | 14 | ||||
-rw-r--r-- | engines/tsage/scenes.h | 4 |
8 files changed, 20 insertions, 19 deletions
diff --git a/engines/tsage/blue_force/blueforce_scenes0.h b/engines/tsage/blue_force/blueforce_scenes0.h index f3fcbb9eea..06003e0ad7 100644 --- a/engines/tsage/blue_force/blueforce_scenes0.h +++ b/engines/tsage/blue_force/blueforce_scenes0.h @@ -159,7 +159,7 @@ public: TicketBook _ticketBook; CompartmentDoor _compartmentDoor; SceneObject _dashboard; - AltSceneObject _car; + BackgroundSceneObject _car; NamedHotspot _item1; Ignition _ignition; Item3 _item3; diff --git a/engines/tsage/blue_force/blueforce_ui.cpp b/engines/tsage/blue_force/blueforce_ui.cpp index 89a7d85f89..15f4d99c87 100644 --- a/engines/tsage/blue_force/blueforce_ui.cpp +++ b/engines/tsage/blue_force/blueforce_ui.cpp @@ -38,7 +38,7 @@ void StripProxy::process(Event &event) { /*--------------------------------------------------------------------------*/ void UIElement::synchronize(Serializer &s) { - AltSceneObject::synchronize(s); + BackgroundSceneObject::synchronize(s); s.syncAsSint16LE(_field88); s.syncAsSint16LE(_enabled); s.syncAsSint16LE(_frameNum); diff --git a/engines/tsage/blue_force/blueforce_ui.h b/engines/tsage/blue_force/blueforce_ui.h index d9c593b900..29eb953bdf 100644 --- a/engines/tsage/blue_force/blueforce_ui.h +++ b/engines/tsage/blue_force/blueforce_ui.h @@ -39,7 +39,7 @@ public: virtual void process(Event &event); }; -class UIElement: public AltSceneObject { +class UIElement: public BackgroundSceneObject { public: int _field88; bool _enabled; diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 733f2707ae..f1542dc56e 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -2528,17 +2528,18 @@ void SceneObject::setup(int visage, int stripFrameNum, int frameNum, int posX, i /*--------------------------------------------------------------------------*/ -void AltSceneObject::postInit(SceneObjectList *OwnerList) { - SceneObject::postInit(&_globals->_sceneManager._altSceneObjects); +void BackgroundSceneObject::postInit(SceneObjectList *OwnerList) { + SceneObject::postInit(&_globals->_sceneManager._bgSceneObjects); } -void AltSceneObject::draw() { +void BackgroundSceneObject::draw() { + assert(_globals->_sceneManager._scene); Rect destRect = _bounds; destRect.translate(-_globals->_sceneManager._scene->_sceneBounds.left, -_globals->_sceneManager._scene->_sceneBounds.top); Region *priorityRegion = _globals->_sceneManager._scene->_priorities.find(_priority); GfxSurface frame = getFrame(); - _globals->_gfxManagerInstance.copyFrom(frame, destRect, priorityRegion); + _globals->_sceneManager._scene->_backSurface.copyFrom(frame, destRect, priorityRegion); } /*--------------------------------------------------------------------------*/ diff --git a/engines/tsage/core.h b/engines/tsage/core.h index 9bcf77b110..4e219f67db 100644 --- a/engines/tsage/core.h +++ b/engines/tsage/core.h @@ -606,9 +606,9 @@ public: void setup(int visage, int stripFrameNum, int frameNum, int posX, int posY, int priority); }; -class AltSceneObject: public SceneObject { +class BackgroundSceneObject: public SceneObject { public: - virtual Common::String getClassName() { return "AltObjectExt"; } + virtual Common::String getClassName() { return "BackgroundSceneObject"; } virtual void postInit(SceneObjectList *OwnerList = NULL); virtual void draw(); }; diff --git a/engines/tsage/ringworld/ringworld_scenes10.cpp b/engines/tsage/ringworld/ringworld_scenes10.cpp index 1d310c6f8f..fdb0532cb7 100644 --- a/engines/tsage/ringworld/ringworld_scenes10.cpp +++ b/engines/tsage/ringworld/ringworld_scenes10.cpp @@ -37,7 +37,7 @@ Scene2::Scene2() : Scene() { /*--------------------------------------------------------------------------*/ void Object9350::postInit(SceneObjectList *OwnerList) { - //SceneObject::postInit(&_globals->_sceneManager._altSceneObjects); + //SceneObject::postInit(&_globals->_sceneManager._bgSceneObjects); SceneObject::postInit(OwnerList); } diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp index d68f5c2ee5..c2c35c46a6 100644 --- a/engines/tsage/scenes.cpp +++ b/engines/tsage/scenes.cpp @@ -81,7 +81,7 @@ void SceneManager::sceneChange() { } // Clear the secondary scene object list - _altSceneObjects.clear(); + _bgSceneObjects.clear(); // Clear the hotspot list SynchronizedList<SceneItem *>::iterator ii = _globals->_sceneItems.begin(); @@ -234,7 +234,7 @@ void SceneManager::listenerSynchronize(Serializer &s) { // in order for the savegame loading to work correctly _globals->_sceneManager._scene = new Scene(); - _altSceneObjects.synchronize(s); + _bgSceneObjects.synchronize(s); s.syncAsSint32LE(_sceneNumber); s.syncAsUint16LE(_globals->_sceneManager._scene->_activeScreenNumber); @@ -442,16 +442,16 @@ void Scene::refreshBackground(int xAmount, int yAmount) { } if (changedFlag) { - drawAltObjects(); + drawBackgroundObjects(); } } -void Scene::drawAltObjects() { +void Scene::drawBackgroundObjects() { Common::Array<SceneObject *> objList; // Initial loop to set the priority for entries in the list - for (SynchronizedList<SceneObject *>::iterator i = _globals->_sceneManager._altSceneObjects.begin(); - i != _globals->_sceneManager._altSceneObjects.end(); ++i) { + for (SynchronizedList<SceneObject *>::iterator i = _globals->_sceneManager._bgSceneObjects.begin(); + i != _globals->_sceneManager._bgSceneObjects.end(); ++i) { SceneObject *obj = *i; objList.push_back(obj); @@ -463,7 +463,7 @@ void Scene::drawAltObjects() { } // Sort the list by priority - _globals->_sceneManager._altSceneObjects.sortList(objList); + _globals->_sceneManager._bgSceneObjects.sortList(objList); // Drawing loop for (uint objIndex = 0; objIndex < objList.size(); ++objIndex) { diff --git a/engines/tsage/scenes.h b/engines/tsage/scenes.h index b03b8fa906..c0cdb9efdd 100644 --- a/engines/tsage/scenes.h +++ b/engines/tsage/scenes.h @@ -33,7 +33,7 @@ namespace TsAGE { class Scene : public StripCallback { private: - void drawAltObjects(); + void drawBackgroundObjects(); public: int _field12; int _screenNumber; @@ -86,7 +86,7 @@ public: Common::Point _sceneBgOffset; int _sceneLoadCount; Rect _scrollerRect; - SceneObjectList _altSceneObjects; + SceneObjectList _bgSceneObjects; int _objectCount; public: SceneManager(); |