general: more loading progress
This commit is contained in:
parent
b339c4d484
commit
27bd82aa36
5 changed files with 29 additions and 2 deletions
|
@ -1,4 +1,8 @@
|
||||||
class Settings:
|
class Settings:
|
||||||
|
GL = 0
|
||||||
|
DX7 = 1
|
||||||
|
DX8 = 5
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def readSettings():
|
def readSettings():
|
||||||
pass # todo
|
pass # todo
|
||||||
|
|
|
@ -9,7 +9,7 @@ from direct.distributed import ClockDelta
|
||||||
from otp.avatar.ShadowCaster import ShadowCaster
|
from otp.avatar.ShadowCaster import ShadowCaster
|
||||||
import random
|
import random
|
||||||
from otp.otpbase import OTPRender
|
from otp.otpbase import OTPRender
|
||||||
from direct.showbase.PythonUtil import recordCreationStack
|
from otp.otpbase.PythonUtil import recordCreationStack
|
||||||
teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport')
|
teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport')
|
||||||
teleportNotify.showTime = True
|
teleportNotify.showTime = True
|
||||||
if config.GetBool('want-teleport-debug', 1):
|
if config.GetBool('want-teleport-debug', 1):
|
||||||
|
|
21
otp/otpbase/PythonUtil.py
Normal file
21
otp/otpbase/PythonUtil.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# class 'decorator' that records the stack at the time of creation
|
||||||
|
# be careful with this, it creates a StackTrace, and that can take a
|
||||||
|
# lot of CPU
|
||||||
|
def recordCreationStack(cls):
|
||||||
|
if not hasattr(cls, '__init__'):
|
||||||
|
raise 'recordCreationStack: class \'%s\' must define __init__' % cls.__name__
|
||||||
|
cls.__moved_init__ = cls.__init__
|
||||||
|
def __recordCreationStack_init__(self, *args, **kArgs):
|
||||||
|
self._creationStackTrace = StackTrace(start=1)
|
||||||
|
return self.__moved_init__(*args, **kArgs)
|
||||||
|
def getCreationStackTrace(self):
|
||||||
|
return self._creationStackTrace
|
||||||
|
def getCreationStackTraceCompactStr(self):
|
||||||
|
return self._creationStackTrace.compact()
|
||||||
|
def printCreationStackTrace(self):
|
||||||
|
print self._creationStackTrace
|
||||||
|
cls.__init__ = __recordCreationStack_init__
|
||||||
|
cls.getCreationStackTrace = getCreationStackTrace
|
||||||
|
cls.getCreationStackTraceCompactStr = getCreationStackTraceCompactStr
|
||||||
|
cls.printCreationStackTrace = printCreationStackTrace
|
||||||
|
return cls
|
|
@ -1,4 +1,5 @@
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
|
from libotp import Settings
|
||||||
import ShtikerPage
|
import ShtikerPage
|
||||||
from toontown.toontowngui import TTDialog
|
from toontown.toontowngui import TTDialog
|
||||||
from direct.gui.DirectGui import *
|
from direct.gui.DirectGui import *
|
||||||
|
|
|
@ -3,7 +3,8 @@ import string
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import datetime
|
import datetime
|
||||||
from pandac.PandaModules import loadPrcFileData, Settings, WindowProperties
|
from pandac.PandaModules import loadPrcFileData, WindowProperties
|
||||||
|
from libotp import Settings
|
||||||
from otp.otpgui import OTPDialog
|
from otp.otpgui import OTPDialog
|
||||||
from otp.otpbase import OTPGlobals
|
from otp.otpbase import OTPGlobals
|
||||||
from otp.otpbase import OTPRender
|
from otp.otpbase import OTPRender
|
||||||
|
|
Loading…
Reference in a new issue