def Load(iWidth,iHeight): #//\==== Load From Application print "Loading main" #//\==== ReLoad Modules (to make sure they are current when reloading) reload(KEYDEFS) reload(Level) reload(AStar) reload(Dijkstras) #//\==== Set BG colour and Grid Information LMF.FrameworkBGColour(0.1,0.6,0.09,1.) global GridDimens GridDimens = [40,24,64] #//\==== Dijkstras global DijkstrasPathing DijkstrasPathing = Dijkstras.cDijkstras() global AStarPathing AStarPathing = AStar.cAStar() #//\==== Setup ScreenSize global ScreenSize ScreenSize[0] = iWidth ScreenSize[1] = iHeight global Boids Boids = [] Boids.append(boid.cBoid(CameraPos[0]+iWidth *0.5,CameraPos[1]+iHeight *0.5)) #//\==== Setup the Tile able Level global LevelGrid LevelGrid = Level.cLevelGrid({'width':GridDimens[0], 'height':GridDimens[1] , 'size':GridDimens[2] }) #//\==== center the view on the middle of the Grid and update the AIE camera CameraPos[0] = -(iWidth *0.5) + ((GridDimens[0]*GridDimens[2])*0.5 ) - (GridDimens[2]*0.5) CameraPos[1] = (iHeight*0.5) + ((GridDimens[1]*GridDimens[2])*0.5 ) - (GridDimens[2]*0.5) LMF.CameraMove(-CameraPos[0],-CameraPos[1]) print "Loaded main"