X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2F__main__.py;h=70330cbbd82173d8184a4095184ae82e468676d0;hb=2a46865fc69e2e90e28bc13255a762279e7a1b29;hp=a4f4aa3204b90ca06b21cfe7af6aca09f4a13ae1;hpb=39f49f9579bdee2ad449246d1370a0be27186ed9;p=naja.git diff --git a/naja/__main__.py b/naja/__main__.py index a4f4aa3..70330cb 100644 --- a/naja/__main__.py +++ b/naja/__main__.py @@ -1,14 +1,32 @@ import sys import pygame +import pygame.locals as pgl +from naja.constants import SCREEN +from naja.engine import Engine +from naja.sound import sound from naja.options import parse_args +from naja.scenes.menu import MenuScene +from naja.gamestate import GameState def main(): - '''Launch the nagslang''' + '''Launch the naja''' parse_args(sys.argv) pygame.display.init() pygame.font.init() - raise NotImplementedError("Sorry, we haven't written a game yet.") + pygame.display.set_mode(SCREEN, pgl.SWSURFACE) + pygame.display.set_caption('Naja') + sound.init() + + screen = pygame.display.get_surface() + state = GameState() + scene = MenuScene(state) + engine = Engine(screen, scene, state) + engine.run() + + +if __name__ == '__main__': + main()