[Scummvm-git-logs] scummvm master -> 8054f82c124cb9db26ece58d0b98a0c10eee8ce4

Strangerke noreply at scummvm.org
Mon Aug 7 18:20:23 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:
8054f82c12 EFH: fix initialization of _mapSpecialTiles, intiialize _vgaLineBuffer


Commit: 8054f82c124cb9db26ece58d0b98a0c10eee8ce4
    https://github.com/scummvm/scummvm/commit/8054f82c124cb9db26ece58d0b98a0c10eee8ce4
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2023-08-07T19:20:13+01:00

Commit Message:
EFH: fix initialization of _mapSpecialTiles, intiialize _vgaLineBuffer

Changed paths:
    engines/efh/init.cpp


diff --git a/engines/efh/init.cpp b/engines/efh/init.cpp
index f3d0b1fc4c0..fc7431c2a2c 100644
--- a/engines/efh/init.cpp
+++ b/engines/efh/init.cpp
@@ -245,6 +245,9 @@ EfhEngine::EfhEngine(OSystem *syst, const ADGameDescription *gd) : Engine(syst),
 	_platform = Common::kPlatformUnknown;
 	_mainSurface = nullptr;
 
+	for (int i = 0; i < 200; ++i)
+		_vgaLineBuffer[i] = nullptr;
+
 	_vgaGraphicsStruct1 = new EfhGraphicsStruct(_vgaLineBuffer, 0, 0, 320, 200);
 	_vgaGraphicsStruct2 = new EfhGraphicsStruct();
 
@@ -300,7 +303,8 @@ EfhEngine::EfhEngine(OSystem *syst, const ADGameDescription *gd) : Engine(syst),
 
 	for (int i = 0; i < 100; ++i) {
 		_imp1PtrArray[i] = nullptr;
-		_mapSpecialTiles[_techId][i].init();
+		for (int j = 0; j < 19; ++j)
+			_mapSpecialTiles[j][i].init();
 	}
 
 	for (int i = 0; i < 432; ++i)
@@ -322,9 +326,8 @@ EfhEngine::EfhEngine(OSystem *syst, const ADGameDescription *gd) : Engine(syst),
 
 	_teamChar[0]._id = 0;
 
-	for (int i = 0; i < 5; ++i) {
+	for (int i = 0; i < 5; ++i)
 		_teamMonster[i].init();
-	}
 
 	_teamSize = 1;
 	_word2C872 = 0;
@@ -351,9 +354,8 @@ EfhEngine::EfhEngine(OSystem *syst, const ADGameDescription *gd) : Engine(syst),
 	_menuDepth = 0;
 	_menuItemCounter = 0;
 
-	for (int i = 0; i < 15; ++i) {
+	for (int i = 0; i < 15; ++i)
 		_menuStatItemArr[i] = 0;
-	}
 
 	_messageToBePrinted = "";
 	for (int i = 0; i < 8; ++i)
@@ -400,6 +402,7 @@ EfhEngine::EfhEngine(OSystem *syst, const ADGameDescription *gd) : Engine(syst),
 		if (saveSlot >= 0 && saveSlot <= 999)
 			_loadSaveSlot = saveSlot;
 	}
+
 }
 
 } // End of namespace Efh




More information about the Scummvm-git-logs mailing list