28 lines
670 B
Python
28 lines
670 B
Python
"""
|
|
Launch script for Pocket Friends.
|
|
"""
|
|
import os
|
|
import pygame
|
|
import sys
|
|
from pathlib import Path
|
|
import pocket_friends.game as game
|
|
|
|
if __name__ == '__main__':
|
|
enable_dev = False
|
|
resolution = 240
|
|
|
|
if len(sys.argv) > 0:
|
|
for arg in sys.argv:
|
|
if arg == '--delete-save':
|
|
save_dir = os.path.join(Path.home(), '.pocket_friends')
|
|
os.remove(save_dir + '/save.json')
|
|
if '--res=' in arg:
|
|
resolution = int(arg.split('=')[1])
|
|
if arg == '--dev':
|
|
enable_dev = True
|
|
|
|
game.start_game(resolution=resolution, dev=enable_dev)
|
|
|
|
pygame.quit()
|
|
sys.exit()
|