pax_global_header 0000666 0000000 0000000 00000000064 14545315634 0014524 g ustar 00root root 0000000 0000000 52 comment=d0dfb5c91ed9c07a40866ab3c62266f640bcc34f
sdl-ball-1.04+dfsg/ 0000775 0000000 0000000 00000000000 14545315634 0014061 5 ustar 00root root 0000000 0000000 sdl-ball-1.04+dfsg/LICENSE.txt 0000664 0000000 0000000 00000104513 14545315634 0015710 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
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
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 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, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
sdl-ball-1.04+dfsg/Makefile 0000664 0000000 0000000 00000001762 14545315634 0015527 0 ustar 00root root 0000000 0000000 ifndef PREFIX
PREFIX=/usr/local/
endif
DESTDIR?=$(PREFIX)share/games/sdl-ball/
DATADIR?=themes/
BINDIR=bin/
#append -DWITH_WIIUSE to compile with WIIUSE support!
#append -DNOSOUND to compile WITHOUT sound support
STRIP=strip
CXX?=g++
CXXFLAGS+=-Wall `sdl-config --cflags` -DDATADIR="\"$(DATADIR)\""
#append -lwiiuse to compile with WIIUSE support
#remove -lSDL_mixer if compiling with -DNOSOUND
LIBS+=-lGL -lGLU `sdl-config --libs` -lSDL_image -lSDL_ttf -lSDL_mixer
SOURCES=main.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=sdl-ball
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
$(STRIP) $@
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< -o $@
clean:
rm -f *.o sdl-ball
install: $(EXECUTABLE) install-bin install-data
install-bin:
mkdir -p $(DESTDIR)
cp $(EXECUTABLE) $(DESTDIR)
ln -s $(DESTDIR)$(EXECUTABLE) $(PREFIX)$(BINDIR)
install-data:
mkdir -p $(DESTDIR)$(DATADIR)
cp -p -R themes/* $(DESTDIR)$(DATADIR)
remove:
rm -R ~/.config/sdl-ball
sdl-ball-1.04+dfsg/Makefile.win 0000664 0000000 0000000 00000001201 14545315634 0016307 0 ustar 00root root 0000000 0000000 CXX=i686-w64-mingw32-g++ -static-libgcc -static-libstdc++ -DWIN32 -DWIN32_CROSS -D_DEFAULT_SOURCE -D__USE_BSD
WINDRES = i686-w64-mingw32-windres
CXXFLAGS+=-c
#append -lwiiuse to compile with WIIUSE support
#remove -lSDL_mixer if compiling with -DNOSOUND
LIBS+=-lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_ttf -lSDL_mixer -lopengl32 -lglu32
SOURCES=main.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=sdl-ball.exe
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(WINDRES) windows.rc -O coff -o windows.res
$(CXX) $(LDFLAGS) $(OBJECTS) windows.res $(LIBS) -o $@
.cpp.o:
$(CXX) $(CXXFLAGS) $< -o $@
clean:
rm -f *.o sdl-ball.exe
sdl-ball-1.04+dfsg/README 0000664 0000000 0000000 00000026416 14545315634 0014752 0 ustar 00root root 0000000 0000000 -- SDL-Ball --
- A DX-Ball/MegaBall/Breakout clone for linux+friends (and windows)
with pretty graphics.
-- Index --
1.0 SDL-Ball Info and License
1.1 Objective
1.2 Controls and Keys
1.2.1 Keyboard Controls
1.2.2 Mouse Controls
1.2.3 WiiMote Controls
1.2.4 Joystick Controls
1.3 Saving and Loading
1.4 Configuration
1.4.1 Mouse
1.4.2 Keyboard
1.4.3 Digital Joystick
1.4.4 Analog Joystick
1.4.5 WiiMote
1.4.6 Config options explained
2.0 Compiling
2.1 Without sound
2.2 With WiiMote support
2.3 For system-wide installation
3.0 Themes
3.1 How to use a diffrent theme
3.2 How to make your own theme
4.0 Contributors and Credits
5.0 Frequently Asked Questions (FAQ)
------------------------------------
1.0 SDL-Ball Info
Author: Jimmy Christensen
Project page: https://github.com/DusteDdk/SDL-Ball
Web site: http://sdl-ball.sourceforge.net/
License:
Code, Graphics, Levels, Sound are GPLv3
See themes/default/font/COPYING for font licenses.
2020:
SDL-Ball was a hobby project of mine, it was my first computer game,
and I did learn a lot from it. Lots of things are done wrong here, because,
at the time, I didn't know any better. So don't use this as an example
of how to do a game. That being said, it WORKS, and I'm not going to
rewrite it, or majorly refactor it to make it more "right".
I'm also not going to hide it out of shame, I'm actually proud that I managed
to make it back when I did.. As far as I recall, I wrote most of it in Kate.
So, I'm keeping it up, it's actually a nice game and people would miss it if
I take it down. I'll also try and maintain it a bit better than I've done the
past.. Many years. Other than that, I've nothing to add :)
200?
SDL-Ball is my hobby project, I'm using it to learn C++ and
how not to design software, I learn by trial and error, thats
what makes it fun for me, so please, spare me the lessons.
If you want to clean it up, I'll gladly accept your patches.
------------------------------------
1.1 Objective
The objective of the game is to control the paddle in order to keep
the ball from falling down, by precise controlling you are able to
reflect the ball into bricks. Hitting bricks gives points and powerups.
Collecting powerups make the game easier or harder depending on the type.
Powerups gives you "coins" (you never now exactly how many coins you have),
and you can spend them on... Powerups :D
When all breakable bricks are destroyed, the level ends, and next level is on.
When all levels are completed, game start from level1 again, but with twice the score.
------------------------------------
1.2 Controls and keys
There are several ways to control the paddle, the preferred is using the mouse
but you can also use your keyboard, joystick or wiimote (wiimote, see 1.4.5 2.0 and 2.2)
1.2.1 Keyboard controls
w - Bring up wiimote connection dialog (only if compiled with wiiuse)
s - Take Screenshot (saves in ~/.config/sdl-ball/screenshots/)
u - Turn off screen clearing (gives some really cool/weird effects if background is turned off)
p - Pause
Pause -Pause
ESC - Pause and Show Menu
F1 - Show titlescreen
F11 - Toggle Fullscreen
c - Show/Hide clock (Shows what time it is)
v - Select Powerup (Next)
b - Buy selected Powerup
n - Select Powerup (Previous)
Arrow Up - Shoot/Launch ball
Arrow Left and Right - Move paddle left or right (See 1.4.2)
1.2.2 Mouse controls
Button1 - Shoot/Launch ball
Button2(Right Click) - Buy Powerup.
Mouse Down/Up - Select Powerup to buy.
X axis - Move Paddle
1.2.3 WiiMote controls
Button 1 - Buy Item.
Button 2 - Shoot/Launch ball
+ left and right - Select powerup to buy.
Tilt left or right to move paddle.
1.2.4 Joystick controls
Button1 - Shoot/Launch ball
Button2 - Buy powerup.
X axis - Move Paddle
Y axis - Selevt powerup to buy.
------------------------------------
1.3 Saving and Loading
To save your game, press ESC, and click the save-button in the menu
choose a slot and enter a name for the savegame,
then press enter to save.
Saving only saves the game as it is in the START of the level.
You can't save in level 1... Obviously, since you made no progress :)
To load a game, press ESC and click the load-button in the menu
then choose a game.
------------------------------------
1.4 Configuration
~/ means your home-directory.
The game saves its configuration in ~/.config/sdl-ball/settings.cfg
If you choose an unsupported resolution you can correct it in that file, see 1.4.6.
If you want to clear the highscores list, delete ~/.config/sdl-ball/highscores.txt
If you want to clear savegames, delete ~/.config/sdl-ball/savegame.sav
Edit this file with any text-editor to change options that are not reached from the menu.
1.4.1 Mouse
The mouse have no configuration options, you might want to adjust
your mousespeed from your window-manager.
1.4.2 Keyboard
Use the arrow keys to control the paddle, up to shoot and launch the ball.
You can change theese in the config file with the options:
leftkey, rightkey and shootkey however, you have to use SDLK numbers (see link in 1.4.6.)
You might want to tweak controlmaxspeed, controlaccel and controlstartspeed,
which are also explained in 1.2.6.
1.4.3 Digital Joystick
A digital joystick is a stick connected to 4 buttons, therefore it provides
very poor control, ie. its either ON or OFF, therefore, if you use such a joystick
be sure to choose "Digital Joystick" in the joystick options menu. You can tweak
tweak controlmaxspeed, controlaccel and controlstartspeed. (explained in 1.4.6.)
1.4.4 Analog Joystick
A analog joystick provides accurate control, if you use a analog joystick you
need to choose "Analog Joystick" in the joystick options menu, then make sure
the stick is centered, press "Callibrate", push joystick button shortly,then
push the stick left, press button shortly, and finally push the stick right and press
button shortly.
You can tweak controlmaxspeed (explained in 1.4.6.) it acts as sensitivity.
Callibration values are saved to config so you won't need to callibrate again.
1.4.5 WiiMote
You need to compile sdl-ball with support for libwiiuse, read more about this under 2.2.
You need to connect the wiimote every time you start the game.
To connect the wiimote simply press "w" then press 1 and 2 on the WiiMote.
You can run sdl-ball from a terminal to see some debugging message from libwiiuse.
You can tweak controlmaxspeed (explained in 1.4.6) it acts as sensitivity.
1.4.6 Config options explained
clearscreen [0/1] - clears the scene before drawing (looks pretty funny if you dont)
eyecandy [0/1] - turns on nice particle effects and trails, saves a few cpu cycles to turn it off
resx - horizontal resolution
resy - vertical resolution
showbg [0/1] - show the background image
fullscreen [0/1] - use full-screen mode
particlecollide [0/1] - use collision detection for particles, looks nice but might a cpu hog
sound [0/1] - use sound effects (sound effects will allways be loaded) (requires compiled with sound support)
stereo [0/1] - use stereo, some people don't like stereo, might save a few cpu cycles to turn it off
controlmaxspeed - the max speed the paddle can travel with when using non-mouse controllers.
10 is VERY fast, this acts as sensitivity for WiiMote and analog joystick.
controlaccel - the acceleration that the paddle gains when using digital joystick or keyboard for controlling.
controlstartspeed - the starting speed (the "lowest" speed) of the paddle when using digital joystick or keyboard.
rightkey - SDLK number of the key that makes the paddle travel right
leftkey - same as above, but left.
nextkey - Select next powerup.
buykey - Buy selected powerup.
prevkey - Select previous powerup.
shootkey - the key that makes the guns shoot and releases the ball.
Check this site for sdl key numbers: http://kobesearch.cpan.org/htdocs/SDL_Perl/SDL/Constants.pm.html#SDLK_0-
joyisdigital [0/1] - if this is 1, the joystick acts as a "dump"/digital joystick (behaving excatly like the keyboard)
if this is 0, the joystick acts as a analog/precise joystick.
joycal* - callibration values from the joystick callibration process.
joyenabled [1/0] - if 1 then joystick is enabled (set to 0 if you experience random movement/controlling error)
sndtheme - Case sensetive name of the sound-theme dir to use.
gfxtheme - Case sensetive name of the gfx-theme dir to use.
lvltheme - Case sensetive name of the level-theme dir to use.
------------------------------------------------------------------------------------------------------------
2.0 Compiling
The basic requirements for compiling sdl-ball is the following libs AND THEIR DEVELOPMENT FILES:
OpenGL
LibGLU
SDL1.2
SDL-image1.2
SDL-ttf1.2
SDL-mixer1.2
Make, a working C++ compiler and stdlibc++6
To compile, extract the SDL-Ball tarball (since you're reading this I figure you allready did) and cd into the dir.
Type make and press enter.
If you get errors: error: SDL.h: No such file or directory
And you're SURE you have dev libs installed, add -I/usr/include/SDL to CFLAGS in Makefile
2.1 Without sound
If you don't have a soundcard/have a very weak computer/don't have SDL-mixer you can compile without sound support.
This removes SDL-mixer dependancy.
To turn off sound support, you need to edit two files:
Makefile: remove -lSDL_mixer
main.cpp: remove #define WITH_SOUND
2.2 With WiiMote support
To enable WiiMote support you need to have a working installation of
libwiiuse ( http://www.wiiuse.net/ ) I won't get into installing that.
You also need a working blue-tooth dongle w/driver and all, if you can't run the
example-program from wiiuse, you need to fix those problems before trying to compile sdl-ball.
You need to have a systemwide install of wiiuse ( sudo make install in the wiiuse dir ).
You need to edito two files to enable WiiMote support:
Makefile: add -lwiiuse to LDFLAGS
main.cpp: remove the // in front of #define WITH_WIIUSE
2.3 For systemwide installation Because every linux dist is diffrent,
I can't know where it would be nice to put the datafiles (themes) for sdl-ball,
you might want to use a dir like /usr/local/share/sdl-ball
In that case, make a directory there, and put
the themes dir into it. Then compile with
make -DDATADIR="/usr/share/sdl-ball/themes"
------------------------------------
3.0 Themes
Themes can, but don't have to, consist of several things, in SDL-Ball a theme can contain:
levels - other levelsets are always nice.
graphics - all the graphics in sdl-ball can be changed by the theme.
sounds - you can customise sounds aswell.
Themes can be stored in 2 diffrent places: Either in ~/.config/sdl-ball/themes/
or in sdl-balls own sdl-ball/themes folder.
3.1 How to use a diffrent theme
You can choose a theme from the options menu.
You can mix sound, gfx and level thems in the settings file (see 1.4 and 1.4.6)
3.2 How to make your own theme
http://sdl-ball.sourceforge.net/?page=themes for more information on themes, it's really easy! ;)
------------------------------------
4.0 Contributors and Credits
People who have directly helped the SDL-Ball project, chronologically:
Quinton "quin" Reeves - Windows Port.
Ciddk - Website and Bugreports
Evgeni Golov - Suggestions, comments, insight, Debian package
"Dionos" - The dio-sound-theme.
yugrotavele - The AUR package
kfgz - Patching
Yannickescu - AROS port
------------------------------------
5.0 Frequently Asked Questions
Q: The paddle moves around randomly, or is stuck in one of the sides?
A: try disabling joystick support in the settings.cfg
sdl-ball-1.04+dfsg/background.cpp 0000664 0000000 0000000 00000011543 14545315634 0016710 0 ustar 00root root 0000000 0000000 /* ************************************************************************* *
SDL-Ball - DX-Ball/Breakout remake with openGL and SDL for Linux
Copyright (C) 2008 Jimmy Christensen ( dusted at dusted dot dk )
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 3 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, see .
* ************************************************************************* */
class backgroundClass {
private:
GLfloat r[4], g[4], b[4], a;
textureClass tex;
bool dir;
bool firstTexture;
public:
backgroundClass()
{
firstTexture=1;
}
void init(textureManager & texMgr)
{
bool l;
//Så vi ikke kommer til at slette texture 0 første gang funktionen bliver kaldt
if(!firstTexture)
glDeleteTextures(1, &tex.prop.texture);
float t = 0.25 * ((float)player.level+1);
if(t <= 1.0)
l=texMgr.load(useTheme("/gfx/bg/1.jpg",setting.gfxTheme), tex);
else if(t <= 2.0)
l=texMgr.load(useTheme("/gfx/bg/2.jpg",setting.gfxTheme), tex);
else if(t <= 3.0)
l=texMgr.load(useTheme("/gfx/bg/3.jpg",setting.gfxTheme), tex);
else if(t <= 4.0)
l=texMgr.load(useTheme("/gfx/bg/4.jpg",setting.gfxTheme), tex);
else if(t <= 5.0)
l=texMgr.load(useTheme("/gfx/bg/5.jpg",setting.gfxTheme), tex);
else if(t <= 6.0)
l=texMgr.load(useTheme("/gfx/bg/6.jpg",setting.gfxTheme), tex);
else if(t <= 7.0)
l=texMgr.load(useTheme("/gfx/bg/7.jpg",setting.gfxTheme), tex);
else if(t <= 8.0)
l=texMgr.load(useTheme("/gfx/bg/8.jpg",setting.gfxTheme), tex);
else if(t <= 9.0)
l=texMgr.load(useTheme("/gfx/bg/9.jpg",setting.gfxTheme), tex);
else if(t <= 10.0)
l=texMgr.load(useTheme("/gfx/bg/10.jpg",setting.gfxTheme), tex);
else if(t <= 11.0)
l=texMgr.load(useTheme("/gfx/bg/11.jpg",setting.gfxTheme), tex);
else if(t <= 12.0)
l=texMgr.load(useTheme("/gfx/bg/12.jpg",setting.gfxTheme), tex);
else if(t <= 13.0)
l=texMgr.load(useTheme("/gfx/bg/13.jpg",setting.gfxTheme), tex);
else if(t <= 14.0)
l=texMgr.load(useTheme("/gfx/bg/14.jpg",setting.gfxTheme), tex);
else if(t <= 15.0)
l=texMgr.load(useTheme("/gfx/bg/15.jpg",setting.gfxTheme), tex);
else if(t <= 16.0)
l=texMgr.load(useTheme("/gfx/bg/16.jpg",setting.gfxTheme), tex);
else if(t <= 17.0)
l=texMgr.load(useTheme("/gfx/bg/17.jpg",setting.gfxTheme), tex);
else if(t <= 18.0)
l=texMgr.load(useTheme("/gfx/bg/18.jpg",setting.gfxTheme), tex);
else if(t <= 19.0)
l=texMgr.load(useTheme("/gfx/bg/19.jpg",setting.gfxTheme), tex);
else if(t <= 20.0)
l=texMgr.load(useTheme("/gfx/bg/20.jpg",setting.gfxTheme), tex);
else if(t <= 21.0)
l=texMgr.load(useTheme("/gfx/bg/21.jpg",setting.gfxTheme), tex);
else if(t <= 22.0)
l=texMgr.load(useTheme("/gfx/bg/22.jpg",setting.gfxTheme), tex);
else if(t <= 23.0)
l=texMgr.load(useTheme("/gfx/bg/23.jpg",setting.gfxTheme), tex);
else if(t <= 24.0)
l=texMgr.load(useTheme("/gfx/bg/24.jpg",setting.gfxTheme), tex);
else if(t <= 25.0)
l=texMgr.load(useTheme("/gfx/bg/25.jpg",setting.gfxTheme), tex);
else
l=texMgr.load(useTheme("/gfx/bg/final.jpg",setting.gfxTheme), tex);
if(!l)
{
setting.showBg=0;
cout << "Backgrounds disabled." << endl;
}
firstTexture=0;
for(int i = 0; i < 4; i++)
{
r[i] = rndflt(1,0);
g[i] = rndflt(1,0);
b[i] = rndflt(1,0);
}
a = 1;
}
void draw()
{
glLoadIdentity();
glTranslatef( 0, 0, -3.0 );
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBindTexture(GL_TEXTURE_2D, tex.prop.texture);
glBegin( GL_QUADS );
glColor4f(r[0],g[0],b[0],a);
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.66, 1.25, 0.0f );
glColor4f(r[1],g[1],b[1],a);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.66, 1.25, 0.0f );
glColor4f(r[2],g[2],b[2],a);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.66,-1.25, 0.0f );
glColor4f(r[3],g[3],b[3],a);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.66,-1.25, 0.0f );
glEnd( );
}
};
sdl-ball-1.04+dfsg/changelog.txt 0000664 0000000 0000000 00000050774 14545315634 0016566 0 ustar 00root root 0000000 0000000 commit a08ef03281bc3410cb63b6b860242407d97c6703
Author: DusteD
Date: Thu Apr 9 22:40:58 2020 +0200
Fix readme and build for release 1.04
commit b546d08fe0e96f5dac747e0da7071cea6e7e547e
Author: DusteD
Date: Tue Apr 7 12:34:58 2020 +0200
Version 1.03
commit b5194a16f5465281669a847af5b047e58054cf19
Author: DusteD
Date: Tue Apr 7 12:25:32 2020 +0200
Fix last 2 compiler warnings.
commit c487b4d93e01aaa0b6f57821c7c3cbb93dc8e840
Author: Dmitry Marakasov
Date: Mon Dec 1 00:34:33 2014 +0300
Fix Makefile
- Compile with CXX, as this is c++ code
- Don't override user-set CXX
- Place DATADIR define to CXXFLAGS where it belongs
commit db436e01739cf0d8e882baeb1058dbed716fffa1
Author: Dmitry Marakasov
Date: Mon Dec 1 00:42:38 2014 +0300
Fix clang warnings
commit 9479653127e00dc756610e423fd241aaee26796b
Author: DusteD
Date: Mon Apr 6 13:10:49 2020 +0200
Apply patch #4 from sf.net, should fix mouse acting up on some systems.
Also, fixed a few brackets, this game was my first real computer program and it really shows. :)
commit a51644c5f7e7686cb7ad46682e3d2c77f37cfeb1
Author: DusteD
Date: Mon Apr 6 12:57:44 2020 +0200
Convert all files to unix line-endings.
commit 93dac74720ac729822a5bdf05adab09919b98b11
Author: DusteD
Date: Mon Apr 6 12:56:43 2020 +0200
Patch #7 from sf.net , don't move paddle on pause/resume
commit d6de2153c160fd79458f7df970fed8d5890a8b4d
Author: Jimmy Christensen
Date: Thu Aug 25 18:21:38 2016 +0200
Added contigrator build script.
commit 2126cea41a01306c5a5e5e0f07ab4371a7548def
Author: Jimmy Christensen
Date: Thu Aug 25 18:08:51 2016 +0200
Automatic builds, makefile for windows
commit 1a01ceef1d664f993fbc49e09c874fef97faad2d
Author: Jimmy Christensen
Date: Wed Aug 24 17:23:47 2016 +0200
Add a Linux app store metadata file
commit 52d8a5266919342acdcc8cfe134c52320394165d
Author: Jimmy Christensen
Date: Fri Nov 7 18:23:08 2014 +0200
Add GenericName to .desktop file.
Thanks to nemysisbsd for the patc for the patch.
commit 335fedcc9c003c95a51a905b522fb4630271ac86
Author: Jimmy Christensen
Date: Wed Oct 8 18:42:41 2014 +0300
Version 1.02
Fixed minor things, changed default settings.
commit 9f19a0e5382d936fc74f37bf206556a07f3a5974
Author: qreeves
Date: Tue Jan 5 08:05:21 2010 +0000
compile icon into binary
commit a8540633d62fda6061620a6e879f9fadf3fc3648
Author: qreeves
Date: Tue Jan 5 08:03:21 2010 +0000
cb project file updated
commit 1449e12e46a07a7a2a82ffa6bea9a8ab80316295
Author: qreeves
Date: Tue Jan 5 07:43:51 2010 +0000
updating sdl-win32, fixing mingw compilation warnings
commit 46e2c96a37455c15704a3aa01b2cd3f4dfc70155
Author: dusteddk
Date: Sun Jan 11 16:12:21 2009 +0000
win32
commit c8ba9dd8f886c3cb6570ec70ce42728ef07c9144
Author: dusteddk
Date: Sun Jan 11 16:10:15 2009 +0000
commit aa62143583361d7736ac985e8ba1e5c927f2bc47
Author: dusteddk
Date: Sun Jan 11 16:09:33 2009 +0000
minor bugfixes
commit ba172bbc7ff36c557728eef524ef0d1b27aadb69
Author: dusteddk
Date: Thu Jan 8 09:54:26 2009 +0000
commit b79196bb27fa1d6eb7f2ab7b7bf27b0ecbaaa4e5
Author: dusteddk
Date: Thu Jan 8 09:50:46 2009 +0000
failed
commit fffb9190973919d16ca0a54f752578231df07c36
Author: dusteddk
Date: Thu Jan 8 09:48:54 2009 +0000
commit 5c25d9386f75de527283db0e39c66645ba3bebfb
Author: dusteddk
Date: Thu Jan 8 09:44:07 2009 +0000
minor
commit 16f27f1631e1d54bbfd8f718eda63aad09ae8e80
Author: dusteddk
Date: Thu Jan 8 09:04:02 2009 +0000
minor
commit 6ffb4d7b36452a23fccbc2d78061582095fb28db
Author: dusteddk
Date: Sun Jan 4 10:17:21 2009 +0000
minor
commit a5d95b03aff8de90a45810a5c5b68386cb7f022c
Author: qreeves
Date: Fri Jan 2 16:40:17 2009 +0000
commit 9e0e95da8977ec1d937b482e3dc16955d48d5c34
Author: dusteddk
Date: Wed Dec 31 00:49:22 2008 +0000
minor
commit 29285b663d013e936779dc8944d0c3a65de05e55
Author: dusteddk
Date: Mon Dec 29 23:03:39 2008 +0000
minor, fixed pause bug
commit 3546c35c2d2dd116ee22103ebfc02abd8315d4eb
Author: dusteddk
Date: Wed Dec 17 00:11:32 2008 +0000
minor
commit b1476256d5832901a035cdec7e55b7feff24fd25
Author: dusteddk
Date: Mon Dec 8 21:25:57 2008 +0000
themes
commit 96a97c848687cee313272b94c5a2d42470115537
Author: dusteddk
Date: Mon Dec 8 21:20:11 2008 +0000
dio-sound-theme
commit 8833ab4b6dacf7f979624695c00be3d5a36c82eb
Author: dusteddk
Date: Mon Dec 8 04:45:47 2008 +0000
commit b0acc09261c52b245390775df7d1f12dd98e4117
Author: dusteddk
Date: Tue Nov 25 15:37:35 2008 +0000
minor
commit 32ed61b4dce31a9a9f546d11e4d9ffe2176a1a7a
Author: qreeves
Date: Sun Nov 23 21:47:13 2008 +0000
win32 binary
commit f925fbfc42e54d6c8fdb531a0f6ba9743deb6f8c
Author: dusteddk
Date: Wed Nov 19 19:54:21 2008 +0000
0.14
commit 68b347ca7252e0a020839b33f8fc0da1af6f31ed
Author: dusteddk
Date: Wed Nov 19 17:32:04 2008 +0000
minor
commit 2d112eefc7bc8ab3df95244bbe1e96d67857a02f
Author: dusteddk
Date: Sat Nov 15 14:51:16 2008 +0000
minor
commit aea9f25e387b692889fb6421978e8dcc5a159427
Author: dusteddk
Date: Fri Nov 14 13:46:03 2008 +0000
fixed crashbug
commit 63e119a17d120a60739ef4602f656d8c659067c3
Author: dusteddk
Date: Wed Nov 12 16:05:46 2008 +0000
logo now POT
commit 49ee3b44d3a764f53e759b90f4d4908ce1dacb7f
Author: dusteddk
Date: Wed Nov 12 15:42:53 2008 +0000
lol, compiler warning fixed
commit f385aeac9589acc1fd3c8848882cac6015e7d2ec
Author: dusteddk
Date: Wed Nov 12 10:16:06 2008 +0000
minor
commit fafac83b70d476c93df676bfddaf114ba16623a5
Author: dusteddk
Date: Tue Nov 11 22:08:11 2008 +0000
backgrounds
commit 6e98ae4f3481083befe4d39352509eaa37e06575
Author: dusteddk
Date: Tue Nov 11 21:18:35 2008 +0000
commit 87150585e288c9fecdcc1884c019275df7495cb9
Author: qreeves
Date: Tue Nov 11 14:37:19 2008 +0000
commit 8aa6a6e37e98e923834364ea90c1cb35925b8e55
Author: dusteddk
Date: Tue Nov 11 10:26:35 2008 +0000
commit 8dd28cefe12f92c235ab24a77682b0299bde861d
Author: dusteddk
Date: Tue Nov 11 09:29:00 2008 +0000
GPLv3 sounds
commit 1d53ec8e2703463e475d17a1e75c78154e3dd257
Author: dusteddk
Date: Tue Nov 11 09:23:28 2008 +0000
commit 13873a1b599d59d24bb57e9414a4de663947584e
Author: dusteddk
Date: Tue Nov 11 02:42:52 2008 +0000
minor, collision detection fix
commit bcdcb970acc35ef1a9dc4d2ccd6d4829e047ff47
Author: dusteddk
Date: Sun Nov 9 16:11:37 2008 +0000
minor
commit 3d8c2e01b60b46b6a46b84d83f0be2e78828147b
Author: dusteddk
Date: Sun Nov 9 14:13:09 2008 +0000
minor
commit 7462d21a225a486fcb4aad4190d549aa5542fed8
Author: qreeves
Date: Sat Nov 8 17:06:17 2008 +0000
commit d09bd0261c3d3a09868e59127e3820dc87d95cfc
Author: dusteddk
Date: Sat Nov 8 05:23:18 2008 +0000
icons, moved xcf files
commit c71f0a329cede3146db2c605a4979830f111719e
Author: dusteddk
Date: Fri Nov 7 23:27:43 2008 +0000
commit b144991f99a70b16ceb131c329659292577364e0
Author: dusteddk
Date: Thu Nov 6 01:54:02 2008 +0000
minor
commit 58e5fd2d8b409decea7110bbb2975aa2e312859f
Author: dusteddk
Date: Wed Nov 5 03:19:16 2008 +0000
minor
commit 47bd1dff6628cf36c66e4c7a0b5d621a9acd23f0
Author: dusteddk
Date: Wed Nov 5 03:02:28 2008 +0000
minor
commit cb6d0a0ab200aa6d43c54dc34a8f2967b0f32bc8
Author: dusteddk
Date: Wed Nov 5 02:53:54 2008 +0000
minor
commit 5e0cdd65cf5435f50c56c748a828a78eb812a6f5
Author: dusteddk
Date: Wed Nov 5 01:36:02 2008 +0000
debug
commit 0c6d433cdddab45ffee622cc4869e438f28fae1c
Author: dusteddk
Date: Wed Nov 5 01:20:42 2008 +0000
debugging
commit 5498911a998e24c92c892686a04ed42b350b4d24
Author: dusteddk
Date: Tue Nov 4 17:06:49 2008 +0000
changelog lol
commit d6bdc7c7d818956cac30073a956e0215fa7ec042
Author: dusteddk
Date: Tue Nov 4 17:05:52 2008 +0000
minor
commit 876a82d359a568f4c0c0bad179b38bd93c655337
Author: dusteddk
Date: Tue Nov 4 16:52:56 2008 +0000
themes
commit 44134006aa98b0d75bbd812b1eb3b1f344192fc8
Author: dusteddk
Date: Tue Nov 4 16:45:46 2008 +0000
themes
commit 4963fee44e30519b09d390ef00291e042b6ddf02
Author: dusteddk
Date: Tue Nov 4 16:42:27 2008 +0000
themes
commit 8d0947e7f582dece0315ce078da2824f0e6b8ff3
Author: dusteddk
Date: Tue Nov 4 16:35:12 2008 +0000
commit 2c2aea403d11cd7d911c4203ef49e12328af9a1e
Author: dusteddk
Date: Tue Nov 4 14:10:29 2008 +0000
minor
commit 090c39bceaeb9cc104a22829475bb550204d659c
Author: dusteddk
Date: Mon Nov 3 22:23:01 2008 +0000
minor
commit ea823372d08280e4c536050f842394542409feda
Author: dusteddk
Date: Mon Nov 3 21:32:58 2008 +0000
coin powerup, minor
commit edc6d76208e082c4972873b1ae98aa8cafccb2ac
Author: dusteddk
Date: Sun Nov 2 20:19:46 2008 +0000
font rendering
commit bf3ec726919c020971a7fb15b9abdcf3be76726f
Author: qreeves
Date: Fri Oct 31 08:04:59 2008 +0000
commit faf30fdc52252f8109b9079218db5a3d75ab1bc4
Author: dusteddk
Date: Thu Oct 30 15:41:10 2008 +0000
minor
commit ca0486fa4ce155a5c97025c7b8fa7917af8321ea
Author: qreeves
Date: Tue Oct 28 07:19:29 2008 +0000
commit 8f6b8c9f9ca41f0d11cbe49c1b9dc846b681302b
Author: dusteddk
Date: Sun Oct 26 13:44:26 2008 +0000
minor
commit c7d2df98eb62727e0c2d5c90d46a6dfbab744e83
Author: dusteddk
Date: Sun Oct 26 11:30:21 2008 +0000
minor
commit b8d0f08c545458596a7133ebe4df06a4695c34de
Author: qreeves
Date: Sun Oct 26 03:30:26 2008 +0000
win32 bin
commit 51d6760983694ac8f3b39c3edd1a0ed3d0188261
Author: dusteddk
Date: Sat Oct 25 14:26:14 2008 +0000
bin update
commit feb5f3dc760f6010b535ff04dca5cbd7a3eb6970
Author: dusteddk
Date: Sat Oct 25 14:25:57 2008 +0000
stupid
commit f4799d06c286b72cb1591498b5ad04543404a5f2
Author: qreeves
Date: Sat Oct 25 03:59:48 2008 +0000
win32 bin
commit 077741778703db01b6ac7d148e504aa97b9bd875
Author: dusteddk
Date: Fri Oct 24 11:50:15 2008 +0000
0.12rc3
commit 002dd564e1f7cbd41522f11af9afee701f0a2bdd
Author: dusteddk
Date: Fri Oct 24 11:48:02 2008 +0000
0.12rc3
commit b9851c6e344abe39039318eda2f2ada3a7a630c5
Author: dusteddk
Date: Tue Oct 21 15:08:14 2008 +0000
minor
commit a87be5ca3507f4e89cc0ecdd62c906059f3adab9
Author: qreeves
Date: Sun Oct 19 15:55:58 2008 +0000
commit 6a4d1f316b4c033d8f1ea841004664a65c27772c
Author: dusteddk
Date: Sun Oct 19 15:10:35 2008 +0000
joystick
commit e488185bb561c9c4c968c235d2975bbcf1116108
Author: dusteddk
Date: Sun Oct 19 14:45:32 2008 +0000
commit 85e70104afece4b70ea6845d738053b6092f4aa5
Author: dusteddk
Date: Sun Oct 19 14:21:47 2008 +0000
fonts
commit fd4216092ce11bec41a719605feab846bdd0af53
Author: dusteddk
Date: Sun Oct 19 13:50:50 2008 +0000
nonfree
commit 68c866657130fb45f5cf27178ca20686ba90eb6a
Author: dusteddk
Date: Sat Oct 18 22:40:34 2008 +0000
commit 8daa19c9cb641c18de42601dc1d157e019f22553
Author: dusteddk
Date: Sat Oct 18 21:40:37 2008 +0000
squared
commit 5cb038aa04ca53f2e5175005269f48c2e82435fa
Author: dusteddk
Date: Sat Oct 18 21:12:49 2008 +0000
minor
commit d4e7afe8ba4c8fcadd56329e12036806456075bf
Author: dusteddk
Date: Sat Oct 18 20:57:50 2008 +0000
zlib
commit 16d88d881f2c2bad061e8b4eaa19139858708167
Author: dusteddk
Date: Sat Oct 18 20:51:30 2008 +0000
fix
commit 684495697c18c076ae9333209eb76cc5344763de
Author: dusteddk
Date: Sat Oct 18 20:48:14 2008 +0000
fix
commit 925c39eff13c4ff840c8fe82d19306faf5a5ab60
Author: dusteddk
Date: Sat Oct 18 20:12:25 2008 +0000
fixfix
commit 975d9c6314b423e8843c045fa21c1777071ea3d7
Author: dusteddk
Date: Sat Oct 18 19:37:40 2008 +0000
readme
commit 4e8d47ee71d9154a0a43ee90fdd96486fa824342
Author: qreeves
Date: Sat Oct 18 19:26:04 2008 +0000
win32 update
commit 35c3629aba1cdf60566fefa611ec4e7078286d99
Author: dusteddk
Date: Sat Oct 18 15:07:17 2008 +0000
minor
commit f466c1e6392cb8b6f39c36479377e5d506efa68e
Author: dusteddk
Date: Sat Oct 18 14:21:19 2008 +0000
commit 9297afcbb0231ca1ff142c95f3c15462985e438c
Author: dusteddk
Date: Sat Oct 18 14:20:00 2008 +0000
commit f11693dd91b495535f377f85405e705a1c152ba2
Author: dusteddk
Date: Sat Oct 18 13:54:46 2008 +0000
minor
commit d66068e53aead883c93f51fcb80e0576c602beb9
Author: dusteddk
Date: Sat Oct 18 11:10:09 2008 +0000
commit 6cc88d12ce41be6ffa19ecd6a8fd1edc5c43a58c
Author: dusteddk
Date: Fri Oct 17 23:26:00 2008 +0000
textures, themes
commit 7889cd4ae8be2713023cd4ef87909b7799087a31
Author: dusteddk
Date: Fri Oct 17 19:37:02 2008 +0000
fix
commit 9b1c7189b043e37c53375eca99e81eeb3e121b2f
Author: dusteddk
Date: Fri Oct 17 19:22:22 2008 +0000
fix
commit 6c33c098d0265e32919116fcb68bf54b4ef788ae
Author: dusteddk
Date: Fri Oct 17 19:20:53 2008 +0000
stuff
commit ca1b40da76afd6e940cc8a6a576023b047a9e40f
Author: dusteddk
Date: Fri Oct 17 10:43:18 2008 +0000
intro ran very slow on some computers
commit a1c16b110d9287fc97aeabb1251a99b0d2a9f8a3
Author: dusteddk
Date: Fri Oct 17 00:40:36 2008 +0000
fix
commit 3bd3a6ad89eba674c2d5d3b2c4b43f79dd13a293
Author: dusteddk
Date: Fri Oct 17 00:36:22 2008 +0000
themes folder
commit 15daff399f1dd10b4bf1d83c27f437732bb12c06
Author: dusteddk
Date: Fri Oct 17 00:34:43 2008 +0000
themes
commit a8bf7b4383fe12f5ef92baddedd832b7857b51f9
Author: dusteddk
Date: Thu Oct 16 21:54:54 2008 +0000
sound
commit 164cadbd90f8220dfc7f7fd6720d25d98a54e30a
Author: dusteddk
Date: Thu Oct 16 21:45:15 2008 +0000
coin system
commit e592a3e13265341782dc7455bee5c58d20bee292
Author: dusteddk
Date: Thu Oct 16 14:28:36 2008 +0000
Title
commit 62556afc27b59c90b9779ee1cbd0d0959b706489
Author: qreeves
Date: Wed Oct 15 22:03:43 2008 +0000
win32 update
commit fcd045ba53410f5829fb179a8ef2ecef3fc2c7f1
Author: dusteddk
Date: Wed Oct 15 19:55:54 2008 +0000
updated makefile
commit a8805e3543f5729957e275ed82796da60fc6812f
Author: dusteddk
Date: Wed Oct 15 19:52:51 2008 +0000
commit 37fb8770f7bd3c2594dd9dc243f9fd546568f2df
Author: dusteddk
Date: Wed Oct 15 19:27:15 2008 +0000
intro
commit 5709194f176a41bc1457f710d8951e0c0c450988
Author: dusteddk
Date: Wed Oct 15 01:54:46 2008 +0000
title
commit c427d67758b52a8de98ea12f0321a8673bd1b398
Author: dusteddk
Date: Wed Oct 15 01:54:17 2008 +0000
ugley implementation of title screen
commit c1cfc5224f3745dd0ee3f91f7c5e161bc3b6cb97
Author: dusteddk
Date: Tue Oct 14 18:44:39 2008 +0000
commit 07856f056693a0fac2ad34ea73f1da221ed14463
Author: dusteddk
Date: Tue Oct 14 15:52:13 2008 +0000
bugfix and gpl header
commit 6ebb04d9490e30d3e9ef3aa63526fe93231bb326
Author: dusteddk
Date: Mon Oct 13 19:34:23 2008 +0000
improve screenshot
commit 9670f5cace5f2e7996dfd1d3dab7667303471fa1
Author: dusteddk
Date: Mon Oct 13 18:54:42 2008 +0000
Screenshot function
commit 3ffaa4eded37d13d84868803ae4cd3cca1ed1130
Author: dusteddk
Date: Mon Oct 13 17:50:44 2008 +0000
commit 520dfeff5998630197154485a723e554d5575f67
Author: dusteddk
Date: Mon Oct 13 12:57:42 2008 +0000
minor
commit 05455d500380ee8204dcc71535609f947121d9b7
Author: dusteddk
Date: Mon Oct 13 09:46:17 2008 +0000
cleaning
commit afb1d39fcb1485100a1820e6e5ca030cd26118f6
Author: dusteddk
Date: Mon Oct 13 09:42:07 2008 +0000
sdl-ball-1.04+dfsg/contigrator-buildscript.sh 0000775 0000000 0000000 00000002716 14545315634 0021303 0 ustar 00root root 0000000 0000000 #!/bin/bash
# This file is executed by contigratord when a build is triggered.
# You can execute it manually too by executing /home/contigrator/contigrator/tool/trigBuild.sh
#These variables are available:
# $WD = The workspace $BN = Zero padded build Number (%07i) and $BN_NUM for unpadded.
# $OUT = This empty directory is created for you to store the output of the build.
OUT=/tmp/sdlballout/
mkdir /tmp/sdlballout
make -f Makefile.win clean
make -f Makefile clean
OUTDIR="SDL-Ball_1.04"
WINPKG="$OUTDIR"_windows.zip
LINPKG="$OUTDIR"_linux.tar.bz2
SRCPKG="$OUTDIR"_src.tar.xz
mkdir -p $OUTDIR
# Create the changelog
git log > changelog.txt
cp changelog.txt $OUTDIR
# Compile for linux
make -f Makefile
mv sdl-ball $OUTDIR/sdl-ball_linux_x64
make -f Makefile clean
# Compile for windows
make -f Makefile.win
# Package datafiles
cp -a leveleditor $OUTDIR
cp -a themes $OUTDIR
cp *.txt $OUTDIR
# Package linux version
tar -c $OUTDIR | pbzip2 > $LINPKG
rm $OUTDIR/sdl-ball_linux_x64
# Package windows version
mv sdl-ball.exe $OUTDIR/SDL-Ball.exe
cp win32/readme_SDL.txt $OUTDIR
unix2dos $OUTDIR/*.txt
cp win32/*.dll $OUTDIR
zip -r $WINPKG $OUTDIR
make -f Makefile.win clean
# Build the source code
git archive --prefix="SDL-Ball_src/" HEAD > "$OUTDIR"_src.tar
tar --file "$OUTDIR"_src.tar --append --transform 's%^%SDL-Ball_src/%' changelog.txt
cat "$OUTDIR"_src.tar | pxz > "$OUT/$SRCPKG"
rm -R $OUTDIR *.tar
rm changelog.txt
mv $WINPKG $OUT
mv $LINPKG $OUT
mv $OUT .
sdl-ball-1.04+dfsg/declerations.h 0000664 0000000 0000000 00000002453 14545315634 0016712 0 ustar 00root root 0000000 0000000 /* ************************************************************************* *
SDL-Ball - DX-Ball/Breakout remake with openGL and SDL for Linux
Copyright (C) 2008 Jimmy Christensen ( dusted at dusted dot dk )
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 3 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, see .
* ************************************************************************* */
class effectManager;
#define FX_SPARKS 0
#define FX_FIRE 1
#define FX_TRANSIT 2
#define FX_PARTICLEFIELD 3
#define FX_VAR_TYPE 1
#define FX_VAR_NUM 0
#define FX_VAR_SPEED 2
#define FX_VAR_SPREAD 3
#define FX_VAR_SIZE 4
#define FX_VAR_LIFE 5
#define FX_VAR_GRAVITY 6
#define FX_VAR_COLDET 7
#define FX_VAR_COLOR 8
#define FX_VAR_TEXTURE 9
#define FX_VAR_RECTANGLE 10
sdl-ball-1.04+dfsg/effects.cpp 0000664 0000000 0000000 00000037516 14545315634 0016220 0 ustar 00root root 0000000 0000000 /* ************************************************************************* *
SDL-Ball - DX-Ball/Breakout remake with openGL and SDL for Linux
Copyright (C) 2008 Jimmy Christensen ( dusted at dusted dot dk )
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 3 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, see .
* ************************************************************************* */
struct effect_vars {
int type; //Hvilken slags effekt er det?
bool coldet; //er der collision detection på denne?
bool active; //Er denne effekt aktiv
GLfloat col[3]; //Hvilken farve har effekten?
GLfloat speed; //Hvor hurtigt bevæger den sig
GLfloat spread; //Hvor stor er spredningen (i grader)
GLfloat size; //Skalering af elementerne
struct pos rect; //rectangular size (for particleField)
GLfloat gravity; //Hvor stor er tyndgekraften
int num; //Hvor mange elementer er der i den
int life; //hvor mange ms lever den?
textureClass tex; //Texture
int effectId; //unique id for this effect
};
class transit_effect_class {
private:
GLfloat opacity;
public:
int age;
effect_vars vars;
void init()
{
age=0;
opacity = 0.0f;
var.transition_half_done=0;
}
void draw()
{
age += globalTicksSinceLastDraw;
if(age < vars.life/2.0) //første halvdel
{
//Gør solid
opacity += vars.life/500.0*globalMilliTicksSinceLastDraw;
} else {
var.transition_half_done=1;
//Gør trans
opacity -= vars.life/500.0*globalMilliTicksSinceLastDraw;
}
glLoadIdentity();
glDisable( GL_TEXTURE_2D );
glTranslatef(0.0, 0.0, -3.0);
glColor4f( vars.col[0], vars.col[1], vars.col[2], opacity );
glBegin( GL_QUADS );
glVertex3f(-1.66, 1.25, 0.0);
glVertex3f( 1.66, 1.25, 0.0);
glVertex3f( 1.66,-1.25, 0.0);
glVertex3f(-1.66,-1.25, 0.0);
glEnd( );
glEnable( GL_TEXTURE_2D );
}
};
class sparkle {
public:
bool active;
GLfloat size;
GLfloat ang;
int life;
int lifeleft;
pos p,v; //position og vel
effect_vars vars;
GLfloat bounce,f; //bounce og friktion
sparkle()
{
bounce=0;
f=0;
active=1;
}
void draw()
{
if(lifeleft > 0)
{
//sanitize
lifeleft -= globalTicksSinceLastDraw;
//er vi indenfor skærmen?
if(p.x > 1.67 || p.y < -1.7 || p.x < -1.67)
{
active=0;
}
v.y -= vars.gravity*globalMilliTicksSinceLastDraw;
v.y -= bounce*globalMilliTicksSinceLastDraw;
if(v.x < 0)
{
v.x += f*globalMilliTicksSinceLastDraw;
} else {
v.x -= f*globalMilliTicksSinceLastDraw;
}
p.x += v.x * globalMilliTicksSinceLastDraw;
p.y += v.y * globalMilliTicksSinceLastDraw;
glColor4f(vars.col[0], vars.col[1],vars.col[2], (1.0/(float)life)*(float)lifeleft);
GLfloat curSize = size/(float)life * (float)lifeleft;
glBindTexture( GL_TEXTURE_2D, vars.tex.prop.texture );
glBegin( GL_QUADS );
glTexCoord2f(0,0); glVertex3f(p.x-curSize,p.y+curSize, 0.0);
glTexCoord2f(0,1); glVertex3f(p.x+curSize,p.y+curSize, 0.0);
glTexCoord2f(1,1); glVertex3f(p.x+curSize,p.y-curSize, 0.0);
glTexCoord2f(1,0); glVertex3f(p.x-curSize,p.y-curSize, 0.0);
glEnd( );
} else {
active=0;
}
}
void coldet(brick & b)
{
if(p.x > b.posx-b.width && p.x < b.posx+b.width)
{
if(p.y > b.posy-b.height && p.y < b.posy+b.height)
{
//Hvor ramte vi fra?
if(p.y < b.posy && !b.n(3))
{
//bunden
v.y *= -1;
//p.y = b.posy-b.height-0.01;
} else
if(p.y > b.posy && !b.n(2))
{
//toppen
p.y = b.posy+b.height;
if(v.y < 0)
{
v.y *= -1;
v.y /= 2.0;
f += 0.01;
}
} else
if(p.x > b.posx && !b.n(1))
{
//p.x = b.posx+b.width;
//højre
if(v.x < 0)
v.x *= -1;
} else
if(p.x < b.posx && !b.n(0))
{
//p.x = b.posx-b.width;
//venstre
if(v.x > 0)
v.x *= -1;
}
}
}
}
void pcoldet(paddle_class & b)
{
if(p.x > b.posx-b.width && p.x < b.posx+b.width)
{
if(p.y > b.posy-b.height && p.y < b.posy+b.height)
{
//Hvor ramte vi fra?
if(p.y < b.posy)
{
//bunden
p.y = b.posy-b.height;
}
if(p.y > b.posy)
{
//toppen
p.y = b.posy+b.height;
if(v.y < 0)
{
v.y *= -1;
v.y /= 2.0;
f += 0.01;
}
} else
if(p.x > b.posx)
{
p.x = b.posx+b.width;
//højre
if(v.x < 0)
v.x *= -1;
} else
if(p.x < b.posx)
{
p.x = b.posx-b.width;
//venstre
if(v.x > 0)
v.x *= -1;
}
}
}
}
};
class particleFieldClass {
private:
int spawnTimeout; //This is used to spawn sparkles at a random time
sparkle *sparks;
void spawnSpark(int sparkNum);
public:
struct pos p;
struct effect_vars vars;
void init(struct effect_vars varsP, struct pos p);
void draw();
void move(struct pos p);
void coldet(brick & b);
void pcoldet(paddle_class & b);
~particleFieldClass();
};
void particleFieldClass::init(struct effect_vars varsP, struct pos spawnPos)
{
vars=varsP;
spawnTimeout=0;
vars.active=1;
sparks = new sparkle[vars.num];
p=spawnPos;
for(int i=0; i < vars.num; i++)
{
sparks[i].active=1;
sparks[i].vars = vars; //NOTE:remove effect_vars from sparkle class?
spawnSpark(i);
}
}
particleFieldClass::~particleFieldClass()
{
delete[] sparks; //free the sparks
}
void particleFieldClass::spawnSpark(int sparkNum)
{
GLfloat angle=(RAD/vars.num-1)*(rndflt(vars.num,0.0)); //FIXME: Make this elegant: Choose a random angle (in radients)
spawnTimeout = rand()%10;
sparks[sparkNum].life = rand()%vars.life;
sparks[sparkNum].lifeleft = sparks[sparkNum].life;
sparks[sparkNum].v.x = (vars.speed*rndflt(vars.speed*2.0,0.0)) * sin(angle);
sparks[sparkNum].v.y = (vars.speed*rndflt(vars.speed*2.0,0.0)) * cos(angle);
sparks[sparkNum].size = rndflt(vars.size,0);
sparks[sparkNum].p=p;
sparks[sparkNum].p.x += rndflt(vars.rect.x, (vars.rect.x/2.0));
sparks[sparkNum].p.y += rndflt(vars.rect.y, (vars.rect.y/2.0));
sparks[sparkNum].active=1;
}
void particleFieldClass::draw()
{
spawnTimeout -= globalTicksSinceLastDraw;
glLoadIdentity();
glTranslatef(0.0,0.0 , -3.0);
int t=0;
for(int i=0; iinit(vars, p);
break;
}
}
void draw()
{
//find ud af hvor længe der er gået siden sidst
int i;
bool stay=0;
switch(vars.type)
{
case FX_SPARKS:
glLoadIdentity();
glTranslatef(0.0,0.0 , -3.0);
for(i=0; i < vars.num; i++)
{
if(sparks[i].active)
{
sparks[i].draw();
stay=1;
}
}
break;
case FX_TRANSIT:
transit.draw();
if(transit.age <= vars.life)
stay=1;
break;
case FX_PARTICLEFIELD:
pf->draw();
if(pf->vars.active)
stay=1;
break;
}
//Ugley hack, to prevent transit from flickering when spark effects are deleted.
if(var.effectnum != -1 && vars.type != FX_TRANSIT)
stay=1;
if(!stay)
{
vars.active=0;
switch(vars.type)
{
case FX_SPARKS:
delete[] sparks; //Free sparks again ;)
break;
case FX_PARTICLEFIELD:
delete pf; //remove the particlefield
break;
}
}
}
void coldet(brick & b)
{
int i;
if(vars.type == FX_SPARKS)
{
for(i=0; i < vars.num; i++)
{
if(sparks[i].active)
{
sparks[i].coldet(b);
}
}
} else if(vars.type == FX_PARTICLEFIELD)
{
pf->coldet(b);
}
}
void pcoldet(paddle_class & b)
{
int i;
if(vars.type == FX_SPARKS)
{
for(i=0; i < vars.num; i++)
{
if(sparks[i].active)
{
sparks[i].pcoldet(b);
}
}
} else if(vars.type == FX_PARTICLEFIELD)
{
pf->pcoldet(b);
}
}
};
class effectManager {
private:
struct effect_vars vars; //denne kopieres over i den næste effekt der bliver spawned
int effectId; //ever rising number of a spawned effect.
public:
listeffects;
effectManager()
{
effects.clear();
effectId=0;
}
void set(int var, GLfloat val)
{
switch(var)
{
case FX_VAR_SPEED:
vars.speed = val;
break;
case FX_VAR_SPREAD:
vars.spread = val;
break;
case FX_VAR_SIZE:
vars.size = val;
break;
case FX_VAR_GRAVITY:
vars.gravity = val;
}
}
void set(int var, int val)
{
switch(var)
{
case FX_VAR_NUM:
vars.num=val;
break;
case FX_VAR_LIFE:
vars.life=val;
break;
case FX_VAR_TYPE:
vars.type=val;
break;
case FX_VAR_COLDET:
vars.coldet=val;
break;
}
}
void set(int var, GLfloat r, GLfloat g, GLfloat b)
{
switch(var)
{
case FX_VAR_COLOR:
vars.col[0] = r;
vars.col[1] = g;
vars.col[2] = b;
break;
}
}
void set(int var, textureClass tex)
{
switch(var)
{
case FX_VAR_TEXTURE:
vars.tex = tex;
break;
}
}
void set(int var, struct pos p)
{
switch(var)
{
case FX_VAR_RECTANGLE:
vars.rect = p;
break;
}
}
//retunerer effektid så der kan checkes om det er aktivt
int spawn(pos p)
{
effectId++;
effect_class tempEffect;
vars.effectId = effectId;
tempEffect.vars = vars; //kopier det over som er sat op
tempEffect.init(p);
effects.push_back(tempEffect);
return(effectId);
}
void draw()
{
for(list ::iterator it = effects.begin(); it != effects.end(); ++it)
{
it->draw();
if(!it->vars.active)
{
it = effects.erase(it);
}
}
}
void coldet(brick & b)
{
if(b.collide && b.active)
{
for(list ::iterator it = effects.begin(); it != effects.end(); ++it)
{
if(it->vars.coldet)
it->coldet(b);
}
}
}
void pcoldet(paddle_class & b)
{
for(list::iterator it = effects.begin(); it != effects.end(); ++it)
{
if(it->vars.coldet)
it->pcoldet(b);
}
}
int isActive(int id)
{
for(list::iterator it = effects.begin(); it != effects.end(); ++it)
{
if(it->vars.effectId == id && it->vars.active)
{
return(1);
}
}
return(0);
}
void kill(int id)
{
for(list::iterator it = effects.begin(); it != effects.end(); ++it)
{
if(it->vars.effectId)
{
it->vars.active=0;
}
}
}
};
class glAnnounceMessageClass {
private:
int age;
GLfloat zoom,fade;
bool fadedir;
public:
bool active;
int life;
string text;
int font;
glAnnounceMessageClass()
{
active=1;
age=0;
fade=0;
fadedir=0;
zoom=0;
}
void draw()
{
GLfloat s;
zoom += 4000.0/life * globalMilliTicksSinceLastDraw;
if(fadedir)
{
fade -= 4000.0/life * globalMilliTicksSinceLastDraw;
} else {
fade += 4000.0/life * globalMilliTicksSinceLastDraw;
}
glLoadIdentity();
glTranslatef(0.0,0.0,-3.0);
glColor4f(1.0,0.0,0.0,fade);
s=zoom*0.85;
glText->write(text, font, 1, s, 0.0, 0.0);
glColor4f(0.0,1.0,0.0,fade);
s=zoom*0.90;
glText->write(text, font, 1, s, 0.0, 0.0);
glColor4f(0.0,0.0,1.0,fade);
s=zoom*0.95;
glText->write(text, font, 1, s, 0.0, 0.0);
glColor4f(1.0,1.0,1.0,fade);
s=zoom;
glText->write(text, font, 1, s, 0.0, 0.0);
age += globalTicksSinceLastDraw;
if(age > life*0.50)
{
fadedir=1;
}
if(age > life)
active=0;
}
};
#define MAXMSG 10
class glAnnounceTextClass {
private:
int len; //hvor mange mangler vi at vise
list msg;
list::iterator it;
public:
glAnnounceTextClass()
{
len=0;
}
void write(const char *text, int ttl, int font)
{
len++;
msg.resize(len);
it=msg.end();
--it;
it->life=ttl;
it->text=text;
it->font=font;
}
void draw()
{
if(len>0)
{
it=msg.begin();
if(it->active)
{
it->draw();
} else {
msg.erase(it);
len--;
}
}
}
};
sdl-ball-1.04+dfsg/highscores.cpp 0000664 0000000 0000000 00000006256 14545315634 0016734 0 ustar 00root root 0000000 0000000 /* ************************************************************************* *
SDL-Ball - DX-Ball/Breakout remake with openGL and SDL for Linux
Copyright (C) 2008 Jimmy Christensen ( dusted at dusted dot dk )
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 3 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, see .
* ************************************************************************* */
class highScoreClass {
private:
string name;
textureManager texMgr;
textureClass tex;
public:
highScoreClass()
{
name="";
texMgr.load(useTheme("/gfx/highscore/entername.png",setting.gfxTheme), tex);
}
void draw()
{
glLoadIdentity();
glTranslatef(0,0,-3.0);
glColor4f(1,1,1,1);
glBindTexture(GL_TEXTURE_2D, tex.prop.texture);
glBegin( GL_QUADS );
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 0.5f, 0.0f );
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, 0.5f, 0.0f );
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f,-0.5f, 0.0f );
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f,-0.5f, 0.0f );
glEnd( );
glColor4f(1,1,1,1);
glText->write(name, FONT_MENUHIGHSCORE, 1, 2.0, 0.0, 0.0);
}
void type(SDL_Event e, menuClass &menu)
{
if(var.showHighScores == 1)
{
if(e.key.keysym.sym == SDLK_ESCAPE)
{
var.showHighScores = 0;
initNewGame();
menu.refreshHighScoreList();
var.menu = 7;
return;
}
if(e.key.keysym.sym != SDLK_RETURN)
{
if ( (e.key.keysym.unicode & 0xFF80) == 0 && e.key.keysym.unicode != 0) {
if(e.key.keysym.sym == SDLK_BACKSPACE)
{
if(name.length() > 0)
name.erase(name.length()-1);
} else {
name += e.key.keysym.unicode;
}
}
} else {
var.showHighScores = 0;
ofstream hsList;
hsList.open(privFile.highScoreFile.data(), ios::out | ios::app);
hsList << "[" << player.level+1 << "]" << player.score << "|" << name << endl;
hsList.close();
initNewGame();
menu.refreshHighScoreList();
resumeGame();
var.titleScreenShow=1;
}
}
}
bool isHighScore()
{
int n;
int high=0;
struct score * slist = sortScores(&n);
for(int i = 0; i < n; i++)
{
if(player.score < slist[i].score)
{
high++;
}
}
if(n>0)
delete[] slist;
if(high < 20)
{
return(1);
}
return(0);
}
};
sdl-ball-1.04+dfsg/input.cpp 0000664 0000000 0000000 00000023227 14545315634 0015732 0 ustar 00root root 0000000 0000000 /* ************************************************************************* *
SDL-Ball - DX-Ball/Breakout remake with openGL and SDL for Linux
Copyright (C) 2008 Jimmy Christensen ( dusted at dusted dot dk )
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 3 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, see .
* ************************************************************************* */
#include
class controllerClass {
private:
paddle_class *paddle;
bulletsClass *bullet;
ballManager *bMan;
#define ITEMSELECTTIME 300 /* Milliseconds before changing item */
int shotTime, itemSelectTime;
float accel;
SDL_Joystick *joystick;
Sint16 joystickx;
Sint16 joysticky;
Uint8 joystickbtnA, joystickbtnB;
bool joyBtnALock; //TODO: implement this in the rest of the joystick functions (current only using it in cal)
GLfloat joystickLeftX; //There are two because the calibrated values differ
GLfloat joystickRightX;
int calMin, calMax, calLowJitter, calHighJitter;
#ifdef WITH_WIIUSE
wiimote** wiimotes;
float motePitch;
GLfloat moteAccel;
#endif
public:
controllerClass(paddle_class *pc, bulletsClass *bu, ballManager *bm);
~controllerClass();
void movePaddle(GLfloat px);
void btnPress();
bool get();
void calibrate();
#ifdef WITH_WIIUSE
bool connectMote();
#endif
};
controllerClass::controllerClass(paddle_class *pc, bulletsClass *bu, ballManager *bm)
{
paddle = pc;
bullet = bu;
bMan = bm;
shotTime=200;
itemSelectTime=0;
//Try to open a joystick.
if(setting.joyEnabled && SDL_NumJoysticks() > 0)
{
joystickLeftX = setting.controlMaxSpeed / setting.JoyCalMin;
joystickRightX = setting.controlMaxSpeed / setting.JoyCalMax;
joystick = NULL;
joystick = SDL_JoystickOpen(0);
if(SDL_JoystickOpened(0))
{
cout << "Using joystick: '"<posx = px;
if(paddle->posx > 1.66-paddle->width-0.06)
{
paddle->posx=1.66-paddle->width-0.06;
}
else if(paddle->posx < -1.66+paddle->width+0.06)
{
paddle->posx=-1.66+paddle->width+0.06;
}
}
}
void controllerClass::btnPress()
{
if(var.titleScreenShow)
{
var.titleScreenShow=0;
SDL_WarpMouse(var.halfresx,0);
return;
}
struct pos p;
if(shotTime > 150)
{
shotTime=0;
if(!var.menu && !var.paused)
{
bMan->unglue();
var.startedPlaying=1;
if(player.powerup[PO_GUN])
{
p.x = paddle->posx-paddle->width/1.5;
p.y = paddle->posy;
bullet->shoot(p);
p.x = paddle->posx+paddle->width/1.5;
bullet->shoot(p);
}
}
}
}
bool controllerClass::get()
{
Uint8 *keyStates;
Uint8 keyDown[3]; //Need this since its not a good idea to write to keyStates for some reason
shotTime += globalTicks;
SDL_PumpEvents();
keyStates = SDL_GetKeyState( NULL );
keyDown[0] = keyStates[setting.keyLeft];
keyDown[1] = keyStates[setting.keyRight];
keyDown[2] = keyStates[setting.keyShoot];
itemSelectTime += globalTicks;
//Read joystick here so we can override keypresses if the joystick is digital
//We shouldn't need to check if the joystick is enabled, since it won't be opened if its not enabled anyway.
if(setting.joyEnabled && SDL_JoystickOpened(0))
{
joystickx = SDL_JoystickGetAxis(joystick, 0);
joysticky = SDL_JoystickGetAxis(joystick, 1);
joystickbtnA = SDL_JoystickGetButton(joystick, 0);
joystickbtnB = SDL_JoystickGetButton(joystick, 1);
if(joystickbtnA)
{
keyDown[2] = 1;
}
if(joystickbtnB && itemSelectTime > ITEMSELECTTIME)
{
itemSelectTime=0;
gVar.shopBuyItem=1;
}
if(setting.joyIsDigital)
{
if(joystickx < -200)
{
keyDown[0]=1;
} else if(joystickx > 200)
{
keyDown[1]=1;
}
if(joysticky < -200 && itemSelectTime > ITEMSELECTTIME)
{
itemSelectTime=0;
gVar.shopNextItem = 1;
} else if(joysticky > 200 && itemSelectTime > ITEMSELECTTIME)
{
itemSelectTime=0;
gVar.shopPrevItem = 1;
}
} else {
GLfloat x = 0.0; //This is the actual traveling speed of the paddle
if(joystickx > setting.JoyCalHighJitter)
{
x = joystickRightX * joystickx;
} else if(joystickx < setting.JoyCalLowJitter)
{
x = -(joystickLeftX * joystickx);
}
if(joysticky < setting.JoyCalLowJitter && itemSelectTime > ITEMSELECTTIME)
{
itemSelectTime=0;
gVar.shopNextItem = 1;
} else if(joysticky > setting.JoyCalHighJitter && itemSelectTime > ITEMSELECTTIME)
{
itemSelectTime=0;
gVar.shopPrevItem = 1;
}
//Move the paddle:
movePaddle( paddle->posx += (x*globalMilliTicks) );
}
}
#ifdef WITH_WIIUSE
if(var.wiiConnect)
{
if (wiiuse_poll(wiimotes, MAX_WIIMOTES)) {
switch(wiimotes[0]->event)
{
case WIIUSE_EVENT:
if(IS_PRESSED(wiimotes[0], WIIMOTE_BUTTON_TWO))
{
keyDown[2]=1;
} else if(IS_PRESSED(wiimotes[0], WIIMOTE_BUTTON_ONE) && itemSelectTime > ITEMSELECTTIME)
{
gVar.shopBuyItem = 1;
itemSelectTime=0;
}else if(IS_PRESSED(wiimotes[0], WIIMOTE_BUTTON_UP) && itemSelectTime > ITEMSELECTTIME)
{
itemSelectTime=0;
gVar.shopPrevItem = 1;
}else if(IS_PRESSED(wiimotes[0], WIIMOTE_BUTTON_DOWN) && itemSelectTime > ITEMSELECTTIME)
{
itemSelectTime=0;
gVar.shopNextItem = 1;
} else if(WIIUSE_USING_ACC(wiimotes[0]))
{
motePitch = wiimotes[0]->orient.pitch;
motePitch *=-1;
}
break;
case WIIUSE_DISCONNECT:
case WIIUSE_UNEXPECTED_DISCONNECT:
var.wiiConnect=0;
cout << "WiiMote disconnected." << endl;
wiiuse_cleanup(wiimotes, MAX_WIIMOTES);
break;
}
}
if(motePitch < -0.2 || motePitch > 0.2)
{
movePaddle( paddle->posx += ( moteAccel*motePitch)*globalMilliTicks );
}
}
#endif
//React to keystates here, this way, if joyisdig it will press keys
if(keyDown[0])
{
accel+=globalMilliTicks*setting.controlAccel;
if(accel > setting.controlMaxSpeed)
accel=setting.controlMaxSpeed;
movePaddle( paddle->posx - ( accel*globalMilliTicks) );
} else if(keyDown[1])
{
accel+=globalMilliTicks*setting.controlAccel;
if(accel > setting.controlMaxSpeed)
accel=setting.controlMaxSpeed;
movePaddle( paddle->posx + ( accel*globalMilliTicks) );
} else {
accel = setting.controlStartSpeed;
}
if(keyDown[2])
{
btnPress();
return(1);
} else {
return(0);
}
}
void controllerClass::calibrate()
{
Sint16 x=0;
if(SDL_JoystickOpened(0))
{
x = SDL_JoystickGetAxis(joystick, 0);
if(SDL_JoystickGetButton(joystick, 0))
{
if(!joyBtnALock && var.menuJoyCalStage != 5)
{
var.menuJoyCalStage++;
joyBtnALock=1;
}
} else {
joyBtnALock=0;
}
}
switch(var.menuJoyCalStage)
{
case 0:
calMin=0;
calMax=0;
calLowJitter=0;
calHighJitter=0;
break;
case 1:
if(x < calLowJitter)
calLowJitter=x;
else if(x > calHighJitter)
calHighJitter=x;
break;
case 2:
if(x < calMin)
calMin=x;
break;
case 3:
if(x > calMax)
calMax=x;
break;
case 4:
setting.JoyCalMin=calMin;
setting.JoyCalMax=calMax;
setting.JoyCalLowJitter=calLowJitter;
setting.JoyCalHighJitter=calHighJitter;
cout << "Joystick calibration report:" << endl;
cout << "calMin: " << calMin << endl << "calMax: " << calMax << endl;
cout << "lowJit: " << calLowJitter << endl << "higJit: " << calHighJitter << endl;
var.menuJoyCalStage++;
writeSettings();
break;
#ifdef WITH_WIIUSE
case -1: //We do this to make it draw a frame before freezing (searching)
var.menuJoyCalStage--;
break;
case -2:
wiimotes = wiiuse_init(MAX_WIIMOTES);
if(wiiuse_find(wiimotes, MAX_WIIMOTES, 4))
{
var.wiiConnect=1;
} else {
var.wiiConnect=0;
}
if(var.wiiConnect)
{
var.wiiConnect=0;
if(wiiuse_connect(wiimotes, MAX_WIIMOTES))
{
var.wiiConnect=1;
wiiuse_set_leds(wiimotes[0], WIIMOTE_LED_1);
wiiuse_rumble(wiimotes[0], 1);
usleep(500000);
wiiuse_rumble(wiimotes[0], 0);
wiiuse_motion_sensing(wiimotes[0], 1);
}
var.menuJoyCalStage=-3;
} else {
var.menuJoyCalStage=-4;
}
break;
#endif
}
}
sdl-ball-1.04+dfsg/leveleditor/ 0000775 0000000 0000000 00000000000 14545315634 0016377 5 ustar 00root root 0000000 0000000 sdl-ball-1.04+dfsg/leveleditor/gfx/ 0000775 0000000 0000000 00000000000 14545315634 0017163 5 ustar 00root root 0000000 0000000 sdl-ball-1.04+dfsg/leveleditor/gfx/blank.png 0000664 0000000 0000000 00000005647 14545315634 0020774 0 ustar 00root root 0000000 0000000 PNG
IHDR @ ~
OiCCPPhotoshop ICC profile xڝSgTS=BKKoR RB&*! J!QEEȠQ,
!{kּ>H3Q5B.@
$p d!s# ~<<+" x M0B\t8K @zB @F&S