[Scummvm-git-logs] scummvm master -> c41ac8f9748e7071a9b5fc954f5527a957000ac4

mgerhardy martin.gerhardy at gmail.com
Tue Aug 10 11:41:00 UTC 2021


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

Summary:
faaa0927ce TWINE: added missing enum prefix
1c9377ed93 TWINE: converted enum to enum class
55ad82dff5 TWINE: fixed typos
c41ac8f974 TWINE: fixed rendering the magic ball


Commit: faaa0927ce4751bab020b887304b3e6515dffcf3
    https://github.com/scummvm/scummvm/commit/faaa0927ce4751bab020b887304b3e6515dffcf3
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-10T13:40:49+02:00

Commit Message:
TWINE: added missing enum prefix

Changed paths:
    engines/twine/parser/entity.cpp


diff --git a/engines/twine/parser/entity.cpp b/engines/twine/parser/entity.cpp
index 10af8296d7..52abdda188 100644
--- a/engines/twine/parser/entity.cpp
+++ b/engines/twine/parser/entity.cpp
@@ -135,7 +135,7 @@ bool EntityData::loadAnim(Common::SeekableReadStream &stream) {
 			action.finalAngle = ToAngle(stream.readSint16LE());
 			action.strength = stream.readByte();
 			break;
-		case ACTION_UNKNOWN_21:
+		case ActionType::ACTION_UNKNOWN_21:
 			action.animFrame = stream.readByte();
 			action.distanceX = stream.readSint16LE();
 			action.distanceY = stream.readSint16LE();


Commit: 1c9377ed93dd378b5b6b905e8ee9384bd91d4966
    https://github.com/scummvm/scummvm/commit/1c9377ed93dd378b5b6b905e8ee9384bd91d4966
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-10T13:40:49+02:00

Commit Message:
TWINE: converted enum to enum class

Changed paths:
    engines/twine/parser/entity.cpp
    engines/twine/parser/entity.h
    engines/twine/shared.h


diff --git a/engines/twine/parser/entity.cpp b/engines/twine/parser/entity.cpp
index 52abdda188..3b7204a27d 100644
--- a/engines/twine/parser/entity.cpp
+++ b/engines/twine/parser/entity.cpp
@@ -33,7 +33,7 @@ bool EntityData::loadBody(Common::SeekableReadStream &stream) {
 	body.bodyIndex = stream.readUint16LE();
 	body.actorBoundingBox.hasBoundingBox = stream.readByte();
 	if (body.actorBoundingBox.hasBoundingBox) {
-		if (stream.readByte() == ActionType::ACTION_ZV) {
+		if ((ActionType)stream.readByte() == ActionType::ACTION_ZV) {
 			body.actorBoundingBox.bbox.mins.x = stream.readSint16LE();
 			body.actorBoundingBox.bbox.mins.y = stream.readSint16LE();
 			body.actorBoundingBox.bbox.mins.z = stream.readSint16LE();
@@ -56,7 +56,7 @@ bool EntityData::loadAnim(Common::SeekableReadStream &stream) {
 	const uint8 numActions = stream.readByte();
 	for (uint8 i = 0U; i < numActions; ++i) {
 		EntityAnim::Action action;
-		action.type = stream.readByte();
+		action.type = (ActionType)stream.readByte();
 		switch (action.type) {
 		case ActionType::ACTION_HITTING:
 			action.animFrame = stream.readByte();
diff --git a/engines/twine/parser/entity.h b/engines/twine/parser/entity.h
index f94efec628..47e673bd90 100644
--- a/engines/twine/parser/entity.h
+++ b/engines/twine/parser/entity.h
@@ -42,7 +42,7 @@ struct EntityAnim {
 	int animIndex;
 
 	struct Action {
-		uint8 type = 0;
+		ActionType type = ActionType::ACTION_NOP;
 		uint8 animFrame = 0;
 		int16 sampleIndex = 0;
 		int16 frequency = 0;
diff --git a/engines/twine/shared.h b/engines/twine/shared.h
index e14073212b..3a30c0cb78 100644
--- a/engines/twine/shared.h
+++ b/engines/twine/shared.h
@@ -133,7 +133,7 @@ struct ActorBoundingBox {
 	bool hasBoundingBox = false;
 };
 
-enum ActionType {
+enum class ActionType : uint8 {
 	ACTION_NOP = 0,
 	ACTION_BODY = 1,
 	ACTION_BODP = 2,


Commit: 55ad82dff5188e200d5774621e04d8f605ca2b32
    https://github.com/scummvm/scummvm/commit/55ad82dff5188e200d5774621e04d8f605ca2b32
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-10T13:40:49+02:00

Commit Message:
TWINE: fixed typos

Changed paths:
    engines/twine/shared.h


diff --git a/engines/twine/shared.h b/engines/twine/shared.h
index 3a30c0cb78..3caf15815d 100644
--- a/engines/twine/shared.h
+++ b/engines/twine/shared.h
@@ -64,13 +64,13 @@
 // Hit, reject
 #define GAMEFLAG_VIDEO_BAFFE5 215
 // Twinsun explosion (on top of the well)
-#define GAMEFLAG_VIDEO_EXPLOD 216
+#define GAMEFLAG_VIDEO_EXPLODE 216
 // Clear water lake
 #define GAMEFLAG_VIDEO_GLASS2 217
 // Twinsen in Well of Sendell
 #define GAMEFLAG_VIDEO_SENDEL 218
 // Twinsun explosion
-#define GAMEFLAG_VIDEO_EXPLOD2 219
+#define GAMEFLAG_VIDEO_EXPLODE2 219
 
 namespace TwinE {
 


Commit: c41ac8f9748e7071a9b5fc954f5527a957000ac4
    https://github.com/scummvm/scummvm/commit/c41ac8f9748e7071a9b5fc954f5527a957000ac4
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-10T13:40:49+02:00

Commit Message:
TWINE: fixed rendering the magic ball

introduced in 3f1faa95b7fe02f8b3e515988a4b39e64f72372d

looks like some previous slot is reused here - as the DrawListType::DrawExtras doesn't e.g.
set the x, y and z values of the draw cmd. But it is used in processDrawListExtras()

Changed paths:
    engines/twine/renderer/redraw.cpp


diff --git a/engines/twine/renderer/redraw.cpp b/engines/twine/renderer/redraw.cpp
index be46e88b59..a3a894959b 100644
--- a/engines/twine/renderer/redraw.cpp
+++ b/engines/twine/renderer/redraw.cpp
@@ -667,7 +667,7 @@ void Redraw::redrawEngineActions(bool bgRedraw) {
 		blitBackgroundAreas();
 	}
 
-	DrawListStruct drawList[150];
+	static DrawListStruct drawList[150];
 	int32 drawListPos = fillActorDrawingList(drawList, bgRedraw);
 	drawListPos = fillExtraDrawingList(drawList, drawListPos);
 	sortDrawingList(drawList, drawListPos);




More information about the Scummvm-git-logs mailing list