4 import pygame.locals as pgl
6 from naja.constants import SCREEN
7 from naja.engine import Engine
8 from naja.sound import sound
9 from naja.options import parse_args
10 from naja.resources.loader import Loader
11 from naja.scenes.menu import MenuScene
20 # set_icon needs to be called before set_mode on some platforms, but we
21 # can't use convert_alpha until we've created a window with set_mode
23 r.CONVERT_ALPHA = False
24 icon_filename = 'robot_24.png'
25 # OSX accepts big icons, but scales up small icons smoothly
26 if sys.platform == 'darwin':
27 icon_filename = 'robot_512.png'
28 pygame.display.set_icon(r.get_image(icon_filename, basedir='icons'))
30 pygame.display.set_mode(SCREEN, pgl.SWSURFACE)
31 pygame.display.set_caption('Robolock II')
34 screen = pygame.display.get_surface()
35 scene = MenuScene(None)
36 engine = Engine(screen, scene, None)
40 if __name__ == '__main__':