[Pkg-allegro-commits] r5 - tarballs unstable unstable/wing unstable/wing/debian unstable/wing/debian/patches

Sam Hocevar sho at costa.debian.org
Thu Mar 30 10:56:49 UTC 2006


Author: sho
Date: 2006-03-30 10:56:35 +0000 (Thu, 30 Mar 2006)
New Revision: 5

Added:
   tarballs/wing_0.7.orig.tar.gz
   unstable/wing/
   unstable/wing/debian/
   unstable/wing/debian/changelog
   unstable/wing/debian/compat
   unstable/wing/debian/control
   unstable/wing/debian/copyright
   unstable/wing/debian/menu
   unstable/wing/debian/patches/
   unstable/wing/debian/patches/010_makefile.diff
   unstable/wing/debian/patches/020_misc.diff
   unstable/wing/debian/patches/series
   unstable/wing/debian/rules
   unstable/wing/debian/wing.6
   unstable/wing/debian/wing.postinst
   unstable/wing/debian/wing.postrm
   unstable/wing/debian/wing.xpm
Log:
wing (0.7-25) unstable; urgency=low

  * Moved development to Alioth.
  * debian/rules
    + Switched to quilt for patch handling.
  * debian/control:
    + Build-depend on quilt.

  * 010_makefile.diff: (new patch from old diff.gz) makefile fixes.

  * 020_misc.diff: (new patch from old diff.gz) lots of compilation and bug
    fixes in the code.


Added: tarballs/wing_0.7.orig.tar.gz
===================================================================
(Binary files differ)


Property changes on: tarballs/wing_0.7.orig.tar.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


Property changes on: unstable/wing/debian
___________________________________________________________________
Name: mergeWithUpstream
   + 1

Added: unstable/wing/debian/changelog
===================================================================
--- unstable/wing/debian/changelog	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/changelog	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,221 @@
+wing (0.7-25) unstable; urgency=low
+
+  * Moved development to Alioth.
+  * debian/rules
+    + Switched to quilt for patch handling.
+  * debian/control:
+    + Build-depend on quilt.
+
+  * 010_makefile.diff: (new patch from old diff.gz) makefile fixes.
+
+  * 020_misc.diff: (new patch from old diff.gz) lots of compilation and bug
+    fixes in the code.
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Thu, 30 Mar 2006 12:33:11 +0200
+
+wing (0.7-24) unstable; urgency=low
+
+  * Rebuilt against liballegro4.2.
+  * debian/compat: use version 4.
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Fri, 11 Nov 2005 14:23:34 +0100
+
+wing (0.7-23) unstable; urgency=low
+
+  * Rebuilt package using a version of Allegro that is in Debian.
+  * makefile.unx:
+    + Compile one file after another instead of #including all files in a
+      single compilation pass.
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Tue,  4 Oct 2005 01:33:21 +0200
+
+wing (0.7-22) unstable; urgency=low
+
+  * g++ transition upload.
+  * debian/control:
+    + Set policy to 3.6.2.1.
+    + Removed leading "a" in short description.
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Mon,  3 Oct 2005 23:08:37 +0200
+
+wing (0.7-21) unstable; urgency=low
+
+  * debian/control:
+    + Set policy to 3.6.1.1.
+    + Make the data package depend on the same version of the binary package.
+  * debian/rules:
+    + Use debian/compat instead of DH_COMPAT.
+  * debian/menu:
+    + Quoted strings where appropriate.
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Fri, 23 Jul 2004 12:41:34 +0200
+
+wing (0.7-20) unstable; urgency=low
+
+  * debian/control:
+    + Set policy to 3.6.1.0.
+    + Wrote more meaningful long descriptions (Closes: #210137).
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Thu,  2 Oct 2003 16:28:06 +0200
+
+wing (0.7-19) unstable; urgency=low
+
+  * Fixed spelling in the wing-data package description.
+  * Set policy to 3.5.10.
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Fri, 30 May 2003 16:58:51 +0200
+
+wing (0.7-18) unstable; urgency=low
+
+  * Fixed dpkg-statoverride calls so that they don't disappear on upgrade.
+  * The score file is now /var/games/wing.scores.
+  * Fixed data corruption in apstring::>> and ScoreListTYPE::ReadFromFile().
+  * Fixed bad shifts in collision.cpp:mk_spr_mask() that caused collision
+    detection to fail on alpha (Closes: #188849).
+
+ -- Samuel Hocevar <sam at zoy.org>  Fri, 11 Apr 2003 06:26:43 +0200
+
+wing (0.7-17) unstable; urgency=low
+
+  * Added a SIG_SEGV handler to reset keyboard state when crashing.
+  * Disabled collision detection between our weapons and enemies that are not
+    finished exploding to avoid double kills (Closes: #188443, part 1).
+  * Disabled collision detection between ship and enemy shots when we are not
+    finished exploding (Closes: #188443, part 2).
+  * The game does not quit immediately when our ship loses its last life, so
+    that we have time to watch the explosion. I love watching explosions.
+  * Added a '-w' flag to run wing in windowed mode, updated manpage
+    accordingly.
+  * Added -Wall to the build rules to make error spotting easier, and fixed
+    all compilation warnings.
+  * The ship is now invulnerable for a few seconds when it appears on the
+    screen (Closes: #188443, part 4).
+  * Fixed crashes in a linked list parsing in EnemyTYPE::UpdateAI().
+  * In ScoreListTYPE::ReadFromFile(), we check that the score file is good
+    before reading its contents.
+  * Replaced strcpy() with strncpy() in ScoreListTYPE::DisplayList to avoid
+    crashes when the score file contains garbage (Closes: #188443, part 3).
+  * Made /usr/share/doc/wing-data a symlink to wing.
+
+ -- Samuel Hocevar <sam at zoy.org>  Fri, 11 Apr 2003 06:26:43 +0200
+
+wing (0.7-16) unstable; urgency=low
+
+  * New maintainer.
+  * Removed duplicate changelog in debian/.
+  * Removed spurious log file in /.
+  * Updated standards version to 3.5.9.0.
+  * All code is now g++-3.2 friendly.
+  * Changed weapon-switching keys to F1-F4 instead of 1-4 because Allegro
+    does not properly handle international keyboards.
+  * Added usleep() calls after each blit to avoid eating all CPU.
+  * Wrote the wing(6) manpage.
+  * We now use dpkg-statoverride to register the setgid binary.
+  * Drew a 32-colour icon for wing.
+
+ -- Samuel Hocevar <sam at zoy.org>  Sun, 30 Mar 2003 19:02:39 +0200
+
+wing (0.7-15) unstable; urgency=low
+
+  * remoe empty directory in wing-data.postrm, closes: #161838
+  * fixed spelling in package description, closes: #125483
+
+ -- Eduard Bloch <blade at debian.org>  Sun, 29 Sep 2002 15:14:22 +0200
+
+wing (0.7-14) unstable; urgency=low
+
+  * recompilation against a new Allegro release
+
+ -- Eduard Bloch <blade at debian.org>  Thu, 22 Aug 2002 20:41:20 +0200
+
+wing (0.7-13) unstable; urgency=low
+
+  * recompilation against the stable Allegro release
+  * Patched to quit the program when pressing quit in main menu - for people
+    without a properly configured mouse
+
+ -- Eduard Bloch <blade at debian.org>  Fri, 18 Jan 2002 14:57:09 +0100
+
+wing (0.7-12) unstable; urgency=low
+
+  * recompilation against fixed liballegro-dev, Closes: #122924
+  * corrected BASHism in debian/rules
+
+ -- Eduard Bloch <blade at debian.org>  Sat,  8 Dec 2001 14:44:19 +0100
+
+wing (0.7-11) unstable; urgency=low
+
+  * recompilation for the new Allegro branch
+
+ -- Eduard Bloch <blade at debian.org>  Wed, 21 Nov 2001 23:16:16 +0100
+
+wing (0.7-10) unstable; urgency=low
+
+  * recompilation for the new Allegro
+
+ -- Eduard Bloch <blade at debian.org>  Wed, 17 Oct 2001 20:44:46 +0200
+
+wing (0.7-9) unstable; urgency=low
+
+  * Recompiled for the new Allegro branch
+  * set Depends -> Recommends in wing-data, avoiding possible dependency loops
+  * cosmetical fixes to appease lintian
+
+ -- Eduard Bloch <blade at debian.org>  Tue, 25 Sep 2001 12:37:02 +0200
+
+wing (0.7-8) unstable; urgency=low
+
+  * rebuild, changed Build-Depends: to require Allegro >>3.9.37
+
+ -- Eduard Bloch <blade at debian.org>  Sun, 15 Jul 2001 22:37:04 +0200
+
+wing (0.7-7) unstable; urgency=low
+
+  * removed Build-Depends, misunderstanding was caused by broken dpkg-dev.
+    Closes: #101646
+
+ -- Eduard Bloch <blade at debian.org>  Wed, 20 Jun 2001 21:33:03 +0200
+
+wing (0.7-6) unstable; urgency=low
+
+  * fixed Depends and Conflicts, closes: #101385 and closes: #101416
+
+ -- Eduard Bloch <blade at debian.org>  Tue, 19 Jun 2001 08:17:53 +0200
+
+wing (0.7-5) unstable; urgency=low
+
+  * compiled explicitely for the new allegro packages so even
+    autobuilders should use the right one
+  * splited into binary and data package
+  * no longer upx
+  * scores.dat is no longer a conffile, FHS compliant
+  * hacked main.cpp to chdir correctly, removing useless wrapper
+
+ -- Eduard Bloch <blade at debian.org>  Mon, 28 May 2001 16:07:39 +0200
+
+wing (0.7-4) unstable; urgency=low
+
+  * changed wrapper to removed bashism (Closes: #97059)
+  * moved binary to /usr/games/wing.real, according to FHS
+
+ -- Eduard Bloch <blade at debian.org>  Fri, 11 May 2001 16:20:49 +0200
+
+wing (0.7-3) unstable; urgency=low
+
+  * rebuild with new libs, disabled execution as root for stability
+    reasons. Closes: #96037
+
+ -- Eduard Bloch <blade at debian.org>  Thu,  3 May 2001 08:45:36 +0200
+
+wing (0.7-2) unstable; urgency=low
+
+  * removed cpu specific options, Closes: #84038
+  * removed UPX call until it is available on Debian
+
+ -- Eduard Bloch <blade at debian.org>  Fri,  2 Feb 2001 18:10:50 +0100
+
+wing (0.7-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Eduard Bloch <blade at debian.org>  Sun, 24 Dec 2000 10:46:18 +0100

Added: unstable/wing/debian/compat
===================================================================
--- unstable/wing/debian/compat	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/compat	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1 @@
+4

Added: unstable/wing/debian/control
===================================================================
--- unstable/wing/debian/control	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/control	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,29 @@
+Source: wing
+Section: games
+Priority: optional
+Maintainer: Debian allegro packages maintainers <pkg-allegro-maintainers at lists.alioth.debian.org>
+Uploaders: Sam Hocevar (Debian packages) <sam+deb at zoy.org>
+Build-Depends: liballegro4.2-dev, quilt, debhelper (>= 4.0)
+Standards-Version: 3.6.2
+
+Package: wing
+Architecture: any
+Depends: ${shlibs:Depends}, wing-data
+Description: Galaga-like arcade game
+ WING is a galaga knock-off arcade game. It features high quality
+ pre-rendered graphics, dynamically generated stars in background, single
+ player game against computer controlled opponents, 6 levels of play,
+ digital sound effects, digital music streams, and a high score list.
+
+Package: wing-data
+Architecture: all
+Depends: wing (= ${Source-Version})
+Conflicts: wing (<< 0.7-5)
+Description: graphics and audio data for wing
+ WING is a galaga knock-off arcade game. It features high quality
+ pre-rendered graphics, dynamically generated stars in background, single
+ player game against computer controlled opponents, 6 levels of play,
+ digital sound effects, digital music streams, and a high score list.
+ .
+ This package contains the architecture-independent data for wing. For more
+ information, see the wing package.

Added: unstable/wing/debian/copyright
===================================================================
--- unstable/wing/debian/copyright	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/copyright	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,13 @@
+This package was debianized by Eduard Bloch <blade at debian.org> on
+Sun, 24 Dec 2000 10:46:18 +0100.
+
+It was downloaded from http://wing.sourceforge.net/
+
+Upstream Authors: 
+Programmers: Adam Hiatt, Anil Shrestra 
+Artists: Allbriton Robbins, Adam Hiatt 
+
+Copyright: 
+This program is distributed under the GNU General Public License.
+On Debian systems, the complete text of the GNU General Public License can
+be found in the `/usr/share/common-licenses/GPL' file.

Added: unstable/wing/debian/menu
===================================================================
--- unstable/wing/debian/menu	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/menu	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,3 @@
+?package(wing):needs="X11" section="Games/Arcade" \
+  title="Wing" command="/usr/games/wing" \
+  icon="/usr/share/games/wing/wing.xpm"

Added: unstable/wing/debian/patches/010_makefile.diff
===================================================================
--- unstable/wing/debian/patches/010_makefile.diff	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/patches/010_makefile.diff	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,41 @@
+--- wing-0.7.orig/makefile.unx
++++ wing-0.7/makefile.unx
+@@ -4,20 +4,31 @@
+ TARGET := wing
+ 
+ CC := g++
+-CFLAGS := -g -O3 -m486 
++CFLAGS := -Wall -Wno-deprecated-declarations -g -O2
+ CXXFLAGS := $(CFLAGS)
+ 
+-OBJ := main.o
+-LIBS := `allegro-config --libs` -lstdc++
++OBJ := animationtype.o \
++       bullettype.o \
++       collision.o \
++       enemytype.o \
++       main.o \
++       planetype.o \
++       scorelisttype.o \
++       sound.o \
++       star.o \
++       util.o \
++       additional/apstring.o
++
++LIBS := `allegro-config --libs`
+ 
+ 
+ 
+ wing : $(OBJ)
+ 	$(CC) $(CFLAGS) $(OBJ) -o $(TARGET) $(LIBS)
+ 
+-main.o : main.cpp
+-	$(CC) $(CFLAGS) -c main.cpp 
++.o : .cpp
++	$(CC) $(CFLAGS) -c $^ -o $@
+ 
+ clean:
+-	rm *.o
+-	rm $(TARGET)
++	rm -f *.o additional/*.o
++	rm -f $(TARGET)

Added: unstable/wing/debian/patches/020_misc.diff
===================================================================
--- unstable/wing/debian/patches/020_misc.diff	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/patches/020_misc.diff	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,993 @@
+--- wing-0.7.orig/util.h
++++ wing-0.7/util.h
+@@ -27,9 +27,11 @@
+ #define UTIL_H
+ 
+ #include <ctype.h>
+-#include <fstream.h>
++#include <fstream>
++#include <allegro.h> 
+ #include "additional/apstring.h"
+ #include "additional/apvector.h"
++#include "constants.h"
+ 
+ //==============================================================================
+ // Prototypes
+@@ -49,5 +51,12 @@
+ bool Confirm 	  ( BITMAP *draw_buffer,char *query,int xcoord,int ycoord);
+ void LoadStrings (apvector <apstring> & strings, char * file );
+ 
+-#include "util.cpp"      
++//==========================================================================
++template < class ItemTYPE >
++void Swap ( ItemTYPE & left,ItemTYPE & right )
++{
++	ItemTYPE temp = left;
++   left = right;
++   right = temp;
++}
+ #endif
+--- wing-0.7.orig/enemytype.h
++++ wing-0.7/enemytype.h
+@@ -27,24 +27,24 @@
+ #ifndef _ENEMYTYPE_H
+ #define _ENEMYTYPE_H
+ 
+-#include <fstream.h>
++#include <fstream>
+ #include "bullettype.h"
+ #include "animationtype.h"
+ #include "util.h"
+ 
+ 		struct EnemyNodeTYPE
+       {
+-	  		int            xpos, ypos, dx,dy,health;
++	 		EnemyNodeTYPE  *  next;              // pointer to next node
++		   EnemyNodeTYPE  *  back;              // pointer to previous node
+ 		  	bool				attacking;
+ 		  	bool				dead;         
+-   		unsigned int   TimeOfLastFired;
++   		int   TimeOfLastFired;
+ 	  		WeaponEnum     weapon;
+    		EnemyEnum      TypeOfEnemy;
++	  		int            xpos, ypos, dx,dy,health;
+          StateEnum      state;
+-         int 				explode_stage;
+          int 				state_stage;
+-	 		EnemyNodeTYPE  *  next;              // pointer to next node
+-		   EnemyNodeTYPE  *  back;              // pointer to previous node
++         int 				explode_stage;
+ 
+    	 	// constructors
+ 
+@@ -118,11 +118,10 @@
+       int num_enemies_attacking;
+       int num_enemies_per_level;
+       EnemyNodeTYPE * most_recent;          // ####################### is this necessary ???
+-      BulletTYPE 		 enemy_bullets;
+       AnimationTYPE   enemy_images;
+       AnimationTYPE   explode_images;
+       EnemyNodeTYPE * enemy_list;
++      BulletTYPE 		 enemy_bullets;
+ };
+ 
+-#include "enemytype.cpp"
+-#endif
+\ No newline at end of file
++#endif
+--- wing-0.7.orig/scorelisttype.h
++++ wing-0.7/scorelisttype.h
+@@ -28,8 +28,8 @@
+ #ifndef _SCORELISTTYPE_H
+ #define _SCORELISTTYPE_H
+ 
+-#include <iostream.h>
+-#include <fstream.h>
++#include <iostream>
++#include <fstream>
+ #include <string.h>
+ #include "util.h"
+ #include "additional/apvector.h"
+@@ -69,5 +69,4 @@
+       apvector <ScoreTYPE> list;
+ };
+ 
+-#include "scorelisttype.cpp"
+ #endif
+--- wing-0.7.orig/animationtype.cpp
++++ wing-0.7/animationtype.cpp
+@@ -1,3 +1,5 @@
++#include "animationtype.h"
++
+ //=======================================================
+ AnimationTYPE :: AnimationTYPE ( )
+ 	: mySize ( 0 ), myImageBank ( 0 )
+@@ -7,7 +9,7 @@
+ 	: mySize ( 0 ), myImageBank ( 0 )
+ {
+    apstring source;
+-   ifstream ImageFile;
++   std::ifstream ImageFile;
+    ImageFile.open ( fileName );
+    ImageFile >> mySize;
+    myImageBank.resize ( mySize);
+@@ -19,7 +21,7 @@
+    {
+       ImageFile >> source;
+       myImageBank [index] = load_bmp ((char*) source.c_str(), myPal);
+-      cout << "Loaded OK" << endl;
++      std::cout << "Loaded OK" << std::endl;
+    }
+    ImageFile.close ( );   
+ }
+@@ -30,8 +32,8 @@
+ void AnimationTYPE :: LoadImages ( char * fileName )
+ {
+    apstring source;
+-   BITMAP * Temp = NULL;
+-   ifstream ImageFile;
++   //BITMAP * Temp = NULL;
++   std::ifstream ImageFile;
+    ImageFile.open ( fileName );
+    ImageFile >> mySize;
+    myImageBank.resize ( mySize);
+--- wing-0.7.orig/enemytype.cpp
++++ wing-0.7/enemytype.cpp
+@@ -1,3 +1,6 @@
++#include "enemytype.h"
++extern volatile int timer;
++
+ //========================================================================
+ EnemyTYPE :: EnemyTYPE ( )
+ :	num_enemies_left    		( 0 ),
+@@ -28,14 +31,15 @@
+ //========================================================================
+ void EnemyTYPE :: UpdateAI ( int plane_x, int plane_y )
+ {
+-	EnemyNodeTYPE * scan = enemy_list;
+-   for (; scan != NULL; scan = scan -> next)
++	EnemyNodeTYPE * scan = enemy_list, * next_scan;
++   for (; scan != NULL; scan = next_scan)
+    {
++      next_scan = scan -> next;
+       if ( scan -> health <= 0 && scan->explode_stage == ENEMY_EXPLODE_STAGES - 1 )
+       	DeleteNode ( scan );
+       else
+       {
+-			if ( scan -> attacking )
++			if ( scan -> attacking && ! scan -> dead )
+ 	      {
+    	    	if ( (scan -> xpos >= plane_x && scan -> xpos < plane_x + PLANE_WIDTH) || (scan -> xpos + EnemyWidths [scan->TypeOfEnemy] >= plane_x && scan -> xpos + EnemyWidths [scan->TypeOfEnemy] < plane_x + PLANE_WIDTH))
+       	   {
+@@ -80,7 +84,7 @@
+    explode_images.LoadImages ( explode_file );
+    enemy_images.LoadImages ( sprite_file );
+    enemy_bullets.LoadWeapon ( bullet_file );
+-   ifstream enemy_file;
++   std::ifstream enemy_file;
+    enemy_file.open ( level_file );
+    enemy_file >> num_enemies_per_level;
+    num_enemies_left = num_enemies_per_level;
+@@ -118,7 +122,7 @@
+ 	if  (num_enemies_left == num_enemies_per_level && num_enemies_attacking == 0 )
+    	most_recent = enemy_list;
+ 
+-	while ( most_recent != NULL && most_recent -> attacking )
++	while ( most_recent != NULL && (most_recent -> attacking || most_recent -> dead) )
+ 		most_recent = most_recent -> next;
+ 
+    if ( most_recent != NULL )
+--- wing-0.7.orig/collision.h
++++ wing-0.7/collision.h
+@@ -13,6 +13,7 @@
+ 
+ #include "constants.h"
+ #include "additional/apvector.h"
++#include "bullettype.h"
+ 
+ 
+ struct spr_mask      		// Sprite Mask
+@@ -22,10 +23,10 @@
+  int max_chunk; 				// The number of the last 32 bit chunk in the sprite's bitmap
+  unsigned long int sp_mask[NUM_Y][NUM_CHUNKS]; // The (NUM_Y x (NUM_CHUNKS x 32)) bit Sprite Mask
+ };
++typedef struct spr_mask spr_mask;
+ 
+ void init_sp_bb( apvector<spr_mask> & mask_list  );
+ void mk_spr_mask           (BITMAP *s3, spr_mask & mask);
+ int  check_ppcollision     (const spr_mask & mask1 , int spr1x, int spr1y, const spr_mask & mask2, int spr2x, int spr2y);
+ 
+-#include "collision.cpp"
+-#endif
+\ No newline at end of file
++#endif
+--- wing-0.7.orig/animationtype.h
++++ wing-0.7/animationtype.h
+@@ -29,7 +29,8 @@
+ 
+ #include "additional/apstring.h"
+ #include "additional/apvector.h"
+-#include <fstream.h>
++#include <allegro.h>
++#include <fstream>
+ 
+ class AnimationTYPE
+ {
+@@ -53,6 +54,5 @@
+       apvector < BITMAP* > myImageBank;
+ };
+ 
+-#include "animationtype.cpp"
+ #endif
+ 
+--- wing-0.7.orig/star.cpp
++++ wing-0.7/star.cpp
+@@ -1,3 +1,8 @@
++#include "star.h"
++
++STAR_TYPE  stars [256];
++
++
+ //****************************************************************************
+ void Init_Stars()
+ {
+--- wing-0.7.orig/main.cpp
++++ wing-0.7/main.cpp
+@@ -18,8 +18,8 @@
+  // these must be declared volatile so the optimiser doesn't mess up
+  volatile int timer = 0;
+ 
+-#include <iostream.h>				// for standard I/O routines used in debugging
+-#include "allegro.h"			  		//	libraries for graphics and sound
++#include <iostream>				// for standard I/O routines used in debugging
++#include <allegro.h>			  		//	libraries for graphics and sound
+ #include "constants.h"				// constants for program
+ #include "collision.h"        	// fucnctions for collision detection
+ #include "util.h"						// additional functions for program
+@@ -31,6 +31,7 @@
+ #include "sound.h"					// sound functions
+ #include "star.h"						// functions for stars
+ #include <stdio.h>    		 		// for rand()
++#include <signal.h>				// for signal()
+ #define VERSION 0.7         		// Keep Track of the Version
+ 
+ 
+@@ -46,6 +47,7 @@
+    EnemyTYPE * enemies;
+    int level_index;
+    apvector <apstring> level_names;
++   bool       windowed = false;
+ 
+ 
+ //****************************************************************************
+@@ -72,8 +74,10 @@
+ //****************************************************************************
+ // Functions
+ 
+-int main()
++int main(int argc, char **argv)
+ {
++  chdir("/usr/share/games/wing");
++  if(argc>1 && !strcmp(argv[1],"-w")) windowed = true;
+    Program_Init ();
+    Active_Menu ( );
+ 	Game_Shutdown ();
+@@ -88,13 +92,21 @@
+ }
+ END_OF_FUNCTION(inc_x);
+ //****************************************************************************
++void Segv_Handler ( int sig )
++{
++   signal(SIGSEGV, SIG_IGN);
++   std::cerr << "ouch, we crashed! resetting keyboard state..." << std::endl;
++   remove_keyboard();
++}
++//****************************************************************************
+ void Program_Init ()
+ {
+ 	// turn on Allegro, initialize, set graphics mode
+    allegro_init();
+-   set_gfx_mode( GFX_AUTODETECT, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
++   set_gfx_mode( windowed ? GFX_AUTODETECT_WINDOWED : GFX_AUTODETECT, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+    install_keyboard();
+ 
++signal(SIGSEGV, Segv_Handler);
+    // allocate the memory buffer -- double buffering, load palette
+    buffer = create_bitmap (SCREEN_W, SCREEN_H);
+    menu_buffer = create_bitmap (SCREEN_W, SCREEN_H);
+@@ -153,6 +165,18 @@
+          fade_in ( MenuPal,5 );
+          entering_menu = false;
+       }
++
++// Emergency quit with Escape
++
++      if ( key [KEY_ESC] )
++      {
++	     	play_sample(menu_beep , 127, 127, 1000, 0);
++			clear_keybuf();
++			break;
++      }
++
++
++      
+ 		// bitmask to determine if 1st mouse button is pressed
+    	if ( mouse_x >= BUTTON_LEFT && mouse_x <= BUTTON_RIGHT)
+ 		{
+@@ -229,14 +253,14 @@
+    set_pallete ( MenuPal );
+ 	bool changed = false;
+ 	ScoreListTYPE score_list;
+-   score_list.ReadFromFile ("scores.dat");
++   score_list.ReadFromFile ("/var/games/wing.scores");
+    SAMPLE *menu_beep;
+    menu_beep = load_sample ("sound/menuitem.wav");
+ 
+    AnimationTYPE  HS_Images;
+    HS_Images.LoadImages ( "images/hsimages.dat");
+    BITMAP * score_menu_buffer = NULL;
+-   BITMAP * title_sprite = load_bmp ( "images/hstitle.bmp", MenuPal );
++   //BITMAP * title_sprite = load_bmp ( "images/hstitle.bmp", MenuPal );
+    score_menu_buffer = create_bitmap (SCREEN_W, SCREEN_H);
+    clear (score_menu_buffer);
+ 
+@@ -250,12 +274,13 @@
+       score_list.DisplayList ( score_menu_buffer );
+       show_mouse ( score_menu_buffer );
+ 		blit(score_menu_buffer, screen, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
++		usleep(10000);
+ 
+       if ( key [KEY_ESC] )
+       {
+ 	     	play_sample(menu_beep , 127, 127, 1000, 0);
+ 	      if (changed)
+-		   	score_list.WriteToFile ("scores.dat");
++		   	score_list.WriteToFile ("/var/games/wing.scores");
+ 			clear_keybuf();
+ 			break;
+       }
+@@ -282,7 +307,7 @@
+             {
+             	play_sample(menu_beep , 127, 127, 1000, 0);
+ 		         if (changed)
+-				   	score_list.WriteToFile ("scores.dat");
++				   	score_list.WriteToFile ("/var/games/wing.scores");
+ 					clear_keybuf();
+         			break;
+ 				}
+@@ -303,7 +328,7 @@
+  	clear (screen);
+    set_palette (MenuPal);
+  	ScoreListTYPE score_list;
+-   score_list.ReadFromFile ("scores.dat");
++   score_list.ReadFromFile ("/var/games/wing.scores");
+ 
+    if ( plane_object.GetScore() < score_list.Lowest_Score () )
+    	return;
+@@ -312,7 +337,7 @@
+    if ( name.length() == 0 )
+    	name = "anonymous";
+    score_list.InsertNewEntry ( name, plane_object.GetScore() );
+-   score_list.WriteToFile ("scores.dat");
++   score_list.WriteToFile ("/var/games/wing.scores");
+    set_pallete ( MenuPal );
+ 	Display_High_Scores ();
+  }
+@@ -326,7 +351,7 @@
+    AnimationTYPE  Option_Images;
+    Option_Images.LoadImages ( "images/oimages.dat");
+    BITMAP * option_menu_buffer = NULL;
+-   BITMAP * title_sprite = load_bmp ( "images/otitle.bmp", MenuPal );
++   //BITMAP * title_sprite = load_bmp ( "images/otitle.bmp", MenuPal );
+    option_menu_buffer = create_bitmap (SCREEN_W, SCREEN_H);
+    clear (option_menu_buffer);
+ 
+@@ -342,6 +367,7 @@
+       textprintf(option_menu_buffer, font, 320 , 280, 15, strcpy (temp,NumToString (stream_vol).c_str()));
+       show_mouse ( option_menu_buffer );
+ 		blit(option_menu_buffer, screen, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
++		usleep(10000);
+ 
+       if ( key [KEY_ESC] )
+       {
+@@ -452,11 +478,11 @@
+    	intro_counter --;
+ 		Move_Stars ();
+ 	   plane_object.Display ( buffer );
+-     	char temp [3];
++     	//char temp [3];
+       textprintf (buffer, font, 300 , 250, 15, "Level 1");
+ 
+       blit(buffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); // Copy Buffer to VRam
+-      while (( timer - startTimer <= 15 ));
++      while (( timer - startTimer <= 15 )) usleep(2000);
+ 	      startTimer = timer;
+    }
+ }
+@@ -466,7 +492,7 @@
+ 
+    bool ok_to_add = false;
+    int pause_counter = NEW_LEVEL_PAUSE;
+-	int rand_attackers;
++	int rand_attackers = 0;
+    int startTimer = 0;
+    int add_enemy_timer = 0;
+    int add_group_timer = 0;
+@@ -542,7 +568,7 @@
+    	   }
+ 		}         
+ 
+-      if ( plane_object.GetHealth () <= 0 )
++      if ( plane_object.GetHealth () <= 0 && !plane_object.GetDead () )
+       {
+       	plane_object.SetDead (true);
+ 	      play_sample(die_sound , sample_vol, 127, 1000, 0);
+@@ -551,7 +577,7 @@
+          fire_sound = shoot_sounds [laser];
+ 		}
+ 
+-      if ( plane_object.GetNumLives () == 0 )
++      if ( plane_object.GetNumLives () == 0 && !plane_object.GetDead () )
+       {
+        	clear_keybuf ();
+       	GAME_STARTED = false;
+@@ -570,22 +596,22 @@
+       if (!(key[KEY_LEFT] || key[KEY_RIGHT]) || (key[KEY_LEFT] && key[KEY_RIGHT] ))
+          plane_object.Normalize ( );
+ 
+-      if ( key[KEY_1] )
++      if ( key[KEY_F1] || key[KEY_1] )
+       {
+ 			plane_object.SetWeapon ( laser );
+          fire_sound = shoot_sounds [laser];
+ 		}
+-      if ( key[KEY_2] )
++      if ( key[KEY_F2] || key[KEY_2] )
+       {
+ 			plane_object.SetWeapon ( minigun );
+          fire_sound = shoot_sounds [minigun];
+ 		}
+-      if ( key[KEY_3] )
++      if ( key[KEY_F3] || key[KEY_3] )
+ 		{
+ 			plane_object.SetWeapon ( plasma );
+          fire_sound = shoot_sounds [plasma];
+ 		}
+-      if ( key[KEY_4] )
++      if ( key[KEY_F4] || key[KEY_4] )
+       {
+ 			plane_object.SetWeapon ( torpedo );
+          fire_sound = shoot_sounds [torpedo];
+@@ -623,7 +649,7 @@
+       blit(buffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); // Copy Buffer to VRam
+ 
+       // Lock at 60FPS -- 15 represents 15 milliseconds
+-      while (( timer - startTimer <= 15 ));
++      while (( timer - startTimer <= 15 )) usleep(2000);
+ 	      startTimer = timer;
+    }
+    stream_stop();
+@@ -650,6 +676,7 @@
+ void Display_Menu ()
+ {
+ 	blit(menu_buffer, screen, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
++	usleep(10000);
+ }
+ 
+ //****************************************************************************
+@@ -661,7 +688,7 @@
+ 
+    for (; enemy_node != NULL; enemy_node = enemy_node -> next )
+    {
+-   	if ( enemy_node -> attacking && enemy_node -> ypos + EnemyHeights [enemy_node->TypeOfEnemy] > 0)
++   	if ( ! enemy_node -> dead && enemy_node -> attacking && enemy_node -> ypos + EnemyHeights [enemy_node->TypeOfEnemy] > 0)
+       {
+ 			for ( ; bullet_list != NULL ; bullet_list = bullet_list -> next )
+          {
+@@ -673,7 +700,7 @@
+ 				}
+ 			}
+ 			bullet_list = plane_bullets->GetBulletList ();
+-		 	if ( check_ppcollision ( enemies.myEnemyMasks[enemy_node->TypeOfEnemy],enemy_node->xpos, enemy_node->ypos, *(plane_object.GetMask()), plane_object.GetXPos(), plane_object.GetYPos() ))
++		 	if ( plane_object.GetVuln () && check_ppcollision ( enemies.myEnemyMasks[enemy_node->TypeOfEnemy],enemy_node->xpos, enemy_node->ypos, *(plane_object.GetMask()), plane_object.GetXPos(), plane_object.GetYPos() ))
+ 	      {
+ 				plane_object.SetHealth ( 0 );
+       	   enemy_node-> health = 0 ;
+@@ -688,7 +715,7 @@
+     		}
+ 		}
+ 	}
+-   if ( ! plane_object.GetDead () )
++   if ( plane_object.GetVuln () )
+    {
+ 	   BulletTYPE * enemy_bullets = enemies.GetBullets ();
+    	BulletNodeTYPE * enemy_bullet_list = enemy_bullets->GetBulletList();
+--- wing-0.7.orig/bullettype.h
++++ wing-0.7/bullettype.h
+@@ -30,7 +30,7 @@
+ #include "animationtype.h"
+ #include "collision.h"
+ #include "additional/apvector.h"
+-#include <fstream.h>
++#include <fstream>
+ #include "util.h"
+ 
+ struct BulletNodeTYPE
+@@ -70,14 +70,13 @@
+       void UpdateAndDisplayShot  ( BITMAP * buffer );	 // updates shot queue
+       BulletNodeTYPE * GetBulletList   (  );
+       BITMAP   * GetImage ( int index );
+-      spr_mask * GetMask ( int index );
++      struct spr_mask * GetMask ( int index );
+ 
+    private :
+-   	int 		     myNumBullets;
+ 	   BulletNodeTYPE  *   myBullets;
++   	int 		     myNumBullets;
+       AnimationTYPE myBulletImages;
+       apvector <spr_mask > myBulletMask;
+ };
+ 
+-#include "bullettype.cpp"
+ #endif
+--- wing-0.7.orig/sound.cpp
++++ wing-0.7/sound.cpp
+@@ -1,3 +1,11 @@
++#include "sound.h"
++
++AUDIOSTREAM *stream = NULL;
++FILE        *stream_file  = NULL;
++WFXSTREAM    wfx;
++int 			stream_vol = DEFAULT_STREAM_VOL;
++int 			sample_vol = DEFAULT_SAMPLE_VOL;
++
+ void stream_callback(void)
+ {
+ 	if (stream_file && stream)
+@@ -67,9 +75,9 @@
+ 
+ void stream_stop()
+ {
+-  fclose(stream_file);
+-  stream_file = NULL;
+-  stop_audio_stream(stream);
++//  fclose(stream_file);
++//  stream_file = NULL;
++//  stop_audio_stream(stream);
+ }
+ 
+ 
+--- wing-0.7.orig/planetype.cpp
++++ wing-0.7/planetype.cpp
+@@ -1,3 +1,5 @@
++#include "planetype.h"
++extern volatile int timer;
+ 
+ //========================================================================
+ PlaneTYPE :: PlaneTYPE ( )
+@@ -7,6 +9,7 @@
+   myImageIndex ( 0 ),
+   explode_stage ( 0 ),  
+   last_shot_time ( 0 ),
++  invuln_count ( 0 ),
+   myScore		(0),
+   myNumLives   ( MAX_NUM_LIVES )
+ { }
+@@ -80,6 +83,11 @@
+ 	return dead;
+ }
+ //========================================================================
++bool PlaneTYPE :: GetVuln ( ) const
++{
++	return !dead && !invuln_count;
++}
++//========================================================================
+ int PlaneTYPE :: GetNumLives ( ) const
+ {
+ 	return myNumLives;
+@@ -94,7 +102,12 @@
+ {
+ 	myBullets.UpdateAndDisplayShot ( buffer );
+    if ( ! dead )
+-		draw_sprite ( buffer, myArrayOfImages.GetImage( myImageIndex ), myXPos, myYPos );
++   {
++		if (invuln_count > 0)
++			invuln_count--;
++                if (!(invuln_count & 1))
++			draw_sprite ( buffer, myArrayOfImages.GetImage( myImageIndex ), myXPos, myYPos );
++   }
+ 	else if ( explode_stage != PLANE_EXPLODE_STAGES - 1 )
+    {
+ 		draw_sprite ( buffer, explode_images.GetImage( explode_stage ), myXPos, myYPos );
+@@ -183,5 +196,6 @@
+    myImageIndex = myArrayOfImages.Length () / 2;
+    dead = false;
+    explode_stage = 0;
++   invuln_count = 100;
+ }
+ //=======================================================================
+--- wing-0.7.orig/planetype.h
++++ wing-0.7/planetype.h
+@@ -27,7 +27,7 @@
+ #ifndef _PlaneTYPE_H
+ #define _PlaneTYPE_H
+ 
+-#include <fstream.h>
++#include <fstream>
+ #include "bullettype.h"
+ #include "animationtype.h"
+ #include "util.h"
+@@ -63,6 +63,7 @@
+       BITMAP *    GetImage      ( int index ) const;
+       WeaponEnum  GetWeapon     ( ) const;
+       bool			GetDead		  ( ) const;
++      bool			GetVuln		  ( ) const;
+       long int    GetScore      ( ) const;
+       int         GetXPos       ( ) const;
+       int         GetYPos       ( ) const;
+@@ -82,11 +83,11 @@
+       BulletTYPE          myBullets;
+       AnimationTYPE       myArrayOfImages;
+       AnimationTYPE       explode_images;
+-      unsigned int	     last_shot_time;
++      int                 last_shot_time;
++      int                 invuln_count;
+       long int   			  myScore;
+       int                 myNumLives;
+       apvector <spr_mask > myPlaneMasks;
+ };
+ 
+-#include "planetype.cpp"
+ #endif
+--- wing-0.7.orig/star.h
++++ wing-0.7/star.h
+@@ -1,6 +1,9 @@
+ #ifndef _STAR_H
+ #define _STAR_H
+ 
++#include <allegro.h>
++#include "constants.h"
++
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+  * StarTYPE																				          *
+  *																									    *
+@@ -15,7 +18,7 @@
+ } STAR, *STAR_PTR;
+ 
+ 
+-STAR_TYPE  stars [256];
++extern STAR_TYPE  stars [];
+ 
+ 
+ void Draw_Stars ( BITMAP * buffer );
+@@ -23,5 +26,4 @@
+ void Init_Stars ( );
+ 
+ 
+-#include "star.cpp"
+ #endif
+--- wing-0.7.orig/scorelisttype.cpp
++++ wing-0.7/scorelisttype.cpp
+@@ -1,3 +1,5 @@
++#include "scorelisttype.h"
++
+ //==========================================================================
+ ScoreListTYPE :: ScoreListTYPE ()
+ {
+@@ -19,41 +21,54 @@
+ //==========================================================================
+ void ScoreListTYPE :: ReadFromFile ( char * file_name )
+ {
+-	ifstream score_file;
++   apstring newname;
++   int newscore;
++	std::ifstream score_file;
+    score_file.open (file_name);
+ 
+    // I love c++
+-   for ( int i=0; i < NUM_HIGH_SCORES && score_file >> list[i].name >> list[i].score; i++ )
+-     	;
++   for ( int i=0; i < NUM_HIGH_SCORES; i++ ) {
++	score_file >> newname;
++	score_file >> newscore;
++	if (!newscore || !score_file.good())
++		break;
++	list[i].name = newname;
++	list[i].score = newscore;
++	}
+    score_file.close ();
+ }
+ //==========================================================================
+ void ScoreListTYPE :: DisplayList ( BITMAP * buffer )
+ {
+  	char temp_c_str [10];
+-	for ( int i = 1; i <= NUM_HIGH_SCORES; i++ )
++	for ( int i = 0; i < NUM_HIGH_SCORES; i++ )
+    {
+       apstring converter ("");
+-      converter = NumToString ( i );
++      converter = NumToString ( i+1 );
+       converter += '.';
+ 
+-      strcpy (temp_c_str, converter.c_str());
+-   	textprintf(buffer, font , 300 , 150+20*i, 15, temp_c_str );
+-      strcpy (temp_c_str,list [i-1].name.c_str());
+-   	textprintf(buffer, font , 328 , 150+20*i, 15,  temp_c_str );
+-      converter = NumToString (list [i-1].score);
+-      strcpy (temp_c_str,converter.c_str());
+-   	textprintf(buffer, font , 430 , 150+20*i, 15,  temp_c_str );
++      strncpy (temp_c_str, converter.c_str(), 10);
++      temp_c_str[9] = '\0';
++   	textprintf(buffer, font , 300 , 170+20*i, 15, temp_c_str );
++
++      strncpy (temp_c_str, list [i].name.c_str(), 10);
++      temp_c_str[9] = '\0';
++   	textprintf(buffer, font , 328 , 170+20*i, 15,  temp_c_str );
++
++      converter = NumToString (list [i].score);
++      strncpy (temp_c_str, converter.c_str(), 10);
++      temp_c_str[9] = '\0';
++   	textprintf(buffer, font , 430 , 170+20*i, 15,  temp_c_str );
+    }
+ 
+ }
+ //==========================================================================
+ void ScoreListTYPE :: WriteToFile ( char * file_name )
+ {
+-	ofstream score_file;
++	std::ofstream score_file;
+    score_file.open (file_name);
+    for ( int i = 0; i < NUM_HIGH_SCORES; i++ )
+-		score_file << list [i].name <<" "<<list[i].score << endl;
++		score_file << list [i].name <<" "<<list[i].score << std::endl;
+    score_file.close ();
+ }
+ //==========================================================================
+--- wing-0.7.orig/collision.cpp
++++ wing-0.7/collision.cpp
+@@ -1,3 +1,5 @@
++#include "collision.h"
++
+ //****************************************************************************
+ void init_sp_bb( apvector<spr_mask> & mask_list  )
+ // This function initializes the bounding box used to do the initial collision detection
+@@ -28,7 +30,7 @@
+ 
+ 	  for(z=0; z<NUM_CHUNKS; z++)
+      {
+-			for (x1=(z*32); x1<((z*32)+32); x1++)
++			for (x1=(z*32); x1<(z*32+32); x1++)
+          {
+ 				p=getpixel(s3,x1,y1);
+ 			   if (p>0)
+@@ -39,7 +41,7 @@
+                	bb_height=y1;
+ 			      if (x1>bb_width)
+                	bb_width=x1;
+-      			mask.sp_mask[y1][z]+=0x80000000 >> (x1 - ((z+1)*32));
++      			mask.sp_mask[y1][z]+=1<<(z*32+32-1-x1);
+ 			   }
+ 			}
+ 		}
+--- wing-0.7.orig/additional/apvector.cpp
++++ wing-0.7/additional/apvector.cpp
+@@ -4,9 +4,10 @@
+ //
+ //****************************************************************
+ 
+-#include <iostream.h>
++#include <iostream>
+ #include <stdlib.h>
+ #include <assert.h>
++#include "apvector.h"
+ 
+ //****************************************************************
+ //********           Constructors / destructor         ***********
+@@ -111,8 +112,8 @@
+ 
+ {
+     if (k < 0 || k >= mSize) {
+-        cerr << "Illegal vector index: " << k << " max index = "
+-             << (mSize-1) << endl;
++        std::cerr << "Illegal vector index: " << k << " max index = "
++                  << (mSize-1) << std::endl;
+         abort();
+     }
+     return mList[k]; 
+@@ -128,8 +129,8 @@
+ 
+ {
+     if (k < 0 || k >= mSize) {
+-        cerr << "Illegal vector index: " << k << " max index = "
+-             << (mSize-1) << endl;
++        std::cerr << "Illegal vector index: " << k << " max index = "
++                  << (mSize-1) << std::endl;
+         abort();
+     }
+     return mList[k]; 
+--- wing-0.7.orig/additional/apstring.h
++++ wing-0.7/additional/apstring.h
+@@ -1,8 +1,8 @@
+ #ifndef _APSTRING_H
+ #define _APSTRING_H
+ 
+-#include <iostream.h>
+-#include "bool.h"
++#include <iostream>
++//#include "bool.h"
+ 
+ //****************************************************************
+ //
+@@ -79,9 +79,9 @@
+ 
+ // I/O functions:
+ 
+-ostream &operator<< (ostream &os, const apstring &str);
+-istream &operator>> (istream &is, apstring &str); 
+-istream &getline(istream &is, apstring &str);  
++std::ostream &operator<< (std::ostream &os, const apstring &str);
++std::istream &operator>> (std::istream &is, apstring &str); 
++std::istream &getline(std::istream &is, apstring &str);  
+           
+ // Concatenation operators:
+ 
+@@ -98,7 +98,7 @@
+ bool operator>  (const apstring &str1, const apstring &str2);  
+ bool operator>= (const apstring &str1, const apstring &str2);
+ 
+-#include "apstring.cpp"
++//#include "apstring.cpp"
+ // Continued in apstring.cpp...
+ 
+ 
+--- wing-0.7.orig/additional/apstring.cpp
++++ wing-0.7/additional/apstring.cpp
+@@ -141,8 +141,8 @@
+ 
+ {
+     if (k < 0 || k >= mLength) {
+-        cerr << "index out of range: " << k << " string: "
+-             << mCstring << endl;
++        std::cerr << "index out of range: " << k << " string: "
++                  << mCstring << std::endl;
+         assert (0 <= k && k < mLength);
+     }
+     return mCstring[k];
+@@ -157,8 +157,8 @@
+ 
+ {
+     if (k < 0 || k >= mLength) {
+-        cerr << "index out of range: " << k << " string: "
+-             << mCstring << endl;
++        std::cerr << "index out of range: " << k << " string: "
++                  << mCstring << std::endl;
+         assert(0 <= k && k < mLength);
+     }
+     return mCstring[k];
+@@ -314,7 +314,7 @@
+ //********             I/O functions                 *************
+ //****************************************************************
+ 
+-ostream &operator<< (ostream &os, const apstring &str)
++std::ostream &operator<< (std::ostream &os, const apstring &str)
+ 
+ // Inserts the string into os and returns os.
+ 
+@@ -324,13 +324,14 @@
+ 
+ //****************************************************************
+ 
+-istream &operator>> (istream &is, apstring &str)
++std::istream &operator>> (std::istream &is, apstring &str)
+ 
+ // Skips all white space and reads one word from is and returns is.
+ 
+ {
+     char buf[MAX_LENGTH];
+ 
++    memset(buf, 0, MAX_LENGTH);
+     is >> buf;
+     str = buf;
+     return is;
+@@ -338,7 +339,7 @@
+ 
+ //****************************************************************
+ 
+-istream &getline(istream &is, apstring &str)
++std::istream &getline(std::istream &is, apstring &str)
+ 
+ // Reads a line from input stream is into the string str
+ {
+--- wing-0.7.orig/bullettype.cpp
++++ wing-0.7/bullettype.cpp
+@@ -1,3 +1,5 @@
++#include "bullettype.h"
++
+ //***************************************************************************
+ BulletTYPE :: BulletTYPE ( )
+ : myBullets    ( NULL ),
+--- wing-0.7.orig/util.cpp
++++ wing-0.7/util.cpp
+@@ -1,3 +1,5 @@
++#include "util.h"
++
+ //==========================================================================
+ 
+ apstring NumToString ( long int i )
+@@ -69,17 +71,10 @@
+       case 3  : return ATTACKING_4;
+       case 4  : return ATTACKING_5;
+       case 5  : return ATTACKING_6;
++      default : return ATTACKING_1;
+    }
+ }
+ //==========================================================================
+-template < class ItemTYPE >
+-void Swap ( ItemTYPE & left,ItemTYPE & right )
+-{
+-	ItemTYPE temp = left;
+-   left = right;
+-   right = temp;
+-}
+-//==========================================================================
+ apstring GetText ( BITMAP * draw_buffer, char *msg,char * query, int xcoord, int ycoord,int length )
+ {
+  	char temp;
+@@ -98,6 +93,7 @@
+       textprintf (draw_buffer,font,xcoord + text_length(font, query)+8, ycoord+70,15, strcpy ( temp_string,name_string.c_str()));
+       show_mouse ( draw_buffer );
+ 		blit(draw_buffer, screen, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
++		usleep(10000);
+       poll_keyboard ();
+  	   if ( key [KEY_ENTER] )
+       {
+@@ -174,6 +170,7 @@
+       textprintf(draw_buffer, font, xcoord + 135 , ycoord + 70, 15, "No");
+       show_mouse ( draw_buffer );
+ 		blit(draw_buffer, screen, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
++		usleep(10000);
+ 
+       if (key [KEY_ENTER])
+       {
+@@ -217,7 +214,7 @@
+  void LoadStrings (apvector <apstring> & strings, char * file_name )
+  {
+  	int size;
+-   ifstream file;
++   std::ifstream file;
+    file.open ( file_name );
+    file >> size;
+    strings.resize ( size);
+--- wing-0.7.orig/sound.h
++++ wing-0.7/sound.h
+@@ -3,6 +3,7 @@
+ 
+ #include <stdio.h>
+ #include <string.h>
++#include <allegro.h>
+ #include "constants.h"
+ 
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+@@ -24,11 +25,11 @@
+   int played;
+ } WFXSTREAM;
+ 
+-AUDIOSTREAM *stream = NULL;
+-FILE        *stream_file  = NULL;
+-WFXSTREAM    wfx;
+-int 			stream_vol = DEFAULT_STREAM_VOL;
+-int 			sample_vol = DEFAULT_SAMPLE_VOL;
++extern AUDIOSTREAM *stream;
++extern FILE        *stream_file;
++extern WFXSTREAM    wfx;
++extern int 			stream_vol;
++extern int 			sample_vol;
+ 
+ void install_stream();
+ void stream_start();
+@@ -36,5 +37,4 @@
+ void stream_stop();
+ 
+ 
+-#include "sound.cpp"
+ #endif

Added: unstable/wing/debian/patches/series
===================================================================
--- unstable/wing/debian/patches/series	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/patches/series	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,2 @@
+010_makefile.diff -p1
+020_misc.diff -p1

Added: unstable/wing/debian/rules
===================================================================
--- unstable/wing/debian/rules	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/rules	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,80 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
+	touch configure-stamp
+
+build: configure-stamp build-stamp
+build-stamp:
+	dh_testdir
+	make -f makefile.unx
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	# clean up after the build process.
+	-$(MAKE) -f makefile.unx clean
+	QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
+	dh_clean
+
+install: build
+	dh_testdir -pwing
+	dh_testroot -pwing
+	dh_clean -k -pwing
+	dh_installdirs -pwing usr/games var/games
+
+	# install the package into debian/wing.
+	install `pwd`/wing `pwd`/debian/wing/usr/games/wing
+
+# Build architecture-independent files here.
+binary-indep: build install wing-data
+# We have nothing to do by default.
+
+wing-data: 
+	dh_testdir -pwing-data
+	dh_testroot -pwing-data
+	dh_installdirs -pwing-data usr/share/doc usr/share/games/wing
+	cp -a images levels sound debian/wing-data/usr/share/games/wing
+	ln -s wing `pwd`/debian/wing-data/usr/share/doc/wing-data
+	#dh_installdocs -pwing-data
+	#dh_installchangelogs -pwing-data
+	dh_compress -pwing-data
+	dh_fixperms -pwing-data
+	dh_installdeb -pwing-data
+	dh_gencontrol -pwing-data
+	dh_md5sums -pwing-data
+	dh_builddeb -pwing-data
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir -pwing
+	dh_testroot -pwing
+	dh_installdirs -pwing usr/share/games/wing
+	cp debian/wing.xpm debian/wing/usr/share/games/wing/
+	dh_installdocs -pwing README
+	dh_installmenu -pwing
+	dh_installman -pwing debian/wing.6
+	dh_installinfo -pwing
+	dh_installchangelogs -pwing
+#	dh_link -pwing
+	dh_strip -pwing
+	dh_compress -pwing
+	dh_fixperms -pwing
+#	dh_makeshlibs -pwing
+	dh_installdeb -pwing
+	dh_shlibdeps -pwing
+	dh_gencontrol -pwing
+	dh_md5sums -pwing
+	dh_builddeb -pwing
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure


Property changes on: unstable/wing/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: unstable/wing/debian/wing.6
===================================================================
--- unstable/wing/debian/wing.6	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/wing.6	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,51 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH WING 6 "26 March 2003"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+wing \- a galaga clone
+.SH SYNOPSIS
+.B wing
+.RI [ -w ]
+.SH DESCRIPTION
+.B WING
+(Wing Is Not Galaga) is an arcade game featuring a player-controlled
+starship and computer-controlled opponents. There are six levels; to go
+to the next level you need to destroy all opponents in the current level.
+.SH OPTIONS
+.TP
+\fB\-w\fR
+run wing in windowed mode.
+.SH KEYS
+.TP
+.B Left, Right, Up, Down
+Move the ship across the screen.
+.TP
+.B Ctrl
+Fire.
+.TP
+.B F1, F2, F3, F4
+Change current weapon. Available weapons are laser (default), minigun,
+plasma and torpedo.
+.TP
+.B Esc
+Escape from the current menu. If in the main menu, quits the game.
+.BR
+.SH AUTHOR
+Wing was written by Adam Hiatt <cthulhu at grex.org> and Anil Shrestra.
+
+This manual page was written by Sam Hocevar <sam at zoy.org> for the Debian
+GNU/Linux system (but may be used by others).

Added: unstable/wing/debian/wing.postinst
===================================================================
--- unstable/wing/debian/wing.postinst	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/wing.postinst	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+case "$1" in
+  configure)
+    if ! dpkg-statoverride --list /usr/games/wing >/dev/null; then
+      dpkg-statoverride --update --add root games 2755 /usr/games/wing
+    fi
+    # Fix old things
+    if ! test -f /var/games/wing.scores; then
+      if test -f /var/games/wing/scores.dat; then
+        mv /var/games/wing/scores.dat /var/games/wing.scores
+        rm -f /var/games/wing/scores.default
+        rmdir /var/games/wing >/dev/null 2>&1 || true
+      else
+        cat >/var/games/wing.scores <<EOF
+anonymous 0
+anonymous 0
+anonymous 0
+anonymous 0
+anonymous 0
+anonymous 0
+anonymous 0
+anonymous 0
+anonymous 0
+anonymous 0
+EOF
+      fi
+    fi
+    # Get rid of all the cruft from earlier wing-data packages
+    if test -d /var/games/wing; then
+      rm -Rf /var/games/wing
+    fi
+    # Fix perms, just in case
+    chown root:games /var/games/wing.scores
+    chmod 0664 /var/games/wing.scores
+    ;;
+  abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+  *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1
+    ;;
+esac
+
+#DEBHELPER#
+

Added: unstable/wing/debian/wing.postrm
===================================================================
--- unstable/wing/debian/wing.postrm	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/wing.postrm	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+case "$1" in
+  purge|remove)
+    if dpkg-statoverride --list /usr/games/wing >/dev/null; then
+      dpkg-statoverride --remove /usr/games/wing
+    fi
+    rm -f /var/games/wing.scores
+    ;;
+  upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+  *)
+    echo "postrm called with unknown argument \`$1'" >&2
+    exit 1
+    ;;
+esac
+
+#DEBHELPER#
+

Added: unstable/wing/debian/wing.xpm
===================================================================
--- unstable/wing/debian/wing.xpm	2006-03-30 10:33:06 UTC (rev 4)
+++ unstable/wing/debian/wing.xpm	2006-03-30 10:56:35 UTC (rev 5)
@@ -0,0 +1,59 @@
+/* XPM */
+static char * wing_xpm[] = {
+"32 32 24 1",
+" 	c None",
+".	c #7F0000",
+"+	c #999999",
+"@	c #4C4C4C",
+"#	c #FF00FF",
+"$	c #00FFFF",
+"%	c #E5E5E5",
+"&	c #666667",
+"*	c #007F00",
+"=	c #FF0000",
+"-	c #191919",
+";	c #7F7F00",
+">	c #00007F",
+",	c #00FF00",
+"'	c #7F007F",
+")	c #FFFFFF",
+"!	c #B2B2B2",
+"~	c #333333",
+"{	c #007F7F",
+"]	c #FFFF00",
+"^	c #0000FF",
+"/	c #CCCCCC",
+"(	c #7F7F7F",
+"_	c #000000",
+"                                ",
+"                                ",
+"                                ",
+"                                ",
+"               >>^              ",
+"              >   ^             ",
+"             >     ^            ",
+"           ~ > >>^ ^ @          ",
+"          ~&~>>   ^>~&-         ",
+"          ^{^>  {  >^{^         ",
+"  >       ^{^~ {!^ ~^{^       > ",
+"  >     ~&^{^&+&(@+&^{^~~     > ",
+" >^  @(++(^{^!++/(+!^{^!+++(  ^>",
+" >^((&+++!{{^!(!!(&!{{^!++++(&^>",
+" ^^&(((!++^$^ &+((& ^$^/+!+(&&^^",
+" >^((&+++/^{^ >((>> ^{^!++++(&^>",
+" ^{(((++!+{$^^>(({>^{$^!!+!(&&{^",
+" >^(((+++!^$^ ~((&- ^$^+!++((&^>",
+" ^{&&&(!++{{^! >>> !{{^!++!(@@{^",
+" ^{&&&(!++{{^! >>> !{{^!++!(@@{^",
+" ^^  --~~({$^~!!${!&{$^&@~~-  ^^",
+"  ^      -{$^->$!{>-{$^-      ^ ",
+"  >       {$^ >{){> {$^       > ",
+"          {$^ >^$^> {$^         ",
+"          ((@  >>>  ((@         ",
+"          ^^>       ^^>         ",
+"          &~&       &~&         ",
+"           (         (          ",
+"                                ",
+"                                ",
+"                                ",
+"                                "};




More information about the Pkg-allegro-commits mailing list