[Scummvm-git-logs] scummvm master -> 10a74b2e6c351814f6006afaa48869298c3c2afc

Strangerke Strangerke at scummvm.org
Mon Sep 16 23:14:08 CEST 2019


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

Summary:
35ff6adfd5 HDB: Fix some more uninitialized variables
10a74b2e6c HDB: Turn a couple of arrays into static const


Commit: 35ff6adfd54af20d65130d8fb387a195a56c7b86
    https://github.com/scummvm/scummvm/commit/35ff6adfd54af20d65130d8fb387a195a56c7b86
Author: Strangerke (strangerke at scummvm.org)
Date: 2019-09-16T23:06:17+02:00

Commit Message:
HDB: Fix some more uninitialized variables

Changed paths:
    engines/hdb/ai-init.cpp
    engines/hdb/window.cpp


diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp
index e2e42cc..124b653 100644
--- a/engines/hdb/ai-init.cpp
+++ b/engines/hdb/ai-init.cpp
@@ -1020,6 +1020,32 @@ AI::AI() {
 		_cineBlitList[i] = nullptr;
 		_cineFreeList[i] = nullptr;
 	}
+	_targetDoor2S = 0;
+	_targetDoor2Nv = 0;
+	_targetDoor2Pv = 0;
+	_targetDoor2Sv = 0;
+	_target2DoorN = 0;
+	_target2DoorP = 0;
+	_target2DoorS = 0;
+	_target2DoorNv = 0;
+	_target2DoorPv = 0;
+	_target2DoorSv = 0;
+	_target3DoorN = 0;
+	_target3DoorP = 0;
+	_target3DoorS = 0;
+	_target3DoorNv = 0;
+	_target3DoorPv = 0;
+	_target3DoorSv = 0;
+	_targetBridgeU = 0;
+	_targetBridgeD = 0;
+	_targetBridgeL = 0;
+	_targetBridgeR = 0;
+	_targetBridgeMidLR = 0;
+	_targetBridgeMidUD = 0;
+	_touchplateOn = 0;
+	_touchplateOff = 0;
+	_templeTouchpOn = 0;
+	_templeTouchpOff = 0;
 }
 
 AI::~AI() {
diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp
index 729c464..c47b9a5 100644
--- a/engines/hdb/window.cpp
+++ b/engines/hdb/window.cpp
@@ -119,6 +119,8 @@ Window::Window() {
 	_gfxTitleM = nullptr;
 	_gfxTitleR = nullptr;
 	_gGfxTL = nullptr;
+	_invItemSpaceX = 0;
+	_invItemSpaceY = 0;
 }
 
 Window::~Window() {


Commit: 10a74b2e6c351814f6006afaa48869298c3c2afc
    https://github.com/scummvm/scummvm/commit/10a74b2e6c351814f6006afaa48869298c3c2afc
Author: Strangerke (strangerke at scummvm.org)
Date: 2019-09-16T23:11:40+02:00

Commit Message:
HDB: Turn a couple of arrays into static const

Changed paths:
    engines/hdb/ai-player.cpp


diff --git a/engines/hdb/ai-player.cpp b/engines/hdb/ai-player.cpp
index 70e527f..059da9d 100644
--- a/engines/hdb/ai-player.cpp
+++ b/engines/hdb/ai-player.cpp
@@ -501,7 +501,9 @@ void aiPlayerDraw(AIEntity *e, int mx, int my) {
 }
 
 void aiGemAttackInit(AIEntity *e) {
-	int xv[5] = {9, 0, 0, -1, 1}, yv[5] = {9, -1, 1, 0, 0};
+	static const int xv[5] = {9, 0, 0, -1, 1};
+	static const int yv[5] = {9, -1, 1, 0, 0};
+
 	e->moveSpeed = kPlayerMoveSpeed << 1;
 	g_hdb->_ai->setEntityGoal(e, e->tileX + xv[e->dir], e->tileY + yv[e->dir]);
 	e->state = STATE_MOVEDOWN;		// so it will draw & animate





More information about the Scummvm-git-logs mailing list