View | Details | Raw Unified
Collapse All | Expand All

(-) 4stAttack-2.1.4/4stattack.py (-9 / +12 lines)
 Lines 28-33    Link Here 
images	= None
images	= None
screen	= None
screen	= None
f = os.path.expanduser('~/.4stattackrc')
if not os.path.exists(f):
    os.system('cp /usr/share/games/4stattack/settings.ini %s' % f)
def playMusic(datadir):
def playMusic(datadir):
	if pygame.mixer.get_init():
	if pygame.mixer.get_init():
 Lines 49-59    Link Here 
		screen = pygame.display.set_mode(resolution, FULLSCREEN)
		screen = pygame.display.set_mode(resolution, FULLSCREEN)
	else:
	else:
		screen = pygame.display.set_mode(resolution)
		screen = pygame.display.set_mode(resolution)
	
	pygame.display.set_caption('4st Attack 2')
	pygame.display.set_caption('4st Attack 2')
	pygame.mouse.set_visible(1)
	pygame.mouse.set_visible(1)
	pygame.display.init()
	pygame.display.init()
	
	pygame.display.Info()
	pygame.display.Info()
	return screen
	return screen
 Lines 72-92    Link Here 
	pygame.quit()
	pygame.quit()
	os._exit(0)
	os._exit(0)
def main():                    
def main():
	options = getOptions(sys.argv)
	options = getOptions(sys.argv)
	
	if options.has_key('-ini'):
	if options.has_key('-ini'):
		ini_settings = IniSettings(options['-ini'])
		ini_settings = IniSettings(options['-ini'])
	else:
	else:
		ini_settings = IniSettings('settings.ini')
		ini_settings = IniSettings(os.path.expanduser('~/.4stattackrc'))
	
	settings = ini_settings.settings
	settings = ini_settings.settings
	
	datadir = settings['path']['data']
	datadir = settings['path']['data']
	
	if settings['sound']['music'] == 'yes':
	if settings['sound']['music'] == 'yes':
		playMusic(datadir)
		playMusic(datadir)
	
	resolution = settings['video']['resolution']
	resolution = settings['video']['resolution']
	res = string.split(resolution, 'x')
	res = string.split(resolution, 'x')
	screen = setDisplay((int(res[0]), int(res[1])), settings['video']['fullscreen'])
	screen = setDisplay((int(res[0]), int(res[1])), settings['video']['fullscreen'])