debian/0000755000000000000000000000000012216272660007172 5ustar debian/source/0000755000000000000000000000000012216115657010474 5ustar debian/source/format0000644000000000000000000000001412216115657011702 0ustar 3.0 (quilt) debian/control0000644000000000000000000000252712216115657010605 0ustar Source: wing Section: games Priority: optional Maintainer: Debian Games Team Uploaders: Barry deFreese Build-Depends: debhelper (>= 9), liballegro4-dev Standards-Version: 3.9.4 Homepage: http://wing.sourceforge.net/ Vcs-Git: git://anonscm.debian.org/pkg-games/wing.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/wing.git;a=summary Package: wing Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, wing-data (= ${source:Version}) 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: ${misc:Depends} Breaks: 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. debian/wing.desktop0000644000000000000000000000030412216115657011530 0ustar [Desktop Entry] Name=WING Comment=Play Galaga-like arcade game Exec=wing Icon=wing Terminal=false Type=Application Categories=Game;ArcadeGame; Keywords=game;arcade;recreation; StartupNotify=false debian/compat0000644000000000000000000000000212216115657010372 0ustar 9 debian/wing.preinst0000644000000000000000000000032712216115657011550 0ustar #!/bin/sh # dpkg does not replace symlinks with directories and vice versa, therefore # maintainer scripts need to be used. set -e if [ -L /usr/share/doc/wing ] ; then rm -f /usr/share/doc/wing fi #DEBHELPER# debian/wing.install0000644000000000000000000000013412216115657011526 0ustar wing usr/games debian/wing.xpm usr/share/pixmaps debian/wing.desktop usr/share/applications debian/wing.postinst0000644000000000000000000000246312216115657011752 0ustar #!/bin/sh set -e DOCDIR="/usr/share/doc/wing" 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 <&2 exit 1 ;; esac #DEBHELPER# debian/wing.docs0000644000000000000000000000000712216115657011007 0ustar README debian/wing.60000644000000000000000000000276612216115657010242 0ustar .\" 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 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 and Anil Shrestra. This manual page was written by Sam Hocevar for the Debian GNU/Linux system (but may be used by others). debian/wing.manpages0000644000000000000000000000001612216115657011652 0ustar debian/wing.6 debian/wing.xpm0000644000000000000000000000303312216115657010665 0ustar /* 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", " ", " ", " ", " ", " >>^ ", " > ^ ", " > ^ ", " ~ > >>^ ^ @ ", " ~&~>> ^>~&- ", " ^{^> { >^{^ ", " > ^{^~ {!^ ~^{^ > ", " > ~&^{^&+&(@+&^{^~~ > ", " >^ @(++(^{^!++/(+!^{^!+++( ^>", " >^((&+++!{{^!(!!(&!{{^!++++(&^>", " ^^&(((!++^$^ &+((& ^$^/+!+(&&^^", " >^((&+++/^{^ >((>> ^{^!++++(&^>", " ^{(((++!+{$^^>(({>^{$^!!+!(&&{^", " >^(((+++!^$^ ~((&- ^$^+!++((&^>", " ^{&&&(!++{{^! >>> !{{^!++!(@@{^", " ^{&&&(!++{{^! >>> !{{^!++!(@@{^", " ^^ --~~({$^~!!${!&{$^&@~~- ^^", " ^ -{$^->$!{>-{$^- ^ ", " > {$^ >{){> {$^ > ", " {$^ >^$^> {$^ ", " ((@ >>> ((@ ", " ^^> ^^> ", " &~& &~& ", " ( ( ", " ", " ", " ", " "}; debian/rules0000755000000000000000000000121612216115657010254 0ustar #!/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 %: dh $@ override_dh_auto_build: $(MAKE) -f makefile.unx CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' override_dh_install: mkdir -p debian/wing-data/usr/share/games/wing mkdir -p debian/wing/var/games cp -af images debian/wing-data/usr/share/games/wing/ cp -af levels debian/wing-data/usr/share/games/wing/ cp -af sound debian/wing-data/usr/share/games/wing/ dh_install override_dh_clean: [ ! -f makefile.unx ] || $(MAKE) -f makefile.unx clean dh_clean debian/patches/0000755000000000000000000000000012216115657010623 5ustar debian/patches/020_misc.diff0000644000000000000000000011730712216115657013002 0ustar Description: Fix multiple C errors and code issues. Author: Unknown Index: wing-0.7/util.h =================================================================== --- wing-0.7.orig/util.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/util.h 2013-08-04 09:29:18.913493918 -0400 @@ -27,9 +27,11 @@ #define UTIL_H #include -#include +#include +#include #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 & strings, char * file ); -#include "util.cpp" +//========================================================================== +template < class ItemTYPE > +void Swap ( ItemTYPE & left,ItemTYPE & right ) +{ + ItemTYPE temp = left; + left = right; + right = temp; +} #endif Index: wing-0.7/enemytype.h =================================================================== --- wing-0.7.orig/enemytype.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/enemytype.h 2013-08-04 09:29:18.913493918 -0400 @@ -27,24 +27,24 @@ #ifndef _ENEMYTYPE_H #define _ENEMYTYPE_H -#include +#include #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 Index: wing-0.7/scorelisttype.h =================================================================== --- wing-0.7.orig/scorelisttype.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/scorelisttype.h 2013-08-04 09:29:18.913493918 -0400 @@ -28,8 +28,8 @@ #ifndef _SCORELISTTYPE_H #define _SCORELISTTYPE_H -#include -#include +#include +#include #include #include "util.h" #include "additional/apvector.h" @@ -69,5 +69,4 @@ apvector list; }; -#include "scorelisttype.cpp" #endif Index: wing-0.7/animationtype.cpp =================================================================== --- wing-0.7.orig/animationtype.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/animationtype.cpp 2013-08-04 09:56:44.913655992 -0400 @@ -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 ( ); } @@ -27,11 +29,11 @@ AnimationTYPE :: ~AnimationTYPE ( ) { } //======================================================= -void AnimationTYPE :: LoadImages ( char * fileName ) +void AnimationTYPE :: LoadImages ( const char * fileName ) { apstring source; - BITMAP * Temp = NULL; - ifstream ImageFile; + //BITMAP * Temp = NULL; + std::ifstream ImageFile; ImageFile.open ( fileName ); ImageFile >> mySize; myImageBank.resize ( mySize); Index: wing-0.7/enemytype.cpp =================================================================== --- wing-0.7.orig/enemytype.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/enemytype.cpp 2013-08-04 09:29:18.913493918 -0400 @@ -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 ) Index: wing-0.7/collision.h =================================================================== --- wing-0.7.orig/collision.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/collision.h 2013-08-04 09:29:18.913493918 -0400 @@ -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 & 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 Index: wing-0.7/animationtype.h =================================================================== --- wing-0.7.orig/animationtype.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/animationtype.h 2013-08-04 09:56:24.833556420 -0400 @@ -29,7 +29,8 @@ #include "additional/apstring.h" #include "additional/apvector.h" -#include +#include +#include class AnimationTYPE { @@ -40,7 +41,7 @@ ~AnimationTYPE ( ); // MODIFIER - void LoadImages ( char * fileName ); + void LoadImages ( const char * fileName ); // ACCESSOR BITMAP * GetImage ( int Index ) const; @@ -53,6 +54,5 @@ apvector < BITMAP* > myImageBank; }; -#include "animationtype.cpp" #endif Index: wing-0.7/star.cpp =================================================================== --- wing-0.7.orig/star.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/star.cpp 2013-08-04 09:29:18.913493918 -0400 @@ -1,3 +1,8 @@ +#include "star.h" + +STAR_TYPE stars [256]; + + //**************************************************************************** void Init_Stars() { Index: wing-0.7/main.cpp =================================================================== --- wing-0.7.orig/main.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/main.cpp 2013-08-04 10:17:40.027879767 -0400 @@ -18,8 +18,8 @@ // these must be declared volatile so the optimiser doesn't mess up volatile int timer = 0; -#include // for standard I/O routines used in debugging -#include "allegro.h" // libraries for graphics and sound +#include // for standard I/O routines used in debugging +#include // 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 // for rand() +#include // for signal() #define VERSION 0.7 // Keep Track of the Version @@ -46,6 +47,7 @@ EnemyTYPE * enemies; int level_index; apvector level_names; + bool windowed = false; //**************************************************************************** @@ -72,8 +74,11 @@ //**************************************************************************** // Functions -int main() +int main(int argc, char **argv) { + int rc; + rc = chdir("/usr/share/games/wing"); + if(argc>1 && !strcmp(argv[1],"-w")) windowed = true; Program_Init (); Active_Menu ( ); Game_Shutdown (); @@ -88,13 +93,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 +166,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 +254,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 +275,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 +308,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 +329,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 +338,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 +352,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); @@ -338,10 +364,11 @@ poll_mouse (); poll_keyboard (); char temp [10]; - textprintf(option_menu_buffer, font, 320 , 250, 15, strcpy (temp,NumToString (sample_vol).c_str())); - textprintf(option_menu_buffer, font, 320 , 280, 15, strcpy (temp,NumToString (stream_vol).c_str())); + textprintf_ex(option_menu_buffer, font, 320 , 250, 15, -1, "%s", strcpy (temp,NumToString (sample_vol).c_str())); + textprintf_ex(option_menu_buffer, font, 320 , 280, 15, -1, "%s", 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 +479,11 @@ intro_counter --; Move_Stars (); plane_object.Display ( buffer ); - char temp [3]; - textprintf (buffer, font, 300 , 250, 15, "Level 1"); + //char temp [3]; + textprintf_ex (buffer, font, 300 , 250, 15, -1, "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 +493,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; @@ -514,8 +541,8 @@ { char temp [3]; pause_counter --; - textprintf (buffer, font, 300 , 250, 15, "Level "); - textprintf (buffer, font, 300 + text_length(font, "Level ") , 250, 15, strcpy (temp,NumToString (level_index + 2).c_str())); + textprintf_ex (buffer, font, 300 , 250, 15, -1, "Level "); + textprintf_ex (buffer, font, 300 + text_length(font, "Level ") , 250, 15, -1, "%s", strcpy (temp,NumToString (level_index + 2).c_str())); } } @@ -542,7 +569,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,13 +578,13 @@ fire_sound = shoot_sounds [laser]; } - if ( plane_object.GetNumLives () == 0 ) + if ( plane_object.GetNumLives () == 0 && !plane_object.GetDead () ) { clear_keybuf (); GAME_STARTED = false; SAMPLE *game_over = load_sample ("sound/gameover.wav"); play_sample(game_over , sample_vol, 127, 1000, 0); - textprintf_centre (screen, font,320 ,240,15, "Game Over" ); + textprintf_centre_ex (screen, font,320 ,240,15, -1, "Game Over" ); clear_keybuf (); while ( ! keypressed () ); destroy_sample ( game_over ); @@ -570,22 +597,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 +650,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(); @@ -637,19 +664,20 @@ void Display_Info_Bar ( ) { char temp [10]; - textprintf (buffer, font, 45 , 462, 15, "Score:" ); - textprintf (buffer, font, 101 , 462, 15, strcpy ( temp,NumToString ( plane_object.GetScore() ).c_str()) ); - textprintf (buffer, font, 200 , 462, 15, "Lives:" ); - textprintf (buffer, font, 256 , 462, 15, strcpy ( temp,NumToString ( plane_object.GetNumLives() ).c_str()) ); - textprintf (buffer, font, 330 , 462, 15, "Health:" ); - textprintf (buffer, font, 394 , 462, 15, strcpy ( temp,NumToString ( plane_object.GetHealth() ).c_str()) ); - textprintf (buffer, font, 485 , 462, 15, "Weapon:" ); - textprintf (buffer, font, 549 , 462, 15, strcpy ( temp,WeaponToString ( plane_object.GetWeapon() ).c_str()) ); + textprintf_ex (buffer, font, 45 , 462, 15, -1, "Score:" ); + textprintf_ex (buffer, font, 101 , 462, 15, -1, "%s", strcpy ( temp,NumToString ( plane_object.GetScore() ).c_str()) ); + textprintf_ex (buffer, font, 200 , 462, 15, -1, "Lives:" ); + textprintf_ex (buffer, font, 256 , 462, 15, -1, "%s", strcpy ( temp,NumToString ( plane_object.GetNumLives() ).c_str()) ); + textprintf_ex (buffer, font, 330 , 462, 15, -1, "Health:" ); + textprintf_ex (buffer, font, 394 , 462, 15, -1, "%s", strcpy ( temp,NumToString ( plane_object.GetHealth() ).c_str()) ); + textprintf_ex (buffer, font, 485 , 462, 15, -1, "Weapon:" ); + textprintf_ex (buffer, font, 549 , 462, 15, -1, "%s", strcpy ( temp,WeaponToString ( plane_object.GetWeapon() ).c_str()) ); } //**************************************************************************** void Display_Menu () { blit(menu_buffer, screen, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + usleep(10000); } //**************************************************************************** @@ -661,7 +689,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 +701,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 +716,7 @@ } } } - if ( ! plane_object.GetDead () ) + if ( plane_object.GetVuln () ) { BulletTYPE * enemy_bullets = enemies.GetBullets (); BulletNodeTYPE * enemy_bullet_list = enemy_bullets->GetBulletList(); Index: wing-0.7/bullettype.h =================================================================== --- wing-0.7.orig/bullettype.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/bullettype.h 2013-08-04 10:19:13.980345653 -0400 @@ -30,7 +30,7 @@ #include "animationtype.h" #include "collision.h" #include "additional/apvector.h" -#include +#include #include "util.h" struct BulletNodeTYPE @@ -64,20 +64,19 @@ BulletTYPE ( char * fileName ); ~BulletTYPE (); - void LoadWeapon ( char * fileName ); + void LoadWeapon ( const char * fileName ); bool Fire ( int xcoord, int ycoord, WeaponEnum weapon ); bool Fire ( int xcoord, int ycoord, int dx, int dy, WeaponEnum weapon ); 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 myBulletMask; }; -#include "bullettype.cpp" #endif Index: wing-0.7/sound.cpp =================================================================== --- wing-0.7.orig/sound.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/sound.cpp 2013-08-04 09:29:18.913493918 -0400 @@ -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); } Index: wing-0.7/planetype.cpp =================================================================== --- wing-0.7.orig/planetype.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/planetype.cpp 2013-08-04 09:54:14.128908291 -0400 @@ -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 ) { } @@ -14,7 +17,7 @@ PlaneTYPE :: ~PlaneTYPE ( ) { } //======================================================================== -void PlaneTYPE :: LoadPlane ( char * PlaneF, char * BulletF, char * explodeF ) +void PlaneTYPE :: LoadPlane ( const char * PlaneF, const char * BulletF, const char * explodeF ) { explode_images.LoadImages ( explodeF ); myArrayOfImages.LoadImages ( PlaneF ); @@ -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; } //======================================================================= Index: wing-0.7/planetype.h =================================================================== --- wing-0.7.orig/planetype.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/planetype.h 2013-08-04 09:53:52.788802471 -0400 @@ -27,7 +27,7 @@ #ifndef _PlaneTYPE_H #define _PlaneTYPE_H -#include +#include #include "bullettype.h" #include "animationtype.h" #include "util.h" @@ -48,7 +48,7 @@ void MoveDown ( ); bool Fire ( ); void Normalize ( ); - void LoadPlane ( char * PlaneF, char * BulletF, char * explodeF ); + void LoadPlane ( const char * PlaneF, const char * BulletF, const char * explodeF ); void SetDead ( bool not_alive ); void SetWeapon ( WeaponEnum weapon ); void SetHealth ( int health ); @@ -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 myPlaneMasks; }; -#include "planetype.cpp" #endif Index: wing-0.7/star.h =================================================================== --- wing-0.7.orig/star.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/star.h 2013-08-04 09:29:18.913493918 -0400 @@ -1,6 +1,9 @@ #ifndef _STAR_H #define _STAR_H +#include +#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 Index: wing-0.7/scorelisttype.cpp =================================================================== --- wing-0.7.orig/scorelisttype.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/scorelisttype.cpp 2013-08-04 10:22:41.645375408 -0400 @@ -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_ex(buffer, font , 300 , 170+20*i, 15, -1, "%s", temp_c_str ); + + strncpy (temp_c_str, list [i].name.c_str(), 10); + temp_c_str[9] = '\0'; + textprintf_ex(buffer, font , 328 , 170+20*i, 15, -1, "%s", temp_c_str ); + + converter = NumToString (list [i].score); + strncpy (temp_c_str, converter.c_str(), 10); + temp_c_str[9] = '\0'; + textprintf_ex(buffer, font , 430 , 170+20*i, 15, -1, "%s", 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 <<" "< & mask_list ) // This function initializes the bounding box used to do the initial collision detection @@ -28,7 +30,7 @@ for(z=0; z0) @@ -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); } } } Index: wing-0.7/additional/apvector.cpp =================================================================== --- wing-0.7.orig/additional/apvector.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/additional/apvector.cpp 2013-08-04 09:29:18.913493918 -0400 @@ -4,9 +4,10 @@ // //**************************************************************** -#include +#include #include #include +#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]; Index: wing-0.7/additional/apstring.h =================================================================== --- wing-0.7.orig/additional/apstring.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/additional/apstring.h 2013-08-04 09:29:18.917493938 -0400 @@ -1,8 +1,8 @@ #ifndef _APSTRING_H #define _APSTRING_H -#include -#include "bool.h" +#include +//#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... Index: wing-0.7/additional/apstring.cpp =================================================================== --- wing-0.7.orig/additional/apstring.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/additional/apstring.cpp 2013-08-04 09:29:18.917493938 -0400 @@ -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 { Index: wing-0.7/bullettype.cpp =================================================================== --- wing-0.7.orig/bullettype.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/bullettype.cpp 2013-08-04 10:19:39.292471169 -0400 @@ -1,3 +1,5 @@ +#include "bullettype.h" + //*************************************************************************** BulletTYPE :: BulletTYPE ( ) : myBullets ( NULL ), @@ -80,7 +82,7 @@ } } //************************************************************************** -void BulletTYPE :: LoadWeapon ( char * fileName ) +void BulletTYPE :: LoadWeapon ( const char * fileName ) { myBulletImages.LoadImages ( fileName ); myBulletMask.resize ( myBulletImages.Length() ); Index: wing-0.7/util.cpp =================================================================== --- wing-0.7.orig/util.cpp 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/util.cpp 2013-08-04 10:24:48.522004555 -0400 @@ -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; @@ -93,11 +88,12 @@ poll_mouse (); rectfill(draw_buffer, xcoord, ycoord, xcoord+200, ycoord+100, 0); // 0 is black rect(draw_buffer, xcoord, ycoord, xcoord+200, ycoord+100, 15); // 15 is white - textprintf_centre(draw_buffer, font, xcoord + 100 , ycoord + 20, 15, msg); - textprintf(draw_buffer, font, xcoord + 8 , ycoord + 70, 15, query); - textprintf (draw_buffer,font,xcoord + text_length(font, query)+8, ycoord+70,15, strcpy ( temp_string,name_string.c_str())); + textprintf_centre_ex(draw_buffer, font, xcoord + 100 , ycoord + 20, 15, -1, "%s", msg); + textprintf_ex(draw_buffer, font, xcoord + 8 , ycoord + 70, 15, -1, "%s", query); + textprintf_ex(draw_buffer,font,xcoord + text_length(font, query)+8, ycoord+70,15, -1, "%s", 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] ) { @@ -169,11 +165,12 @@ poll_keyboard (); rectfill(draw_buffer, xcoord, ycoord, xcoord+200, ycoord+100, 0); // 0 is black rect(draw_buffer, xcoord, ycoord, xcoord+200, ycoord+100, 15); // 15 is white - textprintf_centre(draw_buffer, font, xcoord + 100 , ycoord + 20, 15, query); - textprintf(draw_buffer, font, xcoord + 50 , ycoord + 70, 15, "Yes"); - textprintf(draw_buffer, font, xcoord + 135 , ycoord + 70, 15, "No"); + textprintf_centre_ex(draw_buffer, font, xcoord + 100 , ycoord + 20, 15, -1, "%s", query); + textprintf_ex(draw_buffer, font, xcoord + 50 , ycoord + 70, 15, -1, "Yes"); + textprintf_ex(draw_buffer, font, xcoord + 135 , ycoord + 70, 15, -1, "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 & strings, char * file_name ) { int size; - ifstream file; + std::ifstream file; file.open ( file_name ); file >> size; strings.resize ( size); Index: wing-0.7/sound.h =================================================================== --- wing-0.7.orig/sound.h 2013-08-04 09:29:18.917493938 -0400 +++ wing-0.7/sound.h 2013-08-04 09:29:18.917493938 -0400 @@ -3,6 +3,7 @@ #include #include +#include #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 debian/patches/010_makefile.diff0000644000000000000000000000216312216115657013614 0ustar Description: Fix up upstream makefile. Author: Unknown Index: wing-0.7/makefile.unx =================================================================== --- wing-0.7.orig/makefile.unx 2013-08-04 09:21:37.991208328 -0400 +++ wing-0.7/makefile.unx 2013-08-04 09:23:03.083630278 -0400 @@ -4,20 +4,33 @@ TARGET := wing CC := g++ -CFLAGS := -g -O3 -m486 +CPPFLAGS := +CFLAGS := -Wall -Wno-deprecated-declarations -g -O2 CXXFLAGS := $(CFLAGS) +LDFLAGS := -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) + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(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) debian/patches/series0000644000000000000000000000004012216115657012032 0ustar 010_makefile.diff 020_misc.diff debian/watch0000644000000000000000000000006412216115657010225 0ustar version=3 http://sf.net/wing/wing-src-(.+)\.tar\.gz debian/copyright0000644000000000000000000000101012216115657011117 0ustar This package was debianized by Eduard Bloch 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: Copyright (C) 2000 Anil Shrestha and Adam Hiatt License: 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. debian/menu0000644000000000000000000000020412216115657010057 0ustar ?package(wing):needs="X11" section="Games/Action" \ title="Wing" command="/usr/games/wing" \ icon="/usr/share/pixmaps/wing.xpm" debian/changelog0000644000000000000000000002273112216115657011053 0ustar wing (0.7-30) unstable; urgency=low * Team upload. * Dpkg does not replace symlinks with directories and vice versa, therefore maintainer scripts need to be used. Add wing.preinst script. Remove wing-data.preinst. (Closes: #720155) * Install README with wing.docs. -- Markus Koschany Tue, 17 Sep 2013 20:12:56 +0200 wing (0.7-29) unstable; urgency=low * Adopt for the Games Team. (Closes: #711564). + Add myself to uploaders. * Change to source format 3.0 (quilt). + Drop build-dep on quilt. * Bump debhelper build-dep and compat to 9. + Switch to simple dh style rules. * Update 010_makefile.diff to pass CPPFLAGS and LDFLAGS. * Make maintainer scripts not ignore errors. * Fix up debian/copyright file. * Make debian/rules not ignore make clean errors. * Add watch file. * Use Breaks instead of Conflicts for data package. * Add Homepage and VCS tags. * Add ${misc:Depends} to binary packages. * Bump Standards Version to 3.9.4. -- Barry deFreese Sat, 03 Aug 2013 19:05:01 -0400 wing (0.7-28) unstable; urgency=low * Orphan the package, see #711564. * Change versioned build dependency liballegro4.2-dev to unversioned dependency on liballegro4-dev. (Closes: #710600) -- Tobias Hansen Sat, 08 Jun 2013 00:12:52 +0200 wing (0.7-27.1) unstable; urgency=low * Non-maintainer upload. * Applied Lior Kaplan's patch to make the package binNMU safe. (Closes: #432993) * Use menu section Games/Action instead of Games/Arcade. * debian/rules: Don't forget to remove `.pc' directory upon clean target. -- David Ammouial Sun, 30 Sep 2007 02:14:48 +0200 wing (0.7-27) unstable; urgency=low * debian/control: + Removed the wing/wing-data circular dependency. + Set policy to 3.7.2. -- Sam Hocevar (Debian packages) Mon, 29 May 2006 15:23:03 +0200 wing (0.7-26) unstable; urgency=low * debian/control: + Build-depend on liballegro4.2-dev (>= 2:4.2.0-4) to fix the missing libxcursor-dev build-dependency (Closes: #360191). -- Sam Hocevar (Debian packages) Fri, 31 Mar 2006 11:22:22 +0200 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) 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) 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) 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) 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) 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) 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) 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 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 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 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 Sun, 29 Sep 2002 15:14:22 +0200 wing (0.7-14) unstable; urgency=low * recompilation against a new Allegro release -- Eduard Bloch 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 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 Sat, 8 Dec 2001 14:44:19 +0100 wing (0.7-11) unstable; urgency=low * recompilation for the new Allegro branch -- Eduard Bloch Wed, 21 Nov 2001 23:16:16 +0100 wing (0.7-10) unstable; urgency=low * recompilation for the new Allegro -- Eduard Bloch 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 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 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 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 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 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 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 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 Fri, 2 Feb 2001 18:10:50 +0100 wing (0.7-1) unstable; urgency=low * Initial Release. -- Eduard Bloch Sun, 24 Dec 2000 10:46:18 +0100 debian/wing.postrm0000644000000000000000000000057312216272646011415 0ustar #! /bin/sh set -e 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#