[Scummvm-git-logs] scummvm master -> 14964845c30b3ac2478528e50ace1b731bc28f6c

LittleToonCat noreply at scummvm.org
Fri Aug 9 23:18:05 UTC 2024


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:
14964845c3 SCUMM HE: Change some variable types to an `int8`.


Commit: 14964845c30b3ac2478528e50ace1b731bc28f6c
    https://github.com/scummvm/scummvm/commit/14964845c30b3ac2478528e50ace1b731bc28f6c
Author: Little Cat (toontownlittlecat at gmail.com)
Date: 2024-08-09T20:17:55-03:00

Commit Message:
SCUMM HE: Change some variable types to an `int8`.

This fixes compiling on platforms where `char` is unsigned by default.

Thank you dwa for letting me know of the problem.

Changed paths:
    engines/scumm/he/moonbase/map_mif.cpp
    engines/scumm/he/moonbase/map_mif.h


diff --git a/engines/scumm/he/moonbase/map_mif.cpp b/engines/scumm/he/moonbase/map_mif.cpp
index e604c0b3c15..d6026aae86a 100644
--- a/engines/scumm/he/moonbase/map_mif.cpp
+++ b/engines/scumm/he/moonbase/map_mif.cpp
@@ -102,7 +102,7 @@ void MIF::defineStartLocations(MapFile *map) {
 
 	for (y = 0; y < _dimension; ++y) {
 		for (x = 0; x < _dimension; ++x) {
-			char ch = _centerMap[x][y];
+			int8 ch = _centerMap[x][y];
 
 			if (ch < 0) {
 				int i;
@@ -303,7 +303,7 @@ void MIF::makeCraters(MapFile *map) {
 
 uint16 MIF::findTileFor(int x, int y) {
 	int index;
-	char ch;
+	int8 ch;
 
 	byte aLowBlanks[] = {0x93, 0x94, 0x00, 0x96};
 	byte aMedBlanks[] = {0x97, 0x99, 0x0D, 0x9A};
diff --git a/engines/scumm/he/moonbase/map_mif.h b/engines/scumm/he/moonbase/map_mif.h
index 5d0ccb36074..03c90c370a5 100644
--- a/engines/scumm/he/moonbase/map_mif.h
+++ b/engines/scumm/he/moonbase/map_mif.h
@@ -85,7 +85,7 @@ public:
 	int _mapType;
 	char _name[17];
 	byte _cornerMap[MAX_TILE_COUNT][MAX_TILE_COUNT];
-	char _centerMap[MAX_TILE_COUNT][MAX_TILE_COUNT];
+	int8 _centerMap[MAX_TILE_COUNT][MAX_TILE_COUNT];
 private:
 
 	void defineStartLocations(MapFile *map);




More information about the Scummvm-git-logs mailing list