Skip to content

Commit

Permalink
Style tweaks per Linkid's review.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrzwicky committed Oct 10, 2017
1 parent 919e61f commit fc8a0ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
15 changes: 8 additions & 7 deletions fofix/core/GameEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def quit(self):

class GameEngine(object):
"""The main game engine."""

def __init__(self, config = None):

log.debug("GameEngine class init (GameEngine.py)...")
Expand Down Expand Up @@ -181,7 +182,7 @@ def __init__(self, config = None):

self.tutorialFolder = "tutorials"

if not config:
if config is None:
config = Config.load()

self.config = config
Expand Down Expand Up @@ -358,21 +359,21 @@ def __init__(self, config = None):
log.warn("No stages\ folder found, forcing None setting for Animated Stage.")
self.config.set("game","animated_stage_folder", "None") #MFH: force "None" when Stages folder can't be found

# Create theme manager
self.theme = None
try:
self.theme = None
fp, pathname, description = imp.find_module("CustomTheme",[themepath])
try:
theme = imp.load_module("CustomTheme", fp, pathname, description)
self.theme = theme.CustomTheme(themepath, themename)
except ImportError as e:
# Unable to load module; log it, but continue with default Theme.
log.error("Failed to load CustomTheme.py from %s" % pathname)
#self.theme = Theme(themepath, themename)
except ImportError:
# Not found; but that's OK. We'll use the default Theme class.
pass #self.theme = Theme(themepath, themename)
# CustomTheme is optional; no need to complain.
pass

if not self.theme:
if self.theme is None:
self.theme = Theme(themepath, themename)
self.task.addTask(self.theme)

Expand Down Expand Up @@ -482,7 +483,7 @@ def drawStarScore(self, screenwidth, screenheight, xpos, ypos, stars, scale = No
minScale = 0.02
w = screenwidth
h = screenheight
if not scale:
if scale is None:
scale = minScale
elif scale < minScale:
scale = minScale
Expand Down
9 changes: 4 additions & 5 deletions fofix/game/guitarscene/instruments/Drum.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ def __init__(self, engine, playerObj, scene, player = 0):
self.isBassGuitar = False
self.isVocal = False

# Drum game has 4 lanes for the regular drums; bass is handled specially.
self.strings = 4
"""Drum game has 4 lanes for the regular drums; bass is handled specially."""
# Undocumented; maybe total number of buttons?
self.strings2 = 5
"""Undocumented; maybe total number of buttons?"""

self.lanenumber = float(self.strings)
# (misnamed) Number of *rows* in the fret texture atlas
self.fretImgColNumber = float(6)
"""(misnamed) Number of *rows* in the fret texture atlas"""

# GuitarScene sets these to 100; we decrement them every tick.
self.drumsHeldDown = [0, 0, 0, 0, 0]
"""GuitarScene sets these to 100; we decrement them every tick."""

self.gameMode2p = self.engine.world.multiMode

Expand Down Expand Up @@ -602,7 +602,6 @@ def renderFreestyleFlames(self, visibility, controls):
self.freestyleHitFlameCounts[fretNum] = 0 #MFH



def render(self, visibility, song, pos, controls, killswitch):

if shaders.turnon:
Expand Down

0 comments on commit fc8a0ac

Please sign in to comment.