[Scummvm-git-logs] scummvm master -> 5ebddb8eeb84ee939c7f128e727eace5607b2f91
athrxx
athrxx at scummvm.org
Fri Jul 31 16:30:10 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5ebddb8eeb KYRA: (EOB/SegaCD) -fix shake animation glitch
Commit: 5ebddb8eeb84ee939c7f128e727eace5607b2f91
https://github.com/scummvm/scummvm/commit/5ebddb8eeb84ee939c7f128e727eace5607b2f91
Author: athrxx (athrxx at scummvm.org)
Date: 2020-07-31T18:27:26+02:00
Commit Message:
KYRA: (EOB/SegaCD) -fix shake animation glitch
(sometimes monsters could be seen through closed doors)
Changed paths:
engines/kyra/engine/eobcommon.h
engines/kyra/engine/scene_eob.cpp
engines/kyra/gui/gui_eob_segacd.cpp
diff --git a/engines/kyra/engine/eobcommon.h b/engines/kyra/engine/eobcommon.h
index 7b86b1aba9..3eb271ad6b 100644
--- a/engines/kyra/engine/eobcommon.h
+++ b/engines/kyra/engine/eobcommon.h
@@ -643,7 +643,7 @@ protected:
virtual void setLevelPalettes(int level) {}
void drawScene(int refresh);
- void drawSceneShapes(int start = 0, int drawFlags = 0xFF);
+ void drawSceneShapes(int start = 0, int end = 18, int drawFlags = 0xFF);
void drawDecorations(int index);
int calcNewBlockPositionAndTestPassability(uint16 curBlock, uint16 direction);
diff --git a/engines/kyra/engine/scene_eob.cpp b/engines/kyra/engine/scene_eob.cpp
index 1777c41d06..525968bb55 100644
--- a/engines/kyra/engine/scene_eob.cpp
+++ b/engines/kyra/engine/scene_eob.cpp
@@ -609,8 +609,8 @@ void EoBCoreEngine::drawScene(int refresh) {
_sceneUpdateRequired = false;
}
-void EoBCoreEngine::drawSceneShapes(int start, int drawFlags) {
- for (int i = start; i < 18; i++) {
+void EoBCoreEngine::drawSceneShapes(int start, int end, int drawFlags) {
+ for (int i = start; i < end; i++) {
uint8 t = _dscTileIndex[i];
uint8 s = _visibleBlocks[t]->walls[_sceneDrawVarDown];
diff --git a/engines/kyra/gui/gui_eob_segacd.cpp b/engines/kyra/gui/gui_eob_segacd.cpp
index 0daac33913..30a1413776 100644
--- a/engines/kyra/gui/gui_eob_segacd.cpp
+++ b/engines/kyra/gui/gui_eob_segacd.cpp
@@ -457,14 +457,15 @@ void EoBEngine::gui_updateAnimations() {
// For whatever reason the original shakes all types of shapes (decorations, doors, etc.) except the monsters and
// the items lying on the floor. So we do the same. I've added drawing flags to drawSceneShapes() which allow
// separate drawing passes for the different shape types.
- _shapeShakeOffsetX = _sceneShakeOffsetX;
- _shapeShakeOffsetY = _sceneShakeOffsetY;
- // All shapes except monsters and items
- drawSceneShapes(0, 0xFF & ~0x2A);
- _shapeShakeOffsetX = _shapeShakeOffsetY = 0;
- // Monsters and items
- drawSceneShapes(0, 0x2A);
-
+ for (int i = 0; i < 18; i++) {
+ _shapeShakeOffsetX = _sceneShakeOffsetX;
+ _shapeShakeOffsetY = _sceneShakeOffsetY;
+ // All shapes except monsters and items
+ drawSceneShapes(i, i + 1, 0xFF & ~0x2A);
+ _shapeShakeOffsetX = _shapeShakeOffsetY = 0;
+ // Monsters and items
+ drawSceneShapes(i, i + 1, 0x2A);
+ }
_screen->copyRegion(0, 0, 0, 0, 179, 123, _sceneDrawPage1, 0, Screen::CR_NO_P_CHECK);
updScreen = true;
}
More information about the Scummvm-git-logs
mailing list