Example #1
0
    def startup(self):
        sylphis.CClient.startup_c(self)
        self.actors = actor.CActors(self)
        
        # Create the hud
        self.hud = hudbase.CHUDBase()
        
        # Register the console to the global 
        # Sylphis console
        import ui
        e = CEngine
        #e.renderer.setMotionBlurAmount(0.3)
        e.con.addConsole(ui.con)
        self.dFont = CEngine.getDefaultFont()

        # Load map fire requested by command line arguments
        map = cmdline.getParamValue('map')
        if map != None:
            self.loadMap("maps/" + map)
        else:
            pyui.activate()
           
        self.inputListener = CClientInput()
        CEngine.getInput().addListener(self.inputListener)

        self.faderShader = CEngine.mMaterials.registerMaterial('fader')
        self.glareShader = CEngine.mMaterials.registerMaterial('glare')
        self.oldFilmGlare = CEngine.mMaterials.registerMaterial('oldfilmglare')
        self.oldFilm = CEngine.mMaterials.registerMaterial('oldfilm')
        self.motionBlur = CEngine.mMaterials.registerMaterial('motionblur')
        
        self.bufferA = CEngine.mMaterials.registerMaterial('bufferA')
        self.bufferAb = CEngine.mMaterials.registerMaterial('bufferAb')

        self.timeLeft = 300.0
        
        mthread.parallelize(self.updateHudTime)
Example #2
0
    def startup(self):
        sylphis.CClient.startup_c(self)
        self.actors = actor.CActors(self)

        # Create the hud
        self.hud = hudbase.CHUDBase()

        # Register the console to the global
        # Sylphis console
        import ui
        e = CEngine
        #e.renderer.setMotionBlurAmount(0.3)
        e.con.addConsole(ui.con)
        self.dFont = CEngine.getDefaultFont()

        # Load map fire requested by command line arguments
        map = cmdline.getParamValue('map')
        if map != None:
            self.loadMap("maps/" + map)
        else:
            pyui.activate()

        self.inputListener = CClientInput()
        CEngine.getInput().addListener(self.inputListener)

        self.faderShader = CEngine.mMaterials.registerMaterial('fader')
        self.glareShader = CEngine.mMaterials.registerMaterial('glare')
        self.oldFilmGlare = CEngine.mMaterials.registerMaterial('oldfilmglare')
        self.oldFilm = CEngine.mMaterials.registerMaterial('oldfilm')
        self.motionBlur = CEngine.mMaterials.registerMaterial('motionblur')

        self.bufferA = CEngine.mMaterials.registerMaterial('bufferA')
        self.bufferAb = CEngine.mMaterials.registerMaterial('bufferAb')

        self.timeLeft = 300.0

        mthread.parallelize(self.updateHudTime)
Example #3
0
import sylphis

import configfile
import cmdline

res = configfile.gCfgFile.r_videomode
if res == 2:
    pyui.init(800, 600)
elif res == 3:
    pyui.init(1024, 768)
elif res == 4:
    pyui.init(1152, 864)
elif res == 5:
    pyui.init(1280, 1024)
else:
    pyui.init(640, 480)

from menus import menubar

con = console.CConsole(30, 30, 480, 300)
con.show = 0

if hasattr(configfile.gCfgFile, "startup_dialog"):
    try:
        if cmdline.getParamValue("map") is None:
            st = getObject(configfile.gCfgFile.startup_dialog)
            st.doModal()
            pyui.activate()
    except AttributeError:
        print "WARNING : '" + configfile.gCfgFile.startup_dialog + "' not found!"
Example #4
0
import sylphis

import configfile
import cmdline

res = configfile.gCfgFile.r_videomode
if res == 2:
    pyui.init(800, 600)
elif res == 3:
    pyui.init(1024, 768)
elif res == 4:
    pyui.init(1152, 864)
elif res == 5:
    pyui.init(1280, 1024)
else:
    pyui.init(640, 480)

from menus import menubar

con = console.CConsole(30, 30, 480, 300)
con.show = 0

if hasattr(configfile.gCfgFile, 'startup_dialog'):
    try:
        if cmdline.getParamValue('map') is None:
            st = getObject(configfile.gCfgFile.startup_dialog)
            st.doModal()
            pyui.activate()
    except AttributeError:
        print "WARNING : '" + configfile.gCfgFile.startup_dialog + "' not found!"