[Scummvm-git-logs] scummvm master -> 6c185988ce56809174a906f59117471df9bf0ac6

OMGPizzaGuy noreply at scummvm.org
Mon Dec 12 03:57:51 UTC 2022


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

Summary:
f69f3b4092 ULTIMA8: Initialize ShapeFrame pixels array.
fca3a77bea ULTIMA8: clear the fast area bounds on setting whole map fast
6c185988ce ULTIMA8: Remove TODO for whole map fast on minimap generation.


Commit: f69f3b4092872664d3abe5cc2a0de06e02f44b6b
    https://github.com/scummvm/scummvm/commit/f69f3b4092872664d3abe5cc2a0de06e02f44b6b
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2022-12-11T21:57:28-06:00

Commit Message:
ULTIMA8: Initialize ShapeFrame pixels array.

Attempts to use the pixels without also checking the mask array would produce a potentially random value for the transparent pixels. This will now default to the first palette entry, which it black

Changed paths:
    engines/ultima/ultima8/graphics/shape_frame.cpp


diff --git a/engines/ultima/ultima8/graphics/shape_frame.cpp b/engines/ultima/ultima8/graphics/shape_frame.cpp
index 0ed3b0d8184..9adb79f0a3b 100644
--- a/engines/ultima/ultima8/graphics/shape_frame.cpp
+++ b/engines/ultima/ultima8/graphics/shape_frame.cpp
@@ -31,7 +31,7 @@ ShapeFrame::ShapeFrame(const RawShapeFrame *rawframe) :
 		_xoff(rawframe->_xoff), _yoff(rawframe->_yoff),
 		_width(rawframe->_width), _height(rawframe->_height) {
 
-	_pixels = new uint8[_width * _height];
+	_pixels = new uint8[_width * _height]();
 	_mask = new uint8[_width * _height]();
 
 	for (int y = 0; y < _height; y++) {


Commit: fca3a77bea45388ba332242a43d9ffb88adf98be
    https://github.com/scummvm/scummvm/commit/fca3a77bea45388ba332242a43d9ffb88adf98be
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2022-12-11T21:57:28-06:00

Commit Message:
ULTIMA8: clear the fast area bounds on setting whole map fast

These values are used to check if fast area recalculation is needed on next update.

Changed paths:
    engines/ultima/ultima8/world/current_map.cpp


diff --git a/engines/ultima/ultima8/world/current_map.cpp b/engines/ultima/ultima8/world/current_map.cpp
index 09b49011810..090974c55ce 100644
--- a/engines/ultima/ultima8/world/current_map.cpp
+++ b/engines/ultima/ultima8/world/current_map.cpp
@@ -1318,6 +1318,11 @@ void CurrentMap::setWholeMapFast() {
 				setChunkFast(j, i);
 		}
 	}
+
+	_fastXMin = -1;
+	_fastYMin = -1;
+	_fastXMax = -1;
+	_fastYMax = -1;
 }
 
 void CurrentMap::save(Common::WriteStream *ws) {


Commit: 6c185988ce56809174a906f59117471df9bf0ac6
    https://github.com/scummvm/scummvm/commit/6c185988ce56809174a906f59117471df9bf0ac6
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2022-12-11T21:57:28-06:00

Commit Message:
ULTIMA8: Remove TODO for whole map fast on minimap generation.

It seems this is still the best usage. Attempting to remove fast chucks immediately after process still requires additional work that could not be easily avoided.

Changed paths:
    engines/ultima/ultima8/gumps/minimap_gump.cpp


diff --git a/engines/ultima/ultima8/gumps/minimap_gump.cpp b/engines/ultima/ultima8/gumps/minimap_gump.cpp
index 0a320e704a2..018b2eca651 100644
--- a/engines/ultima/ultima8/gumps/minimap_gump.cpp
+++ b/engines/ultima/ultima8/gumps/minimap_gump.cpp
@@ -84,7 +84,6 @@ void MiniMapGump::run() {
 void MiniMapGump::generate() {
 	World *world = World::get_instance();
 	CurrentMap *currentmap = world->getCurrentMap();
-	// TODO - do not leave whole map fast after generation
 	currentmap->setWholeMapFast();
 
 	uint32 mapNum = currentmap->getNum();




More information about the Scummvm-git-logs mailing list