Compare commits
No commits in common. "f716b57ff9a2460c034c5411b80149c27e397a56" and "63f9fd9d097c9946843cc23287f345a64cb38970" have entirely different histories.
f716b57ff9
...
63f9fd9d09
316
INSTALL
316
INSTALL
|
@ -1,8 +1,8 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
@ -12,96 +12,97 @@ without warranty of any kind.
|
|||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell command './configure && make && make install'
|
||||
Briefly, the shell command `./configure && make && make install'
|
||||
should configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the 'README' file for
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
'INSTALL' file but do not implement all of the features documented
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The 'configure' shell script attempts to guess correct values for
|
||||
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
|
||||
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, and a
|
||||
file 'config.log' containing compiler output (useful mainly for
|
||||
debugging 'configure').
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called 'config.cache' and
|
||||
enabled with '--cache-file=config.cache' or simply '-C') that saves the
|
||||
results of its tests to speed up reconfiguring. Caching is disabled by
|
||||
default to prevent problems with accidental use of stale cache files.
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
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
|
||||
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 you are using the cache, and at
|
||||
some point 'config.cache' contains results you don't want to keep, you
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file 'configure.ac' (or 'configure.in') is used to create
|
||||
'configure' by a program called 'autoconf'. You need 'configure.ac' if
|
||||
you want to change it or regenerate 'configure' using a newer version of
|
||||
'autoconf'.
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' 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.
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running 'configure' might take a while. While running, it prints
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type 'make' to compile the package.
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type 'make check' to run any self-tests that come with
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type 'make install' to install the programs and any data files and
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the 'make install' phase executed with root
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type 'make installcheck' to repeat any self-tests, but
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior 'make install' required
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing 'make clean'. To also remove the
|
||||
files that 'configure' created (so you can compile the package for
|
||||
a different kind of computer), type 'make distclean'. There is
|
||||
also a 'make maintainer-clean' target, but that is intended mainly
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type 'make uninstall' to remove the installed
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide 'make
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like 'make install' and 'make uninstall' work correctly.
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the 'configure' script does not know about. Run './configure --help'
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give 'configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here is
|
||||
an example:
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
|
@ -112,21 +113,21 @@ 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 can use GNU 'make'. 'cd' to the
|
||||
own directory. To do this, you can use 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 '..'. This is known
|
||||
as a "VPATH" build.
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU 'make', it is safer to compile the package for one
|
||||
With a non-GNU `make', it is safer 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
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple '-arch' options to the
|
||||
compiler but only a single '-arch' option to the preprocessor. Like
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
|
@ -135,104 +136,105 @@ this:
|
|||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the 'lipo' tool if you have problems.
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, 'make install' installs the package's commands under
|
||||
'/usr/local/bin', include files under '/usr/local/include', etc. You
|
||||
can specify an installation prefix other than '/usr/local' by giving
|
||||
'configure' the option '--prefix=PREFIX', where PREFIX must be an
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like '--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run 'configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the default
|
||||
for these options is expressed in terms of '${prefix}', so that
|
||||
specifying just '--prefix' will affect all of the other directory
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to 'configure'; however, many packages provide one or
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
'make install' command line to change installation locations without
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, 'make install
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
'${prefix}'. Any directories that were specified during 'configure',
|
||||
but not in terms of '${prefix}', must each be overridden at install time
|
||||
for the entire installation to be relocated. The approach of makefile
|
||||
variable overrides for each directory variable is required by the GNU
|
||||
Coding Standards, and ideally causes no recompilation. However, some
|
||||
platforms have known limitations with the semantics of shared libraries
|
||||
that end up requiring recompilation when using this method, particularly
|
||||
noticeable in packages that use GNU Libtool.
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the 'DESTDIR' variable. For
|
||||
example, 'make install DESTDIR=/alternate/directory' will prepend
|
||||
'/alternate/directory' before all installation names. The approach of
|
||||
'DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of '${prefix}'
|
||||
at 'configure' time.
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
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'.
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
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
|
||||
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
|
||||
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.
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of 'make' will be. For these packages, running './configure
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with 'make V=1'; while running './configure
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with 'make V=0'.
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
|
||||
is not installed, it is recommended to use the following options in
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX 'make' updates targets which have the same time stamps as their
|
||||
prerequisites, which makes it generally unusable when shipped generated
|
||||
files such as 'configure' are involved. Use GNU 'make' instead.
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
|
||||
workaround. If GNU CC is not installed, it is therefore recommended to
|
||||
try
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
|
@ -240,26 +242,26 @@ and if that doesn't work, try
|
|||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
|
||||
in your 'PATH', put it _after_ '/usr/bin'.
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in '/boot/common',
|
||||
not '/usr/local'. It is recommended to use the following options:
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features 'configure' cannot figure out
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, 'configure' can figure that out, but if it prints
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
'--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as 'sun4', or a canonical name which has the form:
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
|
@ -268,101 +270,101 @@ where SYSTEM can have one of these forms:
|
|||
OS
|
||||
KERNEL-OS
|
||||
|
||||
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
|
||||
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 machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option '--target=TYPE' to select the type of system they will
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with '--host=TYPE'.
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to 'configure'. However, some packages may run
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the 'configure' command line, using 'VAR=value'. For example:
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified 'gcc' to be used as the C compiler (unless it is
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
|
||||
Autoconf limitation. Until the limitation is lifted, you can use this
|
||||
workaround:
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
'configure' Invocation
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
'configure' recognizes the following options to control how it
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
'--help'
|
||||
'-h'
|
||||
Print a summary of all of the options to 'configure', and exit.
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
'--help=short'
|
||||
'--help=recursive'
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
'configure', and exit. The 'short' variant lists options used only
|
||||
in the top level, while the 'recursive' variant lists options also
|
||||
present in any nested packages.
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
'--version'
|
||||
'-V'
|
||||
Print the version of Autoconf used to generate the 'configure'
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
'--cache-file=FILE'
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally 'config.cache'. FILE defaults to '/dev/null' to
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
'--config-cache'
|
||||
'-C'
|
||||
Alias for '--cache-file=config.cache'.
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
'--quiet'
|
||||
'--silent'
|
||||
'-q'
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to '/dev/null' (any error
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
'--srcdir=DIR'
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
'configure' can determine that directory automatically.
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
'--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names:: for
|
||||
more details, including other options available for fine-tuning the
|
||||
installation locations.
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
'--no-create'
|
||||
'-n'
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
'configure' also accepts some other, not widely useful, options. Run
|
||||
'configure --help' for more details.
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
|
|
@ -136,7 +136,6 @@ nobase_dist_gamedata_DATA = images/background.png \
|
|||
images/crash_3.png \
|
||||
images/crash_4.png \
|
||||
images/gameintro.png \
|
||||
images/gamefinish.png \
|
||||
images/penguin_intro_back.png \
|
||||
images/penguin_intro_color.png \
|
||||
images/penguin_intro_front.png \
|
||||
|
@ -154,8 +153,7 @@ nobase_dist_gamedata_DATA = images/background.png \
|
|||
sounds/bag_land.wav \
|
||||
sounds/splop.wav \
|
||||
klickclack.ttf \
|
||||
burbanks.ttf \
|
||||
comicrazybi.ttf
|
||||
burbanks.ttf
|
||||
|
||||
# Instalar los archivos .desktop e iconos
|
||||
applicationsdir = $(datadir)/applications
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 7.8 KiB |
|
@ -4,7 +4,6 @@ gamedatadir = $(pkgdatadir)/data
|
|||
|
||||
bin_PROGRAMS = bean-counters-classic
|
||||
bean_counters_classic_SOURCES = beans.c \
|
||||
coords.c coords.h \
|
||||
gfx_blit_func.c gfx_blit_func.h \
|
||||
path.c path.h \
|
||||
collider.c collider.h \
|
||||
|
|
691
src/beans.c
691
src/beans.c
|
@ -46,7 +46,6 @@
|
|||
#include "draw-text.h"
|
||||
#include "zoom.h"
|
||||
#include "cp-button.h"
|
||||
#include "coords.h"
|
||||
|
||||
#define FPS (1000/24)
|
||||
#define RANDOM(x) ((int) (x ## .0 * rand () / (RAND_MAX + 1.0)))
|
||||
|
@ -72,10 +71,29 @@
|
|||
#define TRUE !FALSE
|
||||
#endif
|
||||
|
||||
enum {
|
||||
NO_NEXT_LEVEL = 0,
|
||||
NEXT_LEVEL,
|
||||
GAME_WIN
|
||||
};
|
||||
|
||||
typedef struct _BeanBag {
|
||||
int bag;
|
||||
int throw_length;
|
||||
int frame;
|
||||
|
||||
union {
|
||||
const int (*bag_points)[3];
|
||||
const int (*object_points)[2];
|
||||
};
|
||||
|
||||
struct _BeanBag *prev;
|
||||
struct _BeanBag *next;
|
||||
} BeanBag;
|
||||
|
||||
/* Enumerar las imágenes */
|
||||
enum {
|
||||
IMG_GAMEINTRO,
|
||||
IMG_GAMEFINISH,
|
||||
|
||||
IMG_PENGUIN_INTRO_BACK,
|
||||
IMG_PENGUIN_INTRO_COLOR,
|
||||
|
@ -206,7 +224,6 @@ enum {
|
|||
/* Los nombres de archivos */
|
||||
const char *images_names[NUM_IMAGES] = {
|
||||
"images/gameintro.png",
|
||||
"images/gamefinish.png",
|
||||
|
||||
"images/penguin_intro_back.png",
|
||||
"images/penguin_intro_color.png",
|
||||
|
@ -372,8 +389,6 @@ enum {
|
|||
BUTTON_NEXT_PAGE,
|
||||
BUTTON_EXPLAIN_PLAY_GAME,
|
||||
|
||||
BUTTON_GET_BONUS,
|
||||
|
||||
NUM_BUTTONS
|
||||
};
|
||||
|
||||
|
@ -526,23 +541,6 @@ enum {
|
|||
NUM_COLLIDERS
|
||||
};
|
||||
|
||||
const char *collider_names[NUM_COLLIDERS] = {
|
||||
"collider/bag_3.col",
|
||||
|
||||
"collider/penguin_1.col",
|
||||
"collider/penguin_2.col",
|
||||
"collider/penguin_3.col",
|
||||
"collider/penguin_4.col",
|
||||
"collider/penguin_5.col",
|
||||
"collider/penguin_6.col",
|
||||
"collider/penguin_7.col",
|
||||
"collider/penguin_8.col",
|
||||
"collider/penguin_9.col",
|
||||
"collider/penguin_10.col",
|
||||
|
||||
"collider/oneup.col"
|
||||
};
|
||||
|
||||
enum {
|
||||
TEXT_LIVES,
|
||||
TEXT_TRUCKS,
|
||||
|
@ -567,15 +565,397 @@ enum {
|
|||
TEXT_EXPLAIN_3,
|
||||
TEXT_EXPLAIN_4,
|
||||
|
||||
TEXT_ONE_UP,
|
||||
|
||||
TEXT_CONGRATULATIONS,
|
||||
TEXT_BONUS,
|
||||
TEXT_GET_PAID,
|
||||
|
||||
NUM_TEXTS
|
||||
};
|
||||
|
||||
const char *collider_names[NUM_COLLIDERS] = {
|
||||
"collider/bag_3.col",
|
||||
|
||||
"collider/penguin_1.col",
|
||||
"collider/penguin_2.col",
|
||||
"collider/penguin_3.col",
|
||||
"collider/penguin_4.col",
|
||||
"collider/penguin_5.col",
|
||||
"collider/penguin_6.col",
|
||||
"collider/penguin_7.col",
|
||||
"collider/penguin_8.col",
|
||||
"collider/penguin_9.col",
|
||||
"collider/penguin_10.col",
|
||||
|
||||
"collider/oneup.col"
|
||||
};
|
||||
|
||||
const SDL_Color penguin_colors[18] = {
|
||||
{0, 51, 102},
|
||||
{51, 51, 51},
|
||||
{206, 0, 0},
|
||||
{255, 204, 0},
|
||||
{0, 153, 0},
|
||||
{153, 102, 0},
|
||||
{255, 49, 156},
|
||||
{99, 0, 156},
|
||||
{0, 156, 204},
|
||||
{255, 102, 0},
|
||||
{0, 102, 0},
|
||||
{255, 99, 99},
|
||||
{139, 227, 3},
|
||||
{28, 150, 163},
|
||||
{240, 240, 216},
|
||||
{174, 159, 200},
|
||||
{128, 33, 75},
|
||||
{46, 71, 170}
|
||||
};
|
||||
|
||||
const int bag_0_points[31][3] = {
|
||||
{0, 638, 108},
|
||||
{0, 613, 98},
|
||||
{0, 588, 87},
|
||||
{0, 565, 80},
|
||||
{0, 543, 72},
|
||||
{0, 523, 68},
|
||||
{0, 504, 65},
|
||||
{0, 485, 61},
|
||||
{1, 493, 28},
|
||||
{1, 479, 27},
|
||||
{1, 465, 27},
|
||||
{1, 456, 28},
|
||||
{2, 427, 86},
|
||||
{2, 413, 89},
|
||||
{2, 401, 93},
|
||||
{2, 388, 97},
|
||||
{2, 371, 103},
|
||||
{2, 355, 110},
|
||||
{2, 340, 119},
|
||||
{2, 322, 131},
|
||||
{2, 305, 146},
|
||||
{2, 290, 161},
|
||||
{2, 273, 181},
|
||||
{2, 259, 203},
|
||||
{2, 246, 226},
|
||||
{2, 233, 254},
|
||||
{2, 223, 282},
|
||||
{2, 214, 311},
|
||||
{2, 205, 343},
|
||||
{2, 196, 375},
|
||||
{3, 165, 408}
|
||||
};
|
||||
|
||||
const int bag_1_points[22][3] = {
|
||||
{0, 633, 209},
|
||||
{0, 622, 168},
|
||||
{0, 610, 134},
|
||||
{0, 598, 107},
|
||||
{0, 586, 87},
|
||||
{0, 574, 74},
|
||||
{0, 563, 69},
|
||||
{0, 558, 68},
|
||||
{1, 579, 38},
|
||||
{1, 571, 42},
|
||||
{1, 563, 51},
|
||||
{1, 554, 65},
|
||||
{2, 527, 141},
|
||||
{2, 520, 164},
|
||||
{2, 512, 187},
|
||||
{2, 505, 215},
|
||||
{2, 498, 246},
|
||||
{2, 491, 280},
|
||||
{2, 484, 317},
|
||||
{2, 478, 358},
|
||||
{2, 472, 402},
|
||||
{3, 441, 420}
|
||||
};
|
||||
|
||||
const int bag_2_points[28][3] = {
|
||||
{0, 633, 229},
|
||||
{0, 620, 202},
|
||||
{0, 606, 175},
|
||||
{0, 593, 154},
|
||||
{0, 579, 132},
|
||||
{0, 565, 116},
|
||||
{0, 550, 100},
|
||||
{0, 536, 89},
|
||||
{1, 548, 49},
|
||||
{1, 535, 46},
|
||||
{1, 523, 43},
|
||||
{1, 510, 39},
|
||||
{2, 477, 99},
|
||||
{2, 461, 104},
|
||||
{2, 444, 114},
|
||||
{2, 427, 126},
|
||||
{2, 413, 140},
|
||||
{2, 399, 160},
|
||||
{2, 385, 179},
|
||||
{2, 370, 199},
|
||||
{2, 357, 224},
|
||||
{2, 344, 249},
|
||||
{2, 331, 273},
|
||||
{2, 319, 304},
|
||||
{2, 307, 335},
|
||||
{2, 294, 365},
|
||||
{2, 282, 396},
|
||||
{3, 251, 405}
|
||||
};
|
||||
|
||||
const int bag_3_points[33][3] = {
|
||||
{0, 647, 305},
|
||||
{0, 620, 267},
|
||||
{0, 595, 236},
|
||||
{0, 570, 204},
|
||||
{0, 546, 179},
|
||||
{0, 522, 153},
|
||||
{0, 499, 135},
|
||||
{0, 477, 116},
|
||||
{1, 481, 71},
|
||||
{1, 463, 63},
|
||||
{1, 444, 54},
|
||||
{1, 429, 50},
|
||||
{2, 397, 106},
|
||||
{2, 389, 107},
|
||||
{2, 381, 108},
|
||||
{2, 373, 109},
|
||||
{2, 365, 110},
|
||||
{2, 354, 114},
|
||||
{2, 343, 117},
|
||||
{2, 330, 125},
|
||||
{2, 316, 132},
|
||||
{2, 302, 145},
|
||||
{2, 288, 158},
|
||||
{2, 275, 176},
|
||||
{2, 261, 194},
|
||||
{2, 249, 217},
|
||||
{2, 237, 240},
|
||||
{2, 227, 267},
|
||||
{2, 217, 294},
|
||||
{2, 208, 326},
|
||||
{2, 198, 358},
|
||||
{2, 189, 389},
|
||||
{3, 141, 422}
|
||||
};
|
||||
|
||||
const int bag_stack_offsets[30][2] = {
|
||||
{15, 251},
|
||||
{14, 236},
|
||||
{13, 227},
|
||||
{13, 220},
|
||||
{13, 211},
|
||||
{13, 203},
|
||||
{12, 192},
|
||||
{12, 182},
|
||||
{13, 173},
|
||||
{9, 165}, // 10
|
||||
{10, 158},
|
||||
{10, 149},
|
||||
{10, 141},
|
||||
{8, 136},
|
||||
{8, 125},
|
||||
{8, 120},
|
||||
{0, 114},
|
||||
{2, 106},
|
||||
{2, 94},
|
||||
{2, 85}, // 20
|
||||
{2, 79},
|
||||
{2, 70},
|
||||
{2, 69},
|
||||
{2, 60},
|
||||
{2, 52},
|
||||
{2, 42},
|
||||
{2, 35},
|
||||
{2, 25},
|
||||
{2, 20}
|
||||
// {2, 11} del 30 al 60
|
||||
};
|
||||
|
||||
const int anvil_offsets [24][2] = {
|
||||
{631, 276},
|
||||
{609, 226},
|
||||
{589, 185},
|
||||
{570, 151},
|
||||
{551, 126},
|
||||
{534, 109},
|
||||
{519, 101},
|
||||
{509, 100},
|
||||
{503, 100},
|
||||
{495, 103},
|
||||
{486, 111},
|
||||
{478, 124},
|
||||
{470, 137},
|
||||
{464, 154},
|
||||
{458, 171},
|
||||
{454, 192},
|
||||
{450, 214},
|
||||
{446, 238},
|
||||
{443, 263},
|
||||
{441, 291},
|
||||
{437, 320},
|
||||
{435, 352},
|
||||
{432, 384},
|
||||
{422, 406}
|
||||
};
|
||||
|
||||
const int anvil_collider_offsets [23][2] = {
|
||||
{692, 298},
|
||||
{669, 245},
|
||||
{647, 201},
|
||||
{627, 165},
|
||||
{608, 138},
|
||||
{590, 120},
|
||||
{574, 111},
|
||||
{564, 109},
|
||||
{559, 109},
|
||||
{550, 112},
|
||||
{541, 119},
|
||||
{533, 132},
|
||||
{525, 145},
|
||||
{519, 162},
|
||||
{512, 180},
|
||||
{508, 202},
|
||||
{503, 223},
|
||||
{499, 249},
|
||||
{496, 275},
|
||||
{492, 304},
|
||||
{488, 333},
|
||||
{485, 366},
|
||||
{482, 399}
|
||||
};
|
||||
|
||||
const int fish_collider_offsets [10][2] = {
|
||||
{337, 157},
|
||||
{326, 173},
|
||||
{315, 191},
|
||||
{303, 207},
|
||||
{292, 229},
|
||||
{282, 251},
|
||||
{271, 272},
|
||||
{260, 299},
|
||||
{250, 325},
|
||||
{240, 351},
|
||||
};
|
||||
|
||||
const int flower_collider_offsets [11][2] = {
|
||||
{465, 163},
|
||||
{455, 174},
|
||||
{446, 184},
|
||||
{436, 194},
|
||||
{427, 210},
|
||||
{419, 226},
|
||||
{410, 242},
|
||||
{403, 264},
|
||||
{396, 286},
|
||||
{388, 308},
|
||||
{381, 330}
|
||||
};
|
||||
|
||||
const int oneup_offsets[35][2] = {
|
||||
{636, 142},
|
||||
{624, 130},
|
||||
{611, 119},
|
||||
{598, 107},
|
||||
{586, 96},
|
||||
{573, 84},
|
||||
{560, 72},
|
||||
{547, 70},
|
||||
{534, 68},
|
||||
{521, 66},
|
||||
{507, 64},
|
||||
{494, 62},
|
||||
{481, 60},
|
||||
{468, 58},
|
||||
{454, 56},
|
||||
{442, 67},
|
||||
{431, 80},
|
||||
{420, 93},
|
||||
{409, 105},
|
||||
{398, 118},
|
||||
{392, 139},
|
||||
{386, 159},
|
||||
{380, 180},
|
||||
{373, 201},
|
||||
{367, 221},
|
||||
{361, 242},
|
||||
{355, 263},
|
||||
{349, 284},
|
||||
{343, 304},
|
||||
{337, 325},
|
||||
{334, 351},
|
||||
{330, 378},
|
||||
{327, 404},
|
||||
{324, 431},
|
||||
{321, 458}
|
||||
};
|
||||
|
||||
const int fish_offsets[35][2] = {
|
||||
{634, 247},
|
||||
{603, 213},
|
||||
{574, 184},
|
||||
{546, 158},
|
||||
{518, 136},
|
||||
{492, 119},
|
||||
{468, 105},
|
||||
{445, 96},
|
||||
{425, 90},
|
||||
{407, 87},
|
||||
{393, 86},
|
||||
{383, 86},
|
||||
{375, 87},
|
||||
{368, 88},
|
||||
{361, 90},
|
||||
{354, 91},
|
||||
{347, 93},
|
||||
{336, 98},
|
||||
{325, 104},
|
||||
{314, 110},
|
||||
{302, 121},
|
||||
{289, 132},
|
||||
{277, 143},
|
||||
{265, 160},
|
||||
{254, 177},
|
||||
{242, 194},
|
||||
{231, 215},
|
||||
{220, 237},
|
||||
{210, 259},
|
||||
{200, 285},
|
||||
{189, 311},
|
||||
{179, 337},
|
||||
{170, 367},
|
||||
{160, 397},
|
||||
{122, 433}
|
||||
};
|
||||
|
||||
const int flower_offsets[32][2] = {
|
||||
{646, 217},
|
||||
{626, 192},
|
||||
{606, 167},
|
||||
{587, 147},
|
||||
{569, 128},
|
||||
{551, 115},
|
||||
{534, 101},
|
||||
{519, 94},
|
||||
{503, 87},
|
||||
{492, 85},
|
||||
{481, 82},
|
||||
{475, 82},
|
||||
{467, 82},
|
||||
{463, 83},
|
||||
{457, 85},
|
||||
{452, 86},
|
||||
{443, 91},
|
||||
{435, 95},
|
||||
{426, 100},
|
||||
{417, 110},
|
||||
{408, 120},
|
||||
{399, 131},
|
||||
{390, 146},
|
||||
{382, 162},
|
||||
{374, 178},
|
||||
{366, 198},
|
||||
{359, 218},
|
||||
{352, 239},
|
||||
{345, 264},
|
||||
{339, 288},
|
||||
{332, 313},
|
||||
{334, 382}
|
||||
};
|
||||
|
||||
const char *text_strings[NUM_TEXTS] = {
|
||||
gettext_noop ("LIVES:"),
|
||||
gettext_noop ("TRUCK:"),
|
||||
|
@ -600,55 +980,8 @@ const char *text_strings[NUM_TEXTS] = {
|
|||
gettext_noop ("You can hold more than one bag at a time, but watch out!\nIf you hold too many bags at once, they'll be too heavy for\nyou to carry! Every bag you deposit adds points. The more\npoints you have in the end, the more coins you'll get."),
|
||||
gettext_noop ("Move mouse left and right to move penguin."),
|
||||
gettext_noop ("Click left mouse button when at the red platform to\ndrop off bags (if you have any)."),
|
||||
|
||||
gettext_noop ("1 Up"),
|
||||
|
||||
gettext_noop ("CONGRATULATIONS!!!"),
|
||||
gettext_noop ("All the trucks have been unloaded! You are a\nperfect employee! You get a 60 coin bonus!"),
|
||||
gettext_noop ("CLICK HERE to GET PAID!!!"),
|
||||
};
|
||||
|
||||
const SDL_Color penguin_colors[18] = {
|
||||
{0, 51, 102},
|
||||
{51, 51, 51},
|
||||
{206, 0, 0},
|
||||
{255, 204, 0},
|
||||
{0, 153, 0},
|
||||
{153, 102, 0},
|
||||
{255, 49, 156},
|
||||
{99, 0, 156},
|
||||
{0, 156, 204},
|
||||
{255, 102, 0},
|
||||
{0, 102, 0},
|
||||
{255, 99, 99},
|
||||
{139, 227, 3},
|
||||
{28, 150, 163},
|
||||
{240, 240, 216},
|
||||
{174, 159, 200},
|
||||
{128, 33, 75},
|
||||
{46, 71, 170}
|
||||
};
|
||||
|
||||
enum {
|
||||
NO_NEXT_LEVEL = 0,
|
||||
NEXT_LEVEL,
|
||||
GAME_WIN
|
||||
};
|
||||
|
||||
typedef struct _BeanBag {
|
||||
int bag;
|
||||
int throw_length;
|
||||
int frame;
|
||||
|
||||
union {
|
||||
const int (*bag_points)[3];
|
||||
const int (*object_points)[2];
|
||||
};
|
||||
|
||||
struct _BeanBag *prev;
|
||||
struct _BeanBag *next;
|
||||
} BeanBag;
|
||||
|
||||
/* Prototipos de función */
|
||||
int game_intro (void);
|
||||
int game_loop (void);
|
||||
|
@ -661,7 +994,6 @@ void add_bag (int tipo);
|
|||
void delete_bag (BeanBag *p);
|
||||
int map_button_in_intro (int x, int y);
|
||||
int map_button_in_explain (int x, int y, int escena);
|
||||
int map_button_in_game (int x, int y, int next_level);
|
||||
|
||||
/* Variables globales */
|
||||
SDL_Surface * screen;
|
||||
|
@ -682,7 +1014,6 @@ BeanBag *last_bag = NULL;
|
|||
|
||||
TTF_Font *ttf24_klickclack;
|
||||
TTF_Font *ttf196_klickclack;
|
||||
TTF_Font *ttf44_comiccrazy;
|
||||
|
||||
int main (int argc, char *argv[]) {
|
||||
/* Recuperar las rutas del sistema */
|
||||
|
@ -703,13 +1034,13 @@ int main (int argc, char *argv[]) {
|
|||
cp_registrar_boton (BUTTON_UI_PLAY_GAME, BLANK_UP);
|
||||
cp_registrar_boton (BUTTON_NEXT_PAGE, BLANK_UP);
|
||||
cp_registrar_boton (BUTTON_EXPLAIN_PLAY_GAME, BLANK_UP);
|
||||
cp_registrar_boton (BUTTON_GET_BONUS, BLANK_UP);
|
||||
|
||||
cp_button_start ();
|
||||
|
||||
do {
|
||||
if (game_intro () == GAME_QUIT) break;
|
||||
if (game_loop () == GAME_QUIT) break;
|
||||
//if (game_finish () == GAME_QUIT) break;
|
||||
} while (1 == 0);
|
||||
|
||||
SDL_Quit ();
|
||||
|
@ -1235,13 +1566,66 @@ int game_explain (void) {
|
|||
return done;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int game_finish (void) {
|
||||
int done = 0;
|
||||
SDL_Event event;
|
||||
SDLKey key;
|
||||
SDL_Rect rect;
|
||||
Uint32 last_time, now_time;
|
||||
|
||||
/* Predibujar todo */
|
||||
SDL_FillRect (screen, NULL, 0);
|
||||
SDL_Flip (screen);
|
||||
|
||||
do {
|
||||
last_time = SDL_GetTicks ();
|
||||
|
||||
while (SDL_PollEvent(&event) > 0) {
|
||||
/* fprintf (stdout, "Evento: %i\n", event.type);*/
|
||||
switch (event.type) {
|
||||
case SDL_QUIT:
|
||||
/* Vamos a cerrar la aplicación */
|
||||
done = GAME_QUIT;
|
||||
break;
|
||||
case SDL_MOUSEMOTION:
|
||||
break;
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
break;
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
/* Tengo una tecla presionada */
|
||||
key = event.key.keysym.sym;
|
||||
|
||||
if (key == SDLK_F11 || (key == SDLK_RETURN && (event.key.keysym.mod & KMOD_ALT))) {
|
||||
SDL_WM_ToggleFullScreen (screen);
|
||||
}
|
||||
if (key == SDLK_ESCAPE) {
|
||||
done = GAME_QUIT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_Flip (screen);
|
||||
|
||||
now_time = SDL_GetTicks ();
|
||||
if (now_time < last_time + FPS) SDL_Delay(last_time + FPS - now_time);
|
||||
|
||||
} while (!done);
|
||||
|
||||
return done;
|
||||
}
|
||||
#endif
|
||||
|
||||
int game_loop (void) {
|
||||
int done = 0;
|
||||
SDL_Event event;
|
||||
SDLKey key;
|
||||
Uint32 last_time, now_time;
|
||||
SDL_Rect rect;
|
||||
int penguinx, handposx, handposy;
|
||||
int penguinx, handposx;
|
||||
BeanBag *thisbag, *nextbag;
|
||||
|
||||
int bags = 0;
|
||||
|
@ -1257,7 +1641,6 @@ int game_loop (void) {
|
|||
int nivel = 1;
|
||||
int anvil_out = FALSE, fish_out = FALSE, flower_out = FALSE;
|
||||
int oneup_toggle = TRUE;
|
||||
int oneup_active = 0, oneup_x, oneup_frame;
|
||||
int fish_max = 4;
|
||||
int fish_counter = 0;
|
||||
int crash_anim = -1;
|
||||
|
@ -1266,13 +1649,6 @@ int game_loop (void) {
|
|||
char buffer[20];
|
||||
SDL_Surface *numbers[3][20];
|
||||
double z;
|
||||
int map;
|
||||
Uint32 blanco2;
|
||||
SDL_Surface *trans;
|
||||
|
||||
trans = SDL_CreateRGBSurface (SDL_SWSURFACE | SDL_SRCALPHA, texts[TEXT_GET_PAID]->w, texts[TEXT_GET_PAID]->h, 32, RMASK, GMASK, BMASK, AMASK);
|
||||
blanco2 = SDL_MapRGBA (trans->format, 255, 255, 255, 128);
|
||||
SDL_FillRect (trans, NULL, blanco2); /* Blanco */
|
||||
|
||||
SDL_Color negro, blanco, amarillo;
|
||||
blanco.r = blanco.g = blanco.b = 255;
|
||||
|
@ -1352,21 +1728,9 @@ int game_loop (void) {
|
|||
}
|
||||
}
|
||||
}
|
||||
map = map_button_in_game (event.button.x, event.button.y, next_level_visible);
|
||||
cp_button_down (map);
|
||||
break;
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
map_button_in_game (event.button.x, event.button.y, next_level_visible);
|
||||
map = cp_button_up (map);
|
||||
|
||||
switch (map) {
|
||||
case BUTTON_GET_BONUS:
|
||||
done = 1;
|
||||
break;
|
||||
/*case BUTTON_EXPLAIN_PLAY_GAME:
|
||||
done = 1;
|
||||
break;*/
|
||||
}
|
||||
/* Tengo un mouse Up */
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
/* Tengo una tecla presionada */
|
||||
|
@ -1382,13 +1746,9 @@ int game_loop (void) {
|
|||
}
|
||||
}
|
||||
|
||||
SDL_GetMouseState (&handposx, &handposy);
|
||||
|
||||
/* Debido a que ignoramos eventos, hay que manejar el mouse motion aquí */
|
||||
map = map_button_in_game (handposx, handposy, next_level_visible);
|
||||
cp_button_motion (map);
|
||||
|
||||
if (bags < 6 && next_level_visible == NO_NEXT_LEVEL) {
|
||||
SDL_GetMouseState (&handposx, NULL);
|
||||
|
||||
penguinx = handposx;
|
||||
if (penguinx < 190) {
|
||||
penguinx = 190;
|
||||
|
@ -1527,9 +1887,7 @@ int game_loop (void) {
|
|||
vidas_p = draw_text_with_shadow (ttf24_klickclack, 2, buffer, blanco, negro);
|
||||
if (use_sound) Mix_PlayChannel (-1, sounds[SND_BOING], 0);
|
||||
|
||||
oneup_active = 1;
|
||||
oneup_frame = 0;
|
||||
oneup_x = penguinx;
|
||||
/* TODO: Mostrar la notificación de 1 vida */
|
||||
airbone--;
|
||||
delete_bag (thisbag);
|
||||
thisbag = nextbag;
|
||||
|
@ -1623,7 +1981,7 @@ int game_loop (void) {
|
|||
}
|
||||
|
||||
thisbag = nextbag;
|
||||
} /* Fin del recorrer bolsas */
|
||||
}
|
||||
|
||||
SDL_BlitSurface (images[IMG_BACKGROUND], NULL, screen, NULL);
|
||||
|
||||
|
@ -1683,16 +2041,6 @@ int game_loop (void) {
|
|||
SDL_BlitSurface (images[i], NULL, screen, &rect);
|
||||
}
|
||||
|
||||
/* Dibujar el texto de la vida si está activa */
|
||||
if (oneup_active) {
|
||||
rect.x = oneup_x - 70;
|
||||
rect.y = 320 - oneup_frame;
|
||||
rect.w = texts[TEXT_ONE_UP]->w;
|
||||
rect.h = texts[TEXT_ONE_UP]->h;
|
||||
|
||||
SDL_gfxBlitRGBAWithAlpha (texts[TEXT_ONE_UP], NULL, screen, &rect, 255 - ((SDL_ALPHA_OPAQUE / 10) * oneup_frame));
|
||||
}
|
||||
|
||||
if (gameover_visible == TRUE) {
|
||||
rect.w = texts[TEXT_GAME_OVER]->w;
|
||||
rect.h = texts[TEXT_GAME_OVER]->h;
|
||||
|
@ -1895,53 +2243,7 @@ int game_loop (void) {
|
|||
animacion++;
|
||||
}
|
||||
|
||||
if (next_level_visible == GAME_WIN) {
|
||||
/* Dibujar la pantalla de fin */
|
||||
rect.x = 144;
|
||||
rect.y = 59;
|
||||
rect.w = images[IMG_GAMEFINISH]->w;
|
||||
rect.h = images[IMG_GAMEFINISH]->h;
|
||||
|
||||
SDL_BlitSurface (images[IMG_GAMEFINISH], NULL, screen, &rect);
|
||||
|
||||
rect.x = 144 + (images[IMG_GAMEFINISH]->w - texts[TEXT_CONGRATULATIONS]->w) / 2;
|
||||
rect.y = 93;
|
||||
rect.w = texts[TEXT_CONGRATULATIONS]->w;
|
||||
rect.h = texts[TEXT_CONGRATULATIONS]->h;
|
||||
|
||||
SDL_BlitSurface (texts[TEXT_CONGRATULATIONS], NULL, screen, &rect);
|
||||
|
||||
rect.x = 144 + (images[IMG_GAMEFINISH]->w - texts[TEXT_BONUS]->w) / 2;
|
||||
rect.y = 162;
|
||||
rect.w = texts[TEXT_BONUS]->w;
|
||||
rect.h = texts[TEXT_BONUS]->h;
|
||||
|
||||
SDL_BlitSurface (texts[TEXT_BONUS], NULL, screen, &rect);
|
||||
|
||||
rect.x = 144 + (images[IMG_GAMEFINISH]->w - texts[TEXT_GET_PAID]->w) / 2;
|
||||
rect.y = 293;
|
||||
rect.w = texts[TEXT_GET_PAID]->w;
|
||||
rect.h = texts[TEXT_GET_PAID]->h;
|
||||
|
||||
SDL_BlitSurface (texts[TEXT_GET_PAID], NULL, screen, &rect);
|
||||
|
||||
if (cp_button_frames[BUTTON_GET_BONUS] != BLANK_UP) {
|
||||
rect.x = 144 + (images[IMG_GAMEFINISH]->w - texts[TEXT_GET_PAID]->w) / 2;;
|
||||
rect.y = 293;
|
||||
rect.w = trans->w;
|
||||
rect.h = trans->h;
|
||||
|
||||
SDL_BlitSurface (trans, NULL, screen, &rect);
|
||||
}
|
||||
|
||||
/* Dibujar el camión normal */
|
||||
rect.x = 568;
|
||||
rect.y = 72;
|
||||
rect.w = images[IMG_TRUCK]->w;
|
||||
rect.h = images[IMG_TRUCK]->h;
|
||||
|
||||
SDL_BlitSurface (images[IMG_TRUCK], NULL, screen, &rect);
|
||||
} else if (next_level_visible == NEXT_LEVEL) {
|
||||
if (next_level_visible == NEXT_LEVEL) {
|
||||
if (animacion == 0) {
|
||||
if (use_sound) Mix_PlayChannel (-1, sounds[SND_TRUCK], 0);
|
||||
} else if (animacion == 56) {
|
||||
|
@ -2025,15 +2327,9 @@ int game_loop (void) {
|
|||
next_level_visible = NO_NEXT_LEVEL;
|
||||
}
|
||||
|
||||
if (oneup_active) {
|
||||
oneup_frame++;
|
||||
if (oneup_frame >= 10) {
|
||||
oneup_active = 0;
|
||||
}
|
||||
}
|
||||
|
||||
now_time = SDL_GetTicks ();
|
||||
if (now_time < last_time + FPS) SDL_Delay(last_time + FPS - now_time);
|
||||
|
||||
} while (!done);
|
||||
|
||||
/* Liberar los números usados */
|
||||
|
@ -2043,8 +2339,6 @@ int game_loop (void) {
|
|||
}
|
||||
}
|
||||
|
||||
SDL_FreeSurface (trans);
|
||||
|
||||
return done;
|
||||
}
|
||||
/* Set video mode: */
|
||||
|
@ -2065,7 +2359,6 @@ void setup (void) {
|
|||
char *systemdata_path = get_systemdata_path ();
|
||||
Collider *c;
|
||||
TTF_Font *ttf48_klickclack, *ttf52_klickclack, *ttf40_klickclack, *ttf18_burbank;
|
||||
TTF_Font *ttf35_klickclack, *ttf26_klickclack;
|
||||
|
||||
/* Inicializar el Video SDL */
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
|
@ -2212,13 +2505,10 @@ void setup (void) {
|
|||
ttf48_klickclack = TTF_OpenFont (buffer_file, 48);
|
||||
ttf40_klickclack = TTF_OpenFont (buffer_file, 40);
|
||||
ttf52_klickclack = TTF_OpenFont (buffer_file, 52);
|
||||
ttf35_klickclack = TTF_OpenFont (buffer_file, 35);
|
||||
ttf26_klickclack = TTF_OpenFont (buffer_file, 26);
|
||||
|
||||
if (!ttf24_klickclack || !ttf196_klickclack || !ttf48_klickclack || !ttf52_klickclack ||
|
||||
!ttf40_klickclack || !ttf35_klickclack || !ttf26_klickclack) {
|
||||
if (!ttf24_klickclack || !ttf196_klickclack || !ttf48_klickclack || !ttf52_klickclack || !ttf40_klickclack) {
|
||||
fprintf (stderr,
|
||||
_("Failed to load font file 'Klick Clack'\n"
|
||||
_("Failed to load font file 'Klick Clack\n"
|
||||
"The error returned by SDL is:\n"
|
||||
"%s\n"), TTF_GetError ());
|
||||
SDL_Quit ();
|
||||
|
@ -2230,19 +2520,7 @@ void setup (void) {
|
|||
|
||||
if (!ttf18_burbank) {
|
||||
fprintf (stderr,
|
||||
_("Failed to load font file 'Burbank Small'\n"
|
||||
"The error returned by SDL is:\n"
|
||||
"%s\n"), TTF_GetError ());
|
||||
SDL_Quit ();
|
||||
exit (1);
|
||||
}
|
||||
|
||||
sprintf (buffer_file, "%s%s", systemdata_path, "comicrazybi.ttf");
|
||||
ttf44_comiccrazy = TTF_OpenFont (buffer_file, 44);
|
||||
|
||||
if (!ttf44_comiccrazy) {
|
||||
fprintf (stderr,
|
||||
_("Failed to load font file 'Comic Crazy'\n"
|
||||
_("Failed to load font file 'Burbank Small\n"
|
||||
"The error returned by SDL is:\n"
|
||||
"%s\n"), TTF_GetError ());
|
||||
SDL_Quit ();
|
||||
|
@ -2251,14 +2529,12 @@ void setup (void) {
|
|||
|
||||
bind_textdomain_codeset (PACKAGE, "UTF-8");
|
||||
|
||||
SDL_Color negro, blanco, azul1, amarillo;
|
||||
SDL_Color negro, blanco, azul1;
|
||||
blanco.r = blanco.g = blanco.b = 255;
|
||||
negro.r = negro.g = negro.b = 0;
|
||||
azul1.r = 0x01;
|
||||
azul1.g = 0x34;
|
||||
azul1.b = 0x9a;
|
||||
amarillo.r = amarillo.g = 255;
|
||||
amarillo.b = 0;
|
||||
|
||||
for (g = TEXT_LIVES; g <= TEXT_SCORE; g++) {
|
||||
texts[g] = draw_text_with_shadow (ttf24_klickclack, 2, _(text_strings[g]), blanco, negro);
|
||||
|
@ -2279,18 +2555,10 @@ void setup (void) {
|
|||
texts[TEXT_EXPLAIN_3] = draw_text (ttf18_burbank, _(text_strings[TEXT_EXPLAIN_3]), &azul1);
|
||||
texts[TEXT_EXPLAIN_4] = draw_text (ttf18_burbank, _(text_strings[TEXT_EXPLAIN_4]), &azul1);
|
||||
|
||||
texts[TEXT_ONE_UP] = draw_text_with_shadow (ttf44_comiccrazy, 3, _(text_strings[TEXT_ONE_UP]), amarillo, negro);
|
||||
|
||||
texts[TEXT_CONGRATULATIONS] = draw_text (ttf35_klickclack, _(text_strings[TEXT_CONGRATULATIONS]), &azul1);
|
||||
texts[TEXT_BONUS] = draw_text (ttf18_burbank, _(text_strings[TEXT_BONUS]), &azul1);
|
||||
texts[TEXT_GET_PAID] = draw_text (ttf26_klickclack, _(text_strings[TEXT_GET_PAID]), &azul1);
|
||||
|
||||
TTF_CloseFont (ttf18_burbank);
|
||||
TTF_CloseFont (ttf48_klickclack);
|
||||
TTF_CloseFont (ttf52_klickclack);
|
||||
TTF_CloseFont (ttf40_klickclack);
|
||||
TTF_CloseFont (ttf35_klickclack);
|
||||
TTF_CloseFont (ttf26_klickclack);
|
||||
}
|
||||
|
||||
void setup_and_color_penguin (void) {
|
||||
|
@ -2518,14 +2786,3 @@ int map_button_in_explain (int x, int y, int escena) {
|
|||
return BUTTON_NONE;
|
||||
}
|
||||
|
||||
int map_button_in_game (int x, int y, int next_level) {
|
||||
int sub_x;
|
||||
if (next_level == GAME_WIN) {
|
||||
sub_x = 144 + (images[IMG_GAMEFINISH]->w - texts[TEXT_GET_PAID]->w) / 2;
|
||||
if (x >= sub_x && x < sub_x + texts[TEXT_GET_PAID]->w && y >= 293 && y < 293 + texts[TEXT_GET_PAID]->h) {
|
||||
return BUTTON_GET_BONUS;
|
||||
}
|
||||
}
|
||||
return BUTTON_NONE;
|
||||
}
|
||||
|
||||
|
|
374
src/coords.c
374
src/coords.c
|
@ -1,374 +0,0 @@
|
|||
/*
|
||||
* coords.c
|
||||
* This file is part of Bean Counters Classic
|
||||
*
|
||||
* Copyright (C) 2022 - Félix Arreola Rodríguez
|
||||
*
|
||||
* Bean Counters Classic 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.
|
||||
*
|
||||
* Bean Counters Classic is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Bean Counters Classic; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "coords.h"
|
||||
|
||||
const int bag_0_points[31][3] = {
|
||||
{0, 638, 108},
|
||||
{0, 613, 98},
|
||||
{0, 588, 87},
|
||||
{0, 565, 80},
|
||||
{0, 543, 72},
|
||||
{0, 523, 68},
|
||||
{0, 504, 65},
|
||||
{0, 485, 61},
|
||||
{1, 493, 28},
|
||||
{1, 479, 27},
|
||||
{1, 465, 27},
|
||||
{1, 456, 28},
|
||||
{2, 427, 86},
|
||||
{2, 413, 89},
|
||||
{2, 401, 93},
|
||||
{2, 388, 97},
|
||||
{2, 371, 103},
|
||||
{2, 355, 110},
|
||||
{2, 340, 119},
|
||||
{2, 322, 131},
|
||||
{2, 305, 146},
|
||||
{2, 290, 161},
|
||||
{2, 273, 181},
|
||||
{2, 259, 203},
|
||||
{2, 246, 226},
|
||||
{2, 233, 254},
|
||||
{2, 223, 282},
|
||||
{2, 214, 311},
|
||||
{2, 205, 343},
|
||||
{2, 196, 375},
|
||||
{3, 165, 408}
|
||||
};
|
||||
|
||||
const int bag_1_points[22][3] = {
|
||||
{0, 633, 209},
|
||||
{0, 622, 168},
|
||||
{0, 610, 134},
|
||||
{0, 598, 107},
|
||||
{0, 586, 87},
|
||||
{0, 574, 74},
|
||||
{0, 563, 69},
|
||||
{0, 558, 68},
|
||||
{1, 579, 38},
|
||||
{1, 571, 42},
|
||||
{1, 563, 51},
|
||||
{1, 554, 65},
|
||||
{2, 527, 141},
|
||||
{2, 520, 164},
|
||||
{2, 512, 187},
|
||||
{2, 505, 215},
|
||||
{2, 498, 246},
|
||||
{2, 491, 280},
|
||||
{2, 484, 317},
|
||||
{2, 478, 358},
|
||||
{2, 472, 402},
|
||||
{3, 441, 420}
|
||||
};
|
||||
|
||||
const int bag_2_points[28][3] = {
|
||||
{0, 633, 229},
|
||||
{0, 620, 202},
|
||||
{0, 606, 175},
|
||||
{0, 593, 154},
|
||||
{0, 579, 132},
|
||||
{0, 565, 116},
|
||||
{0, 550, 100},
|
||||
{0, 536, 89},
|
||||
{1, 548, 49},
|
||||
{1, 535, 46},
|
||||
{1, 523, 43},
|
||||
{1, 510, 39},
|
||||
{2, 477, 99},
|
||||
{2, 461, 104},
|
||||
{2, 444, 114},
|
||||
{2, 427, 126},
|
||||
{2, 413, 140},
|
||||
{2, 399, 160},
|
||||
{2, 385, 179},
|
||||
{2, 370, 199},
|
||||
{2, 357, 224},
|
||||
{2, 344, 249},
|
||||
{2, 331, 273},
|
||||
{2, 319, 304},
|
||||
{2, 307, 335},
|
||||
{2, 294, 365},
|
||||
{2, 282, 396},
|
||||
{3, 251, 405}
|
||||
};
|
||||
|
||||
const int bag_3_points[33][3] = {
|
||||
{0, 647, 305},
|
||||
{0, 620, 267},
|
||||
{0, 595, 236},
|
||||
{0, 570, 204},
|
||||
{0, 546, 179},
|
||||
{0, 522, 153},
|
||||
{0, 499, 135},
|
||||
{0, 477, 116},
|
||||
{1, 481, 71},
|
||||
{1, 463, 63},
|
||||
{1, 444, 54},
|
||||
{1, 429, 50},
|
||||
{2, 397, 106},
|
||||
{2, 389, 107},
|
||||
{2, 381, 108},
|
||||
{2, 373, 109},
|
||||
{2, 365, 110},
|
||||
{2, 354, 114},
|
||||
{2, 343, 117},
|
||||
{2, 330, 125},
|
||||
{2, 316, 132},
|
||||
{2, 302, 145},
|
||||
{2, 288, 158},
|
||||
{2, 275, 176},
|
||||
{2, 261, 194},
|
||||
{2, 249, 217},
|
||||
{2, 237, 240},
|
||||
{2, 227, 267},
|
||||
{2, 217, 294},
|
||||
{2, 208, 326},
|
||||
{2, 198, 358},
|
||||
{2, 189, 389},
|
||||
{3, 141, 422}
|
||||
};
|
||||
|
||||
const int bag_stack_offsets[30][2] = {
|
||||
{15, 251},
|
||||
{14, 236},
|
||||
{13, 227},
|
||||
{13, 220},
|
||||
{13, 211},
|
||||
{13, 203},
|
||||
{12, 192},
|
||||
{12, 182},
|
||||
{13, 173},
|
||||
{9, 165}, // 10
|
||||
{10, 158},
|
||||
{10, 149},
|
||||
{10, 141},
|
||||
{8, 136},
|
||||
{8, 125},
|
||||
{8, 120},
|
||||
{0, 114},
|
||||
{2, 106},
|
||||
{2, 94},
|
||||
{2, 85}, // 20
|
||||
{2, 79},
|
||||
{2, 70},
|
||||
{2, 69},
|
||||
{2, 60},
|
||||
{2, 52},
|
||||
{2, 42},
|
||||
{2, 35},
|
||||
{2, 25},
|
||||
{2, 20}
|
||||
// {2, 11} del 30 al 60
|
||||
};
|
||||
|
||||
const int anvil_offsets[24][2] = {
|
||||
{631, 276},
|
||||
{609, 226},
|
||||
{589, 185},
|
||||
{570, 151},
|
||||
{551, 126},
|
||||
{534, 109},
|
||||
{519, 101},
|
||||
{509, 100},
|
||||
{503, 100},
|
||||
{495, 103},
|
||||
{486, 111},
|
||||
{478, 124},
|
||||
{470, 137},
|
||||
{464, 154},
|
||||
{458, 171},
|
||||
{454, 192},
|
||||
{450, 214},
|
||||
{446, 238},
|
||||
{443, 263},
|
||||
{441, 291},
|
||||
{437, 320},
|
||||
{435, 352},
|
||||
{432, 384},
|
||||
{422, 406}
|
||||
};
|
||||
|
||||
const int anvil_collider_offsets[23][2] = {
|
||||
{692, 298},
|
||||
{669, 245},
|
||||
{647, 201},
|
||||
{627, 165},
|
||||
{608, 138},
|
||||
{590, 120},
|
||||
{574, 111},
|
||||
{564, 109},
|
||||
{559, 109},
|
||||
{550, 112},
|
||||
{541, 119},
|
||||
{533, 132},
|
||||
{525, 145},
|
||||
{519, 162},
|
||||
{512, 180},
|
||||
{508, 202},
|
||||
{503, 223},
|
||||
{499, 249},
|
||||
{496, 275},
|
||||
{492, 304},
|
||||
{488, 333},
|
||||
{485, 366},
|
||||
{482, 399}
|
||||
};
|
||||
|
||||
const int fish_collider_offsets[10][2] = {
|
||||
{337, 157},
|
||||
{326, 173},
|
||||
{315, 191},
|
||||
{303, 207},
|
||||
{292, 229},
|
||||
{282, 251},
|
||||
{271, 272},
|
||||
{260, 299},
|
||||
{250, 325},
|
||||
{240, 351},
|
||||
};
|
||||
|
||||
const int flower_collider_offsets[11][2] = {
|
||||
{465, 163},
|
||||
{455, 174},
|
||||
{446, 184},
|
||||
{436, 194},
|
||||
{427, 210},
|
||||
{419, 226},
|
||||
{410, 242},
|
||||
{403, 264},
|
||||
{396, 286},
|
||||
{388, 308},
|
||||
{381, 330}
|
||||
};
|
||||
|
||||
const int oneup_offsets[35][2] = {
|
||||
{636, 142},
|
||||
{624, 130},
|
||||
{611, 119},
|
||||
{598, 107},
|
||||
{586, 96},
|
||||
{573, 84},
|
||||
{560, 72},
|
||||
{547, 70},
|
||||
{534, 68},
|
||||
{521, 66},
|
||||
{507, 64},
|
||||
{494, 62},
|
||||
{481, 60},
|
||||
{468, 58},
|
||||
{454, 56},
|
||||
{442, 67},
|
||||
{431, 80},
|
||||
{420, 93},
|
||||
{409, 105},
|
||||
{398, 118},
|
||||
{392, 139},
|
||||
{386, 159},
|
||||
{380, 180},
|
||||
{373, 201},
|
||||
{367, 221},
|
||||
{361, 242},
|
||||
{355, 263},
|
||||
{349, 284},
|
||||
{343, 304},
|
||||
{337, 325},
|
||||
{334, 351},
|
||||
{330, 378},
|
||||
{327, 404},
|
||||
{324, 431},
|
||||
{321, 458}
|
||||
};
|
||||
|
||||
const int fish_offsets[35][2] = {
|
||||
{634, 247},
|
||||
{603, 213},
|
||||
{574, 184},
|
||||
{546, 158},
|
||||
{518, 136},
|
||||
{492, 119},
|
||||
{468, 105},
|
||||
{445, 96},
|
||||
{425, 90},
|
||||
{407, 87},
|
||||
{393, 86},
|
||||
{383, 86},
|
||||
{375, 87},
|
||||
{368, 88},
|
||||
{361, 90},
|
||||
{354, 91},
|
||||
{347, 93},
|
||||
{336, 98},
|
||||
{325, 104},
|
||||
{314, 110},
|
||||
{302, 121},
|
||||
{289, 132},
|
||||
{277, 143},
|
||||
{265, 160},
|
||||
{254, 177},
|
||||
{242, 194},
|
||||
{231, 215},
|
||||
{220, 237},
|
||||
{210, 259},
|
||||
{200, 285},
|
||||
{189, 311},
|
||||
{179, 337},
|
||||
{170, 367},
|
||||
{160, 397},
|
||||
{122, 433}
|
||||
};
|
||||
|
||||
const int flower_offsets[32][2] = {
|
||||
{646, 217},
|
||||
{626, 192},
|
||||
{606, 167},
|
||||
{587, 147},
|
||||
{569, 128},
|
||||
{551, 115},
|
||||
{534, 101},
|
||||
{519, 94},
|
||||
{503, 87},
|
||||
{492, 85},
|
||||
{481, 82},
|
||||
{475, 82},
|
||||
{467, 82},
|
||||
{463, 83},
|
||||
{457, 85},
|
||||
{452, 86},
|
||||
{443, 91},
|
||||
{435, 95},
|
||||
{426, 100},
|
||||
{417, 110},
|
||||
{408, 120},
|
||||
{399, 131},
|
||||
{390, 146},
|
||||
{382, 162},
|
||||
{374, 178},
|
||||
{366, 198},
|
||||
{359, 218},
|
||||
{352, 239},
|
||||
{345, 264},
|
||||
{339, 288},
|
||||
{332, 313},
|
||||
{334, 382}
|
||||
};
|
||||
|
40
src/coords.h
40
src/coords.h
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* coords.h
|
||||
* This file is part of Bean Counters Classic
|
||||
*
|
||||
* Copyright (C) 2022 - Félix Arreola Rodríguez
|
||||
*
|
||||
* Bean Counters Classic 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.
|
||||
*
|
||||
* Bean Counters Classic is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Bean Counters Classic; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __COORDS_H__
|
||||
#define __COORDS_H__
|
||||
|
||||
extern const int bag_0_points[31][3];
|
||||
extern const int bag_1_points[22][3];
|
||||
extern const int bag_2_points[28][3];
|
||||
extern const int bag_3_points[33][3];
|
||||
extern const int bag_stack_offsets[30][2];
|
||||
extern const int anvil_offsets[24][2];
|
||||
extern const int anvil_collider_offsets[23][2];
|
||||
extern const int fish_collider_offsets[10][2];
|
||||
extern const int flower_collider_offsets [11][2];
|
||||
extern const int oneup_offsets[35][2];
|
||||
extern const int fish_offsets[35][2];
|
||||
extern const int flower_offsets[32][2];
|
||||
|
||||
#endif /* __COORDS_H__ */
|
||||
|
Loading…
Reference in New Issue