Skip to content

Commit

Permalink
Fix a couple of bugs with the code when not using a solo neck
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsitton committed Sep 18, 2011
1 parent 2589b86 commit 1a89227
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions src/Neck.py
Expand Up @@ -442,10 +442,10 @@ def renderIncomingNecks(self, visibility, song, pos):
if self.incomingNeckMode > 0: #if enabled
if self.useMidiSoloMarkers:
for time, event in track.getEvents(boardWindowMin, boardWindowMax):
if isinstance(event, Song.MarkerNote) and event.number == Song.starPowerMarkingNote and self.soloNeck:
if isinstance(event, Song.MarkerNote) and event.number == Song.starPowerMarkingNote:
if event.endMarker: #solo end
if self.incomingNeckMode == 2 and self.guitarSolo: #render both start and end incoming necks and only until the end of the guitar solo
if self.soloNeck:
if self.soloNeck or self.soloSideBars:
if self.instrument.starPowerActive and self.oNeck and self.ovrneckoverlay == False:
neckImg = self.oNeck
alpha = self.neckAlpha[4]
Expand All @@ -461,22 +461,20 @@ def renderIncomingNecks(self, visibility, song, pos):
if neckImg:
self.renderIncomingNeck(visibility*alpha, song, pos, time, neckImg)


if self.soloSideBars:
sideBarImg = self.sideBars

if sideBarImg:
self.renderIncomingSideBars(song, pos, time, sideBarImg)

else: #solo start
if not self.guitarSolo: #only until guitar solo starts!
if self.soloNeck:
neckImg = self.soloNeck
alpha = self.neckAlpha[2]
self.renderIncomingNeck(visibility*alpha, song, pos, time, neckImg)

if self.soloSideBars:
sideBarImg = self.soloSideBars
alpha = self.neckAlpha[2]
if neckImg:
self.renderIncomingNeck(visibility*alpha, song, pos, time, neckImg)
if sideBarImg:
self.renderIncomingSideBars(song, pos, time, sideBarImg)

if self.spcount2 != 0 and self.spcount < 1.2 and self.oNeck and self.soloNeck:
Expand All @@ -485,7 +483,7 @@ def renderIncomingNecks(self, visibility, song, pos):

elif self.markSolos == 1: #fall back on text-based guitar solo marking track
for time, event in song.eventTracks[Song.TK_GUITAR_SOLOS].getEvents(boardWindowMin, boardWindowMax):
if self.canGuitarSolo and self.soloNeck:
if self.canGuitarSolo:
if event.text.find("ON") >= 0:

if not self.guitarSolo: #only until guitar solo starts!
Expand All @@ -495,13 +493,11 @@ def renderIncomingNecks(self, visibility, song, pos):

if self.soloSideBars:
sideBarImg = self.soloSideBars

if sideBarImg:
self.renderIncomingSideBars(song, pos, time, sideBarImg)

elif self.incomingNeckMode == 2: #render both start and end incoming necks
if self.guitarSolo: #only until the end of the guitar solo!
if self.soloNeck:
if self.soloNeck or self.soloSideBars:
if self.instrument.starPowerActive and self.oNeck:
neckImg = self.oNeck
elif self.scoreMultiplier > 4 and self.bassGrooveNeck != None and self.bassGrooveNeckMode == 1:
Expand All @@ -515,8 +511,6 @@ def renderIncomingNecks(self, visibility, song, pos):

if self.soloSideBars:
sideBarImg = self.soloSideBars

if sideBarImg:
self.renderIncomingSideBars(song, pos, time, sideBarImg)


Expand Down Expand Up @@ -684,8 +678,6 @@ def drawSideBars(self, visibility, song, pos):
v = visibility
w = self.boardWidth + 0.15

sbb = False

if self.failcount == v:
board_col = self.board_col_flash
else:
Expand Down

0 comments on commit 1a89227

Please sign in to comment.