[Scummvm-git-logs] scummvm branch-2-3 -> 3c9c7a74910c07a9d6687330800cb0d8dc6b78bb

mgerhardy martin.gerhardy at gmail.com
Tue Aug 31 05:10:13 UTC 2021


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

Summary:
fc07ffbecf TWINE: todo comments
3c9c7a7491 TWINE: fixed shading for model rendering


Commit: fc07ffbecf57af294fa1d93228e99f41c78de74c
    https://github.com/scummvm/scummvm/commit/fc07ffbecf57af294fa1d93228e99f41c78de74c
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-31T07:09:59+02:00

Commit Message:
TWINE: todo comments

Changed paths:
    engines/twine/menu/interface.cpp
    engines/twine/parser/bodytypes.h


diff --git a/engines/twine/menu/interface.cpp b/engines/twine/menu/interface.cpp
index 2cbdb23c50..ddf30bee78 100644
--- a/engines/twine/menu/interface.cpp
+++ b/engines/twine/menu/interface.cpp
@@ -50,7 +50,6 @@ int32 Interface::checkClipping(int32 x, int32 y) const {
 	return code;
 }
 
-// TODO: check if Graphics::drawLine() works here
 bool Interface::drawLine(int32 startWidth, int32 startHeight, int32 endWidth, int32 endHeight, uint8 lineColor) {
 	// draw line from left to right
 	if (startWidth > endWidth) {
diff --git a/engines/twine/parser/bodytypes.h b/engines/twine/parser/bodytypes.h
index 8032c75f5e..edf077310e 100644
--- a/engines/twine/parser/bodytypes.h
+++ b/engines/twine/parser/bodytypes.h
@@ -37,14 +37,16 @@ struct BodyVertex {
 };
 
 struct BodyLine {
-	uint8 color;
+	// TODO: intensity??
 	uint8 unk1;
+	uint8 color;
 	uint16 unk2;
 	uint16 vertex1;
 	uint16 vertex2;
 };
 
 struct BodySphere {
+	// TODO: intensity??
 	uint8 unk1;
 	uint8 color;
 	uint16 unk2;


Commit: 3c9c7a74910c07a9d6687330800cb0d8dc6b78bb
    https://github.com/scummvm/scummvm/commit/3c9c7a74910c07a9d6687330800cb0d8dc6b78bb
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-31T07:10:00+02:00

Commit Message:
TWINE: fixed shading for model rendering

see issue #12861 (Polygons more visible than they should be (no smoothing))

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


diff --git a/engines/twine/renderer/renderer.cpp b/engines/twine/renderer/renderer.cpp
index bd5fa9ded1..c4ba642163 100644
--- a/engines/twine/renderer/renderer.cpp
+++ b/engines/twine/renderer/renderer.cpp
@@ -789,12 +789,10 @@ void Renderer::renderPolygonsGouraud(int vtop, int32 vsize) const {
 				colorSize /= hsize;
 				hsize++;
 
-				const uint8 startColorByte = startColor / 256;
-
 				if (hsize % 2) {
 					hsize /= 2;
 					if (currentXPos >= 0 && currentXPos < screenWidth) {
-						*out2 = startColorByte;
+						*out2 = startColor >> 8;
 					}
 					out2++;
 					currentXPos++;
@@ -805,14 +803,14 @@ void Renderer::renderPolygonsGouraud(int vtop, int32 vsize) const {
 
 				do {
 					if (currentXPos >= 0 && currentXPos < screenWidth) {
-						*out2 = startColorByte;
+						*out2 = startColor >> 8;
 					}
 
 					currentXPos++;
 					startColor += colorSize;
 
 					if (currentXPos >= 0 && currentXPos < screenWidth) {
-						*(out2 + 1) = startColorByte;
+						*(out2 + 1) = startColor >> 8;
 					}
 
 					currentXPos++;
@@ -1540,7 +1538,7 @@ void Renderer::fillHolomapPolygons(const Vertex &vertex1, const Vertex &vertex2,
 		return;
 	}
 
-	int16* polygonTabPtr;
+	int16 *polygonTabPtr;
 	if (yBottom < yTop) {
 		if (yBottom < top) {
 			top = yBottom;




More information about the Scummvm-git-logs mailing list