#!/usr/bin/env python

version = "1.0"

import sys

# Set X terminal title
sys.stdout.write("\033]0;Downward Motion %s\007" % version)

print "Downward Motion %s, Copyright (C) 2003  Morten Hustveit" % version
print ""
print "This program is free software; you can redistribute it and/or modify"
print "it under the terms of the GNU General Public License as published by"
print "the Free Software Foundation; either version 2 of the License, or"
print "(at your option) any later version."
print ""

# Import all classes from Empty Space (the list is too long to bother
# specifying all explicitly).
from espace import *

# Enable a default set of commands, including, but not limited to
# "bind", "set" and "quit".
API.initialize()

# Load video, audio and control configuration
from settings import Settings
Settings.initialize()

# Loads all plugins found by previous calls to File.readDirectory().
Plugin.initialize()

# Scan the data file tree.  A list of all files is needed to get case
# insensitivity on file names.
File.readDirectory("./share")

# Enable the "eval" command, which executes Python statements.
API.pythonInitialize()

# Perform operating system and window system specific initialization.
System.initialize()

GL.initialize()

Sound.initialize()

# Parse shader files (scripts/*.shader)
Shader.initialize()

# Set default render parameters
Shader.setDefaults()

import effects
effects.init()

import powerups
powerups.init()

import weapons
weapons.Blaster.init()
weapons.RocketLauncher.init()
weapons.Storm.init()
weapons.RailGun.init()

import enemies
enemies.init()

import intro
intro.play()

