[Scummvm-git-logs] scummvm master -> 2a68678662f14e763a1afd1e90fe37c870d77a95
mgerhardy
martin.gerhardy at gmail.com
Mon Oct 4 16:25:08 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1824b01e5e TWINE: fixed invalid sample idx for animation action ACTION_RIGHT_STEP
ba562ccc2f TWINE: extended warning message with the draw list type
2a68678662 TWINE: simplified if statement
Commit: 1824b01e5ef83396810ccd94fcaef1b5f6ba44e1
https://github.com/scummvm/scummvm/commit/1824b01e5ef83396810ccd94fcaef1b5f6ba44e1
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-10-03T21:08:45+02:00
Commit Message:
TWINE: fixed invalid sample idx for animation action ACTION_RIGHT_STEP
Changed paths:
engines/twine/audio/sound.h
engines/twine/scene/animations.cpp
engines/twine/scene/grid.h
diff --git a/engines/twine/audio/sound.h b/engines/twine/audio/sound.h
index a28d13f688..db6f4cfd36 100644
--- a/engines/twine/audio/sound.h
+++ b/engines/twine/audio/sound.h
@@ -44,7 +44,8 @@ enum _Samples {
TaskCompleted = 41,
Hit = 86,
ItemFound = 97,
- WalkFloorBegin = 126
+ WalkFloorBegin = 126,
+ WalkFloorRightBegin = 141
};
}
diff --git a/engines/twine/scene/animations.cpp b/engines/twine/scene/animations.cpp
index 521510f03e..bce4fd5c45 100644
--- a/engines/twine/scene/animations.cpp
+++ b/engines/twine/scene/animations.cpp
@@ -318,12 +318,17 @@ void Animations::processAnimActions(int32 actorIdx) {
}
break;
case ActionType::ACTION_LEFT_STEP:
- case ActionType::ACTION_RIGHT_STEP:
if (action.animFrame == actor->_animPosition && (actor->_brickSound & 0xF0U) != 0xF0U) {
const int16 sampleIdx = (actor->_brickSound & 0x0FU) + Samples::WalkFloorBegin;
_engine->_sound->playSample(sampleIdx, 1, actor->pos(), actorIdx);
}
break;
+ case ActionType::ACTION_RIGHT_STEP:
+ if (action.animFrame == actor->_animPosition && (actor->_brickSound & 0xF0U) != 0xF0U) {
+ const int16 sampleIdx = (actor->_brickSound & 0x0FU) + Samples::WalkFloorRightBegin;
+ _engine->_sound->playSample(sampleIdx, 1, actor->pos(), actorIdx);
+ }
+ break;
case ActionType::ACTION_HERO_HITTING:
if (action.animFrame - 1 == actor->_animPosition) {
actor->_strengthOfHit = magicLevelStrengthOfHit[_engine->_gameState->_magicLevelIdx];
diff --git a/engines/twine/scene/grid.h b/engines/twine/scene/grid.h
index e2e1c93740..d7a149ddd8 100644
--- a/engines/twine/scene/grid.h
+++ b/engines/twine/scene/grid.h
@@ -301,10 +301,6 @@ public:
inline ShapeType getBrickShapeFull(const IVec3 &pos, int32 y2) {
return getBrickShapeFull(pos.x, pos.y, pos.z, y2);
}
-
- inline uint8 getBrickSoundType(const IVec3 &pos) {
- return getBrickSoundType(pos.x, pos.y, pos.z);
- }
};
} // namespace TwinE
Commit: ba562ccc2fd88537b9fdb147931e3a7280d3d806
https://github.com/scummvm/scummvm/commit/ba562ccc2fd88537b9fdb147931e3a7280d3d806
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-10-03T21:14:35+02:00
Commit Message:
TWINE: extended warning message with the draw list type
Changed paths:
engines/twine/renderer/redraw.cpp
diff --git a/engines/twine/renderer/redraw.cpp b/engines/twine/renderer/redraw.cpp
index 6d108bc746..8e87a05cfe 100644
--- a/engines/twine/renderer/redraw.cpp
+++ b/engines/twine/renderer/redraw.cpp
@@ -493,7 +493,7 @@ void Redraw::processDrawList(DrawListStruct *drawList, int32 drawListPos, bool b
// Drawing unknown
else if (flags < DrawListType::DrawActorSprites) {
// TODO reverse this part of the code
- warning("Not yet reversed part of the rendering code");
+ warning("Not yet reversed part of the rendering code: %u", flags);
}
// Drawing sprite actors, doors and entities
else if (flags == DrawListType::DrawActorSprites) {
Commit: 2a68678662f14e763a1afd1e90fe37c870d77a95
https://github.com/scummvm/scummvm/commit/2a68678662f14e763a1afd1e90fe37c870d77a95
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-10-04T18:23:59+02:00
Commit Message:
TWINE: simplified if statement
and reduced cyclic complexity
Changed paths:
engines/twine/twine.cpp
diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index aa2d46acc8..1d97acb503 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -918,28 +918,26 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
const uint8 brickSound = _grid->getBrickSoundType(actor->_pos.x, actor->_pos.y - 1, actor->_pos.z);
actor->_brickSound = brickSound;
- if ((brickSound & 0xF0U) == 0xF0U) {
- if ((brickSound & 0x0FU) == 1) {
- if (IS_HERO(a)) {
- // we are dying if we aren't using the protopack to fly over water
- if (_actor->_heroBehaviour != HeroBehaviourType::kProtoPack || actor->_anim != AnimationTypes::kForward) {
- if (!_actor->_cropBottomScreen) {
- _animations->initAnim(AnimationTypes::kDrawn, AnimType::kAnimationType_4, AnimationTypes::kStanding, 0);
- }
- const IVec3 &projPos = _renderer->projectPositionOnScreen(actor->pos() - _grid->_camera);
- actor->_controlMode = ControlMode::kNoMove;
- actor->setLife(-1);
- _actor->_cropBottomScreen = projPos.y;
- actor->_staticFlags.bDoesntCastShadow = 1;
+ if (brickSound == 0xF1U) {
+ if (IS_HERO(a)) {
+ // we are dying if we aren't using the protopack to fly over water
+ if (_actor->_heroBehaviour != HeroBehaviourType::kProtoPack || actor->_anim != AnimationTypes::kForward) {
+ if (!_actor->_cropBottomScreen) {
+ _animations->initAnim(AnimationTypes::kDrawn, AnimType::kAnimationType_4, AnimationTypes::kStanding, 0);
}
- } else {
- _sound->playSample(Samples::Explode, 1, actor->pos(), a);
- if (actor->_bonusParameter.cloverleaf || actor->_bonusParameter.kashes || actor->_bonusParameter.key || actor->_bonusParameter.lifepoints || actor->_bonusParameter.magicpoints) {
- if (!actor->_bonusParameter.unk1) {
- _actor->processActorExtraBonus(a);
- }
- actor->setLife(0);
+ const IVec3 &projPos = _renderer->projectPositionOnScreen(actor->pos() - _grid->_camera);
+ actor->_controlMode = ControlMode::kNoMove;
+ actor->setLife(-1);
+ _actor->_cropBottomScreen = projPos.y;
+ actor->_staticFlags.bDoesntCastShadow = 1;
+ }
+ } else {
+ _sound->playSample(Samples::Explode, 1, actor->pos(), a);
+ if (actor->_bonusParameter.cloverleaf || actor->_bonusParameter.kashes || actor->_bonusParameter.key || actor->_bonusParameter.lifepoints || actor->_bonusParameter.magicpoints) {
+ if (!actor->_bonusParameter.unk1) {
+ _actor->processActorExtraBonus(a);
}
+ actor->setLife(0);
}
}
}
More information about the Scummvm-git-logs
mailing list