[Scummvm-cvs-logs] SF.net SVN: scummvm:[48011] scummvm/trunk/engines/gob
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Tue Feb 9 00:12:43 CET 2010
Revision: 48011
http://scummvm.svn.sourceforge.net/scummvm/?rev=48011&view=rev
Author: strangerke
Date: 2010-02-08 23:12:42 +0000 (Mon, 08 Feb 2010)
Log Message:
-----------
Fascination: - Suppress the recently added oFascin_keyFunc, replace it with a check in o1_keyFunc. This fixes the animation speed regression
- Rename Amiga-specific protracker functions
- Rewrite winDecomp.
Modified Paths:
--------------
scummvm/trunk/engines/gob/draw.cpp
scummvm/trunk/engines/gob/draw.h
scummvm/trunk/engines/gob/inter.h
scummvm/trunk/engines/gob/inter_fascin.cpp
scummvm/trunk/engines/gob/inter_v1.cpp
Modified: scummvm/trunk/engines/gob/draw.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw.cpp 2010-02-08 21:51:36 UTC (rev 48010)
+++ scummvm/trunk/engines/gob/draw.cpp 2010-02-08 23:12:42 UTC (rev 48011)
@@ -824,7 +824,7 @@
int8 matchNum = 0;
int16 bestMatch = -1;
- if ((_vm->_game->_mouseButtons != 1) || ((_vm->_draw->_renderFlags & 128) == 0))
+ if ((_vm->_game->_mouseButtons != 1) || ((_renderFlags & 128) == 0))
return 0;
for (int i = 0; i < 10; i++)
@@ -878,10 +878,10 @@
return 0;
}
-void Draw::winDecomp(int16 x, int16 y, SurfaceDescPtr bmp) {
- // TODO: Implementation to be confirmed (used cut and paste from another part of the code)
- Resource *resource;
+void Draw::winDecomp(int16 x, int16 y, SurfaceDescPtr destPtr) {
+ warning("winDecomp %d %d - getResource %d %d %d", x, y, _spriteLeft, _spriteRight, _spriteBottom);
+ Resource *resource;
resource = _vm->_game->_resources->getResource((uint16) _spriteLeft,
&_spriteRight, &_spriteBottom);
@@ -889,12 +889,8 @@
return;
_vm->_video->drawPackedSprite(resource->getData(),
- _spriteRight, _spriteBottom, _destSpriteX, _destSpriteY,
- _transparency, *_spritesArray[_destSurface]);
+ _spriteRight, _spriteBottom, x, y, _transparency, *destPtr);
- dirtiedRect(_destSurface, _destSpriteX, _destSpriteY,
- _destSpriteX + _spriteRight - 1, _destSpriteY + _spriteBottom - 1);
-
delete resource;
return;
}
@@ -1125,9 +1121,11 @@
break;
case DRAW_DRAWLETTER: // 10 - Display a character
- if (_fontToSprite[_fontIndex].sprite == -1)
- _vm->_video->drawLetter(_letterToPrint, 0, 0, *_fonts[_fontIndex], _transparency, _frontColor, _backColor, *tempSrf);
- else {
+ if (_fontToSprite[_fontIndex].sprite == -1) {
+
+ if (_letterToPrint)
+ _vm->_video->drawLetter(_letterToPrint, 0, 0, *_fonts[_fontIndex], _transparency, _frontColor, _backColor, *tempSrf);
+ } else {
int xx, yy, nn;
nn = _spritesArray[_fontToSprite[_fontIndex].sprite]->getWidth() / _fontToSprite[_fontIndex].width;
yy = ((_letterToPrint - _fontToSprite[_fontIndex].base) / nn) * _fontToSprite[_fontIndex].height;
@@ -1240,10 +1238,11 @@
break;
case DRAW_DRAWLETTER: // 10 - Display a character
- if (_fontToSprite[_fontIndex].sprite == -1)
- _vm->_video->drawLetter(_letterToPrint, _destSpriteX, _destSpriteY, *_fonts[_fontIndex], _transparency,
- _frontColor, _backColor, *_spritesArray[_destSurface]);
- else {
+ if (_fontToSprite[_fontIndex].sprite == -1) {
+ if (_letterToPrint)
+ _vm->_video->drawLetter(_letterToPrint, _destSpriteX, _destSpriteY, *_fonts[_fontIndex], _transparency,
+ _frontColor, _backColor, *_spritesArray[_destSurface]);
+ } else {
int xx, yy, nn;
nn = _spritesArray[_fontToSprite[_fontIndex].sprite]->getWidth() / _fontToSprite[_fontIndex].width;
yy = ((_letterToPrint - _fontToSprite[_fontIndex].base) / nn) * _fontToSprite[_fontIndex].height;
@@ -1282,7 +1281,7 @@
int16 Draw::isOverWin(int16 &dx, int16 &dy) {
int16 bestMatch = -1;
- if ((_vm->_draw->_renderFlags & 128) == 0)
+ if ((_renderFlags & 128) == 0)
return -1;
for (int i = 0; i < 10; i++)
Modified: scummvm/trunk/engines/gob/draw.h
===================================================================
--- scummvm/trunk/engines/gob/draw.h 2010-02-08 21:51:36 UTC (rev 48010)
+++ scummvm/trunk/engines/gob/draw.h 2010-02-08 23:12:42 UTC (rev 48011)
@@ -190,7 +190,7 @@
int16 openWin(int16 id);
int16 handleCurWin();
bool winOverlap(int16 idWin1, int16 idWin2);
- void winDecomp(int16 x, int16 y, SurfaceDescPtr bmp);
+ void winDecomp(int16 x, int16 y, SurfaceDescPtr destPtr);
void activeWin(int16 id);
void closeWin(int16 id);
void closeAllWin();
Modified: scummvm/trunk/engines/gob/inter.h
===================================================================
--- scummvm/trunk/engines/gob/inter.h 2010-02-08 21:51:36 UTC (rev 48010)
+++ scummvm/trunk/engines/gob/inter.h 2010-02-08 23:12:42 UTC (rev 48011)
@@ -447,11 +447,9 @@
void oFascin_loadBatt1(OpGobParams ¶ms);
void oFascin_loadBatt2(OpGobParams ¶ms);
void oFascin_loadBatt3(OpGobParams ¶ms);
- void oFascin_geUnknown1000(OpGobParams ¶ms);
- void oFascin_geUnknown1001(OpGobParams ¶ms);
+ void oFascin_loadMod(OpGobParams ¶ms);
+ void oFascin_playMod(OpGobParams ¶ms);
void oFascin_geUnknown1002(OpGobParams ¶ms);
-// bool oFascin_feUnknown4(OpFuncParams ¶ms);
-// bool oFascin_feUnknown27(OpFuncParams ¶ms);
void oFascin_setWinSize();
void oFascin_closeWin();
void oFascin_activeWin();
Modified: scummvm/trunk/engines/gob/inter_fascin.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_fascin.cpp 2010-02-08 21:51:36 UTC (rev 48010)
+++ scummvm/trunk/engines/gob/inter_fascin.cpp 2010-02-08 23:12:42 UTC (rev 48011)
@@ -86,7 +86,6 @@
Inter_v2::setupOpcodesFunc();
OPCODEFUNC(0x09, o1_assign);
- OPCODEFUNC(0x14, oFascin_keyFunc);
OPCODEFUNC(0x32, oFascin_copySprite);
}
@@ -106,8 +105,8 @@
OPCODEGOB( 11, oFascin_loadBatt2);
OPCODEGOB( 12, oFascin_loadBatt3);
- OPCODEGOB(1000, oFascin_geUnknown1000);
- OPCODEGOB(1001, oFascin_geUnknown1001); //protrackerPlay doesn't play correctly "mod.extasy"
+ OPCODEGOB(1000, oFascin_loadMod);
+ OPCODEGOB(1001, oFascin_playMod); //protrackerPlay doesn't play correctly "mod.extasy"
OPCODEGOB(1002, oFascin_geUnknown1002); //to be replaced by o2_stopProtracker when protrackerPlay is fixed
}
@@ -129,56 +128,6 @@
return false;
}
-bool Inter_Fascination::oFascin_keyFunc(OpFuncParams ¶ms) {
- static uint32 lastCalled = 0;
- int16 cmd;
- int16 key;
- uint32 now;
-
- cmd = _vm->_game->_script->readInt16();
- animPalette();
- _vm->_draw->blitInvalidated();
-
- now = _vm->_util->getTimeKey();
- if (!_noBusyWait)
- if ((now - lastCalled) <= 20)
- _vm->_util->longDelay(1);
- lastCalled = now;
- _noBusyWait = false;
-
- switch (cmd) {
- case 0:
- key = _vm->_game->_hotspots->check(0, 0);
- storeKey(key);
-
- _vm->_util->clearKeyBuf();
- break;
-
- case 1:
- key = _vm->_game->checkKeys(&_vm->_global->_inter_mouseX,
- &_vm->_global->_inter_mouseY, &_vm->_game->_mouseButtons, 0);
- storeKey(key);
- break;
-
- case 2:
-// _vm->_util->processInput(true);
-// key = _vm->_util->checkKey();
-// WRITE_VAR(0, key);
-// _vm->_util->clearKeyBuf();
- _vm->_util->delay(cmd);
- break;
-
- default:
- _vm->_util->processInput(true);
- key = _vm->_util->checkKey();
- WRITE_VAR(0, key);
- _vm->_util->clearKeyBuf();
- break;
- }
-
- return false;
-}
-
void Inter_Fascination::oFascin_playTirb(OpGobParams ¶ms) {
warning("funcPlayImd with parameter : 'tirb.imd'");
@@ -246,11 +195,12 @@
_vm->_sound->adlibLoadMDY("batt3.mdy");
}
-void Inter_Fascination::oFascin_geUnknown1000(OpGobParams ¶ms) {
- warning("Fascination Unknown GE Function 1000 - Load MOD music");
+void Inter_Fascination::oFascin_loadMod(OpGobParams ¶ms) {
+ // Fascination GE Function 1000 - Load MOD music
+ // Useless as it's included in playMod
}
-void Inter_Fascination::oFascin_geUnknown1001(OpGobParams ¶ms) {
+void Inter_Fascination::oFascin_playMod(OpGobParams ¶ms) {
warning("Fascination oFascin_playProtracker - MOD not compatible (sample > 32768), To Be Fixed");
}
@@ -258,18 +208,6 @@
warning("Fascination o2_stopProtracker - Commented out");
}
-/*
-bool Inter_Fascination::oFascin_feUnknown4(OpFuncParams ¶ms) {
- warning("Fascination Unknown FE Function 4");
- return true;
-}
-
-bool Inter_Fascination::oFascin_feUnknown27(OpFuncParams ¶ms) {
- warning("Fascination Unknown FE Function 27h");
- return true;
-}
-*/
-
void Inter_Fascination::oFascin_setWinSize() {
_vm->_draw->_winMaxWidth = _vm->_game->_script->readUint16();
_vm->_draw->_winMaxHeight = _vm->_game->_script->readUint16();
Modified: scummvm/trunk/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v1.cpp 2010-02-08 21:51:36 UTC (rev 48010)
+++ scummvm/trunk/engines/gob/inter_v1.cpp 2010-02-08 23:12:42 UTC (rev 48011)
@@ -1212,7 +1212,8 @@
break;
case 1:
- _vm->_util->forceMouseUp(true);
+ if (_vm->getGameType() != kGameTypeFascination)
+ _vm->_util->forceMouseUp(true);
key = _vm->_game->checkKeys(&_vm->_global->_inter_mouseX,
&_vm->_global->_inter_mouseY, &_vm->_game->_mouseButtons, 0);
storeKey(key);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list