From eedd04100703b75f820a11b912d797eb2deb5dfb Mon Sep 17 00:00:00 2001 From: John Stumpo Date: Mon, 1 Mar 2010 12:30:08 -0500 Subject: [PATCH] Convert files with Windows-style line endings to Unix-style. This is because Windows-style line endings do not interact properly with msysgit's default configuration. Some of the files are Windows shell scripts; the Windows shell will work with them just fine either way. --- data/themes/MegaLight V4/rockmeter.ini | 8 +- data/themes/MegaLight V4/theme.ini | 50 +- data/themes/MegaLight/CustomTheme.py | 742 +++++++++--------- data/tutorials/bangbang/song.ini | 6 +- data/tutorials/drumrolls/song.ini | 18 +- data/tutorials/drumtest/song.ini | 4 +- ...le-checkOutOneGameThemeSvn-TortoiseSVN.bat | 20 +- ...ule-checkOutOneGameThemeSvn-subversion.bat | 20 +- .../module-updateAllFoFiXSVNsRelative.bat | 216 ++--- 9 files changed, 542 insertions(+), 542 deletions(-) diff --git a/data/themes/MegaLight V4/rockmeter.ini b/data/themes/MegaLight V4/rockmeter.ini index f5ba15b2b..b4c788320 100644 --- a/data/themes/MegaLight V4/rockmeter.ini +++ b/data/themes/MegaLight V4/rockmeter.ini @@ -175,10 +175,10 @@ filltype = circle isPartialStars = True pos = .13, .25;.13, .25;.13, .25;.13, .25;.13, .25 scale = .35, -.35;.35, -.35;.35, -.35;.35, -.35;.35, -.35 -star_fillup_center_x = 139 -star_fillup_center_y = 151 -star_fillup_in_radius = 121 -star_fillup_out_radius = 138 +star_fillup_center_x = 139 +star_fillup_center_y = 151 +star_fillup_in_radius = 121 +star_fillup_out_radius = 138 star_fillup_color = #FFF25E [layer22] diff --git a/data/themes/MegaLight V4/theme.ini b/data/themes/MegaLight V4/theme.ini index 01692a640..438867f3d 100644 --- a/data/themes/MegaLight V4/theme.ini +++ b/data/themes/MegaLight V4/theme.ini @@ -1,7 +1,7 @@ -[theme] -rbmenu = true +[theme] +rbmenu = true -menu_x = .25 +menu_x = .25 menu_y = .32 main_menu_vspacing = 0.05 @@ -11,27 +11,27 @@ fret2_color = #e10d1d fret3_color = #84ed67 fret4_color = #dbea62 fret5_color = #dbea62 - -fail_text_y = .4 -display_all_grey_stars = False -sub_menu_x = .21 -sub_menu_y = .15 -menu_tip_text_display = True -song_select_submenu_x = 0.1 -song_select_submenu_y = 0.075 -song_select_submenu_offset_lines = 4 -song_select_submenu_offset_spaces = 3 -song_name_text_color = #FFFFFF -song_list_display = 0 -song_listcd_cd_x = .25 -song_listcd_cd_y = .6 -song_listcd_score_x = .1 -song_listcd_score_y = .5 -song_listcd_list_x = .5 -star_fillup_center_x = 139 -star_fillup_center_y = 151 -star_fillup_in_radius = 121 -star_fillup_out_radius = 138 + +fail_text_y = .4 +display_all_grey_stars = False +sub_menu_x = .21 +sub_menu_y = .15 +menu_tip_text_display = True +song_select_submenu_x = 0.1 +song_select_submenu_y = 0.075 +song_select_submenu_offset_lines = 4 +song_select_submenu_offset_spaces = 3 +song_name_text_color = #FFFFFF +song_list_display = 0 +song_listcd_cd_x = .25 +song_listcd_cd_y = .6 +song_listcd_score_x = .1 +song_listcd_score_y = .5 +song_listcd_list_x = .5 +star_fillup_center_x = 139 +star_fillup_center_y = 151 +star_fillup_in_radius = 121 +star_fillup_out_radius = 138 star_fillup_color = #FFF25E - + loading_phrase = Made to run on almost ANY system!_MegaLight has always been the Standard theme for FoFiX._FoFiX v4.0 brings the level of customizability to a whole new level never seen before in Frets On Fire._What do you mean where's Jurgen? You're crazy._If you find yourself getting bored, feel free to stand up while you play instead of continuing to jam on your couch._Rock On, not off. Off isn't as much fun. diff --git a/data/themes/MegaLight/CustomTheme.py b/data/themes/MegaLight/CustomTheme.py index 730af3c69..a1719a69c 100644 --- a/data/themes/MegaLight/CustomTheme.py +++ b/data/themes/MegaLight/CustomTheme.py @@ -1,371 +1,371 @@ -##################################################################### -# -*- coding: iso-8859-1 -*- # -# # -# Frets on Fire X # -# Copyright (C) 2006 Sami Kyöstilä # -# 2008 myfingershurt # -# 2008 Blazingamer # -# 2008 evilynux # -# # -# This program is free software; you can redistribute it and/or # -# modify it under the terms of the GNU General Public License # -# as published by the Free Software Foundation; either version 2 # -# of the License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program; if not, write to the Free Software # -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # -# MA 02110-1301, USA. # -##################################################################### - -from Theme import _ -from Theme import * - -class CustomTheme(Theme): - def __init__(self, path, name, iniFile = False): - Theme.__init__(self, path, name, iniFile) - - self.menuRB = True - self.menuX = .25 - self.menuY = .70 - - self.fail_text_yPos = .4 - - self.displayAllGreyStars = False - self.sub_menu_xVar = .21 - self.sub_menu_yVar = .15 - self.menuTipTextDisplay = True - self.songSelectSubmenuX = 0.1 - self.songSelectSubmenuY = 0.075 - self.songSelectSubmenuOffsetLines = 4 - self.songSelectSubmenuOffsetSpaces = 3 - self.song_name_text_colorVar = (1,1,1) - self.songListDisplay = 0 - self.starFillupCenterX = 139 - self.starFillupCenterY = 151 - self.starFillupInRadius = 121 - self.starFillupOutRadius = 138 - self.starFillupColor = (1,.95,.37) - self.loadingPhrase = ["If you see a series of glowing white notes, hit it perfectly to gain Energy.","The louder the better!",\ - "You can buy a real guitar for pretty cheap - maybe it's time to invest.",\ - "Play flawlessly to get a score multiplier going. The longer you hold a streak, the higher your multiplier will get.",\ - "Overdrive can score you tons of points, slay the crowd, and even save your life.",\ - "If you're going to smash a guitar on stage, make sure you have a backup first.",\ - "Jack The Ripper is dead, but I'll bet your fingers think otherwise.",\ - "If your drummer thinks he has an idea, give him a Kit Kat and let him re-think that.",\ - "Dropping your pants on-stage doesn't deploy star power.","If you're out of songs and you still have time left in your set... wrecking your gear is as good a plan as any.",\ - "Everything you need to know to be a rocker you learned in kindergarten: -A, B, C, D, E, F, G, 1, 2, 3, 4 -- be creative.",\ - "Try not to suck this time.","Sleeping with a groupie just means you did a good job.","Mind your effects switch... The Wah-Wah doesn't belong in EVERY song!","Rock On!"] - self.setlist = CustomSetlist(self) - -class CustomSetlist(Setlist): - def __init__(self, theme): - self.theme = theme - self.setlist_type = 0 - self.setlistStyle = 0 - self.headerSkip = 0 - self.footerSkip = 0 - self.labelType = 1 - self.labelDistance = 2 - self.showMoreLabels = True - self.texturedLabels = True - self.itemsPerPage = 1 - self.showLockedSongs = False - self.showSortTiers = True - self.selectTiers = False - self.itemSize = (0,.125) - - self.career_title_color = self.theme.career_title_colorVar - self.song_name_text_color = self.theme.song_name_text_colorVar - self.song_name_selected_color = self.theme.song_name_selected_colorVar - self.song_rb2_diff_color = self.theme.song_rb2_diff_colorVar - self.artist_text_color = self.theme.artist_text_colorVar - self.artist_selected_color = self.theme.artist_selected_colorVar - self.library_text_color = self.theme.library_text_colorVar - self.library_selected_color = self.theme.library_selected_colorVar - self.songlist_score_color = self.theme.songlist_score_colorVar - self.songlistcd_score_color = self.theme.songlistcd_score_colorVar - - self.song_cd_xpos = theme.song_cd_Xpos - self.song_cdscore_xpos = theme.song_cdscore_Xpos - self.song_list_xpos = theme.song_list_Xpos - self.song_listscore_xpos = theme.song_listscore_Xpos - self.song_listcd_list_xpos = theme.song_listcd_list_Xpos - self.song_listcd_cd_xpos = theme.song_listcd_cd_Xpos - self.song_listcd_cd_ypos = theme.song_listcd_cd_Ypos - self.song_listcd_score_xpos = theme.song_listcd_score_Xpos - self.song_listcd_score_ypos = theme.song_listcd_score_Ypos - - def renderUnselectedItem(self, scene, i, n): - return - - def renderSelectedItem(self, scene, n): - return - - def renderAlbumArt(self, scene): - if not scene.itemLabels: - return - w, h = scene.engine.view.geometry[2:4] - try: - glMatrixMode(GL_PROJECTION) - glPushMatrix() - glLoadIdentity() - gluPerspective(60, scene.engine.view.aspectRatio, 0.1, 1000) - - glMatrixMode(GL_MODELVIEW) - glLoadIdentity() - - glEnable(GL_DEPTH_TEST) - glDisable(GL_CULL_FACE) - glDepthMask(1) - - offset = 0 - if scene.time < 40: - offset = 10*((40 - scene.time)/40.0)**4 - scene.camera.origin = (-10 + offset, -scene.cameraOffset, 4 - self.song_cd_xpos + offset) - scene.camera.target = ( 0 + offset, -scene.cameraOffset, 2.5 - self.song_cd_xpos + offset) - scene.camera.apply() - - y = 0.0 - for i, item in enumerate(scene.items): - c = math.sin(scene.itemRenderAngles[i] * math.pi / 180) - - if isinstance(item, Song.SongInfo): - h = c * 4.0 + (1 - c) * .8 - elif isinstance(item, Song.LibraryInfo): - h = c * 4.0 + (1 - c) * 1.2 - elif isinstance(item, Song.TitleInfo) or isinstance(item, Song.SortTitleInfo): - h = c * 4.0 + (1 - c) * 2.4 - elif isinstance(item, Song.RandomSongInfo): - h = c * 4.0 + (1 - c) * .8 - else: - continue - - d = (y + h * .5 + scene.camera.origin[1]) / (4 * (scene.camera.target[2] - scene.camera.origin[2])) - if i == scene.selectedIndex: - scene.selectedOffset = y + h / 2 - self.theme.setSelectedColor() - else: - self.theme.setBaseColor() - - glTranslatef(0, -h / 2, 0) - glPushMatrix() - if abs(d) < 1.2: - label = scene.itemLabels[i] - if label == "Random": - label = scene.img_random_label - if label == False: - label = scene.img_empty_label - if isinstance(item, Song.SongInfo): - glRotate(scene.itemRenderAngles[i], 0, 0, 1) - self.renderItem(scene, item.cassetteColor, label) - elif isinstance(item, Song.LibraryInfo): - #myfingershurt: cd cases are backwards - glRotate(-scene.itemRenderAngles[i], 0, 1, 0) #spin 90 degrees around y axis - glRotate(-scene.itemRenderAngles[i], 0, 1, 0) #spin 90 degrees around y axis again, now case is corrected - glRotate(-scene.itemRenderAngles[i], 0, 0, 1) #bring cd case up for viewing - if i == scene.selectedIndex: - glRotate(((scene.time - scene.lastTime) * 4 % 360) - 90, 1, 0, 0) - self.renderLibrary(scene, item.color, label) - elif isinstance(item, Song.TitleInfo): - #myfingershurt: cd cases are backwards - glRotate(-scene.itemRenderAngles[i], 0, 0.5, 0) #spin 90 degrees around y axis - glRotate(-scene.itemRenderAngles[i], 0, 0.5, 0) #spin 90 degrees around y axis again, now case is corrected - glRotate(-scene.itemRenderAngles[i], 0, 0, 0.5) #bring cd case up for viewing - if i == scene.selectedIndex: - glRotate(((scene.time - scene.lastTime) * 4 % 360) - 90, 1, 0, 0) - self.renderTitle(scene, item.color, label) - elif isinstance(item, Song.RandomSongInfo): - #myfingershurt: cd cases are backwards - glRotate(scene.itemRenderAngles[i], 0, 0, 1) - self.renderRandom(scene, item.color, label) - glPopMatrix() - - glTranslatef(0, -h/2, 0) - y+= h - glDisable(GL_DEPTH_TEST) - glDisable(GL_CULL_FACE) - glDepthMask(0) - finally: - glMatrixMode(GL_PROJECTION) - glPopMatrix() - glMatrixMode(GL_MODELVIEW) - - def renderSelectedInfo(self, scene): - if not scene.selectedItem: - return - font = scene.engine.data.font - screenw, screenh = scene.engine.view.geometry[2:4] - v = 0 - try: - lfont = scene.engine.data.lfont - except: - lfont = font - - # here we reset the rendering... without pushing the matrices. (they be thar) - # (otherwise copying engine.view.setOrthogonalProjection) - glMatrixMode(GL_PROJECTION) - glLoadIdentity() - viewport = glGetIntegerv(GL_VIEWPORT) - w = viewport[2] - viewport[0] - h = viewport[3] - viewport[1] - h *= (float(w) / float(h)) / (4.0 / 3.0) - glOrtho(0, 1, h/w, 0, -100, 100) - glMatrixMode(GL_MODELVIEW) - glLoadIdentity() - - glEnable(GL_BLEND) - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) - glEnable(GL_COLOR_MATERIAL) - self.theme.setBaseColor(1) - - if scene.songLoader: - font.render(_("Loading Preview..."), (.05, .7), scale = 0.001) - - #x = .6 - x = self.song_cdscore_xpos - y = .15 - - self.theme.setSelectedColor(1) - - c1,c2,c3 = self.song_name_selected_color - glColor3f(c1,c2,c3) - - item = scene.selectedItem - - angle = scene.itemRenderAngles[scene.selectedIndex] - f = ((90.0 - angle) / 90.0) ** 2 - - cText = item.name - if (isinstance(item, Song.SongInfo) and item.getLocked()): - cText = _("-- Locked --") - - fh = lfont.getHeight()*0.0016 - lfont.render(cText, (x, y), scale = 0.0016) - - if isinstance(item, Song.SongInfo): - self.theme.setBaseColor(1) - - c1,c2,c3 = self.artist_selected_color - glColor3f(c1,c2,c3) - - if not item.year == "": - yeartag = ", "+item.year - else: - yeartag = "" - - cText = item.artist + yeartag - if (item.getLocked()): - cText = "" # avoid giving away artist of locked song - - # evilynux - Use font w/o outline - lfont.render(cText, (x, y+fh), scale = 0.0016) - - if item.count: - self.theme.setSelectedColor(1) - - c1,c2,c3 = self.song_name_selected_color - glColor3f(c1,c2,c3) - - count = int(item.count) - if count == 1: - text = _("Played %d time") % count - else: - text = _("Played %d times") % count - - if item.getLocked(): - text = item.getUnlockText() - elif scene.careerMode and not item.completed: - text = _("Play To Advance.") - font.render(text, (x, y+2*fh), scale = 0.001) - else: - text = _("Never Played") - if item.getLocked(): - text = item.getUnlockText() - elif scene.careerMode and not item.completed: - text = _("Play To Advance.") - lfont.render(text, (x, y+3*fh), scale = 0.001) - - self.theme.setSelectedColor(1 - v) - - c1,c2,c3 = self.songlistcd_score_color - glColor3f(c1,c2,c3) - - scale = 0.0011 - - #x = .6 - x = self.song_cdscore_xpos - y = .42 - try: - difficulties = item.partDifficulties[scene.scorePart.id] - except KeyError: - difficulties = [] - if len(difficulties) > 3: - y = .42 - elif len(difficulties) == 0: - score, stars, name = "---", 0, "---" - - for d in difficulties: - scores = item.getHighscores(d, part = scene.scorePart) - - if scores: - score, stars, name, scoreExt = scores[0] - try: - notesHit, notesTotal, noteStreak, modVersion, handicap, handicapLong, originalScore = scoreExt - except ValueError: - notesHit, notesTotal, noteStreak, modVersion, oldScores1, oldScores2 = scoreExt - handicap = 0 - handicapLong = "None" - originalScore = score - else: - score, stars, name = "---", 0, "---" - self.theme.setBaseColor(1) - font.render(Song.difficulties[d.id].text, (x, y), scale = scale) - - starscale = 0.02 - stary = 1.0 - y/scene.engine.data.fontScreenBottom - scene.engine.drawStarScore(screenw, screenh, x+.01, stary-2*fh, stars, starscale, hqStar = True) #volshebnyi - - self.theme.setSelectedColor(1) - # evilynux - Also use hit%/noteStreak SongList option - if scores: - if notesTotal != 0: - score = "%s %.1f%%" % (score, (float(notesHit) / notesTotal) * 100.0) - if noteStreak != 0: - score = "%s (%d)" % (score, noteStreak) - font.render(unicode(score), (x + .15, y), scale = scale) - font.render(name, (x + .15, y + fh), scale = scale) - y += 2 * fh - elif isinstance(item, Song.LibraryInfo): - self.theme.setBaseColor(1) - c1,c2,c3 = self.library_selected_color - - glColor3f(c1,c2,c3) - - if item.songCount == 1: - songCount = _("One Song In This Setlist") - else: - songCount = _("%d Songs In This Setlist") % item.songCount - font.render(songCount, (x, y + 3*fh), scale = 0.0016) - - elif isinstance(item, Song.RandomSongInfo): - self.theme.setBaseColor(1 - v) - - c1,c2,c3 = self.song_name_selected_color - glColor3f(c1,c2,c3) - - font.render(_("(Random Song)"), (x, y + 3*fh), scale = 0.0016) - - #MFH CD list - text = scene.scorePart.text - scale = 0.00250 - #glColor3f(1, 1, 1) - c1,c2,c3 = self.song_name_selected_color - glColor3f(c1,c2,c3) - w, h = font.getStringSize(text, scale=scale) - font.render(text, (0.95-w, 0.000), scale=scale) +##################################################################### +# -*- coding: iso-8859-1 -*- # +# # +# Frets on Fire X # +# Copyright (C) 2006 Sami Kyöstilä # +# 2008 myfingershurt # +# 2008 Blazingamer # +# 2008 evilynux # +# # +# This program is free software; you can redistribute it and/or # +# modify it under the terms of the GNU General Public License # +# as published by the Free Software Foundation; either version 2 # +# of the License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program; if not, write to the Free Software # +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # +# MA 02110-1301, USA. # +##################################################################### + +from Theme import _ +from Theme import * + +class CustomTheme(Theme): + def __init__(self, path, name, iniFile = False): + Theme.__init__(self, path, name, iniFile) + + self.menuRB = True + self.menuX = .25 + self.menuY = .70 + + self.fail_text_yPos = .4 + + self.displayAllGreyStars = False + self.sub_menu_xVar = .21 + self.sub_menu_yVar = .15 + self.menuTipTextDisplay = True + self.songSelectSubmenuX = 0.1 + self.songSelectSubmenuY = 0.075 + self.songSelectSubmenuOffsetLines = 4 + self.songSelectSubmenuOffsetSpaces = 3 + self.song_name_text_colorVar = (1,1,1) + self.songListDisplay = 0 + self.starFillupCenterX = 139 + self.starFillupCenterY = 151 + self.starFillupInRadius = 121 + self.starFillupOutRadius = 138 + self.starFillupColor = (1,.95,.37) + self.loadingPhrase = ["If you see a series of glowing white notes, hit it perfectly to gain Energy.","The louder the better!",\ + "You can buy a real guitar for pretty cheap - maybe it's time to invest.",\ + "Play flawlessly to get a score multiplier going. The longer you hold a streak, the higher your multiplier will get.",\ + "Overdrive can score you tons of points, slay the crowd, and even save your life.",\ + "If you're going to smash a guitar on stage, make sure you have a backup first.",\ + "Jack The Ripper is dead, but I'll bet your fingers think otherwise.",\ + "If your drummer thinks he has an idea, give him a Kit Kat and let him re-think that.",\ + "Dropping your pants on-stage doesn't deploy star power.","If you're out of songs and you still have time left in your set... wrecking your gear is as good a plan as any.",\ + "Everything you need to know to be a rocker you learned in kindergarten: -A, B, C, D, E, F, G, 1, 2, 3, 4 -- be creative.",\ + "Try not to suck this time.","Sleeping with a groupie just means you did a good job.","Mind your effects switch... The Wah-Wah doesn't belong in EVERY song!","Rock On!"] + self.setlist = CustomSetlist(self) + +class CustomSetlist(Setlist): + def __init__(self, theme): + self.theme = theme + self.setlist_type = 0 + self.setlistStyle = 0 + self.headerSkip = 0 + self.footerSkip = 0 + self.labelType = 1 + self.labelDistance = 2 + self.showMoreLabels = True + self.texturedLabels = True + self.itemsPerPage = 1 + self.showLockedSongs = False + self.showSortTiers = True + self.selectTiers = False + self.itemSize = (0,.125) + + self.career_title_color = self.theme.career_title_colorVar + self.song_name_text_color = self.theme.song_name_text_colorVar + self.song_name_selected_color = self.theme.song_name_selected_colorVar + self.song_rb2_diff_color = self.theme.song_rb2_diff_colorVar + self.artist_text_color = self.theme.artist_text_colorVar + self.artist_selected_color = self.theme.artist_selected_colorVar + self.library_text_color = self.theme.library_text_colorVar + self.library_selected_color = self.theme.library_selected_colorVar + self.songlist_score_color = self.theme.songlist_score_colorVar + self.songlistcd_score_color = self.theme.songlistcd_score_colorVar + + self.song_cd_xpos = theme.song_cd_Xpos + self.song_cdscore_xpos = theme.song_cdscore_Xpos + self.song_list_xpos = theme.song_list_Xpos + self.song_listscore_xpos = theme.song_listscore_Xpos + self.song_listcd_list_xpos = theme.song_listcd_list_Xpos + self.song_listcd_cd_xpos = theme.song_listcd_cd_Xpos + self.song_listcd_cd_ypos = theme.song_listcd_cd_Ypos + self.song_listcd_score_xpos = theme.song_listcd_score_Xpos + self.song_listcd_score_ypos = theme.song_listcd_score_Ypos + + def renderUnselectedItem(self, scene, i, n): + return + + def renderSelectedItem(self, scene, n): + return + + def renderAlbumArt(self, scene): + if not scene.itemLabels: + return + w, h = scene.engine.view.geometry[2:4] + try: + glMatrixMode(GL_PROJECTION) + glPushMatrix() + glLoadIdentity() + gluPerspective(60, scene.engine.view.aspectRatio, 0.1, 1000) + + glMatrixMode(GL_MODELVIEW) + glLoadIdentity() + + glEnable(GL_DEPTH_TEST) + glDisable(GL_CULL_FACE) + glDepthMask(1) + + offset = 0 + if scene.time < 40: + offset = 10*((40 - scene.time)/40.0)**4 + scene.camera.origin = (-10 + offset, -scene.cameraOffset, 4 - self.song_cd_xpos + offset) + scene.camera.target = ( 0 + offset, -scene.cameraOffset, 2.5 - self.song_cd_xpos + offset) + scene.camera.apply() + + y = 0.0 + for i, item in enumerate(scene.items): + c = math.sin(scene.itemRenderAngles[i] * math.pi / 180) + + if isinstance(item, Song.SongInfo): + h = c * 4.0 + (1 - c) * .8 + elif isinstance(item, Song.LibraryInfo): + h = c * 4.0 + (1 - c) * 1.2 + elif isinstance(item, Song.TitleInfo) or isinstance(item, Song.SortTitleInfo): + h = c * 4.0 + (1 - c) * 2.4 + elif isinstance(item, Song.RandomSongInfo): + h = c * 4.0 + (1 - c) * .8 + else: + continue + + d = (y + h * .5 + scene.camera.origin[1]) / (4 * (scene.camera.target[2] - scene.camera.origin[2])) + if i == scene.selectedIndex: + scene.selectedOffset = y + h / 2 + self.theme.setSelectedColor() + else: + self.theme.setBaseColor() + + glTranslatef(0, -h / 2, 0) + glPushMatrix() + if abs(d) < 1.2: + label = scene.itemLabels[i] + if label == "Random": + label = scene.img_random_label + if label == False: + label = scene.img_empty_label + if isinstance(item, Song.SongInfo): + glRotate(scene.itemRenderAngles[i], 0, 0, 1) + self.renderItem(scene, item.cassetteColor, label) + elif isinstance(item, Song.LibraryInfo): + #myfingershurt: cd cases are backwards + glRotate(-scene.itemRenderAngles[i], 0, 1, 0) #spin 90 degrees around y axis + glRotate(-scene.itemRenderAngles[i], 0, 1, 0) #spin 90 degrees around y axis again, now case is corrected + glRotate(-scene.itemRenderAngles[i], 0, 0, 1) #bring cd case up for viewing + if i == scene.selectedIndex: + glRotate(((scene.time - scene.lastTime) * 4 % 360) - 90, 1, 0, 0) + self.renderLibrary(scene, item.color, label) + elif isinstance(item, Song.TitleInfo): + #myfingershurt: cd cases are backwards + glRotate(-scene.itemRenderAngles[i], 0, 0.5, 0) #spin 90 degrees around y axis + glRotate(-scene.itemRenderAngles[i], 0, 0.5, 0) #spin 90 degrees around y axis again, now case is corrected + glRotate(-scene.itemRenderAngles[i], 0, 0, 0.5) #bring cd case up for viewing + if i == scene.selectedIndex: + glRotate(((scene.time - scene.lastTime) * 4 % 360) - 90, 1, 0, 0) + self.renderTitle(scene, item.color, label) + elif isinstance(item, Song.RandomSongInfo): + #myfingershurt: cd cases are backwards + glRotate(scene.itemRenderAngles[i], 0, 0, 1) + self.renderRandom(scene, item.color, label) + glPopMatrix() + + glTranslatef(0, -h/2, 0) + y+= h + glDisable(GL_DEPTH_TEST) + glDisable(GL_CULL_FACE) + glDepthMask(0) + finally: + glMatrixMode(GL_PROJECTION) + glPopMatrix() + glMatrixMode(GL_MODELVIEW) + + def renderSelectedInfo(self, scene): + if not scene.selectedItem: + return + font = scene.engine.data.font + screenw, screenh = scene.engine.view.geometry[2:4] + v = 0 + try: + lfont = scene.engine.data.lfont + except: + lfont = font + + # here we reset the rendering... without pushing the matrices. (they be thar) + # (otherwise copying engine.view.setOrthogonalProjection) + glMatrixMode(GL_PROJECTION) + glLoadIdentity() + viewport = glGetIntegerv(GL_VIEWPORT) + w = viewport[2] - viewport[0] + h = viewport[3] - viewport[1] + h *= (float(w) / float(h)) / (4.0 / 3.0) + glOrtho(0, 1, h/w, 0, -100, 100) + glMatrixMode(GL_MODELVIEW) + glLoadIdentity() + + glEnable(GL_BLEND) + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) + glEnable(GL_COLOR_MATERIAL) + self.theme.setBaseColor(1) + + if scene.songLoader: + font.render(_("Loading Preview..."), (.05, .7), scale = 0.001) + + #x = .6 + x = self.song_cdscore_xpos + y = .15 + + self.theme.setSelectedColor(1) + + c1,c2,c3 = self.song_name_selected_color + glColor3f(c1,c2,c3) + + item = scene.selectedItem + + angle = scene.itemRenderAngles[scene.selectedIndex] + f = ((90.0 - angle) / 90.0) ** 2 + + cText = item.name + if (isinstance(item, Song.SongInfo) and item.getLocked()): + cText = _("-- Locked --") + + fh = lfont.getHeight()*0.0016 + lfont.render(cText, (x, y), scale = 0.0016) + + if isinstance(item, Song.SongInfo): + self.theme.setBaseColor(1) + + c1,c2,c3 = self.artist_selected_color + glColor3f(c1,c2,c3) + + if not item.year == "": + yeartag = ", "+item.year + else: + yeartag = "" + + cText = item.artist + yeartag + if (item.getLocked()): + cText = "" # avoid giving away artist of locked song + + # evilynux - Use font w/o outline + lfont.render(cText, (x, y+fh), scale = 0.0016) + + if item.count: + self.theme.setSelectedColor(1) + + c1,c2,c3 = self.song_name_selected_color + glColor3f(c1,c2,c3) + + count = int(item.count) + if count == 1: + text = _("Played %d time") % count + else: + text = _("Played %d times") % count + + if item.getLocked(): + text = item.getUnlockText() + elif scene.careerMode and not item.completed: + text = _("Play To Advance.") + font.render(text, (x, y+2*fh), scale = 0.001) + else: + text = _("Never Played") + if item.getLocked(): + text = item.getUnlockText() + elif scene.careerMode and not item.completed: + text = _("Play To Advance.") + lfont.render(text, (x, y+3*fh), scale = 0.001) + + self.theme.setSelectedColor(1 - v) + + c1,c2,c3 = self.songlistcd_score_color + glColor3f(c1,c2,c3) + + scale = 0.0011 + + #x = .6 + x = self.song_cdscore_xpos + y = .42 + try: + difficulties = item.partDifficulties[scene.scorePart.id] + except KeyError: + difficulties = [] + if len(difficulties) > 3: + y = .42 + elif len(difficulties) == 0: + score, stars, name = "---", 0, "---" + + for d in difficulties: + scores = item.getHighscores(d, part = scene.scorePart) + + if scores: + score, stars, name, scoreExt = scores[0] + try: + notesHit, notesTotal, noteStreak, modVersion, handicap, handicapLong, originalScore = scoreExt + except ValueError: + notesHit, notesTotal, noteStreak, modVersion, oldScores1, oldScores2 = scoreExt + handicap = 0 + handicapLong = "None" + originalScore = score + else: + score, stars, name = "---", 0, "---" + self.theme.setBaseColor(1) + font.render(Song.difficulties[d.id].text, (x, y), scale = scale) + + starscale = 0.02 + stary = 1.0 - y/scene.engine.data.fontScreenBottom + scene.engine.drawStarScore(screenw, screenh, x+.01, stary-2*fh, stars, starscale, hqStar = True) #volshebnyi + + self.theme.setSelectedColor(1) + # evilynux - Also use hit%/noteStreak SongList option + if scores: + if notesTotal != 0: + score = "%s %.1f%%" % (score, (float(notesHit) / notesTotal) * 100.0) + if noteStreak != 0: + score = "%s (%d)" % (score, noteStreak) + font.render(unicode(score), (x + .15, y), scale = scale) + font.render(name, (x + .15, y + fh), scale = scale) + y += 2 * fh + elif isinstance(item, Song.LibraryInfo): + self.theme.setBaseColor(1) + c1,c2,c3 = self.library_selected_color + + glColor3f(c1,c2,c3) + + if item.songCount == 1: + songCount = _("One Song In This Setlist") + else: + songCount = _("%d Songs In This Setlist") % item.songCount + font.render(songCount, (x, y + 3*fh), scale = 0.0016) + + elif isinstance(item, Song.RandomSongInfo): + self.theme.setBaseColor(1 - v) + + c1,c2,c3 = self.song_name_selected_color + glColor3f(c1,c2,c3) + + font.render(_("(Random Song)"), (x, y + 3*fh), scale = 0.0016) + + #MFH CD list + text = scene.scorePart.text + scale = 0.00250 + #glColor3f(1, 1, 1) + c1,c2,c3 = self.song_name_selected_color + glColor3f(c1,c2,c3) + w, h = font.getStringSize(text, scale=scale) + font.render(text, (0.95-w, 0.000), scale=scale) diff --git a/data/tutorials/bangbang/song.ini b/data/tutorials/bangbang/song.ini index 4e571027c..4f55621cf 100644 --- a/data/tutorials/bangbang/song.ini +++ b/data/tutorials/bangbang/song.ini @@ -1,4 +1,4 @@ -[song] -artist = Mary Jo feat. Tommi Inkila -cassettecolor = #ff4411 +[song] +artist = Mary Jo feat. Tommi Inkila +cassettecolor = #ff4411 name = Bang Bang, Mystery Man \ No newline at end of file diff --git a/data/tutorials/drumrolls/song.ini b/data/tutorials/drumrolls/song.ini index 8ffccc815..ad885a2fd 100644 --- a/data/tutorials/drumrolls/song.ini +++ b/data/tutorials/drumrolls/song.ini @@ -1,10 +1,10 @@ -[song] -artist = Bluedude426 -name = Drum Rolls Practice -cassettecolor = #000000 -frets = Bluedude426 -delay = 0 -loading_phrase = Practice your drum rolls and Hi-Hat beats with this song. -year = 2008 -eighthnote_hopo = 0 +[song] +artist = Bluedude426 +name = Drum Rolls Practice +cassettecolor = #000000 +frets = Bluedude426 +delay = 0 +loading_phrase = Practice your drum rolls and Hi-Hat beats with this song. +year = 2008 +eighthnote_hopo = 0 lyrics = False \ No newline at end of file diff --git a/data/tutorials/drumtest/song.ini b/data/tutorials/drumtest/song.ini index d2f5af4d2..50cb7976c 100644 --- a/data/tutorials/drumtest/song.ini +++ b/data/tutorials/drumtest/song.ini @@ -1,3 +1,3 @@ -[song] -artist = Heka +[song] +artist = Heka name = Drum Test Song \ No newline at end of file diff --git a/src/scripts/module-checkOutOneGameThemeSvn-TortoiseSVN.bat b/src/scripts/module-checkOutOneGameThemeSvn-TortoiseSVN.bat index 39f0d33ec..21fad3ad6 100644 --- a/src/scripts/module-checkOutOneGameThemeSvn-TortoiseSVN.bat +++ b/src/scripts/module-checkOutOneGameThemeSvn-TortoiseSVN.bat @@ -1,11 +1,11 @@ -call backToFoFiXroot.bat -cd data\themes - -IF EXIST "%currentThemeFolder%" GOTO CheckoutDone -echo Checking out %currentThemeFolder% from %urlOfThemeSvn% ... -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:checkout /path:"%localpath%%currentThemeFolder%" /url:"%urlOfThemeSvn%" /closeonend:%CloseOnEnd% -:CheckoutDone - -cd .. -cd .. +call backToFoFiXroot.bat +cd data\themes + +IF EXIST "%currentThemeFolder%" GOTO CheckoutDone +echo Checking out %currentThemeFolder% from %urlOfThemeSvn% ... +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:checkout /path:"%localpath%%currentThemeFolder%" /url:"%urlOfThemeSvn%" /closeonend:%CloseOnEnd% +:CheckoutDone + +cd .. +cd .. cd src\scripts \ No newline at end of file diff --git a/src/scripts/module-checkOutOneGameThemeSvn-subversion.bat b/src/scripts/module-checkOutOneGameThemeSvn-subversion.bat index 6b2c9661d..5d0ff0aa5 100644 --- a/src/scripts/module-checkOutOneGameThemeSvn-subversion.bat +++ b/src/scripts/module-checkOutOneGameThemeSvn-subversion.bat @@ -1,11 +1,11 @@ -call backToFoFiXroot.bat -cd data\themes - -IF EXIST "%currentThemeFolder%" GOTO CheckoutDone -echo Checking out %currentThemeFolder% from %urlOfThemeSvn% ... -svn checkout "%urlOfThemeSvn%" "%currentThemeFolder%" -:CheckoutDone - -cd .. -cd .. +call backToFoFiXroot.bat +cd data\themes + +IF EXIST "%currentThemeFolder%" GOTO CheckoutDone +echo Checking out %currentThemeFolder% from %urlOfThemeSvn% ... +svn checkout "%urlOfThemeSvn%" "%currentThemeFolder%" +:CheckoutDone + +cd .. +cd .. cd src\scripts \ No newline at end of file diff --git a/src/scripts/module-updateAllFoFiXSVNsRelative.bat b/src/scripts/module-updateAllFoFiXSVNsRelative.bat index c4e868795..cc5589a2c 100644 --- a/src/scripts/module-updateAllFoFiXSVNsRelative.bat +++ b/src/scripts/module-updateAllFoFiXSVNsRelative.bat @@ -1,108 +1,108 @@ -echo . -echo . -echo . -echo Autocheckout of SVN themes, if script exists.... -call checkOutAllGameThemeSvns-subversion.bat - -rem cd src\scripts -rem If autocheckout script does not exist, the following will ensure we're back at the root. -rem ... if autocheckout script does exist, the following will not be found and all will be well. -call backToFoFiXroot.bat - -set TortoiseSVN=C:\Progra~1\TortoiseSVN\bin\ -set localpath=.\ - -echo . -echo . -echo . -echo Autoupdate of SVN themes, if they exist... - -echo FoFiX development trunk / HEAD revision -rem read-only SVN @ http://fofix.googlecode.com/svn/MFH-Mod/trunk/ -rem full SVN @ https://fofix.googlecode.com/svn/MFH-Mod/trunk/ -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo FoFiX wiki page source (if local copy exists...) -cd wiki -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -cd ..\data\themes - -echo RB1 / RbMFH theme by MFH - SVN @ http://svn.xp-dev.com/svn/myfingershurt-fofix-rb1-theme/ -cd Rock Band 1 -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -cd .. -echo RB1 Beta theme - SVN @ http://svn.xp-dev.com/svn/rbbeta/trunk/ -cd Rock Band 1 beta -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo RB2 theme by kid - SVN @ http://svn.xp-dev.com/svn/kristijan_mkd_RockBand2Theme/ -cd .. -cd Rock Band 2 -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo The Beatles: Rock Band by @ir15 - SVN @ http://svn.xp-dev.com/svn/TBRB/The Beatles RB Theme/ -cd .. -cd The Beatles Rock Band -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo Guitar Hero III theme by worldrave - SVN @ http://svn.xp-dev.com/svn/worldrave-guitarheroIII/ -cd .. -cd Guitar Hero III -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo Guitar Hero Aerosmith by worldrave - SVN @ http://svn.xp-dev.com/svn/worldrave-guitarhero-aerosmith/ -cd .. -cd Guitar Hero Aerosmith -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo Guitar Hero World Tour by gamexprt1 - SVN @ http://svn.xp-dev.com/svn/gamexprt1-GHWT/Guitar Hero World Tour/ -cd .. -cd Guitar Hero World Tour -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo Guitar Hero: Metallica by kid - SVN @ http://svn2.xp-dev.com/svn/kristijan_mkd-GuitarHeroMetallicaOriginal/ -cd .. -cd Guitar Hero Metallica -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo Guitar Hero: Metallica by stashincash06 - SVN @ http://svn2.xp-dev.com/svn/stashincash06-Guitar-Hero-Metallica/Guitar Hero Metallica -cd .. -cd Guitar Hero Metallica sc -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo Guitar Hero: Metallica custom by kid - SVN @ http://svn.xp-dev.com/svn/kristijan_mkd-GH-Metallica/ -cd .. -cd Guitar Hero Metallica cust -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo ....now for non-GH/RB game themes: -Rem ---------------Other (non-GH/RB game clones) themes------------------- - - -echo Geetar Hero theme by slantyr - SVN @ http://svn.xp-dev.com/svn/slantyr-GeetarHero/ -cd .. -cd Geetar Hero -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo Bioshock theme by slantyr - SVN @ http://svn.xp-dev.com/svn/slantyr-BioShock/ -cd .. -cd Bioshock -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo AC/DC theme - SVN @ http://svn2.xp-dev.com/svn/PaulTechNox-ACDC-Theme/ -cd .. -cd AC DC -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - -echo STARZ theme - SVN @ http://svn2.xp-dev.com/svn/Hazzerz-STaRZ/ -cd .. -cd Starz -START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% - - -cd .. -cd .. -rem pause - +echo . +echo . +echo . +echo Autocheckout of SVN themes, if script exists.... +call checkOutAllGameThemeSvns-subversion.bat + +rem cd src\scripts +rem If autocheckout script does not exist, the following will ensure we're back at the root. +rem ... if autocheckout script does exist, the following will not be found and all will be well. +call backToFoFiXroot.bat + +set TortoiseSVN=C:\Progra~1\TortoiseSVN\bin\ +set localpath=.\ + +echo . +echo . +echo . +echo Autoupdate of SVN themes, if they exist... + +echo FoFiX development trunk / HEAD revision +rem read-only SVN @ http://fofix.googlecode.com/svn/MFH-Mod/trunk/ +rem full SVN @ https://fofix.googlecode.com/svn/MFH-Mod/trunk/ +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo FoFiX wiki page source (if local copy exists...) +cd wiki +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +cd ..\data\themes + +echo RB1 / RbMFH theme by MFH - SVN @ http://svn.xp-dev.com/svn/myfingershurt-fofix-rb1-theme/ +cd Rock Band 1 +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +cd .. +echo RB1 Beta theme - SVN @ http://svn.xp-dev.com/svn/rbbeta/trunk/ +cd Rock Band 1 beta +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo RB2 theme by kid - SVN @ http://svn.xp-dev.com/svn/kristijan_mkd_RockBand2Theme/ +cd .. +cd Rock Band 2 +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo The Beatles: Rock Band by @ir15 - SVN @ http://svn.xp-dev.com/svn/TBRB/The Beatles RB Theme/ +cd .. +cd The Beatles Rock Band +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo Guitar Hero III theme by worldrave - SVN @ http://svn.xp-dev.com/svn/worldrave-guitarheroIII/ +cd .. +cd Guitar Hero III +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo Guitar Hero Aerosmith by worldrave - SVN @ http://svn.xp-dev.com/svn/worldrave-guitarhero-aerosmith/ +cd .. +cd Guitar Hero Aerosmith +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo Guitar Hero World Tour by gamexprt1 - SVN @ http://svn.xp-dev.com/svn/gamexprt1-GHWT/Guitar Hero World Tour/ +cd .. +cd Guitar Hero World Tour +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo Guitar Hero: Metallica by kid - SVN @ http://svn2.xp-dev.com/svn/kristijan_mkd-GuitarHeroMetallicaOriginal/ +cd .. +cd Guitar Hero Metallica +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo Guitar Hero: Metallica by stashincash06 - SVN @ http://svn2.xp-dev.com/svn/stashincash06-Guitar-Hero-Metallica/Guitar Hero Metallica +cd .. +cd Guitar Hero Metallica sc +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo Guitar Hero: Metallica custom by kid - SVN @ http://svn.xp-dev.com/svn/kristijan_mkd-GH-Metallica/ +cd .. +cd Guitar Hero Metallica cust +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo ....now for non-GH/RB game themes: +Rem ---------------Other (non-GH/RB game clones) themes------------------- + + +echo Geetar Hero theme by slantyr - SVN @ http://svn.xp-dev.com/svn/slantyr-GeetarHero/ +cd .. +cd Geetar Hero +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo Bioshock theme by slantyr - SVN @ http://svn.xp-dev.com/svn/slantyr-BioShock/ +cd .. +cd Bioshock +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo AC/DC theme - SVN @ http://svn2.xp-dev.com/svn/PaulTechNox-ACDC-Theme/ +cd .. +cd AC DC +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + +echo STARZ theme - SVN @ http://svn2.xp-dev.com/svn/Hazzerz-STaRZ/ +cd .. +cd Starz +START /WAIT %TortoiseSVN%TortoiseProc.exe /command:update /path:"%localpath%" /closeonend:%CloseOnEnd% + + +cd .. +cd .. +rem pause +