diff options
author | Eugene Sandulenko | 2005-10-09 01:43:08 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-10-09 01:43:08 +0000 |
commit | 6cd35f750706d665f489f7331be0bf5914f66f53 (patch) | |
tree | 580da398cb2b2afc54116a62653e40ce6303fb01 | |
parent | d972e948c3259871dd0a8da2a997d37789ac3f66 (diff) | |
download | scummvm-rg350-6cd35f750706d665f489f7331be0bf5914f66f53.tar.gz scummvm-rg350-6cd35f750706d665f489f7331be0bf5914f66f53.tar.bz2 scummvm-rg350-6cd35f750706d665f489f7331be0bf5914f66f53.zip |
Now load actors only on demand. That lets select Nimdok (doctor) part. Just
click on him and move mouse away quickly, so it will not try to get actor's
name which is broken ATM.
svn-id: r18984
-rw-r--r-- | saga/actor.cpp | 5 | ||||
-rw-r--r-- | saga/actor.h | 5 | ||||
-rw-r--r-- | saga/sfuncs.cpp | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index fe97ef7e5b..6a670b3431 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -482,7 +482,10 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource for (i = 0; i < _actorsCount; i++) { actor = _actors[i]; - loadActorResources(actor); + if (actor->_flags & kProtagonist) { + loadActorResources(actor); + break; + } } _centerActor = _protagonist = _actors[protagonistIdx]; diff --git a/saga/actor.h b/saga/actor.h index 6830bfd8d7..48c717fe89 100644 --- a/saga/actor.h +++ b/saga/actor.h @@ -590,8 +590,11 @@ public: void freeObjList(); void loadObjList(int objectCount, int objectsResourceID); -private: +protected: + friend class Script; bool loadActorResources(ActorData *actor); + +private: void stepZoneAction(ActorData *actor, const HitZone *hitZone, bool exit, bool stopped); void createDrawOrderList(); diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index d69e67be30..c4d5493e27 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -1108,6 +1108,9 @@ void Script::sfPlaceActor(SCRIPTFUNC_PARAMS) { actor->_location.y = actorLocation.y; actor->_facingDirection = actor->_actionDirection = actorDirection; + if (!actor->_frames) + _vm->_actor->loadActorResources(actor); + if (frameType >= 0) { frameRange = _vm->_actor->getActorFrameRange(actorId, frameType); |