diff --git a/CREDITS.md b/CREDITS.md index 6f01434..7b420af 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -4,4 +4,5 @@ - Overworld : Kevin MacLeod - Itty Bitty 8 Bit - Level 1 : Jeremy Blake - Powerup - +- Level 2 : Quincas Moreira - Robot City +- Level 3 : Kubbi - Up In My Jam diff --git a/gamedata/game.py b/gamedata/game.py index c33238e..32c6460 100644 --- a/gamedata/game.py +++ b/gamedata/game.py @@ -51,8 +51,10 @@ class Game(): mapdico["filler"] = pygame.image.load(i.path).convert_alpha() else: mapdico["tilesets"][i.name] = pygame.image.load(i.path).convert_alpha() - if name=="bgm.mp3": - mapdico["bgm"] = pygame.mixer.Sound(i.path) + if len(name)==7: + if name.startswith("bgm"): + if name.endswith(".wav") or name.endswith(".ogg") or name.endswith(".mp3"): + mapdico["bgm"] = pygame.mixer.Sound(i.path) except: self.log("Erreur",mapfolder,name,"Fichier invalide") if name=="map.json": diff --git a/gamedata/maps/Level 1/bgm.mp3 b/gamedata/maps/Level 1/bgm.mp3 deleted file mode 100644 index 9ba49ed..0000000 Binary files a/gamedata/maps/Level 1/bgm.mp3 and /dev/null differ diff --git a/gamedata/maps/Level 1/bgm.ogg b/gamedata/maps/Level 1/bgm.ogg new file mode 100644 index 0000000..73042f1 Binary files /dev/null and b/gamedata/maps/Level 1/bgm.ogg differ diff --git a/gamedata/maps/Level 2/bgm.mp3 b/gamedata/maps/Level 2/bgm.mp3 deleted file mode 100644 index c64eabe..0000000 Binary files a/gamedata/maps/Level 2/bgm.mp3 and /dev/null differ diff --git a/gamedata/maps/Level 2/bgm.ogg b/gamedata/maps/Level 2/bgm.ogg new file mode 100644 index 0000000..7e21856 Binary files /dev/null and b/gamedata/maps/Level 2/bgm.ogg differ diff --git a/gamedata/maps/Level 3/bgm.mp3 b/gamedata/maps/Level 3/bgm.mp3 deleted file mode 100644 index c64eabe..0000000 Binary files a/gamedata/maps/Level 3/bgm.mp3 and /dev/null differ diff --git a/gamedata/maps/Level 3/bgm.ogg b/gamedata/maps/Level 3/bgm.ogg new file mode 100644 index 0000000..2fad027 Binary files /dev/null and b/gamedata/maps/Level 3/bgm.ogg differ diff --git a/gamedata/objects/levels.py b/gamedata/objects/levels.py index 56cdb99..55e9307 100644 --- a/gamedata/objects/levels.py +++ b/gamedata/objects/levels.py @@ -11,7 +11,7 @@ class Levels(BaseObject): self.nodes.append(i.copy()) self.customvalues = customvalues - self.bgm = self.game.sound_lib["bgm/overworld.mp3"] + self.bgm = self.game.sound_lib["bgm/overworld.ogg"] self.bgm.play(-1) self.sfx = self.game.sound_lib["sfx/mapmove.wav"] diff --git a/gamedata/sounds/bgm/overworld.mp3 b/gamedata/sounds/bgm/overworld.mp3 deleted file mode 100644 index ed2a205..0000000 Binary files a/gamedata/sounds/bgm/overworld.mp3 and /dev/null differ diff --git a/gamedata/sounds/bgm/overworld.ogg b/gamedata/sounds/bgm/overworld.ogg new file mode 100644 index 0000000..ea0ea8f Binary files /dev/null and b/gamedata/sounds/bgm/overworld.ogg differ