[Scummvm-cvs-logs] CVS: scummvm actor.cpp,1.14,1.15 akos.cpp,1.1,1.2 debug.cpp,1.10,1.11 gfx.cpp,1.22,1.23 object.cpp,1.15,1.16 saveload.cpp,1.17,1.18 script_v1.cpp,1.15,1.16 script_v2.cpp,1.13,1.14 scumm.h,1.30,1.31 sdl.cpp,1.22,1.23 sound.cpp,1.9,1.10
Ludvig Strigeus
strigeus at users.sourceforge.net
Tue Nov 27 09:57:08 CET 2001
- Previous message: [Scummvm-cvs-logs] CVS: scummvm akos.cpp,NONE,1.1 actor.cpp,1.13,1.14 boxes.cpp,1.4,1.5 costume.cpp,1.10,1.11 debug.cpp,1.9,1.10 gfx.cpp,1.21,1.22 gui.cpp,1.4,1.5 object.cpp,1.14,1.15 resource.cpp,1.21,1.22 saveload.cpp,1.16,1.17 script.cpp,1.11,1.12 script_v1.cpp,1.14,1.15 script_v2.cpp,1.12,1.13 scumm.h,1.29,1.30 scummvm.cpp,1.27,1.28 scummvm.dsp,1.13,1.14 sound.cpp,1.8,1.9 string.cpp,1.10,1.11 verbs.cpp,1.10,1.11 windows.cpp,1.18,1.19
- Next message: [Scummvm-cvs-logs] CVS: scummvm windows.cpp,1.19,1.20
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv12279
Modified Files:
actor.cpp akos.cpp debug.cpp gfx.cpp object.cpp saveload.cpp
script_v1.cpp script_v2.cpp scumm.h sdl.cpp sound.cpp
Log Message:
some BOMP support,
some fixes
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** actor.cpp 2001/11/26 19:57:57 1.14
--- actor.cpp 2001/11/27 17:56:04 1.15
***************
*** 56,60 ****
a->ignoreBoxes = 0;
! a->neverZClip = 0;
a->new_3 = 0;
a->initFrame = 1;
--- 56,60 ----
a->ignoreBoxes = 0;
! a->forceClip = 0;
a->new_3 = 0;
a->initFrame = 1;
***************
*** 774,777 ****
--- 774,778 ----
if (a->costume) {
CHECK_HEAP
+ getMaskFromBox(a->walkbox);
drawActorCostume(a);
CHECK_HEAP
***************
*** 787,792 ****
if (c->_zbuf > gdi._numZBuffer)
c->_zbuf = (byte)gdi._numZBuffer;
! if (a->neverZClip)
! c->_zbuf = a->neverZClip;
c->_scaleX = a->scalex;
--- 788,793 ----
if (c->_zbuf > gdi._numZBuffer)
c->_zbuf = (byte)gdi._numZBuffer;
! if (a->forceClip)
! c->_zbuf = a->forceClip;
c->_scaleX = a->scalex;
***************
*** 1025,1028 ****
--- 1026,1030 ----
a->walkdata.destdir = dir;
a->moving = (a->moving&2)|1;
+ a->walkdata.curbox = a->walkbox;
}
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/akos.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** akos.cpp 2001/11/26 19:57:57 1.1
--- akos.cpp 2001/11/27 17:56:04 1.2
***************
*** 385,388 ****
--- 385,389 ----
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFE,
+
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
***************
*** 417,420 ****
--- 418,422 ----
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFE,
+
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/debug.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** debug.cpp 2001/11/26 19:57:57 1.10
--- debug.cpp 2001/11/27 17:56:04 1.11
***************
*** 199,203 ****
if (a->visible)
printf("|%2d|%4d|%3d %3d|%4d|%3d|%5d|%3d|%3d|%2d|%5d|%5d|%3d|%3d|\n",
! i,a->room,a->x,a->y,a->elevation,a->costume,a->width,a->walkbox,a->moving,a->neverZClip,a->frame,a->scalex,a->speedx,a->facing);
}
}
--- 199,203 ----
if (a->visible)
printf("|%2d|%4d|%3d %3d|%4d|%3d|%5d|%3d|%3d|%2d|%5d|%5d|%3d|%3d|\n",
! i,a->room,a->x,a->y,a->elevation,a->costume,a->width,a->walkbox,a->moving,a->forceClip,a->frame,a->scalex,a->speedx,a->facing);
}
}
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** gfx.cpp 2001/11/26 19:57:57 1.22
--- gfx.cpp 2001/11/27 17:56:04 1.23
***************
*** 1999,2001 ****
--- 1999,2092 ----
void Scumm::setupShadowPalette(int slot,int rfact,int gfact,int bfact,int from,int to) {
+ }
+
+ void Scumm::drawBomp(BompDrawData *bd) {
+ byte *dest = bd->out + bd->y * bd->outwidth, *src;
+ int h = bd->srcheight;
+ bool inside;
+
+ if (h==0 || bd->srcwidth==0)
+ return;
+
+ inside = (bd->x>=0) && (bd->y>=0) &&
+ (bd->x <= bd->outwidth - bd->srcwidth) &&
+ (bd->y <= bd->outheight - bd->srcheight);
+ assert(_objs[2].obj_nr == 36);
+
+ if (1 || bd->scale_x==255 && bd->scale_y==255) {
+ /* Routine used when no scaling is needed */
+ if (inside) {
+ dest += bd->x;
+ src = bd->dataptr;
+ do {
+ byte code,color;
+ uint len = bd->srcwidth, num, i;
+ byte *d = dest;
+ src += 2;
+ do {
+ code = *src++;
+ num = (code>>1)+1;
+ if (num>len) num=len;
+ len -= num;
+ if (code&1) {
+ color = *src++;
+ if (color!=255) {
+ do *d++ = color; while (--num);
+ } else {
+ d += num;
+ }
+ } else {
+ for(i=0;i<num; i++)
+ if ( (color=src[i]) != 255)
+ d[i] = color;
+ d += num;
+ src += num;
+ }
+ } while (len);
+ dest += bd->outwidth;
+ } while (--h);
+ } else {
+ uint y = bd->y;
+ src = bd->dataptr;
+
+ do {
+ byte color,code;
+ uint len, num;
+ uint x;
+ if ((uint)y >= (uint)bd->outheight) {
+ src += READ_LE_UINT16(src) + 2;
+ continue;
+ }
+ len = bd->srcwidth;
+ x = bd->x;
+
+ src += 2;
+ do {
+ byte code = *src++;
+ num = (code>>1)+1;
+ if (num>len) num=len;
+ len -= num;
+ if (code&1) {
+ if ((color = *src++)!=255) {
+ do {
+ if ((uint)x < (uint)bd->outwidth)
+ dest[x] = color;
+ } while (++x,--num);
+ } else {
+ x += num;
+ }
+ } else {
+ do {
+ if ((color=*src++) != 255 && (uint)x < (uint)bd->outwidth)
+ dest[x] = color;
+ } while (++x,--num);
+ }
+ } while (len);
+ } while (dest += bd->outwidth,y++,--h);
+ }
+ } else {
+ /* scaling of bomp images not supported yet */
+ }
+ CHECK_HEAP
+ assert(_objs[2].obj_nr == 36);
}
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** object.cpp 2001/11/26 19:57:57 1.15
--- object.cpp 2001/11/27 17:56:04 1.16
***************
*** 233,237 ****
for(i=1; i<=_numObjectsInRoom; i++) {
od = &_objs[i];
! if (!od->obj_nr || !od->state || od->fl_object_index)
continue;
do {
--- 233,237 ----
for(i=1; i<=_numObjectsInRoom; i++) {
od = &_objs[i];
! if (!od->obj_nr || !od->state)
continue;
do {
***************
*** 922,925 ****
--- 922,927 ----
byte *dataptr;
+ BompDrawData bdd;
+
vs = &virtscr[0];
***************
*** 929,936 ****
--- 931,940 ----
roomptr = getResourceAddress(1, _roomResource);
index = getObjectIndex(eo->a);
+ assert(index != -1);
ptr = roomptr + _objs[index].offs_obim_to_room;
} else if (eo->a!=0) {
od = &_objs[getObjectIndex(eo->a)];
ptr = getResourceAddress(rtFlObject, od->fl_object_index);
+ assert(ptr);
ptr = findResource(MKID('OBIM'), ptr);
} else {
***************
*** 939,961 ****
}
ptr = findResource(MKID('IM01'), ptr);
bomp = findResource(MKID('BOMP'), ptr);
! width = READ_LE_UINT16(&((BompHeader*)bomp)->width);
! height = READ_LE_UINT16(&((BompHeader*)bomp)->height);
! outptr = getResourceAddress(rtBuffer, vs->number+1) + vs->xstart;
! x = eo->x;
! y = eo->y;
if (eo->a) {
! dataptr = bomp + 18;
}
-
- // debug(1, "drawEnqueuedObject(%d,%d,%d,%d,%d, %d,%d,%d,%d,%d,%d,%d)",
- // eo->x, eo->y, eo->width, eo->height, eo->a, eo->b, eo->c, eo->d, eo->e, eo->j, eo->k, eo->l);
-
- updateDirtyRect(vs->number, x, x+width,y,y+height,0);
}
--- 943,968 ----
}
+ assert(ptr);
ptr = findResource(MKID('IM01'), ptr);
+ assert(ptr);
bomp = findResource(MKID('BOMP'), ptr);
! bdd.srcwidth = READ_LE_UINT16(&((BompHeader*)bomp)->width);
! bdd.srcheight = READ_LE_UINT16(&((BompHeader*)bomp)->height);
! bdd.out = getResourceAddress(rtBuffer, vs->number+1) + vs->xstart;
! bdd.outwidth = 320;
! bdd.outheight = vs->height;
! bdd.dataptr = bomp + 18;
! bdd.x = eo->x;
! bdd.y = eo->y;
! bdd.scale_x = eo->j;
! bdd.scale_y = eo->k;
! updateDirtyRect(vs->number, bdd.x, bdd.x+bdd.srcwidth, bdd.y, bdd.y+bdd.srcheight, 0);
if (eo->a) {
! drawBomp(&bdd);
}
}
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saveload.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** saveload.cpp 2001/11/26 19:57:57 1.17
--- saveload.cpp 2001/11/27 17:56:04 1.18
***************
*** 224,228 ****
MKLINE(Actor,moving,sleByte),
MKLINE(Actor,ignoreBoxes,sleByte),
! MKLINE(Actor,neverZClip,sleByte),
MKLINE(Actor,initFrame,sleByte),
MKLINE(Actor,walkFrame,sleByte),
--- 224,228 ----
MKLINE(Actor,moving,sleByte),
MKLINE(Actor,ignoreBoxes,sleByte),
! MKLINE(Actor,forceClip,sleByte),
MKLINE(Actor,initFrame,sleByte),
MKLINE(Actor,walkFrame,sleByte),
Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** script_v1.cpp 2001/11/26 19:57:57 1.15
--- script_v1.cpp 2001/11/27 17:56:04 1.16
***************
*** 440,451 ****
break;
case 18: /* neverzclip */
! a->neverZClip = 0;
break;
case 19: /* setzclip */
! a->neverZClip = getVarOrDirectByte(0x80);
break;
case 20: /* ignoreboxes */
a->ignoreBoxes = 1;
! a->neverZClip = 0;
FixRoom:
if (a->room==_currentRoom)
--- 440,451 ----
break;
case 18: /* neverzclip */
! a->forceClip = 0;
break;
case 19: /* setzclip */
! a->forceClip = getVarOrDirectByte(0x80);
break;
case 20: /* ignoreboxes */
a->ignoreBoxes = 1;
! a->forceClip = 0;
FixRoom:
if (a->room==_currentRoom)
***************
*** 454,458 ****
case 21: /* followboxes */
a->ignoreBoxes = 0;
! a->neverZClip = 0;
goto FixRoom;
--- 454,458 ----
case 21: /* followboxes */
a->ignoreBoxes = 0;
! a->forceClip = 0;
goto FixRoom;
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** script_v2.cpp 2001/11/26 19:57:57 1.13
--- script_v2.cpp 2001/11/27 17:56:04 1.14
***************
*** 730,734 ****
case 0x99:
a = pop();
! setCursorImg(a, pop(), 1);
break;
case 0x9A:
--- 730,734 ----
case 0x99:
a = pop();
! setCursorImg(pop(), a, 1);
break;
case 0x9A:
***************
*** 1476,1488 ****
break;
case 93:
! a->neverZClip = 0;
break;
case 225:
case 94:
! a->neverZClip = pop();
break;
case 95:
a->ignoreBoxes = 1;
! a->neverZClip = 0;
FixRooms:;
if (a->room==_currentRoom)
--- 1476,1488 ----
break;
case 93:
! a->forceClip = 0;
break;
case 225:
case 94:
! a->forceClip = pop();
break;
case 95:
a->ignoreBoxes = 1;
! a->forceClip = 0;
FixRooms:;
if (a->room==_currentRoom)
***************
*** 1491,1495 ****
case 96:
a->ignoreBoxes = 0;
! a->neverZClip = 0;
goto FixRooms;
case 97:
--- 1491,1495 ----
case 96:
a->ignoreBoxes = 0;
! a->forceClip = 0;
goto FixRooms;
case 97:
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** scumm.h 2001/11/26 19:57:57 1.30
--- scumm.h 2001/11/27 17:56:04 1.31
***************
*** 633,636 ****
--- 633,645 ----
};
+ struct BompDrawData {
+ byte *out;
+ int outwidth, outheight;
+ int x,y;
+ byte scale_x, scale_y;
+ byte *dataptr;
+ int srcwidth, srcheight;
+ };
+
struct CostumeRenderer {
Scumm *_vm;
***************
*** 703,707 ****
byte moving;
byte ignoreBoxes;
! byte neverZClip;
byte initFrame,walkFrame,standFrame,talkFrame1,talkFrame2;
bool needRedraw, needBgReset,costumeNeedsInit,visible;
--- 712,716 ----
byte moving;
byte ignoreBoxes;
! byte forceClip;
byte initFrame,walkFrame,standFrame,talkFrame1,talkFrame2;
bool needRedraw, needBgReset,costumeNeedsInit,visible;
***************
*** 2005,2008 ****
--- 2014,2019 ----
void setupShadowPalette(int slot,int rfact,int gfact,int bfact,int from,int to);
+
+ void drawBomp(BompDrawData *bd);
};
***************
*** 2112,2115 ****
--- 2123,2127 ----
extern const uint32 IMxx_tags[];
+ extern const byte default_scale_table[768];
void outputdisplay2(Scumm *s, int disp);
Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** sdl.cpp 2001/11/14 18:37:38 1.22
--- sdl.cpp 2001/11/27 17:56:04 1.23
***************
*** 76,82 ****
uint32 start_time;
- if (msec_delay<0)
- return;
-
if (s->_fastMode&2)
msec_delay = 0;
--- 76,79 ----
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** sound.cpp 2001/11/26 19:57:57 1.9
--- sound.cpp 2001/11/27 17:56:04 1.10
***************
*** 139,144 ****
uint16 elem;
- return;
-
if (!_sfxFile) {
warning("startTalkSound: SFX file is not open");
--- 139,142 ----
- Previous message: [Scummvm-cvs-logs] CVS: scummvm akos.cpp,NONE,1.1 actor.cpp,1.13,1.14 boxes.cpp,1.4,1.5 costume.cpp,1.10,1.11 debug.cpp,1.9,1.10 gfx.cpp,1.21,1.22 gui.cpp,1.4,1.5 object.cpp,1.14,1.15 resource.cpp,1.21,1.22 saveload.cpp,1.16,1.17 script.cpp,1.11,1.12 script_v1.cpp,1.14,1.15 script_v2.cpp,1.12,1.13 scumm.h,1.29,1.30 scummvm.cpp,1.27,1.28 scummvm.dsp,1.13,1.14 sound.cpp,1.8,1.9 string.cpp,1.10,1.11 verbs.cpp,1.10,1.11 windows.cpp,1.18,1.19
- Next message: [Scummvm-cvs-logs] CVS: scummvm windows.cpp,1.19,1.20
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list