formatting

This commit is contained in:
Dave Schuyler 2006-03-17 21:54:41 +00:00
parent 26ea29157c
commit 0574017d72
7 changed files with 29 additions and 29 deletions

View File

@ -30,7 +30,7 @@ CLUSTER_DAEMON_PORT = 8001
# Note, this startup string obviates the need to set any cluster related
# config variables in the client Configrc files
SERVER_STARTUP_STRING = (
'!bash ppython -c ' +
'!bash ppython -c ' +
'"import __builtin__; ' +
'__builtin__.clusterMode = \'server\';' +
'__builtin__.clusterServerPort = %s;' +
@ -93,7 +93,7 @@ class ClusterMsgHandler:
number = dgi.getUint32()
type = dgi.getUint8()
self.notify.debug("Packet %d type %d received" % (number, type))
return (dgi, type)
return (dgi, type)
def makeCamOffsetDatagram(self, xyz, hpr):
datagram = PyDatagram()
@ -211,7 +211,7 @@ class ClusterMsgHandler:
self.packetNumber = self.packetNumber + 1
datagram.addUint8(CLUSTER_SWAP_NOW)
return datagram
def makeSwapReadyDatagram(self):
datagram = PyDatagram()
datagram.addUint32(self.packetNumber)
@ -225,7 +225,7 @@ class ClusterMsgHandler:
self.packetNumber = self.packetNumber + 1
datagram.addUint8(CLUSTER_EXIT)
return datagram
def makeTimeDataDatagram(self, frameCount, frameTime, dt):
datagram = PyDatagram()
datagram.addUint32(self.packetNumber)

View File

@ -38,7 +38,7 @@ class DirectFastrak(DirectObject):
# Spawn update task
self.updateFunc = self.fastrakUpdate
self.enable()
def enable(self):
# Kill existing task
self.disable()
@ -46,7 +46,7 @@ class DirectFastrak(DirectObject):
self.tracker = direct.deviceManager.createTracker(self.device)
# Update task
taskMgr.add(self.updateTask, self.name + '-updateTask')
def disable(self):
taskMgr.remove(self.name + '-updateTask')
@ -65,4 +65,4 @@ class DirectFastrak(DirectObject):
3.280839895013123 * pos[1],
3.280839895013123 * pos[0])
self.notify.debug("Tracker(%d) Pos = %s" % (self.deviceNo, `self.trackerPos`))

View File

@ -77,7 +77,7 @@ class DirectJoybox(DirectObject):
self.addButtonEvents()
# Spawn update task
self.enable()
def enable(self):
# Kill existing task
self.disable()
@ -86,7 +86,7 @@ class DirectJoybox(DirectObject):
self.acceptUprightCameraEvent()
# Update task
taskMgr.add(self.updateTask, self.name + '-updateTask')
def disable(self):
taskMgr.remove(self.name + '-updateTask')
# Ignore button events
@ -105,7 +105,7 @@ class DirectJoybox(DirectObject):
i, self.breg.getButton(self.getEventName(i)))
self.eventThrower = self.buttons.getNodePath().attachNewNode(
ButtonThrower('JB Button Thrower'))
def setNodePath(self, nodePath):
self.nodePath = nodePath
@ -132,7 +132,7 @@ class DirectJoybox(DirectObject):
self.updateVals()
self.updateFunc()
return Task.cont
def updateVals(self):
# Update delta time
cTime = globalClock.getFrameTime()
@ -148,7 +148,7 @@ class DirectJoybox(DirectObject):
except IndexError:
# That channel may not have been updated yet
self.bList[i] = 0
def updateValsUnrolled(self):
# Update delta time
cTime = globalClock.getFrameTime()
@ -175,12 +175,12 @@ class DirectJoybox(DirectObject):
except IndexError:
# That channel may not have been updated yet
self.bList[i] = 0
def acceptSwitchModeEvent(self, button = R_UPPER):
self.accept(self.getEventName(button), self.switchMode)
def ignoreSwitchModeEvent(self, button = R_UPPER):
self.ignore(self.getEventName(button))
def switchMode(self):
try:
# Get current mode
@ -214,7 +214,7 @@ class DirectJoybox(DirectObject):
self.modeName = name
self.showMode(self.modeName)
self.enable()
def joyboxFly(self):
# Do nothing if no nodePath selected
if self.nodePath == None:
@ -423,4 +423,4 @@ class DirectJoybox(DirectObject):
except IndexError:
return 0.0

View File

@ -20,7 +20,7 @@ RAD_FOCUS = 3
class DirectRadamec(DirectObject):
radamecCount = 0
notify = DirectNotifyGlobal.directNotify.newCategory('DirectRadamec')
def __init__(self, device = 'Analog0', nodePath = direct.camera):
# See if device manager has been initialized
if direct.deviceManager == None:
@ -33,7 +33,7 @@ class DirectRadamec(DirectObject):
self.analogs = direct.deviceManager.createAnalogs(self.device)
self.numAnalogs = len(self.analogs)
self.aList = [0, 0, 0, 0, 0, 0, 0, 0]
# Radamec device max/mins
# Radamec device max/mins
# Note: These values change quite often, i.e. everytime
# you unplug the radamec cords, or jostle them too
# much. For best results, re-record these values often.
@ -41,13 +41,13 @@ class DirectRadamec(DirectObject):
self.maxRange = [180.0, 90, 547074.0, 533984.0]
# Spawn update task
self.enable()
def enable(self):
# Kill existing task
self.disable()
# Update task
taskMgr.add(self.updateTask, self.name + '-updateTask')
def disable(self):
taskMgr.remove(self.name + '-updateTask')
@ -59,7 +59,7 @@ class DirectRadamec(DirectObject):
for i in range(len(self.analogs)):
self.aList[i] = self.analogs.getControlState(i)
return Task.cont
def radamecDebug(self):
panVal = self.normalizeChannel(RAD_PAN, -180, 180)
tiltVal = self.normalizeChannel(RAD_TILT, -90, 90)

View File

@ -45,7 +45,7 @@
# for both interrogate databases and python parse trees.
#
# * The HTML generator.
#
#
########################################################################
import os, sys, parser, symbol, token, types, re
@ -233,7 +233,7 @@ class InterrogateType:
self.methods = parseInterrogateIntVec(tokzr)
self.casts = parseInterrogateIntVec(tokzr)
self.derivations = []
nderivations = tokzr.readint()
nderivations = tokzr.readint()
for i in range(nderivations):
self.derivations.append(InterrogateDerivation(tokzr))
self.enumvalues = []
@ -400,7 +400,7 @@ class ParseTreeInfo:
vars
Dictionary of variables which have already been found. If not
provided, an empty dictionary is created.
The `pattern' value may contain variables of the form ['varname']
which are allowed to parseTreeMatch anything. The value that is
parseTreeMatched is returned as part of a dictionary which maps
@ -473,8 +473,8 @@ class ParseTreeInfo:
# - a list of InterrogateDatabase objects representing C++ modules.
# - a list of ParseTreeInfo objects representing python modules.
#
# Collectively, these make up all the data about all the code.
#
# Collectively, these make up all the data about all the code.
#
########################################################################
class CodeDatabase:
@ -632,7 +632,7 @@ CLASS_RENAME_DICT = {
"Planed": "PlaneD",
"Frustum": "FrustumBase",
"Frustumf": "Frustum",
"Frustumd": "FrustumD"
"Frustumd": "FrustumD"
}

View File

@ -115,7 +115,7 @@ def PrintFileStatus(label, file):
print "%-15s: %s"%(label, file)
else:
print "%-15s: %s (MISSING)"%(label, file)
PrintFileStatus("Game", GAME)
print "%-15s: %s"%("Name", NAME)
print "%-15s: %s"%("Start Menu", SMDIRECTORY)

View File

@ -226,7 +226,7 @@ class DirectCameraControl(DirectObject):
if (hasattr(direct.camera.node(), "getLens") and
direct.camera.node().getLens().__class__.__name__ == "OrthographicLens"):
return
if direct.fControl:
moveDir = Vec3(self.coaMarker.getPos(direct.camera))
# If marker is behind camera invert vector