misc fixes

svn-id: r3435
This commit is contained in:
Ludvig Strigeus 2001-10-16 20:31:27 +00:00
parent eebe5f2f73
commit a732f32eb0
8 changed files with 112 additions and 19 deletions

View file

@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
* Revision 1.4 2001/10/16 20:31:27 strigeus
* misc fixes
*
* Revision 1.3 2001/10/16 10:01:45 strigeus
* preliminary DOTT support
*
@ -497,7 +500,61 @@ StartPos:;
}
void CostumeRenderer::proc3() {
warning("COST_Proc3: not implemented");
byte *mask,*src,*dst;
byte maskbit,len,height,pcolor,width;
int color,t;
uint y;
mask = _mask_ptr_dest;
dst = _bg_ptr;
height = _height2;
width = _width2;
len = _replen;
color = _repcolor;
src = _srcptr;
maskbit = revBitMask[_xpos&7];
y = _ypos;
if (_docontinue) goto StartPos;
do {
len = *src++;
color = len>>_shrval;
len &= _maskval;
if (!len) len = *src++;
do {
if (cost_scaleTable[_scaleIndexY++] < _scaleY) {
if (color && y < _vscreenheight && !((*mask|mask[_imgbufoffs])&maskbit)) {
pcolor = _palette[color];
if (pcolor==13)
pcolor = _transEffect[*dst];
*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];
_bg_ptr += _scaleIndexXStep;
}
dst = _bg_ptr;
mask = _mask_ptr + (_xpos>>3);
}
StartPos:;
} while (--len);
} while(1);
}
void CostumeRenderer::proc2() {

View file

@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
* Revision 1.5 2001/10/16 20:31:27 strigeus
* misc fixes
*
* Revision 1.4 2001/10/16 10:01:47 strigeus
* preliminary DOTT support
*
@ -231,6 +234,7 @@ void Scumm::drawStripToScreen() {
void blit(byte *dst, byte *src, int w, int h) {
assert(h>0);
do {
memcpy(dst, src, w);
dst += 320;
@ -1361,7 +1365,7 @@ void Scumm::restoreBG(int left, int top, int right, int bottom) {
height = bottom - top;
width = right - left;
widthmod = (width >> 2) + 2;
if (vs->alloctwobuffers && _currentRoom!=0 && _vars[VAR_DRAWFLAGS]&2) {
blit(gdi.bg_ptr, gdi.where_to_draw_ptr, width, height);
if (gdi.virtScreen==0 && charset._hasMask && height) {
@ -1433,7 +1437,7 @@ int Scumm::findVirtScreen(int y) {
gdi.virtScreen=-1;
for(i=0; i<3; i++,vs++) {
if (y >= vs->topline && y <= vs->topline+vs->height) {
if (y >= vs->topline && y < vs->topline+vs->height) {
gdi.virtScreen = i;
return i;
}

View file

@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
* Revision 1.2 2001/10/16 20:31:27 strigeus
* misc fixes
*
* Revision 1.1 2001/10/16 10:01:47 strigeus
* preliminary DOTT support
*
@ -1397,11 +1400,20 @@ void Scumm::o_roomOps() {
unkRoomFunc3(d, e, a, b, c);
break;
case 13: /* ? */
error("roomops:13 not implemented");
case 13: { /* save-string */
char buf[256],*s;
a = getVarOrDirectByte(0x80);
s = buf;
while (*s++=fetchScriptByte());
warning("roomops:13 save-string(%d,\"%s\") not implemented", a, buf);
break;
case 14: /* ? */
error("roomops:14 not implemented");
}
case 14: /* load-string */
char buf[256],*s;
a = getVarOrDirectByte(0x80);
s = buf;
while (*s++=fetchScriptByte());
warning("roomops:14 load-string(%d,\"%s\") not implemented", a, buf);
break;
case 15: /* palmanip? */
a = getVarOrDirectByte(0x80);

View file

@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
* Revision 1.9 2001/10/16 20:31:27 strigeus
* misc fixes
*
* Revision 1.8 2001/10/16 10:01:47 strigeus
* preliminary DOTT support
*
@ -854,8 +857,6 @@ struct Scumm {
bool _BgNeedsRedraw;
int16 _localParamList[16];
uint16 _verbMouseOver;

View file

@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
* Revision 1.9 2001/10/16 20:31:27 strigeus
* misc fixes
*
* Revision 1.8 2001/10/16 12:20:22 strigeus
* made files compile on unix
*
@ -234,7 +237,11 @@ void Scumm::scummMain(int argc, char **argv) {
_fileHandle = NULL;
#if defined(INDY4)
_bootParam = -7873;
#else
_bootParam = 0;
#endif
_debugMode = 1;
parseCommandLine(argc, argv);
@ -412,6 +419,7 @@ static const GameNameList game_list[] = {
{"monkey2", "Monkey Island 2: LeChuck's revenge"},
{"atlantis", "Indiana Jones 4 and the Fate of Atlantis"},
{"fate", "Indiana Jones 4 and the Fate of Atlantis (Demo)"},
{"tentacle", "Day Of The Tenctacle"},
{NULL,NULL}
};

View file

@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "CHECK_HEAP" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "CHECK_HEAP" /D "DUMP_SCRIPTS" /Yu"stdafx.h" /FD /GZ /c
# ADD BASE RSC /l 0x41d /d "_DEBUG"
# ADD RSC /l 0x41d /d "_DEBUG"
BSC32=bscmake.exe
@ -131,10 +131,6 @@ SOURCE=.\scummvm.cpp
# End Source File
# Begin Source File
SOURCE=.\sdl.cpp
# End Source File
# Begin Source File
SOURCE=.\sound.cpp
# End Source File
# Begin Source File
@ -154,6 +150,10 @@ SOURCE=.\sys.cpp
SOURCE=.\verbs.cpp
# End Source File
# Begin Source File
SOURCE=.\windows.cpp
# End Source File
# End Group
# Begin Group "Header Files"

14
sdl.cpp
View file

@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
* Revision 1.9 2001/10/16 20:31:27 strigeus
* misc fixes
*
* Revision 1.8 2001/10/16 10:01:48 strigeus
* preliminary DOTT support
*
@ -220,10 +223,9 @@ void updateScreen(Scumm *s) {
}
if(s->_palDirtyMax != -1) {
/* this updates the screen automatically */
updatePalette(s);
}
if (fullRedraw) {
} else if (fullRedraw) {
SDL_UpdateRect(screen, 0,0,0,0);
#if defined(SHOW_AREA)
debug(2,"update area 100 %%");
@ -346,7 +348,13 @@ void initGraphics(Scumm *s) {
#undef main
int main(int argc, char* argv[]) {
#if defined(DOTT)
scumm._exe_name = "tentacle";
#elif defined(INDY4)
scumm._exe_name = "atlantis";
#else
scumm._exe_name = "monkey2";
#endif
scumm._videoMode = 0x13;
scumm.scummMain(argc, argv);
return 0;

View file

@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
* Revision 1.6 2001/10/16 20:31:27 strigeus
* misc fixes
*
* Revision 1.5 2001/10/16 10:01:48 strigeus
* preliminary DOTT support
*
@ -806,8 +809,6 @@ void updateScreen(Scumm *s) {
wm->writeToScreen();
}
void waitForTimer(Scumm *s) {
if (!veryFastMode) {
Sleep(5);
@ -829,6 +830,8 @@ int main(int argc, char* argv[]) {
#if defined(DOTT)
scumm._exe_name = "tentacle";
#elif defined(INDY4)
scumm._exe_name = "atlantis";
#else
scumm._exe_name = "monkey2";
#endif