if options.sound is not None:
    g.nosound = not options.sound
if options.daynight is not None:
    g.daynight = options.daynight
if options.soundbuf is not None:
    g.soundbuf = options.soundbuf
if options.singledir is not None:
    g.singledir = options.singledir

graphics.g.ebook_mode = options.ebook

g.cheater = options.cheater
g.debug = options.debug

g.load_strings()
g.load_events()

pygame.display.set_caption("Endgame: Singularity")

#I can't use the standard image dictionary, as that requires the screen to
#be created.
if pygame.image.get_extended() == 0:
    print "Error: SDL_image required. Exiting."
    sys.exit(1)

# Initialize the screen with a dummy size.
pygame.display.set_mode(graphics.g.screen_size)

#init data:
g.init_graphics_system()
g.reinit_mixer()
if options.sound is not None:
    g.nosound = not options.sound
if options.daynight is not None:
    g.daynight = options.daynight
if options.soundbuf is not None:
    g.soundbuf = options.soundbuf
if options.singledir is not None:
    g.singledir = options.singledir

graphics.g.ebook_mode = options.ebook

g.cheater = options.cheater
g.debug = options.debug

g.load_strings()
g.load_events()

pygame.display.set_caption("Endgame: Singularity")

#I can't use the standard image dictionary, as that requires the screen to
#be created.
if pygame.image.get_extended() == 0:
    print "Error: SDL_image required. Exiting."
    sys.exit(1)

# Initialize the screen with a dummy size.
pygame.display.set_mode(graphics.g.screen_size)

#init data:
g.init_graphics_system()
g.reinit_mixer()