[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.377,1.378 intern.h,2.514,2.515 script_v100he.cpp,2.171,2.172 script_v80he.cpp,2.124,2.125 script_v90he.cpp,2.280,2.281
Gregory Montoir
cyx at users.sourceforge.net
Wed Aug 31 13:55:21 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11342/scumm
Modified Files:
actor.cpp intern.h script_v100he.cpp script_v80he.cpp
script_v90he.cpp
Log Message:
cleanup
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.377
retrieving revision 1.378
diff -u -d -r1.377 -r1.378
--- actor.cpp 15 Aug 2005 13:30:37 -0000 1.377
+++ actor.cpp 31 Aug 2005 20:54:51 -0000 1.378
@@ -173,7 +173,7 @@
int ScummEngine::getAngleFromPos(int x, int y) const {
if (_gameId == GID_DIG || _gameId == GID_CMI) {
double temp = atan2((double)x, (double)-y);
- return normalizeAngle((int)(temp * 180 / 3.1415926535));
+ return normalizeAngle((int)(temp * 180 / PI));
} else {
if (ABS(y) * 2 < ABS(x)) {
if (x > 0)
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.514
retrieving revision 2.515
diff -u -d -r2.514 -r2.515
--- intern.h 30 Jul 2005 21:11:26 -0000 2.514
+++ intern.h 31 Aug 2005 20:54:51 -0000 2.515
@@ -1100,9 +1100,9 @@
struct VideoParameters {
byte filename[260];
int32 status;
- int32 unk1;
+ int32 flags;
int32 unk2;
- int32 unk3;
+ int32 wizResNum;
};
VideoParameters _videoParams;
Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.171
retrieving revision 2.172
diff -u -d -r2.171 -r2.172
--- script_v100he.cpp 14 Aug 2005 01:41:52 -0000 2.171
+++ script_v100he.cpp 31 Aug 2005 20:54:51 -0000 2.172
@@ -2158,28 +2158,28 @@
_videoParams.status = 19;
break;
case 40:
- _videoParams.unk3 = pop();
- if (_videoParams.unk1)
- _videoParams.unk1 |= 2;
+ _videoParams.wizResNum = pop();
+ if (_videoParams.wizResNum)
+ _videoParams.flags |= 2;
break;
case 47:
copyScriptString(_videoParams.filename, sizeof(_videoParams.filename));
_videoParams.status = 47;
break;
case 67:
- _videoParams.unk1 |= pop();
+ _videoParams.flags |= pop();
break;
case 92:
if (_videoParams.status == 47) {
// Start video
- if (_videoParams.unk1 == 0)
- _videoParams.unk1 = 4;
+ if (_videoParams.flags == 0)
+ _videoParams.flags = 4;
- if (_videoParams.unk1 == 2) {
- // result = startVideo(_videoParams.filename, _videoParams.unk1, _videoParams.unk3);
+ if (_videoParams.flags == 2) {
+ // result = startVideo(_videoParams.filename, _videoParams.flags, _videoParams.wizResNum);
// VAR(119) = result;
} else {
- // result = startVideo(_videoParams.filename, _videoParams.unk1);
+ // result = startVideo(_videoParams.filename, _videoParams.flags);
// VAR(119) = result;
}
} else if (_videoParams.status == 19) {
Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.124
retrieving revision 2.125
diff -u -d -r2.124 -r2.125
--- script_v80he.cpp 30 Jul 2005 21:11:29 -0000 2.124
+++ script_v80he.cpp 31 Aug 2005 20:54:51 -0000 2.125
@@ -406,14 +406,12 @@
copyScriptString(filename, sizeof(filename));
Common::File f;
- if (f.open((char *)filename) == false) {
+ if (!f.open((char *)filename)) {
push(-1);
- return;
+ } else {
+ push(f.size());
+ f.close();
}
-
- f.seek(0, SEEK_END);
- push(f.pos());
- f.close();
}
void ScummEngine_v80he::o80_stringToInt() {
@@ -647,17 +645,17 @@
drawPixel(x, y, id);
}
- int var_C = 0;
+ int stepCount = 0;
int tmpX = 0;
int tmpY = 0;
for (int i = 0; i <= maxDist; i++) {
tmpX += absDX;
tmpY += absDY;
- int eax = 0;
+ int drawFlag = 0;
if (tmpX > maxDist) {
- eax = 1;
+ drawFlag = 1;
tmpX -= maxDist;
if (dx >= 0) {
@@ -667,7 +665,7 @@
}
}
if (tmpY > maxDist) {
- eax = dy;
+ drawFlag = dy;
tmpY -= maxDist;
if (dy >= 0) {
@@ -677,10 +675,10 @@
}
}
- if (eax == 0)
+ if (drawFlag == 0)
continue;
- if ((var_C++ % step) != 0 && maxDist != i)
+ if ((stepCount++ % step) != 0 && maxDist != i)
continue;
if (type == 2) {
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.280
retrieving revision 2.281
diff -u -d -r2.280 -r2.281
--- script_v90he.cpp 14 Aug 2005 01:41:52 -0000 2.280
+++ script_v90he.cpp 31 Aug 2005 20:54:51 -0000 2.281
@@ -519,16 +519,16 @@
_videoParams.status = status;
break;
case 5:
- _videoParams.unk1 |= pop();
+ _videoParams.flags |= pop();
break;
case 8:
memset(_videoParams.filename, 0, sizeof(_videoParams.filename));
_videoParams.unk2 = pop();
break;
case 14:
- _videoParams.unk3 = pop();
- if (_videoParams.unk1)
- _videoParams.unk1 |= 2;
+ _videoParams.wizResNum = pop();
+ if (_videoParams.wizResNum)
+ _videoParams.flags |= 2;
break;
case 116:
_videoParams.status = status;
@@ -536,14 +536,14 @@
case 206:
if (_videoParams.status == 49) {
// Start video
- if (_videoParams.unk1 == 0)
- _videoParams.unk1 = 4;
+ if (_videoParams.flags == 0)
+ _videoParams.flags = 4;
- if (_videoParams.unk1 == 2) {
- // result = startVideo(_videoParams.filename, _videoParams.unk1, _videoParams.unk3);
+ if (_videoParams.flags == 2) {
+ // result = startVideo(_videoParams.filename, _videoParams.flags, _videoParams.wizResNum);
// VAR(119) = result;
} else {
- // result = startVideo(_videoParams.filename, _videoParams.unk1);
+ // result = startVideo(_videoParams.filename, _videoParams.flags);
// VAR(119) = result;
}
} else if (_videoParams.status == 165) {
@@ -554,7 +554,7 @@
error("o90_videoOps: unhandled case %d", subOp);
}
- debug(0,"o90_videoOps stub (%d)", subOp);
+ debug(0, "o90_videoOps stub (%d)", subOp);
}
void ScummEngine_v90he::o90_getVideoData() {
@@ -578,7 +578,7 @@
case 31: // Get image number
pop();
break;
- case 107: // Get genreal property
+ case 107: // Get statistics
pop();
pop();
break;
@@ -587,7 +587,7 @@
}
push(-1);
- debug(0,"o90_getVideoData stub (%d)", subOp);
+ debug(0, "o90_getVideoData stub (%d)", subOp);
}
void ScummEngine_v90he::o90_wizImageOps() {
@@ -807,7 +807,7 @@
error("o90_wizImageOps: unhandled case %d", subOp);
}
- debug(1,"o90_wizImageOps (%d)", subOp);
+ debug(1, "o90_wizImageOps (%d)", subOp);
}
void ScummEngine_v90he::o90_getDistanceBetweenPoints() {
@@ -861,7 +861,7 @@
byte subOp = fetchScriptByte();
subOp -= 30;
- debug(1,"o90_getSpriteInfo (%d)", subOp);
+ debug(1, "o90_getSpriteInfo (%d)", subOp);
switch (subOp) {
case 0:
spriteId = pop();
@@ -1116,7 +1116,7 @@
byte subOp = fetchScriptByte();
subOp -= 34;
- debug(1,"o90_setSpriteInfo (%d)", subOp);
+ debug(1, "o90_setSpriteInfo (%d)", subOp);
switch (subOp) {
case 0:
args[0] = pop();
@@ -1447,7 +1447,7 @@
byte subOp = fetchScriptByte();
- debug(1,"o90_getSpriteGroupInfo (%d)", subOp);
+ debug(1, "o90_getSpriteGroupInfo (%d)", subOp);
switch (subOp) {
case 8: // HE 99+
spriteGroupId = pop();
@@ -1529,7 +1529,7 @@
byte subOp = fetchScriptByte();
subOp -= 37;
- debug(1,"o90_setSpriteGroupInfo (%d)", subOp);
+ debug(1, "o90_setSpriteGroupInfo (%d)", subOp);
switch (subOp) {
case 0:
type = pop() - 1;
@@ -1794,7 +1794,7 @@
default:
error("o90_floodState: Unknown case %d", subOp);
}
- debug(1,"o90_floodState stub (%d)", subOp);
+ debug(1, "o90_floodState stub (%d)", subOp);
}
void ScummEngine_v90he::o90_shl() {
@@ -2380,7 +2380,7 @@
default:
error("o90_getObjectData: Unknown case %d", subOp);
}
- debug(1,"o90_getObjectData (%d)", subOp);
+ debug(1, "o90_getObjectData (%d)", subOp);
}
void ScummEngine_v90he::o90_getPaletteData() {
@@ -2429,7 +2429,7 @@
default:
error("o90_getPaletteData: Unknown case %d", subOp);
}
- debug(1,"o90_getPaletteData stub (%d)", subOp);
+ debug(1, "o90_getPaletteData stub (%d)", subOp);
}
void ScummEngine_v90he::o90_paletteOps() {
@@ -2501,11 +2501,9 @@
default:
error("o90_paletteOps: Unknown case %d", subOp);
}
- debug(1,"o90_paletteOps (%d)", subOp);
+ debug(1, "o90_paletteOps (%d)", subOp);
}
-
-
void ScummEngine_v90he::o90_fontUnk() {
// Font related
byte string[80];
@@ -2536,7 +2534,7 @@
error("o90_fontUnk: Unknown case %d", subOp);
}
- debug(1,"o90_fontUnk stub (%d)", subOp);
+ debug(1, "o90_fontUnk stub (%d)", subOp);
}
void ScummEngine_v90he::o90_getActorAnimProgress() {
More information about the Scummvm-git-logs
mailing list