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:
|
||||
GL = 0
|
||||
DX7 = 1
|
||||
DX8 = 5
|
||||
|
||||
@staticmethod
|
||||
def readSettings():
|
||||
pass # todo
|
||||
|
|
|
@ -9,7 +9,7 @@ from direct.distributed import ClockDelta
|
|||
from otp.avatar.ShadowCaster import ShadowCaster
|
||||
import random
|
||||
from otp.otpbase import OTPRender
|
||||
from direct.showbase.PythonUtil import recordCreationStack
|
||||
from otp.otpbase.PythonUtil import recordCreationStack
|
||||
teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport')
|
||||
teleportNotify.showTime = True
|
||||
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 libotp import Settings
|
||||
import ShtikerPage
|
||||
from toontown.toontowngui import TTDialog
|
||||
from direct.gui.DirectGui import *
|
||||
|
|
|
@ -3,7 +3,8 @@ import string
|
|||
import os
|
||||
import sys
|
||||
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.otpbase import OTPGlobals
|
||||
from otp.otpbase import OTPRender
|
||||
|
|
Loading…
Reference in a new issue