Skip to content

Commit

Permalink
Make 3D billboarding of notes optional
Browse files Browse the repository at this point in the history
  • Loading branch information
erodozer committed Dec 26, 2011
1 parent df46237 commit 8b12b09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Instrument.py
Expand Up @@ -263,11 +263,12 @@ def __init__(self, engine, playerObj, player = 0):
self.freestyleEnabled = True

#blazingamer
self.nstype = self.engine.config.get("game", "nstype")
self.twoDnote = self.engine.theme.twoDnote
self.twoDkeys = self.engine.theme.twoDkeys
self.threeDspin = self.engine.theme.threeDspin
self.noterotate = self.engine.config.get("coffee", "noterotate")
self.nstype = self.engine.config.get("game", "nstype") #neck style
self.twoDnote = self.engine.theme.twoDnote #note style (2D or 3D)
self.twoDkeys = self.engine.theme.twoDkeys #key style
self.threeDspin = self.engine.theme.threeDspin #3d notes spin when they are star power notes
self.noterotate = self.engine.config.get("coffee", "noterotate") #adjust notes for if they were designed for FoF 1.1 or 1.2
self.billboardNote = self.engine.theme.billboardNote #3D notes follow the angle of the camera

#MFH- fixing neck speed
if self.nstype < 3: #not constant mode:
Expand Down Expand Up @@ -1076,7 +1077,8 @@ def renderFlames(self, song, pos):

#group rendering of 2D notes into method
def render3DNote(self, texture, model, color, isTappable):
glRotatef(self.camAngle + 90, 1, 0, 0)
if (self.billboardNote):
glRotatef(self.camAngle + 90, 1, 0, 0)
if texture:
glColor3f(1,1,1)
glEnable(GL_TEXTURE_2D)
Expand Down
5 changes: 5 additions & 0 deletions src/Theme.py
Expand Up @@ -632,8 +632,10 @@ def get(value, type = str, default = None):
self.twoDnote = get("twoDnote", bool, True)
self.twoDkeys = get("twoDkeys", bool, True)

#3D notes spin when they are star power notes
self.threeDspin = get("threeDspin", bool, False)

#configure rotation and positioning along the neck for the 3d objects scrolling down
self.noterot = [get("noterot"+str(i+1), float, 0) for i in range(5)]
self.keyrot = [get("keyrot"+str(i+1), float, 0) for i in range(5)]
self.drumnoterot = [get("drumnoterot"+str(i+1), float, 0) for i in range(5)]
Expand All @@ -643,6 +645,9 @@ def get(value, type = str, default = None):
self.drumnotepos = [get("drumnotepos"+str(i+1), float, 0) for i in range(5)]
self.drumkeypos = [get("drumkeypos"+str(i+1), float, 0) for i in range(5)]

#3D setting for making the notes always face the camera
self.billboardNote = get("billboardNote", bool, True)

self.shaderSolocolor = get("shaderSoloColor", "color", "#0000FF")

#In-game rendering
Expand Down

0 comments on commit 8b12b09

Please sign in to comment.