27 lines
628 B
Python
27 lines
628 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
|
|
|
|
# enable dev mode if --dev argument is passed
|
|
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])
|
|
|
|
game.start_game(resolution)
|
|
|
|
pygame.quit()
|
|
sys.exit()
|