Skip to content

Commit

Permalink
Remove some completely pointless code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsitton committed Jan 6, 2014
1 parent 747972a commit cbf6596
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/core/Data.py
Expand Up @@ -388,7 +388,7 @@ def loadSyncsounds(self):
def checkImgDrawing(self, fileName):
return self.getImgDrawing(fileName, False)

def getImgDrawing(self, fileName, openImage=True, dirLoad=False):
def getImgDrawing(self, fileName, openImage=True):
imgDrawing = None
for dataPath in self.resource.dataPaths:
fileName1 = os.path.join(dataPath, fileName)
Expand Down Expand Up @@ -423,12 +423,11 @@ def getImgDrawing(self, fileName, openImage=True, dirLoad=False):
elif len(files) > 0:
return True
#image not found
log = self.logImageNotFound - (dirLoad and 1 or 0)
if log > 0:
if self.logImageNotFound:
Log.debug("Image not found: %s" % fileName)
return False

def loadImgDrawing(self, target, name, fileName, textureSize = None, dirLoad = False):
def loadImgDrawing(self, target, name, fileName, textureSize = None):
"""
Load an SVG drawing synchronously.
Expand All @@ -439,7 +438,7 @@ def loadImgDrawing(self, target, name, fileName, textureSize = None, dirLoad = F
be rendered to an x by y texture
@return: L{ImgDrawing} instance
"""
imgDrawing = self.getImgDrawing(fileName, dirLoad = dirLoad)
imgDrawing = self.getImgDrawing(fileName)
if not imgDrawing:
if target and name:
setattr(target, name, None)
Expand Down Expand Up @@ -474,7 +473,7 @@ def loadAllImages(self, target, directory, prefix = "img_", textureSize = None):
continue
name = os.path.splitext(file)[0]
name = prefix+name
img = self.loadImgDrawing(target, name, os.path.join(directory, file), textureSize, dirLoad = True)
img = self.loadImgDrawing(target, name, os.path.join(directory, file), textureSize)
if img and target is None:
imgDict[name] = img
if target is None and len(imgDict) > 0:
Expand Down

0 comments on commit cbf6596

Please sign in to comment.