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

Strangerke noreply at scummvm.org
Sun Jan 26 08:18:27 UTC 2025


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:
6ad27a3268 GOT: finish renaming stuff in vars.h


Commit: 6ad27a3268a67feeec41f21e242c40ed3aafea3c
    https://github.com/scummvm/scummvm/commit/6ad27a3268a67feeec41f21e242c40ed3aafea3c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-26T09:17:50+01:00

Commit Message:
GOT: finish renaming stuff in vars.h

Changed paths:
    engines/got/game/boss3.cpp
    engines/got/game/move_patterns.cpp
    engines/got/got.cpp
    engines/got/vars.h


diff --git a/engines/got/game/boss3.cpp b/engines/got/game/boss3.cpp
index f8f6b43e0d3..75a55e78022 100644
--- a/engines/got/game/boss3.cpp
+++ b/engines/got/game/boss3.cpp
@@ -22,7 +22,6 @@
 #include "got/game/boss3.h"
 #include "got/events.h"
 #include "got/game/back.h"
-#include "got/game/init.h"
 #include "got/game/move.h"
 #include "got/game/move_patterns.h"
 #include "got/game/status.h"
@@ -43,8 +42,8 @@ static const byte EXPLOSION[4][8] = {
 static int bossMode;
 static int numPods1;
 static byte podSpeed;
-static bool expf[4][8];
-static byte expCounter;
+static bool explosionFlag[4][8];
+static byte explosionCounter;
 
 static int bossDie();
 static void boss3CheckHit();
@@ -564,11 +563,11 @@ void endingScreen() {
 	
 	musicPlay(6, true);
 
-	memset(expf, 0, 4 * 8);
+	memset(explosionFlag, 0, 4 * 8);
 	_G(endGame) = 1;
 
-	_G(exprow) = 0;
-	expCounter = 0;
+	_G(explosionRow) = 0;
+	explosionCounter = 0;
 
 	_G(actor[34]) = _G(explosion);
 	_G(actor[34])._active = false;
@@ -590,12 +589,12 @@ int endgame_one() {
 	playSound(EXPLODE, true);
 
 	int r = _G(rand1) % 32;
-	while (expf[r / 8][r % 8]) {
+	while (explosionFlag[r / 8][r % 8]) {
 		r++;
 		if (r > 31)
 			r = 0;
 	}
-	expf[r / 8][r % 8] = true;
+	explosionFlag[r / 8][r % 8] = true;
 	int x = (EXPLOSION[r / 8][r % 8] % 20) * 16;
 	int y = (EXPLOSION[r / 8][r % 8] / 20) * 16;
 	_G(actor[34])._x = x;
@@ -618,7 +617,7 @@ int endgame_one() {
 int endGameMovement() {
 	if (!_G(endGame))
 		return 0;
-	if (expCounter > 3) {
+	if (explosionCounter > 3) {
 		endgame_one();
 		return 0;
 	}
@@ -630,14 +629,14 @@ int endGameMovement() {
 	playSound(EXPLODE, true);
 
 	int r = _G(rand1) % 8;
-	while (expf[_G(exprow)][r]) {
+	while (explosionFlag[_G(explosionRow)][r]) {
 		r++;
 		if (r > 7)
 			r = 0;
 	}
-	expf[_G(exprow)][r] = true;
-	const int x = (EXPLOSION[_G(exprow)][r] % 20) * 16;
-	const int y = (EXPLOSION[_G(exprow)][r] / 20) * 16;
+	explosionFlag[_G(explosionRow)][r] = true;
+	const int x = (EXPLOSION[_G(explosionRow)][r] % 20) * 16;
+	const int y = (EXPLOSION[_G(explosionRow)][r] / 20) * 16;
 	_G(actor[34])._x = x;
 	_G(actor[34])._y = y;
 	_G(actor[34])._active = true;
@@ -650,10 +649,10 @@ int endGameMovement() {
 	_G(endGame++);
 	if (_G(endGame) > 8) {
 		_G(endGame) = 1;
-		_G(exprow++);
-		expCounter++;
-		if (expCounter > 3) {
-			memset(expf, 0, 32);
+		_G(explosionRow++);
+		explosionCounter++;
+		if (explosionCounter > 3) {
+			memset(explosionFlag, 0, 32);
 		}
 	}
 
diff --git a/engines/got/game/move_patterns.cpp b/engines/got/game/move_patterns.cpp
index b8f4738f441..d0f5c7b8c13 100644
--- a/engines/got/game/move_patterns.cpp
+++ b/engines/got/game/move_patterns.cpp
@@ -302,7 +302,7 @@ int checkMove0(const int x, const int y, Actor *actor) {
 	x2 = x + 12;	
 	y2 = y + 15;
 
-	_G(thor_special_flag) = false;
+	_G(thorSpecialFlag) = false;
 	for (int i = 3; i < MAX_ACTORS; i++) {
 		Actor *act = &_G(actor[i]);
 		if ((act->_solid & 128) || !act->_active)
@@ -322,12 +322,12 @@ int checkMove0(const int x, const int y, Actor *actor) {
 					return 0;
 				act->_temp1 = x;
 				act->_temp2 = y;
-				_G(thor_special_flag) = true;
+				_G(thorSpecialFlag) = true;
 				
 				return specialMovementFunc[act->_funcNum](act);
 			}
 
-			_G(thor_special_flag) = false;
+			_G(thorSpecialFlag) = false;
 			thorDamaged(act);
 			if (act->_solid < 2) {
 				if (!act->_vulnerableCountdown && (!(act->_type & 1)))
@@ -614,7 +614,7 @@ int check_thor_move(const int x, const int y, Actor *actor) {
 	if (checkMove0(x, y, actor))
 		return 1;
 	
-	if (_G(diagFlag) || _G(thor_special_flag))
+	if (_G(diagFlag) || _G(thorSpecialFlag))
 		return 0;
 
 	if (_G(thorIcon1) + _G(thorIcon2) + _G(thorIcon3) + _G(thorIcon4) > 1)
diff --git a/engines/got/got.cpp b/engines/got/got.cpp
index d2ce6e7acba..2f84f331c5f 100644
--- a/engines/got/got.cpp
+++ b/engines/got/got.cpp
@@ -135,7 +135,7 @@ Common::Error GotEngine::syncGame(Common::Serializer &s) {
 }
 
 void GotEngine::savegameLoaded() {
-	_G(current_area) = _G(thorInfo)._lastScreen;
+	_G(currentArea) = _G(thorInfo)._lastScreen;
 
 	_G(thor)->_x = (_G(thorInfo)._lastIcon % 20) * 16;
 	_G(thor)->_y = ((_G(thorInfo)._lastIcon / 20) * 16) - 1;
@@ -158,7 +158,7 @@ void GotEngine::savegameLoaded() {
 	_G(setup)._digitalSound = _G(soundFlag);
 
 	if (_G(setup)._musicEnabled) {
-		if (GAME1 && _G(current_area) == 59) {
+		if (GAME1 && _G(currentArea) == 59) {
 			musicPlay(5, true);
 		} else {
 			musicPlay(_G(levelMusic), true);
diff --git a/engines/got/vars.h b/engines/got/vars.h
index d6a935c7b7f..bcef339f861 100644
--- a/engines/got/vars.h
+++ b/engines/got/vars.h
@@ -200,11 +200,9 @@ public:
 	int _currentLevel = 23;
 	int _newLevel = 0;
 	int _newLevelTile = 0;
-	int _current_area = 0;
-	char _sd_header[128] = {};
-	char _play_speed = 0;
-	bool _thor_special_flag = false;
-	byte _exprow = 0;
+	int _currentArea = 0;
+	bool _thorSpecialFlag = false;
+	byte _explosionRow = 0;
 };
 
 #define _G(X) (g_vars->_##X)




More information about the Scummvm-git-logs mailing list