[Scummvm-cvs-logs] CVS: scummvm costume.cpp,1.23,1.24 script_v2.cpp,1.43,1.44 scumm.h,1.126,1.127
Vincent Hamm
yazoo at users.sourceforge.net
Fri Apr 19 05:39:24 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm debug.cpp,1.27,1.28 gameDetector.cpp,1.22,1.23 gui.cpp,1.35,1.36 readme.txt,1.29,1.30 saveload.cpp,1.38,1.39 scumm.h,1.125,1.126 sound.cpp,1.47,1.48
- Next message: [Scummvm-cvs-logs] CVS: scummvm gfx.cpp,1.71,1.72 script_v2.cpp,1.44,1.45 scumm.h,1.127,1.128
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv3618
Modified Files:
costume.cpp script_v2.cpp scumm.h
Log Message:
Early flashlight implementation
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/costume.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** costume.cpp 11 Apr 2002 17:19:14 -0000 1.23
--- costume.cpp 19 Apr 2002 12:38:03 -0000 1.24
***************
*** 275,280 ****
_bgbak_ptr =
! _vm->getResourceAddress(rtBuffer,
! 5) + _vm->virtscr[0].xstart + _ypos * 320 + _xpos;
_backbuff_ptr =
_vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart + _ypos * 320 + _xpos;
--- 275,279 ----
_bgbak_ptr =
! _vm->getResourceAddress(rtBuffer,5) + _vm->virtscr[0].xstart + _ypos * 320 + _xpos;
_backbuff_ptr =
_vm->virtscr[0].screenPtr + _vm->virtscr[0].xstart + _ypos * 320 + _xpos;
***************
*** 285,291 ****
if (_zbuf) {
! masking = _vm->isMaskActiveAt(_left, _top, _right, _bottom,
! _vm->getResourceAddress(rtBuffer,
! 9) +
_vm->gdi._imgBufOffs[_zbuf] +
_vm->_screenStartStrip);
--- 284,288 ----
if (_zbuf) {
! masking = _vm->isMaskActiveAt(_left, _top, _right, _bottom,_vm->getResourceAddress(rtBuffer,9) +
_vm->gdi._imgBufOffs[_zbuf] +
_vm->_screenStartStrip);
***************
*** 293,300 ****
if (_zbuf || charsetmask) {
! _mask_ptr =
! _vm->getResourceAddress(rtBuffer,
! 9) + _ypos * 40 + _vm->_screenStartStrip;
!
_imgbufoffs = _vm->gdi._imgBufOffs[_zbuf];
if (!charsetmask && _zbuf != 0)
--- 290,294 ----
if (_zbuf || charsetmask) {
! _mask_ptr =_vm->getResourceAddress(rtBuffer,9) + _ypos * 40 + _vm->_screenStartStrip;
_imgbufoffs = _vm->gdi._imgBufOffs[_zbuf];
if (!charsetmask && _zbuf != 0)
***************
*** 304,308 ****
CHECK_HEAP if (a->shadow_mode) {
! proc_special(a->shadow_mode);
return b;
}
--- 298,302 ----
CHECK_HEAP if (a->shadow_mode) {
! proc_special(a,(masking<<1)+charsetmask);
return b;
}
***************
*** 310,331 ****
switch ((scaling << 2) | (masking << 1) | charsetmask) {
case 0:
! proc6();
break;
case 1:
case 2:
! proc5();
break;
case 3:
! proc4();
break;
case 4:
! proc1();
break;
case 5:
case 6:
! proc2();
break;
case 7:
! proc3();
break;
}
--- 304,325 ----
switch ((scaling << 2) | (masking << 1) | charsetmask) {
case 0:
! proc6(); // no scaling, no masking, no charsetmask
break;
case 1:
case 2:
! proc5(); // no scaling, masking or charsetmask
break;
case 3:
! proc4(); // no scaling, masking and charsetmask
break;
case 4:
! proc1(); // scaling, no masking, no charsetmask
break;
case 5:
case 6:
! proc2(); // scaling, masking or charsetmask
break;
case 7:
! proc3(); // scaling, masking and charsetmask
break;
}
***************
*** 539,544 ****
do {
if (cost_scaleTable[_scaleIndexY++] < _scaleY) {
! if (color && y < _outheight
! && !((*mask | mask[_imgbufoffs]) & maskbit)) {
pcolor = _palette[color];
if (pcolor == 13)
--- 533,537 ----
do {
if (cost_scaleTable[_scaleIndexY++] < _scaleY) {
! if (color && y < _outheight && !((*mask | mask[_imgbufoffs]) & maskbit)) {
pcolor = _palette[color];
if (pcolor == 13)
***************
*** 696,702 ****
}
! void CostumeRenderer::proc_special(byte code)
! {
! warning("stub CostumeRenderer::proc_special(%d) not implemented");
}
--- 689,793 ----
}
! void CostumeRenderer::proc_special(Actor *a, byte mask2)
! {
! byte *mask, *src, *dst, *dstorg;
! byte maskbit, len, height, pcolor, width;
! uint y;
! int color;
! int t;
!
! byte shadow1;
! byte shadow2;
! byte shadow3;
! byte shadow4;
! byte shadow5;
!
! shadow1=a->shadow_mode & 0x80;
! shadow2=a->shadow_mode & 0x40;
! shadow3=a->shadow_mode & 0x20;
! shadow4=a->shadow_mode & 0x10;
! shadow5=a->shadow_mode & 0x0F;
!
! mask = _mask_ptr = _mask_ptr_dest;
! maskbit = revBitMask[_xpos & 7];
! y = _ypos;
!
! mask = _mask_ptr_dest;
! dstorg = dst = _backbuff_ptr;
! height = _height2;
! width = _width2;
! len = _replen;
! color = _repcolor;
! src = _srcptr;
!
! if(_mirror == 0)
! shadow5=-shadow5;
!
! maskbit = revBitMask[_xpos & 7];
!
! dst = _backbuff_ptr;
!
! if(mask2 !=0 && mask2 < 3)
! _imgbufoffs = 0;
!
! if (_docontinue)
! goto StartPos;
!
! do {
! len = *src++;
! color = len >> _shrval;
! len &= _maskval;
! if (!len)
! len = *src++;
!
! do { // ok
! if (cost_scaleTable[_scaleIndexY++] < _scaleY) {
! if (color && y < _outheight) {
! if (!mask2 || (mask2 && !((*mask | mask[_imgbufoffs]) & maskbit)))
! {
! if(shadow3 == 0)
! {
! pcolor = _palette[color];
! if (pcolor != 13)
! goto proc_special_end;
!
! }
! if(shadow2 != 0)
! {
! warning("proc_special: shadow2 unimplemented");
! }
! else // we don't need all the random stuff, just the background copy
! {
! pcolor=_vm->_proc_special_palette[*dst];
! }
! proc_special_end:; *dst = pcolor;
! }
! }
! dst += 320;
! mask += 40;
! y++;
! }
! if (!--height) {
! if (!--width)
! return;
! height = _height;
! y = _ypostop;
! _scaleIndexY = _scaleIndexYTop;
! t = _scaleIndexX;
! _scaleIndexX = t + _scaleIndexXStep;
! if (cost_scaleTable[t] < _scaleX) {
! _xpos += _scaleIndexXStep;
! if (_xpos >= 320)
! return;
! maskbit = revBitMask[_xpos & 7];
! _backbuff_ptr += _scaleIndexXStep;
! }
! dst = _backbuff_ptr;
! mask = _mask_ptr + (_xpos >> 3);
! }
! StartPos:;
! } while (--len);
! } while (1);
!
}
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** script_v2.cpp 11 Apr 2002 17:19:15 -0000 1.43
--- script_v2.cpp 19 Apr 2002 12:38:03 -0000 1.44
***************
*** 2797,2802 ****
break;
! case 108: /* shadow palette? */
! case 109:
warning("stub o6_miscOps_108(%d,%d,%d,%d,%d,%d,%d)", args[1], args[2],
args[3], args[4], args[5], 0, 256);
--- 2797,2809 ----
break;
! case 108: /* create proc_special_palette */
! case 109:
! int i;
! byte j;
! for(i=0;i<256;i++)
! {
! j=rand();
! _proc_special_palette[i]=j;
! }
warning("stub o6_miscOps_108(%d,%d,%d,%d,%d,%d,%d)", args[1], args[2],
args[3], args[4], args[5], 0, 256);
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.126
retrieving revision 1.127
diff -C2 -d -r1.126 -r1.127
*** scumm.h 19 Apr 2002 11:12:27 -0000 1.126
--- scumm.h 19 Apr 2002 12:38:03 -0000 1.127
***************
*** 417,421 ****
void proc2();
void proc1();
! void proc_special(byte code);
byte mainRoutine(Actor *a, int slot, int frame);
void ignorePakCols(int num);
--- 417,421 ----
void proc2();
void proc1();
! void proc_special(Actor *a, byte mask);
byte mainRoutine(Actor *a, int slot, int frame);
void ignorePakCols(int num);
***************
*** 1223,1227 ****
byte *_shadowPalette;
int _shadowPaletteSize;
! byte _currentPalette[0x300];
int _palDirtyMin, _palDirtyMax;
byte _bkColor;
--- 1223,1228 ----
byte *_shadowPalette;
int _shadowPaletteSize;
! byte _currentPalette[0x300];
! byte _proc_special_palette[256];
int _palDirtyMin, _palDirtyMax;
byte _bkColor;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm debug.cpp,1.27,1.28 gameDetector.cpp,1.22,1.23 gui.cpp,1.35,1.36 readme.txt,1.29,1.30 saveload.cpp,1.38,1.39 scumm.h,1.125,1.126 sound.cpp,1.47,1.48
- Next message: [Scummvm-cvs-logs] CVS: scummvm gfx.cpp,1.71,1.72 script_v2.cpp,1.44,1.45 scumm.h,1.127,1.128
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list