[Scummvm-git-logs] scummvm master -> 37752bd52edb593aa18b3e694b689f6b83ba8b7e

mgerhardy noreply at scummvm.org
Tue Feb 15 06:31:55 UTC 2022


This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2d8a5fe505 TWINE: fixed logic error in move script mBETA
a5f88f4b2b TWINE: the y check comes first in original source code of getBrickShape
a2401cbdd1 TWINE: fixed angle checks in Collision::handlePushing
c8d2348110 TWINE: convert static variable into member
37752bd52e TWINE: fixed audio track for tippet island scene


Commit: 2d8a5fe505051d071b11957e03604ef588a8fc58
    https://github.com/scummvm/scummvm/commit/2d8a5fe505051d071b11957e03604ef588a8fc58
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2022-02-15T07:30:11+01:00

Commit Message:
TWINE: fixed logic error in move script mBETA

Changed paths:
    engines/twine/script/script_move_v1.cpp


diff --git a/engines/twine/script/script_move_v1.cpp b/engines/twine/script/script_move_v1.cpp
index ba09b68e8f3..b72605fc5e5 100644
--- a/engines/twine/script/script_move_v1.cpp
+++ b/engines/twine/script/script_move_v1.cpp
@@ -399,7 +399,7 @@ static int32 mBETA(TwinEEngine *engine, MoveScriptContext &ctx) {
 
 	ctx.actor->_angle = beta;
 
-	if (ctx.actor->_staticFlags.bIsSpriteActor) {
+	if (!ctx.actor->_staticFlags.bIsSpriteActor) {
 		engine->_movements->clearRealAngle(ctx.actor);
 	}
 


Commit: a5f88f4b2b197c9138f2a3dfa7a088842c0d7f5f
    https://github.com/scummvm/scummvm/commit/a5f88f4b2b197c9138f2a3dfa7a088842c0d7f5f
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2022-02-15T07:30:11+01:00

Commit Message:
TWINE: the y check comes first in original source code of getBrickShape

Changed paths:
    engines/twine/scene/grid.cpp


diff --git a/engines/twine/scene/grid.cpp b/engines/twine/scene/grid.cpp
index 5015b17c4b6..342d2924f0d 100644
--- a/engines/twine/scene/grid.cpp
+++ b/engines/twine/scene/grid.cpp
@@ -706,15 +706,13 @@ BlockEntry Grid::getBlockEntry(int32 x, int32 y, int32 z) const {
 ShapeType Grid::getBrickShape(int32 x, int32 y, int32 z) {
 	const IVec3 &collision = updateCollisionCoordinates(x, y, z);
 
-	if (collision.x < 0 || collision.x >= GRID_SIZE_X) {
-		return ShapeType::kNone;
-	}
-
 	if (collision.y <= -1) {
 		return ShapeType::kSolid;
 	}
 
-	if (collision.y < 0 || collision.y >= GRID_SIZE_Y || collision.z < 0 || collision.z >= GRID_SIZE_Z) {
+	if (collision.x < 0 || collision.x >= GRID_SIZE_X
+	 || collision.y < 0 || collision.y >= GRID_SIZE_Y
+	 || collision.z < 0 || collision.z >= GRID_SIZE_Z) {
 		return ShapeType::kNone;
 	}
 


Commit: a2401cbdd130877fd4c66606ff1f1c43b057c6ed
    https://github.com/scummvm/scummvm/commit/a2401cbdd130877fd4c66606ff1f1c43b057c6ed
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2022-02-15T07:30:35+01:00

Commit Message:
TWINE: fixed angle checks in Collision::handlePushing

Changed paths:
    engines/twine/scene/collision.cpp


diff --git a/engines/twine/scene/collision.cpp b/engines/twine/scene/collision.cpp
index e5c490ef2b3..0e20b9729cc 100644
--- a/engines/twine/scene/collision.cpp
+++ b/engines/twine/scene/collision.cpp
@@ -202,17 +202,17 @@ void Collision::handlePushing(const IVec3 &minsTest, const IVec3 &maxsTest, cons
 		actorTest->_lastPos.y = 0;
 
 		if (actorTest->_staticFlags.bUseMiniZv) {
-			if (newAngle >= ANGLE_45 && newAngle < ANGLE_135 && actor->_angle > ANGLE_45 && actor->_angle < ANGLE_135) {
-				actorTest->_lastPos.x = 192;
+			if (newAngle >= ANGLE_45 && newAngle < ANGLE_135 && actor->_angle >= ANGLE_45 && actor->_angle < ANGLE_135) {
+				actorTest->_lastPos.x = BRICK_SIZE / 4 + BRICK_SIZE / 8;
 			}
-			if (newAngle >= ANGLE_135 && newAngle < ANGLE_225 && actor->_angle > ANGLE_135 && actor->_angle < ANGLE_225) {
-				actorTest->_lastPos.z = -64;
+			if (newAngle >= ANGLE_135 && newAngle < ANGLE_225 && actor->_angle >= ANGLE_135 && actor->_angle < ANGLE_225) {
+				actorTest->_lastPos.z = -BRICK_SIZE / 4 + BRICK_SIZE / 8;
 			}
-			if (newAngle >= ANGLE_225 && newAngle < ANGLE_315 && actor->_angle > ANGLE_225 && actor->_angle < ANGLE_315) {
-				actorTest->_lastPos.x = -64;
+			if (newAngle >= ANGLE_225 && newAngle < ANGLE_315 && actor->_angle >= ANGLE_225 && actor->_angle < ANGLE_315) {
+				actorTest->_lastPos.x = -BRICK_SIZE / 4 + BRICK_SIZE / 8;
 			}
-			if ((newAngle >= ANGLE_315 || newAngle < ANGLE_45) && (actor->_angle > ANGLE_315 || actor->_angle < ANGLE_45)) {
-				actorTest->_lastPos.z = 192;
+			if ((newAngle >= ANGLE_315 || newAngle < ANGLE_45) && (actor->_angle >= ANGLE_315 || actor->_angle < ANGLE_45)) {
+				actorTest->_lastPos.z = BRICK_SIZE / 4 + BRICK_SIZE / 8;
 			}
 		} else {
 			actorTest->_lastPos.x = processActor.x - actor->_collisionPos.x;
@@ -222,7 +222,7 @@ void Collision::handlePushing(const IVec3 &minsTest, const IVec3 &maxsTest, cons
 
 	if ((actorTest->_boudingBox.maxs.x - actorTest->_boudingBox.mins.x == actorTest->_boudingBox.maxs.z - actorTest->_boudingBox.mins.z) &&
 		(actor->_boudingBox.maxs.x - actor->_boudingBox.mins.x == actor->_boudingBox.maxs.z - actor->_boudingBox.mins.z)) {
-		if (newAngle < ANGLE_135) {
+		if (newAngle >= ANGLE_45 && newAngle < ANGLE_135) {
 			processActor.x = minsTest.x - actor->_boudingBox.maxs.x;
 		}
 		if (newAngle >= ANGLE_135 && newAngle < ANGLE_225) {
@@ -231,7 +231,7 @@ void Collision::handlePushing(const IVec3 &minsTest, const IVec3 &maxsTest, cons
 		if (newAngle >= ANGLE_225 && newAngle < ANGLE_315) {
 			processActor.x = maxsTest.x - actor->_boudingBox.mins.x;
 		}
-		if (newAngle >= ANGLE_315 || (newAngle < ANGLE_315 && newAngle < ANGLE_45)) {
+		if (newAngle >= ANGLE_315 && newAngle < ANGLE_45) {
 			processActor.z = minsTest.z - actor->_boudingBox.maxs.z;
 		}
 	} else if (!actor->_dynamicFlags.bIsFalling) {


Commit: c8d23481107a45c9abecfd07925afbdde9badf8e
    https://github.com/scummvm/scummvm/commit/c8d23481107a45c9abecfd07925afbdde9badf8e
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2022-02-15T07:31:24+01:00

Commit Message:
TWINE: convert static variable into member

Changed paths:
    engines/twine/twine.cpp
    engines/twine/twine.h


diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index 226a8c7f396..a948d774e33 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -115,11 +115,10 @@ TwineScreen::TwineScreen(TwinEEngine *engine) : _engine(engine) {
 }
 
 void TwineScreen::update() {
-	static int lastFrame = 0;
-	if (lastFrame == _engine->_frameCounter) {
+	if (_lastFrame == _engine->_frameCounter) {
 		return;
 	}
-	lastFrame = _engine->_frameCounter;
+	_lastFrame = _engine->_frameCounter;
 	Super::update();
 }
 
diff --git a/engines/twine/twine.h b/engines/twine/twine.h
index 9e5e7a406cd..47e28f1021c 100644
--- a/engines/twine/twine.h
+++ b/engines/twine/twine.h
@@ -177,6 +177,7 @@ class TwineScreen : public Graphics::Screen {
 private:
 	using Super = Graphics::Screen;
 	TwinEEngine *_engine;
+	int _lastFrame = -1;
 
 public:
 	TwineScreen(TwinEEngine *engine);


Commit: 37752bd52edb593aa18b3e694b689f6b83ba8b7e
    https://github.com/scummvm/scummvm/commit/37752bd52edb593aa18b3e694b689f6b83ba8b7e
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2022-02-15T07:31:33+01:00

Commit Message:
TWINE: fixed audio track for tippet island scene

Changed paths:
    engines/twine/scene/scene.cpp


diff --git a/engines/twine/scene/scene.cpp b/engines/twine/scene/scene.cpp
index f3bb08d028f..7e55b2392e2 100644
--- a/engines/twine/scene/scene.cpp
+++ b/engines/twine/scene/scene.cpp
@@ -633,7 +633,7 @@ void Scene::initSceneVars() {
 
 void Scene::playSceneMusic() {
 	if (_currentSceneIdx == LBA1SceneId::Tippet_Island_Twinsun_Cafe && _engine->_gameState->hasArrivedHamalayi()) {
-		_engine->_music->playMidiMusic(8);
+		_engine->_music->playTrackMusic(8);
 	} else {
 		_engine->_music->playMidiMusic(_sceneMusic);
 	}




More information about the Scummvm-git-logs mailing list