[Scummvm-git-logs] scummvm master -> 5b987b98480ac6999b53061047c5a446f19cf529

sev- sev at scummvm.org
Sun Jul 4 13:08:49 UTC 2021


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:
5b987b9848 SAGA2: Merge audtweak.h into beegee.cpp


Commit: 5b987b98480ac6999b53061047c5a446f19cf529
    https://github.com/scummvm/scummvm/commit/5b987b98480ac6999b53061047c5a446f19cf529
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-04T15:08:19+02:00

Commit Message:
SAGA2: Merge audtweak.h into beegee.cpp

Changed paths:
  R engines/saga2/audtweak.h
    engines/saga2/beegee.cpp


diff --git a/engines/saga2/audtweak.h b/engines/saga2/audtweak.h
deleted file mode 100644
index cf8cdf07cc..0000000000
--- a/engines/saga2/audtweak.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- *
- * Based on the original sources
- *   Faery Tale II -- The Halls of the Dead
- *   (c) 1993-1996 The Wyrmkeep Entertainment Co.
- */
-
-#ifndef SAGA2_AUDTWEAK_H
-#define SAGA2_AUDTWEAK_H
-
-namespace Saga2 {
-
-enum audioTerrains {
-	audioTerrainForest      = 1,
-	audioTerrainSurf,
-	audioTerrainCity,
-	audioTerrainCavern,
-	audioTerrainColdWind,
-	audioTerrainJungle,
-	audioTerrainLava,
-	audioTerrainRiver,
-	audioTerrainFire,
-
-	audioTerrainLIMIT
-};
-
-struct IntermittentAudioRecord {
-	int noSoundOdds;
-	int soundOdds[4];
-};
-
-const IntermittentAudioRecord intermittentAudioRecords[audioTerrainLIMIT] = {
-	//
-	// none  1   2   3   4
-	//
-	{  0, {  0,  0,  0,  0 } },  // no record
-	{  1, {  1,  0,  0,  0 } },  // Forest
-	{  0, {  0,  0,  0,  0 } },  // Surf
-	{  0, {  0,  0,  0,  0 } },  // City
-	{  0, {  0,  0,  0,  0 } },  // Cavern
-	{  0, {  0,  0,  0,  0 } },  // ColdWind
-	{  0, {  0,  0,  0,  0 } },  // Jungle
-	{  0, {  0,  0,  0,  0 } },  // Lava
-	{  0, {  0,  0,  0,  0 } },  // River
-	{  0, {  0,  0,  0,  0 } }   // Fire
-};
-
-
-// Factional music mapping
-//   Built in factions
-//     0 = suspended
-//     1 = daytime 1
-//     2 = daytime 2
-//     3 = underground
-//     4 = nighttime
-//     5 = aggressive
-//   Faction based
-//     6 = faction 0
-//     7 = faction 1
-//       etc
-
-inline int8 musicMapping(int16 musicChoice) {
-	if (musicChoice < 1) {
-		return 0;
-	} else if (musicChoice < 6) {
-		return musicChoice;
-	} else if (musicChoice == 6) {
-		return 6;
-	} else if (musicChoice > 11 && musicChoice < 14) {
-		return 7;
-	} else if (musicChoice > 8 && musicChoice < 12) {
-		return 8;
-	} else {
-		return 6;
-	}
-}
-
-} // end of namespace Saga2
-
-#endif
diff --git a/engines/saga2/beegee.cpp b/engines/saga2/beegee.cpp
index dd781bc4d6..c31dfd4d9c 100644
--- a/engines/saga2/beegee.cpp
+++ b/engines/saga2/beegee.cpp
@@ -30,15 +30,10 @@
 #include "saga2/beegee.h"
 #include "saga2/player.h"
 
-#include "saga2/audtweak.h"
-
 namespace Saga2 {
 
 #define AUXTHEMES 2
 #define USEAUXTHEME 0xe0
-/* ===================================================================== *
-   Types
- * ===================================================================== */
 
 struct auxAudioTheme {
 	bool active;
@@ -55,9 +50,71 @@ void addAuxTheme(Location loc, soundSegment lid);
 void killAuxTheme(soundSegment lid);
 void killAllAuxThemes(void);
 
-/* ===================================================================== *
-   Constants
- * ===================================================================== */
+
+enum audioTerrains {
+	kAudioTerrainForest      = 1,
+	kAudioTerrainSurf,
+	kAudioTerrainCity,
+	kAudioTerrainCavern,
+	kAudioTerrainColdWind,
+	kAudioTerrainJungle,
+	kAudioTerrainLava,
+	kAudioTerrainRiver,
+	kAudioTerrainFire,
+
+	kAudioTerrainLIMIT
+};
+
+struct IntermittentAudioRecord {
+	int noSoundOdds;
+	int soundOdds[4];
+};
+
+const IntermittentAudioRecord intermittentAudioRecords[kAudioTerrainLIMIT] = {
+	//
+	// none  1   2   3   4
+	//
+	{  0, {  0,  0,  0,  0 } },  // no record
+	{  1, {  1,  0,  0,  0 } },  // Forest
+	{  0, {  0,  0,  0,  0 } },  // Surf
+	{  0, {  0,  0,  0,  0 } },  // City
+	{  0, {  0,  0,  0,  0 } },  // Cavern
+	{  0, {  0,  0,  0,  0 } },  // ColdWind
+	{  0, {  0,  0,  0,  0 } },  // Jungle
+	{  0, {  0,  0,  0,  0 } },  // Lava
+	{  0, {  0,  0,  0,  0 } },  // River
+	{  0, {  0,  0,  0,  0 } }   // Fire
+};
+
+
+// Factional music mapping
+//   Built in factions
+//     0 = suspended
+//     1 = daytime 1
+//     2 = daytime 2
+//     3 = underground
+//     4 = nighttime
+//     5 = aggressive
+//   Faction based
+//     6 = faction 0
+//     7 = faction 1
+//       etc
+
+inline int8 musicMapping(int16 musicChoice) {
+	if (musicChoice < 1) {
+		return 0;
+	} else if (musicChoice < 6) {
+		return musicChoice;
+	} else if (musicChoice == 6) {
+		return 6;
+	} else if (musicChoice > 11 && musicChoice < 14) {
+		return 7;
+	} else if (musicChoice > 8 && musicChoice < 12) {
+		return 8;
+	} else {
+		return 6;
+	}
+}
 
 const static StaticTilePoint AudibilityVector = { 1, 1, 0 };
 




More information about the Scummvm-git-logs mailing list