[Scummvm-git-logs] scummvm master -> 8d828b4a8fe4eb723d7b9e0ec5838b26024b450b

digitall noreply at scummvm.org
Sun Dec 10 21:17:54 UTC 2023


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:
8d828b4a8f ULTIMA: NUVIE: Fix Various GCC Compiler Warnings


Commit: 8d828b4a8fe4eb723d7b9e0ec5838b26024b450b
    https://github.com/scummvm/scummvm/commit/8d828b4a8fe4eb723d7b9e0ec5838b26024b450b
Author: D G Turner (digitall at scummvm.org)
Date: 2023-12-10T21:17:21Z

Commit Message:
ULTIMA: NUVIE: Fix Various GCC Compiler Warnings

Changed paths:
    engines/ultima/nuvie/menus/asset_viewer_dialog.cpp
    engines/ultima/nuvie/screen/screen.cpp
    engines/ultima/nuvie/script/script_cutscene.cpp


diff --git a/engines/ultima/nuvie/menus/asset_viewer_dialog.cpp b/engines/ultima/nuvie/menus/asset_viewer_dialog.cpp
index f6d2c0432d4..a67d18ac15a 100644
--- a/engines/ultima/nuvie/menus/asset_viewer_dialog.cpp
+++ b/engines/ultima/nuvie/menus/asset_viewer_dialog.cpp
@@ -95,24 +95,24 @@ void AssetViewerDialog::Display(bool full_redraw) {
 
 	if (_viewMode == TileViewMode) {
 		TileManager *tileman = Game::get_game()->get_tile_manager();
-		Screen *screen = Game::get_game()->get_screen();
+		Screen *gameScreen = Game::get_game()->get_screen();
 		const Tile *tile = tileman->get_tile(_curIdx);
 		
 		if (tile) {
-			screen->blit(offset_x + 100, offset_y + 100, tile->data, 8, 16, 16, 16, tile->transparent);
+			gameScreen->blit(offset_x + 100, offset_y + 100, tile->data, 8, 16, 16, 16, tile->transparent);
 			if (tile->dbl_width) {
 				const Tile *left = tileman->get_tile(_curIdx - 1);
-				screen->blit(offset_x + 100 - 16, offset_y + 100, left->data, 8, 16, 16, 16, left->transparent);
+				gameScreen->blit(offset_x + 100 - 16, offset_y + 100, left->data, 8, 16, 16, 16, left->transparent);
 			}
 			if (tile->dbl_height && !tile->dbl_width) {
 				const Tile *top = tileman->get_tile(_curIdx - 1);
-				screen->blit(offset_x + 100, offset_y + 100 - 16, top->data, 8, 16, 16, 16, top->transparent);
+				gameScreen->blit(offset_x + 100, offset_y + 100 - 16, top->data, 8, 16, 16, 16, top->transparent);
 			} else if (tile->dbl_height) {
 				// dbl width and double-height
 				const Tile *topleft = tileman->get_tile(_curIdx - 3);
-				screen->blit(offset_x + 100 - 16, offset_y + 100 - 16, topleft->data, 8, 16, 16, 16, topleft->transparent);
+				gameScreen->blit(offset_x + 100 - 16, offset_y + 100 - 16, topleft->data, 8, 16, 16, 16, topleft->transparent);
 				const Tile *top = tileman->get_tile(_curIdx - 2);
-				screen->blit(offset_x + 100, offset_y + 100 - 16, top->data, 8, 16, 16, 16, top->transparent);
+				gameScreen->blit(offset_x + 100, offset_y + 100 - 16, top->data, 8, 16, 16, 16, top->transparent);
 			}
 		}
 	} else {
diff --git a/engines/ultima/nuvie/screen/screen.cpp b/engines/ultima/nuvie/screen/screen.cpp
index 76108d75589..5e8cb875847 100644
--- a/engines/ultima/nuvie/screen/screen.cpp
+++ b/engines/ultima/nuvie/screen/screen.cpp
@@ -1016,7 +1016,7 @@ Graphics::ManagedSurface *Screen::create_sdl_surface_8(const byte *src_buf, uint
 					break;
 				}
 	} else {
-		uint32 *src = (uint32 *)src_buf;
+		const uint32 *src = (const uint32 *)src_buf;
 		for (int p = 0; p < (src_w * src_h); p++)
 			for (int i = 0; i < 256; i++)
 				if (src[p] == _renderSurface->colour32[i]) {
diff --git a/engines/ultima/nuvie/script/script_cutscene.cpp b/engines/ultima/nuvie/script/script_cutscene.cpp
index 7a744bb068b..ea526bf3ab3 100644
--- a/engines/ultima/nuvie/script/script_cutscene.cpp
+++ b/engines/ultima/nuvie/script/script_cutscene.cpp
@@ -1412,8 +1412,8 @@ void ScriptCutscene::print_text(CSImage *image, const char *s, uint16 *x, uint16
 			if (tokens.size() > 1)
 				new_space = floor((width - (len - space_width * (tokens.size() - 1))) / (tokens.size() - 1));
 
-			for (const Std::string &s : tokens) {
-				*x = ((WOUFont *)font)->drawStringToShape(image->shp, s.c_str(), *x, *y, color);
+			for (const Std::string &ss : tokens) {
+				*x = ((WOUFont *)font)->drawStringToShape(image->shp, ss.c_str(), *x, *y, color);
 				*x += new_space;
 			}
 			*y += 8;
@@ -1430,8 +1430,8 @@ void ScriptCutscene::print_text(CSImage *image, const char *s, uint16 *x, uint16
 		found = str.findFirstOf(" ", start);
 	}
 
-	for (const Std::string &s : tokens) {
-		*x = ((WOUFont *)font)->drawStringToShape(image->shp, s.c_str(), *x, *y, color);
+	for (const Std::string &ss : tokens) {
+		*x = ((WOUFont *)font)->drawStringToShape(image->shp, ss.c_str(), *x, *y, color);
 		*x += space_width;
 	}
 




More information about the Scummvm-git-logs mailing list