rpms/rafkill/devel COPYING, NONE, 1.1 license-confirmation.txt, NONE, 1.1 rafkill-1.2.1-debian.patch, NONE, 1.1 rafkill-1.2.1-options.patch, NONE, 1.1 rafkill.6, NONE, 1.1 rafkill.desktop, NONE, 1.1 rafkill.png, NONE, 1.1 rafkill.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Thu May 18 07:01:07 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/rafkill/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10154/devel

Modified Files:
	.cvsignore sources 
Added Files:
	COPYING license-confirmation.txt rafkill-1.2.1-debian.patch 
	rafkill-1.2.1-options.patch rafkill.6 rafkill.desktop 
	rafkill.png rafkill.spec 
Log Message:
auto-import rafkill-1.2.1-1 on branch devel from rafkill-1.2.1-1.src.rpm


--- NEW FILE COPYING ---
		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

		    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

			    NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

		     END OF TERMS AND CONDITIONS

	    How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year  name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.


--- NEW FILE license-confirmation.txt ---
Rafkill is licensed under the GPL, however the latest upstream package
comes without any license info. The previous verison 1.2.0 did include a GPL
license notice and so does the CVS tree. To make really sure rafkill is
still licensed under the GPL I asked the Author to confirm this, and it
still is. The mail exchange confirming this is below:

Message-ID: <446649EA.60605 at hhs.nl>
Date: Sat, 13 May 2006 23:04:42 +0200
From: Hans de Goede <j.w.r.degoede at hhs.nl>
User-Agent: Thunderbird 1.5.0.2 (X11/20060420)
MIME-Version: 1.0
To: Jon Rafkind <workmin at ccs.neu.edu>
Subject: Re: Raptor
References: <4423D4EE.1050301 at hhs.nl> <4423F583.3090705 at ccs.neu.edu> <442A35E8.2050303 at hhs.nl> <4456012C.9040605 at ccs.neu.edu> <445631A2.3000203 at hhs.nl> <445E96C4.4000807 at ccs.neu.edu>
In-Reply-To: <445E96C4.4000807 at ccs.neu.edu>
X-Enigmail-Version: 0.94.0.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Hi,

I'm in the process of packaging rafkill and now I noticed that there
with 1.2.1 there no longer is COPYING file in the tarbal.

Rafkill is still licensed under the GPL, correct? Could you please
include the full text of the GPL in your next release?

Thanks,

Hans

Return-Path: <workmin at ccs.neu.edu>
Received: from koko.hhs.nl ([145.52.2.16] verified)
  by hhs.nl (CommuniGate Pro SMTP 4.3.6)
  with ESMTP id 47284811 for j.w.r.degoede at hhs.nl; Sun, 14 May 2006 00:56:53 +0200
Received: from exim by koko.hhs.nl with spam-scanned (Exim 4.62)
	(envelope-from <workmin at ccs.neu.edu>)
	id 1Ff32Y-0005JV-KX
	for j.w.r.degoede at hhs.nl; Sun, 14 May 2006 00:56:53 +0200
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on koko.hhs.nl
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=3.1.0
Received: from exim (helo=koko)
	by koko.hhs.nl with local-smtp (Exim 4.62)
	(envelope-from <workmin at ccs.neu.edu>)
	id 1Ff32Y-0005JS-H7
	for j.w.r.degoede at hhs.nl; Sun, 14 May 2006 00:56:50 +0200
Received: from [129.10.116.51] (port=51410 helo=amber.ccs.neu.edu)
	by koko.hhs.nl with esmtp (Exim 4.62)
	(envelope-from <workmin at ccs.neu.edu>)
	id 1Ff32Y-0005JN-6z
	for j.w.r.degoede at hhs.nl; Sun, 14 May 2006 00:56:50 +0200
Received: from amber.ccs.neu.edu ([129.10.116.51] helo=[127.0.0.1])
	by amber.ccs.neu.edu with esmtp (Exim 4.50)
	id 1Ff32W-0005Lz-Gn
	for j.w.r.degoede at hhs.nl; Sat, 13 May 2006 18:56:48 -0400
Message-ID: <44666431.1040207 at ccs.neu.edu>
Date: Sat, 13 May 2006 18:56:49 -0400
From: Jon Rafkind <workmin at ccs.neu.edu>
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Hans de Goede <j.w.r.degoede at hhs.nl>
Subject: Re: Raptor
References: <4423D4EE.1050301 at hhs.nl> <4423F583.3090705 at ccs.neu.edu> <442A35E8.2050303 at hhs.nl> <4456012C.9040605 at ccs.neu.edu> <445631A2.3000203 at hhs.nl> <445E96C4.4000807 at ccs.neu.edu> <446649EA.60605 at hhs.nl>
In-Reply-To: <446649EA.60605 at hhs.nl>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.2/RELEASE, bases: 14052006 #181931, status: clean

Yes, rafklll is still under the GPL. I must have forgot to include the 
COPYING file in my tarball script. Im sure you have added one for now. 
Thanks for pointing it out.

Hans de Goede wrote:

>Hi,
>
>I'm in the process of packaging rafkill and now I noticed that there
>with 1.2.1 there no longer is COPYING file in the tarbal.
>
>Rafkill is still licensed under the GPL, correct? Could you please
>include the full text of the GPL in your next release?
>
>Thanks,
>
>Hans
>
>
>  
>


rafkill-1.2.1-debian.patch:

--- NEW FILE rafkill-1.2.1-debian.patch ---
diff -ur rafkill-1.2.1.orig/README rafkill-1.2.1/README
--- rafkill-1.2.1.orig/README	2006-05-07 18:08:46.000000000 +0200
+++ rafkill-1.2.1/README	2006-05-14 23:42:25.000000000 +0200
@@ -15,7 +15,7 @@
 
 	In the game you can change whether to show a background and the speed of the game.
 Getting rid of the background should significantly increase the fps if less than desired rate.
-Changing the speed of the game to much may cuase the game to crash, so please be wary. 
+Changing the speed of the game too much may cause the game to crash, so please be wary. 
 
 HOW TO PLAY:
 
@@ -27,7 +27,7 @@
 Your job is to shoot the enemies! How simple! 
 
 Killing enemies gives you money( score ). If you kill a group of enemies, 
-which you can kind of tell becuase they move in the same pattern and are
+which you can kind of tell because they move in the same pattern and are
 close to each other, you might get a handy coin which gives you more score!
 There are other powerups, so look for them too. The score lets you buy more
 weapons and hull parts. There are 5 weapon groups and a few weapons in each
diff -ur rafkill-1.2.1.orig/src/defs.cpp rafkill-1.2.1/src/defs.cpp
--- rafkill-1.2.1.orig/src/defs.cpp	2006-05-06 22:50:35.000000000 +0200
+++ rafkill-1.2.1/src/defs.cpp	2006-05-14 23:40:10.000000000 +0200
@@ -234,7 +234,7 @@
 	if ( g1 > 255 ) g1 = 255;
 	if ( b1 > 255 ) b1 = 255;
 
-	printf("C1 = %d. C2 = %d. New color = %d\n", c1, c2, makecol(r1,g1,b1) );
+	/* printf("C1 = %d. C2 = %d. New color = %d\n", c1, c2, makecol(r1,g1,b1) ); */
 
 	return makecol(r1,g1,b1);
 
diff -ur rafkill-1.2.1.orig/src/rfield.cpp rafkill-1.2.1/src/rfield.cpp
--- rafkill-1.2.1.orig/src/rfield.cpp	2006-05-02 05:14:19.000000000 +0200
+++ rafkill-1.2.1/src/rfield.cpp	2006-05-14 23:40:48.000000000 +0200
@@ -91,7 +91,7 @@
 //**//
 RField_Name::RField_Name( Font * f_font, char * name, bool selectable, bool perm, int return_val, RMenu * who, int number, int sound ):
 RField( selectable, perm, return_val, who, number, sound ) {
-	handle = name;
+	handle = strdup( name );
 	field_font = f_font;
 }
 

rafkill-1.2.1-options.patch:

--- NEW FILE rafkill-1.2.1-options.patch ---
diff -ur rafkill-1.2.1.orig/src/bitmap.cpp rafkill-1.2.1/src/bitmap.cpp
--- rafkill-1.2.1.orig/src/bitmap.cpp	2006-05-07 18:05:38.000000000 +0200
+++ rafkill-1.2.1/src/bitmap.cpp	2006-05-15 20:50:47.000000000 +0200
@@ -22,7 +22,7 @@
 const int Bitmap::MODE_TRANS = 0;
 const int Bitmap::MODE_SOLID = 1;
 
-Bitmap * Bitmap::Screen;
+Bitmap * Bitmap::Screen = NULL;
 
 Bitmap::Bitmap():
 error( false ){
@@ -475,11 +475,19 @@
 }
 	
 int Bitmap::setGfxModeFullscreen( int x, int y ){
-	return ::set_gfx_mode( GFX_AUTODETECT_FULLSCREEN, x, y, 0, 0 );
+	int ret = ::set_gfx_mode( GFX_AUTODETECT_FULLSCREEN, x, y, 0, 0 );
+	if (Bitmap::Screen)
+		delete Bitmap::Screen;
+	Bitmap::Screen = new Bitmap( screen );
+	return ret;
 }
 
 int Bitmap::setGfxModeWindowed( int x, int y ){
-	return ::set_gfx_mode( GFX_AUTODETECT_WINDOWED, x, y, 0, 0 );
+	int ret = ::set_gfx_mode( GFX_AUTODETECT_WINDOWED, x, y, 0, 0 );
+	if (Bitmap::Screen)
+		delete Bitmap::Screen;
+	Bitmap::Screen = new Bitmap( screen );
+	return ret;
 }
 	
 int Bitmap::makeColor( int r, int g, int b ){
diff -ur rafkill-1.2.1.orig/src/drawer.h rafkill-1.2.1/src/drawer.h
--- rafkill-1.2.1.orig/src/drawer.h	2006-04-30 04:26:39.000000000 +0200
+++ rafkill-1.2.1/src/drawer.h	2006-05-15 20:52:23.000000000 +0200
@@ -32,6 +32,10 @@
 		drawTrans = false;
 	}
 
+	inline void setDrawLand(bool value){
+		draw_land = value;
+	}
+
 	~Drawer();
 
 protected:
diff -ur rafkill-1.2.1.orig/src/init.cpp rafkill-1.2.1/src/init.cpp
--- rafkill-1.2.1.orig/src/init.cpp	2006-05-02 05:04:14.000000000 +0200
+++ rafkill-1.2.1/src/init.cpp	2006-05-15 20:50:47.000000000 +0200
@@ -9,7 +9,7 @@
 
 END_OF_FUNCTION( inc_speed_counter );
 
-void init( int mode, int GAME_SPEED ) {
+void init( int window_mode, int GAME_SPEED ) {
 
 	allegro_init();
 	srand( time( NULL ) );
@@ -23,25 +23,12 @@
 	}
 	*/
 
-	int gfx = GFX_AUTODETECT_WINDOWED;
-	switch ( mode ){
-		case 0 : {
-			gfx = GFX_AUTODETECT_FULLSCREEN;
-			break;
-		}
-		case 1 : {
-			gfx = GFX_AUTODETECT_WINDOWED;
-			break;
-		}
-	}
-
 	set_color_depth( 16 );
-	if ( set_gfx_mode( gfx, GRAPHICS_X, GRAPHICS_Y, 0, 0 ) != 0 ){
-		if ( set_gfx_mode( GFX_AUTODETECT, GRAPHICS_X, GRAPHICS_Y, 0, 0 ) != 0 ) {
-			allegro_message( "Could not initialize a graphics mode.. bailing" );
-			exit( 1 );
-		}
-	}
+	if (window_mode)
+		Bitmap::setGfxModeWindowed( GRAPHICS_X, GRAPHICS_Y );
+	else
+		Bitmap::setGfxModeFullscreen( GRAPHICS_X, GRAPHICS_Y );
+	
 	// text_mode( -1 );
 	reserve_voices (8, -1);
 	set_volume_per_voice( 0 );
@@ -59,8 +46,4 @@
 	Util::sound_vol = 1.0;			  //max volume to begin with
 	// music_vol = 0.50;
 	dumb_resampling_quality = get_config_int( "sound", "dumb_resampling_quality", 1 );
-
-	/* set up global screen variable */
-	Bitmap::Screen = new Bitmap( screen );
 }
-
diff -ur rafkill-1.2.1.orig/src/raptor.cpp rafkill-1.2.1/src/raptor.cpp
--- rafkill-1.2.1.orig/src/raptor.cpp	2006-05-07 06:20:00.000000000 +0200
+++ rafkill-1.2.1/src/raptor.cpp	2006-05-15 20:56:20.000000000 +0200
@@ -45,8 +45,7 @@
 static const int INC_RATE = 10;
 static const int DEC_RATE = 11;
 static const int INIT_HELP = 12;
-static const int INIT_SCREEN_FULL = 13;
-static const int INIT_SCREEN_WINDOW = 14;
+static const int INIT_SCREEN = 13;
 static const int SOUND_INC = 15;
 static const int SOUND_DEC = 16;
 static const int MUSIC_INC = 17;
@@ -54,6 +53,8 @@
 static const int DIFFICULT_MENU = 1000;
 
 static Font * normalFont = NULL;
+static int window_mode = 0;
+static bool dl = true;
 
 extern void init( int GFX, int GAME_SPEED );
 
@@ -257,7 +258,7 @@
 	// destroy_bitmap( sell_screen );
 }
 
-int intro_screen( int & frames, int window_mode, bool & dl, SpaceObject ** player, DATAFILE * sound ){
+static int intro_screen( int & frames, SpaceObject ** player, DATAFILE * sound ){
 
 	//RGB * crap = new RGB[256];
 	// char * file_name_pcx = Util::data_file( "logosmoot.pcx" );
@@ -314,11 +315,10 @@
 	option_menu.addTitle( strdup("Options"), normalFont );
 	char * numnum = int2str( frames );
 	// option_menu.addMenu( append("Frame rate ",numnum), normalFont, true,244,&frame_menu,select_smp);
-	//if ( window_mode == GFX_AUTODETECT )
-	//	option_menu->addMenu( strdup("Windowed"),Util::raptor_font,true,INIT_SCREEN,option_menu,select_smp);
-	//else    option_menu->addMenu( strdup("Fullscreen"),Util::raptor_font,true,INIT_SCREEN,option_menu,select_smp);
-	option_menu.addMenu( strdup("Windowed"), normalFont, true,INIT_SCREEN_WINDOW,&option_menu,select_smp);
-	option_menu.addMenu( strdup("Fullscreen"), normalFont, true,INIT_SCREEN_FULL,&option_menu,select_smp);
+	if ( window_mode )
+		option_menu.addMenu( strdup("Fullscreen off"), normalFont, true,INIT_SCREEN,&option_menu,select_smp);
+	else
+		option_menu.addMenu( strdup("Fullscreen on"),  normalFont, true,INIT_SCREEN,&option_menu,select_smp);
 	if ( dl )
 		option_menu.addMenu( strdup("Background on"), normalFont, true,INIT_BACK,&option_menu,select_smp);
 	else    option_menu.addMenu( strdup("Background off"), normalFont, true,INIT_BACK,&option_menu,select_smp);
@@ -447,38 +447,21 @@
 				do_credits();
 				break;
 			}
-						  /*
-			case INIT_SCREEN        : {
-			if ( window_mode == GFX_AUTODETECT_FULLSCREEN )
-			window_mode = GFX_AUTODETECT_WINDOWED;
-			else    window_mode = GFX_AUTODETECT_FULLSCREEN;
-			if ( window_mode == GFX_AUTODETECT_WINDOWED )
-			option_menu->replace( 3, strdup("Windowed"), Util::raptor_font,true, INIT_SCREEN, option_menu, select_smp  );
-			else    option_menu->replace( 3, strdup("Fullscreen"), Util::raptor_font,true, INIT_SCREEN, option_menu, select_smp );
-			printf("Setting gfx mode to %d - Status ",window_mode);
-			int cap = set_gfx_mode( window_mode, GRAPHICS_X, GRAPHICS_Y, 0, 0 );
-			printf("%d\n",cap );
-			if ( cap == -1 ) {
-			printf("Allegro error: %s\n", allegro_error );
-			set_gfx_mode(GFX_AUTODETECT,GRAPHICS_X,GRAPHICS_Y,0,0);
-			option_menu->replace(3,strdup("Error with gfx set"), Util::raptor_font,false, INIT_SCREEN, option_menu, select_smp );
-			}
-
-			break;
-			}
-			*/
-			case INIT_SCREEN_FULL   : {
-				Bitmap::setGfxModeFullscreen( GRAPHICS_X, GRAPHICS_Y );
-				break;
-			}
-			case INIT_SCREEN_WINDOW : {
-				Bitmap::setGfxModeWindowed( GRAPHICS_X, GRAPHICS_Y );
+			case INIT_SCREEN : {
+				window_mode = !window_mode;
+				if ( window_mode ) {
+					Bitmap::setGfxModeWindowed( GRAPHICS_X, GRAPHICS_Y );
+					option_menu.replace(2, strdup("Fullscreen off"), normalFont, true,INIT_SCREEN,&option_menu,select_smp);
+				} else {
+					Bitmap::setGfxModeFullscreen( GRAPHICS_X, GRAPHICS_Y );
+					option_menu.replace(2, strdup("Fullscreen on"),  normalFont, true,INIT_SCREEN,&option_menu,select_smp);
+				}
 				break;
 			}
 			case INIT_BACK          : {
 				if ( dl ) dl = false;else dl=true;
-				if ( dl ) option_menu.replace( 5, strdup("Background ON"), &menuFont, true, INIT_BACK, &option_menu, select_smp ); else
-					option_menu.replace( 5, strdup("Background off"), &menuFont, true, INIT_BACK, &option_menu, select_smp );
+				if ( dl ) option_menu.replace( 3, strdup("Background on"), &menuFont, true, INIT_BACK, &option_menu, select_smp ); else
+					option_menu.replace( 3, strdup("Background off"), &menuFont, true, INIT_BACK, &option_menu, select_smp );
 				break;
 			}
 
@@ -708,6 +691,7 @@
 	Drawer draw;
 	Logic logic;
 	LevelCreator level( file_level, player ); 
+	draw.setDrawLand(dl);
 				
 	/* stop loading screen */
 	endLoadingScreen();
@@ -851,8 +835,6 @@
 //******************************MAIN**************************
 int rafkill( int argc, char ** argv ) {
 
-	int window = 0;
-	bool dl = true;
 	int gameSpeed = 40;
 
 	printf("raptor -h for help screen\n");
@@ -862,7 +844,7 @@
 			return 0;
 		}
 		if ( strcmp( argv[q], "-w" ) == 0 ){
-			window = 1;
+			window_mode = 1;
 		} else if ( strcmp( argv[q], "-l" ) == 0 ){
 			dl = false;
 		} else if ( strlen( argv[q] ) > 2 ){
@@ -877,8 +859,8 @@
 	}
 
 	cout << "Running game at " << gameSpeed << endl;
-	cout << "Using mode " << window << endl;
-	init( window, gameSpeed );
+	cout << "Using mode " << window_mode << endl;
+	init( window_mode, gameSpeed );
 	cout << "OS " << Util::getOS() << endl;
 
 	Util::loadGlobals();
@@ -914,7 +896,7 @@
 	bool quit;
 	// int real_level = 1;
 	int geti;
-	while ( (geti = intro_screen( gameSpeed, window, dl, &player, Util::global_snd ) ) != INIT_QUIT ) {
+	while ( (geti = intro_screen( gameSpeed, &player, Util::global_snd ) ) != INIT_QUIT ) {
 		quit = geti == INIT_QUIT;
 		while ( ! quit ) {
 


--- NEW FILE rafkill.6 ---
.\"                                      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 RAFKILL 6 "24 April 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
Rafkill \- a vertical shoot'em-up
.SH SYNOPSIS
.B rafkill [ -l ] [ -w ] [ -g<speed> ] [ -h ]
.SH DESCRIPTION
.B Rafkill
is a clone of Raptor: Call of the Shadows, a classic shoot'em-up game.

You have a bird's eye view of the playing field, which is an alien world,
and your job is to destroy the enemies that are flying towards you shooting
bullets. The score lets you buy life, shield, better weapons or even new
spaceships.

Killing enemies gives you money, or score. If you kill a group of enemies,
you might get a handy coin which gives you more score. There are other
powerups, so look for them too.

The score lets you buy more weapons and hull parts. There are 5 weapon groups
and a few weapons in each group, but you can only have one weapon per group
except for the accessory weapons in which you can have up to 3 weapons. Once
you buy 3, you cannot buy any more. There are 3 hulls, which have each higher
life and shield than the previous one and gives you access to a new set of
weapons. Buying a new hull does not throw away your weapons, but it does
throw away your accessory weapons.
.SH OPTIONS
.TP
\fB\-l\fR
run the game without displaying the background
.TP
\fB\-w\fR
run the game in windowed mode instead of full screen
.TP
\fB\-g<speed>\fR
run the game at a different speed (default is 40)
.TP
\fB\-h, \-help, \-\-help\fR
display help message and exit
.SH KEYS
.TP
.B Left, Right, Up, Down
move the ship across the screen
.TP
.B Space or Enter
fire the main weapon
.TP
.B Alt
switch between alternate weapons
.TP
.B Esc
return to the game menu
.BR
.SH AUTHOR
Rafkill was written by Jon Rafkind <workmin at ccs.neu.edu>.

This manual page was written by Sam Hocevar <sam at zoy.org>,
for the Debian GNU/Linux system (but may be used by others).


--- NEW FILE rafkill.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Rafkill
Comment=Top-down shooter with powerups
Exec=rafkill
Icon=rafkill.png
Terminal=false
StartupNotify=false
Type=Application
Categories=Application;Game;ArcadeGame;


--- NEW FILE rafkill.spec ---
Name:           rafkill
Version:        1.2.1
Release:        1%{?dist}
Summary:        Top-down shooter with powerups
Group:          Amusements/Games
License:        GPL
URL:            http://raptorv2.sourceforge.net/
Source0:        http://download.sourceforge.net/raptorv2/%{name}-%{version}.tar.gz
Source1:        rafkill.desktop
Source2:        rafkill.6
Source3:        COPYING
Source4:        license-confirmation.txt
Source5:        rafkill.png
Patch0:         rafkill-1.2.1-debian.patch
Patch1:         rafkill-1.2.1-options.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  allegro-devel dumb-devel scons desktop-file-utils

%description
Rafkill is a vertical scrolling shoot-em up game. You can collect powerups
during gameplay and you can goto the store with your spaceship and buy
powerups or even a complete new ship with the points you've earned sofar.


%prep
%setup -q 
%patch0 -p1 -z .debian
%patch1 -p1 -z .options
cp %{SOURCE3} %{SOURCE4} .
# sigh hack hack hack
FLAGS=""
for i in $RPM_OPT_FLAGS; do
  FLAGS="$FLAGS '$i',"
done
FLAGS="$FLAGS '-DINSTALL_DIR=\\\\\\\\\"%{_datadir}\\\\\\\\\"'"
%{__sed} -i "s!flags = .*!flags = [ $FLAGS ];!" SConstruct


%build
export CCFLAGS="$RPM_OPT_FLAGS"
scons prefix=%{_datadir}


%install
rm -rf $RPM_BUILD_ROOT
#scons won't install into a buildroot, only into the real root so DIY
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} $RPM_BUILD_ROOT%{_bindir}
install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}
cp -a data music $RPM_BUILD_ROOT%{_datadir}/%{name}
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/*/.sconsign
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/data/*.h

# manpage courtesy of Debian
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man6
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man6 

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category X-Fedora                       \
  %{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
install -p -m 644 %{SOURCE5} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files
%defattr(-,root,root,-)
%doc README COPYING license-confirmation.txt
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_mandir}/man6/%{name}.6.gz
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png


%changelog
* Sat May 13 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.2.1-1
- Initial Fedora Extras package


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/rafkill/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	18 May 2006 06:59:28 -0000	1.1
+++ .cvsignore	18 May 2006 07:01:07 -0000	1.2
@@ -0,0 +1 @@
+rafkill-1.2.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/rafkill/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	18 May 2006 06:59:28 -0000	1.1
+++ sources	18 May 2006 07:01:07 -0000	1.2
@@ -0,0 +1 @@
+e27a24d5a0c2e92ba13815d8d6638a6b  rafkill-1.2.1.tar.gz




More information about the fedora-extras-commits mailing list