pyrocket-0.6.orig/0000755000175000017500000000000011126545406013574 5ustar kostmokostmopyrocket-0.6.orig/rocket_webcam.py0000644000175000017500000000761711126530725016764 0ustar kostmokostmo#!/usr/bin/python from opencv import cv, highgui from pygtk import require require('2.0') import gtk, gobject # ================================== class WebcamManager: def __init__(self): self.webcams = [] # ================================== class VideoWindow(gtk.Frame): def __init__(self): gtk.Frame.__init__(self, "Video Source") master_vbox = gtk.VBox(False, 5) master_vbox.set_border_width( 5 ) self.add( master_vbox ) video_frame = gtk.Frame() self.video_image = gtk.Image() master_vbox.pack_start(video_frame, False, False) video_frame.add(self.video_image) # ----------------------------------- self.video_enabled_button = gtk.ToggleButton("Enable Video") self.video_enabled_button.connect("clicked", self.cb_toggle_video) master_vbox.pack_start(self.video_enabled_button, False, False) # ----------------------------------- self.inverted_video = gtk.CheckButton("Invert video") master_vbox.pack_start(self.inverted_video, False, False) # ----------------------------------- self.capture = None master_vbox.show_all() # ----------------------------------- def start_video(self): device = 0 self.start_capture(device) self.initialize_video() # ----------------------------------- def start_capture(self, device): # video_dimensions = [176, 144] video_dimensions = [320, 240] if not self.capture: self.capture = highgui.cvCreateCameraCapture (device) highgui.cvSetCaptureProperty(self.capture, highgui.CV_CAP_PROP_FRAME_WIDTH, video_dimensions[0]) highgui.cvSetCaptureProperty(self.capture, highgui.CV_CAP_PROP_FRAME_HEIGHT, video_dimensions[1]) # ----------------------------------- def stop_capture(self): if self.capture: cv.cvReleaseCapture( self.capture ) self.capture = None # ----------------------------------- def initialize_video(self): webcam_frame = highgui.cvQueryFrame( self.capture ) if not webcam_frame: print "Frame acquisition failed." return False self.webcam_pixbuf = gtk.gdk.pixbuf_new_from_data( webcam_frame.imageData, gtk.gdk.COLORSPACE_RGB, False, 8, webcam_frame.width, webcam_frame.height, webcam_frame.widthStep) self.video_image.set_from_pixbuf(self.webcam_pixbuf) self.display_frame = cv.cvCreateImage( cv.cvSize(webcam_frame.width, webcam_frame.height), cv.IPL_DEPTH_8U, 3) return True # ----------------------------------- def cb_toggle_video(self, widget): if widget.get_active(): gobject.idle_add( self.run ) # ------------------------------------------- def run(self): if self.capture: webcam_frame = highgui.cvQueryFrame( self.capture ) else: print "Capture failed!" return if self.inverted_video.get_active(): highgui.cvConvertImage(webcam_frame, webcam_frame, highgui.CV_CVTIMG_FLIP) highgui.cvConvertImage(webcam_frame, self.display_frame, highgui.CV_CVTIMG_SWAP_RB) if False: # PROCESS WEBCAM FRAME HERE... inputImage = cv.cvCreateImage(cv.cvGetSize(webcam_frame), cv.IPL_DEPTH_8U, 1) cv.cvCvtColor(webcam_frame, inputImage, cv.CV_RGB2GRAY); cv.cvThreshold(inputImage, inputImage, 128, 255, cv.CV_THRESH_BINARY) mysize = cv.cvGetSize(webcam_frame) height = mysize.height width = mysize.width # Find horizontal first-moment: if False: mysum = 0 for i in range(height): mysum += sum(inputImage[i,:]) print "Sum:", mysum cv.cvMerge( inputImage, inputImage, inputImage, None, self.display_frame ) incoming_pixbuf = gtk.gdk.pixbuf_new_from_data( self.display_frame.imageData, gtk.gdk.COLORSPACE_RGB, False, 8, self.display_frame.width, self.display_frame.height, self.display_frame.widthStep) incoming_pixbuf.copy_area(0, 0, self.display_frame.width, self.display_frame.height, self.webcam_pixbuf, 0, 0) self.video_image.queue_draw() return self.video_enabled_button.get_active() pyrocket-0.6.orig/pyrocket.png0000644000175000017500000000357711052327057016154 0ustar kostmokostmoPNG  IHDR szzgAMA asRGB cHRMz&u0`:pQ<bKGD pHYsHHFk>IDATX[lWeg^ڹ8!NB ) 4PHB*iE)^*CJZU % Ajڐ!=k{;;;3aSPyms Q|؃ !hǿ; pߓ;/wrS[>y\^n⠮R>~o}?Ix; ޘ$;{k&fE p\>kTVf^_}Nܽotӫ.Mp=XKG"-g^{e}ni[D٘m+@A AwB˫SU|c[x^=~<ʩM s=X7$M!nJav'c IYЄ+E[pm®^ '[ӉΎL?c]{gM?s>czr58 *f;'!zgVezvZhN\![c15Z3\0}ߓcxN:~ p#,Iu@,zDö3` t&<9_.?3: I%$+`ίn9a\$caF/ՒxFaUhdLW#sE9 W#Nr n֟|p& !D S೙xpf]fowŁ3K[?#coU$ (!"PHt'5lCb !m~IۉFw!PP Ȧ;mMBD2}w?46BnJ Kv?.W:o$YF<i&˼P(P/Om0tG2=}X,L-hQ*P^CfM) Ovw9(6lkYצKm̓v ##dBh\k3,frvvK_܅}yCu2(qa`˯20en8>HIf7"Mx2jB1`Vk^XJY3q#SHL$^?&s9T*B~aacƑ;< ,B&Y+Ԟ՝NH@iChtBe|p5 ˵XńApɓ.l -a}ctzvoqpW0[2a h"1-'gQs]ȉP;, EX8;BT-af:Fcq3p=(-1,_zxslpAe|d[0r(3 E5 R |>}Tɘ3#KP` (Ab]sp!HAPD4*6U `¼\DԵڥ"C.ï$.v]zc P. {Z4,p"%RVVdQg邏͙/QIENDB`pyrocket-0.6.orig/pyrocket0000755000175000017500000000132111052327057015355 0ustar kostmokostmo#!/usr/bin/python '''PyGTK Missile Command Author: Karl Ostmo Date: January 21, 2008 E-mail: kostmo [at-symbol] g m a i l [dotcom] Web: http://kostmo.ath.cx/ Provides a graphical interface for controlling the Dream Cheeky USB Rocket Launcher. Arrow keys control direction, in addition to GUI buttons. "f" is fire. The program will also accept joystick control. Tested under Ubuntu 8.04 (Hardy). Requires: python-gtk2 python-pyusb python-pygame ''' from rocket_frontend import RocketWindow if __name__ == "__main__": import sys, os # This is for loading the images pathname = os.path.dirname(sys.argv[0]) fullpath = os.path.abspath(pathname) os.chdir(fullpath) launcher = RocketWindow() launcher.main() pyrocket-0.6.orig/setup.py0000644000175000017500000000330111126545057015305 0ustar kostmokostmo#!/usr/bin/python if __name__ == "__main__": from distutils.core import setup #from rocket_frontend import RocketWindow setup(name="pyrocket", description="control Striker II and Dream Cheeky USB Missile Launchers", long_description="""pyrocket is used to operate USB foam dart launchers. It supports many models, and for some, has considerably more functionality than the drivers provided by the manufacturer. One may find it useful as a starting point for controlling other USB devices, or just for waging cubicle warfare. pyrocket automatically detects the launcher(s) and a joystick, and a video window is provided for webcam-enabled devices. pyrocket currently supports the "circus cannon", "original" and "webcam" USB Missile Launchers sold by Dream Cheeky, as well as the Striker II USB Laser Guided Missile Launcher marketed by Ninja Gizmos.""", author="Karl Ostmo", author_email="kostmo@gmail.com", url="http://pyrocket.googlecode.com/", # version=RocketWindow.version version="0.6", py_modules=["rocket_backend", "rocket_frontend", "rocket_webcam", "rocket_joystick"], scripts=["pyrocket"], # data_files=[(RocketWindow.img_path, ["joystick.svg", "pyrocket.png"])] data_files=[("share/pyrocket", ["joystick.svg", "pyrocket.png", "msnmissile.png"])] ) # ==================================================== def make_rules_file(): from rocket_backend import RocketControl filename = "40-rocketlauncher.rules" file_handle = open(filename, "w") for ids in RocketControl.vendor_product_ids: file_handle.write( 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="%04x", SYSFS{idProduct}=="%04x", GROUP="plugdev", MODE="0660"\n' % ids ) file_handle.close() pyrocket-0.6.orig/pyrocket.xpm0000644000175000017500000001437511052327057016172 0ustar kostmokostmo/* XPM */ static char * pyrocket_icon_xpm[] = { "31 32 264 2", " c None", ". c #39291F", "+ c #94837F", "@ c #060504", "# c #0E0E0B", "$ c #414339", "% c #FF3B1E", "& c #FE6A31", "* c #FFCE61", "= c #FFFF8F", "- c #FFFF9E", "; c #FFFFB9", "> c #91854C", ", c #2F201A", "' c #786866", ") c #372F24", "! c #18150F", "~ c #1A1A11", "{ c #253024", "] c #332521", "^ c #30251E", "/ c #1C120E", "( c #120B08", "_ c #1F0E0D", ": c #CA933E", "< c #FEB84F", "[ c #FFCA5D", "} c #FFF786", "| c #FFFFA8", "1 c #FFFF95", "2 c #FFFF99", "3 c #C4B969", "4 c #5A463F", "5 c #957F7B", "6 c #221D16", "7 c #171410", "8 c #040302", "9 c #010000", "0 c #000000", "a c #0A100A", "b c #050302", "c c #100808", "d c #020000", "e c #040303", "f c #3C2323", "g c #F14B2E", "h c #FF7F45", "i c #FFAD4E", "j c #FDC142", "k c #FFFC7C", "l c #FFFFAC", "m c #FFFF9C", "n c #6B5839", "o c #4D3C3A", "p c #8E7B7B", "q c #14110D", "r c #17140F", "s c #030202", "t c #050403", "u c #0B0705", "v c #010101", "w c #010300", "x c #020701", "y c #030B02", "z c #0D130A", "A c #0D0707", "B c #160D0D", "C c #020101", "D c #040101", "E c #130807", "F c #40250D", "G c #FEB150", "H c #FFD262", "I c #FFF876", "J c #FFFFA7", "K c #FFFFAE", "L c #FFFE86", "M c #8E7B2D", "N c #483825", "O c #52423E", "P c #050303", "Q c #040604", "R c #010501", "S c #000300", "T c #000200", "U c #0D100C", "V c #181112", "W c #0A0707", "X c #3F3537", "Y c #765737", "Z c #FFB14F", "` c #FF9349", " . c #FDB25E", ".. c #FBE24B", "+. c #FDDF49", "@. c #FEF651", "#. c #FFF855", "$. c #000100", "%. c #1A1718", "&. c #050405", "*. c #0E120F", "=. c #241D1F", "-. c #141011", ";. c #050304", ">. c #370D0A", ",. c #902A23", "'. c #A74C29", "). c #F84D1A", "!. c #FC4628", "~. c #14100D", "{. c #0E1914", "]. c #0B0F0C", "^. c #0E0809", "/. c #0C0607", "(. c #0B0706", "_. c #140E0C", ":. c #150E0B", "<. c #050A08", "[. c #09100D", "}. c #0E0E0D", "|. c #392B2A", "1. c #54423E", "2. c #020303", "3. c #030201", "4. c #24261E", "5. c #4A4940", "6. c #030203", "7. c #060706", "8. c #080A09", "9. c #1D1A14", "0. c #0D0B09", "a. c #040404", "b. c #2A2424", "c. c #342522", "d. c #2F201E", "e. c #3F302C", "f. c #030302", "g. c #1F191A", "h. c #393233", "i. c #3C2C2B", "j. c #392927", "k. c #342422", "l. c #010301", "m. c #08120C", "n. c #18201B", "o. c #2D2826", "p. c #030101", "q. c #312829", "r. c #3D3532", "s. c #3A423A", "t. c #3C4039", "u. c #090704", "v. c #2D282A", "w. c #020D06", "x. c #1B3B2A", "y. c #718377", "z. c #504B49", "A. c #1B0E0E", "B. c #27181C", "C. c #545253", "D. c #85A596", "E. c #5F8D77", "F. c #57514A", "G. c #5B4641", "H. c #969788", "I. c #000701", "J. c #042713", "K. c #0D3A24", "L. c #262B28", "M. c #0E0607", "N. c #3E3239", "O. c #8B8291", "P. c #ECF2F3", "Q. c #65907F", "R. c #6A6561", "S. c #3A2728", "T. c #6E7367", "U. c #020203", "V. c #0C0C0D", "W. c #022511", "X. c #0A3722", "Y. c #18211D", "Z. c #060102", "`. c #2B1E22", " + c #746D79", ".+ c #DFE7E9", "++ c #5D8978", "@+ c #5B5A57", "#+ c #412F30", "$+ c #726F64", "%+ c #1D170E", "&+ c #020202", "*+ c #060505", "=+ c #010903", "-+ c #04180A", ";+ c #0B2918", ">+ c #212D25", ",+ c #1A1415", "'+ c #090405", ")+ c #191214", "!+ c #415C51", "~+ c #557A6C", "{+ c #446E5A", "]+ c #46433E", "^+ c #54413E", "/+ c #7D7369", "(+ c #010100", "_+ c #010702", ":+ c #011708", "<+ c #062A17", "[+ c #20201F", "}+ c #0C090A", "|+ c #170F10", "1+ c #516A63", "2+ c #A1B3B2", "3+ c #6C9082", "4+ c #303532", "5+ c #28191C", "6+ c #423335", "7+ c #747B6A", "8+ c #000F03", "9+ c #02230F", "0+ c #0C0D0D", "a+ c #191012", "b+ c #456057", "c+ c #86A19E", "d+ c #5A8476", "e+ c #252E2A", "f+ c #1C0D0F", "g+ c #312224", "h+ c #6D7966", "i+ c #211910", "j+ c #000E03", "k+ c #02210E", "l+ c #0E0F0E", "m+ c #170E0E", "n+ c #385046", "o+ c #718785", "p+ c #48695D", "q+ c #202421", "r+ c #241515", "s+ c #3D2D2E", "t+ c #686758", "u+ c #0C0907", "v+ c #040201", "w+ c #1A1414", "x+ c #080505", "y+ c #110A0B", "z+ c #352D34", "A+ c #93838D", "B+ c #5F545E", "C+ c #2A1F23", "D+ c #211313", "E+ c #251818", "F+ c #261411", "G+ c #502F28", "H+ c #000001", "I+ c #090406", "J+ c #292229", "K+ c #5C515E", "L+ c #403844", "M+ c #181016", "N+ c #110808", "O+ c #13090B", " ", " ", " ", " ", " . + ", " @ # $ % & * = - ; > , ' ", " ) ! ~ { ] ^ / ( _ : < [ } | 1 2 3 4 5 ", " 6 7 8 9 0 a b c d 9 e f g h i j k l m n o p ", " q r s t u v w x y z A B C D E F G H I J | K L M N O ", " 0 0 0 0 P Q R S T U V W 9 C X Y Z ` ...+.@.#. ", " $.0 0 0 %.&.0 0 $.*.=.-.0 0 ;.>.,.'.).!. ", " ~.0 0 0 0 0 v 0 0 0 {.].^./.(._.:. ", " 0 0 0 0 0 0 0 0 0 <.[.}.|.1. ", " e 0 0 0 v 0 2.0 0 0 3.4.5. ", " t 0 6.0 0 7.8.9. ", " 0.0 s a.0 b.c.d.e. ", " f.0 0 g.0 h.i.j.k. ", " l.m.n.o.p.q.r.s.t. ", " u.v.0 w.x.y.z.A.B.C.D.E.F.G.H. ", " v %.0 I.J.K.L.M.N.O.P.Q.R.S.T. ", " U.V.0 I.W.X.Y.Z.`. +.+++@+#+$+ ", " %+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+ ", " (+0 0 _+:+<+[+}+p.|+1+2+3+4+5+6+7+ ", " 0 0 0 $.8+9+0+0 0 a+b+c+d+e+f+g+h+ ", " i+0 0 0 T j+k+l+e p.m+n+o+p+q+r+s+t+ ", "u+v+0 0 0 0 0 8 w+x+p.y+z+A+B+C+D+E+F+G+ ", " 0 0 0 0 0 0 0 0 H+0 I+J+K+L+M+N+O+ ", " ", " ", " ", " ", " "}; pyrocket-0.6.orig/joystick.svg0000644000175000017500000026434111052327057016164 0ustar kostmokostmo pyrocket-0.6.orig/40-rocketlauncher.rules0000644000175000017500000000065011052327057020101 0ustar kostmokostmoSUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="1941", SYSFS{idProduct}=="8021", GROUP="plugdev", MODE="0660" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="0a81", SYSFS{idProduct}=="0701", GROUP="plugdev", MODE="0660" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="1130", SYSFS{idProduct}=="0202", GROUP="plugdev", MODE="0660" pyrocket-0.6.orig/rocket_frontend.py0000644000175000017500000003411411126545057017341 0ustar kostmokostmo#!/usr/bin/python from pygtk import require require('2.0') import gtk, gobject # ============================================================================== # ============================================================================== from rocket_backend import RocketManager from rocket_webcam import VideoWindow from rocket_joystick import StatefulJoystick class RocketWindow(StatefulJoystick): appname = "pyrocket" version = "0.6" local_share_dir = "/usr/share/" keymap = [65364, 65362, 65361, 65363] button_labels = ["Down", "Up", "Left", "Right", "_Fire"] button_stock_icons = [gtk.STOCK_GO_DOWN, gtk.STOCK_GO_UP, gtk.STOCK_GO_BACK, gtk.STOCK_GO_FORWARD, gtk.STOCK_DIALOG_WARNING] status_message_timeout = 5000 PRECHARGE = 1 CONTINUOUS_CHARGE = 2 # =============================== def __init__(self, run_installed=True): self.run_installed = run_installed self.img_path = "" self.doc_path = "" if run_installed: self.img_path = self.local_share_dir + self.appname + "/" self.doc_path = self.local_share_dir + "doc/" + self.appname + "/" self.status_message_list = [ "ALT+arrowkeys move!", # "Supports "+RocketManager.launcher_types[0]+" and "+RocketManager.launcher_types[1]+" Launcher!" "Supports Striker II and Dream Cheeky Models!" ] # create a new window self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) # self.window.set_title(u"Dream Cheeky\u0099 Control") # The "TM" symbol doesn't work in GNOME # self.window.set_title(u"Dream Cheeky\u00AE Control") self.window.set_title("USB Rocket Launcher Control") icon_path = self.img_path + "pyrocket.png" self.window.set_icon_from_file( icon_path ) self.status_icon = gtk.status_icon_new_from_file( icon_path ) self.status_icon.set_visible( True ) self.window.set_resizable( False ) self.window.connect("delete_event", self.delete_event) self.window.connect("key_press_event", self.handle_keyboard_press_event) self.window.connect("key_release_event", self.handle_keyboard_release_event) self.window.set_events(gtk.gdk.KEY_PRESS_MASK | gtk.gdk.KEY_RELEASE_MASK) self.window.connect("destroy", self.destroy) self.button_array = [] for i, label in enumerate(self.button_labels): button = gtk.Button(label) button.set_use_underline(True) button_image = gtk.Image() button_image.set_from_stock(self.button_stock_icons[i], gtk.ICON_SIZE_BUTTON) button.set_image(button_image) self.button_array.append( button ) vbox = gtk.VBox(False, 5) self.window.add(vbox) # ---------------------------- top_menu = gtk.MenuBar() vbox.pack_start(top_menu, False, False) view_menu = gtk.MenuItem("_View") view_submenu = gtk.Menu() view_menu.set_submenu( view_submenu ) self.camera_widget_visible = gtk.CheckMenuItem("Camera") self.camera_widget_visible.connect("toggled", self.cb_toggle_show_camera) view_submenu.append( self.camera_widget_visible ) top_menu.append( view_menu ) help_menu = gtk.MenuItem("_Application") help_submenu = gtk.Menu() help_menu.set_submenu( help_submenu ) about_item = gtk.MenuItem("_About") about_item.connect("activate", self.cb_about_dialog) help_submenu.append( about_item ) quit_item = gtk.MenuItem("_Quit") quit_item.connect("activate", self.destroy) help_submenu.append( quit_item ) top_menu.append( help_menu ) # ---------------------------- self.video = VideoWindow() self.video.set_no_show_all(True) vbox.pack_start(self.video, False, False) # ---------------------------- self.joystick_hbox = gtk.HBox(False, 5) vbox.pack_start(self.joystick_hbox, False, False) joystick_image = gtk.Image() joystick_image.set_from_file(self.img_path + "joystick.svg") self.joystick_hbox.pack_start(joystick_image, False, False) mini_joystick_vbox = gtk.VBox(False, 0) mini_joystick_vbox.pack_start(gtk.Label("Joystick detected:"), False, False) self.joystick_name_label = gtk.Label("") mini_joystick_vbox.pack_start(self.joystick_name_label, False, False) self.joystick_hbox.pack_start(mini_joystick_vbox, False, False) self.joystick_hbox.set_no_show_all(True) # ---------------------------- control_hbox = gtk.HBox(False, 5) vbox.pack_start(control_hbox, False, False) control_hbox.pack_start(gtk.Label("Launcher ID:"), False, False) myadj = gtk.Adjustment(1, 0, 16, 1) self.laucher_id = gtk.SpinButton(myadj, 0, 0) self.laucher_id.set_numeric(True) self.laucher_id.connect("value-changed", self.cb_select_new_launcher) control_hbox.pack_start(self.laucher_id, False, False) self.limit_override = gtk.CheckButton("Override Limits") self.limit_override.connect("toggled", self.cb_limit_override) control_hbox.pack_end(self.limit_override, True, False) main_hbox = gtk.HBox(True, 5) vbox.pack_start(main_hbox, False, False) for button in self.button_array[:4]: main_hbox.pack_start(button, True, True) charging_options_hbox = gtk.HBox(False, 5) vbox.pack_start(charging_options_hbox, False, False) self.button_array[4].set_tooltip_text("Let 'er rip!") charging_options_hbox.pack_start(self.button_array[4], False, False) sub_vbox = gtk.VBox(False, 5) charging_options_hbox.pack_start(sub_vbox, True, True) charge_options = gtk.RadioButton(group=None, label="Charge Continuously") sub_vbox.pack_start(charge_options, False, False) charge_options = gtk.RadioButton(group=charge_options, label="Precharge (for sneak attacks)") sub_vbox.pack_start(charge_options, False, False) self.stop_charge = gtk.RadioButton(group=charge_options, label="Fire once") self.stop_charge.set_active(True) sub_vbox.pack_start(self.stop_charge, False, False) self.toggle_laser_button = gtk.Button("Toggle _Laser") self.toggle_laser_button.set_use_underline(True) button_image = gtk.Image() button_image.set_from_stock(gtk.STOCK_MEDIA_RECORD, gtk.ICON_SIZE_BUTTON) self.toggle_laser_button.set_image(button_image) vbox.pack_start(self.toggle_laser_button, False, False) self.status_bar = gtk.Statusbar() self.status_bar.set_has_resize_grip(False) vbox.pack_start(self.status_bar, False, False) self.window.show_all() self.connect_everything() self.cb_select_new_launcher(self.laucher_id) StatefulJoystick.__init__(self) self.status_message_index = 1 self.last_message_id = None self.cycle_status_message() # =============================== def cb_toggle_show_camera(self, widget): if widget.get_active(): self.video.start_video() self.video.show() self.video.video_enabled_button.set_active(True) else: self.video.video_enabled_button.set_active(False) self.video.hide() self.video.stop_capture() # =============================== def cb_about_dialog(self, widget): about_dialog = gtk.AboutDialog() about_dialog.set_version( self.version ) about_dialog.set_logo( gtk.gdk.pixbuf_new_from_file(self.img_path + "msnmissile.png") ) about_dialog.set_copyright(u"\u00A92008 Karl Ostmo") if self.run_installed: license_file = open(self.doc_path + "copyright", "r") else: license_file = open("debian/copyright", "r") about_dialog.set_license( license_file.read() ) license_file.close() about_dialog.set_authors(["Karl Ostmo"]) about_dialog.set_website("http://pyrocket.googlecode.com/") about_dialog.run() about_dialog.destroy() # =============================== def cb_limit_override(self, widget): if widget.get_active(): for button in self.button_array[:4]: button.set_sensitive(True) else: launcher = self.get_active_launcher() for i, state in enumerate( launcher.check_limits() ): self.button_array[i].set_sensitive( not state ) # =============================== def cb_select_new_launcher(self, widget): if len(self.rocket_controller.launchers): launcher = self.rocket_controller.launchers[widget.get_value_as_int()] else: return self.stop_charge.get_group()[self.PRECHARGE].set_sensitive( launcher.color_green ) self.limit_override.set_sensitive( launcher.color_green ) for i, state in enumerate( launcher.check_limits() ): self.button_array[i].set_sensitive( not state ) if launcher.has_laser: self.toggle_laser_button.show() else: self.toggle_laser_button.hide() # =============================== def cycle_status_message(self): '''All this junk keeps the message stack from ever-increasing. The Statusbar widget won't allow a message_id to be zero, so we have to shift the indices up by one.''' saved_id = self.last_message_id new_msg_text = self.status_message_list[(self.status_message_index-1) % len(self.status_message_list)] self.last_message_id = self.status_bar.push(0, new_msg_text) if not saved_id is None: self.status_bar.remove(saved_id, (self.status_message_index-1) % len(self.status_message_list) + 1) self.status_message_index += 1 gobject.timeout_add( self.status_message_timeout, self.cycle_status_message) # =============================== def handle_keyboard_press_event(self, widget, event): try: if event.state & gtk.gdk.MOD1_MASK: idx = self.keymap.index( event.keyval ) # print "Key pressed:", idx # self.cb_fire_click(widget) self.cb_button_press(None, idx) except ValueError: pass # =============================== def handle_keyboard_release_event(self, widget, event): try: if event.state & gtk.gdk.MOD1_MASK: idx = self.keymap.index( event.keyval ) # print "Key released:", idx self.cb_button_release(None, idx) except ValueError: pass # =============================== def get_active_launcher(self): if len(self.rocket_controller.launchers): return self.rocket_controller.launchers[self.laucher_id.get_value_as_int()] # =============================== def cb_fire_click(self, widget): if not self.stop_charge.get_group()[self.CONTINUOUS_CHARGE].get_active(): launcher = self.get_active_launcher() launcher.start_movement(4) # =============================== def cb_laser_click(self, widget): launcher = self.get_active_launcher() launcher.start_movement(6) # =============================== def movement_wrapper(self, direction): launcher = self.get_active_launcher() if direction == 5: launcher.stop_movement() return False if direction == 4 or not (launcher.previous_limit_switch_states[direction] and not self.limit_override.get_active()): launcher.start_movement(direction) if direction == 4: return self.stop_charge.get_group()[self.CONTINUOUS_CHARGE].get_active() return True return False # =============================== def get_fire_mode(self): for idx, radio_button in enumerate(self.stop_charge.get_group()): if radio_button.get_active(): return idx # =============================== def cb_button_press(self, widget, button_index): if button_index == 4 and self.stop_charge.get_group()[self.CONTINUOUS_CHARGE].get_active(): launcher = self.get_active_launcher() launcher.start_movement(4) elif button_index != 4: self.movement_wrapper(button_index) # =============================== def cb_button_release(self, widget, button_index): launcher = self.get_active_launcher() if button_index != 4 or button_index == 4 and self.stop_charge.get_group()[self.CONTINUOUS_CHARGE].get_active(): launcher.stop_movement() # =============================== def connect_everything(self): self.rocket_controller = RocketManager() err_msg = self.rocket_controller.acquire_devices() if err_msg: dia = gtk.Dialog('Device Acquisition error', self.window.get_toplevel(), #the toplevel wgt of your app gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, #binary flags or'd together ("Ignore", 77, gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) v = gtk.VBox() v.pack_start(gtk.Label(err_msg), False, False) v.set_border_width(10) dia.vbox.pack_start( v ) dia.show_all() result = dia.run() if result == 77: print "Continuing anyway." elif result == gtk.RESPONSE_CLOSE: exit(0) else: print "Exited abnormally." exit(1) dia.destroy() self.laucher_id.set_range(0, len(self.rocket_controller.launchers) - 1 ) for i, button in enumerate(self.button_array): # Experimental button.connect("pressed", self.cb_button_press, i) button.connect("released", self.cb_button_release, i) button = self.button_array[4] button.connect("clicked", self.cb_fire_click) self.toggle_laser_button.connect("clicked", self.cb_laser_click) # =============================== def limit_checker_loop(self): launcher = self.get_active_launcher() if not launcher: return False prev_states = launcher.previous_limit_switch_states prev_fire_state = launcher.previous_fire_state new_states = launcher.check_limits() next_fire_state = launcher.previous_fire_state if not self.limit_override.get_active(): for i in range(len(new_states)): if new_states[i] ^ prev_states[i]: self.button_array[i].set_sensitive(not new_states[i]) if new_states[i]: # For stopping the joystick movement launcher.stop_movement() # Terminate cylinder charging based on radio state grp = self.stop_charge.get_group() if grp[0].get_active(): if prev_fire_state and not next_fire_state: launcher.stop_movement() elif grp[1].get_active(): if not prev_fire_state and next_fire_state: launcher.stop_movement() return True # =============================== def main(self): # All PyGTK applications must have a gtk.main(). Control ends here # and waits for an event to occur (like a key press or mouse event). gtk.main() # =============================== def delete_event(self, widget, event, data=None): # Change FALSE to TRUE and the main window will not be destroyed # with a "delete_event". return False # =============================== def destroy(self, widget, data=None): if self.video: self.video.stop_capture() if self.joystick_object: self.joystick_object.quit() for launcher in self.rocket_controller.launchers: launcher.stop_movement() gtk.main_quit() # =============================== if __name__ == "__main__": import sys, os # This is for loading the images pathname = os.path.dirname(sys.argv[0]) fullpath = os.path.abspath(pathname) os.chdir(fullpath) launcher = RocketWindow(False) launcher.main() pyrocket-0.6.orig/rocket_joystick.py0000644000175000017500000000667411052327057017367 0ustar kostmokostmo#!/usr/bin/python from opencv import cv, highgui from pygtk import require require('2.0') import gtk, gobject import pygame import pygame.display import pygame.joystick from pygame.locals import * # ================================== class JoystickManager: '''This class will be completed later.''' def __init__(self): self.joysticks = [] # =============================== class StatefulJoystick: def __init__(self): self.joystick_debug = False self.joystick_object = None self.joystick_init() gobject.idle_add( self.limit_checker_loop ) # =============================== def joystick_init(self): pygame.display.init() pygame.joystick.init() #initialize joystick module pygame.joystick.get_init() #verify initialization (boolean) joystick_count = pygame.joystick.get_count() # get number of joysticks print('%d joystick(s) connected' %joystick_count) if not joystick_count: self.status_message_list.append("Try connecting a Joystick!") return self.joystick_object = pygame.joystick.Joystick(0) self.joystick_object.init() self.num_axes = self.joystick_object.get_numaxes() self.num_buttons = self.joystick_object.get_numbuttons() self.joystick_hbox.set_no_show_all(False) self.joystick_hbox.show_all() self.joystick_name_label.set_text( self.joystick_object.get_name() ) print 'Joystick has %d axes and %d buttons' %(self.num_axes, self.num_buttons) self.prev_button_array = [0]*self.num_buttons self.prev_movement_state = [0, 0] self.prev_fire_button_state = 0 gobject.idle_add( self.joystick_event_loop ) # =============================== def joystick_event_loop(self): launcher = self.get_active_launcher() pygame.event.pump() #necessary for os to pass joystick events axis_array = [self.joystick_object.get_axis(i) for i in range(self.num_axes)] button_array = [self.joystick_object.get_button(i) for i in range(self.num_buttons)] button_delta = map(lambda x, y: x-y, button_array, self.prev_button_array) if button_delta[1] > 0: self.laucher_id.set_value( self.laucher_id.get_value() + 1 ) elif button_delta[2] > 0: self.laucher_id.set_value( self.laucher_id.get_value() - 1 ) elif button_delta[3] > 0: fire_grp = self.stop_charge.get_group() fire_grp[ (self.get_fire_mode() + 1) % len(fire_grp) ].set_active(True) if self.joystick_debug: # print "Joystick Axes:", axis_array # DEBUG print "Buttons:", button_delta # DEBUG axis_array.reverse() if axis_array[0] < 0 and not self.prev_movement_state[0] < 0: self.movement_wrapper(1) elif axis_array[0] > 0 and not self.prev_movement_state[0] > 0: self.movement_wrapper(0) elif (axis_array[0] != self.prev_movement_state[0]): self.movement_wrapper(5) if axis_array[1] < 0 and not self.prev_movement_state[1] < 0: self.movement_wrapper(2) elif axis_array[1] > 0 and not self.prev_movement_state[1] > 0: self.movement_wrapper(3) elif (axis_array[1] != self.prev_movement_state[1]): self.movement_wrapper(5) self.prev_movement_state = axis_array[:2] if button_array[0]: launcher.start_movement(4) elif button_array[0] != self.prev_fire_button_state and self.stop_charge.get_group()[self.CONTINUOUS_CHARGE].get_active(): self.movement_wrapper(5) self.prev_fire_button_state = button_array[0] self.prev_button_array = button_array[:] return True # =============================== def shutdown_joystick(self): pygame.joystick.quit() # destroy objects and clean up pyrocket-0.6.orig/rocket_backend.py0000644000175000017500000001413011052327057017101 0ustar kostmokostmo#!/usr/bin/python import usb from time import sleep class RocketManager: vendor_product_ids = [(0x1941, 0x8021), (0x0a81, 0x0701), (0x0a81, 0xff01), (0x1130, 0x0202)] launcher_types = ["Original", "Webcam", "Wireless", "Striker II"] housing_colors = ["green", "blue", "silver", "black"] def __init__(self): self.launchers = [] # ----------------------------- def acquire_devices(self): device_found = False for bus in usb.busses(): for dev in bus.devices: for i, (cheeky_vendor_id, cheeky_product_id) in enumerate(self.vendor_product_ids): if dev.idVendor == cheeky_vendor_id and dev.idProduct == cheeky_product_id: print "Located", self.housing_colors[i], "Rocket Launcher device." launcher = None if i == 0: launcher = OriginalRocketLauncher() elif i == 1: launcher = BlueRocketLauncher() elif i == 2: # launcher = BlueRocketLauncher() # EXPERIMENTAL return '''The '''+self.launcher_types[i]+''' ('''+self.housing_colors[i]+''') Rocket Launcher is not yet supported. Try the '''+self.launcher_types[0]+''' or '''+self.launcher_types[1]+''' one.''' elif i == 3: launcher = BlackRocketLauncher() return_code = launcher.acquire( dev ) if not return_code: self.launchers.append( launcher ) device_found = True elif return_code == 2: string = '''You don't have permission to operate the USB device. To give yourself permission by default (in Ubuntu), create the file /etc/udev/rules.d/40-missilelauncher.rules with the following line: SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="%04x", SYSFS{idProduct}=="%04x", GROUP="plugdev", MODE="0660" The .deb installer should have done this for you. If you just installed the .deb, you need to unplug and replug the USB device now. This will apply the new permissions from the .rules file.''' % (cheeky_vendor_id, cheeky_product_id) print string return '''You don't have permission to operate the USB device. If you just installed the .deb, you need to plug cycle the USB device now. This will apply the new permissions from the .rules file.''' if not device_found: return 'No USB Rocket Launcher appears\nto be connected.' # ============================================ # ============================================ class OriginalRocketLauncher: color_green = True has_laser = False green_directions = [1, 0, 2, 3, 4] def __init__(self): self.usb_debug = False self.previous_fire_state = False self.previous_limit_switch_states = [False]*4 # Down, Up, Left, Right # ------------------------------------------------------ def acquire(self, dev): self.handle = dev.open() try: self.handle.reset() except usb.USBError, e: if e.message.find("not permitted") >= 0: return 2 else: raise e # self.handle.setConfiguration(dev.configurations[0]) try: self.handle.claimInterface( 0 ) except usb.USBError, e: if e.message.find("could not claim interface") >= 0: self.handle.detachKernelDriver( 0 ) self.handle.claimInterface( 0 ) self.handle.setAltInterface(0) return 0 # ----------------------------- def issue_command(self, command_index): signal = 0 if command_index >= 0: signal = 1 << command_index try: self.handle.controlMsg(0x21, 0x09, [signal], 0x0200) except usb.USBError: pass # ----------------------------- def start_movement(self, command_index): self.issue_command( self.green_directions[command_index] ) # ----------------------------- def stop_movement(self): self.issue_command( -1 ) # ----------------------------- def check_limits(self): '''For the "green" rocket launcher, the MSB of byte 2 comes on when a rocket is ready to fire, and is cleared again shortly after the rocket fires and cylinder is charged further.''' bytes = self.handle.bulkRead(1, 8) if self.usb_debug: print "USB packet:", bytes limit_bytes = list(bytes)[0:2] self.previous_fire_state = limit_bytes[1] & (1 << 7) limit_signal = (limit_bytes[1] & 0x0F) | (limit_bytes[0] >> 6) new_limit_switch_states = [bool(limit_signal & (1 << i)) for i in range(4)] self.previous_limit_switch_states = new_limit_switch_states return new_limit_switch_states # ============================================ # ============================================ class BlueRocketLauncher(OriginalRocketLauncher): color_green = False def __init__(self): OriginalRocketLauncher.__init__(self) # ----------------------------- def start_movement(self, command_index): self.issue_command( command_index ) # ----------------------------- def stop_movement(self): self.issue_command( 5 ) # ----------------------------- def check_limits(self): '''For the "blue" rocket launcher, the firing bit is only toggled when the rocket fires, then is immediately reset.''' bytes = None self.issue_command( 6 ) try: bytes = self.handle.bulkRead(1, 1) except usb.USBError, e: if e.message.find("No error") >= 0 \ or e.message.find("could not claim interface") >= 0 \ or e.message.find("Value too large") >= 0: pass # if self.usb_debug: # print "POLLING ERROR" # TODO: Should we try again in a loop? else: raise e if self.usb_debug: print "USB packet:", bytes self.previous_fire_state = bool(bytes) if bytes is None: return self.previous_limit_switch_states else: limit_signal, = bytes new_limit_switch_states = [bool(limit_signal & (1 << i)) for i in range(4)] self.previous_limit_switch_states = new_limit_switch_states return new_limit_switch_states # ============================================ # ============================================ class BlackRocketLauncher(BlueRocketLauncher): striker_commands = [0xf, 0xe, 0xd, 0xc, 0xa, 0x14, 0xb] has_laser = True # ----------------------------- def issue_command(self, command_index): signal = self.striker_commands[command_index] try: self.handle.controlMsg(0x21, 0x09, [signal, signal]) except usb.USBError: pass # ----------------------------- def check_limits(self): return self.previous_limit_switch_states pyrocket-0.6.orig/LICENSE0000644000175000017500000004310311052327057014600 0ustar kostmokostmo GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. pyrocket-0.6.orig/msnmissile.png0000644000175000017500000000742711052327057016475 0ustar kostmokostmoPNG  IHDR00W pHYs+IDAThZ TSWVy&$!@  <! @/QKAE("ZPQRETVX vUkZks/v_ZX&ku.&{a^kÆ qqq+Vozuwd2@.-++sA& >zz_) adl c2LLL=x*TH("##7SX,6p\zC驂?BG>\UjMa24 ?^>dYIېX<BL$2B$lmm _j01&fwWںOH%1MOyMMM *ZC7)/"q x6Mf9`og2.*r霽Md L凅C+r_+&fCԩSײ9GyH17r@<;WO>s{qp_wy^U~} t7K {N,vYsg +J>Zb%;; Ϭj b#.dRX0fK);xyӛK3 )zpKW&ֺ9p17j˯qYv$g ,">~DZ_J;]o/Ͳ8s]BGG aHAtd[QgH݋jT*NZ8 GXP0BX??y+{Of z?O~CLP\_8bv .Z_P{jhzXS"־m` 4@OG|FB*eBP"=m~m}.ٹK26-ʞ?wws7o,8zdד5Y6]~Wspu9nmV%N-@D,H. ̸f`040RB!s#B fs`CA_ R=0wFB2giYGhɍk%}F{l:#e8+Hc|3H1i ؄lϩ,˼c/r0M{Ш:IZj~3iW\mՃ-rdlpy{.>+Eql=8qpÈ+ڒ$@鸉Ƅ=ad{Fe~DUVOM֕S !;god#O+L<~2'#gp3>1BEH*XZZ mzm}#`? \[(X&F=HK]w%j&ݫ~zgkyn ٢V 7ڄ(@H9psF0 Eˆ\4aׁlyG0"5IbOz\ƦCk_PZ~mXRc7D yɅQ$ii}C=fff$9`Cش:ZP:"R6C顀 3Cs9'iFfS$X%ÖK11%5&Tcʥr"''{ZYW' -[fN# 09A(B_DNI6~Fʼ!S%G#.:lNA0#;N0$Hh;R#o\?~hl̆S%P)Ɂ.#'0UEڸq0&|t'Za:Ϸu8΋$vw ;5W0/^yxkv. M <+RSS0D:I!["%mQ'WjzJ?aIކrWVam91yWZ_ A- ^;Iw4i;Wfi,)jjdl&t$[B?c°|!.6bi>V5loQ37>MQ\੕ZE{@q$ZpUu2s.>96 z~{97roA8e"BPrf,9IX +>؈K݉C')#v x+QVwwt>rY;`jfS\T^H/¸8Zٺ]r2 7V~ 7exflb誎ePi5Ek<7dkfA'.Ļ/,>Lsl)LR:t^ R3Y𴽘+$&ZKEot}unXmLM%Υp9. @< 9MP%% \`ydۇH/<WQ)E"D%kw[mjs>%{@lkCjضąޏ98R_U^BEB~S y/ v1tS+j;VVChHi(1rLN|A( Yq lmY X (>3\sQIFxA_obrq{x:''waw1/w4/CQl4t2A0ث0' S2:Mb|ܼJE< $yH&tN"cuNacuߠxU.]T/i}Pv7"ٴ goFr[)9rrrΞ4P^TrN>2e/(ʣz0p'Žt8DD8VF^, f<2P D' YHx;Glݺuɓ'u V0 F+5 զB_|ΈREJHOOgԠJ˗/?~|St)BJ@>U< ~dQH<4>>6o\CK.w컻:;;g477gחTWWWTGp*7nXA?k:t(+W駟Z_$ IENDB`