Added initial LBreakout2 sources, already slightly modified - it does not work yet!
768
project/jni/application/lbreakout2/ABOUT-NLS
Normal file
@@ -0,0 +1,768 @@
|
||||
Notes on the Free Translation Project
|
||||
*************************************
|
||||
|
||||
Free software is going international! The Free Translation Project is
|
||||
a way to get maintainers of free software, translators, and users all
|
||||
together, so that will gradually become able to speak many languages.
|
||||
A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do _not_
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work at translations should contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
Quick configuration advice
|
||||
==========================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias, message inheritance, automatic
|
||||
charset conversion or plural form handling) as the implementation here.
|
||||
It is also not possible to offer this additional functionality on top
|
||||
of a `catgets' implementation. Future versions of GNU `gettext' will
|
||||
very likely convey even more functionality. So it might be a good idea
|
||||
to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need _not_ provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
INSTALL Matters
|
||||
===============
|
||||
|
||||
Some packages are "localizable" when properly installed; the programs
|
||||
they contain can be made to speak your own native language. Most such
|
||||
packages use GNU `gettext'. Other packages have their own ways to
|
||||
internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system already
|
||||
provides the GNU `gettext' functions. If not, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is _not_ required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `gettext' to use the
|
||||
internationalizing routines provided within this package, or else,
|
||||
_totally_ disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might be not what is desirable. You
|
||||
should use the more recent version of the GNU `gettext' library. I.e.
|
||||
if the file `intl/VERSION' shows that the library which comes with this
|
||||
package is more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
The configuration process will not test for the `catgets' function
|
||||
and therefore it will not be used. The reason is that even an
|
||||
emulation of `gettext' on top of `catgets' could not provide all the
|
||||
extensions of the GNU `gettext' library.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
Using This Package
|
||||
==================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
||||
suppose that you speak German and live in Germany. At the shell
|
||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
||||
This can be done from your `.login' or `.profile' file, once and for
|
||||
all.
|
||||
|
||||
You might think that the country code specification is redundant.
|
||||
But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
||||
language and `CC' denoting the country, is the one use on systems based
|
||||
on GNU libc. On other systems, some variations of this scheme are
|
||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
||||
locales supported by your system for your country by running the command
|
||||
`locale -a | grep '^LL''.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
This is done through a different environment variable, called
|
||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
||||
for the purpose of message handling, but you still need to have `LANG'
|
||||
set to the primary language; this is required by other parts of the
|
||||
system libraries. For example, some Swedish users who would rather
|
||||
read translations in German than English for when Swedish is not
|
||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
||||
|
||||
Special advice for Norwegian users: The language code for Norwegian
|
||||
bokma*l changed from `no' to `nb' recently (in 2003). During the
|
||||
transition period, while some message catalogs for this language are
|
||||
installed under `nb' and some older ones under `no', it's recommended
|
||||
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
|
||||
older translations are used.
|
||||
|
||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
||||
to denote the language's main dialect. For example, `de' is equivalent
|
||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
||||
(Portuguese as spoken in Portugal) in this context.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list. The up-to-date list of
|
||||
teams can be found at the Free Translation Project's homepage,
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
||||
area.
|
||||
|
||||
If you'd like to volunteer to _work_ at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is _not_ the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
_actively_ in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of January
|
||||
2004. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es
|
||||
+----------------------------------------------------+
|
||||
a2ps | [] [] [] [] |
|
||||
aegis | () |
|
||||
ant-phone | () |
|
||||
anubis | |
|
||||
ap-utils | |
|
||||
aspell | [] |
|
||||
bash | [] [] [] [] |
|
||||
batchelor | |
|
||||
bfd | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] |
|
||||
bluez-pin | [] [] [] |
|
||||
clisp | |
|
||||
clisp | [] [] [] |
|
||||
console-tools | [] [] |
|
||||
coreutils | [] [] [] [] |
|
||||
cpio | [] [] [] |
|
||||
darkstat | [] () [] |
|
||||
diffutils | [] [] [] [] [] [] [] |
|
||||
e2fsprogs | [] [] [] |
|
||||
enscript | [] [] [] [] |
|
||||
error | [] [] [] [] [] |
|
||||
fetchmail | [] () [] [] [] [] |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] |
|
||||
flex | [] [] [] [] |
|
||||
fslint | |
|
||||
gas | [] |
|
||||
gawk | [] [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] |
|
||||
gcc | [] [] |
|
||||
gettext | [] [] [] [] [] |
|
||||
gettext-examples | [] [] [] [] |
|
||||
gettext-runtime | [] [] [] [] [] |
|
||||
gettext-tools | [] [] [] |
|
||||
gimp-print | [] [] [] [] [] |
|
||||
gliv | |
|
||||
glunarclock | [] [] |
|
||||
gnubiff | [] |
|
||||
gnucash | [] () [] [] |
|
||||
gnucash-glossary | [] () [] |
|
||||
gnupg | [] () [] [] [] [] |
|
||||
gpe-aerial | [] |
|
||||
gpe-beam | [] [] |
|
||||
gpe-calendar | [] [] |
|
||||
gpe-clock | [] [] |
|
||||
gpe-conf | [] [] |
|
||||
gpe-contacts | [] [] |
|
||||
gpe-edit | [] |
|
||||
gpe-go | [] |
|
||||
gpe-login | [] [] |
|
||||
gpe-ownerinfo | [] [] |
|
||||
gpe-sketchbook | [] [] |
|
||||
gpe-su | [] [] |
|
||||
gpe-taskmanager | [] [] |
|
||||
gpe-timesheet | [] |
|
||||
gpe-today | [] [] |
|
||||
gpe-todo | [] [] |
|
||||
gphoto2 | [] [] [] [] |
|
||||
gprof | [] [] [] |
|
||||
gpsdrive | () () () |
|
||||
gramadoir | [] |
|
||||
grep | [] [] [] [] [] [] |
|
||||
gretl | [] |
|
||||
gtick | [] () |
|
||||
hello | [] [] [] [] [] [] |
|
||||
id-utils | [] [] |
|
||||
indent | [] [] [] [] |
|
||||
iso_3166 | [] [] [] [] [] [] [] [] [] [] |
|
||||
iso_3166_1 | [] [] [] [] [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | [] [] [] [] |
|
||||
iso_639 | |
|
||||
jpilot | [] [] [] |
|
||||
jtag | |
|
||||
jwhois | [] |
|
||||
kbd | [] [] [] [] [] |
|
||||
latrine | () |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] [] |
|
||||
libgpewidget | [] [] |
|
||||
libiconv | [] [] [] [] [] |
|
||||
lifelines | [] () |
|
||||
lilypond | [] |
|
||||
lingoteach | |
|
||||
lingoteach_lessons | () () |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
mailutils | [] [] |
|
||||
make | [] [] [] |
|
||||
man-db | [] () [] [] () |
|
||||
minicom | [] [] [] |
|
||||
mysecretdiary | [] [] [] |
|
||||
nano | [] () [] [] [] |
|
||||
nano_1_0 | [] () [] [] [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] [] [] |
|
||||
ptx | [] [] [] [] [] |
|
||||
python | |
|
||||
radius | [] |
|
||||
recode | [] [] [] [] [] [] [] |
|
||||
rpm | [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] |
|
||||
shared-mime-info | |
|
||||
sharutils | [] [] [] [] [] [] |
|
||||
silky | () |
|
||||
skencil | [] () [] |
|
||||
sketch | [] () [] |
|
||||
soundtracker | [] [] [] |
|
||||
sp | [] |
|
||||
tar | [] [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] [] [] |
|
||||
tin | () () |
|
||||
tp-robot | |
|
||||
tuxpaint | [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] [] [] |
|
||||
vorbis-tools | [] [] [] [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] |
|
||||
xchat | [] [] [] [] |
|
||||
xfree86_xkb_xml | [] [] |
|
||||
xpad | [] |
|
||||
+----------------------------------------------------+
|
||||
af am ar az be bg bs ca cs da de el en en_GB eo es
|
||||
4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
|
||||
|
||||
et eu fa fi fr ga gl he hr hu id is it ja ko lg
|
||||
+-------------------------------------------------+
|
||||
a2ps | [] [] [] () () |
|
||||
aegis | |
|
||||
ant-phone | [] |
|
||||
anubis | [] |
|
||||
ap-utils | [] |
|
||||
aspell | [] [] |
|
||||
bash | [] [] |
|
||||
batchelor | [] [] |
|
||||
bfd | [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] |
|
||||
bluez-pin | [] [] [] [] [] |
|
||||
clisp | |
|
||||
clisp | [] |
|
||||
console-tools | |
|
||||
coreutils | [] [] [] [] [] [] |
|
||||
cpio | [] [] [] [] |
|
||||
darkstat | () [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] [] |
|
||||
e2fsprogs | |
|
||||
enscript | [] [] |
|
||||
error | [] [] [] [] |
|
||||
fetchmail | [] |
|
||||
fileutils | [] [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] [] [] [] [] |
|
||||
flex | [] [] [] |
|
||||
fslint | [] |
|
||||
gas | [] |
|
||||
gawk | [] [] [] |
|
||||
gbiff | [] |
|
||||
gcal | [] |
|
||||
gcc | [] |
|
||||
gettext | [] [] [] |
|
||||
gettext-examples | [] [] |
|
||||
gettext-runtime | [] [] [] [] [] |
|
||||
gettext-tools | [] [] [] |
|
||||
gimp-print | [] [] |
|
||||
gliv | () |
|
||||
glunarclock | [] [] [] [] |
|
||||
gnubiff | [] |
|
||||
gnucash | () [] |
|
||||
gnucash-glossary | [] |
|
||||
gnupg | [] [] [] [] [] [] [] |
|
||||
gpe-aerial | [] |
|
||||
gpe-beam | [] |
|
||||
gpe-calendar | [] [] [] |
|
||||
gpe-clock | [] |
|
||||
gpe-conf | [] |
|
||||
gpe-contacts | [] [] |
|
||||
gpe-edit | [] [] |
|
||||
gpe-go | [] |
|
||||
gpe-login | [] [] |
|
||||
gpe-ownerinfo | [] [] [] |
|
||||
gpe-sketchbook | [] |
|
||||
gpe-su | [] |
|
||||
gpe-taskmanager | [] |
|
||||
gpe-timesheet | [] [] [] |
|
||||
gpe-today | [] [] |
|
||||
gpe-todo | [] [] |
|
||||
gphoto2 | [] [] [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () () |
|
||||
gramadoir | [] [] |
|
||||
grep | [] [] [] [] [] [] [] [] [] [] [] |
|
||||
gretl | [] [] |
|
||||
gtick | [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] [] |
|
||||
indent | [] [] [] [] [] [] [] [] [] |
|
||||
iso_3166 | [] [] [] [] [] [] [] |
|
||||
iso_3166_1 | [] [] [] [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | |
|
||||
iso_4217 | [] [] [] [] [] [] |
|
||||
iso_639 | |
|
||||
jpilot | [] () |
|
||||
jtag | [] |
|
||||
jwhois | [] [] [] [] |
|
||||
kbd | [] |
|
||||
latrine | [] |
|
||||
ld | [] |
|
||||
libc | [] [] [] [] [] [] |
|
||||
libgpewidget | [] [] [] [] |
|
||||
libiconv | [] [] [] [] [] [] [] [] [] |
|
||||
lifelines | () |
|
||||
lilypond | [] |
|
||||
lingoteach | [] [] |
|
||||
lingoteach_lessons | |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
mailutils | |
|
||||
make | [] [] [] [] [] [] |
|
||||
man-db | () () |
|
||||
minicom | [] [] [] [] |
|
||||
mysecretdiary | [] [] |
|
||||
nano | [] [] [] [] |
|
||||
nano_1_0 | [] [] [] [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
radius | [] |
|
||||
recode | [] [] [] [] [] [] |
|
||||
rpm | [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] |
|
||||
sed | [] [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] [] |
|
||||
shared-mime-info | [] [] [] |
|
||||
sharutils | [] [] [] [] [] |
|
||||
silky | () [] () () |
|
||||
skencil | [] |
|
||||
sketch | [] |
|
||||
soundtracker | [] [] |
|
||||
sp | [] () |
|
||||
tar | [] [] [] [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] |
|
||||
textutils | [] [] [] [] [] [] |
|
||||
tin | [] () |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | [] [] |
|
||||
util-linux | [] [] [] [] () [] |
|
||||
vorbis-tools | [] |
|
||||
wastesedge | () |
|
||||
wdiff | [] [] [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] |
|
||||
xchat | [] [] [] |
|
||||
xfree86_xkb_xml | [] [] |
|
||||
xpad | [] [] |
|
||||
+-------------------------------------------------+
|
||||
et eu fa fi fr ga gl he hr hu id is it ja ko lg
|
||||
22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
|
||||
|
||||
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
|
||||
+-----------------------------------------------------+
|
||||
a2ps | [] [] () () [] [] [] |
|
||||
aegis | () () () |
|
||||
ant-phone | [] [] |
|
||||
anubis | [] [] [] [] [] [] |
|
||||
ap-utils | [] () [] |
|
||||
aspell | [] |
|
||||
bash | [] [] [] |
|
||||
batchelor | [] |
|
||||
bfd | [] |
|
||||
binutils | [] |
|
||||
bison | [] [] [] [] [] |
|
||||
bluez-pin | [] [] [] |
|
||||
clisp | |
|
||||
clisp | [] |
|
||||
console-tools | [] |
|
||||
coreutils | [] [] |
|
||||
cpio | [] [] [] [] [] |
|
||||
darkstat | [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
e2fsprogs | [] |
|
||||
enscript | [] [] [] [] |
|
||||
error | [] [] [] |
|
||||
fetchmail | [] [] () [] |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] [] [] [] |
|
||||
flex | [] [] [] [] |
|
||||
fslint | [] [] |
|
||||
gas | |
|
||||
gawk | [] [] [] |
|
||||
gbiff | [] [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext | [] [] [] |
|
||||
gettext-examples | [] [] [] |
|
||||
gettext-runtime | [] [] [] [] |
|
||||
gettext-tools | [] [] |
|
||||
gimp-print | [] |
|
||||
gliv | [] [] [] |
|
||||
glunarclock | [] [] [] [] |
|
||||
gnubiff | [] |
|
||||
gnucash | [] [] () [] |
|
||||
gnucash-glossary | [] [] |
|
||||
gnupg | [] |
|
||||
gpe-aerial | [] [] [] [] |
|
||||
gpe-beam | [] [] [] [] |
|
||||
gpe-calendar | [] [] [] [] |
|
||||
gpe-clock | [] [] [] [] |
|
||||
gpe-conf | [] [] [] [] |
|
||||
gpe-contacts | [] [] [] [] |
|
||||
gpe-edit | [] [] [] [] |
|
||||
gpe-go | [] [] [] |
|
||||
gpe-login | [] [] [] [] |
|
||||
gpe-ownerinfo | [] [] [] [] |
|
||||
gpe-sketchbook | [] [] [] [] |
|
||||
gpe-su | [] [] [] [] |
|
||||
gpe-taskmanager | [] [] [] [] |
|
||||
gpe-timesheet | [] [] [] [] |
|
||||
gpe-today | [] [] [] [] |
|
||||
gpe-todo | [] [] [] [] |
|
||||
gphoto2 | [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () [] |
|
||||
gramadoir | () [] |
|
||||
grep | [] [] [] [] [] |
|
||||
gretl | |
|
||||
gtick | [] [] [] |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] [] |
|
||||
indent | [] [] [] [] |
|
||||
iso_3166 | [] [] [] |
|
||||
iso_3166_1 | [] [] |
|
||||
iso_3166_2 | |
|
||||
iso_3166_3 | [] |
|
||||
iso_4217 | [] [] [] [] [] [] [] [] |
|
||||
iso_639 | [] |
|
||||
jpilot | () () |
|
||||
jtag | |
|
||||
jwhois | [] [] [] [] () |
|
||||
kbd | [] [] [] |
|
||||
latrine | [] |
|
||||
ld | |
|
||||
libc | [] [] [] [] |
|
||||
libgpewidget | [] [] [] |
|
||||
libiconv | [] [] [] [] [] |
|
||||
lifelines | |
|
||||
lilypond | |
|
||||
lingoteach | |
|
||||
lingoteach_lessons | |
|
||||
lynx | [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
mailutils | [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
man-db | [] |
|
||||
minicom | [] [] [] [] |
|
||||
mysecretdiary | [] [] [] |
|
||||
nano | [] [] [] [] [] |
|
||||
nano_1_0 | [] [] [] [] [] [] |
|
||||
opcodes | [] [] |
|
||||
parted | [] [] [] [] |
|
||||
ptx | [] [] [] [] [] [] [] [] |
|
||||
python | |
|
||||
radius | [] [] |
|
||||
recode | [] [] [] [] |
|
||||
rpm | [] [] [] |
|
||||
screem | |
|
||||
scrollkeeper | [] [] [] [] [] |
|
||||
sed | [] [] [] |
|
||||
sh-utils | [] [] |
|
||||
shared-mime-info | [] [] |
|
||||
sharutils | [] [] |
|
||||
silky | () |
|
||||
skencil | [] [] |
|
||||
sketch | [] [] |
|
||||
soundtracker | |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] |
|
||||
textutils | [] [] |
|
||||
tin | |
|
||||
tp-robot | [] |
|
||||
tuxpaint | [] [] [] [] [] [] [] [] |
|
||||
unicode-han-tra... | |
|
||||
unicode-transla... | |
|
||||
util-linux | [] [] [] |
|
||||
vorbis-tools | [] [] [] |
|
||||
wastesedge | |
|
||||
wdiff | [] [] [] [] [] |
|
||||
wget | [] [] [] |
|
||||
xchat | [] [] [] |
|
||||
xfree86_xkb_xml | [] [] |
|
||||
xpad | [] [] |
|
||||
+-----------------------------------------------------+
|
||||
lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
|
||||
1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
|
||||
|
||||
sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
|
||||
+-----------------------------------------------------+
|
||||
a2ps | [] [] [] [] | 16
|
||||
aegis | | 0
|
||||
ant-phone | | 3
|
||||
anubis | [] [] | 9
|
||||
ap-utils | () | 3
|
||||
aspell | | 4
|
||||
bash | | 9
|
||||
batchelor | | 3
|
||||
bfd | [] [] | 6
|
||||
binutils | [] [] [] | 8
|
||||
bison | [] [] | 14
|
||||
bluez-pin | [] [] [] | 14
|
||||
clisp | | 0
|
||||
clisp | | 5
|
||||
console-tools | | 3
|
||||
coreutils | [] [] [] [] | 16
|
||||
cpio | [] [] | 14
|
||||
darkstat | [] [] [] () () | 12
|
||||
diffutils | [] [] [] | 23
|
||||
e2fsprogs | [] [] | 6
|
||||
enscript | [] [] | 12
|
||||
error | [] [] [] | 15
|
||||
fetchmail | [] [] | 11
|
||||
fileutils | [] [] [] [] [] | 17
|
||||
findutils | [] [] [] [] [] [] | 29
|
||||
flex | [] [] | 13
|
||||
fslint | | 3
|
||||
gas | [] | 3
|
||||
gawk | [] [] | 12
|
||||
gbiff | | 4
|
||||
gcal | [] [] | 4
|
||||
gcc | [] | 4
|
||||
gettext | [] [] [] [] [] | 16
|
||||
gettext-examples | [] [] [] [] [] | 14
|
||||
gettext-runtime | [] [] [] [] [] [] [] [] | 22
|
||||
gettext-tools | [] [] [] [] [] [] | 14
|
||||
gimp-print | [] [] | 10
|
||||
gliv | | 3
|
||||
glunarclock | [] [] [] | 13
|
||||
gnubiff | | 3
|
||||
gnucash | [] [] | 9
|
||||
gnucash-glossary | [] [] [] | 8
|
||||
gnupg | [] [] [] [] | 17
|
||||
gpe-aerial | [] | 7
|
||||
gpe-beam | [] | 8
|
||||
gpe-calendar | [] [] [] [] | 13
|
||||
gpe-clock | [] [] [] | 10
|
||||
gpe-conf | [] [] | 9
|
||||
gpe-contacts | [] [] [] | 11
|
||||
gpe-edit | [] [] [] [] [] | 12
|
||||
gpe-go | | 5
|
||||
gpe-login | [] [] [] [] [] | 13
|
||||
gpe-ownerinfo | [] [] [] [] | 13
|
||||
gpe-sketchbook | [] [] | 9
|
||||
gpe-su | [] [] [] | 10
|
||||
gpe-taskmanager | [] [] [] | 10
|
||||
gpe-timesheet | [] [] [] [] | 12
|
||||
gpe-today | [] [] [] [] [] | 13
|
||||
gpe-todo | [] [] [] [] | 12
|
||||
gphoto2 | [] [] [] | 11
|
||||
gprof | [] [] | 9
|
||||
gpsdrive | [] [] | 3
|
||||
gramadoir | [] | 5
|
||||
grep | [] [] [] [] | 26
|
||||
gretl | | 3
|
||||
gtick | | 7
|
||||
hello | [] [] [] [] [] | 34
|
||||
id-utils | [] [] | 12
|
||||
indent | [] [] [] [] | 21
|
||||
iso_3166 | [] [] [] [] [] [] [] | 27
|
||||
iso_3166_1 | [] [] [] | 16
|
||||
iso_3166_2 | | 0
|
||||
iso_3166_3 | | 2
|
||||
iso_4217 | [] [] [] [] [] [] | 24
|
||||
iso_639 | | 1
|
||||
jpilot | [] [] [] [] [] | 9
|
||||
jtag | [] | 2
|
||||
jwhois | () [] [] | 11
|
||||
kbd | [] [] | 11
|
||||
latrine | | 2
|
||||
ld | [] [] | 5
|
||||
libc | [] [] [] [] | 20
|
||||
libgpewidget | [] [] [] [] | 13
|
||||
libiconv | [] [] [] [] [] [] [] [] | 27
|
||||
lifelines | [] | 2
|
||||
lilypond | [] | 3
|
||||
lingoteach | | 2
|
||||
lingoteach_lessons | () | 0
|
||||
lynx | [] [] [] | 14
|
||||
m4 | [] [] | 15
|
||||
mailutils | | 5
|
||||
make | [] [] [] | 16
|
||||
man-db | [] | 5
|
||||
minicom | | 11
|
||||
mysecretdiary | [] [] | 10
|
||||
nano | [] [] [] [] | 17
|
||||
nano_1_0 | [] [] [] | 17
|
||||
opcodes | [] [] | 6
|
||||
parted | [] [] [] | 15
|
||||
ptx | [] [] | 22
|
||||
python | | 0
|
||||
radius | | 4
|
||||
recode | [] [] [] | 20
|
||||
rpm | [] [] | 9
|
||||
screem | [] [] | 2
|
||||
scrollkeeper | [] [] [] | 15
|
||||
sed | [] [] [] [] [] [] | 24
|
||||
sh-utils | [] [] | 14
|
||||
shared-mime-info | [] [] | 7
|
||||
sharutils | [] [] [] [] | 17
|
||||
silky | () | 3
|
||||
skencil | [] | 6
|
||||
sketch | [] | 6
|
||||
soundtracker | [] [] | 7
|
||||
sp | [] | 3
|
||||
tar | [] [] [] [] [] | 24
|
||||
texinfo | [] [] [] | 14
|
||||
textutils | [] [] [] [] | 16
|
||||
tin | | 1
|
||||
tp-robot | | 2
|
||||
tuxpaint | [] [] [] [] [] | 29
|
||||
unicode-han-tra... | | 0
|
||||
unicode-transla... | | 2
|
||||
util-linux | [] [] | 15
|
||||
vorbis-tools | | 8
|
||||
wastesedge | | 0
|
||||
wdiff | [] [] [] | 18
|
||||
wget | [] [] [] [] [] [] [] [] | 24
|
||||
xchat | [] [] [] [] [] | 15
|
||||
xfree86_xkb_xml | [] [] [] [] [] | 11
|
||||
xpad | | 5
|
||||
+-----------------------------------------------------+
|
||||
63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
|
||||
131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If January 2004 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
||||
matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
Using `gettext' in new packages
|
||||
===============================
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
the use of `gettext' the only thing missing are the translations. The
|
||||
Free Translation Project is also available for packages which are not
|
||||
developed inside the GNU project. Therefore the information given above
|
||||
applies also for every other Free Software Project. Contact
|
||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
||||
the translation teams.
|
||||
|
||||
38
project/jni/application/lbreakout2/AUTHORS
Normal file
@@ -0,0 +1,38 @@
|
||||
Michael Speck <kulkanie@gmx.net>
|
||||
|
||||
**** Contributions ****
|
||||
|
||||
Patch to add a very easy difficulty level for kids. - Zooko
|
||||
|
||||
Patch to fix the insane speedup of balls after a SLOW/FAST
|
||||
bonus expired that came up in 2.5beta. - Mark Tomich
|
||||
|
||||
Patch to load all themes from installation path. - Michal Cihar
|
||||
|
||||
Fixes to make LBreakout run on FreeBSD. - Sammy Mannaert
|
||||
|
||||
Option for playing with balls above debris and
|
||||
explosions. - Jochen Striepe
|
||||
|
||||
Fix for input bug in Win32, a better installation
|
||||
system and blinking cursor for editable menu items. - Lee Read
|
||||
|
||||
Modifications to make LBreakout2 compileable on
|
||||
Win32 with MinGW. - Claudio Chimera
|
||||
|
||||
Fix for the bug where the bonus floor disappeared to slow
|
||||
on fast machines. - Trevor Spiteri
|
||||
|
||||
New explosions, various backgrounds, ideas and graphics for
|
||||
extras and bricks:
|
||||
TIME_ADD, DISABLE, EXPLOSIVE_BALL, BONUS/MALUS MAGNET,
|
||||
WEAK BALL, CHAOS BRICK, REGENERATIVE BRICK. - Dante
|
||||
|
||||
Fix for a bug where balls where attached to the wall
|
||||
instead of the paddle when paddle and brick where hit
|
||||
in the same programme cycle. - Patrick Hohmeyer
|
||||
|
||||
****
|
||||
|
||||
Also thanks to all guys that made suggestions to
|
||||
improve LBreakout2!!!
|
||||
24
project/jni/application/lbreakout2/AndroidAppSettings.cfg
Normal file
@@ -0,0 +1,24 @@
|
||||
# The application settings for Android libSDL port
|
||||
AppSettingVersion=7
|
||||
LibSdlVersion=1.2
|
||||
AppName="LBreakout2"
|
||||
AppFullName=net.sourceforge.lgames.lbreakout2
|
||||
ScreenOrientation=h
|
||||
AppDataDownloadUrl="App data size is 5 Mb|https://sourceforge.net/projects/libsdl-android/files/LBreakout2/lbreakout2-2.6.1-data.zip/download|http://sites.google.com/site/xpelyax/Home/lbreakout2-2.6.1-data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/lbreakout2-2.6.1-data.zip"
|
||||
SdlVideoResize=y
|
||||
NeedDepthBuffer=n
|
||||
AppUsesMouse=y
|
||||
AppNeedsArrowKeys=n
|
||||
AppUsesJoystick=n
|
||||
AppUsesMultitouch=n
|
||||
RedefinedKeys="RETURN SPACE PAGEUP PAGEDOWN"
|
||||
AppTouchscreenKeyboardKeysAmount=0
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=0
|
||||
MultiABI=n
|
||||
AppVersionCode=26101
|
||||
AppVersionName="2.6.1.01"
|
||||
CompiledLibraries="sdl_mixer sdl_image sdl_net intl"
|
||||
AppCflags='-DHAVE_CONFIG_H -finline-functions -O2'
|
||||
AppLdflags=''
|
||||
AppSubdirsBuild='src/dummy'
|
||||
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
|
||||
8
project/jni/application/lbreakout2/AndroidBuild.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ \! -f Makefile ] ; then
|
||||
../launchConfigure.sh --disable-install --enable-sdl-net LIBS=-lintl
|
||||
fi
|
||||
|
||||
make
|
||||
mv -f client/lbreakout2 libapplication.so
|
||||
280
project/jni/application/lbreakout2/COPYING
Normal file
@@ -0,0 +1,280 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, 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
|
||||
665
project/jni/application/lbreakout2/ChangeLog
Normal file
@@ -0,0 +1,665 @@
|
||||
2.6.1:
|
||||
- fixed missing font transparency in help screen (24/12/09 MS)
|
||||
- fixed bug in menus's level set list that prevented first few entries
|
||||
to show up (24/12/09 MS)
|
||||
- fixed odd sound sample rates (all are 22050 now) (24/12/09 AM)
|
||||
- fixed english translation issues (23/12/09 CT)
|
||||
|
||||
2.6:
|
||||
- added XDG desktop file (09/10/26 PT)
|
||||
- fixed compiling on Fedora (09/10/26 SG)
|
||||
- fixed GNU_SOURCE warning (09/10/26 MS)
|
||||
- added new levelsets (09/10/26 MS)
|
||||
- added hidden config option badspeech to disable swearing by default
|
||||
(09/10/26 MS)
|
||||
- improved french translation (08/08/24 K.C.)
|
||||
- drop group rights on startup (linux only) to improve security (access
|
||||
to highscore) (08/03/29 HG)
|
||||
- bugfix: update levelset tooltip when changing selection with left/right
|
||||
arrows (08/03/29 HG)
|
||||
- added improved spec file for building RPMs (07/10/10 SG)
|
||||
- configure now works for win32 (07/01/20 DY)
|
||||
|
||||
2.6beta-7:
|
||||
- french translation added (06/08/27 K.C.)
|
||||
|
||||
2.6beta-6:
|
||||
- added a hint for building on OS/2 to the README (06/05/27 DY)
|
||||
- improved some german translations (06/05/26 MS)
|
||||
- create some server bots per default (06/05/26 MS)
|
||||
- adjusted fcntl call in net.c to work with kernel 2.6+ (and hopefully still
|
||||
for lower versions... if not use SDL_net) (06/05/26 MS)
|
||||
- use text from server option "-m" directly as welcome message if a file
|
||||
by that name was not found (06/05/26 MS)
|
||||
- read highscores file before adding new scores for usage with NFS
|
||||
(06/05/12 netfab)
|
||||
- inline removed from function declarations to ensure global access
|
||||
(06/04/01 PM)
|
||||
- removed -Wall from CC arguments for better portability
|
||||
(06/04/01 PM)
|
||||
|
||||
2.6beta-5:
|
||||
- i18n for yes/no confirmation by y/n (05/11/29 M.S.)
|
||||
- added some more missing strings to i18n (05/11/20 M.S.)
|
||||
- leaving game by window manager's close button works in quick help
|
||||
(05/11/20 M.S.)
|
||||
- switching fullscreen/windowed mode works in quick help (05/11/20 M.S.)
|
||||
- added gettext-comments for those strings that use % but not as format
|
||||
modifiers to prevent errors when making gmo files (05/11/20 M.S.)
|
||||
|
||||
2.6beta-4:
|
||||
- added german localization (05/11/13 R.S.)
|
||||
- removed client/client_game.c from POTFILES.in (05/10/31 M.S.)
|
||||
- changed 'src' to 'client' directory in POTFILES.in (05/10/31 M.S.)
|
||||
|
||||
2.6beta-3:
|
||||
- added missing common/gettext.h (05/10/20 M.S.)
|
||||
|
||||
2.6beta-2:
|
||||
- i18n support for client (05/10/19 M.S.)
|
||||
- fixed some more s(n)printf bugs (05/05/22 U.H.)
|
||||
|
||||
2.6beta:
|
||||
- added several new levelsets (05/05/15 M.S.)
|
||||
- disabled AC_PROG_STRIP from win32 build process since autotools in SuSE
|
||||
does not like it??? (05/05/15 M.S.)
|
||||
- moved AC_CANONICAL_HOST to beginning of configure.in (05/05/15 M.S.)
|
||||
- finished bonus level DEFENDER (05/05/15 M.S.)
|
||||
- added bonus level DEFENDER (05/04/6 M.S.)
|
||||
- added bonus level HUNTER (05/04/01 M.S.)
|
||||
- freakout levelset has bonus levels (05/04/01 M.S.)
|
||||
- original levelset has bonus levels (05/04/01 M.S.)
|
||||
- added bonus level SITTING_DUCKS (05/03/31 M.S.)
|
||||
- made additional bonus levels optional (05/03/30 M.S.)
|
||||
- normal levelsets get a bonus level every four normal levels
|
||||
(05/03/30 M.S.)
|
||||
- setting sound volume has effect (05/03/28 M.S.)
|
||||
- added bonus levels JUMPING_JACK, OUTBREAK and BARRIER
|
||||
(05/03/28 M.S.)
|
||||
- security issue fixed: bad sprintf/scanf calls could lead to crashes
|
||||
or potential security problems (05/02/14 U.H.)
|
||||
|
||||
2.5.2:
|
||||
- added a different sound for balls reflected from the paddle
|
||||
(05/01/13 M.S.)
|
||||
- bugfix: acceleration of balls by middle mouse button now works in
|
||||
the testing mode of the editor (previously the balls got stuck in
|
||||
mid-air) (05/01/13 M.S.)
|
||||
- the game will be paused if the input focus is lost or the
|
||||
application is iconfied (05/01/13 M.S.)
|
||||
- when the 'sticky' bonus runs out, all attached balls will be
|
||||
detached (05/01/13 M.S.)
|
||||
- when pressing either left or right shift, the name and score of
|
||||
the first chart entry of this set will be displayed at the upper
|
||||
right-hand side display of the frame instead of your name and
|
||||
score (05/01/12 M.S.)
|
||||
- if a paddle is frozen and the mouse is moved, the paddle will no
|
||||
longer jump after thawing (05/01/12 M.S.)
|
||||
- when a paddle turns invisible due to the 'ghost paddle'-malus, all
|
||||
attached balls will be detached (05/01/12 M.S.)
|
||||
- re-implemented explosion animation for bricks directly hit by an
|
||||
explosive ball (05/01/12 M.S.)
|
||||
|
||||
2.5.1:
|
||||
- only levelsets from the install directory are used for
|
||||
Freakout (04/06/25 M.S.)
|
||||
- order of Freakout levels is saved (04/09/22 M.S.)
|
||||
- bugfix: balls will not start in next level with max speed when
|
||||
the middle mouse button was pressed while clearing the last
|
||||
brick of a level (04/09/22 M.S.)
|
||||
- bonus floor uses proper brick image (blue energy wall instead
|
||||
of normal wall) (04/09/22 M.S.)
|
||||
- replaced chaos bricks in level 7 of N_Snapshots with normal
|
||||
wall bricks (04/09/22 M.S.)
|
||||
- to continue when viewing final network stats only SPACE is
|
||||
allowed (04/09/22 M.S.)
|
||||
- re-added continue option for single player mode, however
|
||||
with 100% score loss this time (04/09/22 M.S.)
|
||||
|
||||
2.5:
|
||||
- added additional network support via SDL_net for portability
|
||||
(04/08/07 M.S.)
|
||||
- bug fixed: game crashed when quitting testing mode in the
|
||||
editor (04/08/06 M.S.)
|
||||
- removed 5000 points bonus for completing a level. instead
|
||||
the score of the remaining destructible bricks is substracted
|
||||
as a penalty when warping to the next level (04/08/06 M.S.)
|
||||
- generation of bug message is disabled (04/06/24 M.S.)
|
||||
- sounds are played stereo in a local game and partially stereo
|
||||
in a network game (04/06/24 Greg, M.S.)
|
||||
|
||||
2.5beta-8:
|
||||
- admin bot commands are documented in the help (04/06/19 M.S.)
|
||||
- number of online users is displayed when logging in to server
|
||||
(04/06/19 M.S.)
|
||||
- the number of bricks to be cleared for warp is not re-computed
|
||||
when a ball is lost but always based on the initial number
|
||||
of normal bricks (04/06/17 M.S.)
|
||||
- saved game is removed when game is over (either all lives lost
|
||||
or all levels completed) (04/06/17 M.S.)
|
||||
- game cannot be quit by 'q' or ESCAPE when all lives are lost
|
||||
(the player would get an extra life this way) (04/06/17 M.S.)
|
||||
- new server option to add some paddle bots (04/06/17 M.S.)
|
||||
- message about continue is not displayed in network game
|
||||
(04/06/16 M.S.)
|
||||
- network bot with variable paddle speed (04/06/16 M.S.)
|
||||
- missing include added to gui.c (04/06/15 M.S.)
|
||||
|
||||
2.5beta-7:
|
||||
- configure option --with-hiscore-path has been replaced with
|
||||
autoconf option --localstatedir (04/06/14 M.S.)
|
||||
- data files will be installed to $datadir/lbreakout2 instead
|
||||
of $datadir/games/lbreakout2 (04/06/14 M.S.)
|
||||
- renamed configure option --with-doc-path to --with-docdir
|
||||
(04/06/14 M.S.)
|
||||
- bugfix: test mode of editor crashed when trying to get the total
|
||||
number of levels; there were none at all (04/06/14 M.S.)
|
||||
|
||||
2.5beta-6:
|
||||
- network usernames must be alphanumerical (04/06/12 M.S.)
|
||||
- fixed the 'snprintf'-bug that made the server exploitable to
|
||||
formatted shellcode (04/06/12 M.S.)
|
||||
- credits show total number of levels (04/06/12 M.S.)
|
||||
- animations are now built directly from the brick graphics, using
|
||||
their color key, and not from the screen; thus animations are now
|
||||
transparent where the bricks are transparent, e.g. in theme
|
||||
'Aquarium' (04/06/12 M.S.)
|
||||
|
||||
2.5beta-5:
|
||||
- changed URL from www.lgames.org to lgames.sf.net in the README
|
||||
(04/05/15 M.S.)
|
||||
- if a game has been quit before it was over, it can now be resumed
|
||||
(04/05/15 M.S.)
|
||||
- default key 'd' is now blocked instead of normal key 'c'
|
||||
(04/05/14 M.S.)
|
||||
- pressing the middle mouse button or the speedup key will
|
||||
accelerate all balls to maximum velocity until button/key
|
||||
is released again (04/05/13 M.S.)
|
||||
- a 5000 points bonus is added if a level was completely
|
||||
cleared (not finished by warp) (04/05/13 M.S.)
|
||||
- warp option is disabled in network game (04/05/13 M.S.)
|
||||
- added hint on how to switch between the bricks/bonus set when
|
||||
starting the editor (04/05/13 M.S.)
|
||||
|
||||
2.5beta-4:
|
||||
- changed URL from www.lgames.org to lgames.sf.net (04/01/31 M.S.)
|
||||
|
||||
2.5beta-3:
|
||||
- updated the quick hint of menu option 'Difficulty' (03/06/28 M.S.)
|
||||
- added a VERY easy difficulty level for young kids (03/06/28 Zooko)
|
||||
- invisible bricks do not vanish after being hit if the player
|
||||
dies then (03/06/27 M.S.)
|
||||
- speedup_level initiated correctly (03/06/27 M.T.)
|
||||
|
||||
2.5beta-2:
|
||||
- fixed a bug in masking of ball speed vector which had the balls
|
||||
stopped in midair not moving any further (03/06/18 M.S.)
|
||||
- minimum keyboard input speed is now 100 (03/06/16 M.S.)
|
||||
- missing inclusion for FreeBSD added (03/06/16 S.M.)
|
||||
|
||||
2.5beta:
|
||||
- complete rewrite of network code (03/05/.. M.S.)
|
||||
- added 8 new levels to 'Original' for a total of 25 levels and
|
||||
renamed it to 'LBreakout2' (03/05/25 M.S.)
|
||||
- correct size of temporary string buffer in write_text_with_cursor()
|
||||
which fixes crash while editing author/title in the level editor
|
||||
(03/05/25 M.S.)
|
||||
- 'warp' and 'disintegrate' do not apply for the levelsets
|
||||
'Original' and 'LBreakout1' (03/05/22 M.S.)
|
||||
- separated levelset 'Original' from the other sets (03/05/22 M.S.)
|
||||
- added the levelset of LBreakout1 as first add-on (03/05/22 M.S.)
|
||||
- melted 'Original', 'AddOn-1', 'AddOn-2' into a tighter levelset
|
||||
'Original' (03/05/22 M.S.)
|
||||
- the option of buying a continue has been removed (03/05/20 M.S.)
|
||||
- paddle can drop to 'middle size' 0 (03/05/20 M.S.)
|
||||
- paddle size in medium difficulty decreased by one (03/05/20 M.S.)
|
||||
- plasma weapon can fire permanently at a slower fire rate
|
||||
(03/05/20 M.S.)
|
||||
- modified bonus times to reflect the original values (03/05/20 M.S.)
|
||||
- close button of window manager works in level editor (03/05/18 M.S.)
|
||||
- reduced multiplayer ball respawn time to 5 seconds (03/05/17 M.S.)
|
||||
- backgrounds have no colorkey (03/05/17 M.S.)
|
||||
- multiplayer score table is also displayed if only one player remains
|
||||
or the game is broken up (03/04/27 M.S.)
|
||||
- on entering editor effects of extras are reset (03/04/27 M.S.)
|
||||
- menu option 'key speed' is now in pixels per seconds and has moved
|
||||
to the submenu 'controls' (03/04/23 M.S.)
|
||||
- input is always grabbed and relative mouse motion is always used,
|
||||
therefore their menu options were removed (03/04/23 M.S.)
|
||||
- simplified internal handling of paddle fire buttons (03/04/23 M.S.)
|
||||
- after 10 seconds penalty a player gets a new ball in a non-pingpong
|
||||
multiplayer level when it has lost its (03/04/23 M.S.)
|
||||
- balls no longer 'sink' into the sticky paddle (03/04/23 M.S.)
|
||||
- description of menu options removed from documentation as each
|
||||
has a context-sensitive helpbox at runtime (03/04/23 M.S.)
|
||||
- simplified input handling by dropping all the stupid stuff and
|
||||
sticking directly to SDL's functions (03/04/23 M.S.)
|
||||
- added a 'loading' graphic at the beginning (03/04/08 M.S.)
|
||||
|
||||
2.4.1:
|
||||
- unlimited number of backgrounds for themes (03/03/08 M.S.)
|
||||
- if a levelset is selected its highscore chart is shown (03/02/27 M.S.)
|
||||
- the warp icon gets static after it blinked four times (03/02/27 M.S.)
|
||||
- the official levelsets 'Original', 'AddOn-1' and 'AddOn-2' became the
|
||||
first entries in the levelset list (03/02/27 M.S.)
|
||||
- default warp limit is now 80% of bricks (03/02/27 M.S.)
|
||||
- scores are displayed while player changes (03/02/23 M.S.)
|
||||
- loading themes from installation path no longer restricted to the
|
||||
default ones (03/02/23 M.C.)
|
||||
- added an explanation of the 'Warp' feature to the documenation
|
||||
(03/02/07 M.S.)
|
||||
|
||||
2.4:
|
||||
- fixed a bug were balls could get caught within the paddle if the
|
||||
'bonus floor' was active and the paddle wasn't moved (02/12/16 M.S.)
|
||||
- extra balls of upper paddle (multiplayer) are created at proper position
|
||||
(02/12/16 M.S.)
|
||||
- shadows of extras are clipped to the playing field (02/12/15 M.S.)
|
||||
- lost/gained lives are refreshed correctly (02/12/15 M.S.)
|
||||
- decreased corner sensitivity and improved corner reflection (no longer
|
||||
reflected at 45° but at the real perpendicular which makes it much
|
||||
easier for balls to enter narrow passages) (02/12/14 M.S.)
|
||||
- simplified range check for ball velocity vector (02/12/14 M.S.)
|
||||
- the frame's shadow is not drawn twice (thus darker) when a brick close to
|
||||
the frame is removed (02/12/13 M.S.)
|
||||
- difficulty 'Hard' gives 30% score bonus (02/12/13 M.S.)
|
||||
- increased ball speed for 'Medium' and 'Hard' (02/12/13 M.S.)
|
||||
- added a missing check concering the reset position of reflected balls
|
||||
to the target computation (without this they could get into bricks which
|
||||
resulted in a corrupted next target) (02/12/13 M.S.)
|
||||
- extra balls (random initial direction) can no longer move straight up
|
||||
(when they did so they simply left the screen as no target could be computed
|
||||
for them) (02/12/13 M.S.)
|
||||
- reduced number of get_target() calls for balls and shots (02/12/11 M.S.)
|
||||
- improved handling of scrollbars (02/12/11 M.S.)
|
||||
- fixed color key bugs occuring at depth >=24 (02/12/10 M.S.)
|
||||
- when bricks regenerate they are refreshed correctly (02/12/08 M.S.)
|
||||
- player can disintegrate single bricks by pressing 'd' and spending
|
||||
5% of his/her score (02/12/08 M.S.)
|
||||
|
||||
2.4beta-3:
|
||||
- continues always cost 50% of the current score but fully restore the
|
||||
initial amount of lives (02/12/07 M.S.)
|
||||
- fixed a bug in the 'restart' code that could accidently cause the
|
||||
game to quit if you hadn't paid the continue cost twice (02/12/07 M.S.)
|
||||
- updated Jurgen De Backers theme AbsoluteB (02/12/07 M.S.)
|
||||
- shadow creation for surfaces with no color key now works correctly
|
||||
(02/12/07 M.S.)
|
||||
|
||||
2.4beta-2:
|
||||
- fixed security holes created by improper use of sprintf (02/11/24 D.B.)
|
||||
|
||||
2.4beta:
|
||||
- added a quick help for network game (02/11/03 M.S.)
|
||||
- optimized drawing of balls/extras/shots/shrapnells (02/11/01 M.S.)
|
||||
- removed config option shadow (is always enabled) (02/11/01 M.S.)
|
||||
- 'paddle.png' may provide an additional paddle set for a different
|
||||
upper paddle (02/11/01 M.S.)
|
||||
- audio buffer size became config option (02/11/01 M.S.)
|
||||
- network statistics are sent in one go after game is finished
|
||||
(02/10/30 M.S.)
|
||||
- code clean-ups in establishing direct connection (02/10/30 M.S.)
|
||||
- in the highscore chart the level index is no longer 0 after
|
||||
completing a levelset (02/10/29 M.S.)
|
||||
- levelset transfer improved (02/10/27 M.S.)
|
||||
- fading time decreased (02/10/26 M.S.)
|
||||
- SDL >= 1.1.5 is now required (02/10/25 M.S.)
|
||||
- invalid users are properly removed from server (02/10/25 M.S.)
|
||||
- code clean-ups and performance enhancements (02/10/21 M.S.)
|
||||
- improved chatroom GUI (02/10/19 M.S.)
|
||||
- fixed a network leak that caused 500% more latency in 'Deathmatch'
|
||||
and 900% more latency in 'Normal Multiplayer' (02/10/08 M.S.)
|
||||
|
||||
2.3.5:
|
||||
- added pseudo levelset !FREAKOUT! that lets you play all levels (~600)
|
||||
in a random order (02/09/21 M.S.)
|
||||
- moved 'Select Theme' option from 'Advanced Options' to 'Graphics'
|
||||
(02/09/21 M.S.)
|
||||
- bonus stack is cleared at beginning of new level (02/09/21 M.S.)
|
||||
- replaced 'wontgiveup.wav' with 'verygood.wav' (02/09/20 M.S.)
|
||||
- implemented 'warp' option to switch to next level before all bricks
|
||||
where cleared (02/09/19 M.S.)
|
||||
- bricks/bonuses/maluses may have transparency (02/09/17 M.S.)
|
||||
- optional bonus floor graphic (02/09/17 M.S.)
|
||||
|
||||
2.3.4:
|
||||
- fixed a crash in 'Classic' theme (02/09/12 M.S.)
|
||||
|
||||
2.3.3:
|
||||
- added winning themes AbsoluteB, Oz, Moiree from theming contest and
|
||||
the previous default theme has been renamed to Classic (02/09/10 M.S.)
|
||||
- fixed a bug that crashed LBreakout when there where two alternating
|
||||
players left in the last level and one finished it (02/09/05 M.S.)
|
||||
- modifications to make LBreakout run on FreeBSD (02/09/05 S.M.)
|
||||
- option to display balls above debris and explosions (02/09/05 J.S.)
|
||||
- input bug fixes for win32 (02/09/05 L.R.)
|
||||
- blinking cursor for editable menu items to distinguish them from
|
||||
switches (02/09/05 L.R.)
|
||||
|
||||
2.3.2:
|
||||
- added all existing levelsets (27 sets, ~440 levels) (02/08/16 L.R.)
|
||||
- quick help can be opened in game by pressing F1 or 'h' (02/08/16 M.S.)
|
||||
- the 'select theme' hint bubble will show information on a theme (author,
|
||||
version, description) if it provides an ABOUT file (02/08/16 M.S.)
|
||||
- menu graphics and sounds are now themeable (02/08/16 M.S.)
|
||||
- added information about version and author of levelset to the hint
|
||||
bubble in the menu (02/08/16 M.S.)
|
||||
- menu item added to modify challengers game port (02/08/16 M.S.)
|
||||
- ip buffers resized to cover AF_INET6 addresses (02/08/16 M.S.)
|
||||
- bugfix in net talk (02/08/15 M.S.)
|
||||
- levelsets MP_Arenas and MP_Snapshots now have the correct contents
|
||||
(02/08/14 M.S.)
|
||||
|
||||
2.3.1:
|
||||
- multiplayer levelsets MP_Arenas and MP_Snapshots are now installed
|
||||
correctly (02/08/14 M.S.)
|
||||
- configure option --disable-network now works correctly (02/08/14 M.S.)
|
||||
- if your challenge is invalid an error message is displayed
|
||||
(02/08/14 M.S.)
|
||||
|
||||
2.3:
|
||||
- no warnings when loading a theme (02/08/13 M.S.)
|
||||
- two network levelsets MP_Arenas (deathmatch) and MP_Snapshots (normal)
|
||||
added (02/08/13 M.S.)
|
||||
- added version for levelsets (02/08/13 M.S.)
|
||||
- added commands '/version', '/idletime' and '/userlimit (02/08/12 M.S.)
|
||||
- 'turbo' key that temporarily doubles the paddle speed added
|
||||
(02/08/10 D.B.)
|
||||
- command '/transfer' implemented (02/08/10 M.S.)
|
||||
- bonus info displayed at the right side of the screen is now optional
|
||||
(02/08/10 M.S.)
|
||||
- chatroom commands implemented (02/08/09 M.S.)
|
||||
- chatroom channels implemented (02/08/08 M.S.)
|
||||
- added configure option --disable-network (02/08/06 M.S.)
|
||||
- network statistics implemented (02/08/06 M.S.)
|
||||
- bugfix for networked weapon fire (02/08/06 M.S.)
|
||||
- PNG loading routine updated (02/08/06 M.S.)
|
||||
- fixed an aweful lot of bugs in normal network game (02/08/05 M.S.)
|
||||
- implemented info about running games to chatroom (02/08/05 M.S.)
|
||||
- users are properly unlinked after playing a network game (02/08/05 M.S.)
|
||||
- pause chatroom implemented (02/08/04 M.S.)
|
||||
- normal networking implemented /02/08/04 M.S.)
|
||||
- network bugfixes (02/08/03 M.S.)
|
||||
- screen is grayed for paused games (02/08/02 M.S.)
|
||||
- deathmatch networking implemented (02/08/02 M.S.)
|
||||
- bugfix for shooting bricks (02/08/02 M.S.)
|
||||
- welcome message when entering chatroom and the user name is colored white
|
||||
(02/08/02 M.S.)
|
||||
- score modification for difficulty level is directly added (02/07/31 M.S.)
|
||||
- each level gets a background assigned instead of simply changing
|
||||
the background when the player changes (02/07/31 M.S.)
|
||||
- plain text config (02/07/31 M.S.)
|
||||
- restored compatibility with old layout (02/07/31 M.S.)
|
||||
- for win32: (02/07/18 L.R.)
|
||||
- edit bug fixed
|
||||
- installation details added to README
|
||||
- muched improved installation system
|
||||
- files are always opened in binary mode
|
||||
- added missing screen.jpg in the docs (02/07/18 L.R.)
|
||||
- implemented network enviroment with chatroom
|
||||
- implemented second fire key
|
||||
- added check for libz to configure as this is required for PNG
|
||||
- option to modify audio buffer size to fix sound problems
|
||||
|
||||
2.2.2:
|
||||
-LBreakout2 is now compileable with MinGW for Win32
|
||||
(thanks to Claudio Chimera)
|
||||
-if a ball has an invalid target it returns to the paddle
|
||||
(instead of exiting the program)
|
||||
-own graphics and sounds my be used as theme
|
||||
-autoreturn of balls is now optional
|
||||
-updated trouble-shooting
|
||||
-fixed a bug where the bonus floor didn't disappear after the bonus
|
||||
expired (thanks to Trevor Spiteri)
|
||||
|
||||
2.2.1:
|
||||
-added another animation level
|
||||
-if a ball didn't hit a destructible brick or the paddle within
|
||||
ten seconds it moves back to the paddle to prevent 'endless
|
||||
loops'
|
||||
-changed the ball's size to 12x12 which is supposed to fix most
|
||||
of the remaining reflection bugs (thanks to Linus Gasser)
|
||||
-moved the level 'Be Smart!' from second to tenth position in
|
||||
levelset AddOn-2
|
||||
-corrected a check up in line_intersect() (thanks to Linus Gasser)
|
||||
-when a level is completed it's the next player's turn
|
||||
(thanks to Linus Gasser)
|
||||
|
||||
2.2:
|
||||
-added some icons
|
||||
-grown bricks are not removed when reinitating level
|
||||
-all highlighted chart entries are cleared before adding players to chart
|
||||
-new levelset AddOn-2 using the new extras (10 levels)
|
||||
-new animations
|
||||
-new extras (thanks to Dante):
|
||||
-TIME_ADD: adds 7 seconds to the duration of all active bonuses/maluses
|
||||
-DISABLE: disables all active bonuses/maluses
|
||||
-EXPLOSIVE BALL: if ball touches a brick it explodes and destroys it's
|
||||
neighbors
|
||||
-BONUS/MALUS MAGNET: either bonuses or maluses are attracted by the paddle
|
||||
-WEAK BALL: if active there is a 40% chance that a brick isn't damaged
|
||||
-new bricks:
|
||||
-CHAOS BRICK: chaotic reflection of balls (thanks to Dante)
|
||||
-REGENERATIVE BRICKS: this brick will restore one point duration
|
||||
within 4 seconds if not hit again (thanks to Dante)
|
||||
-SHIELDED BRICK: indestructible even for energy balls
|
||||
-new beautiful explosions (thanks to Dante)
|
||||
-added quick hint system
|
||||
-lbreakout2-level directory is created properly
|
||||
-highscore is not overwritten when updating
|
||||
-/var/lib/games is created when not existing
|
||||
|
||||
2.1.2:
|
||||
-disabled double-click for confirmation
|
||||
-increased sensitivity of the reflection check-up introduced in 2.1.1
|
||||
-fixed a bug that caused reflection on an already removed brick (and
|
||||
propably some crashes)
|
||||
-added a grid to the editor for easier editing
|
||||
-added advanced option 'Key Speed' to modify speed of keyboard input
|
||||
-energy balls pulsate faster
|
||||
-'exploding brick' list cleared when initiating next level
|
||||
-using new backgrounds from the Arianne project (thanks to Dante)
|
||||
|
||||
2.1.1:
|
||||
-added an important check up for ball reflection to fix a bug that
|
||||
caused a crash when using a 'bonus floor' or a 'growing brick'
|
||||
|
||||
2.1:
|
||||
-new levelset with 15 levels
|
||||
-fixed a nasty reflection bug where the ball got stuck at the bottom
|
||||
of the screen making a loud noise
|
||||
-fixed a bug where the ball was attached to the wall instead of the
|
||||
paddle (Thanks to Patrick Hohmeyer!)
|
||||
-invisible bricks
|
||||
-explosive bricks
|
||||
-fixed a bug in the menu
|
||||
-added a 'quick help'
|
||||
-modified bonus times
|
||||
-manual updated
|
||||
-'blue' balls are fading in and out
|
||||
-two more colored bricks (gray, white)
|
||||
-added three new maluses:
|
||||
-'Lights Out!': total darkness (except ball, paddle and bonuses)
|
||||
-'Ghostly Paddle': paddle disappears when not moving
|
||||
(won't reflect balls)
|
||||
-'Chaos': balls are reflected randomly at bricks
|
||||
-attached balls keep contact with paddle while resizing
|
||||
-each levelset got it's own highscore chart
|
||||
-jumping of paddle after smooth resize fixed
|
||||
|
||||
2.0.1:
|
||||
-new optimized reflection algorithm (supposed to fix all
|
||||
remaining bugs)
|
||||
|
||||
2.0:
|
||||
-reflection bug fixes:
|
||||
-stated another (less) important break condition for
|
||||
multiball reflection
|
||||
-range tolerance for edge reflection increased
|
||||
-additional checkup for 'neighbored bricks'
|
||||
reflection
|
||||
|
||||
2.0-pre2:
|
||||
-player scores modified correctly in the end of the game
|
||||
-fixed bonus floor deadlock
|
||||
-fixed a reflection bug
|
||||
-you may also quit a running game by 'q' now
|
||||
-faster paddle movement when keys are used
|
||||
-added dummy array to config file so no corruptions will
|
||||
occur when new options are initiated
|
||||
|
||||
2.0-pre1:
|
||||
-ball is drawn correctly when moving up/left
|
||||
-modified paddle reflection conditions
|
||||
-normed the perpendicular vector of brick edges
|
||||
-balls are properly reset when destroying a brick
|
||||
with the 'metal' bonus (and no reflection occurs)
|
||||
-highscore chart saved directly after game over
|
||||
-new advanced option: ball below/above bonuses
|
||||
-fullscreen/windowed switch by 'f' now allowed everywhere
|
||||
-added a spec file for RPMs (thanks to Dennis Bjorklund)
|
||||
-added some very important range checks for reflection
|
||||
|
||||
2.0beta:
|
||||
-smooth paddle resize
|
||||
-bonus shadows drawed correctly (doesn't overlap other bonuses)
|
||||
-modified brick reflection and hopefully fixed
|
||||
the 'through walls like a ghost' bug
|
||||
-fixed the wrong color key of frame (thanks to Andre Trindade)
|
||||
-restart is allowed even with no life left if you got enough points to
|
||||
buy a continue
|
||||
-added a missing include in config.c and fixed some newline warnings
|
||||
|
||||
2.0alpha-2:
|
||||
-bit depth is adjusted to the settings of your desktop (instead of 16bit
|
||||
hardcoded)
|
||||
-correct color key for paddle and balls at bit depth > 16
|
||||
|
||||
2.0alpha:
|
||||
-major code redesign and clean-ups
|
||||
-C++ -> C
|
||||
-structured source
|
||||
-resolution changed from 512x288 to 640x480 (no black frame in fullscreen)
|
||||
-up to 4 players (alternate)
|
||||
-fading improved
|
||||
-score counting improved
|
||||
-optional constant frame rate (to prevent LBreakout from
|
||||
consuming 100% CPU time)
|
||||
-event handling improved:
|
||||
-paddle does not slow down if framerate drops
|
||||
-moving paddle and firing weapon at the same time now works for Linux
|
||||
(problems with Mac and BeOS - therefore added an --enable-warp
|
||||
option - see the README for more)
|
||||
-usage of 'invert mouse' and 'motion modifier' improved
|
||||
-shadow added
|
||||
-graphics improved
|
||||
-ball velocity specified by difficulty instead of level
|
||||
-added a grab option to keep mouse in window (thanks to Mark Rowe)
|
||||
-time of a bonus (if any limit) is added to current time (instead of
|
||||
setting it)
|
||||
-new bonuses:
|
||||
'End Of The Rainbow': while this is active each brick without
|
||||
a bonus will release 1000 points
|
||||
'Joker': destroys all malus' and collects all bonus on screen
|
||||
doubling time limit and score (if any)
|
||||
-added and changed sounds
|
||||
-new menu
|
||||
-fixed a bug in shot handling (wrong bricks removed)
|
||||
-the global highscore path is no longer hard-coded in the configure
|
||||
script (option: --with-highscore-path)
|
||||
-improved the paddle:
|
||||
-works perfect! (balls won't go through the paddle)
|
||||
-real convex behaviour
|
||||
-improved the brick reflection (though edges need a better reflection
|
||||
behaviour)
|
||||
-in the menu ESCAPE takes back to the previous menu instead of
|
||||
leaving the game
|
||||
-integrated feature-packed level editor
|
||||
-PNG is used for graphics (to beat the 1MB limit of the SDL competition)
|
||||
-new documentation
|
||||
|
||||
010315:
|
||||
-when a blue metal ball destroys a wall its score is no longer
|
||||
uninitialized (No chance anymore to get a BILLION points within minutes! ;)
|
||||
-twinkling of bricks is disabled when animations are turned off
|
||||
-fixed a bug occuring when loading own levels
|
||||
-score is counted faster
|
||||
-better example of own level in the manual (added as single
|
||||
file 'test.lbr' as well)
|
||||
-two charts: 'Highest Scores' and 'Highest Levels'
|
||||
(thanks to Jean-Philippe Martin)
|
||||
|
||||
001104:
|
||||
-added 5 new levels
|
||||
-remaining time of a bonus is displayed (optional)
|
||||
-added speed-up/speed-down bonuses
|
||||
-a blue ball now goes through indestructible walls as well
|
||||
-freeze duration now is one second instead of two seconds
|
||||
-changed the logo (thanks to marko kjellgren)
|
||||
|
||||
001022:
|
||||
-when paused resume game only if 'p' is pressed
|
||||
-mouse invert option
|
||||
-random starting angle (-60 to 60 degree) of a ball (optional)
|
||||
-if starting angle is not random press left mouse button to fire the ball
|
||||
to the left (right button to fire to the right)
|
||||
-paddle can shrink below its original size (absolute minimum of 30 pixels)
|
||||
-changed the indestructible bricks from level 03 to destructible ones
|
||||
-moved option 'Paddle' from menu 'Controls' to 'Game'
|
||||
|
||||
001018:
|
||||
-fixed some bugs
|
||||
-$(DESTDIR) now is used in Makefile.am (thanks to daniel burrows and lauri korts-parn)
|
||||
-spec file improved
|
||||
-highscore path changed to /var/lib/games
|
||||
|
||||
001014:
|
||||
-selecting fullscreen via menu works again
|
||||
-added a spec file for redhat linux (thanks to lauri korts-parn)
|
||||
-paddle works much better
|
||||
-'shrink paddle' and 'expand paddle' bonuses can be distinguished better
|
||||
-you can choose between a 'flat surface' and a 'convex surface' paddle
|
||||
behaviour
|
||||
-position of a ball will be reset when it is attached
|
||||
|
||||
001006:
|
||||
-fixed various bugs
|
||||
-checks for SDL and pthread libs now
|
||||
-timer improved
|
||||
-removed some more egcs 2.91.66 problems
|
||||
-sound is default (configure)
|
||||
-added --disable-install option (configure)
|
||||
-if SDL 1.1.5 is found -DSDL_1_1_5 is defined automatically (configure)
|
||||
-if the paddle is resized attached balls will keep contact
|
||||
-levels changed (25 now)
|
||||
-weapon fires continuously while 'Fire' is pressed
|
||||
-mouse pointer hidden when playing in fullscreen mode
|
||||
-resolution no longer changed everytime entering a new level (in fullscreen
|
||||
mode)
|
||||
-you can enable/disable sound and transparancy, set the
|
||||
animation level and turn on/off 'Fullscreen' while playing
|
||||
-if a ball hits two bricks at the same time both will be removed
|
||||
-paddle works better
|
||||
|
||||
001002:
|
||||
-works with egcs 2.91.66 now
|
||||
-mouse pointer hidden when only keyboard is used
|
||||
|
||||
000930-2:
|
||||
-high score chart installed correctly
|
||||
-no request for SDL_INIT_AUDIO if -DSOUND undefined
|
||||
|
||||
000930:
|
||||
-improved the installation process
|
||||
|
||||
000929:
|
||||
-works with SDL version 1.1.5 (or better), too
|
||||
|
||||
000928:
|
||||
-fixed the 'infinite loop' bug
|
||||
-added a fullscreen option
|
||||
-source path correctly set now
|
||||
-changed some levels
|
||||
|
||||
000924:
|
||||
-initial public release
|
||||
167
project/jni/application/lbreakout2/INSTALL
Normal file
@@ -0,0 +1,167 @@
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes a while. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
4. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made.
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
||||
74
project/jni/application/lbreakout2/Makefile.am
Normal file
@@ -0,0 +1,74 @@
|
||||
SUBDIRS = intl m4 po common gui game server client docs
|
||||
|
||||
EXTRA_DIST = config.rpath AUTHORS COPYING ChangeLog INSTALL README \
|
||||
README-SDL.txt TODO lbreakout2.spec touchall lbreakout32.gif \
|
||||
lbreakout48.gif lbreakout2.desktop.in win32_mancomp win32_preparchive
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
desktop_DATA = lbreakout2.desktop
|
||||
icondir = $(datadir)/icons
|
||||
icon_DATA = lbreakout48.gif
|
||||
|
||||
WIN32_TEXT = AUTHORS COPYING ChangeLog INSTALL README README-SDL.txt \
|
||||
TODO lbreakout2.spec ABOUT-NLS
|
||||
WIN32_LOCAL_DLL = SDL.dll SDL_mixer.dll zlib.dll libpng.dll
|
||||
WIN32_SYS_DLL = msvcrt.dll
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
# We can't use static desktop file because of icon location. Is this
|
||||
# the right way to handle it? At least it works... as long as $datadir
|
||||
# does not contain plus signs. :-)
|
||||
lbreakout2.desktop:
|
||||
@sed -e "s+Icon=+Icon=$(datadir)/icons/lbreakout48.gif+" \
|
||||
< lbreakout2.desktop.in > lbreakout2.desktop
|
||||
|
||||
win32text: $(WIN32_TEXT)
|
||||
@echo Converting text files for win32 installer
|
||||
@-rm -rf ./win32text
|
||||
@mkdir ./win32text
|
||||
@for textfile in $(WIN32_TEXT); do \
|
||||
$(AWK) '{printf "%s\r\n",$$0}' $$textfile > ./win32text/$$textfile ; \
|
||||
done
|
||||
|
||||
win32-installer-script: @win32_inst_script@
|
||||
|
||||
@win32_inst_script@: win32text
|
||||
@echo Generating win32 installer script
|
||||
@echo "[Setup]" > $@
|
||||
@echo "AppName=@appname@" >> $@
|
||||
@echo "AppVerName=@appname@ $(VERSION)" >> $@
|
||||
@echo "AppPublisher=Michael Speck" >> $@
|
||||
@echo "AppPublisherURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
|
||||
@echo "AppSupportURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
|
||||
@echo "AppUpdatesURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
|
||||
@echo "DefaultDirName={pf}\\$(PACKAGE)" >> $@
|
||||
@echo "DefaultGroupName=@appname@" >> $@
|
||||
@echo "OutputDir=." >> $@
|
||||
@echo "Uninstallable=yes" >> $@
|
||||
@echo "AlwaysCreateUninstallIcon=yes" >> $@
|
||||
@echo "AdminPrivilegesRequired=1" >> $@
|
||||
@echo "[Tasks]" >> $@
|
||||
@echo "Name: \"desktopicon\"; Description: \"Create a &desktop icon\"; GroupDescription: \"Additional icons:\"" >> $@
|
||||
@echo "[Files]" >> $@
|
||||
@(cd win32dlls; for file in $(WIN32_LOCAL_DLL); do echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; done)
|
||||
@(cd win32dlls; for file in $(WIN32_SYS_DLL); do echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{sys}\"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall" >> $@; done)
|
||||
@echo "Source: \"win32text\\*.*\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@;
|
||||
@list='$(SUBDIRS)'; for subdir in $$list; do (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) win32-install-script); done
|
||||
@echo "[Icons]" >> $@
|
||||
@echo "Name: \"{group}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"" >> $@
|
||||
@echo "Name: \"{group}\\@appname@ Manual\"; Filename: \"{app}\\docs\\index.html\"" >> $@
|
||||
@echo "Name: \"{userdesktop}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"; Tasks: \"desktopicon\"" >> $@
|
||||
@echo "[Run]" >> $@
|
||||
@echo "Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; Description: \"Launch @appname@\"; Flags: nowait postinstall skipifsilent" >> $@
|
||||
|
||||
@$(AWK) '{printf "%s\r\n",$$0}' $@ > installer.iss.w32
|
||||
@mv installer.iss.w32 $@
|
||||
|
||||
win32-installer: win32-installer-script
|
||||
$(ISCC) @win32_inst_script@
|
||||
@mv setup.exe $(PACKAGE)-$(VERSION)-win32.exe
|
||||
@-rm -rf win32text
|
||||
@echo "Installer created: $(PACKAGE)-$(VERSION)-win32.exe"
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
781
project/jni/application/lbreakout2/Makefile.in
Normal file
@@ -0,0 +1,781 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \
|
||||
ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS TODO \
|
||||
config.guess config.rpath config.sub depcomp install-sh \
|
||||
missing mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \
|
||||
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
|
||||
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
|
||||
$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = intl/Makefile
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)"
|
||||
desktopDATA_INSTALL = $(INSTALL_DATA)
|
||||
iconDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(desktop_DATA) $(icon_DATA)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GREP = @GREP@
|
||||
HAVE_ASPRINTF = @HAVE_ASPRINTF@
|
||||
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
|
||||
HAVE_SNPRINTF = @HAVE_SNPRINTF@
|
||||
HAVE_WPRINTF = @HAVE_WPRINTF@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
appname = @appname@
|
||||
arch_flag = @arch_flag@
|
||||
audio_flag = @audio_flag@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
doc_dir = @doc_dir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
hi_dir = @hi_dir@
|
||||
hi_inst_flag = @hi_inst_flag@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
inst_dir = @inst_dir@
|
||||
inst_flag = @inst_flag@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
locdir_flag = @locdir_flag@
|
||||
mandir = @mandir@
|
||||
mixer_flag = @mixer_flag@
|
||||
mkdir_p = @mkdir_p@
|
||||
netdebug_flag = @netdebug_flag@
|
||||
network_flag = @network_flag@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sdlnet_flag = @sdlnet_flag@
|
||||
sdlnet_lib_flag = @sdlnet_lib_flag@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
warp_flag = @warp_flag@
|
||||
win32_deps = @win32_deps@
|
||||
win32_inst_script = @win32_inst_script@
|
||||
SUBDIRS = intl m4 po common gui game server client docs
|
||||
EXTRA_DIST = config.rpath AUTHORS COPYING ChangeLog INSTALL README \
|
||||
README-SDL.txt TODO lbreakout2.spec touchall lbreakout32.gif \
|
||||
lbreakout48.gif lbreakout2.desktop.in win32_mancomp win32_preparchive
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
desktop_DATA = lbreakout2.desktop
|
||||
icondir = $(datadir)/icons
|
||||
icon_DATA = lbreakout48.gif
|
||||
WIN32_TEXT = AUTHORS COPYING ChangeLog INSTALL README README-SDL.txt \
|
||||
TODO lbreakout2.spec ABOUT-NLS
|
||||
|
||||
WIN32_LOCAL_DLL = SDL.dll SDL_mixer.dll zlib.dll libpng.dll
|
||||
WIN32_SYS_DLL = msvcrt.dll
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
uninstall-info-am:
|
||||
install-desktopDATA: $(desktop_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(desktopdir)" || $(mkdir_p) "$(DESTDIR)$(desktopdir)"
|
||||
@list='$(desktop_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \
|
||||
$(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-desktopDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(desktop_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(desktopdir)/$$f"; \
|
||||
done
|
||||
install-iconDATA: $(icon_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(icondir)" || $(mkdir_p) "$(DESTDIR)$(icondir)"
|
||||
@list='$(icon_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(iconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(icondir)/$$f'"; \
|
||||
$(iconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(icondir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-iconDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(icon_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(icondir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(icondir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/intl $(distdir)/m4 $(distdir)/po
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
--with-included-gettext \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(DATA) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-desktopDATA install-iconDATA
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-desktopDATA uninstall-iconDATA \
|
||||
uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-recursive ctags \
|
||||
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
|
||||
dist-tarZ dist-zip distcheck distclean distclean-generic \
|
||||
distclean-hdr distclean-recursive distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-desktopDATA install-exec \
|
||||
install-exec-am install-iconDATA install-info install-info-am \
|
||||
install-man install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
|
||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-desktopDATA uninstall-iconDATA uninstall-info-am
|
||||
|
||||
|
||||
# We can't use static desktop file because of icon location. Is this
|
||||
# the right way to handle it? At least it works... as long as $datadir
|
||||
# does not contain plus signs. :-)
|
||||
lbreakout2.desktop:
|
||||
@sed -e "s+Icon=+Icon=$(datadir)/icons/lbreakout48.gif+" \
|
||||
< lbreakout2.desktop.in > lbreakout2.desktop
|
||||
|
||||
win32text: $(WIN32_TEXT)
|
||||
@echo Converting text files for win32 installer
|
||||
@-rm -rf ./win32text
|
||||
@mkdir ./win32text
|
||||
@for textfile in $(WIN32_TEXT); do \
|
||||
$(AWK) '{printf "%s\r\n",$$0}' $$textfile > ./win32text/$$textfile ; \
|
||||
done
|
||||
|
||||
win32-installer-script: @win32_inst_script@
|
||||
|
||||
@win32_inst_script@: win32text
|
||||
@echo Generating win32 installer script
|
||||
@echo "[Setup]" > $@
|
||||
@echo "AppName=@appname@" >> $@
|
||||
@echo "AppVerName=@appname@ $(VERSION)" >> $@
|
||||
@echo "AppPublisher=Michael Speck" >> $@
|
||||
@echo "AppPublisherURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
|
||||
@echo "AppSupportURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
|
||||
@echo "AppUpdatesURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
|
||||
@echo "DefaultDirName={pf}\\$(PACKAGE)" >> $@
|
||||
@echo "DefaultGroupName=@appname@" >> $@
|
||||
@echo "OutputDir=." >> $@
|
||||
@echo "Uninstallable=yes" >> $@
|
||||
@echo "AlwaysCreateUninstallIcon=yes" >> $@
|
||||
@echo "AdminPrivilegesRequired=1" >> $@
|
||||
@echo "[Tasks]" >> $@
|
||||
@echo "Name: \"desktopicon\"; Description: \"Create a &desktop icon\"; GroupDescription: \"Additional icons:\"" >> $@
|
||||
@echo "[Files]" >> $@
|
||||
@(cd win32dlls; for file in $(WIN32_LOCAL_DLL); do echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; done)
|
||||
@(cd win32dlls; for file in $(WIN32_SYS_DLL); do echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{sys}\"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall" >> $@; done)
|
||||
@echo "Source: \"win32text\\*.*\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@;
|
||||
@list='$(SUBDIRS)'; for subdir in $$list; do (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) win32-install-script); done
|
||||
@echo "[Icons]" >> $@
|
||||
@echo "Name: \"{group}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"" >> $@
|
||||
@echo "Name: \"{group}\\@appname@ Manual\"; Filename: \"{app}\\docs\\index.html\"" >> $@
|
||||
@echo "Name: \"{userdesktop}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"; Tasks: \"desktopicon\"" >> $@
|
||||
@echo "[Run]" >> $@
|
||||
@echo "Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; Description: \"Launch @appname@\"; Flags: nowait postinstall skipifsilent" >> $@
|
||||
|
||||
@$(AWK) '{printf "%s\r\n",$$0}' $@ > installer.iss.w32
|
||||
@mv installer.iss.w32 $@
|
||||
|
||||
win32-installer: win32-installer-script
|
||||
$(ISCC) @win32_inst_script@
|
||||
@mv setup.exe $(PACKAGE)-$(VERSION)-win32.exe
|
||||
@-rm -rf win32text
|
||||
@echo "Installer created: $(PACKAGE)-$(VERSION)-win32.exe"
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
0
project/jni/application/lbreakout2/NEWS
Normal file
235
project/jni/application/lbreakout2/README
Normal file
@@ -0,0 +1,235 @@
|
||||
|
||||
LBreakout2
|
||||
|
||||
a breakout-style arcade game for Linux
|
||||
by Michael Speck
|
||||
|
||||
********************
|
||||
I. Requirements
|
||||
II. Installation
|
||||
III. Network Server
|
||||
IV. Documentation
|
||||
V. Troubleshooting
|
||||
VI. Localization
|
||||
VII. Resources
|
||||
VIII. Feedback
|
||||
********************
|
||||
|
||||
********************
|
||||
I. Requirements
|
||||
********************
|
||||
LBreakout runs in X and uses SDL (any version though >= 1.1.4
|
||||
is recommended), SDL_mixer (optional for sound) and SDL_net
|
||||
(optional for networking on non-Unices). These libraries
|
||||
can be found at http://libsdl.org. The graphical stuff requires PNG
|
||||
which is usually included in a distro. If not check out
|
||||
http://www.libpng.org/pub/png/libpng.html.
|
||||
|
||||
********************
|
||||
II. Installation
|
||||
********************
|
||||
Enter your favorite shell and type in the following stuff (in the
|
||||
directory you extracted the LBreakout source)
|
||||
> ./configure [--disable-audio] [--disable-install] [--enable-warp]
|
||||
[--with-docdir=DOCDIR] [--disable-network]
|
||||
[--enable-sdl-net] [--localstatedir=HIDIR]
|
||||
--disable-audio: no sound
|
||||
--disable-install: no installation; play from source directory
|
||||
--enable-warp: nescessary for non-Unices to use relative
|
||||
mouse motion for inverting or modify mouse
|
||||
speed
|
||||
--with-docdir: install documentation to $DOCDIR/lbreakout2
|
||||
DEFAULT: /usr/doc
|
||||
--disable-network: compile LBreakout2 without any network
|
||||
support
|
||||
--enable-sdl-net: use SDL_net for networking (required if
|
||||
platform is not Unix-like)
|
||||
--localstatedir: install global highscores to this directory
|
||||
REPLACES --with-highscore-path TO COMPLY
|
||||
WITH AUTOCONF; THE DEFAULT LOCATION NOW
|
||||
DEPENDS ON YOUR DISTRIBUTION: PREVIOUSLY
|
||||
IT WAS /var/lib/games. USE
|
||||
--localstatedir=/var/lib/games FOR EXISTING
|
||||
HIGHSCORES.
|
||||
> make
|
||||
> su (become root)
|
||||
> make install (if install wasn't disabled)
|
||||
> exit (become user again)
|
||||
> lbreakout2 (run client/non-network game)
|
||||
|
||||
Note: Swearing is disabled in version >= 2.6. To enable it you have to
|
||||
edit ~/.lgames/lbreakout2.conf manually and set the hidden option badspeech
|
||||
to 1. If you cannot find the option start and quit LBreakout2 once.
|
||||
|
||||
Building on Win32
|
||||
-----------------
|
||||
There might be an easier way to get things to work but at least
|
||||
the following worked for me. Simplifications are welcome.
|
||||
|
||||
1) Get MinGW, Msys, MsysDTK from http://mingw.sf.net
|
||||
The following uses michael as the Msys home directory, naturally
|
||||
you'll have to substitute your windows user name for this.
|
||||
2) Get SDL, SDL_mixer, SDL_net from http://libsdl.org as tar.gz's
|
||||
and put them to c:\msys\1.0\home\michael (or whereever you
|
||||
installed Msys to)
|
||||
3) Get libpng and zlib from http://libpng.org and put them to the
|
||||
same directory as above.
|
||||
4) Same with the latest and greatest LBreakout2 package, which you
|
||||
already have, I assume. :)
|
||||
5) Start Msys and enter the commands
|
||||
tar -xzf *.tar.gz (extract the above archives)
|
||||
cd SDL-1.2.7; (your version might differ, of course)
|
||||
configure; make; make install;
|
||||
cd ..
|
||||
[do the same with SDL_net, SDL_mixer, zlib]
|
||||
ln -s libpng-1.2.5 libpng (your version might differ, of course)
|
||||
ln -s zlib-1.1.3 zlib (your version might differ, of course)
|
||||
cd libpng-1.2.5
|
||||
cp scripts/makefile.gcc Makefile; make
|
||||
cp png.h pngconf.h /usr/local/include
|
||||
cp libpng.a /usr/local/lib (manual install as the linux makefile
|
||||
caused problems)
|
||||
cd ..
|
||||
cd lbreakout2-2.5
|
||||
export LDFLAGS="-L/usr/local/lib"
|
||||
export CFLAGS="-I/usr/local/include"
|
||||
echo '' > depcomp (why this is required is again a mystery to me)
|
||||
configure --disable-install --enable-sdl-net
|
||||
win32_mancomp (this is a hack required for unknown reasons here.
|
||||
make works but it just states the gcc commands but does
|
||||
not execute them, in this little script they work however,
|
||||
dunno why... a fix for this would be most welcome. if you
|
||||
change any configure or install settings the hardcoded
|
||||
compile command in win32_mancomp will probably not work so
|
||||
you should check it for such a case)
|
||||
make
|
||||
6) Get the dll's of SDL, SDL_mixer, SDL_net, libpng, zlib and put
|
||||
them to c:\msys\1.0\home\michael\lbreakout2-2.5\win32dlls as well
|
||||
as msvcrt.dll (freely available from Microsoft)
|
||||
7) run win32_preparchive (this will copy all required files to
|
||||
the directory lbreakout2)
|
||||
8) copy c:\msys\1.0\home\michael\lbreakout2-2.5\lbreakout2 to
|
||||
c:\games or whereever you want to and run the game from there.
|
||||
NOTE: The server does not open any display and in windows a message
|
||||
overwrites all old messages in stdout.txt. Also the command line options
|
||||
do not work, at least it seems so. All I managed was to run the server
|
||||
without any options but at least I could connect to it successfully.
|
||||
|
||||
Lee Read added some scripting to create a standalone installer. This
|
||||
scripting is broken right now, but hopefully fixed soon.
|
||||
|
||||
Building on OS/2
|
||||
----------------
|
||||
On OS/2 GCC creates windowed console apps by default. There are various
|
||||
solutions, see http://www.edm2.com/index.php/SDL#General_tips_and_tricks
|
||||
or run 'emxbind -e -p lbreakout2.exe' after building. - Dave Yeo
|
||||
|
||||
********************
|
||||
III. Network Server
|
||||
********************
|
||||
To run a server start lbreakout2server with any of the following
|
||||
options:
|
||||
-p <PORT> server port (default 2002)
|
||||
-l <LIMIT> maximum number of users that may connect to the server
|
||||
(default is 30)
|
||||
-i <IDLETIME> a user will be kicked if he didn't communicate with the
|
||||
server for this amount of seconds (default is 1200)
|
||||
-n <MESSAGE> this message is displayed to welcome a user
|
||||
-a <PASSWORD> a user that logs in with this name will become
|
||||
administrator named admin (default is no admin)
|
||||
-b <BOTNUM> number of bots with strength 800 and 1000 (paddle speed
|
||||
in pixels, default is none)
|
||||
After that you'll have to query your IP (e.g. with
|
||||
/sbin/ifconfig) and pass it to your friends as there is no permanent
|
||||
internet server yet. Note, that you shouldn't use localhost as you
|
||||
won't be able to challenge others then.
|
||||
Check the online documentation at http://lgames.sf.net
|
||||
for information on how to play.
|
||||
When updating this README the last time, petersdtp.net:8000 has been
|
||||
the current internet test server.
|
||||
|
||||
********************
|
||||
IV. Documentation
|
||||
********************
|
||||
If you have any questions about options, game play or editor
|
||||
please check the documentation and see if you
|
||||
can find an answer there. I will not respond to any eMails concerning
|
||||
questions easily answered by the manual (/usr/doc/lbreakout2).
|
||||
However, if you have any other problems or suggestions or you found a
|
||||
bug please contact me: kulkanie@gmx.net
|
||||
|
||||
********************
|
||||
V. Troubleshooting
|
||||
********************
|
||||
The solution for relative mouse motion (nescessary when inverting or
|
||||
slowing down mouse by motion modifier) works fine for Linux and
|
||||
Win32 but fails for other non-Unices. Current solution is to warp the
|
||||
mouse (by using configure option --enable-warp). Unfortunately, this
|
||||
will handicap events when trying to fire weapon or release balls AND
|
||||
move the paddle at the same time. This means it may happen that a weapon
|
||||
is not fired or doesn't stop fire, balls keep being attached and so
|
||||
on...
|
||||
---
|
||||
Disabling sound while playing seems to result in loosing various
|
||||
sound channels when some sounds were actually mixed.
|
||||
---
|
||||
Someone reported that he had problems with PNG (configure script
|
||||
didn't find it) if it was installed to /usr/local/lib.
|
||||
Setting a link in /usr/lib fixes this.
|
||||
---
|
||||
If you have SDL_mixer installed but configure tells you that it can't
|
||||
find it, remember that you have to install the development package
|
||||
for compiling!
|
||||
---
|
||||
If you can't compile because LBreakout2' timestamps are slightly in
|
||||
the future run 'touchall' (found in the configure directory).
|
||||
---
|
||||
If 'fullscreen' just adds a black frame around the game but does
|
||||
not change the solution make sure that you have 640x480 available
|
||||
as resolution in your Xconfig.
|
||||
---
|
||||
If the SDL sound seems to be out of sync first try
|
||||
to modify the audio buffer size in ~/.lgames/lbreakout2.conf.
|
||||
If this fails set SDL_AUDIODRIVER to dma (export SDL_AUDIODRIVER=dma).
|
||||
|
||||
********************
|
||||
VI. Localization
|
||||
********************
|
||||
This game now supports i18n. If you want to add l10n for your native language,
|
||||
please contact me first, to prevent overlapping translations. A thorough
|
||||
documentation can be found at
|
||||
http://www.gnu.org/software/gettext/manual/html_mono/gettext.html
|
||||
Basically, you will have to do the following:
|
||||
1) cd po
|
||||
2) add your language code (e.g., de for German) to the existing line in
|
||||
LINGUAS merely separated from the other languages by a blank
|
||||
3) run `msginit -o <LL>.po` with <LL> replaced by your language code
|
||||
4) translate the english message IDs in <LL>.po
|
||||
5) run make <LL>.gmo
|
||||
Whenever you change something in your translation you'll have to repeat
|
||||
step 5). I strongly recommend to configure the program with --disable-install
|
||||
while working on a translation. Otherwise you'd have to copy and rename the
|
||||
.gmo file as root every time you want to see your changes. If the source has
|
||||
been compiled without installation, only step 5) and simply running the game
|
||||
is required. (Of course, the enviroment variable LANG must be set to your
|
||||
locale.)
|
||||
This should suffice. If not, please read the excellent documentation at
|
||||
gnu.org. The fonts do only contain the basic latin letters. No special letters
|
||||
(like the german umlauts or any accents for example) are supported, so a l10n
|
||||
should not use them. If a string has a single %, meant as a percent sign,
|
||||
you'll have to manually remove the 'format' comment above the id (if any).
|
||||
|
||||
********************
|
||||
VII. Resources
|
||||
********************
|
||||
Some graphics and sounds has been taken and modified from other
|
||||
non-copyrighted resources:
|
||||
Backgrounds: http://www.grsites.com/textures
|
||||
Sounds: "Web Clip Empire 50.000", NovaMedia Verlag, Germany
|
||||
Thanks to all of these guys for there free stuff!
|
||||
|
||||
********************
|
||||
VIII. Feedback
|
||||
********************
|
||||
LGames URL: http://www.lgames.sf.net
|
||||
e-Mail: kulkanie@gmx.net
|
||||
13
project/jni/application/lbreakout2/README-SDL.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
Please distribute this file with the SDL runtime environment:
|
||||
|
||||
The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library
|
||||
designed to make it easy to write multi-media software, such as games and
|
||||
emulators.
|
||||
|
||||
The Simple DirectMedia Layer library source code is available from:
|
||||
http://www.libsdl.org/
|
||||
|
||||
This library is distributed under the terms of the GNU LGPL license:
|
||||
http://www.gnu.org/copyleft/lesser.html
|
||||
|
||||
11
project/jni/application/lbreakout2/TODO
Normal file
@@ -0,0 +1,11 @@
|
||||
- i18n of y/n in game.c und misc.c desinitgration
|
||||
- fonts with special letters
|
||||
- info file for theme
|
||||
- replace swearing
|
||||
- allow themes to have several 'between level' screens
|
||||
- udp flooding after game finished
|
||||
- allow additional weapon graphic/animation planted on top
|
||||
of the paddle
|
||||
- improve pre-calculation of networked ball movement (dummy reflect)
|
||||
- joystick as input
|
||||
- shadow surface for zoom
|
||||
175
project/jni/application/lbreakout2/acinclude.m4
Normal file
@@ -0,0 +1,175 @@
|
||||
# Configure paths for SDL
|
||||
# Sam Lantinga 9/21/99
|
||||
# stolen from Manish Singh
|
||||
# stolen back from Frank Belew
|
||||
# stolen from Manish Singh
|
||||
# Shamelessly stolen from Owen Taylor
|
||||
|
||||
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_SDL],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the sdl-config script
|
||||
dnl
|
||||
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
|
||||
sdl_prefix="$withval", sdl_prefix="")
|
||||
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
|
||||
sdl_exec_prefix="$withval", sdl_exec_prefix="")
|
||||
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
|
||||
, enable_sdltest=yes)
|
||||
|
||||
if test x$sdl_exec_prefix != x ; then
|
||||
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
|
||||
if test x${SDL_CONFIG+set} != xset ; then
|
||||
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
|
||||
fi
|
||||
fi
|
||||
if test x$sdl_prefix != x ; then
|
||||
sdl_args="$sdl_args --prefix=$sdl_prefix"
|
||||
if test x${SDL_CONFIG+set} != xset ; then
|
||||
SDL_CONFIG=$sdl_prefix/bin/sdl-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_REQUIRE([AC_CANONICAL_TARGET])
|
||||
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
|
||||
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
|
||||
min_sdl_version=ifelse([$1], ,0.11.0,$1)
|
||||
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
|
||||
no_sdl=""
|
||||
if test "$SDL_CONFIG" = "no" ; then
|
||||
no_sdl=yes
|
||||
else
|
||||
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
|
||||
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
|
||||
|
||||
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_sdltest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $SDL_CFLAGS"
|
||||
LIBS="$LIBS $SDL_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed SDL is sufficiently new. (Also sanity
|
||||
dnl checks the results of sdl-config to some extent
|
||||
dnl
|
||||
rm -f conf.sdltest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "SDL.h"
|
||||
|
||||
char*
|
||||
my_strdup (char *str)
|
||||
{
|
||||
char *new_str;
|
||||
|
||||
if (str)
|
||||
{
|
||||
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
|
||||
strcpy (new_str, str);
|
||||
}
|
||||
else
|
||||
new_str = NULL;
|
||||
|
||||
return new_str;
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
/* This hangs on some systems (?)
|
||||
system ("touch conf.sdltest");
|
||||
*/
|
||||
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = my_strdup("$min_sdl_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_sdl_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (($sdl_major_version > major) ||
|
||||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
|
||||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
|
||||
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
|
||||
printf("*** best to upgrade to the required version.\n");
|
||||
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
|
||||
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
|
||||
printf("*** config.cache before re-running configure\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_sdl" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$SDL_CONFIG" = "no" ; then
|
||||
echo "*** The sdl-config script installed by SDL could not be found"
|
||||
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the SDL_CONFIG environment variable to the"
|
||||
echo "*** full path to sdl-config."
|
||||
else
|
||||
if test -f conf.sdltest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run SDL test program, checking why..."
|
||||
CFLAGS="$CFLAGS $SDL_CFLAGS"
|
||||
LIBS="$LIBS $SDL_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include "SDL.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{ return 0; }
|
||||
#undef main
|
||||
#define main K_and_R_C_main
|
||||
], [ return 0; ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding SDL or finding the wrong"
|
||||
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
|
||||
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
SDL_CFLAGS=""
|
||||
SDL_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(SDL_CFLAGS)
|
||||
AC_SUBST(SDL_LIBS)
|
||||
rm -f conf.sdltest
|
||||
])
|
||||
891
project/jni/application/lbreakout2/aclocal.m4
vendored
Normal file
@@ -0,0 +1,891 @@
|
||||
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.9.6])])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is `.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])
|
||||
AC_SUBST([$1_FALSE])
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 3
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
||||
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 12
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.58])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||
test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$1 | $1:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
||||
#
|
||||
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
||||
# created by `make install' are always world readable, even if the
|
||||
# installer happens to have an overly restrictive umask (e.g. 077).
|
||||
# This was a mistake. There are at least two reasons why we must not
|
||||
# use `-m 0755':
|
||||
# - it causes special bits like SGID to be ignored,
|
||||
# - it may be too restrictive (some setups expect 775 directories).
|
||||
#
|
||||
# Do not use -m 0755 and let people choose whatever they expect by
|
||||
# setting umask.
|
||||
#
|
||||
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
|
||||
# Some implementations (such as Solaris 8's) are not thread-safe: if a
|
||||
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
|
||||
# concurrently, both version can detect that a/ is missing, but only
|
||||
# one can create it and the other will error out. Consequently we
|
||||
# restrict ourselves to GNU make (using the --version option ensures
|
||||
# this.)
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
# We used to keeping the `.' as first argument, in order to
|
||||
# allow $(mkdir_p) to be used without argument. As in
|
||||
# $(mkdir_p) $(somedir)
|
||||
# where $(somedir) is conditionally defined. However this is wrong
|
||||
# for two reasons:
|
||||
# 1. if the package is installed by a user who cannot write `.'
|
||||
# make install will fail,
|
||||
# 2. the above comment should most certainly read
|
||||
# $(mkdir_p) $(DESTDIR)$(somedir)
|
||||
# so it does not work when $(somedir) is undefined and
|
||||
# $(DESTDIR) is not.
|
||||
# To support the latter case, we have to write
|
||||
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
|
||||
# so the `.' trick is pointless.
|
||||
mkdir_p='mkdir -p --'
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
for d in ./-p ./--version;
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
||||
if test -f "$ac_aux_dir/mkinstalldirs"; then
|
||||
mkdir_p='$(mkinstalldirs)'
|
||||
else
|
||||
mkdir_p='$(install_sh) -d'
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([mkdir_p])])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in `make install-strip', and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([m4/codeset.m4])
|
||||
m4_include([m4/gettext.m4])
|
||||
m4_include([m4/glibc21.m4])
|
||||
m4_include([m4/iconv.m4])
|
||||
m4_include([m4/intdiv0.m4])
|
||||
m4_include([m4/intmax.m4])
|
||||
m4_include([m4/inttypes-pri.m4])
|
||||
m4_include([m4/inttypes.m4])
|
||||
m4_include([m4/inttypes_h.m4])
|
||||
m4_include([m4/isc-posix.m4])
|
||||
m4_include([m4/lcmessage.m4])
|
||||
m4_include([m4/lib-ld.m4])
|
||||
m4_include([m4/lib-link.m4])
|
||||
m4_include([m4/lib-prefix.m4])
|
||||
m4_include([m4/longdouble.m4])
|
||||
m4_include([m4/longlong.m4])
|
||||
m4_include([m4/nls.m4])
|
||||
m4_include([m4/po.m4])
|
||||
m4_include([m4/printf-posix.m4])
|
||||
m4_include([m4/progtest.m4])
|
||||
m4_include([m4/signed.m4])
|
||||
m4_include([m4/size_max.m4])
|
||||
m4_include([m4/stdint_h.m4])
|
||||
m4_include([m4/uintmax_t.m4])
|
||||
m4_include([m4/ulonglong.m4])
|
||||
m4_include([m4/wchar_t.m4])
|
||||
m4_include([m4/wint_t.m4])
|
||||
m4_include([m4/xsize.m4])
|
||||
m4_include([acinclude.m4])
|
||||
68
project/jni/application/lbreakout2/client/Makefile.am
Normal file
@@ -0,0 +1,68 @@
|
||||
DEFS = @network_flag@ @sdlnet_flag@ @arch_flag@ @warp_flag@ @audio_flag@ @inst_flag@ @hi_inst_flag@ @locdir_flag@ @DEFS@
|
||||
|
||||
lbreakout2res.o: win32.ico
|
||||
@echo "1 VERSIONINFO" > $(PACKAGE).rc
|
||||
@echo "FILEVERSION `echo $(VERSION) | $(AWK) 'ORS=""; { subs = gsub(/\./,","); print $0; for (ndx=subs; ndx < 3; ndx++) print ",0"; }'`" >> $(PACKAGE).rc
|
||||
@echo "PRODUCTVERSION `echo $(VERSION) | $(AWK) 'ORS=""; { subs = gsub(/\./,","); print $0; for (ndx=subs; ndx < 3; ndx++) print ",0"; }'`" >> $(PACKAGE).rc
|
||||
@echo "FILEFLAGSMASK 0" >> $(PACKAGE).rc
|
||||
@echo "FILEOS 0x40000" >> $(PACKAGE).rc
|
||||
@echo "FILETYPE 1" >> $(PACKAGE).rc
|
||||
@echo "{" >> $(PACKAGE).rc
|
||||
@echo " BLOCK \"StringFileInfo\"" >> $(PACKAGE).rc
|
||||
@echo " {" >> $(PACKAGE).rc
|
||||
@echo " BLOCK \"040904E4\"" >> $(PACKAGE).rc
|
||||
@echo " {" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"CompanyName\", \"LGames - Michael Speck\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"FileDescription\", \"@appname@\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"FileVersion\", \"$(VERSION)\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"InternalName\", \"$(PACKAGE)\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"LegalCopyright\", \"GNU Public License\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"OriginalFilename\", \"$(PACKAGE)$(EXEEXT)\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"ProductName\", \"@appname@\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"ProductVersion\", \"$(VERSION)\"" >> $(PACKAGE).rc
|
||||
@echo " }" >> $(PACKAGE).rc
|
||||
@echo " }" >> $(PACKAGE).rc
|
||||
@echo "}" >> $(PACKAGE).rc
|
||||
@echo "0 ICON win32.ico" >> $(PACKAGE).rc
|
||||
@windres -o $@ -i $(PACKAGE).rc
|
||||
|
||||
bin_PROGRAMS = lbreakout2
|
||||
lbreakout2_SOURCES = credit.c shine.c extras.c balls.c shrapnells.c \
|
||||
shots.c event.c paddle.c frame.c misc.c bricks.c player.c \
|
||||
file.c config.c \
|
||||
item.c menu.c manager.c value.c chart.c \
|
||||
editor.c help.c hint.c theme.c client.c client_recv.c \
|
||||
client_data.c client_handlers.c game.c comm.c slot.c \
|
||||
display.c main.c win32.ico
|
||||
lbreakout2_DEPENDENCIES = @win32_deps@
|
||||
lbreakout2_LDADD = @win32_deps@ ../common/libcommon.a ../gui/libGui.a ../game/libgame.a @mixer_flag@ @sdlnet_lib_flag@
|
||||
|
||||
EXTRA_DIST = credit.h shine.h extras.h balls.h shrapnells.h \
|
||||
shots.h event.h paddle.h frame.h misc.h bricks.h player.h \
|
||||
file.h config.h lbreakout.h \
|
||||
item.h menu.h manager.h value.h chart.h \
|
||||
editor.h help.h hint.h theme.h client.h client_data.h \
|
||||
client_handlers.h game.h comm.h slot.h \
|
||||
display.h empty.hscr
|
||||
|
||||
SUBDIRS = gfx sounds levels gui_theme
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(hi_dir)
|
||||
if ! test -f $(DESTDIR)$(hi_dir)/lbreakout2.hscr; then \
|
||||
$(INSTALL_DATA) -m 666 empty.hscr $(DESTDIR)$(hi_dir)/lbreakout2.hscr; \
|
||||
fi;
|
||||
|
||||
uninstall-local:
|
||||
rm -rf $(DESTDIR)$(inst_dir)
|
||||
rm -f $(DESTDIR)$(hi_dir)/lbreakout2.hscr
|
||||
rm -rf $(DESTDIR)$(doc_dir)/lbreakout2
|
||||
|
||||
win32-install-script:
|
||||
@$(STRIP) $(PACKAGE)$(EXEEXT)
|
||||
@echo "Source: \"`pwd -W`\\$(PACKAGE)$(EXEEXT)\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@
|
||||
@list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
(cd $$subdir \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
|
||||
done
|
||||
689
project/jni/application/lbreakout2/client/Makefile.in
Normal file
@@ -0,0 +1,689 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
bin_PROGRAMS = lbreakout2$(EXEEXT)
|
||||
subdir = client
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \
|
||||
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
|
||||
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
|
||||
$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_lbreakout2_OBJECTS = credit.$(OBJEXT) shine.$(OBJEXT) \
|
||||
extras.$(OBJEXT) balls.$(OBJEXT) shrapnells.$(OBJEXT) \
|
||||
shots.$(OBJEXT) event.$(OBJEXT) paddle.$(OBJEXT) \
|
||||
frame.$(OBJEXT) misc.$(OBJEXT) bricks.$(OBJEXT) \
|
||||
player.$(OBJEXT) file.$(OBJEXT) config.$(OBJEXT) \
|
||||
item.$(OBJEXT) menu.$(OBJEXT) manager.$(OBJEXT) \
|
||||
value.$(OBJEXT) chart.$(OBJEXT) editor.$(OBJEXT) \
|
||||
help.$(OBJEXT) hint.$(OBJEXT) theme.$(OBJEXT) client.$(OBJEXT) \
|
||||
client_recv.$(OBJEXT) client_data.$(OBJEXT) \
|
||||
client_handlers.$(OBJEXT) game.$(OBJEXT) comm.$(OBJEXT) \
|
||||
slot.$(OBJEXT) display.$(OBJEXT) main.$(OBJEXT)
|
||||
lbreakout2_OBJECTS = $(am_lbreakout2_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(lbreakout2_SOURCES)
|
||||
DIST_SOURCES = $(lbreakout2_SOURCES)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @network_flag@ @sdlnet_flag@ @arch_flag@ @warp_flag@ @audio_flag@ @inst_flag@ @hi_inst_flag@ @locdir_flag@ @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GREP = @GREP@
|
||||
HAVE_ASPRINTF = @HAVE_ASPRINTF@
|
||||
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
|
||||
HAVE_SNPRINTF = @HAVE_SNPRINTF@
|
||||
HAVE_WPRINTF = @HAVE_WPRINTF@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
appname = @appname@
|
||||
arch_flag = @arch_flag@
|
||||
audio_flag = @audio_flag@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
doc_dir = @doc_dir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
hi_dir = @hi_dir@
|
||||
hi_inst_flag = @hi_inst_flag@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
inst_dir = @inst_dir@
|
||||
inst_flag = @inst_flag@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
locdir_flag = @locdir_flag@
|
||||
mandir = @mandir@
|
||||
mixer_flag = @mixer_flag@
|
||||
mkdir_p = @mkdir_p@
|
||||
netdebug_flag = @netdebug_flag@
|
||||
network_flag = @network_flag@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sdlnet_flag = @sdlnet_flag@
|
||||
sdlnet_lib_flag = @sdlnet_lib_flag@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
warp_flag = @warp_flag@
|
||||
win32_deps = @win32_deps@
|
||||
win32_inst_script = @win32_inst_script@
|
||||
lbreakout2_SOURCES = credit.c shine.c extras.c balls.c shrapnells.c \
|
||||
shots.c event.c paddle.c frame.c misc.c bricks.c player.c \
|
||||
file.c config.c \
|
||||
item.c menu.c manager.c value.c chart.c \
|
||||
editor.c help.c hint.c theme.c client.c client_recv.c \
|
||||
client_data.c client_handlers.c game.c comm.c slot.c \
|
||||
display.c main.c win32.ico
|
||||
|
||||
lbreakout2_DEPENDENCIES = @win32_deps@
|
||||
lbreakout2_LDADD = @win32_deps@ ../common/libcommon.a ../gui/libGui.a ../game/libgame.a @mixer_flag@ @sdlnet_lib_flag@
|
||||
EXTRA_DIST = credit.h shine.h extras.h balls.h shrapnells.h \
|
||||
shots.h event.h paddle.h frame.h misc.h bricks.h player.h \
|
||||
file.h config.h lbreakout.h \
|
||||
item.h menu.h manager.h value.h chart.h \
|
||||
editor.h help.h hint.h theme.h client.h client_data.h \
|
||||
client_handlers.h game.h comm.h slot.h \
|
||||
display.h empty.hscr
|
||||
|
||||
SUBDIRS = gfx sounds levels gui_theme
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign client/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign client/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
lbreakout2$(EXEEXT): $(lbreakout2_OBJECTS) $(lbreakout2_DEPENDENCIES)
|
||||
@rm -f lbreakout2$(EXEEXT)
|
||||
$(LINK) $(lbreakout2_LDFLAGS) $(lbreakout2_OBJECTS) $(lbreakout2_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/balls.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bricks.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chart.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_data.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_handlers.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_recv.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comm.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/credit.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/display.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/editor.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extras.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frame.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hint.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/item.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manager.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paddle.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shine.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shots.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrapnells.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slot.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theme.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/value.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-local
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-binPROGRAMS clean-generic clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-compile distclean-generic \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-data-local install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-binPROGRAMS uninstall-info-am uninstall-local
|
||||
|
||||
|
||||
lbreakout2res.o: win32.ico
|
||||
@echo "1 VERSIONINFO" > $(PACKAGE).rc
|
||||
@echo "FILEVERSION `echo $(VERSION) | $(AWK) 'ORS=""; { subs = gsub(/\./,","); print $0; for (ndx=subs; ndx < 3; ndx++) print ",0"; }'`" >> $(PACKAGE).rc
|
||||
@echo "PRODUCTVERSION `echo $(VERSION) | $(AWK) 'ORS=""; { subs = gsub(/\./,","); print $0; for (ndx=subs; ndx < 3; ndx++) print ",0"; }'`" >> $(PACKAGE).rc
|
||||
@echo "FILEFLAGSMASK 0" >> $(PACKAGE).rc
|
||||
@echo "FILEOS 0x40000" >> $(PACKAGE).rc
|
||||
@echo "FILETYPE 1" >> $(PACKAGE).rc
|
||||
@echo "{" >> $(PACKAGE).rc
|
||||
@echo " BLOCK \"StringFileInfo\"" >> $(PACKAGE).rc
|
||||
@echo " {" >> $(PACKAGE).rc
|
||||
@echo " BLOCK \"040904E4\"" >> $(PACKAGE).rc
|
||||
@echo " {" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"CompanyName\", \"LGames - Michael Speck\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"FileDescription\", \"@appname@\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"FileVersion\", \"$(VERSION)\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"InternalName\", \"$(PACKAGE)\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"LegalCopyright\", \"GNU Public License\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"OriginalFilename\", \"$(PACKAGE)$(EXEEXT)\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"ProductName\", \"@appname@\"" >> $(PACKAGE).rc
|
||||
@echo " VALUE \"ProductVersion\", \"$(VERSION)\"" >> $(PACKAGE).rc
|
||||
@echo " }" >> $(PACKAGE).rc
|
||||
@echo " }" >> $(PACKAGE).rc
|
||||
@echo "}" >> $(PACKAGE).rc
|
||||
@echo "0 ICON win32.ico" >> $(PACKAGE).rc
|
||||
@windres -o $@ -i $(PACKAGE).rc
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(hi_dir)
|
||||
if ! test -f $(DESTDIR)$(hi_dir)/lbreakout2.hscr; then \
|
||||
$(INSTALL_DATA) -m 666 empty.hscr $(DESTDIR)$(hi_dir)/lbreakout2.hscr; \
|
||||
fi;
|
||||
|
||||
uninstall-local:
|
||||
rm -rf $(DESTDIR)$(inst_dir)
|
||||
rm -f $(DESTDIR)$(hi_dir)/lbreakout2.hscr
|
||||
rm -rf $(DESTDIR)$(doc_dir)/lbreakout2
|
||||
|
||||
win32-install-script:
|
||||
@$(STRIP) $(PACKAGE)$(EXEEXT)
|
||||
@echo "Source: \"`pwd -W`\\$(PACKAGE)$(EXEEXT)\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@
|
||||
@list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
(cd $$subdir \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
252
project/jni/application/lbreakout2/client/balls.c
Normal file
@@ -0,0 +1,252 @@
|
||||
/***************************************************************************
|
||||
balls.c - description
|
||||
-------------------
|
||||
begin : Sun Sep 9 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "../game/game.h"
|
||||
#include "bricks.h"
|
||||
|
||||
extern SDL_Surface *ball_pic; /* ball pictures */
|
||||
extern SDL_Surface *ball_shadow;
|
||||
int ball_pic_x_offset = 0; /* display ball at this position */
|
||||
extern int ball_w, ball_h;
|
||||
float ball_metal_alpha_change = 1.2; /* pulse factor */
|
||||
float ball_metal_alpha = 0; /* alpha of ball when blue */
|
||||
extern SDL_Surface *offscreen;
|
||||
extern SDL_Surface *stk_display;
|
||||
extern int shadow_size;
|
||||
extern Game *game;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Locals
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Show/hide all balls
|
||||
====================================================================
|
||||
*/
|
||||
void balls_hide()
|
||||
{
|
||||
ListEntry *entry = game->balls->head->next;
|
||||
Ball *ball;
|
||||
int bx, by, bw, bh;
|
||||
while ( entry != game->balls->tail ) {
|
||||
ball = (Ball*)entry->item;
|
||||
entry = entry->next;
|
||||
/* balls position; add paddle pos if attached */
|
||||
bx = ball->x; by = ball->y;
|
||||
bw = ball_w + shadow_size;
|
||||
bh = ball_h + shadow_size;
|
||||
if (ball->attached) {
|
||||
bx += ball->paddle->x;
|
||||
by += ball->paddle->y;
|
||||
}
|
||||
/* blit background */
|
||||
stk_surface_blit( offscreen,
|
||||
bx, by, bw,bh,
|
||||
stk_display, bx, by );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
}
|
||||
void balls_show_shadow()
|
||||
{
|
||||
ListEntry *entry = game->balls->head->next;
|
||||
int bx, by;
|
||||
int mx, my;
|
||||
Ball *ball;
|
||||
if ( game->extra_active[EX_DARKNESS] ) return;
|
||||
while ( entry != game->balls->tail ) {
|
||||
ball = entry->item;
|
||||
entry = entry->next;
|
||||
/* balls position; add paddle pos if attached */
|
||||
bx = ball->x;
|
||||
by = ball->y;
|
||||
if (ball->attached) {
|
||||
bx += ball->paddle->x;
|
||||
by += ball->paddle->y;
|
||||
}
|
||||
/* show ball -- no shadow if darkness -- no shadow if going back home */
|
||||
if ( !ball->moving_back ) {
|
||||
stk_surface_clip( stk_display, 0, 0, stk_display->w - BRICK_WIDTH, stk_display->h );
|
||||
stk_surface_alpha_blit( ball_shadow, 0, 0, ball_w, ball_h,
|
||||
stk_display, bx + shadow_size, by + shadow_size,
|
||||
(game->extra_active[EX_METAL])?(((int)ball_metal_alpha)>>1):SHADOW_ALPHA );
|
||||
stk_display_store_drect();
|
||||
/* redraw nearby bricks */
|
||||
stk_surface_clip( stk_display, bx + shadow_size, by + shadow_size, ball_w, ball_h );
|
||||
/* check the three outer ocrners of the shadow if there's a brick */
|
||||
mx = ( bx + shadow_size + ball_w ) / BRICK_WIDTH;
|
||||
my = ( by + shadow_size ) / BRICK_HEIGHT;
|
||||
if ( my < MAP_HEIGHT - 1 )
|
||||
if ( mx < MAP_WIDTH - 1 && game->bricks[mx][my].type != MAP_EMPTY )
|
||||
brick_draw( stk_display, mx, my, 0 );
|
||||
mx = ( bx + shadow_size + ball_w ) / BRICK_WIDTH;
|
||||
my = ( by + shadow_size + ball_h ) / BRICK_HEIGHT;
|
||||
if ( my < MAP_HEIGHT - 1 )
|
||||
if ( mx < MAP_WIDTH - 1 && game->bricks[mx][my].type != MAP_EMPTY )
|
||||
brick_draw( stk_display, mx, my, 0 );
|
||||
mx = ( bx + shadow_size ) / BRICK_WIDTH;
|
||||
my = ( by + shadow_size + ball_h ) / BRICK_HEIGHT;
|
||||
if ( my < MAP_HEIGHT - 1 )
|
||||
if ( mx < MAP_WIDTH - 1 && game->bricks[mx][my].type != MAP_EMPTY )
|
||||
brick_draw( stk_display, mx, my, 0 );
|
||||
stk_surface_clip( stk_display, 0, 0, 0, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
void balls_show()
|
||||
{
|
||||
ListEntry *entry = game->balls->head->next;
|
||||
Ball *ball;
|
||||
int bx, by;
|
||||
while ( entry != game->balls->tail ) {
|
||||
ball = entry->item;
|
||||
entry = entry->next;
|
||||
/* balls position; add paddle pos if attached */
|
||||
bx = ball->x;
|
||||
by = ball->y;
|
||||
if (ball->attached) {
|
||||
bx += ball->paddle->x;
|
||||
by += ball->paddle->y;
|
||||
}
|
||||
if ( game->extra_active[EX_METAL] )
|
||||
stk_surface_alpha_blit( ball_pic, ball_pic_x_offset, 0,
|
||||
ball_w, ball_h, stk_display, bx, by,
|
||||
ball_metal_alpha );
|
||||
else
|
||||
stk_surface_blit( ball_pic, ball_pic_x_offset, 0,
|
||||
ball_w, ball_h, stk_display, bx, by );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
}
|
||||
void balls_alphashow( int alpha )
|
||||
{
|
||||
ListEntry *entry = game->balls->head->next;
|
||||
Ball *b;
|
||||
int bx, by;
|
||||
while ( entry != game->balls->tail ) {
|
||||
b = entry->item;
|
||||
/* balls position; add paddle pos if attached */
|
||||
bx = b->x;
|
||||
by = b->y;
|
||||
if (b->attached) {
|
||||
bx += b->paddle->x;
|
||||
by += b->paddle->y;
|
||||
}
|
||||
/* show ball */
|
||||
stk_surface_alpha_blit( ball_pic, ball_pic_x_offset, 0,
|
||||
ball_w, ball_h, stk_display, bx, by, alpha );
|
||||
entry = entry->next;
|
||||
}
|
||||
}
|
||||
|
||||
/* reflect ball at brick but destroy nothing */
|
||||
void client_brick_reflect( Ball *b )
|
||||
{
|
||||
float old_vx;
|
||||
Vector n;
|
||||
int reflect;
|
||||
int chaos_reflect;
|
||||
|
||||
/* time left? */
|
||||
if (b->target.cur_tm < b->target.time) return;
|
||||
|
||||
/* will reflect? */
|
||||
reflect = 1;
|
||||
if ( game->extra_active[EX_METAL] )
|
||||
if ( game->bricks[b->target.mx][b->target.my].type != MAP_WALL )
|
||||
reflect = 0;
|
||||
|
||||
/* will reflect chaotic? */
|
||||
chaos_reflect = 0;
|
||||
if ( game->extra_active[EX_CHAOS] ||
|
||||
game->bricks[b->target.mx][b->target.my].type == MAP_BRICK_CHAOS )
|
||||
chaos_reflect = 1;
|
||||
|
||||
/* we have a target and so we have a reset position and even if the ball's
|
||||
not reflected the position must be reset */
|
||||
b->cur.x = b->target.x; b->x = (int)b->cur.x;
|
||||
b->cur.y = b->target.y; b->y = (int)b->cur.y;
|
||||
|
||||
if ( reflect ) {
|
||||
game->mod.paddle_reflected_ball_count++;
|
||||
old_vx = b->vel.x;
|
||||
if ( !chaos_reflect ) {
|
||||
/* normal reflection */
|
||||
n.x = (1-2*b->target.perp_vector.x*b->target.perp_vector.x)*b->vel.x +
|
||||
( -2*b->target.perp_vector.x*b->target.perp_vector.y)*b->vel.y;
|
||||
n.y = ( -2*b->target.perp_vector.x*b->target.perp_vector.y)*b->vel.x +
|
||||
(1-2*b->target.perp_vector.y*b->target.perp_vector.y)*b->vel.y;
|
||||
b->vel.x = n.x;
|
||||
b->vel.y = n.y;
|
||||
}
|
||||
else {
|
||||
b->vel.x = ((float)RANDOM( -10000, 10000 )) / 10000;
|
||||
b->vel.y = (float)(RANDOM( -10000, 10000 )) / 10000;
|
||||
}
|
||||
/* only use 2 degree steps */
|
||||
b->angle = vec2angle( &b->vel );
|
||||
angle2vec( b->angle, &b->vel );
|
||||
if ( b->target.side >= CORNER_UPPER_LEFT && !chaos_reflect )
|
||||
ball_mask_vel( b, old_vx, BALL_ADD_ENTROPY );
|
||||
else
|
||||
ball_mask_vel( b, old_vx, BALL_NO_ENTROPY );
|
||||
}
|
||||
|
||||
/* mark target as disabled so it won't get stuck at the
|
||||
bottom of the screen but keep the target position so
|
||||
that we know what needs an update. */
|
||||
b->target.exists = 0;
|
||||
}
|
||||
|
||||
/* update energy ball animation */
|
||||
void client_balls_update( int ms )
|
||||
{
|
||||
Vector old; /* old position of ball before update */
|
||||
Ball *ball;
|
||||
|
||||
/* modify alpha when metal */
|
||||
if ( game->extra_active[EX_METAL] ) {
|
||||
ball_metal_alpha += ball_metal_alpha_change * ms;
|
||||
if ( ball_metal_alpha >= 255 || ball_metal_alpha <= 0 ) {
|
||||
ball_metal_alpha_change = -ball_metal_alpha_change;
|
||||
if ( ball_metal_alpha < 0 ) ball_metal_alpha = 0;
|
||||
if ( ball_metal_alpha > 255 ) ball_metal_alpha = 255;
|
||||
}
|
||||
}
|
||||
|
||||
/* new position if NOT attached. the communicator has set the velocity
|
||||
* 0 if a ball is inanimated */
|
||||
if ( game->game_type == GT_NETWORK ) {
|
||||
list_reset( game->balls );
|
||||
while ( (ball = list_next( game->balls )) ) {
|
||||
if ( ball->attached ) continue;
|
||||
if ( ball->vel.x == 0 && ball->vel.y == 0 ) continue;
|
||||
|
||||
old.x = ball->cur.x;
|
||||
old.y = ball->cur.y;
|
||||
|
||||
ball->cur.x += ball->vel.x * ms;
|
||||
ball->cur.y += ball->vel.y * ms;
|
||||
ball->x = (int)ball->cur.x;
|
||||
ball->y = (int)ball->cur.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
30
project/jni/application/lbreakout2/client/balls.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/***************************************************************************
|
||||
balls.h - description
|
||||
-------------------
|
||||
begin : Sun Sep 9 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Show/hide all balls
|
||||
====================================================================
|
||||
*/
|
||||
void balls_hide();
|
||||
void balls_show_shadow();
|
||||
void balls_show();
|
||||
void balls_alphashow( int alpha );
|
||||
|
||||
/* update energy ball animation */
|
||||
void client_balls_update( int ms );
|
||||
|
||||
342
project/jni/application/lbreakout2/client/bricks.c
Normal file
@@ -0,0 +1,342 @@
|
||||
/***************************************************************************
|
||||
bricks.c - description
|
||||
-------------------
|
||||
begin : Thu Sep 6 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include "../game/game.h"
|
||||
#include "lbreakout.h"
|
||||
#include "shrapnells.h"
|
||||
#include "bricks.h"
|
||||
|
||||
extern SDL_Surface *stk_display;
|
||||
extern SDL_Surface *offscreen; /* offscreen with bricks, background, frame */
|
||||
extern SDL_Surface *bkgnd; /* background picture (includes frame) */
|
||||
extern SDL_Surface *warp_pic;
|
||||
extern SDL_Surface *brick_pic; /* brick graphics in a horizontal order */
|
||||
extern int shadow_size;
|
||||
extern SDL_Surface *brick_shadow; /* shadow mask */
|
||||
extern int shine_x, shine_y, shine_recreate;
|
||||
#ifdef AUDIO_ENABLED
|
||||
extern StkSound *wav_boom;
|
||||
#endif
|
||||
extern Game *game;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Locals
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/* remove a brick and release the extra (which will have no effect
|
||||
* on collection) update the graphics. no growth or explosions
|
||||
* of other bricks are initiated as these are send by network */
|
||||
void client_brick_remove( int mx, int my, int type, Vector imp, Paddle *paddle, int no_sound )
|
||||
{
|
||||
int px, py, w, h, i, j, shadow, anim_brick_id;
|
||||
int dir;
|
||||
|
||||
/* add explosion animation */
|
||||
if ( type == SHR_BY_EXPL_WITH_EXPL ) {
|
||||
exp_create( mx * BRICK_WIDTH + ( BRICK_WIDTH >> 1 ),
|
||||
my * BRICK_HEIGHT + ( BRICK_HEIGHT >> 1 ) );
|
||||
#ifdef AUDIO_ENABLED
|
||||
if (!no_sound)
|
||||
stk_sound_play_x( mx * BRICK_WIDTH + ( BRICK_WIDTH >> 1 ), wav_boom );
|
||||
#endif
|
||||
type = SHR_BY_EXPL; /* WITH_EXPL is not known */
|
||||
}
|
||||
|
||||
/* decrease brick count if no indestructible brick was destroyed */
|
||||
if ( game->bricks[mx][my].dur != -1 )
|
||||
game->bricks_left--;
|
||||
|
||||
/* before removing the brick, store the brick id for animation */
|
||||
anim_brick_id = game->bricks[mx][my].id;
|
||||
|
||||
/* remove brick from map */
|
||||
game->bricks[mx][my].brick_c = ' ';
|
||||
game->bricks[mx][my].id = -1;
|
||||
game->bricks[mx][my].dur = -1;
|
||||
game->bricks[mx][my].exp_time = -1;
|
||||
game->bricks[mx][my].heal_time = -1;
|
||||
game->bricks[mx][my].type = MAP_EMPTY;
|
||||
|
||||
/* get screen position */
|
||||
px = mx * BRICK_WIDTH;
|
||||
py = my * BRICK_HEIGHT;
|
||||
|
||||
/* release extra if one exists. in opposite to the server the goldshower
|
||||
* 1000P is not released here but in the hit handle function if the gold_shower
|
||||
* flag is set to avoid releasing 'ghost' extras due to latency. */
|
||||
dir = ( paddle->type == PADDLE_TOP ) ? -1 : 1;
|
||||
if ( game->bricks[mx][my].extra != EX_NONE ) {
|
||||
if ( game->diff->allow_maluses || !extra_is_malus( game->bricks[mx][my].extra ) )
|
||||
list_add( game->extras, extra_create( game->bricks[mx][my].extra, px, py, dir ) );
|
||||
}
|
||||
game->bricks[mx][my].extra = EX_NONE;
|
||||
game->bricks[mx][my].extra_c = ' ';
|
||||
|
||||
/* in case of darkness no (graphical) remove nescessary */
|
||||
if ( game->extra_active[EX_DARKNESS] ) {
|
||||
#ifdef AUDIO_ENABLED
|
||||
if (!no_sound)
|
||||
stk_sound_play_x( px, wav_boom );
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
shrapnells_create( brick_pic, anim_brick_id * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
px, py, type, imp );
|
||||
/* recreate shine if needed */
|
||||
if (px == shine_x && py == shine_y) shine_recreate = 1;
|
||||
/* clear offscreen */
|
||||
w = BRICK_WIDTH + shadow_size; h = BRICK_HEIGHT + shadow_size;
|
||||
if ( px + w > stk_display->w - BRICK_WIDTH )
|
||||
w = stk_display->w - BRICK_WIDTH - px;
|
||||
stk_surface_clip( offscreen, px, py, w, h );
|
||||
stk_surface_blit( bkgnd, px, py, w, h, offscreen, px, py );
|
||||
/* if shadow redraw close bricks */
|
||||
for ( i = mx - 1; i <= mx + 1; i++ )
|
||||
for ( j = my - 1; j <= my + 1; j++ ) {
|
||||
if ( i > 0 && j > 0 && i < MAP_WIDTH - 1 ) {
|
||||
if ( game->bricks[i][j].type != MAP_EMPTY ) {
|
||||
if ( i <= mx && j <= my ) shadow = 1; else shadow = 0;
|
||||
brick_draw( offscreen, i, j, shadow );
|
||||
}
|
||||
}
|
||||
}
|
||||
stk_surface_clip( offscreen, 0, 0, 0, 0 );
|
||||
/* update screen */
|
||||
stk_surface_blit( offscreen, px, py, w, h, stk_display, px, py );
|
||||
stk_display_store_drect();
|
||||
#ifdef AUDIO_ENABLED
|
||||
if (!no_sound)
|
||||
stk_sound_play_x( px, wav_boom );
|
||||
#endif
|
||||
}
|
||||
|
||||
static void client_brick_heal( int x, int y )
|
||||
{
|
||||
game->bricks[x][y].dur++;
|
||||
game->bricks[x][y].id++;
|
||||
if ( !game->extra_active[EX_DARKNESS] ) {
|
||||
brick_draw( offscreen, x, y, 0 );
|
||||
brick_draw( stk_display, x, y, 0 );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
}
|
||||
|
||||
static void client_brick_grow( int x, int y, int id )
|
||||
{
|
||||
Brick *brick = &game->bricks[x][y];
|
||||
int px, py;
|
||||
int isReplace = 0;
|
||||
|
||||
if (game->bricks[x][y].type!=MAP_EMPTY)
|
||||
isReplace = 1;
|
||||
|
||||
/* add brick */
|
||||
//brick->id = RANDOM( BRICK_GROW_FIRST, BRICK_GROW_LAST );
|
||||
brick->id = id;
|
||||
brick->brick_c = brick_get_char( brick->id );
|
||||
brick->type = MAP_BRICK;
|
||||
brick->score = game->diff->score_mod * BRICK_SCORE / 10;
|
||||
brick->dur = 1;
|
||||
/* keep the extra that is already assigned to this position */
|
||||
brick->exp_time = -1;
|
||||
brick->heal_time = -1;
|
||||
if (!isReplace) game->bricks_left++;
|
||||
|
||||
if ( !game->extra_active[EX_DARKNESS] ) {
|
||||
px = x * BRICK_WIDTH;
|
||||
py = y * BRICK_HEIGHT;
|
||||
if (isReplace)
|
||||
brick_draw( offscreen, x, y, 0 );
|
||||
else
|
||||
brick_draw_complex( x, y, px, py );
|
||||
stk_surface_blit( offscreen, px, py,
|
||||
BRICK_WIDTH + shadow_size,
|
||||
BRICK_HEIGHT + shadow_size,
|
||||
stk_display, px, py );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Publics
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Draw all bricks to offscreen surface.
|
||||
====================================================================
|
||||
*/
|
||||
void bricks_draw()
|
||||
{
|
||||
int i, j;
|
||||
if ( offscreen == 0 ) return;
|
||||
stk_surface_clip( offscreen, 0, 0, stk_display->w - BRICK_WIDTH, stk_display->h );
|
||||
for ( j = 1; j < MAP_HEIGHT - 1; j++ )
|
||||
for ( i = 1; i < MAP_WIDTH - 1; i++ )
|
||||
if ( game->bricks[i][j].id >= 0 )
|
||||
brick_draw( offscreen, i, j, 1 );
|
||||
stk_surface_clip( offscreen, 0,0,0,0 );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Draw brick to passed surface
|
||||
====================================================================
|
||||
*/
|
||||
void brick_draw( SDL_Surface *surf, int map_x, int map_y, int shadow )
|
||||
{
|
||||
int x = map_x * BRICK_WIDTH, y = map_y * BRICK_HEIGHT;
|
||||
/* dont draw invisible bricks */
|
||||
if ( game->bricks[map_x][map_y].id == INVIS_BRICK_ID ) return;
|
||||
/* add shadow */
|
||||
if ( shadow ) {
|
||||
stk_surface_alpha_blit( brick_shadow,
|
||||
game->bricks[map_x][map_y].id * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
surf, x + shadow_size, y + shadow_size, SHADOW_ALPHA );
|
||||
}
|
||||
/* brick if not frame brick */
|
||||
if ( map_x == 0 || map_y == 0 || map_x == MAP_WIDTH - 1 ) return;
|
||||
stk_surface_blit( brick_pic,
|
||||
game->bricks[map_x][map_y].id * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT, surf, x,y );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Add brick with clipped shadow to offscreen. To draw a brick without
|
||||
shadow check use brick_draw().
|
||||
====================================================================
|
||||
*/
|
||||
void brick_draw_complex( int mx, int my, int px, int py )
|
||||
{
|
||||
brick_draw( offscreen, mx, my, 1 );
|
||||
/* redraw surrounding bricks */
|
||||
stk_surface_clip( offscreen, px + shadow_size, py + shadow_size, BRICK_WIDTH, BRICK_HEIGHT );
|
||||
if ( mx + 1 == MAP_WIDTH - 1 ) {
|
||||
/* right frame part */
|
||||
stk_surface_blit( bkgnd, px + BRICK_WIDTH, py,
|
||||
BRICK_WIDTH, ( BRICK_HEIGHT << 1 ),
|
||||
offscreen, px + BRICK_WIDTH, py );
|
||||
}
|
||||
else {
|
||||
brick_draw( offscreen, mx + 1, my, 0 );
|
||||
brick_draw( offscreen, mx + 1, my + 1, 0 );
|
||||
}
|
||||
if ( game->bricks[mx][my + 1].type != MAP_EMPTY )
|
||||
brick_draw( offscreen, mx, my + 1, 0 );
|
||||
stk_surface_clip( offscreen, 0, 0, 0, 0 );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Make brick at mx,my loose 'points' duration. It must have been
|
||||
previously checked that this operation is completely valid.
|
||||
It does not update net_bricks or the player's duration reference.
|
||||
====================================================================
|
||||
*/
|
||||
void client_brick_loose_dur( int mx, int my, int points )
|
||||
{
|
||||
int px, py;
|
||||
int refresh_h, refresh_w;
|
||||
while ( points-- > 0 ) {
|
||||
game->bricks[mx][my].dur--;
|
||||
game->bricks[mx][my].id--;
|
||||
/* adjust brick character:
|
||||
* a,b,c - multiple hits
|
||||
* v - invisible */
|
||||
if ( game->bricks[mx][my].brick_c == 'v' )
|
||||
game->bricks[mx][my].brick_c = 'c';
|
||||
else
|
||||
game->bricks[mx][my].brick_c--; /* successive order */
|
||||
if ( !game->extra_active[EX_DARKNESS]) {
|
||||
px = mx * BRICK_WIDTH;
|
||||
py = my * BRICK_HEIGHT;
|
||||
refresh_w = BRICK_WIDTH+shadow_size;
|
||||
refresh_h = BRICK_HEIGHT+shadow_size;
|
||||
/* copy background as old brick may have different transparency
|
||||
do this in three parts to save computation */
|
||||
stk_surface_blit( bkgnd, px, py,
|
||||
shadow_size, BRICK_HEIGHT,
|
||||
offscreen, px, py );
|
||||
stk_surface_blit( bkgnd, px + shadow_size, py,
|
||||
BRICK_WIDTH - shadow_size, BRICK_HEIGHT + shadow_size,
|
||||
offscreen, px + shadow_size, py );
|
||||
stk_surface_blit( bkgnd, px + BRICK_WIDTH, py + shadow_size,
|
||||
shadow_size, BRICK_HEIGHT,
|
||||
offscreen, px + BRICK_WIDTH, py + shadow_size );
|
||||
/* draw brick + surrounding */
|
||||
brick_draw_complex( mx, my, px, py );
|
||||
/* udpate screen */
|
||||
stk_surface_blit( offscreen, px, py,
|
||||
refresh_w, refresh_h, stk_display, px, py );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* handle a received brick action */
|
||||
void client_handle_brick_hit( BrickHit *hit )
|
||||
{
|
||||
Paddle *paddle;
|
||||
Vector imp;
|
||||
|
||||
paddle = (hit->paddle==PADDLE_BOTTOM)?game->paddles[PADDLE_BOTTOM]:game->paddles[PADDLE_TOP];
|
||||
angle2vec( hit->degrees, &imp );
|
||||
|
||||
switch ( hit->type )
|
||||
{
|
||||
case HT_HIT:
|
||||
client_brick_loose_dur( hit->x, hit->y, 1 );
|
||||
break;
|
||||
case HT_REMOVE:
|
||||
if (hit->draw_explosion)
|
||||
hit->dest_type = SHR_BY_EXPL_WITH_EXPL;
|
||||
client_brick_remove( hit->x, hit->y, hit->dest_type, imp, paddle, hit->no_sound );
|
||||
/* gold shower extra */
|
||||
if ( hit->gold_shower )
|
||||
list_add( game->extras,
|
||||
extra_create( EX_SCORE1000,
|
||||
hit->x*BRICK_WIDTH, hit->y*BRICK_HEIGHT,
|
||||
(hit->paddle==PADDLE_TOP)?-1:1 ) );
|
||||
break;
|
||||
case HT_HEAL:
|
||||
client_brick_heal( hit->x, hit->y );
|
||||
break;
|
||||
case HT_GROW:
|
||||
client_brick_grow( hit->x, hit->y, hit->brick_id );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* redraw all bricks (leaving shadows in transparent frame parts) */
|
||||
void client_redraw_all_bricks()
|
||||
{
|
||||
stk_surface_blit( bkgnd, BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display->w - BRICK_WIDTH*2,stk_display->h - BRICK_HEIGHT,
|
||||
offscreen, BRICK_WIDTH, BRICK_HEIGHT );
|
||||
bricks_draw();
|
||||
stk_surface_blit( offscreen, BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display->w - BRICK_WIDTH*2,stk_display->h - BRICK_HEIGHT,
|
||||
stk_display, BRICK_WIDTH, BRICK_HEIGHT );
|
||||
// stk_display_update( STK_UPDATE_ALL );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
42
project/jni/application/lbreakout2/client/bricks.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/***************************************************************************
|
||||
bricks.h - description
|
||||
-------------------
|
||||
begin : Thu Sep 6 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Draw all bricks to offscreen surface.
|
||||
====================================================================
|
||||
*/
|
||||
void bricks_draw();
|
||||
/*
|
||||
====================================================================
|
||||
Add brick with clipped shadow to offscreen. To draw a brick without
|
||||
shadow check use brick_draw().
|
||||
====================================================================
|
||||
*/
|
||||
void brick_draw_complex( int mx, int my, int px, int py );
|
||||
/*
|
||||
====================================================================
|
||||
Draw brick to passed surface
|
||||
====================================================================
|
||||
*/
|
||||
void brick_draw( SDL_Surface *surf, int map_x, int map_y, int shadow );
|
||||
|
||||
/* handle a received brick action */
|
||||
void client_handle_brick_hit( BrickHit *hit );
|
||||
|
||||
/* redraw all bricks */
|
||||
void client_redraw_all_bricks();
|
||||
423
project/jni/application/lbreakout2/client/chart.c
Normal file
@@ -0,0 +1,423 @@
|
||||
/***************************************************************************
|
||||
chart.c - description
|
||||
-------------------
|
||||
begin : Mon Sep 24 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "config.h"
|
||||
#include "chart.h"
|
||||
|
||||
#define CHART_FILE_NAME "lbreakout2.hscr"
|
||||
|
||||
List *charts = 0; /* list of all loaded level set charts */
|
||||
|
||||
char chart_path[512]; /* path charts where actually loaded/created from */
|
||||
int chart_loaded = 0; /* true if highscore succesfully loaded */
|
||||
SDL_Rect chart_pos; /* used to store size. x,y is set when drawing */
|
||||
int chart_gap = 10;
|
||||
int chart_level_offset = 0; /* level offset (name's left aligned, score's right aligned) */
|
||||
extern SDL_Surface *stk_display;
|
||||
extern Config config;
|
||||
extern StkFont *cfont, *chfont, *ccfont; /* normal, highlight and caption font */
|
||||
extern FILE *hi_dir_chart_file;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Local
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Reset charts
|
||||
====================================================================
|
||||
*/
|
||||
void chart_reset( Set_Chart *chart )
|
||||
{
|
||||
int i;
|
||||
memset( chart->entries, 0, sizeof( Chart_Entry ) * CHART_ENTRY_COUNT );
|
||||
for ( i = 0; i < CHART_ENTRY_COUNT; i++ )
|
||||
chart_add( chart, "............", i + 1, 10000 * ( i + 1 ) );
|
||||
chart->entries[0].score = 300000;
|
||||
chart->entries[1].score = 200000;
|
||||
chart->entries[2].score = 150000;
|
||||
chart->entries[3].score = 100000;
|
||||
chart->entries[4].score = 70000;
|
||||
for ( i = 0; i < CHART_ENTRY_COUNT; i++ )
|
||||
chart->entries[i].new_entry = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Create/delete set chart.
|
||||
====================================================================
|
||||
*/
|
||||
Set_Chart* chart_set_create( char *name )
|
||||
{
|
||||
Set_Chart *chart = calloc( 1, sizeof( Set_Chart ) );
|
||||
chart->name = strdup( name );
|
||||
chart_reset( chart );
|
||||
return chart;
|
||||
}
|
||||
void chart_set_delete( void *ptr )
|
||||
{
|
||||
Set_Chart *chart = (Set_Chart*)ptr;
|
||||
if ( !chart ) return;
|
||||
if ( chart->name ) free( chart->name );
|
||||
free( chart );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Read entries of a chart from file position.
|
||||
====================================================================
|
||||
*/
|
||||
void chart_read_entries( FILE *file, char *file_name, Set_Chart *chart )
|
||||
{
|
||||
char buffer[128];
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < CHART_ENTRY_COUNT; i++ ) {
|
||||
if ( feof( file ) ) {
|
||||
fprintf( stderr, "Unexpected EOF in '%s' in entry %i... reading of highscore aborted.\n",
|
||||
file_name, i );
|
||||
break;
|
||||
}
|
||||
fgets( buffer, 128, file ); buffer[strlen(buffer) - 1] = 0; /* remove newline */
|
||||
strcpy( chart->entries[i].name, buffer );
|
||||
fgets( buffer, 128, file ); buffer[strlen(buffer) - 1] = 0; /* remove newline */
|
||||
chart->entries[i].level = atoi( buffer );
|
||||
fgets( buffer, 128, file ); buffer[strlen(buffer) - 1] = 0; /* remove newline */
|
||||
chart->entries[i].score = atoi( buffer );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Load all highscores from path. If not found create chart with
|
||||
one set 'Original'.
|
||||
ReturnValue: True if successful
|
||||
====================================================================
|
||||
*/
|
||||
int chart_load_from_path( char *path )
|
||||
{
|
||||
FILE *file = 0;
|
||||
char file_name[512];
|
||||
char setname[1024];
|
||||
char aux[4];
|
||||
Set_Chart *chart = 0;
|
||||
/* full file name */
|
||||
sprintf( file_name, "%s/%s", path, CHART_FILE_NAME );
|
||||
/* clear chart list */
|
||||
list_clear( charts );
|
||||
|
||||
if (!strcmp(path, HI_DIR) && hi_dir_chart_file) {
|
||||
file = hi_dir_chart_file;
|
||||
rewind(hi_dir_chart_file);
|
||||
}
|
||||
else {
|
||||
/* open file */
|
||||
file = fopen( file_name, "rb" );
|
||||
}
|
||||
|
||||
if ( file ) {
|
||||
/* test if it's new format or old one. */
|
||||
fread( aux, sizeof( char ), 3, file ); aux[3] = 0;
|
||||
fseek( file, 0, SEEK_SET );
|
||||
if ( strequal( ">>>", aux ) ) {
|
||||
/* new format: load all set charts */
|
||||
while( !feof( file ) ) {
|
||||
/* check if next sign is an '>' else skip reading */
|
||||
aux[0] = 0;
|
||||
fread( aux, sizeof( char ), 1, file );
|
||||
fseek( file, -1, SEEK_CUR );
|
||||
if ( aux[0] != '>' ) break;
|
||||
chart = calloc( 1, sizeof( Set_Chart ) );
|
||||
/* get name: >>>name */
|
||||
fscanf( file, ">>>%1023s\n", setname );
|
||||
chart->name = strdup( setname );
|
||||
/* entries */
|
||||
chart_read_entries( file, file_name, chart );
|
||||
/* add */
|
||||
list_add( charts, chart );
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* old format: load single chart as 'Original' */
|
||||
fprintf( stderr, _("Converting highscore chart as format changed.\n") );
|
||||
chart = chart_set_create( "LBreakout2" );
|
||||
chart_read_entries( file, file_name, chart );
|
||||
list_add( charts, chart );
|
||||
}
|
||||
if (file != hi_dir_chart_file)
|
||||
fclose( file );
|
||||
}
|
||||
else {
|
||||
fprintf( stderr, _("Highscore chart doesn't exist in '%s'... creating new one.\n"), path );
|
||||
chart = chart_set_create( "LBreakout2" );
|
||||
list_add( charts, chart );
|
||||
}
|
||||
if (file != hi_dir_chart_file) {
|
||||
/* test if writing is allowed without changing actual contents */
|
||||
if ( ( file = fopen( file_name, "a" ) ) == 0 ) {
|
||||
fprintf( stderr, _("Write permission for '%s' denied.\n"), file_name );
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
fclose( file );
|
||||
}
|
||||
strcpy( chart_path, path );
|
||||
chart_loaded = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Publics
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Load highscore. If it doesn't exist try to create it in HI_DIR if
|
||||
this fails fall back to ~/.lbreakout and create highscore there.
|
||||
====================================================================
|
||||
*/
|
||||
void chart_load()
|
||||
{
|
||||
chart_loaded = 0;
|
||||
/* create list */
|
||||
if ( charts ) list_delete( charts ); charts = 0;
|
||||
charts = list_create( LIST_AUTO_DELETE, chart_set_delete );
|
||||
/* load highscore */
|
||||
if ( !chart_load_from_path( HI_DIR ) ) {
|
||||
fprintf( stderr, _("Unable to access highscore chart in '%s'.\n"), HI_DIR );
|
||||
fprintf( stderr, _("Trying to use config directory '%s'.\n"), config.dir_name );
|
||||
if ( !chart_load_from_path( config.dir_name ) ) {
|
||||
fprintf( stderr, _("Unable to access highscore chart in config directory... won't be "
|
||||
"able to save any results. Sorry.\n") );
|
||||
return;
|
||||
}
|
||||
}
|
||||
printf( _("Saving highscore chart in: %s\n"), chart_path );
|
||||
/* compute size and position stuff of highscore */
|
||||
char *cheader = _("Name Level Score");
|
||||
chart_pos.w = stk_font_string_width( ccfont, cheader );
|
||||
chart_pos.h = ccfont->height + chart_gap + /* title + gap */
|
||||
cfont->height * CHART_ENTRY_COUNT + /* entries */
|
||||
chart_gap + /*gap between caption and entries */
|
||||
ccfont->height; /* caption size */
|
||||
chart_level_offset = stk_font_string_width( ccfont, _("name.-----") ) + stk_font_string_width( ccfont, _("Level") ) / 2; /* level offset centered */
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Delete resources
|
||||
====================================================================
|
||||
*/
|
||||
void chart_delete()
|
||||
{
|
||||
if ( charts ) list_delete( charts ); charts = 0;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Save chart in directory it was loaded from.
|
||||
====================================================================
|
||||
*/
|
||||
void chart_save()
|
||||
{
|
||||
char file_name[512];
|
||||
int i;
|
||||
Set_Chart *chart = 0;
|
||||
FILE *file = 0;
|
||||
if ( !chart_loaded ) return;
|
||||
/* full file name */
|
||||
sprintf( file_name, "%s/%s", chart_path, CHART_FILE_NAME );
|
||||
|
||||
if (!strcmp(chart_path, HI_DIR) && hi_dir_chart_file) {
|
||||
file = hi_dir_chart_file;
|
||||
rewind(hi_dir_chart_file);
|
||||
}
|
||||
else {
|
||||
/* open file */
|
||||
file = fopen( file_name, "w" );
|
||||
}
|
||||
|
||||
if ( !file ) {
|
||||
fprintf( stderr, _("??? Highscore chart loaded properly but cannot save? (%s)\n"),file_name );
|
||||
return;
|
||||
}
|
||||
/* save all charts */
|
||||
list_reset( charts );
|
||||
while ( ( chart = list_next( charts ) ) != 0 ) {
|
||||
fprintf( file, ">>>%s\n", chart->name );
|
||||
for ( i = 0; i < CHART_ENTRY_COUNT; i++ )
|
||||
fprintf( file, "%s\n%i\n%i\n", chart->entries[i].name, chart->entries[i].level, chart->entries[i].score );
|
||||
}
|
||||
|
||||
if (file != hi_dir_chart_file)
|
||||
fclose( file );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Check if this player entered the highscore chart and update it.
|
||||
====================================================================
|
||||
*/
|
||||
void chart_add( Set_Chart *chart, char *name, int level, int score )
|
||||
{
|
||||
/* add new entry at blind end of chart */
|
||||
strcpy( chart->entries[CHART_ENTRY_COUNT].name, name );
|
||||
chart->entries[CHART_ENTRY_COUNT].level = level;
|
||||
chart->entries[CHART_ENTRY_COUNT].score = score;
|
||||
chart->entries[CHART_ENTRY_COUNT].new_entry = 1;
|
||||
/* sort algorithm is stable so first sort levels then score */
|
||||
chart_sort( chart, SORT_BY_LEVEL );
|
||||
chart_sort( chart, SORT_BY_SCORE );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Sort chart with stable algorithm (bubble sort's ok) by wanted
|
||||
value.
|
||||
====================================================================
|
||||
*/
|
||||
void chart_swap( Chart_Entry *entry1, Chart_Entry *entry2 )
|
||||
{
|
||||
Chart_Entry dummy;
|
||||
dummy = *entry1;
|
||||
*entry1 = *entry2;
|
||||
*entry2 = dummy;
|
||||
}
|
||||
void chart_sort( Set_Chart *chart, int type )
|
||||
{
|
||||
int j;
|
||||
int changed = 0;
|
||||
/* use entry dummy as well so count is CHART_ENTRY_COUNT + 1 */
|
||||
do {
|
||||
changed = 0;
|
||||
for ( j = 0; j < CHART_ENTRY_COUNT; j++ )
|
||||
switch ( type ) {
|
||||
case SORT_BY_LEVEL:
|
||||
if ( chart->entries[j].level < chart->entries[j + 1].level ) {
|
||||
chart_swap( &chart->entries[j], &chart->entries[j + 1] );
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case SORT_BY_SCORE:
|
||||
if ( chart->entries[j].score < chart->entries[j + 1].score ) {
|
||||
chart_swap( &chart->entries[j], &chart->entries[j + 1] );
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} while ( changed );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Draw highscores centered in regio x,y,w,h
|
||||
====================================================================
|
||||
*/
|
||||
void chart_show( Set_Chart *chart, int x, int y, int w, int h )
|
||||
{
|
||||
char number_buffer[24];
|
||||
int entry_offset; /* y offset of entries */
|
||||
StkFont *font;
|
||||
int i;
|
||||
/* adjust x,y so it's centered */
|
||||
chart_pos.x = x + ( w - chart_pos.w ) / 2;
|
||||
chart_pos.y = y + ( h - chart_pos.h ) / 2;
|
||||
/* title = name of levelset */
|
||||
ccfont->align = STK_FONT_ALIGN_CENTER_X | STK_FONT_ALIGN_TOP;
|
||||
stk_font_write( ccfont, stk_display,
|
||||
chart_pos.x + ( chart_pos.w >> 1 ), chart_pos.y, -1,
|
||||
chart->name );
|
||||
/* caption */
|
||||
ccfont->align = STK_FONT_ALIGN_LEFT | STK_FONT_ALIGN_TOP;
|
||||
char *cheader = _("Name Level Score");
|
||||
stk_font_write( ccfont, stk_display,
|
||||
chart_pos.x, chart_pos.y + ccfont->height + chart_gap, -1,
|
||||
cheader );
|
||||
/* get entry offset */
|
||||
entry_offset = ( ccfont->height + chart_gap ) * 2 + chart_pos.y;
|
||||
/* entries */
|
||||
for ( i = 0; i < CHART_ENTRY_COUNT; i++ ) {
|
||||
font = cfont;
|
||||
if ( chart->entries[i].new_entry ) font = chfont;
|
||||
/* name */
|
||||
font->align = STK_FONT_ALIGN_LEFT | STK_FONT_ALIGN_TOP;
|
||||
stk_font_write( font, stk_display,
|
||||
chart_pos.x, entry_offset, -1, chart->entries[i].name );
|
||||
/* level */
|
||||
font->align = STK_FONT_ALIGN_CENTER_X | STK_FONT_ALIGN_TOP;
|
||||
sprintf( number_buffer, "%i", chart->entries[i].level );
|
||||
stk_font_write( font, stk_display,
|
||||
chart_pos.x + chart_level_offset, entry_offset, -1, number_buffer );
|
||||
/* score */
|
||||
font->align = STK_FONT_ALIGN_RIGHT | STK_FONT_ALIGN_TOP;
|
||||
sprintf( number_buffer, "%i", chart->entries[i].score );
|
||||
stk_font_write( font, stk_display,
|
||||
chart_pos.x + chart_pos.w, entry_offset, -1, number_buffer );
|
||||
/* change offset */
|
||||
entry_offset += font->height;
|
||||
}
|
||||
stk_display_store_rect( &chart_pos );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Clear all new_entry flags (done before new players are added
|
||||
to chart when game over).
|
||||
====================================================================
|
||||
*/
|
||||
void chart_clear_new_entries()
|
||||
{
|
||||
int i;
|
||||
Set_Chart *chart;
|
||||
list_reset( charts );
|
||||
while ( ( chart = list_next( charts ) ) != 0 ) {
|
||||
chart->entries[CHART_ENTRY_COUNT].score = chart->entries[CHART_ENTRY_COUNT].level = 0;
|
||||
for ( i = 0; i < CHART_ENTRY_COUNT + 1; i++ )
|
||||
chart->entries[i].new_entry = 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Query set chart by this name or if not found create a new one
|
||||
by this name.
|
||||
====================================================================
|
||||
*/
|
||||
Set_Chart* chart_set_query( char *name )
|
||||
{
|
||||
Set_Chart *chart = 0;
|
||||
list_reset( charts );
|
||||
while ( ( chart = list_next( charts ) ) != 0 )
|
||||
if ( strequal( name, chart->name ) )
|
||||
return chart;
|
||||
/* not found so create it */
|
||||
fprintf( stderr, _("First chart query for '%s'. Creating this chart.\n"), name );
|
||||
chart = chart_set_create( name );
|
||||
list_add( charts, chart );
|
||||
return chart;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Query chart by id. If id is invalid return 0.
|
||||
====================================================================
|
||||
*/
|
||||
Set_Chart* chart_set_query_id( int id )
|
||||
{
|
||||
if ( id >= charts->count ) {
|
||||
fprintf( stderr, _("Chart index '%i' is out of range!\n"), id );
|
||||
return 0;
|
||||
}
|
||||
return (Set_Chart*)list_get( charts, id );
|
||||
}
|
||||
98
project/jni/application/lbreakout2/client/chart.h
Normal file
@@ -0,0 +1,98 @@
|
||||
/***************************************************************************
|
||||
chart.h - description
|
||||
-------------------
|
||||
begin : Mon Sep 24 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Highscore chart entry
|
||||
====================================================================
|
||||
*/
|
||||
typedef struct {
|
||||
char name[32];
|
||||
int level;
|
||||
int score;
|
||||
int new_entry; /* newly entered the highscore */
|
||||
} Chart_Entry;
|
||||
/*
|
||||
====================================================================
|
||||
Levelset highscore chart.
|
||||
====================================================================
|
||||
*/
|
||||
enum { CHART_ENTRY_COUNT = 10 };
|
||||
typedef struct {
|
||||
Chart_Entry entries[CHART_ENTRY_COUNT + 1]; /* last entry is space holder for new entry */
|
||||
char *name;
|
||||
} Set_Chart;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Load highscore. If it doesn't exist try to create it in HI_DIR if
|
||||
this fails fall back to ~/.lbreakout and create highscore there.
|
||||
====================================================================
|
||||
*/
|
||||
void chart_load();
|
||||
/*
|
||||
====================================================================
|
||||
Delete resources
|
||||
====================================================================
|
||||
*/
|
||||
void chart_delete();
|
||||
/*
|
||||
====================================================================
|
||||
Save chart in directory it was loaded from.
|
||||
====================================================================
|
||||
*/
|
||||
void chart_save();
|
||||
/*
|
||||
====================================================================
|
||||
Check if this player entered the highscore chart and update it.
|
||||
====================================================================
|
||||
*/
|
||||
void chart_add( Set_Chart *chart, char *name, int level, int score );
|
||||
/*
|
||||
====================================================================
|
||||
Sort chart with stable algorithm (bubble sort's ok) by wanted
|
||||
value.
|
||||
====================================================================
|
||||
*/
|
||||
enum { SORT_BY_LEVEL = 0, SORT_BY_SCORE };
|
||||
void chart_sort( Set_Chart *chart, int type );
|
||||
/*
|
||||
====================================================================
|
||||
Draw highscores centered in regio x,y,w,h
|
||||
====================================================================
|
||||
*/
|
||||
void chart_show( Set_Chart *chart, int x, int y, int w, int h );
|
||||
/*
|
||||
====================================================================
|
||||
Clear all new_entry flags (done before new players are added
|
||||
to chart when game over).
|
||||
====================================================================
|
||||
*/
|
||||
void chart_clear_new_entries();
|
||||
/*
|
||||
====================================================================
|
||||
Query set chart by this name or if not found create a new one
|
||||
by this name.
|
||||
====================================================================
|
||||
*/
|
||||
Set_Chart* chart_set_query( char *name );
|
||||
/*
|
||||
====================================================================
|
||||
Query chart by id. If id is invalid return 0.
|
||||
====================================================================
|
||||
*/
|
||||
Set_Chart* chart_set_query_id( int id );
|
||||
510
project/jni/application/lbreakout2/client/client.c
Normal file
@@ -0,0 +1,510 @@
|
||||
/***************************************************************************
|
||||
client.c - description
|
||||
-------------------
|
||||
begin : Sun Oct 20 12:02:57 CEST 2002
|
||||
copyright : (C) 2002 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "config.h"
|
||||
#include "event.h"
|
||||
#include "../gui/gui.h"
|
||||
#include "client_data.h"
|
||||
#include "client_handlers.h"
|
||||
#include "client.h"
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Externals
|
||||
====================================================================
|
||||
*/
|
||||
extern SDL_Surface *cr_wallpaper;
|
||||
extern Config config;
|
||||
extern SDL_Surface **bkgnds;
|
||||
extern StkFont *chat_font_error;
|
||||
extern StkFont *chat_font_name;
|
||||
extern StkFont *chat_font_normal;
|
||||
extern char chatter[CHAT_LINE_COUNT][CHAT_LINE_WIDTH];
|
||||
extern char pause_chatter[CHAT_LINE_COUNT][CHAT_LINE_WIDTH];
|
||||
extern List *client_levelsets;
|
||||
extern List *client_users;
|
||||
extern List *client_games;
|
||||
extern List *client_channels;
|
||||
extern void client_recv_packet( GuiWidget *widget, GuiEvent *event );
|
||||
extern int client_id;
|
||||
extern int client_topic_count;
|
||||
extern char *client_topics[];
|
||||
extern Text *client_help_text;
|
||||
extern NetSocket client;
|
||||
extern int client_is_connected;
|
||||
extern int client_state;
|
||||
extern int client_recv_limit;
|
||||
extern int (*sys_printf)(const char *format, ...);
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Client GUI
|
||||
====================================================================
|
||||
*/
|
||||
GuiWidget *dlg_connect = 0;
|
||||
GuiWidget *dlg_info = 0;
|
||||
GuiWidget *dlg_confirm = 0;
|
||||
GuiWidget *dlg_chatroom = 0;
|
||||
GuiWidget *dlg_channels = 0;
|
||||
GuiWidget *dlg_stats = 0;
|
||||
GuiWidget *dlg_pauseroom = 0;
|
||||
GuiWidget *dlg_help = 0;
|
||||
/* important children */
|
||||
GuiWidget *label_channel;
|
||||
GuiWidget *label_info;
|
||||
GuiWidget *label_confirm;
|
||||
GuiWidget *label_winner;
|
||||
GuiWidget *label_stats;
|
||||
GuiWidget *edit_server;
|
||||
GuiWidget *edit_username;
|
||||
GuiWidget *list_chatter;
|
||||
GuiWidget *edit_chatter;
|
||||
GuiWidget *list_levels;
|
||||
GuiWidget *list_users;
|
||||
GuiWidget *list_channels;
|
||||
GuiWidget *edit_channel;
|
||||
GuiWidget *list_pausechatter;
|
||||
GuiWidget *edit_pausechatter;
|
||||
GuiWidget *list_topic;
|
||||
GuiWidget *list_help;
|
||||
|
||||
#define HINT_CONNECT _("Specify the game server as address:port where "\
|
||||
"the address can be a name or a dotted IP.#If the connection fails have a look "\
|
||||
"at the messages in the chat window to see the reason.")
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
LOCALS
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
#ifdef NETWORK_ENABLED
|
||||
/*
|
||||
====================================================================
|
||||
Render help topic.
|
||||
====================================================================
|
||||
*/
|
||||
static int client_render_help(
|
||||
int x, int y, SDL_Surface *buffer )
|
||||
{
|
||||
if ( !client_help_text ) return 0;
|
||||
if ( y >= client_help_text->count ) return 0;
|
||||
chat_font_normal->align = STK_FONT_ALIGN_LEFT;
|
||||
stk_font_write( chat_font_normal,
|
||||
buffer, 2,0, STK_OPAQUE,
|
||||
client_help_text->lines[y] );
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Render help topic.
|
||||
====================================================================
|
||||
*/
|
||||
static int client_render_topic(
|
||||
int x, int y, SDL_Surface *buffer )
|
||||
{
|
||||
if ( y >= client_topic_count ) return 0;
|
||||
chat_font_normal->align = STK_FONT_ALIGN_LEFT;
|
||||
stk_font_write( chat_font_normal,
|
||||
buffer, 2,0, STK_OPAQUE,
|
||||
client_topics[y] );
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Render chat line.
|
||||
====================================================================
|
||||
*/
|
||||
static int client_render_chatter(
|
||||
int x, int y, SDL_Surface *buffer )
|
||||
{
|
||||
char *ptr = 0, *name_end = 0;
|
||||
StkFont *font = 0;
|
||||
if ( y < 0 || y >= CHAT_LINE_COUNT ) return 0;
|
||||
if ( chatter[y][0] == '!' ) {
|
||||
font = chat_font_error;
|
||||
ptr = chatter[y] + 1;
|
||||
}
|
||||
else {
|
||||
ptr = chatter[y];
|
||||
font = chat_font_normal;
|
||||
}
|
||||
font->align = STK_FONT_ALIGN_LEFT;
|
||||
stk_font_write( font, buffer, 2,0, STK_OPAQUE, ptr );
|
||||
if ( chatter[y][0] == '<' )
|
||||
if ( ( name_end = strchr( chatter[y], '>' ) ) ) {
|
||||
name_end[1] = 0;
|
||||
stk_font_write(
|
||||
chat_font_name, buffer, 2,0, STK_OPAQUE, chatter[y] );
|
||||
name_end[1] = ' ';
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
static int client_render_pause_chatter(
|
||||
int x, int y, SDL_Surface *buffer )
|
||||
{
|
||||
char *ptr = 0, *name_end = 0;
|
||||
StkFont *font = 0;
|
||||
if ( y < 0 || y >= CHAT_LINE_COUNT ) return 0;
|
||||
if ( pause_chatter[y][0] == '!' ) {
|
||||
font = chat_font_error;
|
||||
ptr = pause_chatter[y] + 1;
|
||||
}
|
||||
else {
|
||||
ptr = pause_chatter[y];
|
||||
font = chat_font_normal;
|
||||
}
|
||||
font->align = STK_FONT_ALIGN_LEFT;
|
||||
stk_font_write( font, buffer, 2,0, STK_OPAQUE, ptr );
|
||||
if ( pause_chatter[y][0] == '<' )
|
||||
if ( ( name_end = strchr( pause_chatter[y], '>' ) ) ) {
|
||||
name_end[1] = 0;
|
||||
stk_font_write(
|
||||
chat_font_name, buffer, 2,0, STK_OPAQUE, pause_chatter[y] );
|
||||
name_end[1] = ' ';
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Render levelsets.
|
||||
====================================================================
|
||||
*/
|
||||
static int client_render_levelset(
|
||||
int x, int y, SDL_Surface *buffer )
|
||||
{
|
||||
if ( y >= client_levelsets->count ) return 0;
|
||||
chat_font_normal->align = STK_FONT_ALIGN_LEFT;
|
||||
stk_font_write( chat_font_normal,
|
||||
buffer, 2,0, STK_OPAQUE,
|
||||
list_get( client_levelsets, y ) );
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Render user
|
||||
====================================================================
|
||||
*/
|
||||
static int client_render_user(
|
||||
int x, int y, SDL_Surface *buffer )
|
||||
{
|
||||
ClientUser *user;
|
||||
StkFont *font;
|
||||
if ( y >= client_users->count ) return 0;
|
||||
if ( ( user = list_get( client_users, y ) ) == 0 ) return 0;
|
||||
if ( user->id == client_id )
|
||||
font = chat_font_name;
|
||||
else
|
||||
font = chat_font_normal;
|
||||
font->align = STK_FONT_ALIGN_LEFT;
|
||||
stk_font_write( font, buffer, 2,0, STK_OPAQUE, user->name );
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Render channel.
|
||||
====================================================================
|
||||
*/
|
||||
static int client_render_channel(
|
||||
int x, int y, SDL_Surface *buffer )
|
||||
{
|
||||
if ( y >= client_channels->count ) return 0;
|
||||
chat_font_normal->align = STK_FONT_ALIGN_LEFT;
|
||||
stk_font_write( chat_font_normal,
|
||||
buffer, 2,0, STK_OPAQUE,
|
||||
(char*)list_get( client_channels, y ) );
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
PUBLICS
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Build the GUI and everything nescessary for the client chatroom.
|
||||
client_create() installs client_delete() as exit function.
|
||||
====================================================================
|
||||
*/
|
||||
void client_create( void )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
GuiWidget *parent;
|
||||
SDL_Surface *surface;
|
||||
/* users, channels, games */
|
||||
client_data_create();
|
||||
/* CONNECT WINDOW */
|
||||
dlg_connect = gui_box_create( 0, -1,-1, 400, 224, 0, 0 );
|
||||
parent = dlg_connect;
|
||||
/* hint label */
|
||||
gui_label_create(
|
||||
parent, 10, 10, parent->width - 20, 100, 1,
|
||||
0, 4, 0, STK_FONT_ALIGN_LEFT, HINT_CONNECT );
|
||||
/* server edit */
|
||||
gui_label_create(
|
||||
parent, 10, 120, 180, 20, 0,
|
||||
0, 2, 0, STK_FONT_ALIGN_RIGHT, _("Server:") );
|
||||
edit_server = gui_edit_create(
|
||||
parent, parent->width - 190, 120, 180, 20,
|
||||
0, 2, 0, 22, config.server );
|
||||
/* user name */
|
||||
gui_label_create(
|
||||
parent, 10, 150, 180, 20, 0,
|
||||
0, 2, 0, STK_FONT_ALIGN_RIGHT, _("Username:") );
|
||||
edit_username = gui_edit_create(
|
||||
parent, parent->width - 190, 150, 180, 20,
|
||||
0, 2, 0, 13, config.username );
|
||||
/* cancel, connect buttons */
|
||||
gui_button_create(
|
||||
parent, parent->width/2 -160, 180,
|
||||
140, 24, client_connect, 0,0,0,0,0, _("Connect") );
|
||||
gui_button_create(
|
||||
parent, parent->width/2 +20, 180,
|
||||
140, 24, client_close_connect_window, 0,0,0,0,0, _("Cancel") );
|
||||
/* INFO */
|
||||
dlg_info = gui_box_create( 0, -1,-1, 300, 114, 0, 1 );
|
||||
label_info = gui_label_create( dlg_info, -1,10,276,60,0, 0,
|
||||
2, 0, STK_FONT_ALIGN_LEFT, _("no info") );
|
||||
gui_button_create( dlg_info,
|
||||
-1, dlg_info->height - 34,
|
||||
100, 24, client_close_info, 0,0,0,0,0,
|
||||
_("Close") );
|
||||
/* CONFIRM */
|
||||
dlg_confirm = gui_box_create( 0, -1,-1, 300, 160, 0, 1 );
|
||||
label_confirm = gui_label_create( dlg_confirm, -1,10,276,110,0, 0,
|
||||
2, 0, STK_FONT_ALIGN_LEFT, _("no info") );
|
||||
gui_button_create( dlg_confirm,
|
||||
dlg_confirm->width/2-110, dlg_confirm->height - 30,
|
||||
100, 20, client_confirm, 0,0,0,0,0,
|
||||
_("OK") );
|
||||
gui_button_create( dlg_confirm,
|
||||
dlg_confirm->width/2+10, dlg_confirm->height - 30,
|
||||
100, 20, client_cancel, 0,0,0,0,0,
|
||||
_("Cancel") );
|
||||
/* CHATROOM */
|
||||
dlg_chatroom = gui_box_create( 0, 0,0,640,480,
|
||||
client_recv_packet, 1 );
|
||||
gui_widget_enable_event( dlg_chatroom, GUI_TIME_PASSED );
|
||||
surface = gui_widget_get_surface( dlg_chatroom );
|
||||
stk_surface_apply_wallpaper(
|
||||
surface, 0,0,-1,-1, cr_wallpaper, STK_OPAQUE );
|
||||
/* chat window */
|
||||
list_chatter = gui_list_create( dlg_chatroom, 0,0,470,444, NULL,
|
||||
0, 1, 14, 20, client_render_chatter, GUI_LIST_NO_SELECT );
|
||||
/* edit + send/whisper buttons */
|
||||
gui_button_create( dlg_chatroom, 330,448,60,24,
|
||||
client_send_chatter, 0,0,0,0,0, _("Send") );
|
||||
gui_button_create( dlg_chatroom, 390,448,80,24,
|
||||
client_whisper_chatter, 0,0,0,0,0, _("Whisper") );
|
||||
edit_chatter = gui_edit_create( dlg_chatroom, 0,448,327,24,
|
||||
client_send_chatter, 2, 0, MAX_CHATTER_SIZE, "" );
|
||||
gui_widget_enable_event( edit_chatter, GUI_KEY_RELEASED );
|
||||
gui_widget_set_default_key_widget( dlg_chatroom, edit_chatter );
|
||||
/* channel button + users in channel */
|
||||
label_channel = gui_label_create( dlg_chatroom,
|
||||
474,0,142,18,1, NULL,
|
||||
2, 0, STK_FONT_ALIGN_CENTER_X, _("MAIN") );
|
||||
gui_button_create( dlg_chatroom, 616,0,18,18,
|
||||
client_select_channel,
|
||||
0,0,0,0,0, _("C") );
|
||||
list_users = gui_list_create( dlg_chatroom,
|
||||
474,20,160,142, client_handle_user_list,
|
||||
1, 1, 14, 20, client_render_user,
|
||||
GUI_LIST_SINGLE_SELECT );
|
||||
/* levels label, levels, transfer button */
|
||||
gui_label_create( dlg_chatroom, 474,164,160,18,1, NULL,
|
||||
2, 0, STK_FONT_ALIGN_CENTER_X, _("Levelsets") );
|
||||
list_levels = gui_list_create( dlg_chatroom,
|
||||
474,184,160,120, client_handle_levelset_list,
|
||||
1, 1, 14, 20, client_render_levelset,
|
||||
GUI_LIST_SINGLE_SELECT );
|
||||
/* box with level settings */
|
||||
parent = gui_box_create( dlg_chatroom,
|
||||
474,306,160,94, NULL, 0 );
|
||||
gui_label_create( parent, 2,2,102,20,0, NULL,
|
||||
2, NULL, STK_FONT_ALIGN_LEFT, _("Difficulty:") );
|
||||
gui_spinbutton_create( parent, 102,2,50,20,
|
||||
client_update_difficulty,
|
||||
1, 3, 1, config.mp_diff+1 );
|
||||
gui_label_create( parent, 2,2+22,102,20,0, NULL,
|
||||
2, NULL, STK_FONT_ALIGN_LEFT, _("Rounds:") );
|
||||
gui_spinbutton_create( parent, 102,2+22,50,20,
|
||||
client_update_rounds,
|
||||
1, 3, 1, config.mp_rounds );
|
||||
gui_label_create( parent, 2,2+44,102,20,0, NULL,
|
||||
2, NULL, STK_FONT_ALIGN_LEFT, _("Frags:") );
|
||||
gui_spinbutton_create( parent, 102,2+44,50,20,
|
||||
client_update_frags,
|
||||
5, 30, 5, config.mp_frags );
|
||||
gui_label_create( parent, 2,2+66,102,20,0, NULL,
|
||||
2, NULL, STK_FONT_ALIGN_LEFT, _("Balls:") );
|
||||
gui_spinbutton_create( parent, 102,2+66,50,20,
|
||||
client_update_balls,
|
||||
1, 6, 1, config.mp_balls );
|
||||
/* challenge & disconnect */
|
||||
gui_button_create( dlg_chatroom,
|
||||
474,402,160,20, client_challenge,
|
||||
0,0,0,0,0, _("Challenge") );
|
||||
gui_button_create( dlg_chatroom,
|
||||
474,dlg_chatroom->height-44,160,20,
|
||||
client_open_connect_window,
|
||||
0,0,0,0,0, _("Connect") );
|
||||
gui_button_create( dlg_chatroom,
|
||||
534,dlg_chatroom->height-20,100,20,
|
||||
client_quit,
|
||||
0,0,0,0,0, _("Quit") );
|
||||
gui_button_create( dlg_chatroom,
|
||||
474,dlg_chatroom->height-20,50,20,
|
||||
client_popup_help,
|
||||
0,0,0,0,0, _("Help") );
|
||||
/* CHANNELS selector */
|
||||
dlg_channels = gui_box_create( 0, -1,-1, 200, 244, NULL, 1 );
|
||||
list_channels = gui_list_create( dlg_channels, -1,10, 176,150,
|
||||
client_handle_channel_list, 0, 1, 14, 20,
|
||||
client_render_channel, GUI_LIST_SINGLE_SELECT );
|
||||
gui_label_create( dlg_channels, -1,160, 176,20,0, NULL,
|
||||
2, 0, STK_FONT_ALIGN_LEFT, _("Channel:") );
|
||||
edit_channel = gui_edit_create( dlg_channels,
|
||||
-1,180, 176,20, NULL,
|
||||
2, 0, 12, "" );
|
||||
gui_widget_set_default_key_widget( dlg_channels, edit_channel );
|
||||
gui_edit_set_filter( edit_channel, GUI_EDIT_ALPHANUMERICAL2 );
|
||||
gui_button_create( dlg_channels,
|
||||
dlg_channels->width/2-90,210,80,20,
|
||||
client_enter_channel, 0,0,0,0,0, _("Enter") );
|
||||
gui_button_create( dlg_channels,
|
||||
dlg_channels->width/2+10,210,80,20,
|
||||
client_cancel_channel, 0,0,0,0,0, _("Cancel") );
|
||||
/* STATISTICS */
|
||||
dlg_stats = gui_box_create( 0, -1,-1,386,260, NULL, 1 );
|
||||
gui_label_create( dlg_stats, -1,10,360,20,1, NULL,
|
||||
0, 0, STK_FONT_ALIGN_CENTER_X, _("Statistics") );
|
||||
label_winner = gui_label_create( dlg_stats,
|
||||
-1,40,360,16,0, NULL,
|
||||
0, 0, STK_FONT_ALIGN_CENTER_X, "..." );
|
||||
label_stats = gui_label_create( dlg_stats,
|
||||
-1,62,360,150,0, NULL,
|
||||
0, 0, STK_FONT_ALIGN_LEFT, _("Awaiting stats...") );
|
||||
gui_button_create( dlg_stats, -1,220,160,20,
|
||||
client_close_stats, 0,0,0,0,0, _("Close") );
|
||||
/* PAUSEROOM */
|
||||
dlg_pauseroom = gui_box_create( 0, -1,-1,480,366, NULL, 1 );
|
||||
list_pausechatter = gui_list_create(
|
||||
dlg_pauseroom, 0,0,470,300, NULL,
|
||||
0, 1, 14, 20, client_render_pause_chatter,
|
||||
GUI_LIST_NO_SELECT );
|
||||
edit_pausechatter = gui_edit_create(
|
||||
dlg_pauseroom, 0,303,470,24,
|
||||
client_send_pausechatter, 2, 0, MAX_CHATTER_SIZE, "" );
|
||||
gui_widget_enable_event( edit_pausechatter, GUI_KEY_RELEASED );
|
||||
gui_widget_set_default_key_widget( dlg_pauseroom, edit_pausechatter );
|
||||
gui_button_create( dlg_pauseroom, -1,334,100,20,
|
||||
client_close_pauseroom, 0,0,0,0,0, _("Close") );
|
||||
/* HELP */
|
||||
dlg_help = gui_box_create( 0, -1,-1,548,358, NULL, 1 );
|
||||
gui_label_create( dlg_help, -1,10,470,20,1, NULL,
|
||||
0, 0, STK_FONT_ALIGN_CENTER_X, _("Network Quick Help") );
|
||||
list_topic = gui_list_create(
|
||||
dlg_help, 10,40,160,270, client_handle_topic_list,
|
||||
0, 1, 14, 20, client_render_topic,
|
||||
GUI_LIST_SINGLE_SELECT );
|
||||
list_help = gui_list_create(
|
||||
dlg_help, 180,40,350,300, NULL,
|
||||
0, 1, 14, 20, client_render_help,
|
||||
GUI_LIST_NO_SELECT );
|
||||
gui_button_create( dlg_help, 10,320,160,20, client_close_help,
|
||||
0,0,0,0,0, _("Close") );
|
||||
/* INITS */
|
||||
/* empty chatter */
|
||||
memset( chatter, 0, sizeof( chatter ) );
|
||||
/* update chatboxes */
|
||||
gui_list_update( list_chatter, CHAT_LINE_COUNT );
|
||||
gui_list_update( list_pausechatter, CHAT_LINE_COUNT );
|
||||
gui_list_goto( list_chatter, -1 );
|
||||
gui_list_goto( list_pausechatter, -1 );
|
||||
/* set help topics */
|
||||
gui_list_update( list_topic, client_topic_count );
|
||||
/* call client_delete at exit */
|
||||
atexit( client_delete );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Free memory allocated by client_create( void )
|
||||
====================================================================
|
||||
*/
|
||||
void client_delete( void )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
client_data_delete();
|
||||
printf( _("Client finalized\n") );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Run the connect dialogue & chatroom until user closes the connect
|
||||
dialogue.
|
||||
====================================================================
|
||||
*/
|
||||
#ifdef NETWORK_ENABLED
|
||||
static int client_printf_info( const char *format, ... )
|
||||
{
|
||||
va_list args;
|
||||
char string[MAX_CHATTER_SIZE];
|
||||
|
||||
va_start( args, format );
|
||||
vsnprintf( string, MAX_CHATTER_SIZE, format, args );
|
||||
va_end( args );
|
||||
|
||||
client_add_chatter( string, 1 );
|
||||
return strlen(string);
|
||||
}
|
||||
#endif
|
||||
void client_run( void )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
/* init UDP socket */
|
||||
sys_printf = client_printf_info;
|
||||
net_init( atoi(config.local_port) );
|
||||
sys_printf = printf;
|
||||
client_add_chatter( _("Press 'Connect' to connect to a game server."), 1 );
|
||||
|
||||
client_state = CLIENT_NONE;
|
||||
client_recv_limit = config.recv_limit;
|
||||
|
||||
gui_enable_event_filter();
|
||||
gui_widget_show( dlg_chatroom );
|
||||
stk_display_fade( STK_FADE_IN, STK_FADE_DEFAULT_TIME );
|
||||
gui_run( dlg_chatroom );
|
||||
stk_display_fade( STK_FADE_OUT, STK_FADE_DEFAULT_TIME );
|
||||
gui_disable_event_filter();
|
||||
|
||||
if ( client_is_connected ) {
|
||||
/* tell server we are off */
|
||||
client_disconnect();
|
||||
/* finalize UDP socket */
|
||||
socket_print_stats( &client );
|
||||
}
|
||||
net_shutdown();
|
||||
#endif
|
||||
}
|
||||
51
project/jni/application/lbreakout2/client/client.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/***************************************************************************
|
||||
client.h - description
|
||||
-------------------
|
||||
begin : Sun Oct 20 12:02:57 CEST 2002
|
||||
copyright : (C) 2002 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __CLIENT_H
|
||||
#define __CLIENT_H
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
This module provides the client GUI (connect dialogue & chatroom)
|
||||
which is run by calling client_run()
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Build the GUI and everything nescessary for the client chatroom.
|
||||
client_create() installs client_delete() as exit function.
|
||||
====================================================================
|
||||
*/
|
||||
void client_create( void );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Free memory allocated by client_create( void )
|
||||
====================================================================
|
||||
*/
|
||||
void client_delete( void );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Run the connect dialogue & chatroom until user closes the connect
|
||||
dialogue.
|
||||
====================================================================
|
||||
*/
|
||||
void client_run( void );
|
||||
|
||||
#endif
|
||||
357
project/jni/application/lbreakout2/client/client_data.c
Normal file
@@ -0,0 +1,357 @@
|
||||
/***************************************************************************
|
||||
client_data.c - description
|
||||
-------------------
|
||||
begin : Sat Oct 26 12:02:57 CEST 2002
|
||||
copyright : (C) 2002 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "client_data.h"
|
||||
#include "lbreakout.h"
|
||||
#include "../gui/gui.h"
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Externals
|
||||
====================================================================
|
||||
*/
|
||||
extern GuiWidget *list_levels;
|
||||
extern GuiWidget *list_chatter;
|
||||
extern GuiWidget *list_games;
|
||||
extern GuiWidget *list_users;
|
||||
extern GuiWidget *list_channels;
|
||||
extern GuiWidget *list_pausechatter;
|
||||
|
||||
List *client_users = 0; /* users of channel known to client */
|
||||
List *client_channels = 0; /* list of default channels (strings) */
|
||||
List *client_levelsets = 0; /* list of MP set names */
|
||||
|
||||
ClientUser *client_user = 0; /* selected user */
|
||||
char *client_levelset = 0; /* selected levelset */
|
||||
char chatter[CHAT_LINE_COUNT][CHAT_LINE_WIDTH];
|
||||
char pause_chatter[CHAT_LINE_COUNT][CHAT_LINE_WIDTH];
|
||||
extern NetSocket client;
|
||||
extern int client_is_connected;
|
||||
|
||||
#define MAX_CLIENT_TOPIC_COUNT 5
|
||||
int client_topic_count = 4;
|
||||
char *client_topics[MAX_CLIENT_TOPIC_COUNT];
|
||||
char *client_helps[MAX_CLIENT_TOPIC_COUNT];
|
||||
Text *client_help_text = 0;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
LOCALS
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
static void client_add_chatter_intern(
|
||||
GuiWidget *list, char *string, int info )
|
||||
{
|
||||
int i, j;
|
||||
static Text *text;
|
||||
/* build new text */
|
||||
text = create_text( string, 52 );
|
||||
/* move old lines up */
|
||||
for ( i = 0; i < CHAT_LINE_COUNT - text->count; i++ )
|
||||
strcpy( chatter[i], chatter[i + text->count] );
|
||||
/* copy new lines */
|
||||
for ( j = 0, i = CHAT_LINE_COUNT - text->count;
|
||||
i < CHAT_LINE_COUNT; i++, j++ ) {
|
||||
if ( info ) {
|
||||
strcpy( chatter[i] + 1, text->lines[j] );
|
||||
chatter[i][0] = '!';
|
||||
}
|
||||
else if ( j > 0 ) {
|
||||
strcpy( chatter[i] + 3 + info, text->lines[j] );
|
||||
chatter[i][0] = ' ';
|
||||
chatter[i][1] = ' ';
|
||||
chatter[i][2] = ' ';
|
||||
}
|
||||
else
|
||||
strcpy( chatter[i], text->lines[j] );
|
||||
}
|
||||
/* free memory */
|
||||
delete_text( text );
|
||||
/* update gui */
|
||||
gui_list_update( list, CHAT_LINE_COUNT );
|
||||
}
|
||||
static void client_add_pause_chatter_intern(
|
||||
GuiWidget *list, char *string, int info )
|
||||
{
|
||||
int i, j;
|
||||
static Text *text;
|
||||
/* build new text */
|
||||
text = create_text( string, 52 );
|
||||
/* move old lines up */
|
||||
for ( i = 0; i < CHAT_LINE_COUNT - text->count; i++ )
|
||||
strcpy( pause_chatter[i], pause_chatter[i + text->count] );
|
||||
/* copy new lines */
|
||||
for ( j = 0, i = CHAT_LINE_COUNT - text->count;
|
||||
i < CHAT_LINE_COUNT; i++, j++ ) {
|
||||
if ( info ) {
|
||||
strcpy( pause_chatter[i] + 1, text->lines[j] );
|
||||
pause_chatter[i][0] = '!';
|
||||
}
|
||||
else if ( j > 0 ) {
|
||||
strcpy( pause_chatter[i] + 3 + info, text->lines[j] );
|
||||
pause_chatter[i][0] = ' ';
|
||||
pause_chatter[i][1] = ' ';
|
||||
pause_chatter[i][2] = ' ';
|
||||
}
|
||||
else
|
||||
strcpy( pause_chatter[i], text->lines[j] );
|
||||
}
|
||||
/* free memory */
|
||||
delete_text( text );
|
||||
/* update gui */
|
||||
gui_list_update( list, CHAT_LINE_COUNT );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
PUBLICS
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/* transmit via client's socket if client_is_connected is True */
|
||||
void client_transmit( int type, int len, char *data )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
if ( client_is_connected )
|
||||
socket_transmit( &client, type, len, data );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Create/delete client's data structs.
|
||||
====================================================================
|
||||
*/
|
||||
void client_data_create( void )
|
||||
{
|
||||
client_channels = list_create( LIST_AUTO_DELETE, 0 /*just strings*/ );
|
||||
client_users = list_create( LIST_AUTO_DELETE, 0 );
|
||||
client_levelsets = list_create( LIST_AUTO_DELETE, 0 );
|
||||
/* help defined here for localization reasons */
|
||||
client_topics[0] = strdup(_("Challenges"));
|
||||
client_topics[1] = strdup(_("Channels"));
|
||||
client_topics[2] = strdup(_("Console Commands"));
|
||||
client_topics[3] = strdup(_("Game Rules"));
|
||||
client_topics[4] = strdup(_("Transfers"));
|
||||
client_helps[0] = strdup(_(
|
||||
"To challenge a user you first have to select him/her in the "
|
||||
"upper right list and the levelset you want to play "
|
||||
"from the list below. Then you adjust the game settings to your "
|
||||
"likings and hit the 'Challenge' button which will send your "
|
||||
"challenge to the other user who will either accept or decline. "
|
||||
"If (s)he accepts a direct connection will be established and the "
|
||||
"game will start.##"
|
||||
"DIFFICULTY: This influences ball speed, paddle size and score as for "
|
||||
"single player modus. (1 = Easy, 2 = Medium, 3 = Hard)##"
|
||||
"ROUNDS: This is the number of rounds played per level. Winning a "
|
||||
"round scores one point and the player with the most points wins "
|
||||
"the match.##"
|
||||
"FRAGS: In a pingpong level (no bricks) a player gains a frag everytime "
|
||||
"the opponent looses a ball. 'frag' is a bad name for this, should be "
|
||||
"pingpong winning score or something but 'frags' is simply shorter. "
|
||||
"The player who hits this limit first "
|
||||
"wins the round.#In levels with bricks this option is ignored "
|
||||
"and the level is over after all bricks were cleared.##"
|
||||
"BALLS: In a pingpong level (no bricks) each player may fire multiple "
|
||||
"balls up to this number. If a player looses a ball he may fire it again.#"
|
||||
"In normal levels (with bricks) this option is ignored and a gets a new ball "
|
||||
"after five seconds penalty time."));
|
||||
client_helps[1] = strdup(_(
|
||||
"To switch a channel hit the 'C' button above the user list. "
|
||||
"You can enter either an existing or a new channel. You "
|
||||
"can only talk to and challenge users in the same channel."));
|
||||
client_helps[2] = strdup(_(
|
||||
"User Console Commands:##"
|
||||
"/search <USER>#"
|
||||
"Search for a user in all channels.##"
|
||||
"/version#"
|
||||
"Display version of transmission protocol.##"
|
||||
"/info#"
|
||||
"Display current userlimit and frame rate.##"
|
||||
"Admin Console Commands:##"
|
||||
"/admin_says <MSG>#"
|
||||
"Broadcast a message to all chatting users.##"
|
||||
"/kick <USER>#"
|
||||
"Kick user by that name.##"
|
||||
"/addbot <NAME> <SPEED>#"
|
||||
"Add a paddle bot. The speed is defined in pixels per second. 800 to 1000 is a good value.##"
|
||||
"/delbot <NAME>#"
|
||||
"Delete paddle bot.##"
|
||||
"/set <VAR> <VALUE>#"
|
||||
"Set a variable to a new value:#"
|
||||
" userlimit: is the number of users that may login. If decreased with too many users online"
|
||||
" no one is kicked. This limit does not matter for admin login.#"
|
||||
" fps: is how many times a second the server calls up the communication and sends/receives"
|
||||
" packets. This should not be too high to prevent network flooding. 40 is a good value.#"
|
||||
" packetlimit: if not -1 this is the number of packets parsed in one communication step. -1"
|
||||
" which is the default means the queue is parsed until empty##"
|
||||
"/addset <NAME>#"
|
||||
"Load a new levelset that has been copied to the levels directory and make it available "
|
||||
"to the users.##"
|
||||
"/halt#"
|
||||
"Halt server after 5 seconds and inform all users, even the playing ones, about this."));
|
||||
client_helps[3] = /* xgettext:no-c-format */ strdup(_( "Basically you play the game as in single player mode but their "
|
||||
"are some special things you might find useful to know.##"
|
||||
"PINGPONG:#"
|
||||
"The point here is to play it fast and to use all of your balls. "
|
||||
"Use the right and left mouse button to fire the balls "
|
||||
"while moving the paddle. Your opponent "
|
||||
"will have trouble to reflect all balls if you do it right. "
|
||||
"If you are not sure wether you got balls left click anyway. "
|
||||
"Keep the button pressed for a while! The fire rate is restricted "
|
||||
"to one ball every 500 milliseconds.##"
|
||||
"NORMAL:#"
|
||||
"Your goal here is too gain more score than your opponent to win a "
|
||||
"round. Basically you do this by clearing bricks and collecting extras "
|
||||
"but there are some other ways as well:#"
|
||||
"1) To loose a ball means to loose 10% score. After five seconds penalty "
|
||||
"a new ball is created and you can continue playing.#"
|
||||
"2) Hitting your opponents paddle with the plasma weapon will give you "
|
||||
"1000 points while stealing him/her the same amount.#"
|
||||
"3) Bonus/penalty magnet will attract _all_ bonuses/penalties even those "
|
||||
"released by your opponent.##"
|
||||
"Note: If you pause the game by pressing 'p' a chat will pop up and you "
|
||||
"can talk to your opponent."));
|
||||
client_helps[4] = strdup(_(
|
||||
"You cannot offer someone your levelset unless this user "
|
||||
"wants to receive your set which requires the following steps:#"
|
||||
"1) select the user to whom you want to listen#"
|
||||
"2) press the 'L' button above the levelset list#"
|
||||
"3) wait for offer or cancel 'listening'#"
|
||||
"The receiver is now ready and the sender has to:#"
|
||||
"1) select the listening user#"
|
||||
"2) select the levelset (s)he wants to transfer#"
|
||||
"3) hit the 'T' button above the levelset list#"
|
||||
"If the receiver has this levelset already located in "
|
||||
"~/.lgames/lbreakout2-levels and it is up-to-date the transfer "
|
||||
"does not take place otherwise the receiver is asked to confirm "
|
||||
"and if (s)he does so the set is transferred to the home "
|
||||
"directory and directly available if intended for network. (starts with 'MP_')#"
|
||||
"NOTE: Only the challenger is required to have the levelset so you "
|
||||
"don not have to transfer sets to play with someone. However if your opponent "
|
||||
"likes your set and wants to challenge others with it both can engage into "
|
||||
"a transfer."));
|
||||
}
|
||||
void client_data_delete( void )
|
||||
{
|
||||
int i;
|
||||
if ( client_channels ) list_delete( client_channels );
|
||||
client_channels = 0;
|
||||
if ( client_users ) list_delete( client_users );
|
||||
client_users = 0;
|
||||
if ( client_levelsets ) list_delete( client_levelsets );
|
||||
client_levelsets = 0;
|
||||
if ( client_help_text ) delete_text( client_help_text );
|
||||
client_help_text = 0;
|
||||
for (i=0;i<MAX_CLIENT_TOPIC_COUNT;i++)
|
||||
{
|
||||
free(client_topics[i]);
|
||||
free(client_helps[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Clear all client data.
|
||||
====================================================================
|
||||
*/
|
||||
void client_data_clear( void )
|
||||
{
|
||||
list_clear( client_users );
|
||||
client_user = 0;
|
||||
list_clear( client_channels );
|
||||
list_clear( client_levelsets );
|
||||
client_levelset = 0;
|
||||
gui_list_update( list_users, 0 );
|
||||
gui_list_update( list_channels, 0 );
|
||||
gui_list_update( list_levels, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Add/remove/find users. Do not update the GUI.
|
||||
====================================================================
|
||||
*/
|
||||
void client_add_user( int id, char *name )
|
||||
{
|
||||
ClientUser *user;
|
||||
if ( client_find_user( id ) ) return;
|
||||
user = calloc( 1, sizeof( ClientUser ) );
|
||||
if ( user ) {
|
||||
strcpy_lt( user->name, name, 12 );
|
||||
user->id = id;
|
||||
list_add( client_users, user );
|
||||
}
|
||||
}
|
||||
void client_remove_user( int id )
|
||||
{
|
||||
ClientUser *entry = 0;
|
||||
if ( ( entry = client_find_user( id ) ) ) {
|
||||
if ( entry == client_user )
|
||||
client_user = 0;
|
||||
list_delete_item( client_users, entry );
|
||||
}
|
||||
}
|
||||
ClientUser* client_find_user( int id )
|
||||
{
|
||||
ClientUser *entry;
|
||||
list_reset( client_users );
|
||||
while ( ( entry = list_next( client_users ) ) )
|
||||
if ( entry->id == id )
|
||||
return entry;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Add chatter to chat window. If 'info' is true the text is
|
||||
displayed red and without indention.
|
||||
====================================================================
|
||||
*/
|
||||
void client_add_chatter( char *string, int info )
|
||||
{
|
||||
client_add_chatter_intern( list_chatter, string, info );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Add chatter to chat window. If 'info' is true the text is
|
||||
displayed red and without indention.
|
||||
====================================================================
|
||||
*/
|
||||
void client_printf_chatter( int info, char *format, ... )
|
||||
{
|
||||
va_list args;
|
||||
char string[MAX_CHATTER_SIZE];
|
||||
|
||||
va_start( args, format );
|
||||
vsnprintf( string, MAX_CHATTER_SIZE, format, args );
|
||||
va_end( args );
|
||||
|
||||
client_add_chatter_intern( list_chatter, string, info );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Add chatter to pause chat window. If 'info' is true the text is
|
||||
displayed red and without indention.
|
||||
====================================================================
|
||||
*/
|
||||
void client_add_pausechatter( char *string, int info )
|
||||
{
|
||||
client_add_pause_chatter_intern( list_pausechatter, string, info );
|
||||
}
|
||||
118
project/jni/application/lbreakout2/client/client_data.h
Normal file
@@ -0,0 +1,118 @@
|
||||
/***************************************************************************
|
||||
client_data.h - description
|
||||
-------------------
|
||||
begin : Sat Oct 26 12:02:57 CEST 2002
|
||||
copyright : (C) 2002 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __CLIENT_DATA_H
|
||||
#define __CLIENT_DATA_H
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Client states
|
||||
====================================================================
|
||||
*/
|
||||
enum {
|
||||
CLIENT_NONE = 0,
|
||||
|
||||
/* ingame stats lie in between */
|
||||
|
||||
CLIENT_INFO = 1000, /* not open to any challenges/transfers */
|
||||
CLIENT_AWAIT_ANSWER, /* wait for answer to a challenge */
|
||||
CLIENT_ANSWER, /* answer to a challenge */
|
||||
CLIENT_CONFIRM_TRANSFER, /* say yes or no to transfer */
|
||||
CLIENT_AWAIT_TRANSFER_CONFIRMATION, /* wait for answer on
|
||||
transfer offer */
|
||||
CLIENT_RECEIVE, /* receive level data */
|
||||
CLIENT_LISTEN, /* listen to user for a levelset */
|
||||
CLIENT_SELECT_CHANNEL, /* selecting a channel */
|
||||
CLIENT_STATS, /* looking at game stats */
|
||||
CLIENT_PLAY, /* playing game */
|
||||
CLIENT_HELP /* looking at help */
|
||||
};
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Chatter definitions.
|
||||
====================================================================
|
||||
*/
|
||||
enum {
|
||||
CHAT_LINE_COUNT = 200,
|
||||
CHAT_LINE_WIDTH = 64, /* includes \0 */
|
||||
MAX_CHATTER_SIZE = 100
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Client data structs
|
||||
====================================================================
|
||||
*/
|
||||
typedef struct {
|
||||
int id;
|
||||
char name[16];
|
||||
} ClientUser;
|
||||
|
||||
/* transmit via client's socket if client_is_connected is True */
|
||||
void client_transmit( int type, int len, char *data );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Create/delete client's data structs.
|
||||
====================================================================
|
||||
*/
|
||||
void client_data_create( void );
|
||||
void client_data_delete( void );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Clear all data structs
|
||||
====================================================================
|
||||
*/
|
||||
void client_data_clear( void );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Add/remove/find users/games/channels. Do not update the GUI.
|
||||
====================================================================
|
||||
*/
|
||||
void client_add_user( int id, char *name );
|
||||
void client_remove_user( int id );
|
||||
ClientUser* client_find_user( int id );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Add chatter to chat window. If 'info' is true the text is
|
||||
displayed red and without indention.
|
||||
====================================================================
|
||||
*/
|
||||
void client_add_chatter( char *string, int info );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Add chatter to chat window. If 'info' is true the text is
|
||||
displayed red and without indention.
|
||||
====================================================================
|
||||
*/
|
||||
void client_printf_chatter( int info, char *format, ... );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Add chatter to pause chat window. If 'info' is true the text is
|
||||
displayed red and without indention.
|
||||
====================================================================
|
||||
*/
|
||||
void client_add_pausechatter( char *string, int info );
|
||||
|
||||
#endif
|
||||
626
project/jni/application/lbreakout2/client/client_handlers.c
Normal file
@@ -0,0 +1,626 @@
|
||||
/***************************************************************************
|
||||
client_handlers.c - description
|
||||
-------------------
|
||||
begin : Sat Oct 26 12:02:57 CEST 2002
|
||||
copyright : (C) 2002 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "config.h"
|
||||
#include "../gui/gui.h"
|
||||
#include "client_data.h"
|
||||
#include "client_handlers.h"
|
||||
#include "comm.h"
|
||||
#include "game.h"
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Externals
|
||||
====================================================================
|
||||
*/
|
||||
extern Config config;
|
||||
extern List *client_users;
|
||||
extern List *client_games;
|
||||
extern List *client_channels;
|
||||
extern List *client_levelsets;
|
||||
extern char *client_levelset;
|
||||
extern ClientUser *client_user;
|
||||
extern char chatter[CHAT_LINE_COUNT][CHAT_LINE_WIDTH];
|
||||
extern GuiWidget *dlg_connect;
|
||||
extern GuiWidget *dlg_info;
|
||||
extern GuiWidget *dlg_confirm;
|
||||
extern GuiWidget *dlg_chatroom;
|
||||
extern GuiWidget *dlg_channels;
|
||||
extern GuiWidget *dlg_stats;
|
||||
extern GuiWidget *dlg_pauseroom;
|
||||
extern GuiWidget *dlg_help;
|
||||
extern GuiWidget *label_info;
|
||||
extern GuiWidget *label_stats;
|
||||
extern GuiWidget *label_winner;
|
||||
extern GuiWidget *label_channel;
|
||||
extern GuiWidget *edit_server;
|
||||
extern GuiWidget *edit_username;
|
||||
extern GuiWidget *list_chatter;
|
||||
extern GuiWidget *edit_chatter;
|
||||
extern GuiWidget *list_levels;
|
||||
extern GuiWidget *list_users;
|
||||
extern GuiWidget *list_channels;
|
||||
extern GuiWidget *edit_channel;
|
||||
extern GuiWidget *edit_pausechatter;
|
||||
extern GuiWidget *list_help;
|
||||
extern int levelset_version, levelset_update;
|
||||
extern List *levels;
|
||||
extern void client_popup_info( char *format, ... );
|
||||
extern void client_run_game( int challenger );
|
||||
extern int client_topic_count;
|
||||
extern char *client_helps[];
|
||||
extern Text *client_help_text;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Client
|
||||
====================================================================
|
||||
*/
|
||||
#ifdef NETWORK_ENABLED
|
||||
NetSocket client; /* client socket to the game server */
|
||||
#endif
|
||||
int client_is_connected; /* wether 'client' is a valid uplink */
|
||||
char client_error[128]; /* error message */
|
||||
int client_id; /* id assigned by server */
|
||||
char client_name[16]; /* our local username */
|
||||
int client_state = CLIENT_NONE;
|
||||
int client_recv_limit;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Challenge data
|
||||
====================================================================
|
||||
*/
|
||||
char *mp_diff_names[] = { "Easy", "Medium", "Hard" };
|
||||
char mp_levelset[16]; /* name of levelset we play */
|
||||
int mp_peer_id;
|
||||
char mp_peer_name[16]; /* remote player we want to play with */
|
||||
int mp_levelset_version;
|
||||
int mp_levelset_update; /* version of levelset */
|
||||
int mp_level_count; /* number of levels in set */
|
||||
int mp_diff, mp_rounds, mp_frags, mp_balls; /* game configuration */
|
||||
|
||||
extern void close_pause_chat( void );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Disconnect from current server if any.
|
||||
====================================================================
|
||||
*/
|
||||
void client_disconnect()
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
char buf[128];
|
||||
|
||||
if ( !client_is_connected ) return;
|
||||
|
||||
/* disconnect */
|
||||
socket_print_stats( &client );
|
||||
sprintf( buf, _("disconnected from %s"),
|
||||
net_addr_to_string(&client.remote_addr) );
|
||||
client_add_chatter( buf, 1 );
|
||||
buf[0] = MSG_DISCONNECT;
|
||||
client_transmit( CODE_BLUE, 1, buf );
|
||||
client_is_connected = 0;
|
||||
client_data_clear();
|
||||
gui_label_set_text( label_channel, "MAIN" );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Try to connect to a game server. Retry twice every second
|
||||
or quit then.
|
||||
====================================================================
|
||||
*/
|
||||
void client_connect( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
NetAddr newaddr;
|
||||
int attempt = 0;
|
||||
int type;
|
||||
char server[128];
|
||||
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
|
||||
/* close the connect window */
|
||||
gui_widget_hide( dlg_connect );
|
||||
|
||||
/* disconnect from current server */
|
||||
client_disconnect();
|
||||
|
||||
/* extract ip and port and build a new socket out of it */
|
||||
gui_edit_get_text( edit_server, server, 128, 0, -1 );
|
||||
snprintf( config.server, 64, "%s", server );
|
||||
if ( !net_build_addr( &newaddr, server, 0 ) ) {
|
||||
client_printf_chatter( 1, _("ERROR: address %s does not resolve"), config.server );
|
||||
return;
|
||||
}
|
||||
socket_init( &client, &newaddr );
|
||||
|
||||
/* get username */
|
||||
gui_edit_get_text( edit_username,
|
||||
config.username, 16, 0,-1 );
|
||||
|
||||
/* build connect message */
|
||||
msg_begin_writing( msgbuf, &msglen, 64 );
|
||||
msg_write_int8( MSG_CONNECT );
|
||||
msg_write_int8( PROTOCOL );
|
||||
msg_write_string( config.username );
|
||||
msg_write_string( _("unused") ); /* passwd */
|
||||
|
||||
while ( attempt < 3 ) {
|
||||
client_printf_chatter( 1, "%s: %s...",
|
||||
config.server,
|
||||
attempt==0?_("connecting"):_("retry") );
|
||||
stk_display_update( STK_UPDATE_ALL );
|
||||
net_transmit_connectionless( &newaddr, msglen, msgbuf );
|
||||
|
||||
SDL_Delay( 1000 );
|
||||
|
||||
while ( net_recv_packet() ) {
|
||||
if ( msg_is_connectionless() )
|
||||
msg_begin_connectionless_reading();
|
||||
else
|
||||
if ( !socket_process_header( &client ) )
|
||||
continue;
|
||||
|
||||
type = msg_read_int8();
|
||||
switch ( type ) {
|
||||
case MSG_LOGIN_OKAY:
|
||||
client_id = msg_read_int32();
|
||||
strcpy( client_name, msg_read_string() );
|
||||
client_printf_chatter( 1, _("%s: connected!"), config.server );
|
||||
client_is_connected = 1;
|
||||
return;
|
||||
case MSG_ERROR:
|
||||
client_printf_chatter( 1, _("ERROR: connection refused: %s"),
|
||||
msg_read_string() );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
attempt++;
|
||||
}
|
||||
client_add_chatter( _("ERROR: server does not respond"), 1 );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Open/close the connection window.
|
||||
====================================================================
|
||||
*/
|
||||
void client_open_connect_window(
|
||||
GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type == GUI_CLICKED )
|
||||
gui_widget_show( dlg_connect );
|
||||
}
|
||||
void client_close_connect_window(
|
||||
GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type == GUI_CLICKED )
|
||||
gui_widget_hide( dlg_connect );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Close chatroom and return to LBreakout's menu.
|
||||
====================================================================
|
||||
*/
|
||||
void client_quit( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type == GUI_CLICKED )
|
||||
gui_widget_hide( dlg_chatroom );
|
||||
/* disconnect is handled in client_run to cover
|
||||
* stk_quit_requests as well */
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Close the info window and clear state.
|
||||
====================================================================
|
||||
*/
|
||||
void client_close_info( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
if ( event->type == GUI_CLICKED ) {
|
||||
gui_widget_hide( dlg_info );
|
||||
msg_begin_writing( msgbuf, &msglen, 128 );
|
||||
switch ( client_state ) {
|
||||
case CLIENT_AWAIT_ANSWER:
|
||||
msg_write_int8( MSG_CANCEL_GAME );
|
||||
break;
|
||||
}
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
client_state = CLIENT_NONE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Send chatter this function is either called by the send button
|
||||
or by the edit.
|
||||
====================================================================
|
||||
*/
|
||||
void client_send_chatter(
|
||||
GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
char buf[MAX_CHATTER_SIZE + 1];
|
||||
if ( ( widget->type == GUI_EDIT &&
|
||||
event->type == GUI_KEY_RELEASED &&
|
||||
event->key.keysym == SDLK_RETURN ) ||
|
||||
( widget->type == GUI_BUTTON &&
|
||||
event->type == GUI_CLICKED ) ) {
|
||||
/* get message */
|
||||
gui_edit_get_text( edit_chatter,
|
||||
buf, MAX_CHATTER_SIZE + 1, 0,-1 );
|
||||
/* clear chat edit */
|
||||
gui_edit_set_text( edit_chatter, "" );
|
||||
|
||||
msg_begin_writing( msgbuf, &msglen, MAX_MSG_SIZE );
|
||||
/* a prepended '/' means this is a command */
|
||||
if ( buf[0] == '/' ) {
|
||||
msg_write_int8( MSG_COMMAND );
|
||||
msg_write_string( buf+1 );
|
||||
}
|
||||
else {
|
||||
msg_write_int8( MSG_CHATTER );
|
||||
msg_write_string( buf );
|
||||
}
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Whisper chatter if a user is selected.
|
||||
====================================================================
|
||||
*/
|
||||
void client_whisper_chatter(
|
||||
GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
char buf[MAX_CHATTER_SIZE + 1];
|
||||
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
|
||||
/* get message */
|
||||
gui_edit_get_text( edit_chatter,
|
||||
buf, MAX_CHATTER_SIZE + 1, 0,-1 );
|
||||
|
||||
/* send to selected user */
|
||||
if ( client_user ) {
|
||||
msg_begin_writing( msgbuf, &msglen, MAX_MSG_SIZE );
|
||||
msg_write_int8( MSG_WHISPER );
|
||||
msg_write_int32( client_user->id );
|
||||
msg_write_string( buf );
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
|
||||
/* clear chat edit */
|
||||
gui_edit_set_text( edit_chatter, "" );
|
||||
}
|
||||
else
|
||||
client_add_chatter( _("You must select a user to whisper!"), 1 );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Update selected peer and levelset.
|
||||
====================================================================
|
||||
*/
|
||||
void client_handle_user_list(
|
||||
GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type == GUI_ITEM_SELECTED )
|
||||
client_user = list_get( client_users, event->item.y );
|
||||
else
|
||||
if ( event->type == GUI_ITEM_UNSELECTED )
|
||||
client_user = 0;
|
||||
}
|
||||
void client_handle_levelset_list(
|
||||
GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type == GUI_ITEM_SELECTED )
|
||||
client_levelset = list_get( client_levelsets,
|
||||
event->item.y );
|
||||
else
|
||||
if ( event->type == GUI_ITEM_UNSELECTED )
|
||||
client_levelset = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Handle confirmation/cancelling of confirmation dialogue.
|
||||
====================================================================
|
||||
*/
|
||||
void client_confirm( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
gui_widget_hide( dlg_confirm );
|
||||
msg_begin_writing( msgbuf, &msglen, MAX_MSG_SIZE );
|
||||
switch ( client_state ) {
|
||||
case CLIENT_ANSWER:
|
||||
msg_write_int8( MSG_ACCEPT_CHALLENGE );
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
|
||||
/* play */
|
||||
gui_disable_event_filter();
|
||||
if ( client_game_init_network( mp_peer_name, mp_diff ) )
|
||||
client_game_run();
|
||||
client_game_finalize();
|
||||
gui_enable_event_filter();
|
||||
|
||||
gui_widget_draw( dlg_chatroom );
|
||||
stk_display_fade( STK_FADE_IN, STK_FADE_DEFAULT_TIME );
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
void client_cancel( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
gui_widget_hide( dlg_confirm );
|
||||
msg_begin_writing( msgbuf, &msglen, MAX_MSG_SIZE );
|
||||
switch ( client_state ) {
|
||||
case CLIENT_ANSWER:
|
||||
msg_write_int8( MSG_REJECT_CHALLENGE );
|
||||
break;
|
||||
}
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
client_state = CLIENT_NONE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Challenge selected user.
|
||||
====================================================================
|
||||
*/
|
||||
void client_challenge( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
|
||||
/* everything valid? */
|
||||
if ( client_user == 0 ) {
|
||||
client_popup_info( _("You must select a user for a challenge.") );
|
||||
return;
|
||||
}
|
||||
if ( client_levelset == 0 ) {
|
||||
client_popup_info( _("You must select a levelset for a challenge.") );
|
||||
return;
|
||||
}
|
||||
if ( client_user->id == client_id ) {
|
||||
client_popup_info( _("You can't challenge yourself.") );
|
||||
return;
|
||||
}
|
||||
|
||||
strcpy( mp_peer_name, client_user->name );
|
||||
mp_peer_id = client_user->id;
|
||||
strcpy( mp_levelset, client_levelset );
|
||||
mp_diff = config.mp_diff;
|
||||
mp_rounds = config.mp_rounds;
|
||||
mp_balls = config.mp_balls;
|
||||
mp_frags = config.mp_frags;
|
||||
|
||||
/* challenger, challenged, levelset, diff, rounds, frags, balls */
|
||||
msg_begin_writing( msgbuf, &msglen, MAX_MSG_SIZE );
|
||||
msg_write_int8( MSG_OPEN_GAME );
|
||||
msg_write_int32( mp_peer_id );
|
||||
msg_write_string( mp_levelset );
|
||||
msg_write_int8( mp_diff );
|
||||
msg_write_int8( mp_rounds );
|
||||
msg_write_int8( mp_frags );
|
||||
msg_write_int8( mp_balls );
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
|
||||
client_popup_info( _("You have challenged %s. Let's see what (s)he says..."), mp_peer_name );
|
||||
client_state = CLIENT_AWAIT_ANSWER;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Update multiplayer network configuration.
|
||||
====================================================================
|
||||
*/
|
||||
void client_update_difficulty( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CHANGED ) return;
|
||||
gui_spinbutton_get_value( widget, &config.mp_diff );
|
||||
config.mp_diff--;
|
||||
}
|
||||
void client_update_rounds( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CHANGED ) return;
|
||||
gui_spinbutton_get_value( widget, &config.mp_rounds );
|
||||
}
|
||||
void client_update_frags( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CHANGED ) return;
|
||||
gui_spinbutton_get_value( widget, &config.mp_frags );
|
||||
}
|
||||
void client_update_balls( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CHANGED ) return;
|
||||
gui_spinbutton_get_value( widget, &config.mp_balls );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Open channel selector
|
||||
====================================================================
|
||||
*/
|
||||
void client_select_channel( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
/* select first channel (we always have MAIN) */
|
||||
gui_list_update( list_channels, client_channels->count );
|
||||
if ( client_channels->count > 0 ) {
|
||||
gui_edit_set_text( edit_channel, list_first( client_channels ) );
|
||||
gui_list_select( list_channels, 0,0, 1 );
|
||||
}
|
||||
gui_widget_show( dlg_channels );
|
||||
client_state = CLIENT_SELECT_CHANNEL;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Handle channel (un)selection.
|
||||
====================================================================
|
||||
*/
|
||||
void client_handle_channel_list(
|
||||
GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
char *name;
|
||||
/* if a channel is selected the name is copied into the edit.
|
||||
unselecting does not change anything. the channel by the
|
||||
caption in the edit is opened on enter_channel() */
|
||||
if ( event->type == GUI_ITEM_SELECTED ) {
|
||||
name = list_get( client_channels, event->item.y );
|
||||
if ( name ) gui_edit_set_text( edit_channel, name );
|
||||
}
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Close channel selector or enter new channel.
|
||||
====================================================================
|
||||
*/
|
||||
void client_enter_channel( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
char buf[16];
|
||||
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
|
||||
gui_widget_hide( dlg_channels );
|
||||
client_state = CLIENT_NONE;
|
||||
|
||||
/* retreive name of channel we want to enter */
|
||||
buf[0] = 0;
|
||||
gui_edit_get_text( edit_channel, buf, 16, 0,-1 );
|
||||
|
||||
/* send it */
|
||||
msg_begin_writing( msgbuf, &msglen, MAX_MSG_SIZE );
|
||||
msg_write_int8( MSG_ENTER_CHANNEL );
|
||||
msg_write_string( buf );
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
#endif
|
||||
}
|
||||
void client_cancel_channel( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
gui_widget_hide( dlg_channels );
|
||||
client_state = CLIENT_NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Close statistics
|
||||
====================================================================
|
||||
*/
|
||||
void client_close_stats( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
gui_widget_hide( dlg_stats );
|
||||
client_state = CLIENT_NONE;
|
||||
gui_label_set_text( label_stats, _("Awaiting stats...") );
|
||||
gui_label_set_text( label_winner, "..." );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Send chatter to gamepeer in pauseroom when ENTER was pressed.
|
||||
====================================================================
|
||||
*/
|
||||
void client_send_pausechatter( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
char buf[MAX_CHATTER_SIZE + 1];
|
||||
if ( widget->type == GUI_EDIT &&
|
||||
event->type == GUI_KEY_RELEASED &&
|
||||
event->key.keysym == SDLK_RETURN ) {
|
||||
/* get message */
|
||||
sprintf( buf, "<%s> ", client_name );
|
||||
gui_edit_get_text( edit_pausechatter,
|
||||
buf+strlen(buf), MAX_CHATTER_SIZE + 1, 0,-1 );
|
||||
/* clear chat edit */
|
||||
gui_edit_set_text( edit_pausechatter, "" );
|
||||
/* deliver message to remote ... */
|
||||
msg_begin_writing( msgbuf, &msglen, MAX_MSG_SIZE );
|
||||
msg_write_int8( MSG_CHATTER );
|
||||
msg_write_string( buf );
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
client_add_pausechatter( buf, 0 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Close pauseroom.
|
||||
====================================================================
|
||||
*/
|
||||
void client_close_pauseroom( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
close_pause_chat();
|
||||
comm_send_short( MSG_UNPAUSE );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Popup help dialogue.
|
||||
====================================================================
|
||||
*/
|
||||
void client_popup_help( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
gui_widget_show( dlg_help );
|
||||
client_state = CLIENT_HELP;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Close help dialogue.
|
||||
====================================================================
|
||||
*/
|
||||
void client_close_help( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_CLICKED ) return;
|
||||
gui_widget_hide( dlg_help );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Select topic and display help text.
|
||||
====================================================================
|
||||
*/
|
||||
void client_handle_topic_list( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
if ( event->type != GUI_ITEM_SELECTED ) return;
|
||||
if ( event->item.y >= client_topic_count ) return;
|
||||
gui_list_goto( list_help, 0 );
|
||||
if ( client_help_text ) delete_text( client_help_text );
|
||||
client_help_text = create_text( client_helps[event->item.y], 41 );
|
||||
gui_list_update( list_help, client_help_text->count );
|
||||
}
|
||||
186
project/jni/application/lbreakout2/client/client_handlers.h
Normal file
@@ -0,0 +1,186 @@
|
||||
/***************************************************************************
|
||||
client_handlers.h - description
|
||||
-------------------
|
||||
begin : Sat Oct 26 12:02:57 CEST 2002
|
||||
copyright : (C) 2002 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __CLIENT_HANDLERS_H
|
||||
#define __CLIENT_HANDLERS_H
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Disconnect from current server if any.
|
||||
====================================================================
|
||||
*/
|
||||
void client_disconnect();
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Try to connect to a game server. Retry twice every three seconds
|
||||
or quit then.
|
||||
====================================================================
|
||||
*/
|
||||
void client_connect( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Open/close the connection window.
|
||||
====================================================================
|
||||
*/
|
||||
void client_open_connect_window( GuiWidget *widget, GuiEvent *event );
|
||||
void client_close_connect_window( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Close chatroom and return to LBreakout's menu.
|
||||
====================================================================
|
||||
*/
|
||||
void client_quit( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Close the info window and clear state.
|
||||
====================================================================
|
||||
*/
|
||||
void client_close_info( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Send chatter this function is either called by the send button
|
||||
or by the edit.
|
||||
====================================================================
|
||||
*/
|
||||
void client_send_chatter(
|
||||
GuiWidget *widget, GuiEvent *event );
|
||||
/*
|
||||
====================================================================
|
||||
Whisper chatter if a user is selected.
|
||||
====================================================================
|
||||
*/
|
||||
void client_whisper_chatter(
|
||||
GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Update selected peer and levelset.
|
||||
====================================================================
|
||||
*/
|
||||
void client_handle_user_list(
|
||||
GuiWidget *widget, GuiEvent *event );
|
||||
void client_handle_levelset_list(
|
||||
GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Handle confirmation/cancelling of confirmation dialogue.
|
||||
====================================================================
|
||||
*/
|
||||
void client_confirm( GuiWidget *widget, GuiEvent *event );
|
||||
void client_cancel( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Challenge selected user.
|
||||
====================================================================
|
||||
*/
|
||||
void client_challenge( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Update multiplayer network configuration.
|
||||
====================================================================
|
||||
*/
|
||||
void client_update_difficulty( GuiWidget *widget, GuiEvent *event );
|
||||
void client_update_rounds( GuiWidget *widget, GuiEvent *event );
|
||||
void client_update_frags( GuiWidget *widget, GuiEvent *event );
|
||||
void client_update_balls( GuiWidget *widget, GuiEvent *event );
|
||||
void client_update_port( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Allow user to transfer a levelset.
|
||||
====================================================================
|
||||
*/
|
||||
void client_listen( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Initiate levelset transfer.
|
||||
====================================================================
|
||||
*/
|
||||
void client_transfer( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Open channel selector
|
||||
====================================================================
|
||||
*/
|
||||
void client_select_channel( GuiWidget *widget, GuiEvent *event );
|
||||
/*
|
||||
====================================================================
|
||||
Handle channel (un)selection.
|
||||
====================================================================
|
||||
*/
|
||||
void client_handle_channel_list(
|
||||
GuiWidget *widget, GuiEvent *event );
|
||||
/*
|
||||
====================================================================
|
||||
Close channel selector or enter new channel.
|
||||
====================================================================
|
||||
*/
|
||||
void client_enter_channel( GuiWidget *widget, GuiEvent *event );
|
||||
void client_cancel_channel( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Close statistics
|
||||
====================================================================
|
||||
*/
|
||||
void client_close_stats( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Send chatter to gamepeer in pauseroom when ENTER was pressed.
|
||||
====================================================================
|
||||
*/
|
||||
void client_send_pausechatter( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Close pauseroom.
|
||||
====================================================================
|
||||
*/
|
||||
void client_close_pauseroom( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Popup help dialogue.
|
||||
====================================================================
|
||||
*/
|
||||
void client_popup_help( GuiWidget *widget, GuiEvent *event );
|
||||
/*
|
||||
====================================================================
|
||||
Close help dialogue.
|
||||
====================================================================
|
||||
*/
|
||||
void client_close_help( GuiWidget *widget, GuiEvent *event );
|
||||
/*
|
||||
====================================================================
|
||||
Select topic and display help text.
|
||||
====================================================================
|
||||
*/
|
||||
void client_handle_topic_list( GuiWidget *widget, GuiEvent *event );
|
||||
|
||||
#endif
|
||||
|
||||
357
project/jni/application/lbreakout2/client/client_recv.c
Normal file
@@ -0,0 +1,357 @@
|
||||
/***************************************************************************
|
||||
client_recv.c - description
|
||||
-------------------
|
||||
begin : Sat Oct 26 12:02:57 CEST 2002
|
||||
copyright : (C) 2002 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "lbreakout.h"
|
||||
#include "client_data.h"
|
||||
#include "game.h"
|
||||
#include "../game/game.h"
|
||||
#include "../gui/gui.h"
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Externals
|
||||
====================================================================
|
||||
*/
|
||||
#ifdef NETWORK_ENABLED
|
||||
extern NetSocket client;
|
||||
extern int client_is_connected;
|
||||
#endif
|
||||
extern GuiWidget *dlg_info;
|
||||
extern GuiWidget *dlg_confirm;
|
||||
extern GuiWidget *dlg_chatroom;
|
||||
extern GuiWidget *label_channel;
|
||||
extern GuiWidget *label_info;
|
||||
extern GuiWidget *label_confirm;
|
||||
extern GuiWidget *label_stats;
|
||||
extern GuiWidget *label_winner;
|
||||
extern GuiWidget *list_chatter;
|
||||
extern GuiWidget *list_levels;
|
||||
extern GuiWidget *list_users;
|
||||
extern GuiWidget *list_games;
|
||||
extern List *client_users;
|
||||
extern List *client_channels;
|
||||
extern List *client_levelsets;
|
||||
extern int client_state;
|
||||
extern List *levels;
|
||||
extern int net_buffer_cur_size, msg_read_pos;
|
||||
extern char net_buffer[MAX_MSG_SIZE + PACKET_HEADER_SIZE];
|
||||
/* CHALLENGE */
|
||||
extern char client_name[16];
|
||||
extern int client_recv_limit;
|
||||
extern char *mp_diff_names[];
|
||||
extern char mp_levelset[16];
|
||||
extern int mp_peer_id;
|
||||
extern char mp_peer_name[16];
|
||||
extern int mp_levelset_version;
|
||||
extern int mp_levelset_update;
|
||||
extern int mp_level_count;
|
||||
extern int levelset_version, levelset_update;
|
||||
extern int mp_diff, mp_rounds, mp_frags, mp_balls;
|
||||
extern ClientUser *client_user;
|
||||
extern void client_run_game( int challenger );
|
||||
extern void client_disconnect(); /* from client.c */
|
||||
extern int client_comm_delay;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Popup info dialogue and set status to INFO.
|
||||
====================================================================
|
||||
*/
|
||||
void client_popup_info( char *format, ... )
|
||||
{
|
||||
char buffer[256];
|
||||
va_list args;
|
||||
va_start( args, format );
|
||||
vsnprintf( buffer, 256, format, args );
|
||||
va_end( args );
|
||||
gui_label_set_text( label_info, buffer );
|
||||
gui_widget_show( dlg_info );
|
||||
client_state = CLIENT_INFO;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Popup confirm dialogue and _keep_ status.
|
||||
====================================================================
|
||||
*/
|
||||
void client_popup_confirm( char *format, ... )
|
||||
{
|
||||
char buffer[256];
|
||||
va_list args;
|
||||
va_start( args, format );
|
||||
vsnprintf( buffer, 256, format, args );
|
||||
va_end( args );
|
||||
gui_label_set_text( label_confirm, buffer );
|
||||
gui_widget_show( dlg_confirm );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Parse all messages in net_packet.
|
||||
====================================================================
|
||||
*/
|
||||
#ifdef NETWORK_ENABLED
|
||||
static void client_parse_packet()
|
||||
{
|
||||
int i, num;
|
||||
char name[16];
|
||||
unsigned char type;
|
||||
int handled;
|
||||
|
||||
while ( 1 ) {
|
||||
type = (unsigned)msg_read_int8(); handled = 0;
|
||||
|
||||
if ( msg_read_failed() ) break; /* no more messages */
|
||||
|
||||
switch ( type ) {
|
||||
case MSG_PREPARE_FULL_UPDATE:
|
||||
/* do only clear users as channels and
|
||||
* levelsets are fixed */
|
||||
list_clear( client_users ); client_user = 0;
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_ERROR:
|
||||
client_printf_chatter( 1, _("ERROR: %s"), msg_read_string() );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_BUSY:
|
||||
if ( client_state == CLIENT_AWAIT_ANSWER ||
|
||||
client_state == CLIENT_AWAIT_TRANSFER_CONFIRMATION )
|
||||
client_popup_info(
|
||||
_("%s is busy at the moment."),
|
||||
mp_peer_name );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_DISCONNECT:
|
||||
client_disconnect();
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_SET_COMM_DELAY:
|
||||
client_comm_delay = msg_read_int16();
|
||||
printf( _("comm_delay set to %i\n"), client_comm_delay );
|
||||
handled = 1;
|
||||
break;
|
||||
/* chatter */
|
||||
case MSG_SERVER_INFO:
|
||||
client_add_chatter( msg_read_string(), 1 );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_CHATTER:
|
||||
client_add_chatter( msg_read_string(), 0 );
|
||||
handled = 1;
|
||||
break;
|
||||
/* users */
|
||||
case MSG_ADD_USER:
|
||||
num = msg_read_int32();
|
||||
snprintf( name, 16, "%s", msg_read_string() ); name[15] = 0;
|
||||
if ( msg_read_failed() ) break;
|
||||
client_add_user( num, name );
|
||||
gui_list_update(
|
||||
list_users,
|
||||
client_users->count );
|
||||
/* re-select current entry */
|
||||
if ( client_user ) {
|
||||
num = list_check( client_users, client_user );
|
||||
if ( num != -1 )
|
||||
gui_list_select( list_users, 0, num, 1 );
|
||||
}
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_REMOVE_USER:
|
||||
num = msg_read_int32();
|
||||
if ( msg_read_failed() ) break;
|
||||
client_remove_user( num );
|
||||
gui_list_update(
|
||||
list_users,
|
||||
client_users->count );
|
||||
/* re-select current entry */
|
||||
if ( client_user ) {
|
||||
num = list_check( client_users, client_user );
|
||||
if ( num != -1 )
|
||||
gui_list_select( list_users, 0, num, 1 );
|
||||
}
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_CHANNEL_LIST:
|
||||
list_clear( client_channels );
|
||||
num = msg_read_int8();
|
||||
for ( i = 0; i < num; i++ )
|
||||
list_add( client_channels, strdup(msg_read_string()) );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_LEVELSET_LIST:
|
||||
list_clear( client_levelsets );
|
||||
num = msg_read_int8();
|
||||
for ( i = 0; i < num; i++ )
|
||||
list_add( client_levelsets, strdup(msg_read_string()) );
|
||||
gui_list_update( list_levels, client_levelsets->count );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_ADD_LEVELSET:
|
||||
list_add( client_levelsets, strdup(msg_read_string()) );
|
||||
gui_list_update( list_levels, client_levelsets->count );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_SET_CHANNEL:
|
||||
/* we only need to update the name */
|
||||
gui_label_set_text( label_channel, msg_read_string() );
|
||||
handled = 1;
|
||||
break;
|
||||
/* challenge */
|
||||
case MSG_CHALLENGE:
|
||||
/* the user may only be challenged if client state is NONE
|
||||
because otherwise he is doing something that shouldn't be
|
||||
interrupted */
|
||||
if ( client_state != CLIENT_NONE ) {
|
||||
msg_begin_writing( msgbuf, &msglen, 128 );
|
||||
msg_write_int8( MSG_BUSY );
|
||||
msg_write_int32( msg_read_int32() );
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
break;
|
||||
}
|
||||
snprintf( mp_peer_name, 15, "%s", msg_read_string() );
|
||||
snprintf( mp_levelset, 16, "%s", msg_read_string() );
|
||||
mp_diff = msg_read_int8();
|
||||
mp_rounds = msg_read_int8();
|
||||
mp_frags = msg_read_int8();
|
||||
mp_balls = msg_read_int8();
|
||||
if ( msg_read_failed() ) break;
|
||||
client_popup_confirm( _(" You have been challenged!##"\
|
||||
" Challenger: %13s#"\
|
||||
" Levelset: %13s#"\
|
||||
" Difficulty: %13s#"\
|
||||
" Rounds: %13i#"\
|
||||
" Frag Limit: %13i#"\
|
||||
" Balls: %13i"),
|
||||
mp_peer_name, mp_levelset, mp_diff_names[mp_diff],
|
||||
mp_rounds, mp_frags, mp_balls );
|
||||
client_state = CLIENT_ANSWER;
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_REJECT_CHALLENGE:
|
||||
handled = 1;
|
||||
if ( client_state != CLIENT_AWAIT_ANSWER ) break;
|
||||
client_popup_info(
|
||||
_("%s is too scared to accept your challenge."),
|
||||
mp_peer_name );
|
||||
break;
|
||||
case MSG_CANCEL_GAME:
|
||||
handled = 1;
|
||||
if ( client_state != CLIENT_ANSWER ) break;
|
||||
gui_widget_hide( dlg_confirm );
|
||||
client_popup_info( _("%s got cold feet."), mp_peer_name );
|
||||
break;
|
||||
case MSG_ACCEPT_CHALLENGE:
|
||||
handled = 1;
|
||||
if ( client_state != CLIENT_AWAIT_ANSWER ) break;
|
||||
gui_widget_hide( dlg_info );
|
||||
|
||||
/* play */
|
||||
gui_disable_event_filter();
|
||||
if ( client_game_init_network( mp_peer_name, mp_diff ) )
|
||||
client_game_run();
|
||||
client_game_finalize();
|
||||
gui_enable_event_filter();
|
||||
|
||||
gui_widget_draw( dlg_chatroom );
|
||||
stk_display_fade( STK_FADE_IN, STK_FADE_DEFAULT_TIME );
|
||||
break;
|
||||
|
||||
/* dummy parse game packets that may arrive after the QUIT_GAME
|
||||
* message was sent because ADD_USER commands may be in the
|
||||
* package and these we should get. */
|
||||
case MSG_PADDLE_STATE:
|
||||
comm_unpack_paddle_dummy( net_buffer, &msg_read_pos );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_SHOT_POSITIONS:
|
||||
comm_unpack_shots_dummy( net_buffer, &msg_read_pos );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_BALL_POSITIONS:
|
||||
comm_unpack_balls_dummy( net_buffer, &msg_read_pos );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_SCORES:
|
||||
comm_unpack_scores_dummy( net_buffer, &msg_read_pos );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_BRICK_HITS:
|
||||
comm_unpack_brick_hits_dummy( net_buffer, &msg_read_pos );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_NEW_EXTRAS:
|
||||
comm_unpack_collected_extras_dummy( net_buffer, &msg_read_pos );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_ROUND_OVER:
|
||||
i = msg_read_int8();
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_LAST_ROUND_OVER:
|
||||
i = msg_read_int8();
|
||||
handled = 1;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if ( !handled ) {
|
||||
printf( _("chat: state %i: invalid message %x: skipping %i bytes\n"),
|
||||
client_state, type, net_buffer_cur_size - msg_read_pos );
|
||||
msg_read_pos = net_buffer_cur_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Receive packets from server. Use the TIME_PASSED event therefore.
|
||||
Send a heartbeat every three seconds as well.
|
||||
====================================================================
|
||||
*/
|
||||
void client_recv_packet( GuiWidget *widget, GuiEvent *event )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
int recv_limit;
|
||||
static int last_heartbeat = 0;
|
||||
|
||||
if ( !client_is_connected ) return;
|
||||
if ( event->type != GUI_TIME_PASSED ) return;
|
||||
|
||||
/* heartbeat? */
|
||||
if ( time(0) >= last_heartbeat + 10 ) {
|
||||
last_heartbeat = time(0);
|
||||
msgbuf[0] = MSG_HEARTBEAT;
|
||||
client_transmit( CODE_BLUE, 1, msgbuf );
|
||||
}
|
||||
|
||||
recv_limit = client_recv_limit; /* limited number of packets if not -1 */
|
||||
while ( net_recv_packet() && ( recv_limit==-1 || recv_limit > 0) ) {
|
||||
|
||||
/* check if this is a valid packet and update the socket */
|
||||
if ( msg_is_connectionless() )
|
||||
msg_begin_connectionless_reading();
|
||||
else
|
||||
if ( !socket_process_header( &client ) )
|
||||
continue;
|
||||
client_parse_packet();
|
||||
|
||||
if ( recv_limit != -1 ) recv_limit--;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
462
project/jni/application/lbreakout2/client/comm.c
Normal file
@@ -0,0 +1,462 @@
|
||||
/***************************************************************************
|
||||
comm.c - description
|
||||
-------------------
|
||||
begin : Fri Aug 2 2002
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "../gui/gui.h"
|
||||
#include "../game/game.h"
|
||||
#include "game.h"
|
||||
#include "client_data.h"
|
||||
#include "bricks.h"
|
||||
#include "extras.h"
|
||||
#include "comm.h"
|
||||
|
||||
extern char net_buffer[MAX_MSG_SIZE + PACKET_HEADER_SIZE];
|
||||
extern int net_buffer_cur_size;
|
||||
extern int msg_read_pos;
|
||||
extern char msgbuf[MAX_MSG_SIZE];
|
||||
extern int msglen;
|
||||
extern NetSocket client;
|
||||
extern StkFont *chat_font_error;
|
||||
extern int client_is_connected;
|
||||
extern int client_state;
|
||||
extern Game *game, *local_game;
|
||||
extern Player *cur_player;
|
||||
extern Paddle *r_paddle;
|
||||
#ifdef AUDIO_ENABLED
|
||||
extern StkSound *wav_shot, *wav_reflect_paddle, *wav_reflect_brick, *wav_attach;
|
||||
#endif
|
||||
extern int game_stats[2][7];
|
||||
extern int game_over;
|
||||
extern int client_comm_delay;
|
||||
extern int stats_received;
|
||||
extern GuiWidget *dlg_pauseroom;
|
||||
extern List *client_levelsets;
|
||||
extern int client_recv_limit;
|
||||
|
||||
extern void set_state( int newstate );
|
||||
extern void init_next_round( void );
|
||||
extern void display_final_stats( void );
|
||||
extern void open_pause_chat( char *text );
|
||||
extern void close_pause_chat( void);
|
||||
|
||||
extern int last_ball_brick_reflect_x; /* HACK: used to play local sound */
|
||||
extern int last_ball_paddle_reflect_x; /* HACK: used to play local sound */
|
||||
extern int last_ball_attach_x; /* HACK: used to play local sound */
|
||||
extern int last_shot_fire_x; /* HACK: used to play local sound */
|
||||
|
||||
/* handle modifications game::mod_* which were either copied
|
||||
* from local_game or received via network, apply the changes to
|
||||
* game and clear these entries. the current game entry must've
|
||||
* been set to 'game'. Ball and shot updates have already been
|
||||
* applied to the game context. */
|
||||
#ifdef NETWORK_ENABLED
|
||||
static void handle_mods()
|
||||
{
|
||||
BrickHit *brickhits;
|
||||
int *extras, count;
|
||||
int i, j;
|
||||
|
||||
#ifdef AUDIO_ENABLED
|
||||
/* play sounds for attached, reflected balls or fired shots */
|
||||
/* HACK: in a local game use externals from game/balls.c
|
||||
* last_ball_*_x to play sound stereo. this cannot be used for
|
||||
* network games */
|
||||
if ( local_game == 0 )
|
||||
{
|
||||
if ( game_get_fired_shot_count() )
|
||||
stk_sound_play( wav_shot );
|
||||
if ( game_get_brick_reflected_ball_count() )
|
||||
stk_sound_play( wav_reflect_brick );
|
||||
if ( game_get_paddle_reflected_ball_count() )
|
||||
stk_sound_play( wav_reflect_paddle );
|
||||
if ( game_get_attached_ball_count() )
|
||||
stk_sound_play( wav_attach );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( last_ball_brick_reflect_x != -1 )
|
||||
stk_sound_play_x( last_ball_brick_reflect_x, wav_reflect_brick );
|
||||
if ( last_ball_paddle_reflect_x != -1 )
|
||||
stk_sound_play_x( last_ball_paddle_reflect_x, wav_reflect_paddle );
|
||||
if ( last_ball_attach_x != -1 )
|
||||
stk_sound_play_x( last_ball_attach_x, wav_attach );
|
||||
if ( last_shot_fire_x != -1 )
|
||||
stk_sound_play_x( last_shot_fire_x, wav_shot );
|
||||
last_ball_brick_reflect_x = -1;
|
||||
last_ball_paddle_reflect_x = -1;
|
||||
last_ball_attach_x = -1;
|
||||
last_shot_fire_x = -1;
|
||||
}
|
||||
#endif
|
||||
/* handle brick hits and create new extras. the extras
|
||||
* are moved independently by the client and destroyed on
|
||||
* collection but DO NOT TAKE EFFECT */
|
||||
brickhits = game_get_brick_hits( &count );
|
||||
for ( i = 0; i < count; i++ )
|
||||
client_handle_brick_hit( &brickhits[i] );
|
||||
|
||||
/* these collected extras take effect */
|
||||
for ( i = 0; i < game->paddle_count; i++ ) {
|
||||
extras = game_get_collected_extras( i, &count );
|
||||
for ( j = 0; j < count; j++ )
|
||||
client_handle_collected_extra( game->paddles[i], extras[j] );
|
||||
}
|
||||
|
||||
game_reset_mods();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NETWORK_ENABLED
|
||||
/* copy stuff from local_game to game */
|
||||
static void comm_recv_local( void )
|
||||
{
|
||||
Ball *ball, *ballcopy;
|
||||
Shot *shot, *shotcopy;
|
||||
|
||||
/* copy balls */
|
||||
list_clear( game->balls );
|
||||
list_reset( local_game->balls );
|
||||
while ( (ball = list_next(local_game->balls)) ) {
|
||||
ballcopy = salloc( 1, sizeof(Ball) );
|
||||
ballcopy->x = ball->x;
|
||||
ballcopy->y = ball->y;
|
||||
ballcopy->attached = ball->attached;
|
||||
if ( ball->attached ) {
|
||||
if ( ball->paddle == local_game->paddles[0] )
|
||||
ballcopy->paddle = game->paddles[0];
|
||||
else
|
||||
ballcopy->paddle = game->paddles[1];
|
||||
}
|
||||
list_add( game->balls, ballcopy );
|
||||
}
|
||||
|
||||
/* copy shots */
|
||||
list_clear( game->shots );
|
||||
list_reset( local_game->shots );
|
||||
while ( (shot = list_next(local_game->shots)) ) {
|
||||
shotcopy = salloc( 1, sizeof(Shot) );
|
||||
shotcopy->x = shot->x;
|
||||
shotcopy->y = shot->y;
|
||||
list_add( game->shots, shotcopy );
|
||||
}
|
||||
|
||||
/* copy score */
|
||||
game->paddles[0]->score = local_game->paddles[0]->score;
|
||||
|
||||
/* copy level_over */
|
||||
game->level_over = local_game->level_over;
|
||||
game->winner = local_game->winner;
|
||||
|
||||
/* modifications are transferred to game::mod
|
||||
* and handled by the same function that does this
|
||||
* for net updates below. while handle_mods()
|
||||
* resets the mods in the game struct, the
|
||||
* local_game mods must be cleared as well */
|
||||
game->mod = local_game->mod;
|
||||
handle_mods();
|
||||
local_game->mod = game->mod;
|
||||
|
||||
/* copy new level when altered in bonus level */
|
||||
if (local_game->blRefreshBricks)
|
||||
{
|
||||
local_game->blRefreshBricks = 0;
|
||||
/* HACK HACK HACK HACK.... did I mention this is a hack? And a really
|
||||
bad one indeed. */
|
||||
memcpy(game->bricks,local_game->bricks,sizeof(game->bricks));
|
||||
client_redraw_all_bricks();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* parse incoming packets and handle them according to the client's
|
||||
* state */
|
||||
static void comm_parse_packet()
|
||||
{
|
||||
BrickHit *brickhits;
|
||||
unsigned char type;
|
||||
int *extras, count;
|
||||
int i, j;
|
||||
char name[16];
|
||||
int handled;
|
||||
|
||||
/* the list of shots is reset before as shot_positions
|
||||
* will not be send when no shots are available */
|
||||
list_clear( game->shots );
|
||||
|
||||
while ( 1 ) {
|
||||
type = (unsigned)msg_read_int8(); handled = 0;
|
||||
|
||||
if ( msg_read_failed() ) break; /* no more messages */
|
||||
|
||||
msglen = 0; /* game unpack functions require a position pointer which
|
||||
is always 0 at the moment */
|
||||
|
||||
switch ( type ) {
|
||||
case MSG_SET_COMM_DELAY:
|
||||
client_comm_delay = msg_read_int16();
|
||||
printf( _("comm_delay set to %i\n"), client_comm_delay );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_DISCONNECT:
|
||||
/* close the pause chatroom window if open */
|
||||
if ( client_state == CS_PAUSE )
|
||||
close_pause_chat();
|
||||
|
||||
set_state( CS_FATAL_ERROR );
|
||||
display_text( chat_font_error, _("You've been disconnected.") );
|
||||
client_data_clear();
|
||||
client_is_connected = 0;
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_ERROR:
|
||||
/* close the pause chatroom window if open */
|
||||
if ( client_state == CS_PAUSE )
|
||||
close_pause_chat();
|
||||
/* break up game but wait for the stats */
|
||||
set_state( CS_FATAL_ERROR );
|
||||
display_text( chat_font_error, msg_read_string() );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_LEVEL_DATA:
|
||||
cur_player->next_paddle_id = msg_read_int8(); /* top or bottom? */
|
||||
msg_read( 536, msgbuf );
|
||||
if ( !msg_read_failed() ) {
|
||||
comm_unpack_level( &cur_player->snapshot, msgbuf, &msglen );
|
||||
cur_player->next_level_received = 1;
|
||||
handled = 1;
|
||||
}
|
||||
else {
|
||||
set_state( CS_FATAL_ERROR );
|
||||
display_text( chat_font_error, _("corrupted level data") );
|
||||
}
|
||||
break;
|
||||
case MSG_ADD_USER:
|
||||
i = msg_read_int32();
|
||||
snprintf( name, 16, "%s", msg_read_string() ); name[15] = 0;
|
||||
if ( msg_read_failed() ) break;
|
||||
client_add_user( i, name );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_REMOVE_USER:
|
||||
i = msg_read_int32();
|
||||
if ( msg_read_failed() ) break;
|
||||
client_remove_user( i );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_ADD_LEVELSET:
|
||||
list_add( client_levelsets, strdup(msg_read_string()) );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_PAUSE:
|
||||
open_pause_chat( _("Remote player has paused the game.") );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_UNPAUSE:
|
||||
close_pause_chat();
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_CHATTER:
|
||||
client_add_pausechatter( msg_read_string(), 0 );
|
||||
handled = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* game_only packets but received any time */
|
||||
//if ( client_state == CS_PLAY )
|
||||
switch ( type ) {
|
||||
case MSG_PADDLE_STATE:
|
||||
comm_unpack_paddle( r_paddle, net_buffer, &msg_read_pos );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_SHOT_POSITIONS:
|
||||
comm_unpack_shots( net_buffer, &msg_read_pos );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_BALL_POSITIONS:
|
||||
comm_unpack_balls( net_buffer, &msg_read_pos );
|
||||
|
||||
#ifdef AUDIO_ENABLED
|
||||
/* play sounds for attached, reflected balls or fired shots */
|
||||
if ( game_get_fired_shot_count() )
|
||||
stk_sound_play( wav_shot );
|
||||
if ( game_get_brick_reflected_ball_count() )
|
||||
stk_sound_play( wav_reflect_brick );
|
||||
if ( game_get_paddle_reflected_ball_count() )
|
||||
stk_sound_play( wav_reflect_paddle );
|
||||
if ( game_get_attached_ball_count() )
|
||||
stk_sound_play( wav_attach );
|
||||
game->mod.fired_shot_count = 0;
|
||||
game->mod.attached_ball_count = 0;
|
||||
game->mod.brick_reflected_ball_count = 0;
|
||||
game->mod.paddle_reflected_ball_count = 0;
|
||||
#endif
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_SCORES:
|
||||
comm_unpack_scores( net_buffer, &msg_read_pos );
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_BRICK_HITS:
|
||||
comm_unpack_brick_hits( net_buffer, &msg_read_pos );
|
||||
|
||||
/* handle brick hits and create new extras. the extras
|
||||
* are moved independently by the client and destroyed on
|
||||
* collection but DO NOT TAKE EFFECT */
|
||||
brickhits = game_get_brick_hits( &count );
|
||||
for ( i = 0; i < count; i++ )
|
||||
client_handle_brick_hit( &brickhits[i] );
|
||||
game->mod.brick_hit_count = 0;
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_NEW_EXTRAS:
|
||||
comm_unpack_collected_extras( net_buffer, &msg_read_pos );
|
||||
|
||||
/* these collected extras take effect */
|
||||
for ( i = 0; i < game->paddle_count; i++ ) {
|
||||
extras = game_get_collected_extras( i, &count );
|
||||
for ( j = 0; j < count; j++ )
|
||||
client_handle_collected_extra(
|
||||
game->paddles[i], extras[j] );
|
||||
}
|
||||
game->mod.collected_extra_count[0] = 0;
|
||||
game->mod.collected_extra_count[1] = 0;
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_ROUND_OVER:
|
||||
game->level_over = 1;
|
||||
game->winner = msg_read_int8();
|
||||
handled = 1;
|
||||
break;
|
||||
case MSG_LAST_ROUND_OVER:
|
||||
game->level_over = 1;
|
||||
game->winner = msg_read_int8();
|
||||
game_over = 1;
|
||||
handled = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* stats may arrive anywhere */
|
||||
switch ( type ) {
|
||||
case MSG_GAME_STATS:
|
||||
memset( game_stats, 0, sizeof( game_stats ) );
|
||||
game_stats[0][0] = msg_read_int8();
|
||||
game_stats[1][0] = msg_read_int8();
|
||||
game_stats[0][1] = msg_read_int8();
|
||||
game_stats[1][1] = msg_read_int8();
|
||||
game_stats[0][2] = msg_read_int8();
|
||||
game_stats[1][2] = msg_read_int8();
|
||||
game_stats[0][3] = msg_read_int32();
|
||||
game_stats[1][3] = msg_read_int32();
|
||||
game_stats[0][4] = msg_read_int8();
|
||||
game_stats[1][4] = msg_read_int8();
|
||||
game_stats[0][5] = msg_read_int8();
|
||||
game_stats[1][5] = msg_read_int8();
|
||||
game_stats[0][6] = msg_read_int8();
|
||||
game_stats[1][6] = msg_read_int8();
|
||||
stats_received = 1;
|
||||
handled = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !handled ) {
|
||||
printf( _("game: state %i: invalid message %x: skipping %i bytes\n"),
|
||||
client_state, type, net_buffer_cur_size - msg_read_pos );
|
||||
msg_read_pos = net_buffer_cur_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* send state of local paddle */
|
||||
void comm_send_paddle( Paddle *paddle )
|
||||
{
|
||||
if ( game->game_type == GT_LOCAL ) {
|
||||
/* simply copy the data */
|
||||
if ( local_game->paddles[PADDLE_BOTTOM]->x != paddle->x )
|
||||
local_game->paddles[PADDLE_BOTTOM]->invis_delay = PADDLE_INVIS_DELAY;
|
||||
local_game->paddles[PADDLE_BOTTOM]->x = paddle->x;
|
||||
local_game->paddles[PADDLE_BOTTOM]->fire_left = paddle->fire_left;
|
||||
local_game->paddles[PADDLE_BOTTOM]->fire_right = paddle->fire_right;
|
||||
local_game->paddles[PADDLE_BOTTOM]->ball_return_key_pressed =
|
||||
paddle->ball_return_key_pressed;
|
||||
local_game->paddles[PADDLE_BOTTOM]->maxballspeed_request =
|
||||
paddle->maxballspeed_request;
|
||||
local_game->paddles[PADDLE_BOTTOM]->maxballspeed_request_old =
|
||||
paddle->maxballspeed_request_old;
|
||||
return;
|
||||
}
|
||||
|
||||
msgbuf[0] = MSG_PADDLE_STATE; msglen = 1;
|
||||
comm_pack_paddle( paddle, msgbuf, &msglen );
|
||||
client_transmit( CODE_BLUE, msglen, msgbuf );
|
||||
}
|
||||
|
||||
void comm_send_short( int msg )
|
||||
{
|
||||
if ( game->game_type == GT_LOCAL ) return;
|
||||
|
||||
/* send these messages as code blue. if they are dropped
|
||||
* the player and server will notice as nothing happens */
|
||||
msgbuf[0] = msg;
|
||||
client_transmit( CODE_BLUE, 1, msgbuf );
|
||||
}
|
||||
|
||||
/* receive any data but only handle such messages valid
|
||||
* in the current state. */
|
||||
void comm_recv( void )
|
||||
{
|
||||
#ifdef NETWORK_ENABLED
|
||||
int recv_limit;
|
||||
|
||||
/* fake communication in local game */
|
||||
if ( game->game_type == GT_LOCAL ) {
|
||||
comm_recv_local();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !client_is_connected ) return;
|
||||
|
||||
recv_limit = client_recv_limit; /* limited number of packets if not -1 */
|
||||
while ( net_recv_packet() && ( recv_limit==-1 || recv_limit > 0) ) {
|
||||
/* check if this is a valid packet and update the socket */
|
||||
if ( msg_is_connectionless() )
|
||||
msg_begin_connectionless_reading();
|
||||
else
|
||||
if ( !socket_process_header( &client ) )
|
||||
continue;
|
||||
comm_parse_packet();
|
||||
|
||||
if ( recv_limit != -1 ) recv_limit--;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* send a heartbeat every 2 seconds except in the actual game as we
|
||||
* send paddle updates there */
|
||||
void comm_send_heartbeat( void )
|
||||
{
|
||||
static int last_heartbeat = 0;
|
||||
|
||||
if ( client_state != CS_PLAY )
|
||||
if ( time(0) >= last_heartbeat + 3 ) {
|
||||
last_heartbeat = time(0);
|
||||
msgbuf[0] = MSG_HEARTBEAT;
|
||||
client_transmit( CODE_BLUE, 1, msgbuf );
|
||||
}
|
||||
|
||||
}
|
||||
32
project/jni/application/lbreakout2/client/comm.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/***************************************************************************
|
||||
comm.h - description
|
||||
-------------------
|
||||
begin : Fri Aug 2 2002
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __COMM_CLIENT_H
|
||||
#define __COMM_CLIENT_H
|
||||
|
||||
void comm_send_paddle( Paddle *paddle );
|
||||
void comm_send_short( int msg ); /* single byte messages */
|
||||
|
||||
/* receive any data but only handle such messages valid
|
||||
* in the current state */
|
||||
void comm_recv( void );
|
||||
|
||||
/* send a heartbeat every 2 seconds except in the actual game as we
|
||||
* send paddle updates there */
|
||||
void comm_send_heartbeat( void );
|
||||
|
||||
#endif
|
||||
273
project/jni/application/lbreakout2/client/config.c
Normal file
@@ -0,0 +1,273 @@
|
||||
/***************************************************************************
|
||||
config.c - description
|
||||
-------------------
|
||||
begin : Tue Feb 13 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "../common/parser.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define MKDIR(d, p) mkdir(d)
|
||||
#else
|
||||
#define MKDIR mkdir
|
||||
#endif
|
||||
|
||||
Config config;
|
||||
|
||||
#define CONFIG_FILE_NAME "lbreakout2.conf"
|
||||
|
||||
/* check if config directory exists; if not create it and set config_dir */
|
||||
void config_check_dir()
|
||||
{
|
||||
char level_dir[512];
|
||||
snprintf( config.dir_name, sizeof(config.dir_name)-1, "%s/%s", (getenv( "HOME" )?getenv( "HOME" ):"."), CONFIG_DIR_NAME );
|
||||
/* test and create .lgames */
|
||||
if ( opendir( config.dir_name ) == 0 ) {
|
||||
fprintf( stderr, "couldn't find/open config directory '%s'\n", config.dir_name );
|
||||
fprintf( stderr, "attempting to create it... " );
|
||||
MKDIR( config.dir_name, S_IRWXU );
|
||||
if ( opendir( config.dir_name ) == 0 )
|
||||
fprintf( stderr, "failed\n" );
|
||||
else
|
||||
fprintf( stderr, "ok\n" );
|
||||
}
|
||||
/* create levels directory */
|
||||
sprintf( level_dir, "%s/lbreakout2-levels", config.dir_name );
|
||||
MKDIR( level_dir, S_IRWXU );
|
||||
/* create themes directory */
|
||||
sprintf( level_dir, "%s/lbreakout2-themes", config.dir_name );
|
||||
MKDIR( level_dir, S_IRWXU );
|
||||
}
|
||||
|
||||
/* set config to default */
|
||||
void config_reset()
|
||||
{
|
||||
/* levels */
|
||||
config.levelset_id_local = 0;
|
||||
config.levelset_count_local = 0;
|
||||
config.levelset_id_home = 0;
|
||||
config.levelset_count_home = 0;
|
||||
/* player */
|
||||
config.player_count = 1;
|
||||
strcpy( config.player_names[0], "Michael" );
|
||||
strcpy( config.player_names[1], _("Mr.X") );
|
||||
strcpy( config.player_names[2], _("Mr.Y") );
|
||||
strcpy( config.player_names[3], _("Mr.Z") );
|
||||
/* game */
|
||||
config.diff = 2;
|
||||
config.startlevel = 0;
|
||||
config.rel_warp_limit = 80;
|
||||
config.addBonusLevels = 1;
|
||||
/* controls */
|
||||
config.k_left = SDLK_LEFT;
|
||||
config.k_right = SDLK_RIGHT;
|
||||
config.k_rfire = SDLK_SPACE;
|
||||
config.k_lfire = SDLK_y;
|
||||
config.k_return = SDLK_BACKSPACE;
|
||||
config.k_turbo = SDLK_x;
|
||||
config.k_warp = SDLK_w;
|
||||
config.k_maxballspeed = SDLK_c;
|
||||
config.grab = 1;
|
||||
config.rel_motion = 1;
|
||||
config.i_motion_mod = 120;
|
||||
config.motion_mod = 1.2;
|
||||
config.convex = 1;
|
||||
config.linear_corner = 0;
|
||||
config.invert = 0;
|
||||
config.i_key_speed = 500;
|
||||
config.key_speed = 0.5;
|
||||
config.random_angle = 1;
|
||||
config.maxballspeed_int1000 = 900;
|
||||
config.maxballspeed_float = 0.7;
|
||||
/* sounds */
|
||||
config.sound = 1;
|
||||
config.volume = 8;
|
||||
config.speech = 1;
|
||||
config.badspeech = 0;
|
||||
config.audio_buffer_size = 512;
|
||||
/* graphics */
|
||||
config.anim = 2;
|
||||
config.fullscreen = 0;
|
||||
config.fade = 1;
|
||||
config.bonus_info = 1;
|
||||
config.fps = 0;
|
||||
config.ball_level = BALL_BELOW_BONUS;
|
||||
config.debris_level = DEBRIS_ABOVE_BALL;
|
||||
/* various */
|
||||
config.use_hints = 1;
|
||||
config.return_on_click = 0;
|
||||
config.theme_id = 0;
|
||||
config.theme_count = 4;
|
||||
/* multiplayer */
|
||||
strcpy( config.server, "217.160.141.22:8000" );
|
||||
strcpy( config.local_port, "8001" );
|
||||
strcpy( config.username, _("player") );
|
||||
config.mp_diff = 1;
|
||||
config.mp_rounds = 1;
|
||||
config.mp_balls = 3;
|
||||
config.mp_frags = 10;
|
||||
config.recv_limit = 500;
|
||||
}
|
||||
|
||||
/* load config */
|
||||
void config_load( )
|
||||
{
|
||||
char *str;
|
||||
char file_name[512];
|
||||
PData *pd;
|
||||
/* set to defaults */
|
||||
config_check_dir();
|
||||
config_reset();
|
||||
/* load config */
|
||||
sprintf( file_name, "%s/%s", config.dir_name, CONFIG_FILE_NAME );
|
||||
if ( ( pd = parser_read_file( "config", file_name ) ) == 0 ) {
|
||||
fprintf( stderr, "%s\n", parser_get_error() );
|
||||
return;
|
||||
}
|
||||
/* assign */
|
||||
parser_get_int( pd, "set_id_local", &config.levelset_id_local );
|
||||
parser_get_int( pd, "set_count_local", &config.levelset_count_local );
|
||||
parser_get_int( pd, "set_id_home", &config.levelset_id_home );
|
||||
parser_get_int( pd, "set_count_home", &config.levelset_count_home );
|
||||
parser_get_int( pd, "player_count", &config.player_count );
|
||||
if ( parser_get_value( pd, "player0", &str, 0 ) )
|
||||
strcpy_lt( config.player_names[0], str, 31 );
|
||||
if ( parser_get_value( pd, "player1", &str, 0 ) )
|
||||
strcpy_lt( config.player_names[1], str, 31 );
|
||||
if ( parser_get_value( pd, "player2", &str, 0 ) )
|
||||
strcpy_lt( config.player_names[2], str, 31 );
|
||||
if ( parser_get_value( pd, "player3", &str, 0 ) )
|
||||
strcpy_lt( config.player_names[3], str, 31 );
|
||||
parser_get_int( pd, "diff", &config.diff );
|
||||
parser_get_int( pd, "starting_level", &config.startlevel );
|
||||
parser_get_int( pd, "rel_warp_limit", &config.rel_warp_limit );
|
||||
parser_get_int( pd, "add_bonus_levels", &config.addBonusLevels );
|
||||
parser_get_int( pd, "left", &config.k_left );
|
||||
parser_get_int( pd, "right", &config.k_right );
|
||||
parser_get_int( pd, "fire_left", &config.k_lfire );
|
||||
parser_get_int( pd, "fire_right", &config.k_rfire );
|
||||
parser_get_int( pd, "return", &config.k_return );
|
||||
parser_get_int( pd, "turbo", &config.k_turbo );
|
||||
parser_get_int( pd, "rel_motion", &config.rel_motion );
|
||||
parser_get_int( pd, "grab", &config.grab );
|
||||
parser_get_int( pd, "motion_mod", &config.i_motion_mod );
|
||||
config.motion_mod = 0.01 * config.i_motion_mod;
|
||||
parser_get_int( pd, "convex", &config.convex );
|
||||
parser_get_int( pd, "linear_corner", &config.linear_corner );
|
||||
parser_get_int( pd, "random_angle", &config.random_angle );
|
||||
parser_get_int( pd, "maxballspeed", &config.maxballspeed_int1000 );
|
||||
config.maxballspeed_float = (float)config.maxballspeed_int1000 / 1000;
|
||||
parser_get_int( pd, "invert", &config.invert );
|
||||
parser_get_int( pd, "sound", &config.sound );
|
||||
parser_get_int( pd, "volume", &config.volume );
|
||||
parser_get_int( pd, "speech", &config.speech );
|
||||
parser_get_int( pd, "badspeech", &config.badspeech );
|
||||
parser_get_int( pd, "audio_buffer_size", &config.audio_buffer_size );
|
||||
parser_get_int( pd, "anim", &config.anim );
|
||||
parser_get_int( pd, "fullscreen", &config.fullscreen );
|
||||
parser_get_int( pd, "fade", &config.fade );
|
||||
parser_get_int( pd, "bonus_info", &config.bonus_info );
|
||||
parser_get_int( pd, "fps", &config.fps );
|
||||
parser_get_int( pd, "ball_level", &config.ball_level );
|
||||
parser_get_int( pd, "debris_level", &config.debris_level );
|
||||
parser_get_int( pd, "i_key_speed", &config.i_key_speed );
|
||||
config.key_speed = 0.001 * config.i_key_speed;
|
||||
parser_get_int( pd, "use_hints", &config.use_hints );
|
||||
parser_get_int( pd, "return_on_click", &config.return_on_click );
|
||||
parser_get_int( pd, "theme_id", &config.theme_id );
|
||||
parser_get_int( pd, "theme_count", &config.theme_count );
|
||||
if ( parser_get_value( pd, "server", &str, 0 ) )
|
||||
strcpy_lt( config.server, str, 64 );
|
||||
if ( parser_get_value( pd, "local_port", &str, 0 ) )
|
||||
strcpy_lt( config.local_port, str, 6 );
|
||||
if ( parser_get_value( pd, "username", &str, 0 ) )
|
||||
strcpy_lt( config.username, str, 15 );
|
||||
parser_get_int( pd, "mp_diff", &config.mp_diff );
|
||||
parser_get_int( pd, "mp_rounds", &config.mp_rounds );
|
||||
parser_get_int( pd, "mp_frags", &config.mp_frags );
|
||||
parser_get_int( pd, "mp_balls", &config.mp_balls );
|
||||
parser_free( &pd );
|
||||
}
|
||||
|
||||
/* save config */
|
||||
void config_save( )
|
||||
{
|
||||
FILE *file = 0;
|
||||
char file_name[512];
|
||||
|
||||
sprintf( file_name, "%s/%s", config.dir_name, CONFIG_FILE_NAME );
|
||||
if ( ( file = fopen( file_name, "w" ) ) == 0 )
|
||||
fprintf( stderr, "Cannot access config file '%s' to save settings\n", file_name );
|
||||
else {
|
||||
fprintf( file, "@\n" );
|
||||
fprintf( file, "set_id_local»%i\n", config.levelset_id_local );
|
||||
fprintf( file, "set_count_local»%i\n", config.levelset_count_local );
|
||||
fprintf( file, "set_id_home»%i\n", config.levelset_id_home );
|
||||
fprintf( file, "set_count_home»%i\n", config.levelset_count_home );
|
||||
fprintf( file, "player_count»%i\n", config.player_count );
|
||||
fprintf( file, "player0»%s\n", config.player_names[0] );
|
||||
fprintf( file, "player1»%s\n", config.player_names[1] );
|
||||
fprintf( file, "player2»%s\n", config.player_names[2] );
|
||||
fprintf( file, "player3»%s\n", config.player_names[3] );
|
||||
fprintf( file, "diff»%i\n", config.diff );
|
||||
fprintf( file, "starting_level»%i\n", config.startlevel );
|
||||
fprintf( file, "rel_warp_limit»%i\n", config.rel_warp_limit );
|
||||
fprintf( file, "add_bonus_levels»%i\n", config.addBonusLevels );
|
||||
fprintf( file, "left»%i\n", config.k_left );
|
||||
fprintf( file, "right»%i\n", config.k_right );
|
||||
fprintf( file, "fire_left»%i\n", config.k_lfire );
|
||||
fprintf( file, "fire_right»%i\n", config.k_rfire );
|
||||
fprintf( file, "return»%i\n", config.k_return );
|
||||
fprintf( file, "turbo»%i\n", config.k_turbo );
|
||||
fprintf( file, "rel_motion»%i\n", config.rel_motion );
|
||||
fprintf( file, "grab»%i\n", config.grab );
|
||||
fprintf( file, "motion_mod»%i\n", config.i_motion_mod);
|
||||
fprintf( file, "convex»%i\n", config.convex );
|
||||
fprintf( file, "linear_corner»%i\n", config.linear_corner );
|
||||
fprintf( file, "random_angle»%i\n", config.random_angle );
|
||||
fprintf( file, "maxballspeed»%i\n", config.maxballspeed_int1000 );
|
||||
fprintf( file, "invert»%i\n", config.invert );
|
||||
fprintf( file, "sound»%i\n", config.sound );
|
||||
fprintf( file, "volume»%i\n", config.volume );
|
||||
fprintf( file, "speech»%i\n", config.speech );
|
||||
fprintf( file, "badspeech»%i\n", config.badspeech );
|
||||
fprintf( file, "audio_buffer_size»%i\n", config.audio_buffer_size );
|
||||
fprintf( file, "anim»%i\n", config.anim );
|
||||
fprintf( file, "fullscreen»%i\n", config.fullscreen );
|
||||
fprintf( file, "fade»%i\n", config.fade );
|
||||
fprintf( file, "bonus_info»%i\n", config.bonus_info );
|
||||
fprintf( file, "fps»%i\n", config.fps );
|
||||
fprintf( file, "ball_level»%i\n", config.ball_level );
|
||||
fprintf( file, "debris_level»%i\n", config.debris_level );
|
||||
fprintf( file, "i_key_speed»%i\n", config.i_key_speed );
|
||||
fprintf( file, "use_hints»%i\n", config.use_hints );
|
||||
fprintf( file, "return_on_click»%i\n", config.return_on_click );
|
||||
fprintf( file, "theme_id»%i\n", config.theme_id );
|
||||
fprintf( file, "theme_count»%i\n", config.theme_count );
|
||||
fprintf( file, "server»%s\n", config.server );
|
||||
fprintf( file, "local_port»%s\n", config.local_port );
|
||||
fprintf( file, "username»%s\n", config.username );
|
||||
fprintf( file, "mp_diff»%i\n", config.mp_diff );
|
||||
fprintf( file, "mp_rounds»%i\n", config.mp_rounds );
|
||||
fprintf( file, "mp_frags»%i\n", config.mp_frags );
|
||||
fprintf( file, "mp_balls»%i\n", config.mp_balls );
|
||||
}
|
||||
}
|
||||
103
project/jni/application/lbreakout2/client/config.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/***************************************************************************
|
||||
config.h - description
|
||||
-------------------
|
||||
begin : Tue Feb 13 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
/* configure struct */
|
||||
enum { BALL_BELOW_BONUS = 0, BALL_ABOVE_BONUS };
|
||||
enum { DEBRIS_BELOW_BALL = 0, DEBRIS_ABOVE_BALL };
|
||||
typedef struct {
|
||||
/* directory to save config and saved games */
|
||||
char dir_name[512];
|
||||
/* levels */
|
||||
int levelset_id_local;
|
||||
int levelset_count_local; /* save number of local game levelsets
|
||||
for safety (to reset id if count changed) */
|
||||
int levelset_id_home;
|
||||
int levelset_count_home; /* save number of levelsets for safety
|
||||
(to reset id if count changed) */
|
||||
/* players */
|
||||
int player_count;
|
||||
char player_names[4][32];
|
||||
/* game */
|
||||
int diff; /* diffculty */
|
||||
int startlevel;
|
||||
int rel_warp_limit; /* percentage of bricks required to be destroyed
|
||||
before player may proceed to next level */
|
||||
int addBonusLevels; /* add some bonus levels */
|
||||
/* controls */
|
||||
int k_left;
|
||||
int k_right;
|
||||
int k_lfire;
|
||||
int k_rfire;
|
||||
int k_return; /* return ball on click on this key */
|
||||
int k_turbo; /* double paddle speed while this key is pressed */
|
||||
int k_warp; /* warp to next level */
|
||||
int k_maxballspeed; /* go to maximum ball speed (while pressed) */
|
||||
int rel_motion; /* use relative mouse motion; motion_mod and invert need this enabled */
|
||||
int grab; /* keep mouse in window */
|
||||
int i_motion_mod; /* motion_mod * 100 used to modify in the menu */
|
||||
double motion_mod; /* multiplied with relative motion */
|
||||
int convex;
|
||||
int invert;
|
||||
double key_speed; /* move with key_speed pix per sec when keys are used */
|
||||
int linear_corner; /* assume a 45° line for corner? */
|
||||
int random_angle;
|
||||
int maxballspeed_int1000; /* max ball speed in pixels/second */
|
||||
float maxballspeed_float; /* per millisecond */
|
||||
/* sound */
|
||||
int sound;
|
||||
int volume; /* 1 - 8 */
|
||||
int speech; /* enable speech? */
|
||||
int badspeech; /* if speech allowed, allow swearing? */
|
||||
int audio_buffer_size;
|
||||
/* graphics */
|
||||
int anim;
|
||||
int fullscreen;
|
||||
int fade;
|
||||
int bonus_info;
|
||||
int fps; /* frames per second: 0 - no limit, 1 - 50, 2 - 100, 3 - 200 */
|
||||
int ball_level;
|
||||
int debris_level;
|
||||
int i_key_speed; /* integer value that is devided by 100 to get real key_speed */
|
||||
/* various */
|
||||
int use_hints;
|
||||
int return_on_click; /* autoreturn on click if true else automatically */
|
||||
int theme_id; /* 0 == default theme */
|
||||
int theme_count; /* to check and properly reset id if number of themes changed */
|
||||
/* multiplayer */
|
||||
char server[64]; /* ip:port */
|
||||
char local_port[8]; /* where to bind local UDP socket */
|
||||
char username[16]; /* username at server */
|
||||
int mp_diff; /* difficulty */
|
||||
int mp_rounds; /* rounds per level in a levelset */
|
||||
int mp_frags; /* points a player needs to win a round */
|
||||
int mp_balls; /* maximum number of balls a player may fire */
|
||||
int recv_limit; /* number of packets parsed in one go */
|
||||
} Config;
|
||||
|
||||
/* set config to default */
|
||||
void config_reset();
|
||||
|
||||
/* load config */
|
||||
void config_load( );
|
||||
|
||||
/* save config */
|
||||
void config_save( );
|
||||
|
||||
#endif
|
||||
124
project/jni/application/lbreakout2/client/credit.c
Normal file
@@ -0,0 +1,124 @@
|
||||
/***************************************************************************
|
||||
credit.c - description
|
||||
-------------------
|
||||
begin : Thu Sep 13 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "credit.h"
|
||||
|
||||
extern SDL_Surface *stk_display;
|
||||
extern StkFont *font;
|
||||
extern SDL_Surface *offscreen;
|
||||
|
||||
SDL_Surface *credit_bkgnd = 0;
|
||||
float credit_alpha;
|
||||
float credit_pms = 0.5;
|
||||
int credit_cur;
|
||||
int credit_time = 2000;
|
||||
int credit_x, credit_y, credit_w, credit_h;
|
||||
char credit_str[64];
|
||||
int credit_status;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Initiate credit.
|
||||
====================================================================
|
||||
*/
|
||||
void credit_init( char *name, char *author, int level, int level_count )
|
||||
{
|
||||
credit_cur = 0; credit_alpha = 0; credit_status = 0;
|
||||
|
||||
/* string */
|
||||
if ( level_count > 0 )
|
||||
sprintf( credit_str, "%s (%i/%i) - %s", name,
|
||||
level + 1, level_count, author );
|
||||
else
|
||||
sprintf( credit_str, "%s (%i) - %s", name, level + 1, author );
|
||||
|
||||
/* position */
|
||||
credit_w = stk_font_string_width( font, credit_str ) + 4;
|
||||
credit_h = font->height + 4;
|
||||
credit_x = (stk_display->w - credit_w) / 2;
|
||||
credit_y = (stk_display->h - credit_h) / 2;
|
||||
|
||||
/* background */
|
||||
if ( credit_bkgnd ) SDL_FreeSurface( credit_bkgnd );
|
||||
credit_bkgnd = stk_surface_create( SDL_SWSURFACE, credit_w, credit_h );
|
||||
SDL_SetColorKey( credit_bkgnd, 0, 0 );
|
||||
stk_surface_fill( credit_bkgnd, 0,0,-1,-1, 0x0 );
|
||||
}
|
||||
void credit_clear()
|
||||
{
|
||||
stk_surface_free( &credit_bkgnd );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Show/Hide credits
|
||||
====================================================================
|
||||
*/
|
||||
void credit_hide()
|
||||
{
|
||||
if (credit_status == 3) return;
|
||||
stk_surface_blit( offscreen,
|
||||
credit_x, credit_y, credit_w, credit_h,
|
||||
stk_display, credit_x, credit_y );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
void credit_show( )
|
||||
{
|
||||
if (credit_status == 3) return;
|
||||
if ( credit_bkgnd )
|
||||
stk_surface_alpha_blit( credit_bkgnd, 0, 0,
|
||||
credit_w, credit_h, stk_display,
|
||||
credit_x, credit_y, credit_alpha / 2 );
|
||||
font->align = STK_FONT_ALIGN_LEFT | STK_FONT_ALIGN_TOP;
|
||||
stk_font_write(font, stk_display, credit_x + 2, credit_y + 2,
|
||||
(int)credit_alpha, credit_str );
|
||||
font->align = STK_FONT_ALIGN_CENTER_X | STK_FONT_ALIGN_CENTER_Y;
|
||||
}
|
||||
void credit_alphashow( int alpha )
|
||||
{
|
||||
if (credit_status == 3) return;
|
||||
font->align = STK_FONT_ALIGN_LEFT | STK_FONT_ALIGN_TOP;
|
||||
stk_font_write(font, stk_display, credit_x + 2, credit_y + 2,
|
||||
(int)alpha, credit_str );
|
||||
font->align = STK_FONT_ALIGN_CENTER_X | STK_FONT_ALIGN_CENTER_Y;
|
||||
}
|
||||
void credit_update( int ms )
|
||||
{
|
||||
/* appearing */
|
||||
if (credit_status == 0) {
|
||||
credit_alpha += credit_pms * ms;
|
||||
if (credit_alpha >= 255 ) {
|
||||
credit_status = 1;
|
||||
credit_alpha = 255;
|
||||
}
|
||||
}
|
||||
else
|
||||
/* visible */
|
||||
if (credit_status == 1) {
|
||||
credit_cur += ms;
|
||||
if (credit_cur > credit_time)
|
||||
credit_status = 2;
|
||||
}
|
||||
else
|
||||
/* disappearing */
|
||||
if (credit_status == 2) {
|
||||
credit_alpha -= credit_pms * ms;
|
||||
if (credit_alpha <= 0)
|
||||
credit_status = 3;
|
||||
}
|
||||
/* credit_status == 3 means credit disappeared */
|
||||
}
|
||||
33
project/jni/application/lbreakout2/client/credit.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/***************************************************************************
|
||||
credit.h - description
|
||||
-------------------
|
||||
begin : Thu Sep 13 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Initiate credit.
|
||||
====================================================================
|
||||
*/
|
||||
void credit_init( char *name, char *author, int level, int level_count );
|
||||
void credit_clear();
|
||||
/*
|
||||
====================================================================
|
||||
Show/Hide credits
|
||||
====================================================================
|
||||
*/
|
||||
void credit_hide();
|
||||
void credit_show();
|
||||
void credit_alphashow( int alpha );
|
||||
void credit_update( int ms );
|
||||
194
project/jni/application/lbreakout2/client/display.c
Normal file
@@ -0,0 +1,194 @@
|
||||
/***************************************************************************
|
||||
display.c - description
|
||||
-------------------
|
||||
begin : Thu Sep 6 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "display.h"
|
||||
|
||||
extern SDL_Surface *offscreen;
|
||||
extern SDL_Surface *stk_display;
|
||||
extern StkFont *display_font;
|
||||
extern StkFont *display_highlight_font;
|
||||
|
||||
List *displays = 0;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Locals
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Delete a display
|
||||
====================================================================
|
||||
*/
|
||||
void display_delete( void *ptr )
|
||||
{
|
||||
Display *display = ptr;
|
||||
if ( display ) {
|
||||
stk_surface_free( &display->surf );
|
||||
free( display );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Publics
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Add a display. The display is cleared by displays_clear() so
|
||||
the returned display is just a pointer.
|
||||
The contents of the display is 'text'+'value'. Both may be changed
|
||||
with the display_set_text/value() functions.
|
||||
'digits' is the maxium size of 'value'
|
||||
====================================================================
|
||||
*/
|
||||
Display* displays_add( int x, int y, int w, int h, char *text, int value, int digits )
|
||||
{
|
||||
Display *display = 0;
|
||||
if ( displays == 0 )
|
||||
displays = list_create( LIST_AUTO_DELETE, display_delete );
|
||||
display = calloc( 1, sizeof( Display ) );
|
||||
if ( display == 0 ) return 0;
|
||||
if ( ( display->surf = stk_surface_create( SDL_SWSURFACE,w,h ) ) == 0 ) {
|
||||
free( display );
|
||||
return 0;
|
||||
}
|
||||
SDL_SetColorKey( display->surf, 0, 0 );
|
||||
display->use_alpha = 1;
|
||||
display->x = x;
|
||||
display->y = y;
|
||||
display->w = w;
|
||||
display->h = h;
|
||||
display->digits = digits;
|
||||
strcpy( display->text, text );
|
||||
display->value = value;
|
||||
display->cur_value = value;
|
||||
list_add( displays, display );
|
||||
return display;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Remove all displays
|
||||
====================================================================
|
||||
*/
|
||||
void displays_clear()
|
||||
{
|
||||
if ( displays ) {
|
||||
list_delete( displays );
|
||||
displays = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Draw displays
|
||||
====================================================================
|
||||
*/
|
||||
void displays_hide()
|
||||
{
|
||||
Display *display;
|
||||
if ( displays == 0 ) return;
|
||||
list_reset( displays );
|
||||
while ( ( display = list_next( displays ) ) ) {
|
||||
stk_surface_blit(offscreen, display->x, display->y,
|
||||
display->w, display->h,
|
||||
stk_display, display->x, display->y );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
}
|
||||
void displays_show()
|
||||
{
|
||||
int i;
|
||||
char str[64], numstr[10];
|
||||
StkFont *font;
|
||||
Display *display;
|
||||
if ( displays == 0 ) return;
|
||||
list_reset( displays );
|
||||
display_font->align = STK_FONT_ALIGN_LEFT | STK_FONT_ALIGN_TOP;
|
||||
display_highlight_font->align = STK_FONT_ALIGN_LEFT | STK_FONT_ALIGN_TOP;
|
||||
while ( ( display = list_next( displays ) ) ) {
|
||||
if (display->is_highlighted)
|
||||
font = display_highlight_font;
|
||||
else
|
||||
font = display_font;
|
||||
strcpy( str, display->text );
|
||||
if ( display->digits > 0 ) {
|
||||
sprintf( numstr, "%i", (int)display->cur_value );
|
||||
for ( i = 0; i < display->digits - strlen( numstr ); i++ )
|
||||
strcat( str, " " );
|
||||
strcat( str, numstr );
|
||||
}
|
||||
if ( display->use_alpha ) {
|
||||
stk_surface_alpha_blit( display->surf, 0,0,
|
||||
display->w, display->h,
|
||||
stk_display, display->x, display->y, 128 );
|
||||
}
|
||||
stk_font_write( font, stk_display,
|
||||
display->x + 2, display->y + 1, -1, str );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Update displays
|
||||
====================================================================
|
||||
*/
|
||||
void displays_update( int ms )
|
||||
{
|
||||
float change;
|
||||
Display *display;
|
||||
if ( displays == 0 ) return;
|
||||
list_reset( displays );
|
||||
while ( ( display = list_next( displays ) ) ) {
|
||||
if ( (int)display->cur_value == display->value ) continue;
|
||||
/* change relative as for big display->cur_values we must count faster */
|
||||
change = ( display->value - display->cur_value ) / 200;
|
||||
if ( change > 0 && change < 0.6 ) change = 0.6;
|
||||
if ( change < 0 && change > -0.6 ) change = -0.6;
|
||||
display->cur_value += change * ms;
|
||||
if ( change > 0 && display->cur_value > display->value )
|
||||
display->cur_value = display->value;
|
||||
if ( change < 0 && display->cur_value < display->value )
|
||||
display->cur_value = display->value;
|
||||
}
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Modify display
|
||||
====================================================================
|
||||
*/
|
||||
void display_set_text( Display *display, char *text )
|
||||
{
|
||||
strcpy( display->text, text );
|
||||
}
|
||||
void display_set_value( Display *display, int value )
|
||||
{
|
||||
display->value = value;
|
||||
}
|
||||
void display_set_value_directly( Display *display, int value )
|
||||
{
|
||||
display->cur_value = value; /* no smooth approaching of the dest value */
|
||||
display->value = value;
|
||||
}
|
||||
void display_set_highlight( Display *display, int on )
|
||||
{
|
||||
display->is_highlighted = on;
|
||||
}
|
||||
75
project/jni/application/lbreakout2/client/display.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/***************************************************************************
|
||||
display.h - description
|
||||
-------------------
|
||||
begin : Thu Sep 6 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __DISPLAY_H
|
||||
#define __DISPLAY_H
|
||||
|
||||
typedef struct {
|
||||
SDL_Surface *surf;
|
||||
int x, y, w, h;
|
||||
char text[32];
|
||||
int digits;
|
||||
int value;
|
||||
float cur_value; /* smoothly approximates destination 'value' */
|
||||
int use_alpha; /* if true we darken the background a bit. this
|
||||
is true by default */
|
||||
int is_highlighted; /* use highlight font */
|
||||
} Display;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Add a display. The display is cleared by displays_clear() so
|
||||
the returned display is just a pointer.
|
||||
The contents of the display is 'text'+'value'. Both may be changed
|
||||
with the display_set_text/value() functions.
|
||||
'digits' is the maxium size of 'value'
|
||||
====================================================================
|
||||
*/
|
||||
Display* displays_add( int x, int y, int w, int h, char *text, int value, int digits );
|
||||
/*
|
||||
====================================================================
|
||||
Remove all displays
|
||||
====================================================================
|
||||
*/
|
||||
void displays_clear();
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Draw displays
|
||||
====================================================================
|
||||
*/
|
||||
void displays_hide();
|
||||
void displays_show();
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Update displays
|
||||
====================================================================
|
||||
*/
|
||||
void displays_update( int ms );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Modify display
|
||||
====================================================================
|
||||
*/
|
||||
void display_set_text( Display *display, char *text );
|
||||
void display_set_value( Display *display, int value );
|
||||
void display_set_value_directly( Display *display, int value );
|
||||
void display_set_highlight( Display *display, int on );
|
||||
|
||||
#endif
|
||||
822
project/jni/application/lbreakout2/client/editor.c
Normal file
@@ -0,0 +1,822 @@
|
||||
/***************************************************************************
|
||||
editor.c - description
|
||||
-------------------
|
||||
begin : Fri Oct 12 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "../game/game.h"
|
||||
#include "game.h"
|
||||
#include "config.h"
|
||||
#include "bricks.h"
|
||||
#include "frame.h"
|
||||
#include "editor.h"
|
||||
|
||||
SDL_Surface *sel_frame = 0, *buttons = 0;
|
||||
SDL_Surface *editor_bkgnd = 0; /* background (black with frame) of editor */
|
||||
char edit_file_name[512]; /* full path of edited file */
|
||||
Level *edit_levels[MAX_LEVELS]; /* editor levels */
|
||||
char edit_version[16]; /* version of edited set */
|
||||
int edit_level_count; /* how many levels currently used? */
|
||||
int edit_cur_level_id;
|
||||
Level *edit_cur_level; /* current level modified */
|
||||
enum { EDITOR_BRICK, EDITOR_EXTRA };
|
||||
int edit_sel_type; /* type of selected tile */
|
||||
int edit_sel_id; /* brick or extra id */
|
||||
int edit_sel_x, edit_sel_y; /* position in map of selected tile */
|
||||
int edit_tile_x = 1, edit_tile_y = 20, edit_tile_w = MAP_WIDTH - 2, edit_tile_h = 3; /* part where either bricks ro bonuses
|
||||
are displayed */
|
||||
int extra_vis; /* extras currently shown? blinks. */
|
||||
int first_swap_level = -1; /* if not -1 this and the current level will be swapped
|
||||
next time the button is pressed */
|
||||
enum {
|
||||
/* tiles */
|
||||
BUTTON_NONE = 0,
|
||||
BUTTON_FIRST_BRICK,
|
||||
BUTTON_LAST_BRICK = BUTTON_FIRST_BRICK + ( BRICK_COUNT ),
|
||||
BUTTON_FIRST_EXTRA,
|
||||
BUTTON_LAST_EXTRA = BUTTON_FIRST_EXTRA + ( EX_NUMBER -1 ),
|
||||
BUTTON_EDIT,
|
||||
BUTTON_EDIT_AUTHOR,
|
||||
BUTTON_EDIT_NAME,
|
||||
/* buttons */
|
||||
BUTTON_FIRST,
|
||||
BUTTON_NEXT,
|
||||
BUTTON_PREV,
|
||||
BUTTON_CLEAR,
|
||||
BUTTON_SWAP,
|
||||
BUTTON_ADD,
|
||||
BUTTON_INSERT,
|
||||
BUTTON_DELETE,
|
||||
BUTTON_VERSION,
|
||||
BUTTON_LOAD,
|
||||
BUTTON_SAVE,
|
||||
BUTTON_PLAY
|
||||
};
|
||||
int edit_buttons[MAP_WIDTH][MAP_HEIGHT]; /* an action is assigned to each map tile */
|
||||
/* externals */
|
||||
extern SDL_Surface *stk_display;
|
||||
extern SDL_Surface *frame;
|
||||
extern SDL_Surface *extra_pic;
|
||||
extern SDL_Surface *brick_pic;
|
||||
extern StkFont *mfont; /* use menu's font to draw status */
|
||||
extern StkFont *font; /* use game's font to confirm */
|
||||
extern Config config;
|
||||
extern int stk_quit_request;
|
||||
|
||||
/* extra conversion table may be found in bricks.c */
|
||||
extern Extra_Conv extra_conv_table[EX_NUMBER];
|
||||
extern Brick_Conv brick_conv_table[BRICK_COUNT];
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Locals
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
We had a right click into the tile region so check and change the
|
||||
bricks displayed there. We select the first new tile and set
|
||||
edit_sel_id, edit_sel_x, edit_sel_y. The full update is initated
|
||||
by editor_handle_click().
|
||||
====================================================================
|
||||
*/
|
||||
void editor_switch_tiles()
|
||||
{
|
||||
int x_off = 2, y_off = 20, len = MAP_WIDTH - x_off * 2; /* offset in map of tiles, len is the number of tiles in one line */
|
||||
int i, j;
|
||||
/* clear edit buttons */
|
||||
for ( i = edit_tile_x; i < edit_tile_x + edit_tile_w; i++ )
|
||||
for ( j = edit_tile_y; j < edit_tile_y + edit_tile_h; j++ )
|
||||
edit_buttons[i][j] = BUTTON_NONE;
|
||||
/* clear this part of the editor bkjgnd */
|
||||
stk_surface_fill( editor_bkgnd,
|
||||
edit_tile_x * BRICK_WIDTH, edit_tile_y * BRICK_HEIGHT,
|
||||
edit_tile_w * BRICK_WIDTH, edit_tile_h * BRICK_HEIGHT, 0x0 );
|
||||
/* switch */
|
||||
if ( edit_sel_type == EDITOR_BRICK ) {
|
||||
/* flag */
|
||||
edit_sel_type = EDITOR_EXTRA;
|
||||
/* button map & background */
|
||||
i = 0; j = 0;
|
||||
while ( i + j * len < EX_NUMBER ) {
|
||||
edit_buttons[x_off + i][y_off + j] = BUTTON_FIRST_EXTRA + i + j * len;
|
||||
stk_surface_blit( extra_pic, ( i + j * len ) * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
editor_bkgnd, ( i + x_off ) * BRICK_WIDTH, ( j + y_off ) * BRICK_HEIGHT );
|
||||
i++;
|
||||
if ( i == len ) {
|
||||
i = 0;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
/* select first tile */
|
||||
edit_sel_id = 0;
|
||||
edit_sel_x = x_off;
|
||||
edit_sel_y = y_off;
|
||||
}
|
||||
else {
|
||||
/* flag */
|
||||
edit_sel_type = EDITOR_BRICK;
|
||||
/* button map & background */
|
||||
i = 0; j = 0;
|
||||
while ( i + j * len < BRICK_COUNT ) {
|
||||
edit_buttons[x_off + i][y_off + j] = BUTTON_FIRST_BRICK + i + j * len;
|
||||
stk_surface_blit( brick_pic, ( i + j * len ) * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
editor_bkgnd, ( i + x_off ) * BRICK_WIDTH, ( j + y_off ) * BRICK_HEIGHT );
|
||||
i++;
|
||||
if ( i == len ) {
|
||||
i = 0;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
/* select first tile */
|
||||
edit_sel_id = 0;
|
||||
edit_sel_x = x_off;
|
||||
edit_sel_y = y_off;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Draw a helping grid.
|
||||
====================================================================
|
||||
*/
|
||||
void editor_draw_grid()
|
||||
{
|
||||
SDL_Surface *buffer;
|
||||
int i, alpha;
|
||||
buffer = stk_surface_create( SDL_SWSURFACE, EDIT_WIDTH * BRICK_WIDTH, 1 );
|
||||
stk_surface_fill( buffer, 0,0,-1,-1, 0xffffff );
|
||||
stk_surface_blit( buffer, 0,0,-1,-1, editor_bkgnd, BRICK_WIDTH, BRICK_HEIGHT );
|
||||
stk_surface_blit( buffer, 0,0,-1,-1, editor_bkgnd, BRICK_WIDTH,
|
||||
( EDIT_HEIGHT + 1 ) * BRICK_HEIGHT - 1 );
|
||||
for ( i = 0; i < EDIT_HEIGHT - 1; i++ ) {
|
||||
if ( i == EDIT_HEIGHT / 2 - 1 )
|
||||
alpha = 192;
|
||||
else
|
||||
if ( i % (EDIT_HEIGHT/4) == 0 )
|
||||
alpha = 128;
|
||||
else
|
||||
alpha = 64;
|
||||
stk_surface_alpha_blit( buffer, 0,0,-1,-1, editor_bkgnd,
|
||||
BRICK_WIDTH, ( i + 1 ) * BRICK_HEIGHT + BRICK_HEIGHT - 1,
|
||||
alpha );
|
||||
}
|
||||
SDL_FreeSurface( buffer );
|
||||
buffer = stk_surface_create( SDL_SWSURFACE, 1, EDIT_HEIGHT * BRICK_HEIGHT );
|
||||
stk_surface_fill( buffer, 0,0,-1,-1, 0xffffff );
|
||||
stk_surface_blit( buffer, 0,0,-1,-1, editor_bkgnd, BRICK_WIDTH, BRICK_HEIGHT );
|
||||
stk_surface_blit( buffer, 0,0,-1,-1, editor_bkgnd,
|
||||
( EDIT_WIDTH + 1 ) * BRICK_WIDTH - 1, BRICK_HEIGHT );
|
||||
for ( i = 0; i < EDIT_WIDTH - 1; i++ ) {
|
||||
if ( i == EDIT_WIDTH / 2 - 1 )
|
||||
alpha = 192;
|
||||
else
|
||||
if ( i % (EDIT_WIDTH/4) == 0 )
|
||||
alpha = 128;
|
||||
else
|
||||
alpha = 64;
|
||||
stk_surface_alpha_blit( buffer, 0,0,-1,-1, editor_bkgnd,
|
||||
( i + 1 ) * BRICK_WIDTH + BRICK_WIDTH- 1, BRICK_HEIGHT,
|
||||
alpha );
|
||||
}
|
||||
SDL_FreeSurface( buffer );
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Translate the saved character strings into extra and brick indices
|
||||
for the editor.
|
||||
====================================================================
|
||||
*/
|
||||
enum { INDICES_2_CHAR, CHAR_2_INDICES };
|
||||
void editor_translate_level( Level *level, int type )
|
||||
{
|
||||
int i, j, k;
|
||||
if ( type == CHAR_2_INDICES ) {
|
||||
for ( i = 0; i < EDIT_WIDTH; i++ )
|
||||
for ( j = 0; j < EDIT_HEIGHT; j++ ) {
|
||||
/* bricks */
|
||||
for ( k = 0; k < BRICK_COUNT; k++ )
|
||||
if ( brick_conv_table[k].c == level->bricks[i][j] ) {
|
||||
level->bricks[i][j] = brick_conv_table[k].id;
|
||||
break;
|
||||
}
|
||||
if ( k == BRICK_COUNT ) level->bricks[i][j] = -1;
|
||||
/* extras */
|
||||
for ( k = 0; k < EX_NUMBER; k++ )
|
||||
if ( extra_conv_table[k].c == level->extras[i][j] ) {
|
||||
level->extras[i][j] = extra_conv_table[k].type;
|
||||
break;
|
||||
}
|
||||
if ( k == EX_NUMBER ) level->extras[i][j] = EX_NONE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* indices to characters */
|
||||
for ( i = 0; i < EDIT_WIDTH; i++ )
|
||||
for ( j = 0; j < EDIT_HEIGHT; j++ ) {
|
||||
/* bricks */
|
||||
if ( level->bricks[i][j] == -1 )
|
||||
level->bricks[i][j] = '.';
|
||||
else
|
||||
for ( k = 0; k < BRICK_COUNT; k++ )
|
||||
if ( level->bricks[i][j] == brick_conv_table[k].id ) {
|
||||
level->bricks[i][j] = brick_conv_table[k].c;
|
||||
break;
|
||||
}
|
||||
/* extras */
|
||||
if ( level->extras[i][j] == EX_NONE )
|
||||
level->extras[i][j] = '.';
|
||||
else
|
||||
for ( k = 0; k < EX_NUMBER; k++ )
|
||||
if ( level->extras[i][j] == extra_conv_table[k].type ) {
|
||||
level->extras[i][j] = extra_conv_table[k].c;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Draw name of set file, current level, current count, remaining
|
||||
levels, and other info stuff.
|
||||
====================================================================
|
||||
*/
|
||||
void editor_draw_status()
|
||||
{
|
||||
char str[512];
|
||||
int x = BRICK_WIDTH, y = ( MAP_HEIGHT - 1 ) * BRICK_HEIGHT - 2;
|
||||
int height = 10;
|
||||
/* locartion */
|
||||
sprintf( str, _("Location: %s"), edit_file_name );
|
||||
mfont->align = STK_FONT_ALIGN_LEFT | STK_FONT_ALIGN_TOP;
|
||||
stk_font_write( mfont, stk_display, x, y, STK_OPAQUE, str );
|
||||
/* current level */
|
||||
sprintf( str, _("Current Level: %i/%i (Free: %i)"), edit_cur_level_id + 1, edit_level_count, MAX_LEVELS - edit_level_count );
|
||||
mfont->align = STK_FONT_ALIGN_LEFT | STK_FONT_ALIGN_TOP;
|
||||
stk_font_write( mfont, stk_display, x, y + height, STK_OPAQUE, str );
|
||||
/* swap */
|
||||
mfont->align = STK_FONT_ALIGN_RIGHT | STK_FONT_ALIGN_TOP;
|
||||
if ( first_swap_level != -1 ) {
|
||||
sprintf( str, _("*** Level %i Marked For Swap ***"), first_swap_level + 1 );
|
||||
stk_font_write( mfont, stk_display, stk_display->w - BRICK_WIDTH, y + height, STK_OPAQUE, str );
|
||||
}
|
||||
else {
|
||||
/* version */
|
||||
sprintf( str, _("Version: %s "), edit_version );
|
||||
stk_font_write( mfont, stk_display, stk_display->w - BRICK_WIDTH, y + height, STK_OPAQUE, str );
|
||||
}
|
||||
/* name and author */
|
||||
mfont->align = STK_FONT_ALIGN_LEFT | STK_FONT_ALIGN_TOP;
|
||||
sprintf( str, _("Title: %s"), edit_cur_level->name );
|
||||
stk_font_write( mfont, stk_display, BRICK_WIDTH + 2, ( MAP_HEIGHT - 5 ) * BRICK_HEIGHT + 5, STK_OPAQUE, str );
|
||||
mfont->align = STK_FONT_ALIGN_RIGHT | STK_FONT_ALIGN_TOP;
|
||||
sprintf( str, _("Author: %s"), edit_cur_level->author );
|
||||
stk_font_write( mfont, stk_display, stk_display->w - BRICK_WIDTH - 2, ( MAP_HEIGHT - 5 ) * BRICK_HEIGHT + 5, STK_OPAQUE, str );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Draw brick and extra (if any) from screen map pos
|
||||
so it fits the editable field (no frame, no bottom).
|
||||
====================================================================
|
||||
*/
|
||||
void editor_draw_brick( int edit_map_x, int edit_map_y )
|
||||
{
|
||||
/* brick */
|
||||
if ( edit_cur_level->bricks[edit_map_x][edit_map_y] != -1 ) {
|
||||
if ( edit_cur_level->bricks[edit_map_x][edit_map_y] != INVIS_BRICK_ID )
|
||||
stk_surface_blit( brick_pic,
|
||||
edit_cur_level->bricks[edit_map_x][edit_map_y] * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display, (edit_map_x + 1) * BRICK_WIDTH, (edit_map_y + 1) * BRICK_HEIGHT );
|
||||
else
|
||||
stk_surface_fill( stk_display,
|
||||
(edit_map_x + 1) * BRICK_WIDTH, (edit_map_y + 1) * BRICK_HEIGHT,
|
||||
BRICK_WIDTH, BRICK_HEIGHT, 0x777777 );
|
||||
}
|
||||
else {
|
||||
stk_surface_blit( editor_bkgnd,
|
||||
(edit_map_x + 1) * BRICK_WIDTH, (edit_map_y + 1) * BRICK_HEIGHT,
|
||||
BRICK_WIDTH, BRICK_HEIGHT, stk_display,
|
||||
(edit_map_x + 1) * BRICK_WIDTH, (edit_map_y + 1) * BRICK_HEIGHT );
|
||||
}
|
||||
/* extra */
|
||||
if ( ( extra_vis || edit_sel_type == EDITOR_EXTRA ) && edit_cur_level->extras[edit_map_x][edit_map_y] != EX_NONE) {
|
||||
stk_surface_blit( extra_pic,
|
||||
( edit_cur_level->extras[edit_map_x][edit_map_y] ) * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display, (edit_map_x + 1) * BRICK_WIDTH, (edit_map_y + 1) * BRICK_HEIGHT );
|
||||
}
|
||||
stk_display_store_drect();
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Redraw and refresh full screen
|
||||
====================================================================
|
||||
*/
|
||||
void editor_full_update()
|
||||
{
|
||||
int i, j;
|
||||
/* background */
|
||||
stk_surface_blit( editor_bkgnd, 0,0,-1,-1, stk_display, 0,0 );
|
||||
/* bricks&extras */
|
||||
for ( i = 0; i < EDIT_WIDTH; i++ )
|
||||
for ( j = 0; j < EDIT_HEIGHT; j++ )
|
||||
editor_draw_brick( i, j );
|
||||
/* selection frame */
|
||||
stk_surface_blit( sel_frame, 0,0,-1,-1,
|
||||
stk_display, edit_sel_x * BRICK_WIDTH, edit_sel_y * BRICK_HEIGHT );
|
||||
/* status */
|
||||
editor_draw_status();
|
||||
/* refresh */
|
||||
stk_display_update( STK_UPDATE_ALL );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Do only redraw and refresh those bricks with an extra
|
||||
====================================================================
|
||||
*/
|
||||
void editor_update_extra_bricks()
|
||||
{
|
||||
int i, j;
|
||||
for ( i = 0; i < EDIT_WIDTH; i++ )
|
||||
for ( j = 0; j < EDIT_HEIGHT; j++ )
|
||||
if ( edit_cur_level->extras[i][j] != EX_NONE )
|
||||
editor_draw_brick( i, j );
|
||||
stk_display_update( STK_UPDATE_RECTS );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Free all editor levels
|
||||
====================================================================
|
||||
*/
|
||||
void editor_clear_levels()
|
||||
{
|
||||
int i;
|
||||
for ( i = 0; i < MAX_LEVELS; i++ )
|
||||
if ( edit_levels[i] ) level_delete( edit_levels[i] );
|
||||
memset( edit_levels, 0, sizeof( Level* ) * MAX_LEVELS );
|
||||
edit_level_count = 0;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Save/load levels to/from editor file.
|
||||
====================================================================
|
||||
*/
|
||||
void editor_load_levels()
|
||||
{
|
||||
int i, version, update;
|
||||
Level *level;
|
||||
FILE *file = 0;
|
||||
/* clear levels first */
|
||||
editor_clear_levels();
|
||||
/* read levels while there are some in it */
|
||||
edit_level_count = 0;
|
||||
if ( ( file = fopen( edit_file_name, "rb" ) ) != 0 ) {
|
||||
levelset_get_version( file, &version, &update );
|
||||
sprintf( edit_version, "%i.%02i", version, update );
|
||||
while ( ( level = level_load( file ) ) != 0 )
|
||||
edit_levels[edit_level_count++] = level;
|
||||
fclose( file );
|
||||
}
|
||||
/* if we got no level at all create an empty one */
|
||||
if ( edit_level_count == 0 ) {
|
||||
edit_level_count = 1;
|
||||
edit_levels[0] = level_create_empty( _("noname"), _("untitled") );
|
||||
}
|
||||
/* translate the character strings to editor info */
|
||||
for ( i = 0; i < edit_level_count; i++ )
|
||||
editor_translate_level( edit_levels[i], CHAR_2_INDICES );
|
||||
}
|
||||
void editor_save_levels()
|
||||
{
|
||||
FILE *file = 0;
|
||||
int i, j, k;
|
||||
Level *level = 0;
|
||||
/* convert */
|
||||
for ( i = 0; i < edit_level_count; i++ )
|
||||
editor_translate_level( edit_levels[i], INDICES_2_CHAR );
|
||||
/* save */
|
||||
if ( ( file = fopen( edit_file_name, "w" ) ) != 0 ) {
|
||||
fprintf( file, "Version: %s\n", edit_version );
|
||||
for ( i = 0; i < edit_level_count; i++ ) {
|
||||
level = edit_levels[i];
|
||||
/* save level */
|
||||
fprintf( file, "Level:\n%s\n%s\nBricks:\n", level->author, level->name );
|
||||
for ( j = 0; j < EDIT_HEIGHT; j++ ) {
|
||||
for ( k = 0; k < EDIT_WIDTH; k++ )
|
||||
fprintf( file, "%c", level->bricks[k][j] );
|
||||
fprintf( file, "\n" );
|
||||
}
|
||||
fprintf( file, "Bonus:\n" );
|
||||
for ( j = 0; j < EDIT_HEIGHT; j++ ) {
|
||||
for ( k = 0; k < EDIT_WIDTH; k++ )
|
||||
fprintf( file, "%c", level->extras[k][j] );
|
||||
fprintf( file, "\n" );
|
||||
}
|
||||
}
|
||||
fclose( file );
|
||||
}
|
||||
/* convert back */
|
||||
for ( i = 0; i < edit_level_count; i++ )
|
||||
editor_translate_level( edit_levels[i], CHAR_2_INDICES );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Handle button action
|
||||
====================================================================
|
||||
*/
|
||||
void editor_handle_button( int type, int *full_update ) {
|
||||
Level *dummy_ptr;
|
||||
int old_pos;
|
||||
int version, update;
|
||||
char *name, *author;
|
||||
int i;
|
||||
switch ( type ) {
|
||||
case BUTTON_FIRST:
|
||||
edit_cur_level_id = 0;
|
||||
edit_cur_level = edit_levels[0];
|
||||
*full_update = 1;
|
||||
break;
|
||||
case BUTTON_NEXT:
|
||||
edit_cur_level_id++;
|
||||
if ( edit_cur_level_id == edit_level_count ) edit_cur_level_id = 0;
|
||||
edit_cur_level = edit_levels[edit_cur_level_id];
|
||||
*full_update = 1;
|
||||
break;
|
||||
case BUTTON_PREV:
|
||||
edit_cur_level_id--;
|
||||
if ( edit_cur_level_id == -1 ) edit_cur_level_id = edit_level_count - 1;
|
||||
edit_cur_level = edit_levels[edit_cur_level_id];
|
||||
*full_update = 1;
|
||||
break;
|
||||
case BUTTON_SWAP:
|
||||
if ( first_swap_level == -1 ) {
|
||||
first_swap_level = edit_cur_level_id;
|
||||
*full_update = 1;
|
||||
}
|
||||
else {
|
||||
/* swap current and marked level */
|
||||
dummy_ptr = edit_levels[first_swap_level];
|
||||
edit_levels[first_swap_level] = edit_levels[edit_cur_level_id];
|
||||
edit_levels[edit_cur_level_id] = dummy_ptr;
|
||||
edit_cur_level = edit_levels[edit_cur_level_id];
|
||||
first_swap_level = -1;
|
||||
*full_update = 1;
|
||||
}
|
||||
break;
|
||||
case BUTTON_LOAD:
|
||||
if ( !confirm( font, _("Discard All Changes? y/n"), CONFIRM_YES_NO ) ) break;
|
||||
/* load levels and reset position if level doesn't exist */
|
||||
old_pos = edit_cur_level_id;
|
||||
editor_load_levels();
|
||||
if ( old_pos >= edit_level_count ) edit_cur_level_id = 0;
|
||||
edit_cur_level = edit_levels[edit_cur_level_id];
|
||||
first_swap_level = -1;
|
||||
*full_update = 1;
|
||||
break;
|
||||
case BUTTON_SAVE:
|
||||
if ( !confirm( font, _("Save Changes? y/n"), CONFIRM_YES_NO ) ) break;
|
||||
editor_save_levels();
|
||||
break;
|
||||
case BUTTON_CLEAR:
|
||||
if ( !confirm( font, _("Clear Level? y/n"), CONFIRM_YES_NO ) ) break;
|
||||
author = strdup( edit_cur_level->author );
|
||||
name = strdup( edit_cur_level->name );
|
||||
level_delete( edit_levels[edit_cur_level_id] );
|
||||
edit_levels[edit_cur_level_id] = level_create_empty( author, name );
|
||||
edit_cur_level = edit_levels[edit_cur_level_id];
|
||||
free( name ); free( author );
|
||||
*full_update = 1;
|
||||
break;
|
||||
case BUTTON_ADD:
|
||||
if ( edit_level_count == MAX_LEVELS ) break;
|
||||
if ( !confirm( font, _("Add Level? y/n"), CONFIRM_YES_NO ) ) break;
|
||||
edit_levels[edit_level_count] = level_create_empty( edit_levels[edit_level_count - 1]->author, edit_levels[edit_level_count - 1]->name );
|
||||
edit_level_count++;
|
||||
*full_update = 1;
|
||||
break;
|
||||
case BUTTON_INSERT:
|
||||
if ( edit_level_count == MAX_LEVELS ) break;
|
||||
if ( !confirm( font, _("Insert Level? y/n"), CONFIRM_YES_NO ) ) break;
|
||||
for ( i = edit_level_count; i > edit_cur_level_id; i-- )
|
||||
edit_levels[i] = edit_levels[i - 1];
|
||||
edit_level_count++;
|
||||
edit_levels[edit_cur_level_id] = level_create_empty( edit_cur_level->author, edit_cur_level->name );
|
||||
edit_cur_level = edit_levels[edit_cur_level_id];
|
||||
*full_update = 1;
|
||||
break;
|
||||
case BUTTON_DELETE:
|
||||
if ( edit_level_count == 1 ) break; /* last level may not be removed */
|
||||
if ( !confirm( font, _("Delete Level? y/n"), CONFIRM_YES_NO ) ) break;
|
||||
level_delete( edit_levels[edit_cur_level_id] );
|
||||
for ( i = edit_cur_level_id; i < edit_level_count - 1; i++ )
|
||||
edit_levels[i] = edit_levels[i + 1];
|
||||
edit_levels[i] = 0;
|
||||
edit_level_count--;
|
||||
if ( edit_cur_level_id >= edit_level_count )
|
||||
edit_cur_level_id = edit_level_count - 1;
|
||||
edit_cur_level = edit_levels[edit_cur_level_id];
|
||||
*full_update = 1;
|
||||
break;
|
||||
case BUTTON_PLAY:
|
||||
stk_display_fade( STK_FADE_OUT, STK_FADE_DEFAULT_TIME );
|
||||
/* translate */
|
||||
editor_translate_level( edit_cur_level, INDICES_2_CHAR );
|
||||
/* run */
|
||||
client_game_test_level( edit_cur_level );
|
||||
/* translate back */
|
||||
editor_translate_level( edit_cur_level, CHAR_2_INDICES );
|
||||
*full_update = 1;
|
||||
break;
|
||||
case BUTTON_VERSION:
|
||||
if ( enter_string( font, _("Levelset Version:"), edit_version, 8 ) ) {
|
||||
parse_version( edit_version, &version, &update );
|
||||
sprintf( edit_version, "%i.%02i", version, update );
|
||||
*full_update = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Handle a click on a map tile.
|
||||
If set is False a remove action was requested (only for
|
||||
editing)
|
||||
====================================================================
|
||||
*/
|
||||
int near_grow_brick( int x, int y ) {
|
||||
int i, j;
|
||||
for ( i = x - 1; i <= x + 1; i++ )
|
||||
for ( j = y - 1; j <= y + 1; j++ )
|
||||
if ( i != x || j != y )
|
||||
if ( i >= 0 && j >= 0 && i < EDIT_WIDTH && j < EDIT_HEIGHT )
|
||||
if ( edit_cur_level->bricks[i][j] == GROW_BRICK_ID )
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
void editor_handle_click( int x, int y, int set, int *full_update )
|
||||
{
|
||||
int sel = 0;
|
||||
int edit_x, edit_y;
|
||||
char str[32];
|
||||
/* if !set and within the tile field we perform a switch */
|
||||
if ( !set ) {
|
||||
if ( x >= edit_tile_x && y >= edit_tile_y && x < edit_tile_x + edit_tile_w && y < edit_tile_y + edit_tile_h ) {
|
||||
editor_switch_tiles();
|
||||
*full_update = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* the remaining stuff requires a tile at the position */
|
||||
if ( edit_buttons[x][y] == BUTTON_NONE ) return; /* no action */
|
||||
/* bricks */
|
||||
if ( edit_buttons[x][y] >= BUTTON_FIRST_BRICK && edit_buttons[x][y] <= BUTTON_LAST_BRICK ) {
|
||||
sel = 1;
|
||||
edit_sel_type = EDITOR_BRICK;
|
||||
edit_sel_id = edit_buttons[x][y] - BUTTON_FIRST_BRICK;
|
||||
}
|
||||
/* extras */
|
||||
if ( edit_buttons[x][y] >= BUTTON_FIRST_EXTRA && edit_buttons[x][y] <= BUTTON_LAST_EXTRA ) {
|
||||
sel = 1;
|
||||
edit_sel_type = EDITOR_EXTRA;
|
||||
edit_sel_id = edit_buttons[x][y] - BUTTON_FIRST_EXTRA;
|
||||
}
|
||||
/* edit field */
|
||||
if ( edit_buttons[x][y] == BUTTON_EDIT ) {
|
||||
edit_x = x - 1;
|
||||
edit_y = y - 1;
|
||||
if ( edit_sel_type == EDITOR_BRICK ) {
|
||||
if ( set ) {
|
||||
/* set brick */
|
||||
edit_cur_level->bricks[edit_x][edit_y] = edit_sel_id;
|
||||
*full_update = 1;
|
||||
}
|
||||
else {
|
||||
/* remove brick and extra if any */
|
||||
if ( edit_cur_level->bricks[edit_x][edit_y] != -1 ) {
|
||||
edit_cur_level->bricks[edit_x][edit_y] = -1;
|
||||
edit_cur_level->extras[edit_x][edit_y] = EX_NONE;
|
||||
*full_update = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( set ) {
|
||||
/* set extra - must be on a brick or beside a grow brick */
|
||||
if ( edit_cur_level->bricks[edit_x][edit_y] != -1 || near_grow_brick( edit_x, edit_y ) ) {
|
||||
edit_cur_level->extras[edit_x][edit_y] = edit_sel_id;
|
||||
*full_update = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* remove extra */
|
||||
if ( edit_cur_level->extras[edit_x][edit_y] != EX_NONE ) {
|
||||
edit_cur_level->extras[edit_x][edit_y] = EX_NONE;
|
||||
*full_update = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* buttons */
|
||||
editor_handle_button( edit_buttons[x][y], full_update );
|
||||
/* name&author */
|
||||
strcpy( str, "" );
|
||||
if ( edit_buttons[x][y] == BUTTON_EDIT_AUTHOR )
|
||||
if ( enter_string( font, _("Author's Name:"), str, 24 ) ) {
|
||||
snprintf( edit_cur_level->author, 31, "%s", str );
|
||||
*full_update = 1;
|
||||
}
|
||||
if ( edit_buttons[x][y] == BUTTON_EDIT_NAME )
|
||||
if ( enter_string( font, _("Title:"), str, 24 ) ) {
|
||||
snprintf( edit_cur_level->name, 31, "%s", str );
|
||||
*full_update = 1;
|
||||
}
|
||||
/* sel frame tile position */
|
||||
if ( sel ) {
|
||||
edit_sel_x = x;
|
||||
edit_sel_y = y;
|
||||
*full_update = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Publics
|
||||
====================================================================
|
||||
*/
|
||||
/*
|
||||
====================================================================
|
||||
Create/delete editor resources
|
||||
====================================================================
|
||||
*/
|
||||
void editor_create()
|
||||
{
|
||||
int i, j;
|
||||
/* clear all level pointers */
|
||||
memset( edit_levels, 0, sizeof( Level* ) * MAX_LEVELS );
|
||||
/* load sel frame */
|
||||
sel_frame = stk_surface_load( SDL_SWSURFACE, "sel_frame.png" );
|
||||
/* load buttons */
|
||||
buttons = stk_surface_load( SDL_SWSURFACE, "buttons.png" );
|
||||
/* background is black + frame */
|
||||
editor_bkgnd = stk_surface_create( SDL_SWSURFACE, stk_display->w, stk_display->h );
|
||||
SDL_SetColorKey( editor_bkgnd, 0, 0 );
|
||||
stk_surface_fill( editor_bkgnd, 0,0,-1,-1, 0x0 );
|
||||
/* add helping grid */
|
||||
editor_draw_grid();
|
||||
/* set actions */
|
||||
/* editable part */
|
||||
for ( i = 0; i < EDIT_WIDTH; i++ )
|
||||
for ( j = 0; j < EDIT_HEIGHT; j++ )
|
||||
edit_buttons[i + 1][j + 1] = BUTTON_EDIT;
|
||||
/* buttons */
|
||||
for ( i = 0; i < 11; i++ )
|
||||
edit_buttons[0][MAP_HEIGHT - 11 + i] = BUTTON_FIRST + i;
|
||||
edit_buttons[MAP_WIDTH - 1][MAP_HEIGHT - 1] = BUTTON_PLAY;
|
||||
/* name&author */
|
||||
for ( i = 1; i < MAP_WIDTH / 2; i++ )
|
||||
edit_buttons[i][MAP_HEIGHT - 5] = BUTTON_EDIT_NAME;
|
||||
for ( i = MAP_WIDTH / 2; i < MAP_WIDTH - 1; i++ )
|
||||
edit_buttons[i][MAP_HEIGHT - 5] = BUTTON_EDIT_AUTHOR;
|
||||
/* draw buttons */
|
||||
for ( i = 0; i < 11; i++ ) {
|
||||
stk_surface_blit( buttons, i * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
editor_bkgnd, 0, ( MAP_HEIGHT - 11 + i ) * BRICK_HEIGHT );
|
||||
}
|
||||
stk_surface_blit( buttons, 11 * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
editor_bkgnd,
|
||||
( MAP_WIDTH - 1 ) * BRICK_WIDTH,
|
||||
( MAP_HEIGHT - 1 ) * BRICK_HEIGHT );
|
||||
}
|
||||
void editor_delete()
|
||||
{
|
||||
stk_surface_free( &editor_bkgnd );
|
||||
stk_surface_free( &sel_frame );
|
||||
stk_surface_free( &buttons );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Initiate and clear stuff for each editor call.
|
||||
file_name is the name of the edited file in home directory.
|
||||
====================================================================
|
||||
*/
|
||||
int editor_init( char *file_name )
|
||||
{
|
||||
FILE *file = 0;
|
||||
/* set full file name */
|
||||
snprintf( edit_file_name, sizeof(edit_file_name)-1, "%s/%s/lbreakout2-levels/%s", (getenv( "HOME" )?getenv( "HOME" ):"."), CONFIG_DIR_NAME, file_name );
|
||||
/* test this file for write access. use append to keep contents */
|
||||
if ( ( file = fopen( edit_file_name, "a" ) ) == 0 ) {
|
||||
fprintf( stderr, "Permission to write to file '%s' denied.\n", edit_file_name );
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
fclose( file );
|
||||
/* load levels */
|
||||
editor_load_levels();
|
||||
/* select first level */
|
||||
edit_cur_level_id = 0;
|
||||
edit_cur_level = edit_levels[0];
|
||||
/* select first brick */
|
||||
edit_sel_type = EDITOR_EXTRA;
|
||||
editor_switch_tiles();
|
||||
/* clear other flags */
|
||||
extra_vis = 0;
|
||||
first_swap_level = -1;
|
||||
return 1;
|
||||
}
|
||||
void editor_clear()
|
||||
{
|
||||
/* free all levels */
|
||||
editor_clear_levels();
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Run the editor
|
||||
====================================================================
|
||||
*/
|
||||
void editor_run()
|
||||
{
|
||||
SDL_Event event;
|
||||
int leave = 0;
|
||||
int ms;
|
||||
int last_switch_time = 0;
|
||||
int full_update = 0, set;
|
||||
int x, y, xoff,yoff;
|
||||
Uint8 buttonstate;
|
||||
|
||||
/* reset any alpha keys */
|
||||
SDL_SetAlpha( extra_pic, 0,0 );
|
||||
/* draw first time */
|
||||
editor_full_update();
|
||||
/* main loop */
|
||||
stk_timer_reset();
|
||||
while ( !leave && !stk_quit_request ) {
|
||||
if ( SDL_PollEvent( &event ) ) {
|
||||
switch ( event.type ) {
|
||||
case SDL_QUIT: leave = 1; stk_quit_request = 1; break;
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
editor_handle_click( event.button.x / BRICK_WIDTH,
|
||||
event.button.y / BRICK_HEIGHT,
|
||||
(event.button.button == STK_BUTTON_LEFT),
|
||||
&full_update );
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch ( event.key.keysym.sym ) {
|
||||
case SDLK_ESCAPE:
|
||||
if ( confirm( font, _("Quit Editor? y/n"), CONFIRM_YES_NO ) ) leave = 1;
|
||||
break;
|
||||
case SDLK_LEFT: editor_handle_button( BUTTON_PREV, &full_update ); break;
|
||||
case SDLK_RIGHT: editor_handle_button( BUTTON_NEXT, &full_update ); break;
|
||||
case SDLK_UP: editor_handle_button( BUTTON_FIRST, &full_update ); break;
|
||||
case SDLK_f:
|
||||
config.fullscreen = !config.fullscreen;
|
||||
stk_display_apply_fullscreen( config.fullscreen );
|
||||
full_update = 1;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
/* mouse motion is handled directly */
|
||||
buttonstate = SDL_GetRelativeMouseState( &xoff, &yoff );
|
||||
if ( (xoff || yoff) && buttonstate ) {
|
||||
buttonstate = SDL_GetMouseState( &x, &y );
|
||||
set = 0; if ( buttonstate & SDL_BUTTON(1) ) set = 1;
|
||||
editor_handle_click( x / BRICK_WIDTH, y / BRICK_HEIGHT, set, &full_update );
|
||||
}
|
||||
ms = stk_timer_get_time();
|
||||
if ( ( last_switch_time -= ms ) <= 0 ) {
|
||||
extra_vis = !extra_vis;
|
||||
last_switch_time = 500;
|
||||
editor_update_extra_bricks();
|
||||
}
|
||||
/* full update? */
|
||||
if ( full_update ) {
|
||||
editor_full_update();
|
||||
full_update = 0;
|
||||
}
|
||||
/* don't consume all CPU time */
|
||||
SDL_Delay( 5 );
|
||||
}
|
||||
}
|
||||
38
project/jni/application/lbreakout2/client/editor.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/***************************************************************************
|
||||
editor.h - description
|
||||
-------------------
|
||||
begin : Fri Oct 12 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Create/delete editor resources
|
||||
====================================================================
|
||||
*/
|
||||
void editor_create();
|
||||
void editor_delete();
|
||||
/*
|
||||
====================================================================
|
||||
Initiate and clear stuff for each editor call.
|
||||
file_name is the name of the edited file in home directory.
|
||||
====================================================================
|
||||
*/
|
||||
int editor_init( char *file_name );
|
||||
void editor_clear();
|
||||
/*
|
||||
====================================================================
|
||||
Run the editor
|
||||
====================================================================
|
||||
*/
|
||||
void editor_run();
|
||||
31
project/jni/application/lbreakout2/client/empty.hscr
Normal file
@@ -0,0 +1,31 @@
|
||||
>>>LBreakout2
|
||||
............
|
||||
10
|
||||
300000
|
||||
............
|
||||
9
|
||||
200000
|
||||
............
|
||||
8
|
||||
150000
|
||||
............
|
||||
7
|
||||
100000
|
||||
............
|
||||
6
|
||||
70000
|
||||
............
|
||||
5
|
||||
50000
|
||||
............
|
||||
4
|
||||
40000
|
||||
............
|
||||
3
|
||||
30000
|
||||
............
|
||||
2
|
||||
20000
|
||||
............
|
||||
1
|
||||
10000
|
||||
60
project/jni/application/lbreakout2/client/event.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/***************************************************************************
|
||||
event.c - description
|
||||
-------------------
|
||||
begin : Sat Sep 8 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "event.h"
|
||||
|
||||
extern int stk_quit_request;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Event filter that blocks all events. Used to clear the SDL
|
||||
event queue.
|
||||
====================================================================
|
||||
*/
|
||||
static int all_filter( const SDL_Event *event ) { return 0; }
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Handle SDL_QUIT events directly and kill all motion events.
|
||||
====================================================================
|
||||
*/
|
||||
int event_filter( const SDL_Event *event )
|
||||
{
|
||||
if ( event->type == SDL_QUIT ) {
|
||||
stk_quit_request = 1;
|
||||
return 0;
|
||||
}
|
||||
if ( event->type == SDL_MOUSEMOTION )
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Clear the SDL event key (keydown events)
|
||||
====================================================================
|
||||
*/
|
||||
void event_clear_sdl_queue()
|
||||
{
|
||||
SDL_EventFilter old_filter;
|
||||
SDL_Event event;
|
||||
old_filter = SDL_GetEventFilter();
|
||||
SDL_SetEventFilter( all_filter );
|
||||
while ( SDL_PollEvent( &event ) );
|
||||
SDL_SetEventFilter( old_filter );
|
||||
}
|
||||
56
project/jni/application/lbreakout2/client/event.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/***************************************************************************
|
||||
event.h - description
|
||||
-------------------
|
||||
begin : Sat Sep 8 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Event filter used to get motion x.
|
||||
====================================================================
|
||||
*/
|
||||
int event_filter( const SDL_Event *event );
|
||||
/*
|
||||
====================================================================
|
||||
Reset event states
|
||||
====================================================================
|
||||
*/
|
||||
void event_reset();
|
||||
/*
|
||||
====================================================================
|
||||
Grab or release input. Hide cursor if events are kept in window.
|
||||
Use relative mouse motion and grab if config tells so.
|
||||
====================================================================
|
||||
*/
|
||||
void event_grab_input();
|
||||
void event_ungrab_input();
|
||||
/*
|
||||
====================================================================
|
||||
Poll next event and set key and mousestate.
|
||||
Return Value: True if event occured
|
||||
====================================================================
|
||||
*/
|
||||
int event_poll( SDL_Event *event );
|
||||
/*
|
||||
====================================================================
|
||||
Block/unblock motion event
|
||||
====================================================================
|
||||
*/
|
||||
void event_block_motion( int block );
|
||||
/*
|
||||
====================================================================
|
||||
Clear the SDL event key (keydown events)
|
||||
====================================================================
|
||||
*/
|
||||
void event_clear_sdl_queue();
|
||||
635
project/jni/application/lbreakout2/client/extras.c
Normal file
@@ -0,0 +1,635 @@
|
||||
/***************************************************************************
|
||||
extras.c - description
|
||||
-------------------
|
||||
begin : Sun Sep 9 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "../game/game.h"
|
||||
#include "bricks.h"
|
||||
#include "shrapnells.h"
|
||||
#include "player.h"
|
||||
#include "paddle.h"
|
||||
#include "frame.h"
|
||||
|
||||
extern Player *cur_player;
|
||||
extern SDL_Surface *stk_display;
|
||||
extern SDL_Rect stk_drect;
|
||||
extern SDL_Surface *offscreen;
|
||||
extern SDL_Surface *bkgnd; /* background + frame */
|
||||
extern SDL_Surface *offscreen_backup;
|
||||
extern int ball_w, ball_dia;
|
||||
extern SDL_Surface *brick_pic;
|
||||
extern Brick bricks[MAP_WIDTH][MAP_HEIGHT];
|
||||
extern SDL_Surface *extra_pic; /* graphics */
|
||||
extern SDL_Surface *extra_shadow;
|
||||
extern SDL_Surface *paddle_pic, *weapon_pic;
|
||||
extern SDL_Surface *ball_pic;
|
||||
extern SDL_Surface *shot_pic;
|
||||
extern StkFont *display_font;
|
||||
extern SDL_Surface *wall_pic;
|
||||
extern int shadow_size;
|
||||
#ifdef AUDIO_ENABLED
|
||||
extern StkSound *wav_score, *wav_metal, *wav_std, *wav_wall, *wav_joker;
|
||||
extern StkSound *wav_goldshower, *wav_life_up;
|
||||
extern StkSound *wav_speedup, *wav_speeddown;
|
||||
extern StkSound *wav_chaos, *wav_darkness, *wav_ghost;
|
||||
extern StkSound *wav_timeadd, *wav_expl_ball, *wav_weak_ball;
|
||||
extern StkSound *wav_bonus_magnet, *wav_malus_magnet, *wav_disable;
|
||||
extern StkSound *wav_attach; /* handled by balls.c */
|
||||
extern StkSound *wav_expand, *wav_shrink, *wav_frozen;
|
||||
#endif
|
||||
extern Game *game; /* client game context */
|
||||
extern int paddle_ch;
|
||||
extern int ball_pic_x_offset;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Locals
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Public
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/* Play sounds and handle graphical effects. */
|
||||
void client_handle_collected_extra( Paddle *paddle, int extra_type )
|
||||
{
|
||||
int i, j;
|
||||
#ifdef AUDIO_ENABLED
|
||||
int px = paddle->x+(paddle->w>>1);
|
||||
#endif
|
||||
Extra *ex;
|
||||
|
||||
switch (extra_type) {
|
||||
case EX_JOKER:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_joker );
|
||||
#endif
|
||||
list_reset( game->extras );
|
||||
while ( ( ex = list_next( game->extras ) ) ) {
|
||||
stk_display_store_rect( &ex->update_rect );
|
||||
list_delete_current( game->extras );
|
||||
}
|
||||
break;
|
||||
case EX_SCORE200:
|
||||
case EX_SCORE500:
|
||||
case EX_SCORE1000:
|
||||
case EX_SCORE2000:
|
||||
case EX_SCORE5000:
|
||||
case EX_SCORE10000:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_score );
|
||||
#endif
|
||||
break;
|
||||
case EX_GOLDSHOWER:
|
||||
paddle->extra_time[EX_GOLDSHOWER] += TIME_GOLDSHOWER;
|
||||
paddle->extra_active[EX_GOLDSHOWER] = 1;
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_goldshower );
|
||||
#endif
|
||||
break;
|
||||
case EX_LIFE:
|
||||
if ( game->game_type == GT_LOCAL ) {
|
||||
if ( paddle->player->lives < game->diff->max_lives ) {
|
||||
paddle->player->lives++;
|
||||
frame_add_life();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EX_SHORTEN:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_shrink );
|
||||
#endif
|
||||
paddle_init_resize( paddle, -1);
|
||||
break;
|
||||
case EX_LENGTHEN:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_expand );
|
||||
#endif
|
||||
paddle_init_resize( paddle, 1);
|
||||
break;
|
||||
case EX_BALL:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_std );
|
||||
#endif
|
||||
break;
|
||||
case EX_WALL:
|
||||
paddle->extra_time[EX_WALL] += TIME_WALL;
|
||||
if ( paddle->extra_active[EX_WALL] ) {
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_std );
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
paddle->extra_active[extra_type] = 1;
|
||||
paddle->wall_alpha = 0;
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_wall );
|
||||
#endif
|
||||
break;
|
||||
case EX_METAL:
|
||||
game->extra_time[EX_METAL] += TIME_METAL;
|
||||
game->extra_active[extra_type] = 1;
|
||||
ball_pic_x_offset = ball_w;
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_metal );
|
||||
#endif
|
||||
/* other ball extras are disabled */
|
||||
if ( game->extra_active[EX_EXPL_BALL] ) {
|
||||
game->extra_active[EX_EXPL_BALL] = 0;
|
||||
game->extra_time[EX_EXPL_BALL] = 0;
|
||||
}
|
||||
if ( game->extra_active[EX_WEAK_BALL] ) {
|
||||
game->extra_active[EX_WEAK_BALL] = 0;
|
||||
game->extra_time[EX_WEAK_BALL] = 0;
|
||||
}
|
||||
break;
|
||||
case EX_FROZEN:
|
||||
paddle->extra_time[EX_FROZEN] = TIME_FROZEN;
|
||||
paddle->extra_active[extra_type] = 1;
|
||||
paddle->pic_y_offset = paddle_ch*2;
|
||||
paddle->frozen = 1; /* the server sided paddle is blocked
|
||||
so does the same with the local copy */
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_frozen );
|
||||
#endif
|
||||
break;
|
||||
case EX_WEAPON:
|
||||
paddle->extra_time[EX_WEAPON] += TIME_WEAPON;
|
||||
paddle->extra_active[extra_type] = 1;
|
||||
weapon_install( paddle, 1 );
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_std );
|
||||
#endif
|
||||
break;
|
||||
case EX_SLIME:
|
||||
paddle->extra_time[EX_SLIME] += TIME_SLIME;
|
||||
paddle->extra_active[extra_type] = 1;
|
||||
if ( !paddle->frozen )
|
||||
paddle->pic_y_offset = paddle_ch;
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_attach );
|
||||
#endif
|
||||
break;
|
||||
case EX_FAST:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_speedup );
|
||||
#endif
|
||||
if ( game->extra_active[EX_SLOW] ) {
|
||||
game->extra_time[EX_SLOW] = 0;
|
||||
game->extra_active[EX_SLOW] = 0;
|
||||
}
|
||||
game->extra_time[EX_FAST] += TIME_FAST;
|
||||
game->extra_active[extra_type] = 1;
|
||||
break;
|
||||
case EX_SLOW:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_speeddown );
|
||||
#endif
|
||||
if ( game->extra_active[EX_FAST] ) {
|
||||
game->extra_time[EX_FAST] = 0;
|
||||
game->extra_active[EX_FAST] = 0;
|
||||
}
|
||||
game->extra_time[EX_SLOW] += TIME_SLOW;
|
||||
game->extra_active[extra_type] = 1;
|
||||
break;
|
||||
case EX_CHAOS:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_chaos );
|
||||
#endif
|
||||
game->extra_time[EX_CHAOS] += TIME_CHAOS;
|
||||
game->extra_active[extra_type] = 1;
|
||||
break;
|
||||
case EX_DARKNESS:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_darkness );
|
||||
#endif
|
||||
game->extra_time[EX_DARKNESS] += TIME_DARKNESS;
|
||||
if ( game->extra_active[EX_DARKNESS] ) break;
|
||||
/* backup offscreen and turn it black */
|
||||
stk_surface_fill( offscreen, 0,0,-1,-1, 0x0 );
|
||||
stk_surface_fill( stk_display, 0,0,-1,-1, 0x0 );
|
||||
stk_display_store_rect( 0 );
|
||||
/* set alpha keys to 128 */
|
||||
SDL_SetAlpha( paddle_pic, SDL_SRCALPHA, 128 );
|
||||
SDL_SetAlpha( weapon_pic, SDL_SRCALPHA, 128 );
|
||||
SDL_SetAlpha( extra_pic, SDL_SRCALPHA, 128 );
|
||||
SDL_SetAlpha( ball_pic, SDL_SRCALPHA, 128 );
|
||||
SDL_SetAlpha( shot_pic, SDL_SRCALPHA, 128 );
|
||||
SDL_SetAlpha( display_font->surface, SDL_SRCALPHA, 128 );
|
||||
/* use dark explosions */
|
||||
exps_set_dark( 1 );
|
||||
game->extra_active[extra_type] = 1;
|
||||
break;
|
||||
case EX_GHOST_PADDLE:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_ghost );
|
||||
#endif
|
||||
paddle->extra_time[EX_GHOST_PADDLE] += TIME_GHOST_PADDLE;
|
||||
paddle->extra_active[extra_type] = 1;
|
||||
paddle_set_invis( paddle, 1 );
|
||||
break;
|
||||
case EX_TIME_ADD:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_timeadd );
|
||||
#endif
|
||||
for ( i = 0; i < EX_NUMBER; i++ )
|
||||
if ( game->extra_time[i] )
|
||||
game->extra_time[i] += 7000;
|
||||
for ( i = 0; i < EX_NUMBER; i++ ) {
|
||||
for ( j = 0; j < game->paddle_count; j++ )
|
||||
if ( game->paddles[j]->extra_time[i] )
|
||||
game->paddles[j]->extra_time[i] += 7000;
|
||||
}
|
||||
break;
|
||||
case EX_EXPL_BALL:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_expl_ball );
|
||||
#endif
|
||||
ball_pic_x_offset = ball_w*2;
|
||||
game->extra_time[EX_EXPL_BALL] += TIME_EXPL_BALL;
|
||||
game->extra_active[extra_type] = 1;
|
||||
/* other ball extras are disabled */
|
||||
if ( game->extra_active[EX_METAL] ) {
|
||||
game->extra_active[EX_METAL] = 0;
|
||||
game->extra_time[EX_METAL] = 0;
|
||||
}
|
||||
if ( game->extra_active[EX_WEAK_BALL] ) {
|
||||
game->extra_active[EX_WEAK_BALL] = 0;
|
||||
game->extra_time[EX_WEAK_BALL] = 0;
|
||||
}
|
||||
break;
|
||||
case EX_WEAK_BALL:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_weak_ball );
|
||||
#endif
|
||||
ball_pic_x_offset = ball_w*3;
|
||||
game->extra_time[EX_WEAK_BALL] += TIME_WEAK_BALL;
|
||||
game->extra_active[extra_type] = 1;
|
||||
/* other ball extras are disabled */
|
||||
if ( game->extra_active[EX_METAL] ) {
|
||||
game->extra_active[EX_METAL] = 0;
|
||||
game->extra_time[EX_METAL] = 0;
|
||||
}
|
||||
if ( game->extra_active[EX_EXPL_BALL] ) {
|
||||
game->extra_active[EX_EXPL_BALL] = 0;
|
||||
game->extra_time[EX_EXPL_BALL] = 0;
|
||||
}
|
||||
break;
|
||||
case EX_BONUS_MAGNET:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_bonus_magnet );
|
||||
#endif
|
||||
paddle_set_attract( paddle, ATTRACT_BONUS );
|
||||
paddle->extra_time[EX_BONUS_MAGNET] += TIME_BONUS_MAGNET;
|
||||
paddle->extra_active[extra_type] = 1;
|
||||
if ( paddle->extra_active[EX_MALUS_MAGNET] ) {
|
||||
paddle->extra_active[EX_MALUS_MAGNET] = 0;
|
||||
paddle->extra_time[EX_MALUS_MAGNET] = 0;
|
||||
}
|
||||
break;
|
||||
case EX_MALUS_MAGNET:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_malus_magnet );
|
||||
#endif
|
||||
paddle_set_attract( paddle, ATTRACT_MALUS );
|
||||
paddle->extra_time[EX_MALUS_MAGNET] += TIME_MALUS_MAGNET;
|
||||
paddle->extra_active[extra_type] = 1;
|
||||
if ( paddle->extra_active[EX_BONUS_MAGNET] ) {
|
||||
paddle->extra_active[EX_BONUS_MAGNET] = 0;
|
||||
paddle->extra_time[EX_BONUS_MAGNET] = 0;
|
||||
}
|
||||
break;
|
||||
case EX_DISABLE:
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( px, wav_disable );
|
||||
#endif
|
||||
/* set all active extra times to 1 so they will expire next
|
||||
prog cycle */
|
||||
for ( i = 0; i < EX_NUMBER; i++ )
|
||||
if ( game->extra_time[i] )
|
||||
game->extra_time[i] = 1;
|
||||
for ( i = 0; i < EX_NUMBER; i++ ) {
|
||||
for ( j = 0; j < game->paddle_count; j++ )
|
||||
if ( game->paddles[j]->extra_time[i] )
|
||||
game->paddles[j]->extra_time[i] = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Show, hide extras
|
||||
====================================================================
|
||||
*/
|
||||
void extras_hide()
|
||||
{
|
||||
ListEntry *entry = game->extras->head->next;
|
||||
Extra *ex;
|
||||
while ( entry != game->extras->tail ) {
|
||||
ex = entry->item;
|
||||
entry = entry->next;
|
||||
stk_surface_blit( offscreen,
|
||||
(int)ex->x, (int)ex->y,
|
||||
BRICK_WIDTH + shadow_size, BRICK_HEIGHT + shadow_size,
|
||||
stk_display, (int)ex->x, (int)ex->y );
|
||||
ex->update_rect = stk_drect;
|
||||
stk_display_store_rect( &ex->update_rect );
|
||||
}
|
||||
}
|
||||
void extras_show_shadow()
|
||||
{
|
||||
ListEntry *entry = game->extras->head->next;
|
||||
Extra *extra;
|
||||
while ( entry != game->extras->tail ) {
|
||||
extra = entry->item;
|
||||
stk_surface_clip( stk_display, 0,0,
|
||||
stk_display->w - BRICK_WIDTH, stk_display->h );
|
||||
stk_surface_alpha_blit(
|
||||
extra_shadow, extra->type * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display, (int)extra->x + shadow_size, (int)extra->y + shadow_size,
|
||||
((int)extra->alpha)>>1 );
|
||||
stk_surface_clip( stk_display, 0,0,-1,-1 );
|
||||
entry = entry->next;
|
||||
}
|
||||
}
|
||||
void extras_show()
|
||||
{
|
||||
ListEntry *entry = game->extras->head->next;
|
||||
Extra *ex;
|
||||
int x, y;
|
||||
while ( entry != game->extras->tail ) {
|
||||
ex = entry->item;
|
||||
entry = entry->next;
|
||||
x = (int)ex->x; y = (int)ex->y;
|
||||
stk_surface_alpha_blit( extra_pic, ex->offset, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT, stk_display, x, y, ex->alpha );
|
||||
#if 0
|
||||
if ( x < ex->update_rect.x ) {
|
||||
/* movement to left */
|
||||
ex->update_rect.w += ex->update_rect.x - x;
|
||||
ex->update_rect.x = x;
|
||||
}
|
||||
else
|
||||
/* movement to right */
|
||||
ex->update_rect.w += x - ex->update_rect.x;
|
||||
if ( ex->dir == -1 ) {
|
||||
/* movement up */
|
||||
ex->update_rect.h += ex->update_rect.y - y;
|
||||
ex->update_rect.y = y;
|
||||
if ( ex->update_rect.y < 0 ) {
|
||||
ex->update_rect.h += ex->update_rect.y;
|
||||
ex->update_rect.y = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* movement down */
|
||||
ex->update_rect.h += y - ex->update_rect.y;
|
||||
if ( ex->update_rect.y + ex->update_rect.h >= stk_display->h )
|
||||
ex->update_rect.h = stk_display->h - ex->update_rect.y;
|
||||
}
|
||||
stk_display_store_rect( &ex->update_rect );
|
||||
#endif
|
||||
ex->update_rect.x = x;
|
||||
ex->update_rect.y = y;
|
||||
ex->update_rect.w = BRICK_WIDTH + shadow_size;
|
||||
ex->update_rect.h = BRICK_HEIGHT + shadow_size;
|
||||
stk_display_store_rect( &ex->update_rect );
|
||||
}
|
||||
}
|
||||
void extras_alphashow( int alpha )
|
||||
{
|
||||
ListEntry *entry = game->extras->head->next;
|
||||
Extra *ex;
|
||||
int x, y;
|
||||
while ( entry != game->extras->tail ) {
|
||||
ex = entry->item;
|
||||
x = (int)ex->x;
|
||||
y = (int)ex->y;
|
||||
stk_surface_alpha_blit( extra_pic, ex->type * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT, stk_display, x, y, alpha );
|
||||
stk_display_store_rect( &ex->update_rect );
|
||||
entry = entry->next;
|
||||
}
|
||||
}
|
||||
|
||||
/* move the extras as in extras_update but do not collect them */
|
||||
void client_extras_update( int ms )
|
||||
{
|
||||
Extra *ex;
|
||||
int i, j;
|
||||
int magnets;
|
||||
Paddle *magnet;
|
||||
|
||||
/* check extra_time of limited extras */
|
||||
/* general extras */
|
||||
for ( i = 0; i < EX_NUMBER; i++ )
|
||||
if ( game->extra_time[i] ) {
|
||||
if ( (game->extra_time[i] -= ms) <= 0 ) {
|
||||
game->extra_time[i] = 0;
|
||||
/* expired */
|
||||
switch ( i ) {
|
||||
case EX_EXPL_BALL:
|
||||
case EX_WEAK_BALL:
|
||||
case EX_METAL:
|
||||
ball_pic_x_offset = 0;
|
||||
break;
|
||||
case EX_DARKNESS:
|
||||
/* restore offscreen */
|
||||
stk_surface_blit( bkgnd, 0,0,-1,-1, offscreen, 0,0 );
|
||||
bricks_draw();
|
||||
if ( game->game_type == GT_LOCAL )
|
||||
frame_draw_lives( cur_player->lives,
|
||||
game->diff->max_lives );
|
||||
/* back to screen */
|
||||
stk_surface_blit(
|
||||
offscreen, 0,0,-1,-1,
|
||||
stk_display, 0,0 );
|
||||
stk_display_store_rect( 0 );
|
||||
/* set alpha keys to OPAQUE */
|
||||
SDL_SetAlpha( paddle_pic, 0,0 );
|
||||
SDL_SetAlpha( extra_pic, 0,0 );
|
||||
SDL_SetAlpha( ball_pic, 0,0 );
|
||||
SDL_SetAlpha( shot_pic, 0,0 );
|
||||
SDL_SetAlpha( display_font->surface, 0,0 );
|
||||
/* use bright explosions */
|
||||
exps_set_dark( 0 );
|
||||
break;
|
||||
}
|
||||
/* set deactivated */
|
||||
game->extra_active[i] = 0;
|
||||
}
|
||||
}
|
||||
/* paddlized extras */
|
||||
for ( j = 0; j < game->paddle_count; j++ )
|
||||
for ( i = 0; i < EX_NUMBER; i++ )
|
||||
/* extra_time of wall is updated in client_walls_update() */
|
||||
if ( game->paddles[j]->extra_time[i] && i != EX_WALL )
|
||||
if ( (game->paddles[j]->extra_time[i] -= ms) <= 0 ) {
|
||||
game->paddles[j]->extra_time[i] = 0;
|
||||
/* expired */
|
||||
switch ( i ) {
|
||||
case EX_FROZEN:
|
||||
case EX_SLIME:
|
||||
if ( game->paddles[j]->extra_time[EX_SLIME] > 0 )
|
||||
game->paddles[j]->pic_y_offset = paddle_ch;
|
||||
else
|
||||
game->paddles[j]->pic_y_offset = 0;
|
||||
game->paddles[j]->frozen = 0;
|
||||
break;
|
||||
case EX_WEAPON:
|
||||
weapon_install( game->paddles[j], 0 );
|
||||
break;
|
||||
case EX_GHOST_PADDLE:
|
||||
paddle_set_invis( game->paddles[j], 0 );
|
||||
break;
|
||||
case EX_BONUS_MAGNET:
|
||||
case EX_MALUS_MAGNET:
|
||||
paddle_set_attract( game->paddles[j], ATTRACT_NONE );
|
||||
break;
|
||||
}
|
||||
/* set deactivated */
|
||||
game->paddles[j]->extra_active[i] = 0; /* wall is handled in wall_...() */
|
||||
}
|
||||
|
||||
/* move extras and check if paddle was hit */
|
||||
list_reset( game->extras );
|
||||
while ( ( ex = list_next( game->extras ) ) ) {
|
||||
/* if only one paddle has a magnet active all extras will
|
||||
* be attracted by this paddle else the extras 'dir' is used
|
||||
*/
|
||||
magnets = 0; magnet = 0;
|
||||
for ( i = 0; i < game->paddle_count; i++ )
|
||||
if ( paddle_check_attract( game->paddles[i], ex->type ) ) {
|
||||
magnets++;
|
||||
magnet = game->paddles[i]; /* last magnet */
|
||||
}
|
||||
if ( magnets != 1 ) {
|
||||
/* either no or more than one magnet so use default */
|
||||
if ( ex->dir > 0 )
|
||||
ex->y += 0.05 * ms;
|
||||
else
|
||||
ex->y -= 0.05 * ms;
|
||||
}
|
||||
else {
|
||||
/* 'magnet' is the paddle that will attract this extra */
|
||||
if ( magnet->type == PADDLE_TOP )
|
||||
ex->y -= 0.05 * ms;
|
||||
else
|
||||
ex->y += 0.05 * ms;
|
||||
if ( ex->x + ( BRICK_WIDTH >> 1 ) < magnet->x + ( magnet->w >> 1 ) ) {
|
||||
ex->x += 0.05 * ms;
|
||||
if ( ex->x + ( BRICK_WIDTH >> 1 ) > magnet->x + ( magnet->w >> 1 ) )
|
||||
ex->x = magnet->x + ( magnet->w >> 1 ) - ( BRICK_WIDTH >> 1 );
|
||||
}
|
||||
else {
|
||||
ex->x -= 0.05 * ms;
|
||||
if ( ex->x + ( BRICK_WIDTH >> 1 ) < magnet->x + ( magnet->w >> 1 ) )
|
||||
ex->x = magnet->x + ( magnet->w >> 1 ) - ( BRICK_WIDTH >> 1 );
|
||||
}
|
||||
}
|
||||
if ( !game->extra_active[EX_DARKNESS] ) {
|
||||
if ( ex->alpha < 255 ) {
|
||||
ex->alpha += 0.25 * ms;
|
||||
if (ex->alpha > 255)
|
||||
ex->alpha = 255;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( ex->alpha < 128 ) {
|
||||
ex->alpha += 0.25 * ms;
|
||||
if (ex->alpha > 128)
|
||||
ex->alpha = 128;
|
||||
}
|
||||
}
|
||||
/* if out of screen forget this extra */
|
||||
if ( ex->y >= stk_display->h || ex->y + BRICK_HEIGHT < 0 ) {
|
||||
stk_display_store_rect( &ex->update_rect );
|
||||
list_delete_current( game->extras );
|
||||
continue;
|
||||
}
|
||||
for ( j = 0; j < game->paddle_count; j++ ) {
|
||||
/* contact with paddle core ? */
|
||||
if ( paddle_solid( game->paddles[j] ) )
|
||||
if ( ex->x + BRICK_WIDTH > game->paddles[j]->x )
|
||||
if ( ex->x < game->paddles[j]->x + game->paddles[j]->w - 1 )
|
||||
if ( ex->y + BRICK_HEIGHT > game->paddles[j]->y )
|
||||
if ( ex->y < game->paddles[j]->y + game->paddles[j]->h ) {
|
||||
/* remove extra but don't handle it */
|
||||
stk_display_store_rect( &ex->update_rect );
|
||||
list_delete_current( game->extras );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* wall */
|
||||
void walls_hide()
|
||||
{
|
||||
int j;
|
||||
for ( j = 0; j < game->paddle_count; j++ )
|
||||
if ( game->paddles[j]->extra_active[EX_WALL] ) {
|
||||
stk_surface_blit( offscreen, BRICK_WIDTH, game->paddles[j]->wall_y,
|
||||
wall_pic->w, wall_pic->h,
|
||||
stk_display, BRICK_WIDTH, game->paddles[j]->wall_y );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
}
|
||||
void walls_show()
|
||||
{
|
||||
int j;
|
||||
for ( j = 0; j < game->paddle_count; j++ )
|
||||
if ( game->paddles[j]->extra_active[EX_WALL] )
|
||||
stk_surface_alpha_blit( wall_pic, 0,0,
|
||||
wall_pic->w, wall_pic->h,
|
||||
stk_display, BRICK_WIDTH, game->paddles[j]->wall_y,
|
||||
(int)game->paddles[j]->wall_alpha );
|
||||
}
|
||||
void walls_alphashow( int alpha )
|
||||
{
|
||||
int j;
|
||||
for ( j = 0; j < game->paddle_count; j++ )
|
||||
if ( game->paddles[j]->extra_active[EX_WALL] )
|
||||
stk_surface_alpha_blit( wall_pic, 0,0,
|
||||
wall_pic->w, wall_pic->h,
|
||||
stk_display, BRICK_WIDTH, game->paddles[j]->wall_y,
|
||||
alpha );
|
||||
}
|
||||
void client_walls_update( int ms )
|
||||
{
|
||||
int j;
|
||||
|
||||
for ( j = 0; j < game->paddle_count; j++ )
|
||||
if ( game->paddles[j]->extra_active[EX_WALL] ) {
|
||||
if ( game->paddles[j]->extra_time[EX_WALL] > 0 ) {
|
||||
if ( (game->paddles[j]->extra_time[EX_WALL] -= ms) < 0 )
|
||||
game->paddles[j]->extra_time[EX_WALL] = 0;
|
||||
/* still appearing? */
|
||||
if (game->paddles[j]->wall_alpha < 255)
|
||||
if ( (game->paddles[j]->wall_alpha += 0.25 * ms) > 255 )
|
||||
game->paddles[j]->wall_alpha = 255;
|
||||
}
|
||||
else
|
||||
if ( (game->paddles[j]->wall_alpha -= 0.25 * ms) < 0 ) {
|
||||
game->paddles[j]->wall_alpha = 0;
|
||||
game->paddles[j]->extra_active[EX_WALL] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
42
project/jni/application/lbreakout2/client/extras.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/***************************************************************************
|
||||
extras.h - description
|
||||
-------------------
|
||||
begin : Sun Sep 9 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
/* Play sounds and handle graphical effects. */
|
||||
void client_handle_collected_extra( Paddle *paddle, int extra_type );
|
||||
|
||||
/* move the extras as in extras_update but do not collect them */
|
||||
void client_extras_update( int ms );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Show, hide extras
|
||||
====================================================================
|
||||
*/
|
||||
void extras_hide();
|
||||
void extras_show_shadow();
|
||||
void extras_show();
|
||||
void extras_alphashow( int alpha );
|
||||
/*
|
||||
====================================================================
|
||||
Wall
|
||||
====================================================================
|
||||
*/
|
||||
void walls_hide();
|
||||
void walls_show();
|
||||
void walls_alphashow( int alpha );
|
||||
void client_walls_update( int ms );
|
||||
|
||||
530
project/jni/application/lbreakout2/client/file.c
Normal file
@@ -0,0 +1,530 @@
|
||||
|
||||
/***************************************************************************
|
||||
file.c - description
|
||||
-------------------
|
||||
begin : Thu Jan 18 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "../common/list.h"
|
||||
#include "../common/tools.h"
|
||||
#include "file.h"
|
||||
|
||||
//#define FILE_DEBUG
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Test file in path as mode.
|
||||
Return Value: True if sucessful
|
||||
====================================================================
|
||||
*/
|
||||
int file_check( char *path, char *fname, char *mode )
|
||||
{
|
||||
char *full_path;
|
||||
FILE *file = 0;
|
||||
int ok = 0;
|
||||
|
||||
full_path = calloc( strlen( path ) + strlen( fname ) + 2, sizeof( char ) );
|
||||
sprintf( full_path, "%s/%s", path, fname );
|
||||
|
||||
if ( ( file = fopen( full_path, mode ) ) != 0 ) {
|
||||
fclose( file );
|
||||
ok = 1;
|
||||
}
|
||||
free( full_path );
|
||||
return ok;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Open file in path according to type (write, read, append)
|
||||
Return Value: File handle if successful else Null
|
||||
====================================================================
|
||||
*/
|
||||
FILE *file_open( char *path, char *fname, int type )
|
||||
{
|
||||
FILE *file = 0;
|
||||
char *full_path;
|
||||
char mode[3] = "a";
|
||||
|
||||
full_path = calloc( strlen( path ) + strlen( fname ) + 2, sizeof( char ) );
|
||||
sprintf( full_path, "%s/%s", path, fname );
|
||||
|
||||
switch ( type ) {
|
||||
case FILE_READ:
|
||||
if ( ( file = fopen( full_path, "rb" ) ) == 0 )
|
||||
fprintf( stderr, "file_open: cannot open file '%s' for reading: permission denied or non-existent\n", full_path );
|
||||
break;
|
||||
case FILE_WRITE:
|
||||
sprintf( mode, "w" );
|
||||
case FILE_APPEND:
|
||||
if ( ( file = fopen( full_path, mode ) ) == 0 )
|
||||
fprintf( stderr, "file_open: cannot open file '%s': permission denied\n", full_path );
|
||||
break;
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Read all lines from file pointer and return as static array.
|
||||
Resets the file pointer. Should only be used when reading a whole
|
||||
file.
|
||||
====================================================================
|
||||
*/
|
||||
char** file_read_lines( FILE *file, int *count )
|
||||
{
|
||||
int nl_count = 0;
|
||||
char c;
|
||||
char **lines;
|
||||
char buffer[1024];
|
||||
|
||||
if ( !file ) return 0;
|
||||
|
||||
/* count new_lines */
|
||||
fseek( file, 0, SEEK_SET );
|
||||
while ( !feof( file ) ) {
|
||||
fread( &c, sizeof( char ), 1, file );
|
||||
if ( c == 10 ) nl_count++;
|
||||
}
|
||||
fseek( file, 0, SEEK_SET );
|
||||
nl_count++; /* maybe last lines wasn't terminated */
|
||||
|
||||
/* get mem */
|
||||
lines = calloc( nl_count, sizeof( char* ) );
|
||||
|
||||
/* read lines */
|
||||
*count = 0;
|
||||
while( !feof( file ) ) {
|
||||
if ( !fgets( buffer, 1023, file ) ) break;
|
||||
if ( buffer[0] == 10 ) continue; /* empty line */
|
||||
buffer[strlen( buffer ) - 1] = 0; /* cancel newline */
|
||||
lines[*count] = strdup( buffer );
|
||||
(*count)++;
|
||||
}
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
/* check consistence of file (all brackets/comments closed).
|
||||
will reset the file pos to the very beginning */
|
||||
int check_file_cons( FILE *file )
|
||||
{
|
||||
int brac = 0, comm = 0;
|
||||
char c;
|
||||
int ok = 1;
|
||||
|
||||
fseek( file, 0, SEEK_SET );
|
||||
|
||||
while ( !feof( file ) ) {
|
||||
|
||||
fread( &c, 1, 1, file );
|
||||
switch ( c ) {
|
||||
|
||||
case '(': brac++; break;
|
||||
case ')': brac--; break;
|
||||
case '#': comm++; break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fseek( file, 0, SEEK_SET );
|
||||
|
||||
if ( brac != 0 || ( comm % 2) != 0 ) {
|
||||
|
||||
#ifdef FILE_DEBUG
|
||||
if ( brac != 0 )
|
||||
printf("the number of opening and closing brackets does not fit!...\n");
|
||||
else
|
||||
printf("the number of opening and closing comment hashes does not fit!...\n");
|
||||
#endif
|
||||
ok = 0;
|
||||
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
/* return line number; keeps current file pos */
|
||||
int get_line_number( FILE *file ) {
|
||||
int count = 0;
|
||||
char c;
|
||||
int pos = ftell( file );
|
||||
|
||||
fseek( file, 0, SEEK_SET );
|
||||
while ( ftell( file ) < pos - 1 ) {
|
||||
fread( &c, sizeof( char ), 1, file );
|
||||
if ( c == 10 ) count++;
|
||||
}
|
||||
fseek( file, pos, SEEK_SET );
|
||||
return count + 1;
|
||||
}
|
||||
|
||||
/* ignore all blanks and jump to next none-blank */
|
||||
void ignore_blanks( FILE *file )
|
||||
{
|
||||
char c;
|
||||
do {
|
||||
fread( &c, sizeof( char ), 1, file );
|
||||
} while ( c <= 32 && !feof( file ) );
|
||||
if ( !feof( file ) )
|
||||
fseek( file, -1, SEEK_CUR ); /* restore last none-blank */
|
||||
}
|
||||
|
||||
/* add character to token and check max length; return true if below max length */
|
||||
int add_char( char *token, int c )
|
||||
{
|
||||
int length = strlen( token );
|
||||
/* check token length */
|
||||
if ( length == MAX_TOKEN_LENGTH - 1 ) {
|
||||
fprintf( stderr,
|
||||
"read_token: token '%s' reached maximum length of %i, reading skipped\n",
|
||||
token, length );
|
||||
return 0;
|
||||
}
|
||||
token[length++] = c;
|
||||
token[length] = 0;
|
||||
return 1;
|
||||
}
|
||||
/* read token from current file position; ignore spaces;
|
||||
tokes are:
|
||||
(
|
||||
)
|
||||
=
|
||||
# comment #
|
||||
" string "
|
||||
normal_token
|
||||
save token in token and check that MAX_TOKEN_LENGTH is not exceeded
|
||||
return true if not end of file */
|
||||
int read_token( FILE *file, char *token )
|
||||
{
|
||||
int length = 0; /* token length */
|
||||
char c;
|
||||
int read_str = 0; /* if this is set token is a string "..." */
|
||||
int i;
|
||||
|
||||
/* clear token */
|
||||
token[0] = 0;
|
||||
|
||||
/* ignore all blanks before token */
|
||||
ignore_blanks( file );
|
||||
|
||||
while( !feof( file ) ) {
|
||||
fread( &c, sizeof( char ), 1, file );
|
||||
/* treat new_lines as blanks */
|
||||
if ( c == 10 ) c = 32;
|
||||
/* check if this is a comment; if so ignore all characters in between */
|
||||
if ( c == '#' && !read_str ) {
|
||||
/* read all characters until '#' occurs */
|
||||
do {
|
||||
fread( &c, sizeof( char ), 1, file );
|
||||
} while ( c != '#' );
|
||||
/* ignore all blanks after comment */
|
||||
ignore_blanks( file );
|
||||
continue; /* start reading again */
|
||||
}
|
||||
/* add char */
|
||||
if ( !add_char( token, c ) ) {
|
||||
/* in this case restore last char as it belongs to next token */
|
||||
fseek( file, -1, SEEK_CUR );
|
||||
break;
|
||||
}
|
||||
else
|
||||
length++;
|
||||
/* check if token ends with a special single-character assignment token */
|
||||
if ( !read_str )
|
||||
if ( c == '(' || c == ')' || c == '=' ) {
|
||||
/* if this wasn't the first character it already belongs to a new token, so skip it */
|
||||
if ( length > 1 ) {
|
||||
fseek( file, -1, SEEK_CUR );
|
||||
token[--length] = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
/* check if this char is a blank */
|
||||
if ( c <= 32 && !read_str ) {
|
||||
/* remvoe this blank from token */
|
||||
token[--length] = 0;
|
||||
break;
|
||||
}
|
||||
/* check if this is a long string embraced by "..." */
|
||||
if ( c == '"' ) {
|
||||
if ( length > 1 ) {
|
||||
if ( read_str )
|
||||
/* termination of string; stop reading */
|
||||
break;
|
||||
else {
|
||||
/* token read and this " belongs to next token */
|
||||
/* in this case restore last char */
|
||||
fseek( file, -1, SEEK_CUR );
|
||||
token[--length] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
read_str = 1;
|
||||
}
|
||||
}
|
||||
if ( read_str ) {
|
||||
/* delete brackets from token */
|
||||
for ( i = 1; i < strlen( token ); i++ )
|
||||
token[i - 1] = token[i];
|
||||
token[strlen( token ) - 2] = 0;
|
||||
}
|
||||
if ( feof( file ) ) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* find a string in the file and set file stream to this position */
|
||||
int find_token( FILE *file, char *name, int type, int warning )
|
||||
{
|
||||
char token[MAX_TOKEN_LENGTH];
|
||||
|
||||
if ( type == RESET_FILE_POS )
|
||||
fseek( file, 0, SEEK_SET );
|
||||
while( read_token( file, token ) )
|
||||
if ( strequal( name, token ) ) {
|
||||
/* adjust position this token must be read */
|
||||
fseek( file, -strlen( token ) -1, SEEK_CUR );
|
||||
return 1;
|
||||
}
|
||||
if ( warning == WARNING )
|
||||
fprintf( stderr, "find_token: warning: token '%s' not found\n", name );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* read argument string of a single assignment */
|
||||
char* get_arg( FILE *file, char *name, int type )
|
||||
{
|
||||
char token[MAX_TOKEN_LENGTH];
|
||||
char *arg = 0;
|
||||
|
||||
/* search entry_name */
|
||||
if ( !find_token( file, name, type, WARNING ) ) return 0;
|
||||
|
||||
/* token was found so read it */
|
||||
read_token( file, token );
|
||||
/* next token must be an equation */
|
||||
read_token( file, token );
|
||||
if ( token[0] != '=' ) {
|
||||
fprintf( stderr,
|
||||
"get_arg: line %i: '=' expected after token '%s' but found '%s' instead\n", get_line_number( file ), name, token );
|
||||
return 0;
|
||||
}
|
||||
/* get argument */
|
||||
read_token( file, token );
|
||||
if ( token[0] == 0 )
|
||||
fprintf( stderr, "get_arg: line %i: warning: argument for '%s' is empty\n", get_line_number( file ), name );
|
||||
arg = strdup( token );
|
||||
#ifdef FILE_DEBUG
|
||||
printf( "get_arg: %s = %s\n", name, arg );
|
||||
#endif
|
||||
return arg;
|
||||
}
|
||||
|
||||
/* read a cluster of arguments and return as static list */
|
||||
char** get_arg_cluster( FILE *file, char *name, int *count, int type, int warning )
|
||||
{
|
||||
List *args;
|
||||
char token[MAX_TOKEN_LENGTH];
|
||||
char **arg_list = 0;
|
||||
int i;
|
||||
|
||||
*count = 0;
|
||||
|
||||
/* search entry_name */
|
||||
if ( !find_token( file, name, type, warning ) ) return 0;
|
||||
|
||||
/* init list */
|
||||
args = list_create( LIST_AUTO_DELETE, LIST_NO_CALLBACK );
|
||||
|
||||
/* read entry_name */
|
||||
read_token( file, token );
|
||||
/* next token must be an '(' */
|
||||
read_token( file, token );
|
||||
if ( token[0] != '(' ) {
|
||||
fprintf( stderr, "get_arg_cluster: line %i: '(' expected after token '%s' but found '%s' instead\n", get_line_number( file ), name, token );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* read tokens and add to dynamic list until ')' occurs; if an '=' or '(' is read instead something
|
||||
gone wrong */
|
||||
while ( 1 ) {
|
||||
read_token( file, token );
|
||||
if ( token[0] == ')' ) break;
|
||||
if ( token[0] == '(' || token[0] == '=' ) {
|
||||
fprintf( stderr, "get_arg_cluster: line %i: ')' expected to terminate argument list of entry '%s' but found '%c' instead\n", get_line_number( file ), name, token[0] );
|
||||
list_clear( args );
|
||||
return 0;
|
||||
}
|
||||
/* everything's ok; add to list */
|
||||
list_add( args, strdup( token ) );
|
||||
}
|
||||
|
||||
/* static argument list */
|
||||
arg_list = calloc( args->count, sizeof( char* ) );
|
||||
for ( i = 0; i < args->count; i++ )
|
||||
arg_list[i] = strdup( (char*)list_get( args, i ) );
|
||||
*count = args->count;
|
||||
|
||||
list_delete( args );
|
||||
|
||||
return arg_list;
|
||||
}
|
||||
|
||||
/* free arg cluster */
|
||||
void delete_arg_cluster( char **cluster, int count )
|
||||
{
|
||||
int i;
|
||||
if ( cluster ) {
|
||||
for ( i = 0; i < count; i++ )
|
||||
if ( cluster[i] )
|
||||
FREE( cluster[i] );
|
||||
FREE( cluster );
|
||||
}
|
||||
}
|
||||
|
||||
/* count number of entries */
|
||||
int count_arg( FILE *file, char *name )
|
||||
{
|
||||
char token[MAX_TOKEN_LENGTH];
|
||||
int count = 0;
|
||||
|
||||
fseek( file, 0, SEEK_SET );
|
||||
while ( read_token( file, token ) ) {
|
||||
if ( strequal( name, token ) )
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Swap these two pointers.
|
||||
====================================================================
|
||||
*/
|
||||
void swap( char **str1, char **str2 )
|
||||
{
|
||||
char *dummy;
|
||||
dummy = *str1;
|
||||
*str1 = *str2;
|
||||
*str2 = dummy;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Return a list with all accessible files and directories in path
|
||||
with the extension ext (if != 0). Don't show hidden files.
|
||||
Root is the name of the parent directory that can't be left. If this
|
||||
is next directory up '..' is not added.
|
||||
====================================================================
|
||||
*/
|
||||
Text* get_file_list( char *path, char *ext, char *root )
|
||||
{
|
||||
Text *text = 0;
|
||||
int i, j;
|
||||
DIR *dir;
|
||||
DIR *test_dir;
|
||||
struct dirent *dirent = 0;
|
||||
List *list = 0;
|
||||
struct stat fstat;
|
||||
char file_name[512];
|
||||
FILE *file;
|
||||
int len;
|
||||
|
||||
/* open this directory */
|
||||
if ( ( dir = opendir( path ) ) == 0 ) {
|
||||
fprintf( stderr, "get_file_list: can't open parent directory '%s'\n", path );
|
||||
return 0;
|
||||
}
|
||||
|
||||
text = calloc( 1, sizeof( Text ) );
|
||||
|
||||
/* use dynamic list to gather all valid entries */
|
||||
list = list_create( LIST_AUTO_DELETE, LIST_NO_CALLBACK );
|
||||
/* read each entry and check if its a valid entry, then add it to the dynamic list */
|
||||
while ( ( dirent = readdir( dir ) ) != 0 ) {
|
||||
/* hiden stuff is not displayed */
|
||||
if ( dirent->d_name[0] == '.' && dirent->d_name[1] != '.' ) continue;
|
||||
/* check if it's the root directory */
|
||||
if ( root )
|
||||
if ( dirent->d_name[0] == '.' )
|
||||
if ( strlen( path ) > strlen( root ) )
|
||||
if ( !strncmp( path + strlen( path ) - strlen( root ), root, strlen( root ) ) )
|
||||
continue;
|
||||
/* get stats */
|
||||
sprintf( file_name, "%s/%s", path, dirent->d_name );
|
||||
if ( stat( file_name, &fstat ) == -1 ) continue;
|
||||
/* check directory */
|
||||
if ( S_ISDIR( fstat.st_mode ) ) {
|
||||
if ( ( test_dir = opendir( file_name ) ) == 0 ) continue;
|
||||
closedir( test_dir );
|
||||
sprintf( file_name, "*%s", dirent->d_name );
|
||||
list_add( list, strdup( file_name ) );
|
||||
}
|
||||
else
|
||||
/* check regular file */
|
||||
if ( S_ISREG( fstat.st_mode ) ) {
|
||||
/* test it */
|
||||
if ( ( file = fopen( file_name, "r" ) ) == 0 ) continue;
|
||||
fclose( file );
|
||||
/* check if this file has the proper extension */
|
||||
if ( ext )
|
||||
if ( !strequal( dirent->d_name + ( strlen( dirent->d_name ) - strlen( ext ) ), ext ) )
|
||||
continue;
|
||||
list_add( list, strdup( dirent->d_name ) );
|
||||
}
|
||||
}
|
||||
/* close dir */
|
||||
closedir( dir );
|
||||
|
||||
/* convert to static list */
|
||||
text->count = list->count;
|
||||
text->lines = calloc( list->count, sizeof( char* ));
|
||||
for ( i = 0; i < text->count; i++ )
|
||||
text->lines[i] = strdup( (char*)list_get( list, i ) );
|
||||
list_delete( list );
|
||||
|
||||
/* sort this list: directories at top and everything in alphabetical order */
|
||||
if ( text->count > 0 )
|
||||
for ( i = 0; i < text->count - 1; i++ )
|
||||
for ( j = i + 1; j < text->count; j++ ) {
|
||||
/* directory comes first */
|
||||
if ( text->lines[j][0] == '*' ) {
|
||||
if ( text->lines[i][0] != '*' )
|
||||
swap( &text->lines[i], &text->lines[j] );
|
||||
else {
|
||||
/* do not exceed buffer size of smaller buffer */
|
||||
len = strlen( text->lines[i] );
|
||||
if ( strlen( text->lines[j] ) < len ) len = strlen( text->lines[j] );
|
||||
if ( strncmp( text->lines[j], text->lines[i], len ) < 0 )
|
||||
swap( &text->lines[i], &text->lines[j] );
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* do not exceed buffer size of smaller buffer */
|
||||
len = strlen( text->lines[i] );
|
||||
if ( strlen( text->lines[j] ) < len ) len = strlen( text->lines[j] );
|
||||
if ( strncmp( text->lines[j], text->lines[i], len ) < 0 )
|
||||
swap( &text->lines[i], &text->lines[j] );
|
||||
}
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
107
project/jni/application/lbreakout2/client/file.h
Normal file
@@ -0,0 +1,107 @@
|
||||
/***************************************************************************
|
||||
file.h - description
|
||||
-------------------
|
||||
begin : Thu Jan 18 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FILE_H
|
||||
#define __FILE_H
|
||||
|
||||
/*
|
||||
this file contains function to work with files like
|
||||
open,close,read/write binary/ascii data...
|
||||
*/
|
||||
|
||||
/* maximum length of a token */
|
||||
enum {
|
||||
MAX_TOKEN_LENGTH = 1024
|
||||
};
|
||||
|
||||
/* shall find_arg reset to beginning of file or use current position? */
|
||||
enum {
|
||||
RESET_FILE_POS = 0,
|
||||
FROM_CURRENT_FILE_POS
|
||||
};
|
||||
|
||||
/* shall read_file_token go to next token or stay at end of current one */
|
||||
enum {
|
||||
GO_TO_NEXT_TOKEN = 0,
|
||||
STAY_AT_TOKEN
|
||||
};
|
||||
|
||||
/* display warning if find_arg failed */
|
||||
enum {
|
||||
NO_WARNING = 0,
|
||||
WARNING
|
||||
};
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Test file in path as mode.
|
||||
Return Value: True if sucessful
|
||||
====================================================================
|
||||
*/
|
||||
int file_check( char *path, char *file, char *mode );
|
||||
/*
|
||||
====================================================================
|
||||
Open file in path according to type (write, read, append)
|
||||
Return Value: File handle if successful else Null
|
||||
====================================================================
|
||||
*/
|
||||
enum {
|
||||
FILE_WRITE,
|
||||
FILE_READ,
|
||||
FILE_APPEND
|
||||
};
|
||||
FILE *file_open( char *path, char *fname, int type );
|
||||
/*
|
||||
====================================================================
|
||||
Read all lines from file pointer and return as static array.
|
||||
Resets the file pointer. Should only be used when reading a whole
|
||||
file.
|
||||
====================================================================
|
||||
*/
|
||||
char** file_read_lines( FILE *file, int *count );
|
||||
|
||||
/* check consistence of file (all brackets/comments closed).
|
||||
will reset the file pos to the very beginning */
|
||||
int check_file_cons( FILE *file );
|
||||
|
||||
/* find a string in the file and set file stream to this position */
|
||||
int find_token( FILE *file, char *name, int type, int warning );
|
||||
|
||||
/* read argument string of a single assignment */
|
||||
char* get_arg( FILE *file, char *name, int type );
|
||||
|
||||
/* read a cluster of arguments and return as static list */
|
||||
char** get_arg_cluster( FILE *file, char *name, int *count, int type, int warning );
|
||||
|
||||
/* free arg cluster */
|
||||
void delete_arg_cluster( char **cluster, int count );
|
||||
|
||||
/* count number of entries */
|
||||
int count_arg( FILE *file, char*name );
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Return a list with all accessible files and directories in path
|
||||
with the extension ext (if != 0). Don't show hidden files.
|
||||
Root is the name of the parent directory that can't be left. If this
|
||||
is next directory up '..' is not added.
|
||||
====================================================================
|
||||
*/
|
||||
Text* get_file_list( char *path, char *ext, char *root );
|
||||
|
||||
#endif
|
||||
363
project/jni/application/lbreakout2/client/frame.c
Normal file
@@ -0,0 +1,363 @@
|
||||
/***************************************************************************
|
||||
frame.c - description
|
||||
-------------------
|
||||
begin : Fri Sep 7 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "lbreakout.h"
|
||||
#include "config.h"
|
||||
#include "player.h"
|
||||
#include "display.h"
|
||||
#include "frame.h"
|
||||
|
||||
extern SDL_Surface *stk_display;
|
||||
extern SDL_Surface *offscreen;
|
||||
extern SDL_Surface *bkgnd; /* background + frame */
|
||||
extern SDL_Surface *brick_pic; /* brick graphics in a horizontal order */
|
||||
/* parts of the frame: left, top, right */
|
||||
extern SDL_Surface *frame_left, *frame_top, *frame_right;
|
||||
extern SDL_Surface *frame_left_shadow, *frame_top_shadow, *frame_right_shadow;
|
||||
extern SDL_Surface *frame_mp_left, *frame_mp_right;
|
||||
extern SDL_Surface *frame_mp_left_shadow, *frame_mp_right_shadow;
|
||||
extern SDL_Surface *lamps; /* life lamps */
|
||||
float score = 0; /* current score */
|
||||
int dest_score; /* final score */
|
||||
int score_x_offset = 54; /* display score at this position (right align)*/
|
||||
int score_x, score_y = BRICK_HEIGHT / 2 - 2; /* center position where to write score */
|
||||
int new_life_y; /* if new life lamp is drawn do this at this y position */
|
||||
int name_x = 404, name_y = BRICK_HEIGHT / 2 - 2; /* offset (right side of screen) */
|
||||
extern int shadow_size;
|
||||
extern Config config;
|
||||
int info_x;
|
||||
int info_y; /* absolute position is info_y + info_offset */
|
||||
int info_offsets[EX_NUMBER]; /* offset at which extra info is displayed */
|
||||
int paddle_info_y[4];
|
||||
int paddle_info_offsets[EX_NUMBER]; /* specialized extras */
|
||||
extern SDL_Surface *extra_pic;
|
||||
#ifdef AUDIO_ENABLED
|
||||
extern StkSound *wav_life_up, *wav_life_down;
|
||||
#endif
|
||||
extern StkFont *display_font;
|
||||
int warp_blink;
|
||||
Delay warp_delay;
|
||||
int warp_x, warp_y;
|
||||
int warp_blinks;
|
||||
extern SDL_Surface *warp_pic;
|
||||
extern Game *game;
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Locals
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Publics
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Create frame by loading and assembling all graphics and loading
|
||||
additional graphics.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_create()
|
||||
{
|
||||
delay_set( &warp_delay, 500 );
|
||||
warp_x = stk_display->w - BRICK_WIDTH + ( BRICK_WIDTH - warp_pic->w ) / 2;
|
||||
warp_y = stk_display->h - warp_pic->h;
|
||||
warp_blink = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Inititate the frame to the according game type.
|
||||
Set the position of the extras displayed, enable life lamps etc.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_init()
|
||||
{
|
||||
/* setup position of extra info */
|
||||
info_x = stk_display->w - BRICK_WIDTH;
|
||||
if ( game->game_type == GT_NETWORK ) {
|
||||
/* general */
|
||||
info_y = 178;
|
||||
info_offsets[EX_METAL] = 26;
|
||||
info_offsets[EX_WEAK_BALL] = 26;
|
||||
info_offsets[EX_EXPL_BALL] = 26;
|
||||
info_offsets[EX_FAST] = 52;
|
||||
info_offsets[EX_SLOW] = 52;
|
||||
info_offsets[EX_CHAOS] = 78;
|
||||
/* paddles */
|
||||
paddle_info_y[0] = 271;
|
||||
paddle_info_y[1] = 7;
|
||||
paddle_info_offsets[EX_SLIME] = 26;
|
||||
paddle_info_offsets[EX_WEAPON] = 52;
|
||||
paddle_info_offsets[EX_WALL] = 78;
|
||||
paddle_info_offsets[EX_GOLDSHOWER] = 104;
|
||||
paddle_info_offsets[EX_GHOST_PADDLE] = 130;
|
||||
paddle_info_offsets[EX_BONUS_MAGNET] = 156;
|
||||
paddle_info_offsets[EX_MALUS_MAGNET] = 156;
|
||||
}
|
||||
else {
|
||||
/* in single player we ignore the second paddle
|
||||
and model general and paddle0 extras so that
|
||||
they result in the old layout */
|
||||
info_y = 48; paddle_info_y[0] = 48;
|
||||
paddle_info_offsets[EX_GOLDSHOWER] = 30;
|
||||
paddle_info_offsets[EX_SLIME] = 60;
|
||||
info_offsets[EX_METAL] = 90;
|
||||
info_offsets[EX_WEAK_BALL] = 90;
|
||||
info_offsets[EX_EXPL_BALL] = 90;
|
||||
paddle_info_offsets[EX_WALL] = 120;
|
||||
paddle_info_offsets[EX_WEAPON] = 150;
|
||||
info_offsets[EX_FAST] = 180;
|
||||
info_offsets[EX_SLOW] = 180;
|
||||
info_offsets[EX_CHAOS] = 210;
|
||||
paddle_info_offsets[EX_GHOST_PADDLE] = 240;
|
||||
paddle_info_offsets[EX_BONUS_MAGNET] = 270;
|
||||
paddle_info_offsets[EX_MALUS_MAGNET] = 270;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Free all resources created by frame_create()
|
||||
====================================================================
|
||||
*/
|
||||
void frame_delete()
|
||||
{
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Draw frame to offscreen and to bkgnd as frame won't change while
|
||||
playing.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_draw()
|
||||
{
|
||||
SDL_Surface *fr_left = (game->game_type==GT_LOCAL)?frame_left:frame_mp_left;
|
||||
SDL_Surface *fr_right = (game->game_type==GT_LOCAL)?frame_right:frame_mp_right;
|
||||
SDL_Surface *fr_left_shadow =
|
||||
(game->game_type==GT_LOCAL)?frame_left_shadow:frame_mp_left_shadow;
|
||||
SDL_Surface *fr_right_shadow =
|
||||
(game->game_type==GT_LOCAL)?frame_right_shadow:frame_mp_right_shadow;
|
||||
/* left and right part are always drawn */
|
||||
/* left part */
|
||||
stk_surface_alpha_blit( fr_left_shadow, 0,0,-1,-1,
|
||||
offscreen, shadow_size, shadow_size, SHADOW_ALPHA );
|
||||
stk_surface_blit( fr_left, 0,0,-1,-1, offscreen, 0,0 );
|
||||
stk_surface_alpha_blit( fr_left_shadow, 0,0,-1,-1,
|
||||
bkgnd, shadow_size, shadow_size, SHADOW_ALPHA );
|
||||
stk_surface_blit( fr_left, 0,0,-1,-1, bkgnd, 0,0 );
|
||||
if ( game->game_type == GT_LOCAL ) {
|
||||
/* add top */
|
||||
stk_surface_alpha_blit( frame_top_shadow, 0,0,-1,-1,
|
||||
offscreen, fr_left->w + shadow_size, shadow_size, SHADOW_ALPHA );
|
||||
stk_surface_blit(
|
||||
frame_top, 0,0,-1,-1, offscreen, fr_left->w,0 );
|
||||
stk_surface_alpha_blit( frame_top_shadow, 0,0,-1,-1,
|
||||
bkgnd, fr_left->w + shadow_size, shadow_size, SHADOW_ALPHA );
|
||||
stk_surface_blit(
|
||||
frame_top, 0,0,-1,-1, bkgnd, fr_left->w,0 );
|
||||
}
|
||||
/* right part */
|
||||
stk_surface_alpha_blit( fr_right_shadow, 0,0,-1,-1,
|
||||
offscreen, stk_display->w - fr_right_shadow->w + shadow_size,
|
||||
shadow_size, SHADOW_ALPHA );
|
||||
stk_surface_blit( fr_right, 0,0,-1,-1, offscreen,
|
||||
stk_display->w - fr_right->w,0 );
|
||||
stk_surface_alpha_blit( fr_right_shadow, 0,0,-1,-1,
|
||||
bkgnd, stk_display->w - fr_right_shadow->w + shadow_size,
|
||||
shadow_size, SHADOW_ALPHA );
|
||||
stk_surface_blit( fr_right, 0,0,-1,-1, bkgnd,
|
||||
stk_display->w - fr_right->w,0 );
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Add life lamps at left side of frame in offscreen
|
||||
====================================================================
|
||||
*/
|
||||
void frame_draw_lives( int lives, int max_lives )
|
||||
{
|
||||
int i,y;
|
||||
/* substract one life to have the same result like in old LBreakout */
|
||||
/* at maximum ten lamps may be displayed */
|
||||
for ( i = 0; i < 10; i++ ) {
|
||||
if ( i < lives - 1 )
|
||||
y = BRICK_HEIGHT;
|
||||
else
|
||||
if ( i < max_lives - 1 )
|
||||
y = 0;
|
||||
else
|
||||
y = BRICK_HEIGHT * 2;
|
||||
stk_surface_blit( lamps, 0,y, BRICK_WIDTH, BRICK_HEIGHT,
|
||||
offscreen, 0, ( MAP_HEIGHT - i - 1 ) * BRICK_HEIGHT );
|
||||
}
|
||||
/* get position of next lamp */
|
||||
new_life_y = stk_display->h - lives * BRICK_HEIGHT;
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Add one new life at offscreen and screen (as this will happen in
|
||||
game )
|
||||
====================================================================
|
||||
*/
|
||||
void frame_add_life()
|
||||
{
|
||||
if ( !game->extra_active[EX_DARKNESS] ) {
|
||||
stk_surface_blit( lamps, 0, BRICK_HEIGHT,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display, 0, new_life_y );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
new_life_y -= BRICK_HEIGHT;
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( 20, wav_life_up );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Switch of a life lamp
|
||||
====================================================================
|
||||
*/
|
||||
void frame_remove_life()
|
||||
{
|
||||
new_life_y += BRICK_HEIGHT;
|
||||
if ( new_life_y >= stk_display->h ) return;
|
||||
if ( !game->extra_active[EX_DARKNESS] ) {
|
||||
stk_surface_blit( lamps, 0, 0, BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display, 0, new_life_y );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
#ifdef AUDIO_ENABLED
|
||||
stk_sound_play_x( 20, wav_life_down );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
====================================================================
|
||||
Display extra information on right side of screen.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_info_hide()
|
||||
{
|
||||
int i, j;
|
||||
if ( !config.bonus_info ) return;
|
||||
for ( i = 0; i < EX_NUMBER; i++ )
|
||||
if ( info_offsets[i] > 0 && game->extra_active[i] ) {
|
||||
stk_surface_blit( offscreen, info_x, info_y + info_offsets[i],
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display, info_x, info_y + info_offsets[i] );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
for ( i = 0; i < EX_NUMBER; i++ )
|
||||
for ( j = 0; j < game->paddle_count; j++ )
|
||||
if ( paddle_info_offsets[i] > 0 && game->paddles[j]->extra_active[i] ) {
|
||||
stk_surface_blit( offscreen, info_x,
|
||||
paddle_info_y[j] + paddle_info_offsets[i],
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display, info_x, paddle_info_y[j] + paddle_info_offsets[i] );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
}
|
||||
void frame_info_show()
|
||||
{
|
||||
char str[12];
|
||||
int i, j;
|
||||
if ( !config.bonus_info ) return;
|
||||
display_font->align = STK_FONT_ALIGN_CENTER_X | STK_FONT_ALIGN_CENTER_Y;
|
||||
for ( i = 0; i < EX_NUMBER; i++ ) {
|
||||
if ( info_offsets[i] > 0 && game->extra_active[i] ) {
|
||||
/* picture */
|
||||
stk_surface_fill(
|
||||
stk_display, info_x, info_y + info_offsets[i],
|
||||
BRICK_WIDTH, BRICK_HEIGHT, 0x0 );
|
||||
stk_surface_alpha_blit( extra_pic, i * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display, info_x, info_y + info_offsets[i], 128 );
|
||||
/* remaining extra_time */
|
||||
sprintf(str, "%i", (game->extra_time[i] / 1000) + 1);
|
||||
/* write text */
|
||||
stk_font_write( display_font, stk_display,
|
||||
info_x + ( BRICK_WIDTH >> 1 ), info_y + info_offsets[i] + ( BRICK_HEIGHT >> 1 ),
|
||||
-1, str );
|
||||
}
|
||||
}
|
||||
for ( i = 0; i < EX_NUMBER; i++ )
|
||||
for ( j = 0; j < game->paddle_count; j++ )
|
||||
if ( paddle_info_offsets[i] > 0 && game->paddles[j]->extra_active[i] ) {
|
||||
if ( i == EX_WALL && game->paddles[j]->extra_time[i] <= 0 ) continue;
|
||||
/* picture */
|
||||
stk_surface_fill(
|
||||
stk_display, info_x, paddle_info_y[j] + paddle_info_offsets[i],
|
||||
BRICK_WIDTH, BRICK_HEIGHT, 0x0 );
|
||||
stk_surface_alpha_blit( extra_pic, i * BRICK_WIDTH, 0,
|
||||
BRICK_WIDTH, BRICK_HEIGHT,
|
||||
stk_display, info_x, paddle_info_y[j] + paddle_info_offsets[i], 128 );
|
||||
/* remaining extra_time */
|
||||
sprintf(str, "%i", (game->paddles[j]->extra_time[i] / 1000) + 1);
|
||||
/* write text */
|
||||
stk_font_write( display_font, stk_display,
|
||||
info_x + ( BRICK_WIDTH >> 1 ),
|
||||
paddle_info_y[j] + paddle_info_offsets[i] + ( BRICK_HEIGHT >> 1 ),
|
||||
-1, str );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Blink the warp icon.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_warp_icon_hide()
|
||||
{
|
||||
if ( game->game_type != GT_LOCAL ) return;
|
||||
if ( game->level_type == LT_PINGPONG ) return;
|
||||
if ( game->bricks_left > game->warp_limit ) return;
|
||||
stk_surface_blit( offscreen, warp_x,warp_y,-1,-1,
|
||||
stk_display, warp_x, warp_y );
|
||||
stk_display_store_drect();
|
||||
}
|
||||
void frame_warp_icon_show()
|
||||
{
|
||||
if ( game->game_type != GT_LOCAL ) return;
|
||||
if ( game->level_type == LT_PINGPONG ) return;
|
||||
if ( game->warp_limit == 0 ) return;
|
||||
if ( game->bricks_left > game->warp_limit ) return;
|
||||
if ( !warp_blink ) return;
|
||||
if ( !game->extra_active[EX_DARKNESS] )
|
||||
stk_surface_blit( warp_pic, 0,0,-1,-1,
|
||||
stk_display, warp_x, warp_y );
|
||||
else
|
||||
stk_surface_alpha_blit( warp_pic, 0,0,-1,-1,
|
||||
stk_display, warp_x, warp_y, 128 );
|
||||
}
|
||||
void frame_warp_icon_update( int ms )
|
||||
{
|
||||
//printf( "%i > %i\n", game->bricks_left, game->warp_limit );
|
||||
if ( game->game_type != GT_LOCAL ) return;
|
||||
if ( game->level_type == LT_PINGPONG ) return;
|
||||
if ( game->bricks_left > game->warp_limit ) return;
|
||||
if ( warp_blinks == 0 ) {
|
||||
warp_blink = 1;
|
||||
return;
|
||||
}
|
||||
if ( delay_timed_out( &warp_delay, ms ) ) {
|
||||
warp_blink = !warp_blink;
|
||||
if ( warp_blink )
|
||||
warp_blinks--;
|
||||
}
|
||||
}
|
||||
85
project/jni/application/lbreakout2/client/frame.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/***************************************************************************
|
||||
frame.h - description
|
||||
-------------------
|
||||
begin : Fri Sep 7 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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 file handles all the graphical stuff concering the frame
|
||||
including drawing of score, lifes and bonus info.
|
||||
====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Create frame by loading and assembling all graphics and loading
|
||||
additional graphics.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_create();
|
||||
/*
|
||||
====================================================================
|
||||
Inititate the frame to the according game type.
|
||||
Set the position of the extras displayed, enable life lamps etc.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_init();
|
||||
/*
|
||||
====================================================================
|
||||
Free all resources created by frame_create()
|
||||
====================================================================
|
||||
*/
|
||||
void frame_delete();
|
||||
/*
|
||||
====================================================================
|
||||
Draw frame to offscreen.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_draw();
|
||||
/*
|
||||
====================================================================
|
||||
Add life lamps at left side of frame in offscreen
|
||||
====================================================================
|
||||
*/
|
||||
void frame_draw_lives( int lives, int max_lives );
|
||||
/*
|
||||
====================================================================
|
||||
Add one new life at offscreen and screen (as this will happen in
|
||||
game )
|
||||
====================================================================
|
||||
*/
|
||||
void frame_add_life();
|
||||
/*
|
||||
====================================================================
|
||||
Switch of a life lamp
|
||||
====================================================================
|
||||
*/
|
||||
void frame_remove_life();
|
||||
/*
|
||||
====================================================================
|
||||
Display extra information on right side of screen.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_info_hide();
|
||||
void frame_info_show();
|
||||
|
||||
/*
|
||||
====================================================================
|
||||
Blink the warp icon.
|
||||
====================================================================
|
||||
*/
|
||||
void frame_warp_icon_hide();
|
||||
void frame_warp_icon_show();
|
||||
void frame_warp_icon_update( int ms );
|
||||
1531
project/jni/application/lbreakout2/client/game.c
Normal file
67
project/jni/application/lbreakout2/client/game.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/***************************************************************************
|
||||
local_game.h - description
|
||||
-------------------
|
||||
begin : Thu Sep 6 2001
|
||||
copyright : (C) 2001 by Michael Speck
|
||||
email : kulkanie@gmx.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
/* in game client states */
|
||||
enum {
|
||||
CS_NONE = 0,
|
||||
CS_RECV_LEVEL, /* wait for level data from server */
|
||||
CS_SCORE_TABLE, /* score table in local game */
|
||||
CS_FINAL_TABLE, /* final score table in local game */
|
||||
CS_FINAL_PLAYER_INFO, /* info that player cleared all levels */
|
||||
CS_RECV_STATS, /* wait for server to send stats */
|
||||
CS_FINAL_STATS, /* looking at final network player stats */
|
||||
CS_GET_READY, /* await click from user */
|
||||
CS_PLAY, /* render frame */
|
||||
CS_NEXT_PLAYER, /* cycle to next player in local game */
|
||||
CS_NEXT_LEVEL, /* init next level for player in local game */
|
||||
CS_RESTART_LEVEL, /* player begins at reset level next time */
|
||||
CS_LOOSE_LIFE, /* take a snapshot and decrease lives */
|
||||
CS_ROUND_RESULT,/* await click and start level receive after it */
|
||||
CS_GAME_OVER, /* all levels are played */
|
||||
CS_CONFIRM_WARP,
|
||||
CS_CONFIRM_QUIT,
|
||||
CS_CONFIRM_RESTART,
|
||||
CS_CONFIRM_CONTINUE,
|
||||
CS_FATAL_ERROR, /* display error and quit game after it */
|
||||
CS_PAUSE,
|
||||
CS_BONUS_LEVEL_SCORE, /* show score gained in bonus level */
|
||||
CS_GET_READY_FOR_NEXT_LEVEL /* wait for click when showing score of bonus level */
|
||||
};
|
||||
|
||||
/* create various resources like shrapnells */
|
||||
void client_game_create();
|
||||
void client_game_delete();
|
||||
|
||||
/* create network/local game context and initiate game state:
|
||||
* network needs to receive the level data and a local game
|
||||
* has to load the next level */
|
||||
int client_game_init_local( char *setname );
|
||||
int client_game_init_network( char *opponent_name, int diff );
|
||||
|
||||
/* create local game context and initiate game state
|
||||
* as given from slot 'slot_id'. */
|
||||
int client_game_resume_local( int slot_id );
|
||||
|
||||
/* finalize a game and free anything allocated by init process */
|
||||
void client_game_finalize();
|
||||
|
||||
/* run the state driven loop until game is broken up or finished */
|
||||
void client_game_run( void );
|
||||
|
||||
/* test a level until all balls got lost */
|
||||
void client_game_test_level( Level *level );
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
absolute B v0.8
|
||||
by Jurgen De Backer
|
||||
annejurgen@pandora.be
|
||||
|
||||
New version of the theme, well, it has changed a lot since the previous version,
|
||||
and looks more consistent now.
|
||||
@@ -0,0 +1,15 @@
|
||||
EXTRA_DIST = back0.png back1.png back2.png back3.png back4.png back5.png \
|
||||
bricks.png extras.png fr_left.png fr_right.png fr_top.png \
|
||||
life.png menuback.png paddle.png shot.png weapon.png \
|
||||
ABOUT README
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/AbsoluteB
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/AbsoluteB/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\\AbsoluteB\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
@@ -0,0 +1,372 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = client/gfx/AbsoluteB
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \
|
||||
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
|
||||
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
|
||||
$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GREP = @GREP@
|
||||
HAVE_ASPRINTF = @HAVE_ASPRINTF@
|
||||
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
|
||||
HAVE_SNPRINTF = @HAVE_SNPRINTF@
|
||||
HAVE_WPRINTF = @HAVE_WPRINTF@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
appname = @appname@
|
||||
arch_flag = @arch_flag@
|
||||
audio_flag = @audio_flag@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
doc_dir = @doc_dir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
hi_dir = @hi_dir@
|
||||
hi_inst_flag = @hi_inst_flag@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
inst_dir = @inst_dir@
|
||||
inst_flag = @inst_flag@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
locdir_flag = @locdir_flag@
|
||||
mandir = @mandir@
|
||||
mixer_flag = @mixer_flag@
|
||||
mkdir_p = @mkdir_p@
|
||||
netdebug_flag = @netdebug_flag@
|
||||
network_flag = @network_flag@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sdlnet_flag = @sdlnet_flag@
|
||||
sdlnet_lib_flag = @sdlnet_lib_flag@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
warp_flag = @warp_flag@
|
||||
win32_deps = @win32_deps@
|
||||
win32_inst_script = @win32_inst_script@
|
||||
EXTRA_DIST = back0.png back1.png back2.png back3.png back4.png back5.png \
|
||||
bricks.png extras.png fr_left.png fr_right.png fr_top.png \
|
||||
life.png menuback.png paddle.png shot.png weapon.png \
|
||||
ABOUT README
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign client/gfx/AbsoluteB/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign client/gfx/AbsoluteB/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-data-local install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/AbsoluteB
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/AbsoluteB/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\\AbsoluteB\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
* Title : absolute B theme for LBreakout 2 by Jurgen De Backer
|
||||
|
||||
* Version number 0.8 created on 6th December 2002
|
||||
|
||||
* Email-address : annejurgen@pandora.be
|
||||
|
||||
* Description
|
||||
|
||||
New version of the theme, well, it has changed a lot since the previous version,
|
||||
and looks more consistent now.
|
||||
The menu background, the in-game frame, the bricks , paddles, weapons, backgrounds and extras have been customized.
|
||||
As you will notice , I modified some of the original backgrounds a bit, and created new ones, all using the Gimp. Hopefully you'll enjoy this theme.
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 128 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
BIN
project/jni/application/lbreakout2/client/gfx/AbsoluteB/life.png
Normal file
|
After Width: | Height: | Size: 955 B |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
BIN
project/jni/application/lbreakout2/client/gfx/AbsoluteB/shot.png
Normal file
|
After Width: | Height: | Size: 417 B |
|
After Width: | Height: | Size: 620 B |
@@ -0,0 +1,4 @@
|
||||
Classic v1.00
|
||||
Author: Michael Speck
|
||||
|
||||
Original theme of LBreakout2
|
||||
@@ -0,0 +1,12 @@
|
||||
EXTRA_DIST = ABOUT
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/Classic
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/Classic/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\\Classic\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
@@ -0,0 +1,368 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = client/gfx/Classic
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \
|
||||
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
|
||||
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
|
||||
$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GREP = @GREP@
|
||||
HAVE_ASPRINTF = @HAVE_ASPRINTF@
|
||||
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
|
||||
HAVE_SNPRINTF = @HAVE_SNPRINTF@
|
||||
HAVE_WPRINTF = @HAVE_WPRINTF@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
appname = @appname@
|
||||
arch_flag = @arch_flag@
|
||||
audio_flag = @audio_flag@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
doc_dir = @doc_dir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
hi_dir = @hi_dir@
|
||||
hi_inst_flag = @hi_inst_flag@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
inst_dir = @inst_dir@
|
||||
inst_flag = @inst_flag@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
locdir_flag = @locdir_flag@
|
||||
mandir = @mandir@
|
||||
mixer_flag = @mixer_flag@
|
||||
mkdir_p = @mkdir_p@
|
||||
netdebug_flag = @netdebug_flag@
|
||||
network_flag = @network_flag@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sdlnet_flag = @sdlnet_flag@
|
||||
sdlnet_lib_flag = @sdlnet_lib_flag@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
warp_flag = @warp_flag@
|
||||
win32_deps = @win32_deps@
|
||||
win32_inst_script = @win32_inst_script@
|
||||
EXTRA_DIST = ABOUT
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign client/gfx/Classic/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign client/gfx/Classic/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-data-local install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/Classic
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/Classic/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\\Classic\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
32
project/jni/application/lbreakout2/client/gfx/Makefile.am
Normal file
@@ -0,0 +1,32 @@
|
||||
EXTRA_DIST = back0.png back1.png back2.png back3.png back4.png back5.png \
|
||||
ball.png bricks.png extras.png \
|
||||
f_small_red.png f_small_white.png f_small_yellow.png \
|
||||
f_white.png f_yellow.png \
|
||||
fr_left.png fr_right.png fr_top.png \
|
||||
fr_mp_left.png fr_mp_right.png \
|
||||
life.png menuback.png paddle.png shine.png shot.png weapon.png \
|
||||
sel_frame.png buttons.png explosions.png explosions_dark.png \
|
||||
f_tiny_black.png balloon.png balloon_peek.png \
|
||||
f_frame.png f_game.png \
|
||||
scroll_up.png scroll_down.png scroll_track.png \
|
||||
fr_hori.png fr_vert.png fr_luc.png \
|
||||
fr_llc.png fr_ruc.png fr_rlc.png confirm_buttons.png \
|
||||
win_icon.png cr_back.png warp.png nukeback.png \
|
||||
loading.png ammo.png
|
||||
|
||||
SUBDIRS = AbsoluteB Oz Moiree Classic
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
@list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
(cd $$subdir \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
|
||||
done
|
||||
545
project/jni/application/lbreakout2/client/gfx/Makefile.in
Normal file
@@ -0,0 +1,545 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = client/gfx
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \
|
||||
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
|
||||
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
|
||||
$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GREP = @GREP@
|
||||
HAVE_ASPRINTF = @HAVE_ASPRINTF@
|
||||
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
|
||||
HAVE_SNPRINTF = @HAVE_SNPRINTF@
|
||||
HAVE_WPRINTF = @HAVE_WPRINTF@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
appname = @appname@
|
||||
arch_flag = @arch_flag@
|
||||
audio_flag = @audio_flag@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
doc_dir = @doc_dir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
hi_dir = @hi_dir@
|
||||
hi_inst_flag = @hi_inst_flag@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
inst_dir = @inst_dir@
|
||||
inst_flag = @inst_flag@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
locdir_flag = @locdir_flag@
|
||||
mandir = @mandir@
|
||||
mixer_flag = @mixer_flag@
|
||||
mkdir_p = @mkdir_p@
|
||||
netdebug_flag = @netdebug_flag@
|
||||
network_flag = @network_flag@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sdlnet_flag = @sdlnet_flag@
|
||||
sdlnet_lib_flag = @sdlnet_lib_flag@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
warp_flag = @warp_flag@
|
||||
win32_deps = @win32_deps@
|
||||
win32_inst_script = @win32_inst_script@
|
||||
EXTRA_DIST = back0.png back1.png back2.png back3.png back4.png back5.png \
|
||||
ball.png bricks.png extras.png \
|
||||
f_small_red.png f_small_white.png f_small_yellow.png \
|
||||
f_white.png f_yellow.png \
|
||||
fr_left.png fr_right.png fr_top.png \
|
||||
fr_mp_left.png fr_mp_right.png \
|
||||
life.png menuback.png paddle.png shine.png shot.png weapon.png \
|
||||
sel_frame.png buttons.png explosions.png explosions_dark.png \
|
||||
f_tiny_black.png balloon.png balloon_peek.png \
|
||||
f_frame.png f_game.png \
|
||||
scroll_up.png scroll_down.png scroll_track.png \
|
||||
fr_hori.png fr_vert.png fr_luc.png \
|
||||
fr_llc.png fr_ruc.png fr_rlc.png confirm_buttons.png \
|
||||
win_icon.png cr_back.png warp.png nukeback.png \
|
||||
loading.png ammo.png
|
||||
|
||||
SUBDIRS = AbsoluteB Oz Moiree Classic
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign client/gfx/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign client/gfx/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-recursive ctags ctags-recursive \
|
||||
distclean distclean-generic distclean-recursive distclean-tags \
|
||||
distdir dvi dvi-am html html-am info info-am install \
|
||||
install-am install-data install-data-am install-data-local \
|
||||
install-exec install-exec-am install-info install-info-am \
|
||||
install-man install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
|
||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
@list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
(cd $$subdir \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -0,0 +1,6 @@
|
||||
Theme: moiree
|
||||
Version: 1.0
|
||||
Author: Astrid
|
||||
Email: astrid-peters@t-online.de
|
||||
Description: If you like ascii quake, you will like this one too.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
EXTRA_DIST = back0.png back1.png back2.png back3.png back4.png back5.png \
|
||||
bricks.png extras.png fr_left.png fr_right.png fr_top.png \
|
||||
fr_mp_left.png fr_mp_right.png \
|
||||
life.png paddle.png \
|
||||
ABOUT
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/Moiree
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/Moiree/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\\Moiree\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
373
project/jni/application/lbreakout2/client/gfx/Moiree/Makefile.in
Normal file
@@ -0,0 +1,373 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = client/gfx/Moiree
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \
|
||||
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
|
||||
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
|
||||
$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GREP = @GREP@
|
||||
HAVE_ASPRINTF = @HAVE_ASPRINTF@
|
||||
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
|
||||
HAVE_SNPRINTF = @HAVE_SNPRINTF@
|
||||
HAVE_WPRINTF = @HAVE_WPRINTF@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
appname = @appname@
|
||||
arch_flag = @arch_flag@
|
||||
audio_flag = @audio_flag@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
doc_dir = @doc_dir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
hi_dir = @hi_dir@
|
||||
hi_inst_flag = @hi_inst_flag@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
inst_dir = @inst_dir@
|
||||
inst_flag = @inst_flag@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
locdir_flag = @locdir_flag@
|
||||
mandir = @mandir@
|
||||
mixer_flag = @mixer_flag@
|
||||
mkdir_p = @mkdir_p@
|
||||
netdebug_flag = @netdebug_flag@
|
||||
network_flag = @network_flag@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sdlnet_flag = @sdlnet_flag@
|
||||
sdlnet_lib_flag = @sdlnet_lib_flag@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
warp_flag = @warp_flag@
|
||||
win32_deps = @win32_deps@
|
||||
win32_inst_script = @win32_inst_script@
|
||||
EXTRA_DIST = back0.png back1.png back2.png back3.png back4.png back5.png \
|
||||
bricks.png extras.png fr_left.png fr_right.png fr_top.png \
|
||||
fr_mp_left.png fr_mp_right.png \
|
||||
life.png paddle.png \
|
||||
ABOUT
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign client/gfx/Moiree/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign client/gfx/Moiree/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-data-local install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/Moiree
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/Moiree/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\\Moiree\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/back0.png
Normal file
|
After Width: | Height: | Size: 221 B |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/back1.png
Normal file
|
After Width: | Height: | Size: 260 B |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/back2.png
Normal file
|
After Width: | Height: | Size: 188 B |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/back3.png
Normal file
|
After Width: | Height: | Size: 447 B |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/back4.png
Normal file
|
After Width: | Height: | Size: 427 B |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/back5.png
Normal file
|
After Width: | Height: | Size: 433 B |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/bricks.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/extras.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/fr_left.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 289 B |
|
After Width: | Height: | Size: 367 B |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/fr_top.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/life.png
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
project/jni/application/lbreakout2/client/gfx/Moiree/paddle.png
Normal file
|
After Width: | Height: | Size: 653 B |
15
project/jni/application/lbreakout2/client/gfx/Oz/Makefile.am
Normal file
@@ -0,0 +1,15 @@
|
||||
EXTRA_DIST = back0.png back1.png back2.png back3.png back4.png \
|
||||
bricks.png fr_left.png fr_right.png fr_top.png \
|
||||
life.png paddle.png \
|
||||
README
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/Oz
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/Oz/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\\Oz\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
372
project/jni/application/lbreakout2/client/gfx/Oz/Makefile.in
Normal file
@@ -0,0 +1,372 @@
|
||||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = client/gfx/Oz
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \
|
||||
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
|
||||
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \
|
||||
$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
|
||||
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
|
||||
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
|
||||
$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GREP = @GREP@
|
||||
HAVE_ASPRINTF = @HAVE_ASPRINTF@
|
||||
HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
|
||||
HAVE_SNPRINTF = @HAVE_SNPRINTF@
|
||||
HAVE_WPRINTF = @HAVE_WPRINTF@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
appname = @appname@
|
||||
arch_flag = @arch_flag@
|
||||
audio_flag = @audio_flag@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
doc_dir = @doc_dir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
hi_dir = @hi_dir@
|
||||
hi_inst_flag = @hi_inst_flag@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
inst_dir = @inst_dir@
|
||||
inst_flag = @inst_flag@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
locdir_flag = @locdir_flag@
|
||||
mandir = @mandir@
|
||||
mixer_flag = @mixer_flag@
|
||||
mkdir_p = @mkdir_p@
|
||||
netdebug_flag = @netdebug_flag@
|
||||
network_flag = @network_flag@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sdlnet_flag = @sdlnet_flag@
|
||||
sdlnet_lib_flag = @sdlnet_lib_flag@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
warp_flag = @warp_flag@
|
||||
win32_deps = @win32_deps@
|
||||
win32_inst_script = @win32_inst_script@
|
||||
EXTRA_DIST = back0.png back1.png back2.png back3.png back4.png \
|
||||
bricks.png fr_left.png fr_right.png fr_top.png \
|
||||
life.png paddle.png \
|
||||
README
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign client/gfx/Oz/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign client/gfx/Oz/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-data-local install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
|
||||
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/Oz
|
||||
@for file in $(EXTRA_DIST); do\
|
||||
$(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/gfx/Oz/$$file;\
|
||||
done
|
||||
|
||||
win32-install-script:
|
||||
@for file in $(EXTRA_DIST); do \
|
||||
echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\\gfx\\Oz\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
|
||||
done
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
8
project/jni/application/lbreakout2/client/gfx/Oz/README
Normal file
@@ -0,0 +1,8 @@
|
||||
Title: Oz
|
||||
Version: 1.0
|
||||
Author: Austin Henry
|
||||
Email: ahenry@alumni.uvic.ca
|
||||
Description: These graphics were all produced from photos taken on a trip to Australia.
|
||||
Primarily from photos of interesting sand and rock formations. I
|
||||
left the backgrounds other than the black ones, because they went
|
||||
so well with the colour scheme.
|
||||
BIN
project/jni/application/lbreakout2/client/gfx/Oz/back0.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
project/jni/application/lbreakout2/client/gfx/Oz/back1.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
project/jni/application/lbreakout2/client/gfx/Oz/back2.png
Normal file
|
After Width: | Height: | Size: 36 KiB |