__builtin__.loader = base.loader
from lib.coginvasion.globals import CIGlobals

cbm = CullBinManager.getGlobalPtr()
cbm.addBin('ground', CullBinManager.BTUnsorted, 18)
cbm.addBin('shadow', CullBinManager.BTBackToFront, 19)
cbm.addBin('gui-popup', CullBinManager.BTUnsorted, 60)
base.setBackgroundColor(CIGlobals.DefaultBackgroundColor)
base.disableMouse()
base.enableParticles()
base.camLens.setNearFar(CIGlobals.DefaultCameraNear,
                        CIGlobals.DefaultCameraFar)
base.transitions.IrisModelName = 'phase_3/models/misc/iris.bam'
base.transitions.FadeModelName = 'phase_3/models/misc/fade.bam'
base.setFrameRateMeter(False)
base.accept('f9', ScreenshotHandler.__takeScreenshot)
print 'CIStart: Setting display preferences...'
sm.applySettings(jsonfile)
if base.win == None:
    print 'CIStart: Unable to open window; aborting.'
    sys.exit()
else:
    print 'CIStart: Successfully opened window.'
ConfigVariableDouble('decompressor-step-time').setValue(0.01)
ConfigVariableDouble('extractor-step-time').setValue(0.01)
DirectGuiGlobals.setDefaultFontFunc(CIGlobals.getToonFont)
DirectGuiGlobals.setDefaultFont(CIGlobals.getToonFont())
DirectGuiGlobals.setDefaultRolloverSound(
    loader.loadSfx('phase_3/audio/sfx/GUI_rollover.ogg'))
DirectGuiGlobals.setDefaultClickSound(
    loader.loadSfx('phase_3/audio/sfx/GUI_create_toon_fwd.ogg'))
Exemple #2
0
base.graphicsEngine.setDefaultLoader(base.loader.loader)
__builtin__.loader = base.loader
from lib.coginvasion.globals import CIGlobals

cbm = CullBinManager.getGlobalPtr()
cbm.addBin("ground", CullBinManager.BTUnsorted, 18)
cbm.addBin("shadow", CullBinManager.BTBackToFront, 19)
cbm.addBin("gui-popup", CullBinManager.BTUnsorted, 60)
base.setBackgroundColor(CIGlobals.DefaultBackgroundColor)
base.disableMouse()
base.enableParticles()
base.camLens.setNearFar(CIGlobals.DefaultCameraNear, CIGlobals.DefaultCameraFar)
base.transitions.IrisModelName = "phase_3/models/misc/iris.bam"
base.transitions.FadeModelName = "phase_3/models/misc/fade.bam"
base.setFrameRateMeter(False)
base.accept("f9", base.screenshot, ["screenshots/screenshot"])
from direct.filter.CommonFilters import CommonFilters

print "CIStart: Setting display preferences..."
sm.applySettings(jsonfile)
if base.win == None:
    print "CIStart: Unable to open window; aborting."
    sys.exit()
else:
    print "CIStart: Successfully opened window."
ConfigVariableDouble("decompressor-step-time").setValue(0.01)
ConfigVariableDouble("extractor-step-time").setValue(0.01)
DirectGuiGlobals.setDefaultFontFunc(CIGlobals.getToonFont)
DirectGuiGlobals.setDefaultFont(CIGlobals.getToonFont())
DirectGuiGlobals.setDefaultRolloverSound(loader.loadSfx("phase_3/audio/sfx/GUI_rollover.mp3"))
DirectGuiGlobals.setDefaultClickSound(loader.loadSfx("phase_3/audio/sfx/GUI_create_toon_fwd.mp3"))