Mercurial > atc
changeset 36:800a6d7fae8f
Created weather management stub
author | Josef "Jeff" Sipek <jeffpc@optonline.net> |
---|---|
date | Thu, 18 Aug 2005 00:24:30 -0500 |
parents | c0c52fb4a7fd |
children | faadd33178ba |
files | atc_game.py atc_weather.py |
diffstat | 2 files changed, 54 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/atc_game.py Thu Aug 18 00:14:13 2005 -0500 +++ b/atc_game.py Thu Aug 18 00:24:30 2005 -0500 @@ -27,6 +27,7 @@ import atc_utils import atc_plane import atc_message +import atc_weather from atc_maps import * @@ -67,6 +68,8 @@ pygame.display.flip() self.planes = [atc_plane.Plane(callsign="N12422",flightno="Delta 79",vel=(50, 50, 10)),] + + self.weather = atc_weather.Weather() self.mess = atc_message.Message() @@ -210,7 +213,8 @@ def run(self): if not self.__proc_events(): return False - + + # planes self.screen_planes.fill(atc_colors.transparent) for plane in self.planes: plane.display(self.screen_planes) @@ -219,12 +223,18 @@ mess.write(self.screen_planes, plane.callsign + ": PLANE CRASHED") plane.status = atc_plane.plane_DEAD + # weather + self.weather.display(self.screen_weather) + self.weather.update() + + # command self.screen_cmd.fill(atc_colors.transparent) if (self.cmd): font = pygame.font.Font(None, 18) text = font.render(self.cmd, 1, atc_colors.white) self.screen_cmd.blit(text, (25, 735)) + # blit what's needed self.screen.blit(self.screen_void, (0, 0)) if (self.displays["map"]): self.screen.blit(self.screen_map, (0, 0))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/atc_weather.py Thu Aug 18 00:24:30 2005 -0500 @@ -0,0 +1,43 @@ +#/* +# * ATC - Air Traffic Controller simulation game +# * +# * Copyright (C) 2005 Josef "Jeff" Sipek <jeffpc@optonline.net> +# * +# * This program is free software; you can redistribute it and/or modify +# * it under the terms of the GNU General Public License as published by +# * the Free Software Foundation; either version 2 of the License, or +# * (at your option) any later version. +# * +# * This program is distributed in the hope that it will be useful, +# * but WITHOUT ANY WARRANTY; without even the implied warranty of +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# * GNU General Public License for more details. +# * +# * You should have received a copy of the GNU General Public License +# * along with this program; if not, write to the Free Software +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# * +# * @(#) %M% %I% %E% %U% +# */ + +import os +import sys +import time +import pygame +from math import * + +import atc_config + +import atc_colors +import atc_utils + +class Weather: + """ Class to manage the weather """ + def __init__(self): + pass + + def update(self): + pass + + def display(self, screen): + pass