[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.119,1.120 actor.h,1.30,1.31 costume.cpp,1.55,1.56 script_v5.cpp,1.108,1.109 script_v6.cpp,1.147,1.148
Max Horn
fingolfin at users.sourceforge.net
Sun Jun 1 11:21:13 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv26886
Modified Files:
actor.cpp actor.h costume.cpp script_v5.cpp script_v6.cpp
Log Message:
Enabled walk sounds in Indy3EGA/ZakEGA; cleanup (bug #747068)
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- actor.cpp 31 May 2003 16:09:09 -0000 1.119
+++ actor.cpp 1 Jun 2003 18:20:37 -0000 1.120
@@ -480,7 +480,7 @@
if (isInCurrentRoom() && costume != 0) {
animProgress = 0;
- cost.animCounter1 = 0;
+ cost.animCounter = 0;
needRedraw = true;
if (f == initFrame)
cost.reset();
@@ -689,7 +689,7 @@
walkdata.destx = -1;
moving = 0;
- cost.animCounter2 = 0;
+ cost.soundCounter = 0;
if (_vm->_features & GF_NEW_COSTUMES) {
stopActorMoving();
@@ -737,7 +737,7 @@
moving = 0;
}
visible = false;
- cost.animCounter2 = 0;
+ cost.soundCounter = 0;
needRedraw = false;
needBgReset = true;
}
@@ -789,11 +789,11 @@
int i;
for (i = 1; i < _numActors; i++) {
- if (_actors[i].cost.animCounter2 && _actors[i].isInCurrentRoom() && _actors[i].sound) {
+ if (_actors[i].cost.soundCounter && _actors[i].isInCurrentRoom() && _actors[i].sound) {
_currentScript = 0xFF;
_sound->addSoundToQueue(_actors[i].sound[0]);
for (i = 1; i < _numActors; i++) {
- _actors[i].cost.animCounter2 = 0;
+ _actors[i].cost.soundCounter = 0;
}
return;
}
@@ -1530,8 +1530,8 @@
MKLINE(Actor, talkStopFrame, sleByte, VER_V8),
MKLINE(Actor, speedx, sleUint16, VER_V8),
MKLINE(Actor, speedy, sleUint16, VER_V8),
- MKLINE(Actor, cost.animCounter1, sleUint16, VER_V8),
- MKLINE(Actor, cost.animCounter2, sleByte, VER_V8),
+ MKLINE(Actor, cost.animCounter, sleUint16, VER_V8),
+ MKLINE(Actor, cost.soundCounter, sleByte, VER_V8),
// Actor palette grew from 64 to 256 bytes
MKARRAY_OLD(Actor, palette[0], sleByte, 64, VER_V8, VER_V9),
Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- actor.h 31 May 2003 14:27:47 -0000 1.30
+++ actor.h 1 Jun 2003 18:20:38 -0000 1.31
@@ -50,8 +50,8 @@
struct CostumeData {
byte active[16];
- uint16 animCounter1;
- byte animCounter2;
+ uint16 animCounter;
+ byte soundCounter;
uint16 stopped;
uint16 curpos[16];
uint16 start[16];
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- costume.cpp 1 Jun 2003 14:30:24 -0000 1.55
+++ costume.cpp 1 Jun 2003 18:20:38 -0000 1.56
@@ -617,7 +617,12 @@
i = a->cost.curpos[slot] & 0x7FFF;
end = a->cost.end[slot];
code = _dataptr[i] & 0x7F;
-
+
+ if (_vm->_features & GF_AFTER_V2 || _vm->_features & GF_AFTER_V3) {
+ if (_dataptr[i] & 0x80)
+ a->cost.soundCounter++;
+ }
+
do {
if (!highflag) {
if (i++ >= end)
@@ -629,7 +634,7 @@
nc = _dataptr[i];
if (nc == 0x7C) {
- a->cost.animCounter1++;
+ a->cost.animCounter++;
if (a->cost.start[slot] != end)
continue;
} else {
@@ -641,7 +646,7 @@
}
} else {
if (nc == 0x78) {
- a->cost.animCounter2++;
+ a->cost.soundCounter++;
if (a->cost.start[slot] != end)
continue;
}
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- script_v5.cpp 1 Jun 2003 16:40:15 -0000 1.108
+++ script_v5.cpp 1 Jun 2003 18:20:38 -0000 1.109
@@ -1025,7 +1025,7 @@
getResultPos();
int act = getVarOrDirectByte(0x80);
Actor *a = derefActor(act, "o5_getAnimCounter");
- setResult(a->cost.animCounter1);
+ setResult(a->cost.animCounter);
}
void Scumm_v5::o5_getClosestObjActor() {
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- script_v6.cpp 1 Jun 2003 01:02:35 -0000 1.147
+++ script_v6.cpp 1 Jun 2003 18:20:38 -0000 1.148
@@ -1250,7 +1250,7 @@
void Scumm_v6::o6_getActorAnimCounter1() {
Actor *a = derefActor(pop(), "o6_getActorAnimCounter");
- push(a->cost.animCounter1);
+ push(a->cost.animCounter);
}
void Scumm_v6::o6_getAnimateVariable() {
More information about the Scummvm-git-logs
mailing list