[Scummvm-git-logs] scummvm master -> 85ebfd835dd8cedf007b8010e6d356df897b5ca8

digitall dgturner at iee.org
Thu Aug 9 23:05:25 CEST 2018


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:
d7a977b152 STARTREK: Fix Compiler Warning from PS2 Toolchain.
85ebfd835d STARTREK: Possible Fix for OUYA Toolchain Build Error.


Commit: d7a977b15201f2c849da4b8bbadca05122f8be6f
    https://github.com/scummvm/scummvm/commit/d7a977b15201f2c849da4b8bbadca05122f8be6f
Author: D G Turner (digitall at scummvm.org)
Date: 2018-08-09T22:10:36+01:00

Commit Message:
STARTREK: Fix Compiler Warning from PS2 Toolchain.

Changed paths:
    engines/startrek/font.h


diff --git a/engines/startrek/font.h b/engines/startrek/font.h
index 27f8fa2..19496a7 100644
--- a/engines/startrek/font.h
+++ b/engines/startrek/font.h
@@ -44,7 +44,7 @@ private:
 		byte data[0x40];
 	} *_characters;
 
-	const static byte _fontProperties[256];
+	static const byte _fontProperties[256];
 };
 
 } // End of namespace StarTrek


Commit: 85ebfd835dd8cedf007b8010e6d356df897b5ca8
    https://github.com/scummvm/scummvm/commit/85ebfd835dd8cedf007b8010e6d356df897b5ca8
Author: D G Turner (digitall at scummvm.org)
Date: 2018-08-09T22:11:01+01:00

Commit Message:
STARTREK: Possible Fix for OUYA Toolchain Build Error.

The size of the void StarTrekEngine::drawR3Shape(R3 *r3) function is
very large, and this is using quite a lot of large variables on the
stack, rather than by heap allocation.

The exact cause is unclear, but this provokes an internal GCC error /
bug in the Android OUYA toolchain. To try to avoid this, this commit
changes several of the large local allocations from stack to heap i.e.
using new and delete[] to try to avoid this.

Changed paths:
    engines/startrek/space.cpp


diff --git a/engines/startrek/space.cpp b/engines/startrek/space.cpp
index 6d2c469..ec1c89d 100644
--- a/engines/startrek/space.cpp
+++ b/engines/startrek/space.cpp
@@ -310,9 +310,8 @@ void StarTrekEngine::drawR3Shape(R3 *r3) {
 		thing[6] = 1.0 * dbl20 + dbl3e4 * dbl30 + dbl10;
 		thing[7] = 1.0 * dbl18 + dbl3e4 * dbl28 + dbl8;
 
-
-		int16 rightBounds[SCREEN_HEIGHT];
-		int16 leftBounds[SCREEN_HEIGHT];
+		int16 *rightBounds = new int16[SCREEN_HEIGHT];
+		int16 *leftBounds = new int16[SCREEN_HEIGHT];
 
 		for (int y = _starfieldRect.top; y < _starfieldRect.bottom; y++) {
 			leftBounds[y] = _starfieldRect.right;
@@ -416,7 +415,7 @@ void StarTrekEngine::drawR3Shape(R3 *r3) {
 			int16 var3f8 = var3f4 * shpImageTop + (int16)(dbl38 * 256);
 
 			Bitmap tmpBitmap(256, 249);
-			byte otherBuffer[256 * 256];
+			byte *otherBuffer = new byte[256 * 256];
 
 			int16 bitmapWidth = bitmap->width;
 			int16 bitmapHeight = bitmap->height;
@@ -482,7 +481,12 @@ void StarTrekEngine::drawR3Shape(R3 *r3) {
 					warning("Unimplemented branch in \"drawR3Shape\"");
 				}
 			}
+
+			delete[] otherBuffer;
 		}
+
+		delete[] rightBounds;
+		delete[] leftBounds;
 	}
 
 	if (r3->funcPtr2 != 0) {





More information about the Scummvm-git-logs mailing list