Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added data/environments/default/amb.ogg
Binary file not shown.
Binary file added data/environments/default/fall1.ogg
Binary file not shown.
Binary file added data/environments/default/step1.ogg
Binary file not shown.
Binary file added data/environments/default/step10.ogg
Binary file not shown.
Binary file added data/environments/default/step11.ogg
Binary file not shown.
Binary file added data/environments/default/step12.ogg
Binary file not shown.
Binary file added data/environments/default/step13.ogg
Binary file not shown.
Binary file added data/environments/default/step14.ogg
Binary file not shown.
Binary file added data/environments/default/step15.ogg
Binary file not shown.
Binary file added data/environments/default/step16.ogg
Binary file not shown.
Binary file added data/environments/default/step17.ogg
Binary file not shown.
Binary file added data/environments/default/step18.ogg
Binary file not shown.
Binary file added data/environments/default/step2.ogg
Binary file not shown.
Binary file added data/environments/default/step3.ogg
Binary file not shown.
Binary file added data/environments/default/step4.ogg
Binary file not shown.
Binary file added data/environments/default/step5.ogg
Binary file not shown.
Binary file added data/environments/default/step6.ogg
Binary file not shown.
Binary file added data/environments/default/step7.ogg
Binary file not shown.
Binary file added data/environments/default/step8.ogg
Binary file not shown.
Binary file added data/environments/default/step9.ogg
Binary file not shown.
Binary file added data/environments/test/fall1.ogg
Binary file not shown.
Binary file added data/environments/test/step1.ogg
Binary file not shown.
40 changes: 32 additions & 8 deletions enemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,30 @@ def step(self):
return
self.y -= 1
s = bgtsound.sound()
num = 0
while True:
num = random.randint(1, 18)
if num != self.lastStepNum:
break
# end while
s.load(globalVars.appMain.sounds["s_lf%d.ogg" % num])
# Use environment-based footsteps
if hasattr(globalVars.appMain, 'environmentSteps') and len(globalVars.appMain.environmentSteps) > 0:
num = 0
# If there's only 1 sound, just use it (avoid infinite loop)
if len(globalVars.appMain.environmentSteps) == 1:
num = 0
else:
while True:
num = random.randint(0, len(globalVars.appMain.environmentSteps) - 1)
if num != self.lastStepNum:
break
# end while
s.load(globalVars.appMain.environmentSteps[num])
self.lastStepNum = num
else:
# Fallback to old method
num = 0
while True:
num = random.randint(1, 18)
if num != self.lastStepNum:
break
# end while
s.load(globalVars.appMain.sounds["s_lf%d.ogg" % num])
self.lastStepNum = num
s.pan = self.field.getPan(self.x)
s.volume = self.field.getVolume(self.y)
s.pitch = random.randint(90, 110)
Expand Down Expand Up @@ -142,7 +159,14 @@ def playScream(self):
def playBodyfall(self):
"""Makes a bodyfall sound for this enemy. Internally called."""
self.bodyfall = bgtsound.sound()
self.bodyfall.load(globalVars.appMain.sounds["dead.ogg"])
# Use environment-based body falls
if hasattr(globalVars.appMain, 'environmentFalls') and len(globalVars.appMain.environmentFalls) > 0:
# Randomly select from available body fall sounds
fallIndex = random.randint(0, len(globalVars.appMain.environmentFalls) - 1)
self.bodyfall.load(globalVars.appMain.environmentFalls[fallIndex])
else:
# Fallback to old method
self.bodyfall.load(globalVars.appMain.sounds["dead.ogg"])
self.bodyfall.pitch = random.randint(70, 130)
self.bodyfall.pan = self.field.getPan(self.x)
self.bodyfall.volume = self.field.getVolume(self.y)
Expand Down
22 changes: 17 additions & 5 deletions gameOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class GameOptions:
def __init__(self):
self.BGMVOLUME_NEGATIVE_BOUNDARY = -30
self.BGMVOLUME_POSITIVE_BOUNDARY = 0
self.AMBIANCEVOLUME_NEGATIVE_BOUNDARY = -30
self.AMBIANCEVOLUME_POSITIVE_BOUNDARY = 0
self.LEFTPANNINGLIMIT_NEGATIVE_BOUNDARY = -100
self.LEFTPANNINGLIMIT_POSITIVE_BOUNDARY = -20
self.RIGHTPANNINGLIMIT_NEGATIVE_BOUNDARY = 20
Expand All @@ -29,9 +31,11 @@ def initialize(self, importer):

def setDefault(self):
self.bgmVolume = -10
self.ambianceVolume = -10
self.leftPanningLimit = -100
self.rightPanningLimit = 100
self.itemVoice = "chris"
self.environment = "default"
self.language = locale.getdefaultlocale()[0]
if self.language is None:
self.language = "en_US" # OSX may fail to auto language detect when frozen
Expand All @@ -40,9 +44,11 @@ def setDefault(self):

def copyFrom(self, importer):
self.bgmVolume = importer.bgmVolume
self.ambianceVolume = importer.ambianceVolume
self.leftPanningLimit = importer.leftPanningLimit
self.rightPanningLimit = importer.rightPanningLimit
self.itemVoice = importer.itemVoice
self.environment = importer.environment
self.language = importer.language

def load(self, filename):
Expand All @@ -59,21 +65,27 @@ def load(self, filename):
self.bgmVolume = self.BGMVOLUME_NEGATIVE_BOUNDARY
if self.bgmVolume > self.BGMVOLUME_POSITIVE_BOUNDARY:
self.bgmVolume = self.BGMVOLUME_POSITIVE_BOUNDARY
self.leftPanningLimit = int(values[1])
self.ambianceVolume = int(values[1]) if numValues > 5 else -10
if self.ambianceVolume < self.AMBIANCEVOLUME_NEGATIVE_BOUNDARY:
self.ambianceVolume = self.AMBIANCEVOLUME_NEGATIVE_BOUNDARY
if self.ambianceVolume > self.AMBIANCEVOLUME_POSITIVE_BOUNDARY:
self.ambianceVolume = self.AMBIANCEVOLUME_POSITIVE_BOUNDARY
self.leftPanningLimit = int(values[2] if numValues > 5 else values[1])
if self.leftPanningLimit < self.LEFTPANNINGLIMIT_NEGATIVE_BOUNDARY:
self.leftPanningLimit = self.LEFTPANNINGLIMIT_NEGATIVE_BOUNDARY
if self.leftPanningLimit > self.LEFTPANNINGLIMIT_POSITIVE_BOUNDARY:
self.leftPanningLimit = self.LEFTPANNINGLIMIT_POSITIVE_BOUNDARY
self.rightPanningLimit = int(values[2])
self.rightPanningLimit = int(values[3] if numValues > 5 else values[2])
if self.rightPanningLimit > self.RIGHTPANNINGLIMIT_POSITIVE_BOUNDARY:
self.rightPanningLimit = self.RIGHTPANNINGLIMIT_POSITIVE_BOUNDARY
if self.rightPanningLimit < self.RIGHTPANNINGLIMIT_NEGATIVE_BOUNDARY:
self.rightPanningLimit = self.RIGHTPANNINGLIMIT_NEGATIVE_BOUNDARY
self.itemVoice = values[3]
self.language = values[4] if numValues > 4 else locale.getdefaultlocale()[0]
self.itemVoice = values[4] if numValues > 5 else values[3]
self.environment = values[5] if numValues > 5 else "default"
self.language = values[6] if numValues > 6 else (values[4] if numValues > 4 else locale.getdefaultlocale()[0])
return True

def save(self, filename):
s = "%d#%d#%d#%s#%s" % (self.bgmVolume, self.leftPanningLimit, self.rightPanningLimit, self.itemVoice, self.language)
s = "%d#%d#%d#%d#%s#%s#%s" % (self.bgmVolume, self.ambianceVolume, self.leftPanningLimit, self.rightPanningLimit, self.itemVoice, self.environment, self.language)
with open(filename, mode="w") as f:
f.write(s)
22 changes: 17 additions & 5 deletions locale/en_US/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -420,26 +420,38 @@ msgid ""
"right arrows to change values, enter to save or escape to discard changes"
msgstr ""

#: ssAppMain.py:480
#: ssAppMain.py:551
msgid "Background music volume"
msgstr ""

#: ssAppMain.py:481
#: ssAppMain.py:552
msgid "Ambiance volume"
msgstr ""

#: ssAppMain.py:553
msgid "Left panning limit"
msgstr ""

#: ssAppMain.py:482
#: ssAppMain.py:554
msgid "Right panning limit."
msgstr ""

#: ssAppMain.py:483
#: ssAppMain.py:555
msgid "Item announcement voice"
msgstr ""

#: ssAppMain.py:484
#: ssAppMain.py:556
msgid "Environment"
msgstr ""

#: ssAppMain.py:557
msgid "Language (restart to apply)"
msgstr ""

#: ssAppMain.py:681
msgid "No environments found"
msgstr ""

#: ssAppMain.py:498
msgid "Changes discarded."
msgstr ""
Expand Down
22 changes: 17 additions & 5 deletions locale/ja_JP/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -466,26 +466,38 @@ msgstr ""
"設定メニューです。上下の矢印キーで設定項目を移動し、左右矢印で値を変更しま"
"す。エンターキーで設定を保存し、エスケープキーで変更を破棄します。"

#: ssAppMain.py:480
#: ssAppMain.py:551
msgid "Background music volume"
msgstr "BGMの音量"

#: ssAppMain.py:481
#: ssAppMain.py:552
msgid "Ambiance volume"
msgstr "環境音ボリューム"

#: ssAppMain.py:553
msgid "Left panning limit"
msgstr "左側のパンニング・リミット"

#: ssAppMain.py:482
#: ssAppMain.py:554
msgid "Right panning limit."
msgstr "右側のパンニング・リミット"

#: ssAppMain.py:483
#: ssAppMain.py:555
msgid "Item announcement voice"
msgstr "アイテム・アナウンスの声"

#: ssAppMain.py:484
#: ssAppMain.py:556
msgid "Environment"
msgstr "環境"

#: ssAppMain.py:557
msgid "Language (restart to apply)"
msgstr "言語(再起動後に適用)"

#: ssAppMain.py:681
msgid "No environments found"
msgstr "環境が見つかりません"

#: ssAppMain.py:498
msgid "Changes discarded."
msgstr "変更を破棄しました。"
Expand Down
22 changes: 17 additions & 5 deletions locale/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -420,26 +420,38 @@ msgid ""
"right arrows to change values, enter to save or escape to discard changes"
msgstr ""

#: ssAppMain.py:480
#: ssAppMain.py:551
msgid "Background music volume"
msgstr ""

#: ssAppMain.py:481
#: ssAppMain.py:552
msgid "Ambiance volume"
msgstr ""

#: ssAppMain.py:553
msgid "Left panning limit"
msgstr ""

#: ssAppMain.py:482
#: ssAppMain.py:554
msgid "Right panning limit."
msgstr ""

#: ssAppMain.py:483
#: ssAppMain.py:555
msgid "Item announcement voice"
msgstr ""

#: ssAppMain.py:484
#: ssAppMain.py:556
msgid "Environment"
msgstr ""

#: ssAppMain.py:557
msgid "Language (restart to apply)"
msgstr ""

#: ssAppMain.py:681
msgid "No environments found"
msgstr ""

#: ssAppMain.py:498
msgid "Changes discarded."
msgstr ""
Expand Down
22 changes: 17 additions & 5 deletions locale/tr_TR/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -455,26 +455,38 @@ msgstr ""
"değiştirmek için sağ sol okları kullanın, ayarları kaydetmek için enter'ı, "
"iptal etmek için escape'i kullanın"

#: ssAppMain.py:480
#: ssAppMain.py:551
msgid "Background music volume"
msgstr "Müzik seviyesi"

#: ssAppMain.py:481
#: ssAppMain.py:552
msgid "Ambiance volume"
msgstr "Ortam ses seviyesi"

#: ssAppMain.py:553
msgid "Left panning limit"
msgstr "Soldaki ses sınırı"

#: ssAppMain.py:482
#: ssAppMain.py:554
msgid "Right panning limit."
msgstr "Sağdaki ses sınırı."

#: ssAppMain.py:483
#: ssAppMain.py:555
msgid "Item announcement voice"
msgstr "Bonus duyuru sesi"

#: ssAppMain.py:484
#: ssAppMain.py:556
msgid "Environment"
msgstr "Ortam"

#: ssAppMain.py:557
msgid "Language (restart to apply)"
msgstr "Dil (değişikliği uygulamak için oyunu yeniden başlatın)"

#: ssAppMain.py:681
msgid "No environments found"
msgstr "Ortam bulunamadı"

#: ssAppMain.py:498
msgid "Changes discarded."
msgstr "Değişiklikler iptal edildi."
Expand Down
22 changes: 17 additions & 5 deletions locale/v_VN/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -461,28 +461,40 @@ msgstr ""
"trái và phải để thay đổi giá trị của cài đặt đó, Enter để lưu hoặc escape để "
"hủy thay đổi"

#: ssAppMain.py:480
#: ssAppMain.py:551
msgid "Background music volume"
msgstr ""
"Âm lượng nhạc nền, bấm mũi tên trái và phải để chỉnh Âm lượng nhạc nền. Bấm "
"mũi tên phải là tăng, mũi tên trái là dảm"

#: ssAppMain.py:481
#: ssAppMain.py:552
msgid "Ambiance volume"
msgstr "Âm lượng môi trường xung quanh, bấm mũi tên trái và phải để chỉnh"

#: ssAppMain.py:553
msgid "Left panning limit"
msgstr "Bên trái, bấm mũi tên phải để đưa nó qua phải và nghe âm thanh"

#: ssAppMain.py:482
#: ssAppMain.py:554
msgid "Right panning limit."
msgstr "Bên phải, bấm mũi tên trái để đưa nó qua trái và nghe âm thanh"

#: ssAppMain.py:483
#: ssAppMain.py:555
msgid "Item announcement voice"
msgstr "Giọng nói thông báo vật phẩm, bấm mũi tên trái và phải để trọn"

#: ssAppMain.py:484
#: ssAppMain.py:556
msgid "Environment"
msgstr "Môi trường, bấm mũi tên trái và phải để trọn"

#: ssAppMain.py:557
msgid "Language (restart to apply)"
msgstr "Ngôn ngữ, Bấm mũi tên trái phải để trọn(khởi động lại để áp dụng)"

#: ssAppMain.py:681
msgid "No environments found"
msgstr "Không tìm thấy môi trường"

#: ssAppMain.py:498
msgid "Changes discarded."
msgstr "Các cài đặt đã bị hủy."
Expand Down
Loading