[Scummvm-cvs-logs] CVS: scummvm/sword1 logic.cpp,1.20,1.21 music.cpp,1.7,1.8 screen.cpp,1.23,1.24 sword1.cpp,1.20,1.21
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Mon Dec 22 15:22:05 CET 2003
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv4115/sword1
Modified Files:
logic.cpp music.cpp screen.cpp sword1.cpp
Log Message:
fixed screen and music fading
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/logic.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- logic.cpp 22 Dec 2003 11:23:40 -0000 1.20
+++ logic.cpp 22 Dec 2003 23:21:28 -0000 1.21
@@ -348,7 +348,7 @@
return 1;
}
uint8 *data = ((uint8*)_resMan->openFetchRes(compact->o_anim_resource)) + sizeof(Header);
- uint16 numFrames = READ_LE_UINT32(data);
+ uint32 numFrames = READ_LE_UINT32(data);
data += 4;
AnimUnit *animPtr = (AnimUnit*)(data + compact->o_anim_pc * sizeof(AnimUnit));
@@ -370,7 +370,7 @@
return 1;
}
uint8 *data = ((uint8*)_resMan->openFetchRes(compact->o_anim_resource)) + sizeof(Header);
- uint16 numFrames = READ_LE_UINT32(data);
+ uint32 numFrames = READ_LE_UINT32(data);
AnimUnit *animPtr = (AnimUnit*)(data + 4 + compact->o_anim_pc * sizeof(AnimUnit));
if (!(compact->o_status & STAT_SHRINK)) {
@@ -869,7 +869,7 @@
int SwordLogic::fnCheckFade(BsObject *cpt, int32 id, int32 c, int32 d, int32 e, int32 f, int32 z, int32 x) {
- _scriptVars[RETURN_VALUE] = (uint8)(!_screen->stillFading());
+ _scriptVars[RETURN_VALUE] = (uint8)_screen->stillFading();
return SCRIPT_CONT;
}
Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/music.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- music.cpp 22 Dec 2003 02:47:43 -0000 1.7
+++ music.cpp 22 Dec 2003 23:21:28 -0000 1.8
@@ -82,7 +82,7 @@
((int16)READ_LE_UINT16(src + cnt) * _fadeVal) >> 15;
_fadeVal--;
}
- if (!_fadeVal) {
+ if ((!_fadeVal) || (!_smpInBuf)) {
_fading = _playing = false;
free(_musicBuf);
_musicBuf = NULL;
@@ -108,7 +108,7 @@
while (len) {
uint32 length = len;
length = MIN(length, BUFSIZE - _bufPos);
- if (_fading) {
+ if (_fading && _fadeBuf) {
length = MIN(length, (uint32)_fadeVal);
length = MIN(length, _fadeSmpInBuf);
length = MIN(length, BUFSIZE - _fadeBufPos);
Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/screen.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- screen.cpp 22 Dec 2003 11:51:27 -0000 1.23
+++ screen.cpp 22 Dec 2003 23:21:28 -0000 1.24
@@ -115,7 +115,7 @@
}
bool SwordScreen::stillFading(void) {
- return !_isBlack;
+ return _fadingStep;
}
void SwordScreen::updateScreen(void) {
Index: sword1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sword1.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- sword1.cpp 22 Dec 2003 11:23:40 -0000 1.20
+++ sword1.cpp 22 Dec 2003 23:21:28 -0000 1.21
@@ -1090,13 +1090,13 @@
_screen->draw();
_mouse->animate();
- uint32 newTime = _system->get_msecs();
-
_sound->engine();
_screen->updateScreen();
_menu->refresh(MENU_TOP);
_menu->refresh(MENU_BOT);
+
+ uint32 newTime = _system->get_msecs();
if (newTime - frameTime < 80)
delay(80 - (newTime - frameTime));
More information about the Scummvm-git-logs
mailing list