aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorAndrew Kurushin2005-06-15 19:26:32 +0000
committerAndrew Kurushin2005-06-15 19:26:32 +0000
commite0d9d4eb4a96d11b99d8fa5b9acba78fa57fcc94 (patch)
tree41033ba30c58c571fce8d54081763a13054f8466 /saga
parentc72e77885eb81f24bbe77e3a19e286e743804fd4 (diff)
downloadscummvm-rg350-e0d9d4eb4a96d11b99d8fa5b9acba78fa57fcc94.tar.gz
scummvm-rg350-e0d9d4eb4a96d11b99d8fa5b9acba78fa57fcc94.tar.bz2
scummvm-rg350-e0d9d4eb4a96d11b99d8fa5b9acba78fa57fcc94.zip
some renames
svn-id: r18397
Diffstat (limited to 'saga')
-rw-r--r--saga/actor.cpp11
-rw-r--r--saga/actor.h2
-rw-r--r--saga/puzzle.cpp8
-rw-r--r--saga/resnames.h9
-rw-r--r--saga/script.h2
-rw-r--r--saga/sthread.cpp2
6 files changed, 21 insertions, 13 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp
index f0af7df1be..6b029ec47d 100644
--- a/saga/actor.cpp
+++ b/saga/actor.cpp
@@ -1178,7 +1178,11 @@ void Actor::handleActions(int msec, bool setup) {
}
-int Actor::direct(int msec) {
+void Actor::direct(int msec) {
+
+ if (_vm->_scene->_entryList.entryListCount == 0) {
+ return;
+ }
// FIXME: HACK. This should be turned into cycle event.
_lastTickMsec += msec;
@@ -1191,7 +1195,6 @@ int Actor::direct(int msec) {
//process speech
handleSpeech(msec);
- return SUCCESS;
}
@@ -1315,6 +1318,10 @@ void Actor::drawActors() {
return;
}
+ if (_vm->_scene->_entryList.entryListCount == 0) {
+ return;
+ }
+
CommonObjectOrderList::iterator drawOrderIterator;
CommonObjectDataPointer drawObject;
int frameNumber;
diff --git a/saga/actor.h b/saga/actor.h
index e1ebbb61cb..2c5ac3cc5a 100644
--- a/saga/actor.h
+++ b/saga/actor.h
@@ -487,7 +487,7 @@ public:
return (objectType == kGameObjectObject) ? getObj(id)->flags : getActor(id)->flags;
}
- int direct(int msec);
+ void direct(int msec);
void drawActors();
void updateActorsScene(int actorsEntrance); // calls from scene loading to update Actors info
diff --git a/saga/puzzle.cpp b/saga/puzzle.cpp
index bc3b2fb5e3..6fcfd815fd 100644
--- a/saga/puzzle.cpp
+++ b/saga/puzzle.cpp
@@ -242,7 +242,7 @@ void Puzzle::exitPuzzle(void) {
}
void Puzzle::initPieces(void) {
- ActorData *puzzle = _vm->_actor->getActor(_vm->_actor->actorIndexToId(RID_ITE_ACTOR_PUZZLE));
+ ActorData *puzzle = _vm->_actor->getActor(_vm->_actor->actorIndexToId(ITE_ACTOR_PUZZLE));
SpriteInfo *spI;
for (int i = 0; i < PUZZLE_PIECES; i++) {
@@ -260,7 +260,7 @@ void Puzzle::initPieces(void) {
}
void Puzzle::showPieces(void) {
- ActorData *puzzle = _vm->_actor->getActor(_vm->_actor->actorIndexToId(RID_ITE_ACTOR_PUZZLE));
+ ActorData *puzzle = _vm->_actor->getActor(_vm->_actor->actorIndexToId(ITE_ACTOR_PUZZLE));
SURFACE *backBuffer = _vm->_gfx->getBackBuffer();
for (int j = PUZZLE_PIECES - 1 ; j >= 0; j--) {
@@ -273,7 +273,7 @@ void Puzzle::showPieces(void) {
}
void Puzzle::drawCurrentPiece() {
- ActorData *puzzle = _vm->_actor->getActor(_vm->_actor->actorIndexToId(RID_ITE_ACTOR_PUZZLE));
+ ActorData *puzzle = _vm->_actor->getActor(_vm->_actor->actorIndexToId(ITE_ACTOR_PUZZLE));
SURFACE *backBuffer = _vm->_gfx->getBackBuffer();
_vm->_sprite->draw(backBuffer, puzzle->spriteList, _puzzlePiece,
@@ -402,7 +402,7 @@ void Puzzle::dropPiece(Point mousePt) {
// if the center is within the box quantize within
// else move it back to its original start point
if (mousePt.x >= boxx && mousePt.x < boxw && mousePt.y >= boxy && mousePt.y <= boxh) {
- ActorData *puzzle = _vm->_actor->getActor(_vm->_actor->actorIndexToId(RID_ITE_ACTOR_PUZZLE));
+ ActorData *puzzle = _vm->_actor->getActor(_vm->_actor->actorIndexToId(ITE_ACTOR_PUZZLE));
SpriteInfo *spI;
int newx = mousePt.x - _pieceInfo[_puzzlePiece].offX;
int newy = mousePt.y - _pieceInfo[_puzzlePiece].offY;
diff --git a/saga/resnames.h b/saga/resnames.h
index 17290e97f4..cd362d7ea3 100644
--- a/saga/resnames.h
+++ b/saga/resnames.h
@@ -43,10 +43,15 @@ namespace Saga {
//obj names
#define ITE_OBJ_MAP 14
+//actor names
+#define ITE_ACTOR_PUZZLE 176
+
// SCENES
#define ITE_SCENE_INV -1
#define ITE_SCENE_PUZZLE 26
#define ITE_SCENE_LODGE 21
+#define ITE_SCENE_ENDCREDIT1 295
+
#define ITE_DEFAULT_SCENE 32
#define IHNM_DEFAULT_SCENE 152
@@ -114,10 +119,6 @@ namespace Saga {
#define RID_ITE_INTRO_IMG_3 1561
#define RID_ITE_INTRO_IMG_4 1565
-#define RID_ITE_ENDCREDIT_SCENE_1 1802
-
-#define RID_ITE_ACTOR_PUZZLE 176
-
// ITE_VOICES
#define RID_CAVE_VOICE_0 0
#define RID_CAVE_VOICE_1 1
diff --git a/saga/script.h b/saga/script.h
index 722052e32c..5969664be7 100644
--- a/saga/script.h
+++ b/saga/script.h
@@ -521,7 +521,7 @@ private:
void sfScriptClimb(SCRIPTFUNC_PARAMS);
void sfSetDoorState(SCRIPTFUNC_PARAMS);
void sfSetActorZ(SCRIPTFUNC_PARAMS);
- void SF_text(SCRIPTFUNC_PARAMS);
+ void sfScriptText(SCRIPTFUNC_PARAMS);
void sfGetActorX(SCRIPTFUNC_PARAMS);
void sfGetActorY(SCRIPTFUNC_PARAMS);
void sfEraseDelta(SCRIPTFUNC_PARAMS);
diff --git a/saga/sthread.cpp b/saga/sthread.cpp
index 42cba6bda6..19cbbdb91f 100644
--- a/saga/sthread.cpp
+++ b/saga/sthread.cpp
@@ -341,7 +341,7 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) {
error("Script::runThread() Invalid script function number (%d)", functionNumber);
}
- debug(8, "Calling 0x%X %s", functionNumber, _scriptFunctionsList[functionNumber].scriptFunctionName);
+ debug(8, "Calling 0x%X %s argCount=%i", functionNumber, _scriptFunctionsList[functionNumber].scriptFunctionName, argumentsCount);
scriptFunction = _scriptFunctionsList[functionNumber].scriptFunction;
checkStackTopIndex = thread->_stackTopIndex + argumentsCount;