put filenames back into source code

This closes #113 and will help with #110
This commit is contained in:
andy5995
2018-09-11 21:24:37 -05:00
committed by Andy Alt
parent 3f2cb5e6dd
commit aa54e2032b
6 changed files with 13 additions and 85 deletions

View File

@@ -94,20 +94,3 @@ UnitParticles=true
UserData_Root=$HOME/.zetaglest/
VersionURL=http://zetaglest.dreamhosters.com/files/versions/
Windowed=false
; sfx
; These can be over-ridden by adding the variables to your glestuser.ini
; file.
;
; FIXME: There should be a way to use the "DataPath" variable
; here (defined above)
PlaySoundAttention=../../../zetaglest-data/data/core/menu/sound/attention.wav
PlaySoundHighlight=../../../zetaglest-data/data/core/menu/sound/highlight.wav
PlaySoundNewServer=../../../zetaglest-data/data/core/menu/sound/attention.wav
PlaySoundMarker=../../../zetaglest-data/data/core/menu/sound/sonar.wav
; it's recommended that users not over-ride these. The sounds are just for
; menu clicks and should remain very short in duration.
PlaySoundMenuClickA=../../../zetaglest-data/data/core/menu/sound/click_a.wav
PlaySoundMenuClickB=../../../zetaglest-data/data/core/menu/sound/click_b.wav
PlaySoundMenuClickC=../../../zetaglest-data/data/core/menu/sound/click_c.wav

View File

@@ -92,22 +92,3 @@ UnitParticles=true
UserData_Root=$HOME/.zetaglest/
VersionURL=http://zetaglest.dreamhosters.com/files/versions/
Windowed=true
; sfx
; These can be over-ridden by adding the variables to your glestuser.ini
; file.
;
; FIXME: There should be a way to use the "DataPath" variable
; here (defined above)
PlaySoundAttention=../../../zetaglest-data/data/core/menu/sound/attention.wav
PlaySoundHighlight=../../../zetaglest-data/data/core/menu/sound/highlight.wav
PlaySoundNewServer=../../../zetaglest-data/data/core/menu/sound/attention.wav
PlaySoundMarker=../../../zetaglest-data/data/core/menu/sound/sonar.wav
; it's recommended that users not over-ride these. The sounds are just for
; menu clicks and should remain very short in duration.
; it's recommended that users not over-ride these. The sounds are just for
; menu clicks and should remain very short in duration.
PlaySoundMenuClickA=../../../zetaglest-data/data/core/menu/sound/click_a.wav
PlaySoundMenuClickB=../../../zetaglest-data/data/core/menu/sound/click_b.wav
PlaySoundMenuClickC=../../../zetaglest-data/data/core/menu/sound/click_c.wav

View File

@@ -94,20 +94,3 @@ UnitParticles=true
UserData_Root=$APPDATA\zetaglest\
VersionURL=http://zetaglest.dreamhosters.com/files/versions/
Windowed=false
; sfx
; These can be over-ridden by adding the variables to your glestuser.ini
; file.
;
; FIXME: There should be a way to use the "DataPath" variable
; here (defined above)
PlaySoundAttention=..\..\..\..\data\data\core\menu\sound\attention.wav
PlaySoundHighlight=..\..\..\..\data\data\core\menu\sound\highlight.wav
PlaySoundNewServer=..\..\..\..\data\data\core\menu\sound\attention.wav
PlaySoundMarker=..\..\..\..\data\data\core\menu\sound\sonar.wav
; it's recommended that users not over-ride these. The sounds are just for
; menu clicks and should remain very short in duration.
PlaySoundMenuClickA=..\..\..\..\data\data\core\menu\sound\click_a.wav
PlaySoundMenuClickB=..\..\..\..\data\data\core\menu\sound\click_b.wav
PlaySoundMenuClickC=..\..\..\..\data\data\core\menu\sound\click_c.wav

View File

@@ -94,20 +94,3 @@ UnitParticles=true
UserData_Root=$APPDATA\zetaglest\
VersionURL=http://zetaglest.dreamhosters.com/files/versions/
Windowed=false
; sfx
; These can be over-ridden by adding the variables to your glestuser.ini
; file.
;
; FIXME: There should be a way to use the "DataPath" variable
; here (defined above)
PlaySoundAttention=data\data\core\menu\sound\attention.wav
PlaySoundHighlight=data\data\core\menu\sound\highlight.wav
PlaySoundNewServer=data\data\core\menu\sound\attention.wav
PlaySoundMarker=data\data\core\menu\sound\sonar.wav
; it's recommended that users not over-ride these. The sounds are just for
; menu clicks and should remain very short in duration.
PlaySoundMenuClickA=data\data\core\menu\sound\click_a.wav
PlaySoundMenuClickB=data\data\core\menu\sound\click_b.wav
PlaySoundMenuClickC=data\data\core\menu\sound\click_c.wav

View File

@@ -61,15 +61,13 @@ namespace Glest {
static const string CORE_WATER_SOUNDS_PATH = CORE_PATH + "/water_sounds/";
// Sound effects
// These variables are specified in the ini file
const string PlaySoundClip::sfxAttention = "PlaySoundAttention";
const string PlaySoundClip::sfxHighlight = "PlaySoundHighlight";
const string PlaySoundClip::sfxNewServer = "PlaySoundNewServer";
const string PlaySoundClip::sfxMarker = "PlaySoundMarker";
const string PlaySoundClip::sfxMenuClickA = "PlaySoundMenuClickA";
const string PlaySoundClip::sfxMenuClickB = "PlaySoundMenuClickB";
const string PlaySoundClip::sfxMenuClickC = "PlaySoundMenuClickC";
const string PlaySoundClip::sfxAttention = CORE_MENU_SOUND_PATH + "attention.wav";
const string PlaySoundClip::sfxHighlight = CORE_MENU_SOUND_PATH + "highlight.wav";
const string PlaySoundClip::sfxNewServer = CORE_MENU_SOUND_PATH + "attention.wav";
const string PlaySoundClip::sfxMarker = CORE_MENU_SOUND_PATH + "sonar.wav";
const string PlaySoundClip::sfxMenuClickA = CORE_MENU_SOUND_PATH + "click_a.wav";
const string PlaySoundClip::sfxMenuClickB = CORE_MENU_SOUND_PATH + "click_b.wav";
const string PlaySoundClip::sfxMenuClickC = CORE_MENU_SOUND_PATH + "click_c.wav";
CoreData & CoreData::getInstance() {
static CoreData coreData;
@@ -1784,7 +1782,7 @@ namespace Glest {
PlaySoundClip::~PlaySoundClip(void) {
};
StaticSound *PlaySoundClip::getSound(const std::string& iniPlaySoundVal) {
StaticSound *PlaySoundClip::getSound(const std::string& PlaySoundVal) {
CoreData coreData;
int loadAttemptLookupKey = coreData.tsyst_COUNT + 6;
if (coreData.itemLoadAttempted.find(loadAttemptLookupKey) ==
@@ -1793,8 +1791,8 @@ namespace Glest {
coreData.itemLoadAttempted[loadAttemptLookupKey] = true;
try {
static Config & config = Config::getInstance();
iniPlaySound.load(config.getString(iniPlaySoundVal, ""));
string data_path = coreData.getDataPath();
PlaySound.load(getGameCustomCoreDataPath(data_path, PlaySoundVal));
} catch (const megaglest_runtime_error & ex) {
message(ex.what(),
GlobalStaticFlags::getIsNonGraphicalModeEnabled(),
@@ -1802,7 +1800,7 @@ namespace Glest {
}
}
return &iniPlaySound;
return &PlaySound;
}
// ================== PRIVATE ========================

View File

@@ -336,9 +336,9 @@ namespace Glest {
class PlaySoundClip {
private:
StaticSound iniPlaySound;
StaticSound PlaySound;
public:
StaticSound * getSound(const std::string& iniPlaySoundVal);
StaticSound * getSound(const std::string& PlaySoundVal);
static const string sfxAttention;
static const string sfxHighlight;
static const string sfxNewServer;