[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.4,1.5 script_v2.cpp,1.21,1.22
James Brown
ender at users.sourceforge.net
Sat Oct 5 23:37:01 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.3,1.4 imuse.cpp,1.35,1.36 script_v2.cpp,1.20,1.21 scumm.h,1.34,1.35 string.cpp,1.24,1.25
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,1.22,1.23 string.cpp,1.25,1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv27373/scumm
Modified Files:
akos.cpp script_v2.cpp
Log Message:
Reverse experimental AKOS codec 5 rewrite.
This rewrite causes touching the ladder at the Fuel Tower to crash
ScummVM again (in Full Throttle)
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- akos.cpp 6 Oct 2002 06:09:32 -0000 1.4
+++ akos.cpp 6 Oct 2002 06:36:22 -0000 1.5
@@ -860,136 +860,60 @@
void AkosRenderer::codec5()
{
VirtScreen *vs;
+ BompDrawData bdd;
- int left, right, top, bottom;
-
- byte *src, *dest;
- int src_x, src_y;
- uint dst_x, dst_y;
+ int moveX;
+ int moveY;
+ int left;
+ int var_20;
+ int max_width;
- bool masking;
- byte maskbit;
- const byte *mask = NULL;
+ int right;
+ int top;
+ int bottom;
- // I don't know if this is complete. It used to simply call drawBomp()
- // to draw an unscaled image, but I don't know if that was because it
- // will never have to scale, or if it's because until quite recently
- // drawBomp() didn't know how to scale images.
- //
- // What I do know is that drawBomp() doesn't care about masking and
- // shadows, and these are both needed for Full Throttle.
-
vs = &_vm->virtscr[0];
+ //setBlastObjectMode(shadow_mode); // not implemented yet
+ moveX = move_x_cur;
+ moveY = move_y_cur;
if (!mirror) {
- left = (x - move_x_cur - width) + 1;
+ left = (x - moveX - width) + 1;
} else {
- left = x + move_x_cur - 1;
+ left = x + moveX - 1;
}
- right = left + width;
- top = y + move_y_cur;
- bottom = top + height + 1;
+ var_20 = 0;
+ max_width = outwidth;
+
+ right = left + width - 1;
+ top = y + moveY;
+ bottom = top + height;
if (left < 0)
left = 0;
- if (left > (int) outwidth)
- left -= left - outwidth;
-
- if (top < draw_top)
- draw_top = top;
- if (bottom > draw_bottom)
- draw_bottom = bottom;
-
- _vm->updateDirtyRect(0, left, right, top, bottom, 1 << dirty_id);
-
- masking = false;
- if (clipping) {
- masking = _vm->isMaskActiveAt(left, top, right, bottom,
- _vm->getResourceAddress(rtBuffer, 9) +
- _vm->gdi._imgBufOffs[clipping] +
- _vm->_screenStartStrip) != 0;
- }
-
- v1.mask_ptr = NULL;
-
- if (masking || charsetmask || shadow_mode) {
- v1.mask_ptr = _vm->getResourceAddress(rtBuffer, 9) +
- top * 40 + _vm->_screenStartStrip;
- v1.imgbufoffs = _vm->gdi._imgBufOffs[clipping];
- if (!charsetmask && masking) {
- v1.mask_ptr += v1.imgbufoffs;
- v1.imgbufoffs = 0;
- }
- }
+ if (left > max_width)
+ left -= left - max_width;
- src = srcptr;
- dest = outptr + top * outwidth + left + 1;
+ // Yazoo: this is not correct, but fix a lots of bugs for the momment
- for (src_y = 0, dst_y = top; src_y < height; src_y++) {
- byte code, color;
- uint len, num, i;
- byte *d = dest;
+ draw_top = 0;
+ draw_bottom = vs->height;
- if (dst_y < 0 || dst_y >= outheight) {
- src += READ_LE_UINT16(src) + 2;
- mask += 40;
- continue;
- }
+ _vm->updateDirtyRect(0, left, right + 1, top, bottom + 1, 1 << dirty_id);
- len = width;
- src_x = 0;
- dst_x = left + 1;
- src += 2;
+ bdd.dataptr = srcptr;
+ bdd.out = outptr;
+ bdd.outheight = outheight;
+ bdd.outwidth = outwidth;
+ bdd.scale_x = 0xFF;
+ bdd.scale_y = 0xFF;
+ bdd.srcheight = height;
+ bdd.srcwidth = width;
+ bdd.x = left + 1;
+ bdd.y = top;
- while (src_x <width) {
- code = *src++;
- num = (code >> 1) + 1;
- if (num > len)
- num = len;
- len -= num;
- if (code & 1) {
- color = *src++;
- for (i = 0; i < num; i++) {
- if (dst_x >= 0 && dst_x < outwidth) {
- if (color != 255) {
- if (v1.mask_ptr)
- mask = v1.mask_ptr + (dst_x >> 3);
- maskbit = revBitMask[dst_x & 7];
- if (shadow_mode && color == 13)
- color = shadow_table[*d];
- if (!mask || !((mask[0] | mask[v1.imgbufoffs]) & maskbit))
- *d = color;
- }
- }
- d++;
- dst_x++;
- src_x++;
- }
- } else {
- for (i = 0; i < num; i++) {
- color = src[i];
- if (dst_x >= 0 && dst_x < outwidth) {
- if (color != 255) {
- if (v1.mask_ptr)
- mask = v1.mask_ptr + (dst_x >> 3);
- maskbit = revBitMask[dst_x & 7];
- if (shadow_mode && color == 13)
- color = shadow_table[*d];
- if (!mask || !((mask[0] | mask[v1.imgbufoffs]) & maskbit))
- *d = color;
- }
- }
- d++;
- dst_x++;
- src_x++;
- }
- src += num;
- }
- }
- dest += outwidth;
- dst_y++;
- }
+ _vm->drawBomp(&bdd, 0, bdd.dataptr, 0, 0);
}
void AkosRenderer::codec16()
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- script_v2.cpp 6 Oct 2002 06:09:32 -0000 1.21
+++ script_v2.cpp 6 Oct 2002 06:36:22 -0000 1.22
@@ -2736,11 +2736,51 @@
speed = 71;
else
speed = 1000 / _insaneFlag;
- if (args[1] == 1) printf("startSmush one is true\n");
- if (args[2] == 1) printf("startSmush two is true\n");
+
+ debug(1, "INSANE Arg: %d", args[1]);
+
ScummRenderer * sr = new ScummRenderer(this, speed);
SmushPlayer * sp = new SmushPlayer(sr);
- sp->play((char*)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
+
+ // INSANE mode 0: SMUSH movie playback
+ if (args[1] == 0) {
+ sp->play((char*)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
+ } else if (_gameId == GID_FT) {
+ // Full Throttle INSANE modes
+ switch (args[1]) {
+ case 0:
+ sp->play("minedriv.san", getGameDataPath());
+ break;
+ case 1:
+ sp->play("tovista2.san", getGameDataPath());
+ break;
+ case 2:
+ sp->play("tovista1.san", getGameDataPath());
+ break;
+ case 3:
+ sp->play("minefite.san", getGameDataPath());
+ break;
+ case 4:
+ sp->play("rottopen.san", getGameDataPath());
+ break;
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ warning("FT_INSANE mode %d: Stub", args[1]);
+ break;
+ case 9:
+ sp->play("credits.san", getGameDataPath());
+ default:
+ // Other INSANE modes
+ warning("Unknown FT_INSANE mode for %d", args[1]);
+ sp->play((char*)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
+ }
+ } else {
+ // Other INSANE modes
+ warning("Unknown insane mode for %d", args[1]);
+ sp->play((char*)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
+ }
delete sp;
delete sr;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.3,1.4 imuse.cpp,1.35,1.36 script_v2.cpp,1.20,1.21 scumm.h,1.34,1.35 string.cpp,1.24,1.25
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,1.22,1.23 string.cpp,1.25,1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list