[Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.140,1.141 script.h,1.84,1.85 sfuncs.cpp,1.122,1.123
Andrew Kurushin
h00ligan at users.sourceforge.net
Sun Jun 12 14:24:31 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.139,1.140 actor.h,1.77,1.78 isomap.cpp,1.49,1.50
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.507,2.508 script_v100he.cpp,2.164,2.165 script_v6.cpp,1.442,1.443 script_v6he.cpp,2.159,2.160 script_v72he.cpp,2.299,2.300 script_v7he.cpp,2.161,2.162 script_v8.cpp,2.295,2.296 script_v80he.cpp,2.120,2.121 script_v90he.cpp,2.271,2.272 scumm.h,1.632,1.633 string.cpp,1.294,1.295
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17442
Modified Files:
actor.cpp script.h sfuncs.cpp
Log Message:
fixed scene entrance
implemented sfEraseDelta, sfSetActorZ, sfGetActorX, sfGetActorY
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/actor.cpp,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- actor.cpp 12 Jun 2005 15:58:35 -0000 1.140
+++ actor.cpp 12 Jun 2005 21:21:14 -0000 1.141
@@ -602,7 +602,7 @@
assert(_protagonist);
- if (actorsEntrance >= 0) {
+ if ((actorsEntrance >= 0) && (_vm->_scene->_entryList.entryListCount > 0)) {
sceneEntry = _vm->_scene->_entryList.getEntry(actorsEntrance);
if (_vm->_scene->getFlags() & kSceneFlagISO) {
_protagonist->location = sceneEntry->location;
Index: script.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script.h,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- script.h 5 Jun 2005 16:53:53 -0000 1.84
+++ script.h 12 Jun 2005 21:21:14 -0000 1.85
@@ -520,11 +520,11 @@
void sfChangeActorScene(SCRIPTFUNC_PARAMS);
void sfScriptClimb(SCRIPTFUNC_PARAMS);
void sfSetDoorState(SCRIPTFUNC_PARAMS);
- void SF_setActorZ(SCRIPTFUNC_PARAMS);
+ void sfSetActorZ(SCRIPTFUNC_PARAMS);
void SF_text(SCRIPTFUNC_PARAMS);
- void SF_getActorX(SCRIPTFUNC_PARAMS);
- void SF_getActorY(SCRIPTFUNC_PARAMS);
- void SF_eraseDelta(SCRIPTFUNC_PARAMS);
+ void sfGetActorX(SCRIPTFUNC_PARAMS);
+ void sfGetActorY(SCRIPTFUNC_PARAMS);
+ void sfEraseDelta(SCRIPTFUNC_PARAMS);
void sfPlayMusic(SCRIPTFUNC_PARAMS);
void SF_pickClimbOutPos(SCRIPTFUNC_PARAMS);
void SF_tossRif(SCRIPTFUNC_PARAMS);
Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- sfuncs.cpp 5 Jun 2005 16:53:53 -0000 1.122
+++ sfuncs.cpp 12 Jun 2005 21:21:14 -0000 1.123
@@ -109,11 +109,11 @@
OPCODE(sfChangeActorScene),
OPCODE(sfScriptClimb),
OPCODE(sfSetDoorState),
- OPCODE(SF_setActorZ),
+ OPCODE(sfSetActorZ),
OPCODE(SF_text),
- OPCODE(SF_getActorX),
- OPCODE(SF_getActorY),
- OPCODE(SF_eraseDelta),
+ OPCODE(sfGetActorX),
+ OPCODE(sfGetActorY),
+ OPCODE(sfEraseDelta),
OPCODE(sfPlayMusic),
OPCODE(SF_pickClimbOutPos),
OPCODE(SF_tossRif),
@@ -1476,11 +1476,18 @@
}
// Script function #58 (0x3A)
-void Script::SF_setActorZ(SCRIPTFUNC_PARAMS) {
- int param1 = thread->pop();
- int param2 = thread->pop();
+// Param1: actor id
+// Param2: z
+void Script::sfSetActorZ(SCRIPTFUNC_PARAMS) {
+ int16 actorId;
+ int16 z;
+ ActorData *actor;
- error("STUB: SF_setActorZ(%d, %d)", param1, param2);
+ actorId = thread->pop();
+ z = thread->pop();
+
+ actor = _vm->_actor->getActor(actorId);
+ actor->location.z = z;
}
// Script function #59 (0x3B)
@@ -1492,25 +1499,45 @@
}
// Script function #60 (0x3C)
-void Script::SF_getActorX(SCRIPTFUNC_PARAMS) {
- int16 param = thread->pop();
+// Param1: actor id
+void Script::sfGetActorX(SCRIPTFUNC_PARAMS) {
+ int16 actorId;
+ ActorData *actor;
- error("STUB: SF_getActorX(%d)", param);
+ actorId = thread->pop();
+ actor = _vm->_actor->getActor(actorId);
+
+ thread->_returnValue = actor->location.x >> 2;
}
// Script function #61 (0x3D)
-void Script::SF_getActorY(SCRIPTFUNC_PARAMS) {
- int16 param = thread->pop();
+// Param1: actor id
+void Script::sfGetActorY(SCRIPTFUNC_PARAMS) {
+ int16 actorId;
+ ActorData *actor;
- error("STUB: SF_getActorY(%d)", param);
+ actorId = thread->pop();
+ actor = _vm->_actor->getActor(actorId);
+
+ thread->_returnValue = actor->location.y >> 2;
}
// Script function #62 (0x3E)
-void Script::SF_eraseDelta(SCRIPTFUNC_PARAMS) {
- for (int i = 0; i < nArgs; i++)
- thread->pop();
+void Script::sfEraseDelta(SCRIPTFUNC_PARAMS) {
+ BUFFER_INFO bufferInfo;
+ SCENE_BGINFO backGroundInfo;
+ Point backGroundPoint;
+
+ _vm->_render->getBufferInfo(&bufferInfo);
+ _vm->_scene->getBGInfo(&backGroundInfo);
+ backGroundPoint.x = backGroundInfo.bg_x;
+ backGroundPoint.y = backGroundInfo.bg_y;
+
+ bufToBuffer(bufferInfo.bg_buf, bufferInfo.bg_buf_w, bufferInfo.bg_buf_h,
+ backGroundInfo.bg_buf, backGroundInfo.bg_w, backGroundInfo.bg_h,
+ NULL, &backGroundPoint);
+
- error("STUB: SF_eraseDelta(), %d args", nArgs);
}
// Script function #63 (0x3F)
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/saga actor.cpp,1.139,1.140 actor.h,1.77,1.78 isomap.cpp,1.49,1.50
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.507,2.508 script_v100he.cpp,2.164,2.165 script_v6.cpp,1.442,1.443 script_v6he.cpp,2.159,2.160 script_v72he.cpp,2.299,2.300 script_v7he.cpp,2.161,2.162 script_v8.cpp,2.295,2.296 script_v80he.cpp,2.120,2.121 script_v90he.cpp,2.271,2.272 scumm.h,1.632,1.633 string.cpp,1.294,1.295
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list