From d681de1d747510c45261e60793b5896f2b32863a Mon Sep 17 00:00:00 2001 From: weirdpeople Date: Tue, 26 Jul 2011 23:14:19 -0500 Subject: [PATCH] Move all flames to the flames folder, and now specific instruments can have specific flames. Also simplified flames loading and removed a few redundant things. --- .../MegaLight GH3/{ => flames}/hitflames1.png | Bin .../MegaLight GH3/{ => flames}/hitflames2.png | Bin .../MegaLight GH3/{ => flames}/hitglow.png | Bin .../MegaLight GH3/{ => flames}/hitglow2.png | Bin .../themes/MegaLight V4/{ => flames}/glow.png | Bin .../MegaLight V4/{ => flames}/hitflames2.png | Bin .../MegaLight/{ => flames}/hitflames1.png | Bin .../MegaLight/{ => flames}/hitflames2.png | Bin .../themes/MegaLight/{ => flames}/hitglow.png | Bin .../MegaLight/{ => flames}/hitglow2.png | Bin src/Instrument.py | 31 +++++++----------- 11 files changed, 12 insertions(+), 19 deletions(-) rename data/themes/MegaLight GH3/{ => flames}/hitflames1.png (100%) rename data/themes/MegaLight GH3/{ => flames}/hitflames2.png (100%) rename data/themes/MegaLight GH3/{ => flames}/hitglow.png (100%) rename data/themes/MegaLight GH3/{ => flames}/hitglow2.png (100%) rename data/themes/MegaLight V4/{ => flames}/glow.png (100%) rename data/themes/MegaLight V4/{ => flames}/hitflames2.png (100%) rename data/themes/MegaLight/{ => flames}/hitflames1.png (100%) rename data/themes/MegaLight/{ => flames}/hitflames2.png (100%) rename data/themes/MegaLight/{ => flames}/hitglow.png (100%) rename data/themes/MegaLight/{ => flames}/hitglow2.png (100%) diff --git a/data/themes/MegaLight GH3/hitflames1.png b/data/themes/MegaLight GH3/flames/hitflames1.png similarity index 100% rename from data/themes/MegaLight GH3/hitflames1.png rename to data/themes/MegaLight GH3/flames/hitflames1.png diff --git a/data/themes/MegaLight GH3/hitflames2.png b/data/themes/MegaLight GH3/flames/hitflames2.png similarity index 100% rename from data/themes/MegaLight GH3/hitflames2.png rename to data/themes/MegaLight GH3/flames/hitflames2.png diff --git a/data/themes/MegaLight GH3/hitglow.png b/data/themes/MegaLight GH3/flames/hitglow.png similarity index 100% rename from data/themes/MegaLight GH3/hitglow.png rename to data/themes/MegaLight GH3/flames/hitglow.png diff --git a/data/themes/MegaLight GH3/hitglow2.png b/data/themes/MegaLight GH3/flames/hitglow2.png similarity index 100% rename from data/themes/MegaLight GH3/hitglow2.png rename to data/themes/MegaLight GH3/flames/hitglow2.png diff --git a/data/themes/MegaLight V4/glow.png b/data/themes/MegaLight V4/flames/glow.png similarity index 100% rename from data/themes/MegaLight V4/glow.png rename to data/themes/MegaLight V4/flames/glow.png diff --git a/data/themes/MegaLight V4/hitflames2.png b/data/themes/MegaLight V4/flames/hitflames2.png similarity index 100% rename from data/themes/MegaLight V4/hitflames2.png rename to data/themes/MegaLight V4/flames/hitflames2.png diff --git a/data/themes/MegaLight/hitflames1.png b/data/themes/MegaLight/flames/hitflames1.png similarity index 100% rename from data/themes/MegaLight/hitflames1.png rename to data/themes/MegaLight/flames/hitflames1.png diff --git a/data/themes/MegaLight/hitflames2.png b/data/themes/MegaLight/flames/hitflames2.png similarity index 100% rename from data/themes/MegaLight/hitflames2.png rename to data/themes/MegaLight/flames/hitflames2.png diff --git a/data/themes/MegaLight/hitglow.png b/data/themes/MegaLight/flames/hitglow.png similarity index 100% rename from data/themes/MegaLight/hitglow.png rename to data/themes/MegaLight/flames/hitglow.png diff --git a/data/themes/MegaLight/hitglow2.png b/data/themes/MegaLight/flames/hitglow2.png similarity index 100% rename from data/themes/MegaLight/hitglow2.png rename to data/themes/MegaLight/flames/hitglow2.png diff --git a/src/Instrument.py b/src/Instrument.py index eaf2b8194..8e014cc36 100644 --- a/src/Instrument.py +++ b/src/Instrument.py @@ -369,22 +369,21 @@ def loadFlames(self): engine = self.engine themename = self.engine.data.themeLabel + get = lambda file: self.checkPath("flames", file) + self.HCount = 0 self.HCount2 = 0 self.HFrameLimit = self.engine.theme.HoldFlameFrameLimit self.HFrameLimit2 = self.engine.theme.HitFlameFrameLimit - self.Hitanim = True - self.Hitanim2 = True self.HCountAni = False if self.disableFretSFX != False: self.glowDrawing = None else: - engine.loadImgDrawing(self, "glowDrawing", os.path.join("themes",themename,"glow.png"), textureSize = (128, 128)) + engine.loadImgDrawing(self, "glowDrawing", get("glow.png")) if not self.glowDrawing: engine.loadImgDrawing(self, "glowDrawing", "glow.png") - self.hitFlamesPresent = True if self.disableFlameSFX == True: self.hitglow2Drawing = None self.hitglowDrawing = None @@ -393,19 +392,13 @@ def loadFlames(self): self.hitflames2Drawing = None self.hitflames1Drawing = None else: - engine.loadImgDrawing(self, "hitflames1Drawing", os.path.join("themes",themename,"hitflames1.png"), textureSize = (128, 128)) - engine.loadImgDrawing(self, "hitflames2Drawing", os.path.join("themes",themename,"hitflames2.png"), textureSize = (128, 128)) - - if not engine.loadImgDrawing(self, "hitflamesAnim", os.path.join("themes",themename,"hitflamesanimation.png"), textureSize = (128, 128)): - self.Hitanim2 = False - - engine.loadImgDrawing(self, "powerHitflamesAnim", os.path.join("themes",themename,"powerhitflamesanimation.png"), textureSize = (128, 128)) - - if not engine.loadImgDrawing(self, "hitglowAnim", os.path.join("themes",themename,"hitglowanimation.png"), textureSize = (128, 128)): - self.Hitanim = False - - engine.loadImgDrawing(self, "hitglowDrawing", os.path.join("themes",themename,"hitglow.png"), textureSize = (128, 128)) - engine.loadImgDrawing(self, "hitglow2Drawing", os.path.join("themes",themename,"hitglow2.png"), textureSize = (128, 128)) + engine.loadImgDrawing(self, "hitflames1Drawing", get("hitflames1.png")) + engine.loadImgDrawing(self, "hitflames2Drawing", get("hitflames2.png")) + engine.loadImgDrawing(self, "hitflamesAnim", get("hitflamesanimation.png")) + engine.loadImgDrawing(self, "powerHitflamesAnim", get("powerhitflamesanimation.png")) + engine.loadImgDrawing(self, "hitglowAnim", get("hitglowanimation.png")) + engine.loadImgDrawing(self, "hitglowDrawing", get("hitglow.png")) + engine.loadImgDrawing(self, "hitglow2Drawing", get("hitglow2.png")) engine.loadImgDrawing(self, "hitlightning", os.path.join("themes",themename,"lightning.png"), textureSize = (128, 128)) @@ -806,7 +799,7 @@ def renderHitTrails(self, controls): color = tuple([color[ifc] + .38 for ifc in range(3)]) #to make sure the final color looks correct on any color set #Alarian: Animated hitflames - if self.Hitanim and self.hitglowAnim: + if self.hitglowAnim: self.HCount =+ 1 if self.HCount > self.Animspeed-1: @@ -896,7 +889,7 @@ def renderFlames(self, song, pos, controls): vtx = flameSize * ff - if self.Hitanim2 == True and self.hitflamesAnim: + if self.hitflamesAnim: self.HCount2 += 1 self.HCountAni = False if self.HCount2 >= self.HFrameLimit2: