aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2005-08-06 14:26:59 +0000
committerEugene Sandulenko2005-08-06 14:26:59 +0000
commit6886f7865ca1f440612a7e04c64f2c23ff309af8 (patch)
tree5a5fffc472a8999b0294a59fd2ce00d3bb386990
parent5b4ecd206d0012fcf96e3df4eceafb69609ce3b3 (diff)
downloadscummvm-rg350-6886f7865ca1f440612a7e04c64f2c23ff309af8.tar.gz
scummvm-rg350-6886f7865ca1f440612a7e04c64f2c23ff309af8.tar.bz2
scummvm-rg350-6886f7865ca1f440612a7e04c64f2c23ff309af8.zip
o Fix uint -> int with scene numbers
o WIP for metaResources svn-id: r18620
-rw-r--r--saga/actor.cpp4
-rw-r--r--saga/actor.h3
-rw-r--r--saga/rscfile.cpp9
-rw-r--r--saga/rscfile.h4
-rw-r--r--saga/scene.cpp2
-rw-r--r--saga/scene.h4
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; }