From 6886f7865ca1f440612a7e04c64f2c23ff309af8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 6 Aug 2005 14:26:59 +0000 Subject: o Fix uint -> int with scene numbers o WIP for metaResources svn-id: r18620 --- saga/actor.cpp | 4 ++++ saga/actor.h | 3 +++ saga/rscfile.cpp | 9 +++++++-- saga/rscfile.h | 4 ++-- saga/scene.cpp | 2 +- saga/scene.h | 4 ++-- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/saga/actor.cpp b/saga/actor.cpp index c95bec2039..32e371c774 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -372,6 +372,10 @@ bool Actor::loadActorResources(ActorData *actor) { return true; } +void Actor::loadList(int actorsEntrance, int actorCount, int actorsResourceID, + int protagStatesCount, int protagStatesResourceID) { +} + void Actor::takeExit(uint16 actorId, const HitZone *hitZone) { ActorData *actor; actor = getActor(actorId); diff --git a/saga/actor.h b/saga/actor.h index 4a18f6552e..3f44963680 100644 --- a/saga/actor.h +++ b/saga/actor.h @@ -572,6 +572,9 @@ public: void setProtagState(int state); int getProtagState() { return _protagState; } + void loadList(int actorsEntrance, int actorCount, int actorsResourceID, + int protagStatesCount, int protagStatesResourceID); + private: bool loadActorResources(ActorData *actor); void stepZoneAction(ActorData *actor, const HitZone *hitZone, bool exit, bool stopped); diff --git a/saga/rscfile.cpp b/saga/rscfile.cpp index 545c81f547..e30f3246ae 100644 --- a/saga/rscfile.cpp +++ b/saga/rscfile.cpp @@ -24,6 +24,7 @@ // RSC Resource file management module #include "saga/saga.h" +#include "saga/actor.h" #include "saga/rscfile.h" #include "saga/stream.h" @@ -457,12 +458,16 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) { _metaResource.protagFaceSpritesID = metaS.readSint32LE(); _metaResource.field_22 = metaS.readSint32LE(); _metaResource.field_26 = metaS.readSint16LE(); - _metaResource.field_28 = metaS.readSint16LE(); - _metaResource.field_2a = metaS.readSint32LE(); + _metaResource.protagStatesCount = metaS.readSint16LE(); + _metaResource.protagStatesResourceID = metaS.readSint32LE(); _metaResource.cutawayListResourceID = metaS.readSint32LE(); _metaResource.songTableID = metaS.readSint32LE(); free(resourcePointer); + + _vm->_actor->loadList(actorsEntrance, _metaResource.actorCount, + _metaResource.actorsResourceID, _metaResource.protagStatesCount, + _metaResource.protagStatesResourceID); } } // End of namespace Saga diff --git a/saga/rscfile.h b/saga/rscfile.h index fa603119c8..217e4b33d4 100644 --- a/saga/rscfile.h +++ b/saga/rscfile.h @@ -102,8 +102,8 @@ struct MetaResource { int32 protagFaceSpritesID; int32 field_22; int16 field_26; - int16 field_28; - int32 field_2a; + int16 protagStatesCount; + int32 protagStatesResourceID; int32 cutawayListResourceID; int32 songTableID; diff --git a/saga/scene.cpp b/saga/scene.cpp index cbf91a52f4..99ee820fe3 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -417,7 +417,7 @@ static struct SceneSubstitutes { } }; -void Scene::changeScene(uint16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType, int chapter) { +void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType, int chapter) { // This is used for latter demos where all places on world map except // Tent Faire are substituted with LBM picture and short description if (_vm->getFeatures() & GF_SCENE_SUBSTITUTES) { diff --git a/saga/scene.h b/saga/scene.h index adc9fe39db..5730fffac1 100644 --- a/saga/scene.h +++ b/saga/scene.h @@ -156,7 +156,7 @@ enum SceneLoadFlags { }; struct LoadSceneParams { - uint32 sceneDescriptor; + int32 sceneDescriptor; SceneLoadFlags loadFlag; SceneDescription* sceneDescription; SceneProc *sceneProc; @@ -248,7 +248,7 @@ class Scene { void clearSceneQueue(void) { _sceneQueue.clear(); } - void changeScene(uint16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType, int chapter = -1); + void changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType, int chapter = -1); void freeCutawayList(); bool isSceneLoaded() const { return _sceneLoaded; } -- cgit v1.2.3