Skip to content

Commit

Permalink
more cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsitton committed Jun 11, 2011
1 parent 096e3b8 commit 00af909
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/Drum.py
Expand Up @@ -433,8 +433,8 @@ def render(self, visibility, song, pos, controls, killswitch):
self.renderFrets(visibility, song, controls)

if self.hitFlamesPresent: #MFH - only when present!
self.renderFlames(visibility, song, pos, controls) #MFH - only when freestyle inactive!

self.renderFlames(song, pos, controls) #MFH - only when freestyle inactive!

def playDrumSounds(self, controls, playBassDrumOnly = False): #MFH - handles playing of drum sounds.
#Returns list of drums that were just hit (including logic for detecting a held bass pedal)
Expand Down
4 changes: 2 additions & 2 deletions src/Guitar.py
Expand Up @@ -272,8 +272,8 @@ def render(self, visibility, song, pos, controls, killswitch):

if self.hitFlamesPresent: #MFH - only if present!
self.renderHitGlow()
self.renderHitTrails(visibility, song, pos, controls)
self.renderFlames(visibility, song, pos, controls) #MFH - only when freestyle inactive!
self.renderHitTrails(controls)
self.renderFlames(song, pos, controls) #MFH - only when freestyle inactive!

if self.leftyMode:
if not self.battleStatus[6]:
Expand Down
22 changes: 9 additions & 13 deletions src/Instrument.py
Expand Up @@ -758,14 +758,12 @@ def isKillswitchPossible(self):
return possible

#Renders the tail glow hitflame
def renderHitTrails(self, visibility, song, pos, controls):
if not song or self.flameColors[0][0] == -1 or self.disableFlameSFX == True:
def renderHitTrails(self, controls):
if self.flameColors[0][0] == -1 or self.disableFlameSFX == True:
return

w = self.boardWidth / self.strings

v = 1.0 - visibility

if self.starPowerActive:
flameColor = self.spColor
else:
Expand All @@ -781,14 +779,13 @@ def renderHitTrails(self, visibility, song, pos, controls):
if f and (controls.getState(self.actions[0]) or controls.getState(self.actions[1])):
f += 0.25

y = v + f / 6
y = f / 6
x = (self.strings / 2 - n) * w
flameSize = .075

if self.fretActivity[n]:
ms = math.sin(self.time) * .25 + 1
ff = self.fretActivity[n]
ff += 1.2
ff = self.fretActivity[n] + 1.2

#Alarian: Animated hitflames
if self.Hitanim:
Expand Down Expand Up @@ -821,12 +818,11 @@ def renderHitTrails(self, visibility, song, pos, controls):


#renders the flames that appear when a note is struck
def renderFlames(self, visibility, song, pos, controls):
def renderFlames(self, song, pos, controls):
if not song or self.flameColors[0][0] == -1:
return

w = self.boardWidth / self.strings
v = 1.0 - visibility
flameSize = .075

if self.starPowerActive:
Expand Down Expand Up @@ -859,7 +855,7 @@ def renderFlames(self, visibility, song, pos, controls):

xlightning = (self.strings / 2 - event.number)*2.2*w
ff = 1 + 0.25
y = v + ff / 6
y = ff / 6

y -= 0.5

Expand Down Expand Up @@ -1747,7 +1743,7 @@ def renderHitGlow(self):
f = self.fretActivity[n]
w = self.boardWidth / self.strings
x = (self.strings / 2 - n) * w
size = (.22, .22)
size = .22

if f and self.disableFretSFX != True:

Expand Down Expand Up @@ -1783,11 +1779,11 @@ def renderHitGlow(self):

if self.battleStatus[4]:
self.engine.draw3Dtex(self.glowDrawing, coord = (x, self.battleWhammyNow * .15, 0.01), rot = (f * 90 + self.time, 0, 1, 0),
texcoord = (0.0, 0.0, 1.0, 1.0), vertex = (-size[0] * f, -size[1] * f, size[0] * f, size[1] * f),
texcoord = (0.0, 0.0, 1.0, 1.0), vertex = (-size * f, -size * f, size * f, size * f),
multiples = True, alpha = True, color = glowcol)
else:
self.engine.draw3Dtex(self.glowDrawing, coord = (x, 0, 0.01), rot = (f * 90 + self.time, 0, 1, 0),
texcoord = (0.0, 0.0, 1.0, 1.0), vertex = (-size[0] * f, -size[1] * f, size[0] * f, size[1] * f),
texcoord = (0.0, 0.0, 1.0, 1.0), vertex = (-size * f, -size * f, size * f, size * f),
multiples = True, alpha = True, color = glowcol)

def renderTail(self, song, length, sustain, kill, color, tailOnly = False, isTappable = False, big = False, fret = 0, spNote = False, freestyleTail = 0, pos = 0):
Expand Down

0 comments on commit 00af909

Please sign in to comment.