[Scummvm-git-logs] scummvm master -> 97a3f61fc31def6d4df80477eea0a0f5e8fcb67e

Strangerke noreply at scummvm.org
Wed Jan 22 09:39:20 UTC 2025


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:
be65945699 GOT: Update copyright
97a3f61fc3 GOT: Rename sound, some cleanup


Commit: be659456994974af793d8df661d83cdefd372d22
    https://github.com/scummvm/scummvm/commit/be659456994974af793d8df661d83cdefd372d22
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-22T10:39:08+01:00

Commit Message:
GOT: Update copyright

Changed paths:
    engines/got/detection.h


diff --git a/engines/got/detection.h b/engines/got/detection.h
index b9238d19804..369636106c6 100644
--- a/engines/got/detection.h
+++ b/engines/got/detection.h
@@ -58,7 +58,7 @@ public:
 	}
 
 	const char *getOriginalCopyright() const override {
-		return "Got (C)";
+		return "Got (C) 1993-1994 Ron Davis";
 	}
 
 	const DebugChannelDef *getDebugChannels() const override {


Commit: 97a3f61fc31def6d4df80477eea0a0f5e8fcb67e
    https://github.com/scummvm/scummvm/commit/97a3f61fc31def6d4df80477eea0a0f5e8fcb67e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-22T10:39:08+01:00

Commit Message:
GOT: Rename sound, some cleanup

Changed paths:
    engines/got/console.cpp
    engines/got/data/level.cpp
    engines/got/game/back.cpp
    engines/got/game/boss1.cpp
    engines/got/game/boss2.cpp
    engines/got/game/boss3.cpp
    engines/got/game/init.cpp
    engines/got/game/move.cpp
    engines/got/game/move_patterns.cpp
    engines/got/game/object.cpp
    engines/got/game/script.cpp
    engines/got/game/shot_pattern.cpp
    engines/got/game/special_tile.cpp
    engines/got/game/special_tile.h
    engines/got/got.cpp
    engines/got/sound.cpp
    engines/got/sound.h
    engines/got/vars.cpp
    engines/got/vars.h
    engines/got/views/game_content.cpp
    engines/got/views/game_status.cpp
    engines/got/views/view.cpp


diff --git a/engines/got/console.cpp b/engines/got/console.cpp
index b5642e16996..03652aad2b1 100644
--- a/engines/got/console.cpp
+++ b/engines/got/console.cpp
@@ -58,13 +58,13 @@ bool Console::cmdView(int argc, const char **argv) {
 
 bool Console::cmdSound(int argc, const char **argv) {
 	if (argc == 2)
-		_G(sound).play_sound(atoi(argv[1]), true);
+		_G(sound).playSound(atoi(argv[1]), true);
 	return false;
 }
 
 bool Console::cmdMusic(int argc, const char **argv) {
 	if (argc == 2)
-		_G(sound).music_play(atoi(argv[1]), true);
+		_G(sound).musicPlay(atoi(argv[1]), true);
 	return false;
 }
 
@@ -116,18 +116,18 @@ bool Console::cmdFreeze(int argc, const char **argv) {
 	if (argc != 2) {
 		debugPrintf("freeze ['health', 'magic', 'gems']\n");
 	} else if (!strcmp(argv[1], "health")) {
-		_G(cheats).freezeHealth = !_G(cheats).freezeHealth;
-		debugPrintf("Health is %s\n", _G(cheats).freezeHealth ? "frozen" : "unfrozen");
+		_G(cheats)._freezeHealth = !_G(cheats)._freezeHealth;
+		debugPrintf("Health is %s\n", _G(cheats)._freezeHealth ? "frozen" : "unfrozen");
 	} else if (!strcmp(argv[1], "magic")) {
-		_G(cheats).freezeMagic = !_G(cheats).freezeMagic;
-		debugPrintf("Magic is %s\n", _G(cheats).freezeMagic ? "frozen" : "unfrozen");
+		_G(cheats)._freezeMagic = !_G(cheats)._freezeMagic;
+		debugPrintf("Magic is %s\n", _G(cheats)._freezeMagic ? "frozen" : "unfrozen");
 	} else if (!strcmp(argv[1], "jewels")) {
-		_G(cheats).freezeJewels = !_G(cheats).freezeJewels;
-		debugPrintf("Jewels are %s\n", _G(cheats).freezeJewels ? "frozen" : "unfrozen");
+		_G(cheats)._freezeJewels = !_G(cheats)._freezeJewels;
+		debugPrintf("Jewels are %s\n", _G(cheats)._freezeJewels ? "frozen" : "unfrozen");
 	} else if (!strcmp(argv[1], "all")) {
-		_G(cheats).freezeHealth = _G(cheats).freezeMagic =
-			_G(cheats).freezeJewels = !_G(cheats).freezeHealth;
-		debugPrintf("All are %s\n", _G(cheats).freezeHealth ? "frozen" : "unfrozen");
+		_G(cheats)._freezeHealth = _G(cheats)._freezeMagic =
+			_G(cheats)._freezeJewels = !_G(cheats)._freezeHealth;
+		debugPrintf("All are %s\n", _G(cheats)._freezeHealth ? "frozen" : "unfrozen");
 	}
 
 	return true;
diff --git a/engines/got/data/level.cpp b/engines/got/data/level.cpp
index 54d9cbd86bd..e6c20d016c8 100644
--- a/engines/got/data/level.cpp
+++ b/engines/got/data/level.cpp
@@ -55,13 +55,13 @@ void Level::sync(Common::Serializer &s) {
 }
 
 void Level::load(int level) {
-	Common::MemoryReadStream src(_G(sd_data)[level], 512);
+	Common::MemoryReadStream src(_G(sdData)[level], 512);
 	Common::Serializer s(&src, nullptr);
 	sync(s);
 }
 
 void Level::save(int level) {
-	Common::MemoryWriteStream dest(_G(sd_data)[level], 512);
+	Common::MemoryWriteStream dest(_G(sdData)[level], 512);
 	Common::Serializer s(nullptr, &dest);
 	sync(s);
 }
diff --git a/engines/got/game/back.cpp b/engines/got/game/back.cpp
index 2caa678754e..aca958bf049 100644
--- a/engines/got/game/back.cpp
+++ b/engines/got/game/back.cpp
@@ -94,7 +94,7 @@ void showLevel(const int newLevel) {
 		_G(current_level) = newLevel; // Force no scroll
 
 	if (_G(music_current) != _G(levelMusic))
-		_G(sound).music_pause();
+		_G(sound).musicPause();
 
 	switch (_G(new_level) - _G(current_level)) {
 	case 0:
@@ -175,7 +175,7 @@ void showLevelDone() {
 		f = false;
 
 	if (f)
-		music_play(_G(levelMusic), false);
+		musicPlay(_G(levelMusic), false);
 }
 
 static void odin_speaks_end() {
@@ -199,7 +199,7 @@ void odinSpeaks(const int index, int item, const char *endMessage) {
 }
 
 int switchIcons() {
-	play_sound(WOOP, false);
+	playSound(WOOP, false);
 
 	for (int y = 0; y < 12; y++) {
 		for (int x = 0; x < 20; x++) {
@@ -225,7 +225,7 @@ int switchIcons() {
 }
 
 int rotateArrows() {
-	play_sound(WOOP, false);
+	playSound(WOOP, false);
 
 	for (int y = 0; y < 12; y++) {
 		for (int x = 0; x < 20; x++) {
@@ -270,7 +270,7 @@ void killEnemies(const int iy, const int ix) {
 	y2 = y1 + 5;
 
 	if (pointWithin(x1, y1, ix, iy, ix + 15, iy + 15) || pointWithin(x2, y1, ix, iy, ix + 15, iy + 15) || pointWithin(x1, y2, ix, iy, ix + 15, iy + 15) || pointWithin(x2, y2, ix, iy, ix + 15, iy + 15)) {
-		if (!_G(cheats).freezeHealth) {
+		if (!_G(cheats)._freezeHealth) {
 			_G(thor)->_health = 0;
 			g_events->send(GameMessage("THOR_DIES"));
 		}
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index 7b187f1ec09..ae0482f7f3e 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -57,7 +57,7 @@ int boss1Movement(Actor *actor) {
 	if (actor->_temp3) { //start striking
 		actor->_temp3--;
 		if (!actor->_temp3)
-			play_sound(BOSS11, false);
+			playSound(BOSS11, false);
 
 		if (_G(hourglass_flag))
 			actor->_numMoves = 3;
@@ -190,7 +190,7 @@ void boss1CheckHit(const Actor *actor, int x1, int y1, int x2, int y2, int act_n
 
 			_G(actor[3])._moveCountdown = 50;
 			_G(actor[3])._vulnerableCountdown = 100;
-			play_sound(BOSS13, true);
+			playSound(BOSS13, true);
 			_G(actor[3])._nextFrame = 1;
 
 			for (int rep = 4; rep < 7; rep++) {
@@ -207,10 +207,10 @@ void boss1CheckHit(const Actor *actor, int x1, int y1, int x2, int y2, int act_n
 void boss1SetupLevel() {
 	setupBoss(1);
 	_G(boss_active) = true;
-	music_pause();
-	play_sound(BOSS11, true);
+	musicPause();
+	playSound(BOSS11, true);
 	g_events->send("Game", GameMessage("PAUSE", 40));
-	music_play(5, true);
+	musicPlay(5, true);
 }
 
 static int boss1_dead() {
@@ -241,7 +241,7 @@ static int boss1_dead() {
 			_G(actor[3 + rep])._currNumShots = (10 - _G(actor[3 + rep])._speed) * 10;
 			_G(actor[3 + rep])._moveCountdown = _G(actor[3 + rep])._speed;
 		}
-		play_sound(EXPLODE, true);
+		playSound(EXPLODE, true);
 		_G(boss_dead) = true;
 
 		for (int rep = 7; rep < MAX_ACTORS; rep++) {
@@ -255,7 +255,7 @@ static int boss1_dead() {
 
 void boss1ClosingSequence1() {
 	_G(game_over) = true;
-	music_play(4, true);
+	musicPlay(4, true);
 	odinSpeaks(1001, 13, "CLOSING");
 }
 
@@ -283,7 +283,7 @@ void boss1ClosingSequence4() {
 	_G(scrn)._music = 4;
 	showLevel(BOSS_LEVEL1);
 
-	play_sound(ANGEL, true);
+	playSound(ANGEL, true);
 	placeTile(18, 6, 148);
 	placeTile(19, 6, 202);
 	actorVisible(1);
diff --git a/engines/got/game/boss2.cpp b/engines/got/game/boss2.cpp
index 3babd1085bc..6c90eee64f4 100644
--- a/engines/got/game/boss2.cpp
+++ b/engines/got/game/boss2.cpp
@@ -135,7 +135,7 @@ int boss2Movement(Actor *actor) {
 			_G(actor[3])._temp6 = 40;
 
 			actorAlwaysShoots(actor, 1);
-			play_sound(FALL, false);
+			playSound(FALL, false);
 			_G(actor[actor->_shotActor])._x = actor->_x + 12;
 			_G(actor[actor->_shotActor])._y = actor->_y + 32;
 			_G(actor[actor->_shotActor])._temp2 = 0;
@@ -173,7 +173,7 @@ void boss2CheckHit(Actor *actor, int x1, int y1, int x2, int y2, int act_num) {
 		actorDamaged(&_G(actor[3]), _G(hammer)->_hitStrength);
 		_G(actor[3])._health -= 10;
 		if (_G(actor[3])._health == 50) {
-			play_sound(BOSS12, true);
+			playSound(BOSS12, true);
 
 			g_events->send("Game", GameMessage("PAUSE", 40));
 
@@ -187,7 +187,7 @@ void boss2CheckHit(Actor *actor, int x1, int y1, int x2, int y2, int act_num) {
 			}
 			_G(actor[3])._currNumShots = 0;
 		} else
-			play_sound(BOSS13, true);
+			playSound(BOSS13, true);
 		
 		_G(actor[3])._moveCountdown = 75;
 		_G(actor[3])._vulnerableCountdown = 75;
@@ -211,15 +211,15 @@ void boss2CheckHit(Actor *actor, int x1, int y1, int x2, int y2, int act_num) {
 void boss2SetupLevel() {
 	setupBoss(2);
 	_G(boss_active) = true;
-	music_pause();
-	play_sound(BOSS11, true);
+	musicPause();
+	playSound(BOSS11, true);
 	_G(timer_cnt) = 0;
 
 	dropFlag = false;
 	Common::fill(su, su + 18, 0);
 
 	g_events->send("Game", GameMessage("PAUSE", 40));
-	music_play(7, true);
+	musicPlay(7, true);
 }
 
 static int boss2Die() {
@@ -253,7 +253,7 @@ static int boss2Die() {
 			_G(actor[3 + rep])._moveCountdown = _G(actor[3 + rep])._speed;
 		}
 
-		play_sound(EXPLODE, true);
+		playSound(EXPLODE, true);
 		_G(boss_dead) = true;
 	}
 
@@ -271,7 +271,7 @@ static int boss2MovementExplode(Actor *actor) {
 	if (actor->_currNumShots || _G(actor[5])._currNumShots)
 		return 0;
 
-	play_sound(EXPLODE, true);
+	playSound(EXPLODE, true);
 	actorAlwaysShoots(&_G(actor[5]), 0);
 	const int an = _G(actor[5])._shotActor;
 	_G(actor[an])._moveType = 9;
@@ -350,7 +350,7 @@ static int boss2MovementShake(Actor *actor) {
 	if (actor->_x < 20 || actor->_x > 270) {
 		_G(thunder_flag) = 100;
 		actor->_i4 = 50;
-		play_sound(EXPLODE, true);
+		playSound(EXPLODE, true);
 		actor->_i2 = 0;
 
 		Common::fill(su, su + 18, 0);
@@ -384,7 +384,7 @@ done:
 }
 
 void boss2ClosingSequence1() {
-	music_play(6, true);
+	musicPlay(6, true);
 	odinSpeaks(1001, 0, "CLOSING");
 }
 
@@ -415,7 +415,7 @@ void boss2ClosingSequence4() {
 
 	showLevel(BOSS_LEVEL2);
 
-	play_sound(ANGEL, true);
+	playSound(ANGEL, true);
 	placeTile(18, 10, 152);
 	placeTile(19, 10, 202);
 	actorVisible(1);
diff --git a/engines/got/game/boss3.cpp b/engines/got/game/boss3.cpp
index 7f9042ab598..6f7fcdac166 100644
--- a/engines/got/game/boss3.cpp
+++ b/engines/got/game/boss3.cpp
@@ -106,7 +106,7 @@ static int boss3Movement1(Actor *actor) {
 		_G(actor[4])._solid |= 128;
 		_G(actor[5])._solid |= 128;
 		_G(actor[6])._solid |= 128;
-		play_sound(EXPLODE, true);
+		playSound(EXPLODE, true);
 		goto done;
 	}
 	if (actor->_i6) {
@@ -147,7 +147,7 @@ static int boss3Movement1(Actor *actor) {
 		actor->_frameCount = LFC;
 		actor->_temp4 = 40;
 		actor->_temp3 = 0;
-		play_sound(EXPLODE, true);
+		playSound(EXPLODE, true);
 		goto done1;
 	}
 
@@ -397,7 +397,7 @@ new_dir:
 	_G(actor[actor->_shotActor])._temp1 = g_events->getRandomNumber(90, 189);
 	_G(actor[actor->_shotActor])._temp5 = 30;
 	_G(actor[actor->_shotActor])._speed = 2;
-	play_sound(BOSS12, true);
+	playSound(BOSS12, true);
 
 new_dir1:
 	actor->_temp5 = _G(rand1) % 8;
@@ -428,7 +428,7 @@ static void boss3CheckHit() {
 			_G(actor[3])._moveCountdown = 50;
 
 			_G(actor[3])._vulnerableCountdown = 50;
-			play_sound(BOSS13, true);
+			playSound(BOSS13, true);
 
 			for (int rep = 4; rep < 7; rep++) {
 				_G(actor[rep])._magicHit = 0;
@@ -475,8 +475,8 @@ static void bossChangeMode() {
 void boss3SetupLevel() {
 	setupBoss(3);
 	_G(boss_active) = true;
-	music_pause();
-	play_sound(BOSS11, true);
+	musicPause();
+	playSound(BOSS11, true);
 	_G(timer_cnt) = 0;
 
 	g_events->send("Game", GameMessage("PAUSE", 40));
@@ -487,7 +487,7 @@ void boss3SetupLevel() {
 		_G(boss_intro1) = true;
 	}
 
-	music_play(7, true);
+	musicPlay(7, true);
 	_G(apple_drop) = 0;
 	bossMode = 1;
 }
@@ -521,7 +521,7 @@ static int bossDie() {
 			_G(actor[3 + rep])._moveCountdown = _G(actor[3 + rep])._speed;
 		}
 
-		play_sound(EXPLODE, true);
+		playSound(EXPLODE, true);
 		_G(boss_dead) = true;
 	}
 
@@ -529,7 +529,7 @@ static int bossDie() {
 }
 
 void boss3ClosingSequence1() {
-	music_play(6, true);
+	musicPlay(6, true);
 	odinSpeaks(1001, 0, "CLOSING");
 }
 
@@ -552,7 +552,7 @@ void boss3ClosingSequence3() {
 	showLevel(BOSS_LEVEL3);
 
 	_G(exit_flag) = 0;
-	music_pause();
+	musicPause();
 
 	_G(new_level) = ENDING_SCREEN;
 	_G(thor)->_x = 152;
@@ -564,7 +564,7 @@ void endingScreen() {
 	for (int i = 3; i < MAX_ACTORS; i++)
 		_G(actor[i])._moveType = 1;
 	
-	music_play(6, true);
+	musicPlay(6, true);
 	_G(timer_cnt) = 0;
 
 	memset(expf, 0, 4 * 8);
@@ -590,7 +590,7 @@ int endgame_one() {
 	}
 
 	_G(actor[34])._i2 = 6;
-	play_sound(EXPLODE, true);
+	playSound(EXPLODE, true);
 
 	int r = _G(rand1) % 32;
 	while (expf[r / 8][r % 8]) {
@@ -630,7 +630,7 @@ int endGameMovement() {
 		return 0;
 	}
 	_G(actor[34])._i2 = 6;
-	play_sound(EXPLODE, true);
+	playSound(EXPLODE, true);
 
 	int r = _G(rand1) % 8;
 	while (expf[_G(exprow)][r]) {
diff --git a/engines/got/game/init.cpp b/engines/got/game/init.cpp
index 8b164cf1314..f4f2c431d63 100644
--- a/engines/got/game/init.cpp
+++ b/engines/got/game/init.cpp
@@ -108,7 +108,7 @@ void initGame() {
 	showLevel(_G(current_level));
 
 	if (!_G(auto_load)) {
-		_G(sound).music_play(_G(levelMusic), true);
+		_G(sound).musicPlay(_G(levelMusic), true);
 	}
 
 	g_vars->resetEndgameFlags();
diff --git a/engines/got/game/move.cpp b/engines/got/game/move.cpp
index b1b3e291681..aad4304b92b 100644
--- a/engines/got/game/move.cpp
+++ b/engines/got/game/move.cpp
@@ -80,7 +80,7 @@ int reverseDirection(Actor *actor) {
 
 void thorShoots() {
 	if (!_G(hammer)->_active && (!_G(hammer)->_dead) && (!_G(thor)->_shotCountdown)) {
-		play_sound(SWISH, false);
+		playSound(SWISH, false);
 		_G(thor)->_shotCountdown = 20;
 		_G(hammer)->_active = true;
 		_G(hammer)->_dir = _G(thor)->_dir;
@@ -144,7 +144,7 @@ void thorDamaged(Actor *actor) {
 	actor->_hitThor = true;
 
 	// If we're invincible, ignore any damage
-	if (_G(cheats).freezeHealth)
+	if (_G(cheats)._freezeHealth)
 		return;
 
 	if (GAME3 && actor->_funcNum == 11) {
@@ -177,7 +177,7 @@ void thorDamaged(Actor *actor) {
 			g_events->send(GameMessage("THOR_DIES"));
 		} else if (damage) {
 			_G(thor)->_vulnerableCountdown = 40;
-			_G(sound).play_sound(OW, false);
+			_G(sound).playSound(OW, false);
 			_G(thor)->_show = 10;
 			_G(thor)->_health -= damage;
 		}
diff --git a/engines/got/game/move_patterns.cpp b/engines/got/game/move_patterns.cpp
index 91c42a401e3..648d37efc59 100644
--- a/engines/got/game/move_patterns.cpp
+++ b/engines/got/game/move_patterns.cpp
@@ -225,7 +225,7 @@ int checkMove0(const int x, const int y, Actor *actor) {
 	int x2 = (_G(thor)->_dir > 1) ? (x + 12) >> 4 : (x + 10) >> 4;
 	int y2 = (y + 15) >> 4;
 
-	_G(slip_flag) = false;
+	_G(slipFlag) = false;
 
 	// Check for cheat flying mode
 	if (!actor->_flying) {
@@ -283,18 +283,18 @@ int checkMove0(const int x, const int y, Actor *actor) {
 			return 0;
 	}
 
-	if (!_G(slip_flag)) {
+	if (!_G(slipFlag)) {
 		_G(slipping) = false;
 		_G(slip_cnt) = 0;
 	}
 	
-	if (_G(slip_flag) && !_G(slipping))
+	if (_G(slipFlag) && !_G(slipping))
 		_G(slip_cnt++);
 	
 	if (_G(slip_cnt) > 8)
 		_G(slipping) = true;
 	
-	_G(slip_flag) = false;
+	_G(slipFlag) = false;
 
 	x1 = x + 1;
 	y1 = y + 8;
@@ -331,7 +331,7 @@ int checkMove0(const int x, const int y, Actor *actor) {
 			thorDamaged(act);
 			if (act->_solid < 2) {
 				if (!act->_vulnerableCountdown && (!(act->_type & 1)))
-					play_sound(PUNCH1, false);
+					playSound(PUNCH1, false);
 
 				if (!_G(hammer)->_active && _G(key_flag[key_fire]))
 					actorDamaged(act, _G(hammer)->_hitStrength);
@@ -367,7 +367,7 @@ int checkMove1(const int x, const int y, Actor *actor) {
 	const byte icn4 = _G(scrn)._iconGrid[y2][x2];
 	if (icn1 < icn || icn2 < icn || icn3 < icn || icn4 < icn) {
 		if (actor->_actorNum == 1 && actor->_moveType == 2)
-			play_sound(CLANG, false);
+			playSound(CLANG, false);
 
 		return 0;
 	}
@@ -703,7 +703,7 @@ int movementZero(Actor *actor) {
 
 	if (_G(slipping)) {
 		if (_G(slip_cnt) == 8)
-			play_sound(FALL, true);
+			playSound(FALL, true);
 
 		y += 2;
 		_G(slip_cnt--);
@@ -965,13 +965,13 @@ int specialMovementTwo(Actor *actor) {
 	}
 	if (!actor->_funcPass) {
 		if (_G(thor)->_health < 150) {
-			if (!sound_playing())
-				play_sound(ANGEL, false);
+			if (!soundPlaying())
+				playSound(ANGEL, false);
 			_G(thor)->_health += 1;
 		}
 	} else if (_G(thor_info)._magic < 150) {
-		if (!sound_playing())
-			play_sound(ANGEL, false);
+		if (!soundPlaying())
+			playSound(ANGEL, false);
 		_G(thor_info)._magic += 1;
 	}
 
@@ -1385,7 +1385,7 @@ int movementSix(Actor *actor) {
 		if (actor->_nextFrame > 2) {
 			actor->_nextFrame = 0;
 			if (_G(boss_dead))
-				play_sound(EXPLODE, false);
+				playSound(EXPLODE, false);
 		}
 		actor->_currNumShots--;
 	} else {
diff --git a/engines/got/game/object.cpp b/engines/got/game/object.cpp
index 35877d84890..83ee24c39b0 100644
--- a/engines/got/game/object.cpp
+++ b/engines/got/game/object.cpp
@@ -81,11 +81,11 @@ void pickUpObject(int p) {
 			cannotCarryMore();
 			return;
 		}
-		play_sound(GULP, false);
+		playSound(GULP, false);
 		addHealth(5);
 		break;
 	case 6: // Bad apple
-		play_sound(OW, false);
+		playSound(OW, false);
 		addHealth(-10);
 		break;
 	case 7: // Key (reset on exit)
@@ -165,7 +165,7 @@ void pickUpObject(int p) {
 	_G(oy) = y * 16;
 	_G(of) = 1;
 
-	play_sound(YAH, false);
+	playSound(YAH, false);
 	_G(object_map[p]) = 0;
 
 	// Reset so it doesn't reappear on reentry to screen
@@ -221,13 +221,13 @@ bool useApple(int flag) {
 			_G(magic_cnt) = 0;
 			addMagic(-2);
 			addHealth(1);
-			play_sound(ANGEL, false);
+			playSound(ANGEL, false);
 		} else if (_G(magic_cnt) > 8) {
 			_G(magic_cnt) = 0;
 			addMagic(-2);
 			addHealth(1);
-			if (!sound_playing())
-				play_sound(ANGEL, false);
+			if (!soundPlaying())
+				playSound(ANGEL, false);
 		}
 		_G(apple_flag) = true;
 		return true;
@@ -244,7 +244,7 @@ bool useThunder(int flag) {
 	if (flag && _G(thor_info)._magic > 29) {
 		if (!_G(thunder_flag)) {
 			addMagic(-30);
-			play_sound(THUNDER, false);
+			playSound(THUNDER, false);
 			_G(thunder_flag) = 60;
 		}
 		return true;
@@ -344,7 +344,7 @@ bool useTornado(int flag) {
 				_G(actor[2])._lastDir = _G(thor)->_dir;
 				_G(actor[2])._moveType = 16;
 				_G(tornado_used) = true;
-				play_sound(WIND, false);
+				playSound(WIND, false);
 			}
 		} else if (!_G(tornado_used)) {
 			notEnoughMagic();
@@ -415,7 +415,7 @@ void useItem() {
 	if (kf) {
 		if (!ret && !_G(useItemFlag)) {
 			if (mf)
-				play_sound(BRAAPP, false);
+				playSound(BRAAPP, false);
 			_G(useItemFlag) = true;
 		}
 	} else {
diff --git a/engines/got/game/script.cpp b/engines/got/game/script.cpp
index bb73f88bbce..e1c4e185496 100644
--- a/engines/got/game/script.cpp
+++ b/engines/got/game/script.cpp
@@ -874,7 +874,7 @@ int Scripts::cmd_sound() {
 	if (_lValue < 1 || _lValue > 16)
 		return 6;
 	
-	play_sound((int)_lValue - 1, true);
+	playSound((int)_lValue - 1, true);
 	return 0;
 }
 
@@ -1022,7 +1022,7 @@ int Scripts::cmd_random() {
 }
 
 void Scripts::scr_func1() {
-	play_sound(FALL, true);
+	playSound(FALL, true);
 
 	_G(new_level) = 109;
 	_G(new_level_tile) = 215;
@@ -1048,18 +1048,18 @@ void Scripts::scr_func3() {
 	int x = p % 20;
 
 	if (y < 0 || x < 0 || y > 11) {
-		play_sound(BRAAPP, true);
+		playSound(BRAAPP, true);
 		_G(key_flag[key_magic]) = false;
 		return;
 	}
 	if (_G(scrn)._iconGrid[y][x] < 174 || _G(scrn)._iconGrid[y][x] > 178) {
-		play_sound(BRAAPP, true);
+		playSound(BRAAPP, true);
 		_G(key_flag[key_magic]) = false;
 		return;
 	}
 
 	_numVar[0] = 1;
-	play_sound(WOOP, true);
+	playSound(WOOP, true);
 	if (_G(current_level) == 106 && p == 69) {
 		placeTile(x, y, 220);
 		_G(key_flag[key_magic]) = false;
diff --git a/engines/got/game/shot_pattern.cpp b/engines/got/game/shot_pattern.cpp
index ba43857ba5c..33acd43bb94 100644
--- a/engines/got/game/shot_pattern.cpp
+++ b/engines/got/game/shot_pattern.cpp
@@ -161,7 +161,7 @@ int shotPatternFive(Actor *actor) {
 		actor->_y += 16;
 		actor->_numShotsAllowed = 3 + _G(setup)._difficultyLevel;
 		actorShoots(actor, 2);
-		play_sound(BOSS12, false);
+		playSound(BOSS12, false);
 
 		const int num = actor->_shotActor;
 		actor->_shotCountdown = 50;
diff --git a/engines/got/game/special_tile.cpp b/engines/got/game/special_tile.cpp
index ba68e682bf2..453819dc2ad 100644
--- a/engines/got/game/special_tile.cpp
+++ b/engines/got/game/special_tile.cpp
@@ -71,7 +71,7 @@ int specialTileThor(const int x, const int y, const int icon) {
 	case 204:
 		if (GAME2) {
 			if (!_G(setup).f19)
-				_G(slip_flag) = true;
+				_G(slipFlag) = true;
 			return 1;
 		}
 
@@ -114,7 +114,7 @@ int specialTileThor(const int x, const int y, const int icon) {
 				actorVisible(5);
 				Common::fill(_G(scrn)._actorInvis, _G(scrn)._actorInvis + 16, 0);
 				_G(thunder_flag) = 60;
-				play_sound(THUNDER, true);
+				playSound(THUNDER, true);
 				_G(setup).f22 = true;
 			}
 		} else {
@@ -134,7 +134,7 @@ int specialTileThor(const int x, const int y, const int icon) {
 			cy = (_G(thor_real_y1) + 8) / 16;
 			if (_G(scrn)._iconGrid[cy][cx] == icon) {
 				_G(thor)->_vulnerableCountdown = STAMINA;
-				play_sound(WOOP, false);
+				playSound(WOOP, false);
 
 				const int nt = _G(scrn)._newLevelLocation[icon - 214];
 				const int displayPage = _G(pge);
@@ -172,7 +172,7 @@ int specialTileThor(const int x, const int y, const int icon) {
 		if (_G(scrn)._iconGrid[cy][cx] == icon) {
 			_G(thor)->_vulnerableCountdown = STAMINA;
 			if (icon < 224 && icon > 219)
-				play_sound(FALL, false);
+				playSound(FALL, false);
 
 			_G(new_level) = _G(scrn)._newLevel[icon - 220 + (f * 6)];
 			_G(warp_scroll) = false;
@@ -212,7 +212,7 @@ int specialTileThor(const int x, const int y, const int icon) {
 	return 0;
 }
 
-int specialTile(Actor *actor, int x, int y, const int icon) {
+int specialTile(const Actor *actor, int x, int y, const int icon) {
 	switch (icon) {
 	case 201:
 	case 202:
@@ -226,7 +226,6 @@ int specialTile(Actor *actor, int x, int y, const int icon) {
 		return 1;
 	case 209:
 	case 210:
-		return 0;
 	case 214:
 	case 215:
 	case 216:
@@ -247,7 +246,7 @@ int specialTile(Actor *actor, int x, int y, const int icon) {
 }
 
 void eraseDoor(const int x, const int y) {
-	play_sound(DOOR, false);
+	playSound(DOOR, false);
 	_G(scrn)._iconGrid[y][x] = _G(scrn)._backgroundColor;
 }
 
diff --git a/engines/got/game/special_tile.h b/engines/got/game/special_tile.h
index 362a2eb950b..8db1d623e57 100644
--- a/engines/got/game/special_tile.h
+++ b/engines/got/game/special_tile.h
@@ -27,7 +27,7 @@
 namespace Got {
 
 extern int specialTileThor(int x, int y, int icon);
-extern int specialTile(Actor *actor, int x, int y, int icon);
+extern int specialTile(const Actor *actor, int x, int y, int icon);
 
 } // namespace Got
 
diff --git a/engines/got/got.cpp b/engines/got/got.cpp
index af99f34650d..972cb14b0e1 100644
--- a/engines/got/got.cpp
+++ b/engines/got/got.cpp
@@ -21,7 +21,6 @@
 
 #include "got/got.h"
 #include "common/config-manager.h"
-#include "common/events.h"
 #include "common/scummsys.h"
 #include "common/system.h"
 #include "common/translation.h"
@@ -127,7 +126,7 @@ Common::Error GotEngine::syncGame(Common::Serializer &s) {
 	}
 
 	_G(thor_info).sync(s);
-	_G(sd_data).sync(s);
+	_G(sdData).sync(s);
 
 	if (s.isLoading())
 		savegameLoaded();
@@ -160,13 +159,13 @@ void GotEngine::savegameLoaded() {
 
 	if (_G(setup)._musicEnabled) {
 		if (GAME1 && _G(current_area) == 59) {
-			music_play(5, true);
+			musicPlay(5, true);
 		} else {
-			music_play(_G(levelMusic), true);
+			musicPlay(_G(levelMusic), true);
 		}
 	} else {
 		_G(setup)._musicEnabled = true;
-		music_pause();
+		musicPause();
 		_G(setup)._musicEnabled = false;
 	}
 
diff --git a/engines/got/sound.cpp b/engines/got/sound.cpp
index 1efbeb502f3..80fde9bbd2b 100644
--- a/engines/got/sound.cpp
+++ b/engines/got/sound.cpp
@@ -42,13 +42,13 @@ void Sound::load() {
 	f.read(_soundData, f.size() - 16 * 8);
 }
 
-void Sound::play_sound(int index, bool priority_override) {
+void Sound::playSound(const int index, const bool override) {
 	if (index >= NUM_SOUNDS)
 		return;
 
 	// If a sound is playing, stop it unless there is a priority override
-	if (sound_playing()) {
-		if (!priority_override && _currentPriority < SOUND_PRIORITY[index])
+	if (soundPlaying()) {
+		if (!override && _currentPriority < SOUND_PRIORITY[index])
 			return;
 
 		g_engine->_mixer->stopHandle(_soundHandle);
@@ -59,12 +59,11 @@ void Sound::play_sound(int index, bool priority_override) {
 		_soundData + _digiSounds[index]._offset, _digiSounds[index]._length);
 	Audio::AudioStream *audioStream = Audio::makeVOCStream(stream, Audio::FLAG_UNSIGNED,
 														   DisposeAfterUse::YES);
-	g_engine->_mixer->playStream(Audio::Mixer::kSFXSoundType,
-								 &_soundHandle, audioStream);
+	g_engine->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, audioStream);
 }
 
-void Sound::play_sound(const Gfx::GraphicChunk &src) {
-	if (sound_playing())
+void Sound::playSound(const Gfx::GraphicChunk &src) {
+	if (soundPlaying())
 		g_engine->_mixer->stopHandle(_soundHandle);
 
 	// Play the new sound
@@ -72,15 +71,14 @@ void Sound::play_sound(const Gfx::GraphicChunk &src) {
 		src._data, src._uncompressedSize);
 	Audio::AudioStream *audioStream = Audio::makeVOCStream(stream, Audio::FLAG_UNSIGNED,
 														   DisposeAfterUse::YES);
-	g_engine->_mixer->playStream(Audio::Mixer::kSFXSoundType,
-								 &_soundHandle, audioStream);
+	g_engine->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, audioStream);
 }
 
-bool Sound::sound_playing() const {
+bool Sound::soundPlaying() const {
 	return g_engine->_mixer->isSoundHandleActive(_soundHandle);
 }
 
-void Sound::music_play(const char *name, bool override) {
+void Sound::musicPlay(const char *name, bool override) {
 	if (name != _currentMusic || override) {
 		g_engine->_mixer->stopHandle(_musicHandle);
 		_currentMusic = name;
@@ -143,7 +141,7 @@ void Sound::music_play(const char *name, bool override) {
         MU_playNote     endp
         */
 
-		int hdrCount = file.readUint16LE();
+		const int hdrCount = file.readUint16LE();
 		file.skip((hdrCount - 1) * 2);
 
 		while (!file.eos()) {
@@ -151,8 +149,8 @@ void Sound::music_play(const char *name, bool override) {
 			if (pause & 0x80)
 				pause = ((pause & 0x7f) << 8) | file.readByte();
 
-			int freq = file.readByte();
-			int duration = file.readByte();
+			const int freq = file.readByte();
+			const int duration = file.readByte();
 			if (freq == 0 && duration == 0) {
 				debug(1, "End of song");
 				break;
@@ -164,24 +162,24 @@ void Sound::music_play(const char *name, bool override) {
 	}
 }
 
-void Sound::music_pause() {
+void Sound::musicPause() {
 	g_engine->_mixer->pauseHandle(_musicHandle, true);
 }
 
-void Sound::music_resume() {
+void Sound::musicResume() {
 	g_engine->_mixer->pauseHandle(_musicHandle, false);
 }
 
-void Sound::music_stop() {
-	music_pause();
+void Sound::musicStop() {
+	musicPause();
 	_currentMusic = nullptr;
 }
 
-bool Sound::music_is_on() const {
+bool Sound::musicIsOn() const {
 	return g_engine->_mixer->isSoundHandleActive(_musicHandle);
 }
 
-const char *Sound::getMusicName(int num) const {
+const char *Sound::getMusicName(const int num) const {
 	const char *name = nullptr;
 
 	switch (_G(area)) {
@@ -282,32 +280,32 @@ const char *Sound::getMusicName(int num) const {
 	return name;
 }
 
-void play_sound(int index, bool priority_override) {
-	_G(sound).play_sound(index, priority_override);
+void playSound(const int index, const bool override) {
+	_G(sound).playSound(index, override);
 }
 
-void play_sound(const Gfx::GraphicChunk &src) {
-	_G(sound).play_sound(src);
+void playSound(const Gfx::GraphicChunk &src) {
+	_G(sound).playSound(src);
 }
 
-bool sound_playing() {
-	return _G(sound).sound_playing();
+bool soundPlaying() {
+	return _G(sound).soundPlaying();
 }
 
-void music_play(int num, bool override) {
-	_G(sound).music_play(num, override);
+void musicPlay(const int num, const bool override) {
+	_G(sound).musicPlay(num, override);
 }
 
-void music_play(const char *name, bool override) {
-	_G(sound).music_play(name, override);
+void musicPlay(const char *name, const bool override) {
+	_G(sound).musicPlay(name, override);
 }
 
-void music_pause() {
-	_G(sound).music_pause();
+void musicPause() {
+	_G(sound).musicPause();
 }
 
-void music_resume() {
-	_G(sound).music_resume();
+void musicResume() {
+	_G(sound).musicResume();
 }
 
 } // namespace Got
diff --git a/engines/got/sound.h b/engines/got/sound.h
index 5ad27c387fe..6a1c46ca36e 100644
--- a/engines/got/sound.h
+++ b/engines/got/sound.h
@@ -47,7 +47,7 @@ enum {
 	EXPLODE,
 	BOSS11,
 	BOSS12,
-	BOSS13,
+	BOSS13
 };
 
 #define NUM_SOUNDS 19
@@ -70,27 +70,27 @@ public:
 	}
 	void load();
 
-	void play_sound(int index, bool priority_override);
-	void play_sound(const Gfx::GraphicChunk &src);
-	bool sound_playing() const;
+	void playSound(int index, bool override);
+	void playSound(const Gfx::GraphicChunk &src);
+	bool soundPlaying() const;
 
-	void music_play(int num, bool override) {
-		music_play(getMusicName(num), override);
+	void musicPlay(const int num, const bool override) {
+		musicPlay(getMusicName(num), override);
 	}
-	void music_play(const char *name, bool override);
-	void music_pause();
-	void music_resume();
-	void music_stop();
-	bool music_is_on() const;
+	void musicPlay(const char *name, bool override);
+	void musicPause();
+	void musicResume();
+	void musicStop();
+	bool musicIsOn() const;
 };
 
-extern void play_sound(int index, bool priority_override);
-extern void play_sound(const Gfx::GraphicChunk &src);
-extern bool sound_playing();
-extern void music_play(int num, bool override);
-extern void music_play(const char *name, bool override);
-extern void music_pause();
-extern void music_resume();
+extern void playSound(int index, bool override);
+extern void playSound(const Gfx::GraphicChunk &src);
+extern bool soundPlaying();
+extern void musicPlay(int num, bool override);
+extern void musicPlay(const char *name, bool override);
+extern void musicPause();
+extern void musicResume();
 
 } // namespace Got
 
diff --git a/engines/got/vars.cpp b/engines/got/vars.cpp
index 13cc340abda..d2ea75f1bf7 100644
--- a/engines/got/vars.cpp
+++ b/engines/got/vars.cpp
@@ -44,7 +44,7 @@ void Vars::load() {
 	_hampic.load();
 	_objects.load();
 	_odin.load();
-	_sd_data.load();
+	_sdData.load();
 	_sound.load();
 	_status.load();
 	_highScores.load();
@@ -84,7 +84,7 @@ void Vars::setArea(int areaNum) {
 	if (areaNum != _area) {
 		_area = areaNum;
 		_setup._areaNum = areaNum;
-		_sd_data.setArea(areaNum);
+		_sdData.setArea(areaNum);
 		_bgPics.setArea(areaNum);
 
 		switch (areaNum) {
diff --git a/engines/got/vars.h b/engines/got/vars.h
index 39700e19fb0..944c594de1b 100644
--- a/engines/got/vars.h
+++ b/engines/got/vars.h
@@ -80,9 +80,9 @@ enum TransitionDir {
 };
 
 struct Cheats {
-	bool freezeHealth = false;
-	bool freezeMagic = false;
-	bool freezeJewels = false;
+	bool _freezeHealth = false;
+	bool _freezeMagic = false;
+	bool _freezeJewels = false;
 };
 
 class Vars {
@@ -104,7 +104,7 @@ public:
 	Gfx::Pics _odin;
 	Gfx::Pics _status;
 	HighScores _highScores;
-	SdData _sd_data;
+	SdData _sdData;
 	Sound _sound;
 	Scripts _scripts;
 	GameMode _gameMode = MODE_NORMAL;
@@ -112,7 +112,7 @@ public:
 	Cheats _cheats;
 	Common::Queue<byte> _demoKeys;
 	bool _useItemFlag = false;
-	bool _slip_flag = false;
+	bool _slipFlag = false;
 	bool _slipping = false;
 	int _slip_cnt = 0;
 	bool _boss_intro1 = false, _boss_intro2 = false;
diff --git a/engines/got/views/game_content.cpp b/engines/got/views/game_content.cpp
index b4b6c736a31..9eacfecf330 100644
--- a/engines/got/views/game_content.cpp
+++ b/engines/got/views/game_content.cpp
@@ -568,11 +568,11 @@ void GameContent::thorDead() {
 }
 
 void GameContent::checkForCheats() {
-	if (_G(cheats).freezeHealth)
+	if (_G(cheats)._freezeHealth)
 		_G(thor)->_health = 150;
-	if (_G(cheats).freezeMagic)
+	if (_G(cheats)._freezeMagic)
 		_G(thor_info)._magic = 150;
-	if (_G(cheats).freezeJewels)
+	if (_G(cheats)._freezeJewels)
 		_G(thor_info)._jewels = 999;
 }
 
diff --git a/engines/got/views/game_status.cpp b/engines/got/views/game_status.cpp
index 9c9f0080d21..273e77c4040 100644
--- a/engines/got/views/game_status.cpp
+++ b/engines/got/views/game_status.cpp
@@ -122,7 +122,7 @@ bool GameStatus::msgGame(const GameMessage &msg) {
 bool GameStatus::tick() {
 	if (_scoreCountdown > 0) {
 		if ((_scoreCountdown % SCORE_INTERVAL) == 0) {
-			_G(sound).play_sound(WOOP, 1);
+			_G(sound).playSound(WOOP, 1);
 			addScore(1000);
 		}
 
diff --git a/engines/got/views/view.cpp b/engines/got/views/view.cpp
index c0e19bed640..df75a31e293 100644
--- a/engines/got/views/view.cpp
+++ b/engines/got/views/view.cpp
@@ -81,35 +81,35 @@ bool View::msgMouseUp(const MouseUpMessage &msg) {
 }
 
 void View::playSound(int index, bool priority_override) {
-	_G(sound).play_sound(index, priority_override);
+	_G(sound).playSound(index, priority_override);
 }
 
 void View::playSound(const Gfx::GraphicChunk &src) {
-	_G(sound).play_sound(src);
+	_G(sound).playSound(src);
 }
 
 void View::musicPlay(int num, bool override) {
-	_G(sound).music_play(num, override);
+	_G(sound).musicPlay(num, override);
 }
 
 void View::musicPlay(const char *name, bool override) {
-	_G(sound).music_play(name, override);
+	_G(sound).musicPlay(name, override);
 }
 
 void View::musicPause() {
-	_G(sound).music_pause();
+	_G(sound).musicPause();
 }
 
 void View::musicResume() {
-	_G(sound).music_resume();
+	_G(sound).musicResume();
 }
 
 void View::musicStop() {
-	_G(sound).music_stop();
+	_G(sound).musicStop();
 }
 
 bool View::musicIsOn() const {
-	return _G(sound).music_is_on();
+	return _G(sound).musicIsOn();
 }
 
 void View::fadeOut() {




More information about the Scummvm-git-logs mailing list