Ignore:
Timestamp:
09/03/13 20:10:38 (8 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
35643665613034333563613833393862393033346664373862333136306335656635623465323163
Message:

Reorder startup to avoid pygame init issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/area_editor.py

    r187 r195  
    358358
    359359if __name__ == "__main__":
    360     if len(sys.argv) == 2:
    361         level = EditorLevel(sys.argv[1])
    362         level.load(pymunk.Space())
    363     elif len(sys.argv) == 4:
    364         level = EditorLevel(sys.argv[1], int(sys.argv[2]), int(sys.argv[3]))
    365     else:
     360    if len(sys.argv) not in [2, 4]:
    366361        print 'Please supply a levelname or levelname and level size'
    367362        sys.exit()
     
    370365    pygame.display.set_mode((SCREEN[0] + MENU_WIDTH, SCREEN[1]),
    371366                            pgl.SWSURFACE)
     367    if len(sys.argv) == 2:
     368        level = EditorLevel(sys.argv[1])
     369        level.load(pymunk.Space())
     370    elif len(sys.argv) == 4:
     371        level = EditorLevel(sys.argv[1], int(sys.argv[2]), int(sys.argv[3]))
    372372    pygame.display.set_caption('Nagslang Area Editor')
    373373    pygame.key.set_repeat(200, 100)
Note: See TracChangeset for help on using the changeset viewer.