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

rsn8887 rsn8887 at users.noreply.github.com
Thu Mar 29 06:00:17 CEST 2018


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

Summary:
b875f46db0 LILLIPUT: Fix narrowing conversion compiler errors on psp2 build


Commit: b875f46db0f15f6fbbcda952457712ff9453a05b
    https://github.com/scummvm/scummvm/commit/b875f46db0f15f6fbbcda952457712ff9453a05b
Author: rsn8887 (rsn8887 at users.noreply.github.com)
Date: 2018-03-28T23:00:13-05:00

Commit Message:
LILLIPUT: Fix narrowing conversion compiler errors on psp2 build

Changed paths:
    engines/lilliput/lilliput.cpp
    engines/lilliput/script.cpp


diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp
index a37f02d..9daa71f 100644
--- a/engines/lilliput/lilliput.cpp
+++ b/engines/lilliput/lilliput.cpp
@@ -1510,11 +1510,11 @@ void LilliputEngine::sub1693A_chooseDirections(int index) {
 byte LilliputEngine::sub16A76(int indexb, int indexs) {
 	debugC(2, kDebugEngine, "sub16A76(%d, %d)", indexb, indexs);
 
-	static const char _array16A6C[4] = {1, 0, 0, -1};
-	static const char _array16A70[4] = {0, -1, 1, 0};
+	static const int8 _array16A6C[4] = {1, 0, 0, -1};
+	static const int8 _array16A70[4] = {0, -1, 1, 0};
 
-	char var1h = _word16937Pos.x + _array16A6C[indexb];
-	char var1l = _word16937Pos.y + _array16A70[indexb];
+	int8 var1h = _word16937Pos.x + _array16A6C[indexb];
+	int8 var1l = _word16937Pos.y + _array16A70[indexb];
 
 	int16 var2 = findHotspot(Common::Point(var1h, var1l));
 	if (var2 == -1)
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp
index 992833e..959c4e6 100644
--- a/engines/lilliput/script.cpp
+++ b/engines/lilliput/script.cpp
@@ -2671,8 +2671,8 @@ void LilliputScript::OC_scrollAwayFromCharacter() {
 	if (_vm->_currentScriptCharacter != _viewportCharacterTarget)
 		return;
 
-	static const char speedX[] = {-1, -3, -3, -6};
-	static const char speedY[] = {-3, -6, -1, -3};
+	static const int8 speedX[] = {-1, -3, -3, -6};
+	static const int8 speedY[] = {-3, -6, -1, -3};
 
 	int cx = speedX[_vm->_characterDirectionArray[_vm->_currentScriptCharacter]];
 	int cy = speedY[_vm->_characterDirectionArray[_vm->_currentScriptCharacter]];
@@ -2797,8 +2797,8 @@ void LilliputScript::OC_scrollViewPort() {
 
 	int direction = _currScript->readUint16LE();
 
-	static const char scrollValX[] = { 6, 0, 0, -6 };
-	static const char scrollValY[] = { 0, -6, 6, 0 };
+	static const int8 scrollValX[] = { 6, 0, 0, -6 };
+	static const int8 scrollValY[] = { 0, -6, 6, 0 };
 
 	int x = _viewportPos.x + scrollValX[direction];
 	int y = _viewportPos.y + scrollValY[direction];





More information about the Scummvm-git-logs mailing list