diff options
Diffstat (limited to 'sky')
-rw-r--r-- | sky/logic.cpp | 17 | ||||
-rw-r--r-- | sky/screen.cpp | 4 | ||||
-rw-r--r-- | sky/sky.cpp | 3 |
3 files changed, 16 insertions, 8 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp index 6d0f88a09c..4f2b45fa2e 100644 --- a/sky/logic.cpp +++ b/sky/logic.cpp @@ -1393,9 +1393,14 @@ bool SkyLogic::fnCloseHand(uint32 a, uint32 b, uint32 c) { } bool SkyLogic::fnGetTo(uint32 targetPlaceId, uint32 mode, uint32 c) { - _compact->upFlag = (uint16)mode; // save mode for action script + _compact->upFlag = (uint16)mode; // save mode for action script _compact->mode += 4; // next level up Compact *cpt = SkyState::fetchCompact(_compact->place); + if (!cpt) { + // FIXME: This should never happen + warning("can't find _compact's getToTable. Place compact is NULL"); + return false; + } uint16 *getToTable = cpt->getToTable; while (*getToTable != targetPlaceId) @@ -1959,7 +1964,8 @@ bool SkyLogic::fnAskThis(uint32 textNo, uint32 animNo, uint32 c) { } bool SkyLogic::fnRandom(uint32 a, uint32 b, uint32 c) { - error("Stub: fnRandom"); + warning("Stub: fnRandom"); + return true; } bool SkyLogic::fnPersonHere(uint32 id, uint32 room, uint32 c) { @@ -2218,7 +2224,8 @@ bool SkyLogic::fnStartFx(uint32 sound, uint32 b, uint32 c) { } bool SkyLogic::fnStopFx(uint32 a, uint32 b, uint32 c) { - error("Stub: fnStopFx"); + warning("Stub: fnStopFx"); + return true; } bool SkyLogic::fnStartMusic(uint32 a, uint32 b, uint32 c) { @@ -2246,12 +2253,12 @@ bool SkyLogic::fnQuitToDos(uint32 a, uint32 b, uint32 c) { } bool SkyLogic::fnPauseFx(uint32 a, uint32 b, uint32 c) { - //warning("Stub: fnPauseFx"); + warning("Stub: fnPauseFx"); return true; } bool SkyLogic::fnUnPauseFx(uint32 a, uint32 b, uint32 c) { - //warning("Stub: fnUnPauseFx"); + warning("Stub: fnUnPauseFx"); return true; } diff --git a/sky/screen.cpp b/sky/screen.cpp index a875a8d9cd..09b2efa8ed 100644 --- a/sky/screen.cpp +++ b/sky/screen.cpp @@ -516,7 +516,7 @@ void SkyScreen::sortSprites(void) { if (spriteCnt > 1) { // bubble sort for (uint32 cnt1 = 0; cnt1 < spriteCnt - 1; cnt1++) for (uint32 cnt2 = cnt1 + 1; cnt2 < spriteCnt; cnt2++) - if (sortList[cnt1].yCood <= sortList[cnt2].yCood) { + if (sortList[cnt1].yCood >= sortList[cnt2].yCood) { StSortList tmp; tmp.yCood = sortList[cnt1].yCood; tmp.sprite = sortList[cnt1].sprite; @@ -643,7 +643,7 @@ void SkyScreen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) { for (uint8 cnty = 0; cnty < _sprHeight; cnty++) { for (uint8 cntx = 0; cntx < _sprWidth; cntx++) if (spriteData[cntx + _maskX1]) screenPtr[cntx] = spriteData[cntx + _maskX1]; - spriteData += _sprWidth + _maskX2; + spriteData += _sprWidth + _maskX2 + _maskX1; screenPtr += GAME_SCREEN_WIDTH; } // Convert the sprite coordinate/size values to blocks for vertical mask and/or vector to game diff --git a/sky/sky.cpp b/sky/sky.cpp index ecfe120dcf..f0ca464a48 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -67,7 +67,8 @@ SkyState::SkyState(GameDetector *detector, OSystem *syst) _mixer->setVolume(detector->_sfx_volume); //unnecessary? _debugMode = detector->_debugMode; - _debugLevel = detector->_debugLevel; + //_debugLevel = detector->_debugLevel; + _debugLevel = 9; _systemVars.language = detector->_language; _detector = detector; |