diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/03_init.rpy | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/game/03_init.rpy b/game/03_init.rpy index 0740c27..0a55ac7 100644 --- a/game/03_init.rpy +++ b/game/03_init.rpy @@ -139,7 +139,7 @@ init python: return name # Loads a sound called VAL - def get_sfx(val, ext): + def get_sfx(val, ext=".mp3"): # Search for the sound show_img(val, False, ext=ext) @@ -149,9 +149,22 @@ init python: return "sfx/regnum.mp3" # FIXME return valb + + # Load sfx (or rather, register the path) + for file in renpy.list_files(): + fn=file.replace('sfx/','').replace('/', ' ').replace('.mp3','').replace('.ogg','') + if file.startswith('sfx/'): + if file.endswith('.mp3') or file.endswith('.ogg'): + if not fn in persistent.allfiles: + persistent.allfiles.append((fn, file)) + allfiles.append(fn) + continue + continue + + # Load sprite images: "unit" for file in renpy.list_files(): - fn=file.replace('gfx/units/','').replace('/', ' ').replace('.png','') + fn=file.replace('gfx/units/','').replace('/', ' ').replace('.png','').replace('.webp','') if file.startswith('gfx/units/'): if file.endswith('.png') or file.endswith('.webp'): name = "unit_"+fn @@ -167,7 +180,7 @@ init python: # Load sprite images: "mob" for file in renpy.list_files(): - fn=file.replace('gfx/mobs/','').replace('/', ' ').replace('.png','') + fn=file.replace('gfx/mobs/','').replace('/', ' ').replace('.png','').replace('.webp','') if file.startswith('gfx/mobs/'): if file.endswith('.png') or file.endswith('.webp'): name = "mob_"+fn @@ -366,10 +379,12 @@ init python: ########################################################## # Other Music + #MUSIC_OPENING => Init Block -3 + #MUSIC_TOWN => Init Block -3 MUSIC_BATTLE=RetString("sfx/bgm03.mp3") MUSIC_BOSS=RetString("sfx/bgm04.mp3") MUSIC_PARTY=RetString("sfx/bgm02.mp3") - MUSIC_PARTY=ExecuteOnCall(get_sfx, "sfx_bgm05", ".mp3")#"sfx/bgm05.mp3" + MUSIC_PARTY=ExecuteOnCall(get_sfx, "sfx_bgm05", ".mp3") MUSIC_VICTORY=RetString("sfx/bgm06.mp3") MUSIC_WORLDMAP=RetString("sfx/bgm02.mp3") MUSIC_WORLDMAP=ExecuteOnCall(get_sfx, "sfx_bgm07", ".mp3")#"sfx/bgm07.mp3" |