Skip to content

Commit

Permalink
Remove GH battle mode. Might return at a later point if there is enou…
Browse files Browse the repository at this point in the history
…gh demand for it.
  • Loading branch information
mdsitton committed Oct 28, 2015
1 parent 677faf8 commit 4f53b4e
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 689 deletions.
21 changes: 0 additions & 21 deletions fofix/core/Settings.py
Expand Up @@ -716,26 +716,6 @@ def __init__(self, engine):
]
self.advancedGameSettingsMenu = Menu.Menu(self.engine, self.advancedGameSettings, pos = (self.opt_text_x, self.opt_text_y), textColor = self.opt_text_color, selectedColor = self.opt_selected_color)

self.battleObjectSettings = [
ConfigChoice(engine, engine.config, "game", "battle_Whammy", autoApply = True),
ConfigChoice(engine, engine.config, "game", "battle_Diff_Up", autoApply = True),
ConfigChoice(engine, engine.config, "game", "battle_String_Break", autoApply = True),
ConfigChoice(engine, engine.config, "game", "battle_Double", autoApply = True),
ConfigChoice(engine, engine.config, "game", "battle_Death_Drain", autoApply = True),
ConfigChoice(engine, engine.config, "game", "battle_Amp_Overload", autoApply = True),
ConfigChoice(engine, engine.config, "game", "battle_Switch_Controls", autoApply = True),
ConfigChoice(engine, engine.config, "game", "battle_Steal", autoApply = True),
ConfigChoice(engine, engine.config, "game", "battle_Tune", autoApply = True),
]

self.battleObjectSettingsMenu = Menu.Menu(self.engine, self.battleObjectSettings, pos = (self.opt_text_x, self.opt_text_y), textColor = self.opt_text_color, selectedColor = self.opt_selected_color)

self.battleSettings = [
(_("Battle Objects"), self.battleObjectSettingsMenu, _("Set which objects can appear in Battle Mode")),
]

self.battleSettingsMenu = Menu.Menu(self.engine, self.battleSettings, pos = (self.opt_text_x, self.opt_text_y), textColor = self.opt_text_color, selectedColor = self.opt_selected_color)

self.basicSettings = [
ConfigChoice(self.engine, self.engine.config, "game", "language"),
ConfigChoice(self.engine, self.engine.config, "game", "T_sound", autoApply = True), #Faaa Drum sound
Expand All @@ -749,7 +729,6 @@ def __init__(self, engine):
(_("Advanced Gameplay Settings"), self.advancedGameSettingsMenu, _("Set advanced gameplay settings that affect the game rules.")),
(_("Vocal Mode Settings"), self.lyricsSettingsMenu, _("Change settings that affect lyrics and in-game vocals.")),
(_("HO/PO Settings"), self.hopoSettingsMenu, _("Change settings that affect hammer-ons and pull-offs (HO/PO).")),
(_("Battle Settings"), self.battleSettingsMenu, _("Change settings that affect battle mode.")),
]

self.basicSettingsMenu = Menu.Menu(self.engine, self.basicSettings, pos = (self.opt_text_x, self.opt_text_y), textColor = self.opt_text_color, selectedColor = self.opt_selected_color)
Expand Down
1 change: 0 additions & 1 deletion fofix/game/MainMenu.py
Expand Up @@ -178,7 +178,6 @@ def __init__(self, engine):
(_("Pro Face-Off"), lambda: self.newLocalGame(players = 2, mode2p = 1, maxplayers = 4)),
(_("FoFiX Co-Op"), lambda: self.newLocalGame(players = 2, mode2p = 3, maxplayers = 4, allowMic = allowMic)),
(_("RB Co-Op"), lambda: self.newLocalGame(players = 2, mode2p = 4, maxplayers = 4, allowMic = allowMic)),
(_("GH Battle"), lambda: self.newLocalGame(players = 2, mode2p = 6, allowDrum = False)), #akedrou- so you can block drums
]

if not self.useSoloMenu:
Expand Down
2 changes: 1 addition & 1 deletion fofix/game/World.py
Expand Up @@ -36,7 +36,7 @@ def __init__(self, engine, players, maxplayers = None, gameMode = 0, multiMode =
self.minPlayers = players
self.maxPlayers = maxplayers or players
self.gameMode = gameMode #Quickplay, Practice, Career
self.multiMode = multiMode #Face-Off, Pro FO, Co-Op, RB Co-Op, Battle
self.multiMode = multiMode #Face-Off, Pro FO, Co-Op, RB Co-Op
self.allowGuitar = allowGuitar
self.allowDrum = allowDrum
self.allowMic = allowMic
Expand Down
425 changes: 36 additions & 389 deletions fofix/game/guitarscene/GuitarScene.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fofix/game/guitarscene/Stage.py
Expand Up @@ -391,7 +391,7 @@ def restartVideo(self):
def load(self, libraryName, songName, practiceMode = False):
if self.scene.coOpType:
rm = os.path.join("themes", self.themename, "rockmeter_coop.ini")
elif self.scene.battle or self.scene.battleGH:
elif self.scene.battle:
rm = os.path.join("themes", self.themename, "rockmeter_profaceoff.ini")
elif self.scene.gamePlayers > 1:
rm = os.path.join("themes", self.themename, "rockmeter_faceoff.ini")
Expand Down
128 changes: 8 additions & 120 deletions fofix/game/guitarscene/instruments/Guitar.py
Expand Up @@ -127,20 +127,16 @@ def renderFrets(self, visibility, song, controls):
size = (self.boardWidth / self.strings / 2, self.boardWidth / self.strings / 2.4)
texSize = (n / self.lanenumber, n / self.lanenumber + 1 / self.lanenumber)

if self.battleStatus[3] and self.battleFrets != None and self.battleBreakString == n:
texSize = (n/5.0+.042,n/5.0+0.158)
size = (.30, .40)
fretPos = 8 - round((self.battleBreakNow/self.battleBreakLimit) * 8)
texY = (fretPos/8.0,(fretPos + 1.0)/8)
# fret normal guitar/bass/drums
texY = (0.0, 1.0 / self.fretImgColNumber)

else:
texY = (0.0, 1.0 / self.fretImgColNumber)#fret normal guitar/bass/drums

if controls.getState(self.keys[n]) or controls.getState(self.keys[n+5]):#fret press
texY = (1.0 / self.fretImgColNumber, 2.0 / self.fretImgColNumber)
# fret press
if controls.getState(self.keys[n]) or controls.getState(self.keys[n+5]):
texY = (1.0 / self.fretImgColNumber, 2.0 / self.fretImgColNumber)

elif self.hit[n] or (self.battleStatus[3] and self.battleBreakString == n):#frets on note hit
texY = (2.0 / self.fretImgColNumber,1.0)
#frets on note hit
elif self.hit[n]:
texY = (2.0 / self.fretImgColNumber,1.0)

draw3Dtex(self.fretButtons, vertex = (size[0],size[1],-size[0],-size[1]), texcoord = (texSize[0], texY[0], texSize[1], texY[1]),
coord = (x,v,0), multiples = True,color = fretColor, depth = True)
Expand Down Expand Up @@ -301,9 +297,6 @@ def render(self, visibility, song, pos, controls, killswitch):
gl.glEnable(gl.GL_COLOR_MATERIAL)

if self.leftyMode:
if not self.battleStatus[6]:
gl.glScalef(-1, 1, 1)
elif self.battleStatus[6]:
gl.glScalef(-1, 1, 1)

if self.freestyleActive:
Expand Down Expand Up @@ -334,113 +327,8 @@ def render(self, visibility, song, pos, controls, killswitch):
self.renderFlames(song, pos) #MFH - only when freestyle inactive!

if self.leftyMode:
if not self.battleStatus[6]:
gl.glScalef(-1, 1, 1)
elif self.battleStatus[6]:
gl.glScalef(-1, 1, 1)

def getDoubleNotes(self, notes):
if self.battleStatus[7] and notes != []:
notes = sorted(notes, key=lambda x: x[0])
curTime = 0
tempnotes = []
tempnumbers = []
curNumbers = []
noteCount = 0
for time, note in notes:
noteCount += 1
if not isinstance(note, Note):
if noteCount == len(notes) and len(curNumbers) < 3 and len(curNumbers) > 0:
maxNote = curNumbers[0]
minNote = curNumbers[0]
for i in range(0, len(curNumbers)):
if curNumbers[i] > maxNote:
maxNote = curNumbers[i]
if curNumbers[i] < minNote:
minNote = curNumbers[i]
curNumbers = []
if maxNote < 4:
tempnumbers.append(maxNote + 1)
elif minNote > 0:
tempnumbers.append(minNote - 1)
else:
tempnumbers.append(2)
elif noteCount == len(notes) and len(curNumbers) > 2:
tempnumbers.append(-1)
curNumbers = []
continue
if time != curTime:
if curTime != 0 and len(curNumbers) < 3:
maxNote = curNumbers[0]
minNote = curNumbers[0]
for i in range(0, len(curNumbers)):
if curNumbers[i] > maxNote:
maxNote = curNumbers[i]
if curNumbers[i] < minNote:
minNote = curNumbers[i]
curNumbers = []
if maxNote < 4:
tempnumbers.append(maxNote + 1)
elif minNote > 0:
tempnumbers.append(minNote - 1)
else:
tempnumbers.append(2)
elif (curTime != 0 or noteCount == len(notes)) and len(curNumbers) > 2:
tempnumbers.append(-1)
curNumbers = []
tempnotes.append((time,deepcopy(note)))
curTime = time
curNumbers.append(note.number)
if noteCount == len(notes) and len(curNumbers) < 3:
maxNote = curNumbers[0]
minNote = curNumbers[0]
for i in range(0, len(curNumbers)):
if curNumbers[i] > maxNote:
maxNote = curNumbers[i]
if curNumbers[i] < minNote:
minNote = curNumbers[i]
curNumbers = []
if maxNote < 4:
tempnumbers.append(maxNote + 1)
elif minNote > 0:
tempnumbers.append(minNote - 1)
else:
tempnumbers.append(2)
elif noteCount == len(notes) and len(curNumbers) > 2:
tempnumbers.append(-1)
curNumbers = []
else:
curNumbers.append(note.number)
if noteCount == len(notes) and len(curNumbers) < 3:
maxNote = curNumbers[0]
minNote = curNumbers[0]
for i in range(0, len(curNumbers)):
if curNumbers[i] > maxNote:
maxNote = curNumbers[i]
if curNumbers[i] < minNote:
minNote = curNumbers[i]
curNumbers = []
if maxNote < 4:
tempnumbers.append(maxNote + 1)
elif minNote > 0:
tempnumbers.append(minNote - 1)
else:
tempnumbers.append(2)
elif noteCount == len(notes) and len(curNumbers) > 2:
tempnumbers.append(-1)
curNumbers = []
noteCount = 0
for time, note in tempnotes:
if tempnumbers[noteCount] != -1:
note.number = tempnumbers[noteCount]
noteCount += 1
if time > self.battleStartTimes[7] + self.currentPeriod * self.beatsPerBoard and time < self.battleStartTimes[7] - self.currentPeriod * self.beatsPerBoard + self.battleDoubleLength:
notes.append((time,note))
else:
noteCount += 1
return sorted(notes, key=lambda x: x[0])


def controlsMatchNotes(self, controls, notes):
# no notes?
if not notes:
Expand Down

0 comments on commit 4f53b4e

Please sign in to comment.