mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-12 22:02:12 +00:00
Merge branch 'next' into 21-version
# Conflicts: # src/d_netcmd.c
This commit is contained in:
commit
33c1ac33f5
233 changed files with 5445 additions and 1224 deletions
|
@ -70,7 +70,7 @@ matrix:
|
|||
- p7zip-full
|
||||
- gcc-7
|
||||
compiler: gcc-7
|
||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3"
|
||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough"
|
||||
#gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802
|
||||
- os: linux
|
||||
addons:
|
||||
|
@ -85,7 +85,7 @@ matrix:
|
|||
- p7zip-full
|
||||
- gcc-8
|
||||
compiler: gcc-8
|
||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3"
|
||||
env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wno-implicit-fallthrough -Wno-error=format-overflow"
|
||||
#gcc-8 (Ubuntu 7.2.0-1ubuntu1~14.04) 8.1.0
|
||||
- os: linux
|
||||
compiler: clang
|
||||
|
|
3
SRB2.cbp
3
SRB2.cbp
|
@ -1549,6 +1549,9 @@ HW3SOUND for 3D hardware sound support
|
|||
<Unit filename="src/lua_baselib.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/lua_blockmaplib.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="src/lua_consolelib.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
|
3
assets/.gitignore
vendored
3
assets/.gitignore
vendored
|
@ -1,2 +1,5 @@
|
|||
*
|
||||
*.*
|
||||
!README.txt
|
||||
!LICENSE.txt
|
||||
!LICENSE-3RD-PARTY.txt
|
|
@ -8,6 +8,9 @@ set(SRB2_ASSET_ALL
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/zones.dta
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/patch.dta
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/music.dta
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/README.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE-3RD-PARTY.txt
|
||||
)
|
||||
|
||||
set(SRB2_ASSET_HASHED
|
||||
|
|
1710
assets/LICENSE-3RD-PARTY.txt
Normal file
1710
assets/LICENSE-3RD-PARTY.txt
Normal file
File diff suppressed because it is too large
Load diff
339
assets/LICENSE.txt
Normal file
339
assets/LICENSE.txt
Normal file
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
51
assets/README.txt
Normal file
51
assets/README.txt
Normal file
|
@ -0,0 +1,51 @@
|
|||
SONIC ROBO BLAST 2
|
||||
|
||||
Sonic Robo Blast 2 (SRB2) is a 3D Sonic the Hedgehog fangame based on a
|
||||
modified version of Doom Legacy.
|
||||
|
||||
LICENSE
|
||||
|
||||
The source code for SRB2 is licensed under the GNU General Public
|
||||
License, Version 2. See LICENSE.txt for the full text of this license.
|
||||
|
||||
SRB2 uses various third-party libraries, including SDL, SDL Mixer, and
|
||||
their dependencies. See LICENSE-3RD-PARTY.txt for the licenses of these
|
||||
libraries.
|
||||
|
||||
SOURCE CODE
|
||||
|
||||
You may obtain the source code for SRB2, including the source code for
|
||||
specific version releases, at the following web sites:
|
||||
|
||||
STJr GitLab:
|
||||
https://git.magicalgirl.moe/STJr/SRB2
|
||||
|
||||
GitHub:
|
||||
https://github.com/STJr/SRB2
|
||||
|
||||
CONTACT
|
||||
|
||||
You may contact Sonic Team Junior via the following web sites:
|
||||
|
||||
SRB2.ORG:
|
||||
https://www.srb2.org
|
||||
|
||||
SRB2 Message Board:
|
||||
https://mb.srb2.org
|
||||
|
||||
SRB2 Official Discord:
|
||||
https://discord.gg/pYDXzpX
|
||||
|
||||
COPYRIGHT AND DISCLAIMER
|
||||
|
||||
Design and content on SRB2 is copyright 1998-2018 by Sonic Team Junior.
|
||||
All non-original material on SRB2.ORG is copyrighted by their
|
||||
respective owners, and no copyright infringement is intended. The owner
|
||||
of the SRB2.ORG domain is only acting as an ISP, and is therefore not
|
||||
responsible for any content on SRB2.ORG under the 1998 DMCA. This
|
||||
site, its webmaster, and its staff make no profit whatsoever (in fact,
|
||||
we lose money). Sonic Team Junior assumes no responsibility for the
|
||||
content on any Sonic Team Junior fan sites.
|
||||
|
||||
Sonic Team Junior is in no way affiliated with SEGA or Sonic Team. We do
|
||||
not claim ownership of any of SEGA's intellectual property used in SRB2.
|
|
@ -3,10 +3,45 @@ srb2 for Debian
|
|||
|
||||
SRB2 Debian package!
|
||||
Hi there, to rebuild this package just use the SRB2 Makefile system, or, optionally, run
|
||||
dpkg-buildpackage in the in /bin/Resources directory. You can build these with or without a key
|
||||
dpkg-buildpackage in the in /assets directory. You can build these with or without a key
|
||||
if you want, but if you want to put these on a repo, generate your own GnuPG key as per the
|
||||
https://help.ubuntu.com/community/GnuPrivacyGuardHowto instructions and pass the -k<keyid>
|
||||
command to debuild. Make sure you export the key footprint and give them to your users to install
|
||||
with apt-key add. Thanks!
|
||||
|
||||
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
|
||||
|
||||
|
||||
Signing for Launchpad PPA
|
||||
|
||||
First, follow the above instructions to generate a GnuPG key with your identity. You will need
|
||||
to publish the fingerprint of that key to Ubuntu's key server.
|
||||
|
||||
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
|
||||
|
||||
Next, you will have to add that key fingerprint to your Launchpad account. Go to your Launchpad
|
||||
profile and click the yellow Edit button next to "OpenPGP keys". Once you add the key, you can
|
||||
upload signed source packages and publish them onto your PPA.
|
||||
|
||||
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
|
||||
means your key is not set up correctly with your Launchpad account.
|
||||
|
||||
|
||||
Building for Launchpad PPA
|
||||
|
||||
Use these steps to prepare building a source package for Launchpad:
|
||||
|
||||
1. Highly recommend copying the assets/ folder to outside your repo folder, or else the asset
|
||||
files may be included in the main source package, when you build that.
|
||||
2. cd [wherever-your-assets-folder-is]/assets/
|
||||
3. debuild -T clean (optional, if you already have asset files)
|
||||
|
||||
Building the source package is a two-step process:
|
||||
|
||||
1. debuild -T build (this downloads the asset files from srb2.org if necessary)
|
||||
2. debuild -S (builds the source package for Launchpad, including the asset files)
|
||||
|
||||
Then follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
|
||||
to your PPA and have Launchpad build your binary deb packages.
|
||||
|
||||
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
srb2-data (2.1.21~7) trusty; urgency=high
|
||||
|
||||
* Updated for SRB2 v2.1.21
|
||||
|
||||
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 14:31:00 -0500
|
||||
|
||||
|
||||
srb2-data (2.1.14~1) unstable; urgency=low
|
||||
|
||||
* Updated for SRB2 v2.1.14
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
Source: srb2-data
|
||||
Section: games
|
||||
Priority: extra
|
||||
Maintainer: Callum Dickinson <gcfreak_ag20@hotmail.com>
|
||||
Build-Depends: debhelper (>= 7.0.50~)
|
||||
Maintainer: Sonic Team Junior <stjr@srb2.org>
|
||||
Build-Depends: debhelper (>= 7.0.50~),
|
||||
wget
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: http://www.srb2.org
|
||||
|
||||
|
@ -15,8 +16,7 @@ Description: A cross-platform 3D Sonic fangame
|
|||
fangame built using a modified version of the Doom Legacy
|
||||
port of Doom. SRB2 is closely inspired by the original
|
||||
Sonic games from the Sega Genesis, and attempts to recreate
|
||||
the design in 3D. While SRB2 isn't fully completed, it already
|
||||
features tons of levels, enemies, speed, and quite a lot
|
||||
of the fun that the original Sonic games provided.
|
||||
the design in 3D. It features tons of levels, enemies, speed,
|
||||
and quite a lot of the fun that the original Sonic games provided.
|
||||
This is the data package that provides the data files that
|
||||
SRB2 requires to run, it will not work without it.
|
||||
SRB2 requires to run; it will not work without it.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
This work was packaged for Debian by:
|
||||
|
||||
Callum Dickinson <gcfreak_ag20@hotmail.com> on Fri, 26 Nov 2010 15:19:16 +1300
|
||||
Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 14:31:00 -0500
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
|
@ -12,7 +12,7 @@ Upstream Author(s):
|
|||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 1998-2010 Sonic Team Junior
|
||||
Copyright (C) 1998-2018 Sonic Team Junior
|
||||
|
||||
License:
|
||||
|
||||
|
@ -21,6 +21,7 @@ License:
|
|||
The Debian packaging is:
|
||||
|
||||
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
|
||||
Copyright (C) 2010-2018 Sonic Team Junior <stjr@srb2.org>
|
||||
|
||||
and is licensed under the GPL version 2,
|
||||
see "/usr/share/common-licenses/GPL-2".
|
||||
|
|
|
@ -37,7 +37,7 @@ RM := rm -rf
|
|||
DIR := $(shell pwd)
|
||||
|
||||
PACKAGE := $(shell cat $(DIR)/debian/control | grep 'Package:' | sed -e 's/Package: //g')
|
||||
DATAFILES := srb2.srb zones.dta player.dta rings.dta music.dta
|
||||
DATAFILES := srb2.srb zones.dta player.dta rings.dta music.dta patch.dta README.txt LICENSE.txt LICENSE-3RD-PARTY.txt
|
||||
|
||||
DATADIR := usr/games/SRB2
|
||||
RESOURCEDIR := .
|
||||
|
@ -45,16 +45,21 @@ WGET := wget -P $(RESOURCEDIR) -c -nc
|
|||
|
||||
build:
|
||||
$(MKDIR) $(DIR)/debian/tmp/$(DATADIR)
|
||||
> $(DIR)/debian/source/include-binaries
|
||||
# This will need to be updated every time SRB2 official version is
|
||||
# Copy data files to their install locations, and add data files to include-binaries
|
||||
for file in $(DATAFILES); do \
|
||||
$(WGET) http://alam.srb2.org/SRB2/2.1.14-Final/Resources/$$file; \
|
||||
if test "$$file" = "srb2.wad"; then \
|
||||
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/srb2.srb; \
|
||||
else \
|
||||
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/$$file; \
|
||||
if [ ! -f $(RESOURCEDIR)/$$file ]; then \
|
||||
$(WGET) http://alam.srb2.org/SRB2/2.1.21-Final/Resources/$$file; \
|
||||
fi; \
|
||||
if [ -f $(RESOURCEDIR)/$$file ]; then \
|
||||
$(INSTALL) $(RESOURCEDIR)/$$file $(DIR)/debian/tmp/$(DATADIR)/$$file; \
|
||||
echo $(RESOURCEDIR)/$$file >> $(DIR)/debian/source/include-binaries; \
|
||||
fi; \
|
||||
if [ ! -f $(DIR)/debian/tmp/$(DATADIR)/$$file ]; then \
|
||||
echo $(DIR)/debian/tmp/$(DATADIR)/$$file not found and could not be downloaded!; \
|
||||
return 1; \
|
||||
fi; \
|
||||
echo $(RESOURCEDIR)/$$file >> $(DIR)/debian/source/include-binaries; \
|
||||
done
|
||||
|
||||
binary-indep:
|
||||
|
@ -95,15 +100,18 @@ binary: binary-indep
|
|||
dh_builddeb
|
||||
|
||||
clean:
|
||||
$(RM) $(RESOURCEDIR)/*.wad
|
||||
$(RM) $(RESOURCEDIR)/*.dta
|
||||
$(RM) $(RESOURCEDIR)/*.plr
|
||||
$(RM) $(RESOURCEDIR)/*.wpn
|
||||
$(RM) $(RESOURCEDIR)/*.srb
|
||||
$(RM) $(RESOURCEDIR)/*.dll
|
||||
$(RM) $(DIR)/debian/tmp/*
|
||||
$(RM) $(DIR)/debian/$(PACKAGE).install
|
||||
$(RM) $(DIR)/debian/files
|
||||
$(RM) $(DIR)/debian/source/include-binaries
|
||||
$(RM) $(DIR)/debian/tmp/*; \
|
||||
$(RM) $(DIR)/debian/$(PACKAGE).install; \
|
||||
$(RM) $(DIR)/debian/files; \
|
||||
|
||||
clean-all: clean
|
||||
$(RM) $(RESOURCEDIR)/*.wad; \
|
||||
$(RM) $(RESOURCEDIR)/*.dta; \
|
||||
$(RM) $(RESOURCEDIR)/*.plr; \
|
||||
$(RM) $(RESOURCEDIR)/*.wpn; \
|
||||
$(RM) $(RESOURCEDIR)/*.srb; \
|
||||
$(RM) $(RESOURCEDIR)/*.dll; \
|
||||
$(RM) $(RESOURCEDIR)/*.txt; \
|
||||
$(RM) $(DIR)/debian/source/include-binaries; \
|
||||
|
||||
.PHONY: all clean binary binary-arch binary-indep build
|
||||
|
|
1
assets/debian/source/options
Normal file
1
assets/debian/source/options
Normal file
|
@ -0,0 +1 @@
|
|||
tar-ignore = "tmp/*"
|
35
debian/README.Debian
vendored
35
debian/README.Debian
vendored
|
@ -9,3 +9,38 @@ instructions and pass the -k<keyid> command to debuild. Make sure you export the
|
|||
and give them to your users to install with apt-key add. Thanks!
|
||||
|
||||
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
|
||||
|
||||
|
||||
Signing for Launchpad PPA
|
||||
|
||||
First, follow the above instructions to generate a GnuPG key with your identity. You will need
|
||||
to publish the fingerprint of that key to Ubuntu's key server.
|
||||
|
||||
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
|
||||
|
||||
Next, you will have to add that key fingerprint to your Launchpad account. Go to your Launchpad
|
||||
profile and click the yellow Edit button next to "OpenPGP keys". Once you add the key, you can
|
||||
upload signed source packages and publish them onto your PPA.
|
||||
|
||||
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
|
||||
means your key is not set up correctly with your Launchpad account.
|
||||
|
||||
|
||||
Building for Launchpad PPA
|
||||
|
||||
Use these steps to prepare building a source package for Launchpad:
|
||||
|
||||
1. cd [srb2repo]
|
||||
2. git reset --hard; git clean -fd; git clean -fx;
|
||||
* Resets your repo folder to a committed state and removes untracked files
|
||||
* If you built srb2-data in the assets/ folder, MAKE SURE THAT FOLDER DOES NOT HAVE ASSETS,
|
||||
OR THEY MAY BE INCLUDED IN THE MAIN SOURCE PACKAGE!
|
||||
|
||||
Building the source package takes just one step:
|
||||
|
||||
1. debuild -S (builds the source package for Launchpad)
|
||||
|
||||
Then follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
|
||||
to your PPA and have Launchpad build your binary deb packages.
|
||||
|
||||
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500
|
||||
|
|
4
debian/README.source
vendored
4
debian/README.source
vendored
|
@ -22,6 +22,10 @@ Build instructions:
|
|||
|
||||
make -C src LINUX=1
|
||||
|
||||
Build instructions for non-X86 devices (such as X64):
|
||||
|
||||
make -C src LINUX=1 NONX86=1
|
||||
|
||||
Build instructions to build for Wii Linux/SRB2Wii on a PowerPC system,
|
||||
follow cross-compiling instructions for cross-compiling on a x86 system:
|
||||
|
||||
|
|
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -1,3 +1,10 @@
|
|||
srb2 (2.1.21~9) trusty; urgency=high
|
||||
|
||||
* SRB2 v2.1.21 release
|
||||
|
||||
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 27 Nov 2018 16:45:00 -0500
|
||||
|
||||
|
||||
srb2 (2.0.6-5) maverick; urgency=high
|
||||
|
||||
* Initial proper release..
|
||||
|
|
23
debian/control
vendored
23
debian/control
vendored
|
@ -3,11 +3,13 @@
|
|||
Source: srb2
|
||||
Section: games
|
||||
Priority: extra
|
||||
Maintainer: Callum Dickinson <gcfreak_ag20@hotmail.com>
|
||||
Maintainer: Sonic Team Junior <stjr@srb2.org>
|
||||
Build-Depends: debhelper (>= 7.0.50~),
|
||||
libsdl2-dev,
|
||||
libsdl2-mixer-dev,
|
||||
libpng12-dev (>= 1.2.7),
|
||||
libpng12-dev (>= 1.2.7) | libpng-dev,
|
||||
zlib1g-dev,
|
||||
libgme-dev,
|
||||
libglu1-dev | libglu-dev,
|
||||
libosmesa6-dev | libgl-dev,
|
||||
nasm [i386]
|
||||
|
@ -16,27 +18,26 @@ Homepage: http://www.srb2.org
|
|||
|
||||
Package: srb2
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (= 2.1.14)
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (>= 2.1.15), srb2-data (<= 2.1.21)
|
||||
Description: A cross-platform 3D Sonic fangame
|
||||
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
||||
fangame built using a modified version of the Doom Legacy
|
||||
port of Doom. SRB2 is closely inspired by the original
|
||||
Sonic games from the Sega Genesis, and attempts to recreate
|
||||
the design in 3D. While SRB2 isn't fully completed, it already
|
||||
features tons of levels, enemies, speed, and quite a lot
|
||||
of the fun that the original Sonic games provided.
|
||||
the design in 3D. It features tons of levels, enemies, speed,
|
||||
and quite a lot of the fun that the original Sonic games provided.
|
||||
|
||||
|
||||
Package: srb2-dbg
|
||||
Architecture: any
|
||||
# FIXME: should be Depends: ${shlibs:Depends}, ${misc:Depends}, srb2-data (= 2.1.14), srb2 but dh_shlibdeps is being an asshat
|
||||
Depends: libc6, ${misc:Depends}, srb2-data (= 2.1.14), srb2
|
||||
Depends: libc6, ${misc:Depends}, srb2-data (>= 2.1.15), srb2-data (<= 2.1.21), srb2
|
||||
Description: A cross-platform 3D Sonic fangame
|
||||
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
||||
fangame built using a modified version of the Doom Legacy
|
||||
port of Doom. SRB2 is closely inspired by the original
|
||||
Sonic games from the Sega Genesis, and attempts to recreate
|
||||
the design in 3D. While SRB2 isn't fully completed, it already
|
||||
features tons of levels, enemies, speed, and quite a lot
|
||||
of the fun that the original Sonic games provided.
|
||||
This is a debug binary, its symbols will be loaded by gdb
|
||||
the design in 3D. It features tons of levels, enemies, speed,
|
||||
and quite a lot of the fun that the original Sonic games provided.
|
||||
This is a debug binary; its symbols will be loaded by gdb
|
||||
when the user starts the game with gdb for debugging.
|
||||
|
|
5
debian/copyright
vendored
5
debian/copyright
vendored
|
@ -1,6 +1,6 @@
|
|||
This work was packaged for Debian by:
|
||||
|
||||
Callum Dickinson <gcfreak_ag20@hotmail.com> on Fri, 26 Nov 2010 15:19:16 +1300
|
||||
Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 14:31:00 -0500
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
|
@ -12,7 +12,7 @@ Upstream Author(s):
|
|||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 1998-2010 Sonic Team Junior
|
||||
Copyright (C) 1998-2018 Sonic Team Junior
|
||||
|
||||
License:
|
||||
|
||||
|
@ -21,6 +21,7 @@ License:
|
|||
The Debian packaging is:
|
||||
|
||||
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
|
||||
Copyright (C) 2010-2018 Sonic Team Junior <stjr@srb2.org>
|
||||
|
||||
and is licensed under the GPL version 2,
|
||||
see "/usr/share/common-licenses/GPL-2".
|
||||
|
|
3
debian/docs
vendored
3
debian/docs
vendored
|
@ -1 +1,4 @@
|
|||
README.md
|
||||
assets/README.txt
|
||||
assets/LICENSE.txt
|
||||
assets/LICENSE-3RD-PARTY.txt
|
||||
|
|
27
debian/rules
vendored
27
debian/rules
vendored
|
@ -57,21 +57,32 @@ SECTION = Games/Action
|
|||
EXENAME = srb2
|
||||
DBGNAME = debug/$(EXENAME)
|
||||
|
||||
PKGDIR = usr/games
|
||||
PKGDIR = usr/games/SRB2
|
||||
DBGDIR = usr/lib/debug/$(PKGDIR)
|
||||
PIXMAPS_DIR = usr/share/pixmaps
|
||||
DESKTOP_DIR = usr/share/applications
|
||||
PREFIX = $(shell test "$(CROSS_COMPILE_BUILD)" != "$(CROSS_COMPILE_HOST)" && echo "PREFIX=$(CROSS_COMPILE_HOST)")
|
||||
OS = LINUX=1
|
||||
NONX86 = $(shell test "`echo $(CROSS_COMPILE_HOST) | grep 'i[3-6]86'`" || echo "NONX86=1")
|
||||
MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) SDL_PKGCONFIG=sdl2 PNG_PKGCONFIG=libpng NOOBJDUMP=1
|
||||
MAKEARGS = $(OS) $(NONX86) $(PREFIX) EXENAME=$(EXENAME) DBGNAME=$(DBGNAME) NOOBJDUMP=1 # SDL_PKGCONFIG=sdl2 PNG_PKGCONFIG=libpng
|
||||
MENUFILE1 = ?package($(PACKAGE)):needs="X11" section="$(SECTION)"
|
||||
MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)"
|
||||
# FIXME pkg-config dir hacks
|
||||
export PKG_CONFIG_LIBDIR = /usr/lib/$(CROSS_COMPILE_HOST)/pkgconfig
|
||||
BINDIR := $(DIR)/bin/Linux/Release
|
||||
|
||||
# FIXME pkg-config dir hacks
|
||||
# Launchpad doesn't need this; it actually makes i386 builds fail due to cross-compile
|
||||
# export PKG_CONFIG_LIBDIR = /usr/lib/$(CROSS_COMPILE_HOST)/pkgconfig
|
||||
LDFLAGS += "-Wl,-rpath=/usr/lib/$(CROSS_COMPILE_HOST)"
|
||||
|
||||
# Some libgme-dev packages don't use pkg-config yet, so include the linker flag ourselves
|
||||
PKG_CONFIG?=pkg-config
|
||||
LIBGME_PKGCONFIG?=libgme
|
||||
LIBGME_LDFLAGS?=$(shell $(PKG_CONFIG) $(LIBGME_PKGCONFIG) --libs)
|
||||
|
||||
ifeq ($(LIBGME_LDFLAGS),)
|
||||
MAKEARGS += LIBGME_LDFLAGS=-lgme
|
||||
endif
|
||||
|
||||
build:
|
||||
$(MKDIR) $(BINDIR)/debug
|
||||
$(MAKE) -C $(DIR)/src $(MAKEARGS)
|
||||
|
@ -100,8 +111,8 @@ binary-arch:
|
|||
echo $(DESKTOP_DIR) >> $(DIR)/debian/$(PACKAGE).install
|
||||
echo $(PIXMAPS_DIR) >> $(DIR)/debian/$(PACKAGE).install
|
||||
echo $(DBGDIR) > $(DIR)/debian/$(DBGPKG).install
|
||||
|
||||
binary: binary-arch
|
||||
# Launchpad only calls binary-arch, so just move everything up
|
||||
#binary: binary-arch
|
||||
# Generate .desktop specifications
|
||||
echo "`echo '$(MENUFILE1)\\'`" > $(DIR)/debian/menu
|
||||
echo " `echo '$(MENUFILE2)'`" >> $(DIR)/debian/menu
|
||||
|
@ -133,6 +144,8 @@ binary: binary-arch
|
|||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-arch
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(DIR)/src $(MAKEARGS) clean cleandep
|
||||
$(RM) $(BINDIR)/*
|
||||
|
@ -145,4 +158,4 @@ clean:
|
|||
$(RM) $(DIR)/debian/files
|
||||
$(RM) $(DIR)/debian/source/include-binaries
|
||||
|
||||
.PHONY: all clean binary binary-arch binary-indep build
|
||||
.PHONY: all clean binary binary-indep build
|
||||
|
|
10
debian/source/options
vendored
Normal file
10
debian/source/options
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
tar-ignore = "assets/*.srb"
|
||||
tar-ignore = "assets/*.pk3"
|
||||
tar-ignore = "assets/*.dta"
|
||||
tar-ignore = "assets/*.wad"
|
||||
tar-ignore = "assets/debian/srb2-data/*"
|
||||
tar-ignore = "assets/debian/tmp/*"
|
||||
tar-ignore = "*.obj"
|
||||
tar-ignore = "*.dep"
|
||||
tar-ignore = ".git/*"
|
||||
tar-ignore = ".git*"
|
4
debian/srb2.desktop
vendored
4
debian/srb2.desktop
vendored
|
@ -1,8 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Name=Sonic Robo Blast 2
|
||||
Comment=A free 3D Sonic the Hedgehog fan-game built using a modified ver. of the Doom Legacy source port
|
||||
Comment=A free 3D Sonic the Hedgehog fangame closely inspired by the original Sonic games on the Sega Genesis.
|
||||
Encoding=UTF-8
|
||||
Exec=srb2
|
||||
Exec=/usr/games/SRB2/srb2
|
||||
Icon=/usr/share/pixmaps/srb2.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
|
BIN
srb2.png
BIN
srb2.png
Binary file not shown.
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 6.1 KiB |
BIN
srb2banner.png
Normal file
BIN
srb2banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 153 KiB |
|
@ -227,10 +227,17 @@ set(SRB2_CONFIG_YASM OFF CACHE BOOL
|
|||
set(SRB2_CONFIG_STATIC_OPENGL OFF CACHE BOOL
|
||||
"Use statically linked OpenGL. NOT RECOMMENDED.")
|
||||
|
||||
### use internal libraries?
|
||||
if(${CMAKE_SYSTEM} MATCHES "Windows") ###set on Windows only
|
||||
set(SRB2_CONFIG_USE_INTERNAL_LIBRARIES OFF CACHE BOOL
|
||||
"Use SRB2's internal copies of required dependencies (SDL2, PNG, zlib, GME).")
|
||||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_HAVE_BLUA})
|
||||
add_definitions(-DHAVE_BLUA)
|
||||
set(SRB2_LUA_SOURCES
|
||||
lua_baselib.c
|
||||
lua_blockmaplib.c
|
||||
lua_consolelib.c
|
||||
lua_hooklib.c
|
||||
lua_hudlib.c
|
||||
|
@ -314,7 +321,17 @@ if(${SRB2_CONFIG_HAVE_BLUA})
|
|||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_HAVE_GME})
|
||||
find_package(GME)
|
||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||
set(GME_FOUND ON)
|
||||
set(GME_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/gme/include)
|
||||
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||
set(GME_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/gme/win64 -lgme")
|
||||
else() # 32-bit
|
||||
set(GME_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/gme/win32 -lgme")
|
||||
endif()
|
||||
else()
|
||||
find_package(GME)
|
||||
endif()
|
||||
if(${GME_FOUND})
|
||||
set(SRB2_HAVE_GME ON)
|
||||
add_definitions(-DHAVE_LIBGME)
|
||||
|
@ -324,9 +341,20 @@ if(${SRB2_CONFIG_HAVE_GME})
|
|||
endif()
|
||||
|
||||
if(${SRB2_CONFIG_HAVE_ZLIB})
|
||||
find_package(ZLIB)
|
||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||
set(ZLIB_FOUND ON)
|
||||
set(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/zlib)
|
||||
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||
set(ZLIB_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/zlib/win32 -lz64")
|
||||
else() # 32-bit
|
||||
set(ZLIB_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/zlib/win32 -lz32")
|
||||
endif()
|
||||
else()
|
||||
find_package(ZLIB)
|
||||
endif()
|
||||
if(${ZLIB_FOUND})
|
||||
set(SRB2_HAVE_ZLIB ON)
|
||||
add_definitions(-DHAVE_ZLIB)
|
||||
else()
|
||||
message(WARNING "You have specified that ZLIB is available but it was not found. SRB2 may not compile correctly.")
|
||||
endif()
|
||||
|
@ -334,7 +362,17 @@ endif()
|
|||
|
||||
if(${SRB2_CONFIG_HAVE_PNG} AND ${SRB2_CONFIG_HAVE_ZLIB})
|
||||
if (${ZLIB_FOUND})
|
||||
find_package(PNG)
|
||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||
set(PNG_FOUND ON)
|
||||
set(PNG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/libpng-src)
|
||||
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||
set(PNG_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/libpng-src/projects -lpng64")
|
||||
else() # 32-bit
|
||||
set(PNG_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/libpng-src/projects -lpng32")
|
||||
endif()
|
||||
else()
|
||||
find_package(PNG)
|
||||
endif()
|
||||
if(${PNG_FOUND})
|
||||
set(SRB2_HAVE_PNG ON)
|
||||
add_definitions(-DHAVE_PNG)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# GNU Make makefile for SRB2
|
||||
#############################################################################
|
||||
# Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
# Copyright (C) 2003-2014 by Sonic Team Junior.
|
||||
# Copyright (C) 2003-2018 by Sonic Team Junior.
|
||||
#
|
||||
# This program is free software distributed under the
|
||||
# terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -190,9 +190,6 @@ endif
|
|||
ifdef GCC46
|
||||
WFLAGS+=-Wno-suggest-attribute=noreturn
|
||||
endif
|
||||
ifdef GCC71
|
||||
WFLAGS+=-Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3
|
||||
endif
|
||||
|
||||
ifndef MINGW
|
||||
ifdef GCC45
|
||||
|
@ -222,6 +219,18 @@ endif
|
|||
ifdef GCC61
|
||||
WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare
|
||||
endif
|
||||
ifdef GCC71
|
||||
WFLAGS+=-Wno-error=implicit-fallthrough
|
||||
WFLAGS+=-Wno-implicit-fallthrough
|
||||
endif
|
||||
ifdef GCC80
|
||||
WFLAGS+=-Wno-error=format-overflow
|
||||
WFLAGS+=-Wno-error=stringop-truncation
|
||||
WFLAGS+=-Wno-error=stringop-overflow
|
||||
WFLAGS+=-Wno-format-overflow
|
||||
WFLAGS+=-Wno-stringop-truncation
|
||||
WFLAGS+=-Wno-stringop-overflow
|
||||
endif
|
||||
|
||||
|
||||
#indicate platform and what interface use with
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2014 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2007-2016 by John "JTE" Muniz.
|
||||
// Copyright (C) 2011-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 2011-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2007-2016 by John "JTE" Muniz.
|
||||
// Copyright (C) 2012-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 2012-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -39,6 +39,7 @@ OBJS:=$(OBJS) \
|
|||
$(OBJDIR)/lvm.o \
|
||||
$(OBJDIR)/lua_script.o \
|
||||
$(OBJDIR)/lua_baselib.o \
|
||||
$(OBJDIR)/lua_blockmaplib.o \
|
||||
$(OBJDIR)/lua_mathlib.o \
|
||||
$(OBJDIR)/lua_hooklib.o \
|
||||
$(OBJDIR)/lua_consolelib.o \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -63,6 +63,7 @@ CV_PossibleValue_t CV_Unsigned[] = {{0, "MIN"}, {999999999, "MAX"}, {0, NULL}};
|
|||
CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}};
|
||||
|
||||
#define COM_BUF_SIZE 8192 // command buffer size
|
||||
#define MAX_ALIAS_RECURSION 100 // max recursion allowed for aliases
|
||||
|
||||
static INT32 com_wait; // one command per frame (for cmd sequences)
|
||||
|
||||
|
@ -485,6 +486,7 @@ static void COM_ExecuteString(char *ptext)
|
|||
{
|
||||
xcommand_t *cmd;
|
||||
cmdalias_t *a;
|
||||
static INT32 recursion = 0; // detects recursion and stops it if it goes too far
|
||||
|
||||
COM_TokenizeString(ptext);
|
||||
|
||||
|
@ -497,6 +499,7 @@ static void COM_ExecuteString(char *ptext)
|
|||
{
|
||||
if (!stricmp(com_argv[0], cmd->name)) //case insensitive now that we have lower and uppercase!
|
||||
{
|
||||
recursion = 0;
|
||||
cmd->function();
|
||||
return;
|
||||
}
|
||||
|
@ -507,11 +510,20 @@ static void COM_ExecuteString(char *ptext)
|
|||
{
|
||||
if (!stricmp(com_argv[0], a->name))
|
||||
{
|
||||
if (recursion > MAX_ALIAS_RECURSION)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Alias recursion cycle detected!\n"));
|
||||
recursion = 0;
|
||||
return;
|
||||
}
|
||||
recursion++;
|
||||
COM_BufInsertText(a->value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
recursion = 0;
|
||||
|
||||
// check cvars
|
||||
// Hurdler: added at Ebola's request ;)
|
||||
// (don't flood the console in software mode with bad gr_xxx command)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -101,8 +101,6 @@ static void CON_RecalcSize(void);
|
|||
|
||||
static void CONS_hudlines_Change(void);
|
||||
static void CONS_backcolor_Change(void);
|
||||
static void CON_DrawBackpic(patch_t *pic, INT32 startx, INT32 destwidth);
|
||||
//static void CON_DrawBackpic2(pic_t *pic, INT32 startx, INT32 destwidth);
|
||||
|
||||
//======================================================================
|
||||
// CONSOLE VARS AND COMMANDS
|
||||
|
@ -1233,24 +1231,15 @@ void CONS_Printf(const char *fmt, ...)
|
|||
if (con_startup)
|
||||
{
|
||||
#if (defined (_WINDOWS)) || (defined (__OS2__) && !defined (HAVE_SDL))
|
||||
static lumpnum_t con_backpic_lumpnum = UINT32_MAX;
|
||||
patch_t *con_backpic;
|
||||
patch_t *con_backpic = W_CachePatchName("CONSBACK", PU_CACHE);
|
||||
|
||||
if (con_backpic_lumpnum == UINT32_MAX)
|
||||
con_backpic_lumpnum = W_GetNumForName("CONSBACK");
|
||||
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
|
||||
V_DrawScaledPatch(0, 0, 0, con_backpic);
|
||||
|
||||
// We load the raw lump, even in hardware mode
|
||||
con_backpic = (patch_t*)W_CacheLumpNum(con_backpic_lumpnum, PU_CACHE);
|
||||
|
||||
// show startup screen and message using only 'software' graphics
|
||||
// (rendermode may be hardware accelerated, but the video mode is not set yet)
|
||||
CON_DrawBackpic(con_backpic, 0, vid.width); // put console background
|
||||
I_LoadingScreen(txt);
|
||||
|
||||
Z_Unlock(con_backpic);
|
||||
W_UnlockCachedPatch(con_backpic);
|
||||
I_LoadingScreen(txt); // Win32/OS2 only
|
||||
#else
|
||||
// here we display the console background and console text
|
||||
// (no hardware accelerated support for these versions)
|
||||
// here we display the console text
|
||||
CON_Drawer();
|
||||
I_FinishUpdate(); // page flip or blit buffer
|
||||
#endif
|
||||
|
@ -1474,64 +1463,6 @@ static void CON_DrawHudlines(void)
|
|||
con_clearlines = y; // this is handled by HU_Erase();
|
||||
}
|
||||
|
||||
// Scale a pic_t at 'startx' pos, to 'destwidth' columns.
|
||||
// startx, destwidth is resolution dependent
|
||||
// Used to draw console borders, console background.
|
||||
// The pic must be sized BASEVIDHEIGHT height.
|
||||
static void CON_DrawBackpic(patch_t *pic, INT32 startx, INT32 destwidth)
|
||||
{
|
||||
(void)startx;
|
||||
(void)destwidth;
|
||||
V_DrawScaledPatch(0, 0, 0, pic);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static inline void CON_DrawBackpic2(pic_t *pic, INT32 startx, INT32 destwidth)
|
||||
{
|
||||
INT32 x, y;
|
||||
INT32 v;
|
||||
UINT8 *src, *dest;
|
||||
const UINT8 *deststop;
|
||||
INT32 frac, fracstep;
|
||||
|
||||
dest = screens[0]+startx;
|
||||
deststop = screens[0] + vid.rowbytes * vid.height;
|
||||
|
||||
for (y = 0; y < con_curlines; y++, dest += vid.width)
|
||||
{
|
||||
// scale the picture to the resolution
|
||||
v = SHORT(pic->height) - ((con_curlines - y) * (BASEVIDHEIGHT-1) / vid.height) - 1;
|
||||
|
||||
src = pic->data + v*SHORT(pic->width);
|
||||
|
||||
// in case of the console backpic, simplify
|
||||
if (SHORT(pic->width) == destwidth)
|
||||
M_Memcpy(dest, src, destwidth);
|
||||
else
|
||||
{
|
||||
// scale pic to screen width
|
||||
frac = 0;
|
||||
fracstep = (SHORT(pic->width)<<16)/destwidth;
|
||||
for (x = 0; x < destwidth; x += 4)
|
||||
{
|
||||
if (dest+x > deststop) break;
|
||||
dest[x] = src[frac>>FRACBITS];
|
||||
frac += fracstep;
|
||||
if (dest+x+1 > deststop) break;
|
||||
dest[x+1] = src[frac>>FRACBITS];
|
||||
frac += fracstep;
|
||||
if (dest+x+2 > deststop) break;
|
||||
dest[x+2] = src[frac>>FRACBITS];
|
||||
frac += fracstep;
|
||||
if (dest+x+3 > deststop) break;
|
||||
dest[x+3] = src[frac>>FRACBITS];
|
||||
frac += fracstep;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// draw the console background, text, and prompt if enough place
|
||||
//
|
||||
static void CON_DrawConsole(void)
|
||||
|
@ -1554,18 +1485,10 @@ static void CON_DrawConsole(void)
|
|||
// draw console background
|
||||
if (cons_backpic.value || con_forcepic)
|
||||
{
|
||||
static lumpnum_t con_backpic_lumpnum = UINT32_MAX;
|
||||
patch_t *con_backpic;
|
||||
patch_t *con_backpic = W_CachePatchName("CONSBACK", PU_CACHE);
|
||||
|
||||
if (con_backpic_lumpnum == UINT32_MAX)
|
||||
con_backpic_lumpnum = W_GetNumForName("CONSBACK");
|
||||
|
||||
con_backpic = (patch_t*)W_CachePatchNum(con_backpic_lumpnum, PU_CACHE);
|
||||
|
||||
if (rendermode != render_soft)
|
||||
V_DrawScaledPatch(0, 0, 0, con_backpic);
|
||||
else if (rendermode != render_none)
|
||||
CON_DrawBackpic(con_backpic, 0, vid.width); // picture as background
|
||||
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
|
||||
V_DrawScaledPatch(0, 0, 0, con_backpic);
|
||||
|
||||
W_UnlockCachedPatch(con_backpic);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -2357,7 +2357,7 @@ void CL_ClearPlayer(INT32 playernum)
|
|||
//
|
||||
// Removes a player from the current game
|
||||
//
|
||||
static void CL_RemovePlayer(INT32 playernum)
|
||||
static void CL_RemovePlayer(INT32 playernum, INT32 reason)
|
||||
{
|
||||
// Sanity check: exceptional cases (i.e. c-fails) can cause multiple
|
||||
// kick commands to be issued for the same player.
|
||||
|
@ -2412,6 +2412,10 @@ static void CL_RemovePlayer(INT32 playernum)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_BLUA
|
||||
LUAh_PlayerQuit(&players[playernum], reason); // Lua hook for player quitting
|
||||
#endif
|
||||
|
||||
// Reset player data
|
||||
CL_ClearPlayer(playernum);
|
||||
|
||||
|
@ -2689,6 +2693,7 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
INT32 pnum, msg;
|
||||
XBOXSTATIC char buf[3 + MAX_REASONLENGTH];
|
||||
char *reason = buf;
|
||||
kickreason_t kickreason = KR_KICK;
|
||||
|
||||
pnum = READUINT8(*p);
|
||||
msg = READUINT8(*p);
|
||||
|
@ -2771,14 +2776,17 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
{
|
||||
case KICK_MSG_GO_AWAY:
|
||||
CONS_Printf(M_GetText("has been kicked (Go away)\n"));
|
||||
kickreason = KR_KICK;
|
||||
break;
|
||||
#ifdef NEWPING
|
||||
case KICK_MSG_PING_HIGH:
|
||||
CONS_Printf(M_GetText("left the game (Broke ping limit)\n"));
|
||||
kickreason = KR_PINGLIMIT;
|
||||
break;
|
||||
#endif
|
||||
case KICK_MSG_CON_FAIL:
|
||||
CONS_Printf(M_GetText("left the game (Synch failure)\n"));
|
||||
kickreason = KR_SYNCH;
|
||||
|
||||
if (M_CheckParm("-consisdump")) // Helps debugging some problems
|
||||
{
|
||||
|
@ -2815,21 +2823,26 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
break;
|
||||
case KICK_MSG_TIMEOUT:
|
||||
CONS_Printf(M_GetText("left the game (Connection timeout)\n"));
|
||||
kickreason = KR_TIMEOUT;
|
||||
break;
|
||||
case KICK_MSG_PLAYER_QUIT:
|
||||
if (netgame) // not splitscreen/bots
|
||||
CONS_Printf(M_GetText("left the game\n"));
|
||||
kickreason = KR_LEAVE;
|
||||
break;
|
||||
case KICK_MSG_BANNED:
|
||||
CONS_Printf(M_GetText("has been banned (Don't come back)\n"));
|
||||
kickreason = KR_BAN;
|
||||
break;
|
||||
case KICK_MSG_CUSTOM_KICK:
|
||||
READSTRINGN(*p, reason, MAX_REASONLENGTH+1);
|
||||
CONS_Printf(M_GetText("has been kicked (%s)\n"), reason);
|
||||
kickreason = KR_KICK;
|
||||
break;
|
||||
case KICK_MSG_CUSTOM_BAN:
|
||||
READSTRINGN(*p, reason, MAX_REASONLENGTH+1);
|
||||
CONS_Printf(M_GetText("has been banned (%s)\n"), reason);
|
||||
kickreason = KR_BAN;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2857,7 +2870,7 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
M_StartMessage(M_GetText("You have been kicked by the server\n\nPress ESC\n"), NULL, MM_NOTHING);
|
||||
}
|
||||
else
|
||||
CL_RemovePlayer(pnum);
|
||||
CL_RemovePlayer(pnum, kickreason);
|
||||
}
|
||||
|
||||
consvar_t cv_allownewplayer = {"allowjoin", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL };
|
||||
|
@ -4471,6 +4484,7 @@ static void Local_Maketic(INT32 realtics)
|
|||
void SV_SpawnPlayer(INT32 playernum, INT32 x, INT32 y, angle_t angle)
|
||||
{
|
||||
tic_t tic;
|
||||
UINT8 numadjust = 0;
|
||||
|
||||
(void)x;
|
||||
(void)y;
|
||||
|
@ -4480,7 +4494,21 @@ void SV_SpawnPlayer(INT32 playernum, INT32 x, INT32 y, angle_t angle)
|
|||
// spawning, but will be applied afterwards.
|
||||
|
||||
for (tic = server ? maketic : (neededtic - 1); tic >= gametic; tic--)
|
||||
{
|
||||
if (numadjust++ == BACKUPTICS)
|
||||
{
|
||||
DEBFILE(va("SV_SpawnPlayer: All netcmds for player %d adjusted!\n", playernum));
|
||||
// We already adjusted them all, waste of time doing the same thing over and over
|
||||
// This shouldn't happen normally though, either gametic was 0 (which is handled now anyway)
|
||||
// or maketic >= gametic + BACKUPTICS
|
||||
// -- Monster Iestyn 16/01/18
|
||||
break;
|
||||
}
|
||||
netcmds[tic%BACKUPTICS][playernum].angleturn = (INT16)((angle>>16) | TICCMD_RECEIVED);
|
||||
|
||||
if (!tic) // failsafe for gametic == 0 -- Monster Iestyn 16/01/18
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// create missed tic
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -444,6 +444,17 @@ extern consvar_t cv_playbackspeed;
|
|||
#define KICK_MSG_CUSTOM_KICK 7
|
||||
#define KICK_MSG_CUSTOM_BAN 8
|
||||
|
||||
typedef enum
|
||||
{
|
||||
KR_KICK = 1, //Kicked by server
|
||||
KR_PINGLIMIT = 2, //Broke Ping Limit
|
||||
KR_SYNCH = 3, //Synch Failure
|
||||
KR_TIMEOUT = 4, //Connection Timeout
|
||||
KR_BAN = 5, //Banned by server
|
||||
KR_LEAVE = 6, //Quit the game
|
||||
|
||||
} kickreason_t;
|
||||
|
||||
extern boolean server;
|
||||
#define client (!server)
|
||||
extern boolean dedicated; // For dedicated server
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
20
src/d_main.c
20
src/d_main.c
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -824,7 +824,7 @@ static void IdentifyVersion(void)
|
|||
else if (srb2wad1 != NULL && FIL_ReadFileOK(srb2wad1))
|
||||
D_AddFile(srb2wad1);
|
||||
else
|
||||
I_Error("SRB2.SRB/SRB2.WAD not found! Expected in %s, ss files: %s and %s\n", srb2waddir, srb2wad1, srb2wad2);
|
||||
I_Error("SRB2.SRB/SRB2.WAD not found! Expected in %s, ss files: %s or %s\n", srb2waddir, srb2wad1, srb2wad2);
|
||||
|
||||
if (srb2wad1)
|
||||
free(srb2wad1);
|
||||
|
@ -927,6 +927,20 @@ void D_SRB2Main(void)
|
|||
INT32 pstartmap = 1;
|
||||
boolean autostart = false;
|
||||
|
||||
// Print GPL notice for our console users (Linux)
|
||||
CONS_Printf(
|
||||
"\n\nSonic Robo Blast 2\n"
|
||||
"Copyright (C) 1998-2018 by Sonic Team Junior\n\n"
|
||||
"This program comes with ABSOLUTELY NO WARRANTY.\n\n"
|
||||
"This is free software, and you are welcome to redistribute it\n"
|
||||
"and/or modify it under the terms of the GNU General Public License\n"
|
||||
"as published by the Free Software Foundation; either version 2 of\n"
|
||||
"the License, or (at your option) any later version.\n"
|
||||
"See the 'LICENSE.txt' file for details.\n\n"
|
||||
"Sonic the Hedgehog and related characters are trademarks of SEGA.\n"
|
||||
"We do not claim ownership of SEGA's intellectual property used\n"
|
||||
"in this program.\n\n");
|
||||
|
||||
// keep error messages until the final flush(stderr)
|
||||
#if !defined (PC_DOS) && !defined (_WIN32_WCE) && !defined(NOTERMIOS)
|
||||
if (setvbuf(stderr, NULL, _IOFBF, 1000))
|
||||
|
@ -1221,7 +1235,7 @@ void D_SRB2Main(void)
|
|||
else
|
||||
{
|
||||
if (M_CheckParm("-nomidimusic"))
|
||||
midi_disabled = true; ; // WARNING: DOS version initmusic in I_StartupSound
|
||||
midi_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
|
||||
if (M_CheckParm("-nodigmusic"))
|
||||
digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -677,6 +677,8 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_crosshair2);
|
||||
CV_RegisterVar(&cv_alwaysfreelook);
|
||||
CV_RegisterVar(&cv_alwaysfreelook2);
|
||||
CV_RegisterVar(&cv_chasefreelook);
|
||||
CV_RegisterVar(&cv_chasefreelook2);
|
||||
|
||||
// g_input.c
|
||||
CV_RegisterVar(&cv_sideaxis);
|
||||
|
@ -1446,7 +1448,12 @@ static void Command_Playdemo_f(void)
|
|||
|
||||
CONS_Printf(M_GetText("Playing back demo '%s'.\n"), name);
|
||||
|
||||
G_DoPlayDemo(name);
|
||||
// Internal if no extension, external if one exists
|
||||
// If external, convert the file name to a path in SRB2's home directory
|
||||
if (FIL_CheckExtension(name))
|
||||
G_DoPlayDemo(va("%s"PATHSEP"%s", srb2home, name));
|
||||
else
|
||||
G_DoPlayDemo(name);
|
||||
}
|
||||
|
||||
static void Command_Timedemo_f(void)
|
||||
|
@ -1799,6 +1806,10 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
mapname, resetplayer, lastgametype, gametype, chmappending));
|
||||
CONS_Printf(M_GetText("Speeding off to level...\n"));
|
||||
}
|
||||
|
||||
CON_ToggleOff();
|
||||
CON_ClearHUD();
|
||||
|
||||
if (demoplayback && !timingdemo)
|
||||
precache = false;
|
||||
|
||||
|
@ -1815,7 +1826,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
|||
G_InitNew(ultimatemode, mapname, resetplayer, skipprecutscene);
|
||||
if (demoplayback && !timingdemo)
|
||||
precache = true;
|
||||
CON_ToggleOff();
|
||||
if (timingdemo)
|
||||
G_DoneLevelLoad();
|
||||
|
||||
|
@ -2694,6 +2704,12 @@ static void Command_Login_f(void)
|
|||
XBOXSTATIC UINT8 finalmd5[16];
|
||||
const char *pw;
|
||||
|
||||
if (!netgame)
|
||||
{
|
||||
CONS_Printf(M_GetText("This only works in a netgame.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
// If the server uses login, it will effectively just remove admin privileges
|
||||
// from whoever has them. This is good.
|
||||
if (COM_Argc() != 2)
|
||||
|
@ -2804,6 +2820,12 @@ static void Command_Verify_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!netgame)
|
||||
{
|
||||
CONS_Printf(M_GetText("This only works in a netgame.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (COM_Argc() != 2)
|
||||
{
|
||||
CONS_Printf(M_GetText("promote <node>: give admin privileges to a node\n"));
|
||||
|
@ -3107,7 +3129,7 @@ static void Command_Addfile(void)
|
|||
// Add file on your client directly if it is trivial, or you aren't in a netgame.
|
||||
if (!(netgame || multiplayer) || musiconly)
|
||||
{
|
||||
P_AddWadFile(fn, NULL);
|
||||
P_AddWadFile(fn);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3171,7 +3193,7 @@ static void Command_Addfile(void)
|
|||
WRITEMEM(buf_p, md5sum, 16);
|
||||
}
|
||||
|
||||
if (IsPlayerAdmin(consoleplayer)) // Request to add file
|
||||
if (IsPlayerAdmin(consoleplayer) && (!server)) // Request to add file
|
||||
SendNetXCmd(XD_REQADDFILE, buf, buf_p - buf);
|
||||
else
|
||||
SendNetXCmd(XD_ADDFILE, buf, buf_p - buf);
|
||||
|
@ -3340,7 +3362,7 @@ static void Got_Addfilecmd(UINT8 **cp, INT32 playernum)
|
|||
|
||||
ncs = findfile(filename,md5sum,true);
|
||||
|
||||
if (ncs != FS_FOUND || !P_AddWadFile(filename, NULL))
|
||||
if (ncs != FS_FOUND || !P_AddWadFile(filename))
|
||||
{
|
||||
Command_ExitGame_f();
|
||||
if (ncs == FS_FOUND)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -444,7 +444,7 @@ void CL_LoadServerFiles(void)
|
|||
continue; // Already loaded
|
||||
else if (fileneeded[i].status == FS_FOUND)
|
||||
{
|
||||
P_AddWadFile(fileneeded[i].filename, NULL);
|
||||
P_AddWadFile(fileneeded[i].filename);
|
||||
G_SetGameModified(true);
|
||||
fileneeded[i].status = FS_OPEN;
|
||||
}
|
||||
|
@ -463,7 +463,7 @@ void CL_LoadServerFiles(void)
|
|||
fileneeded[i].filename);
|
||||
|
||||
// Okay, NOW we know it's safe. Whew.
|
||||
P_AddWadFile(fileneeded[i].filename, NULL);
|
||||
P_AddWadFile(fileneeded[i].filename);
|
||||
if (fileneeded[i].important)
|
||||
G_SetGameModified(true);
|
||||
fileneeded[i].status = FS_OPEN;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -32,6 +32,7 @@
|
|||
#include "fastcmp.h"
|
||||
#include "lua_script.h"
|
||||
#include "lua_hook.h"
|
||||
#include "d_clisrv.h"
|
||||
|
||||
#include "m_cond.h"
|
||||
|
||||
|
@ -1035,7 +1036,10 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
*(tmp-1) = '\0';
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -1616,7 +1620,10 @@ static void readhuditem(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
*(tmp-1) = '\0';
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -1860,7 +1867,6 @@ static void readframe(MYFILE *f, INT32 num)
|
|||
char *word1;
|
||||
char *word2 = NULL;
|
||||
char *tmp;
|
||||
INT32 j;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -1875,16 +1881,6 @@ static void readframe(MYFILE *f, INT32 num)
|
|||
if (s == tmp)
|
||||
continue; // Skip comment lines, but don't break.
|
||||
|
||||
for (j = 0; s[j] != '\n'; j++)
|
||||
{
|
||||
if (s[j] == '=')
|
||||
{
|
||||
j += 2;
|
||||
j = atoi(&s[j]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
word1 = strtok(s, " ");
|
||||
if (word1)
|
||||
strupr(word1);
|
||||
|
@ -2129,7 +2125,10 @@ static void reademblemdata(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
*(tmp-1) = '\0';
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -2269,7 +2268,10 @@ static void readextraemblemdata(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
*(tmp-1) = '\0';
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -2353,7 +2355,10 @@ static void readunlockable(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
*(tmp-1) = '\0';
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -2640,7 +2645,10 @@ static void readconditionset(MYFILE *f, UINT8 setnum)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
*(tmp-1) = '\0';
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -2885,7 +2893,10 @@ static void readmaincfg(MYFILE *f)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
*(tmp-1) = '\0';
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -3124,7 +3135,10 @@ static void readwipes(MYFILE *f)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
*(tmp-1) = '\0';
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -7272,6 +7286,14 @@ struct {
|
|||
{"FF_COLORMAPONLY",FF_COLORMAPONLY}, ///< Only copy the colormap, not the lightlevel
|
||||
{"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
|
||||
|
||||
#ifdef ESLOPE
|
||||
// Slope flags
|
||||
{"SL_NOPHYSICS",SL_NOPHYSICS}, // Don't do momentum adjustment with this slope
|
||||
{"SL_NODYNAMIC",SL_NODYNAMIC}, // Slope will never need to move during the level, so don't fuss with recalculating it
|
||||
{"SL_ANCHORVERTEX",SL_ANCHORVERTEX},// Slope is using a Slope Vertex Thing to anchor its position
|
||||
{"SL_VERTEXSLOPE",SL_VERTEXSLOPE}, // Slope is built from three Slope Vertex Things
|
||||
#endif
|
||||
|
||||
// Angles
|
||||
{"ANG1",ANG1},
|
||||
{"ANG2",ANG2},
|
||||
|
@ -7395,6 +7417,14 @@ struct {
|
|||
|
||||
{"V_CHARCOLORSHIFT",V_CHARCOLORSHIFT},
|
||||
{"V_ALPHASHIFT",V_ALPHASHIFT},
|
||||
|
||||
//Kick Reasons
|
||||
{"KR_KICK",KR_KICK},
|
||||
{"KR_PINGLIMIT",KR_PINGLIMIT},
|
||||
{"KR_SYNCH",KR_SYNCH},
|
||||
{"KR_TIMEOUT",KR_TIMEOUT},
|
||||
{"KR_BAN",KR_BAN},
|
||||
{"KR_LEAVE",KR_LEAVE},
|
||||
#endif
|
||||
|
||||
{NULL,0}
|
||||
|
@ -8204,6 +8234,9 @@ static inline int lib_getenum(lua_State *L)
|
|||
} else if (fastcmp(word,"maptol")) {
|
||||
lua_pushinteger(L, maptol);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"ultimatemode")) {
|
||||
lua_pushboolean(L, ultimatemode != 0);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"mariomode")) {
|
||||
lua_pushboolean(L, mariomode != 0);
|
||||
return 1;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 2005 by Sonic Team Jr.
|
||||
// Copyright (C) 2005-2018 by Sonic Team Jr.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2014-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 2014-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -979,6 +979,8 @@ static const char *credits[] = {
|
|||
"Callum Dickinson",
|
||||
"Scott \"Graue\" Feeney",
|
||||
"Nathan \"Jazz\" Giroux",
|
||||
"Vivian \"toaster\" Grannell",
|
||||
"Kepa \"Nev3r\" Iceta",
|
||||
"Thomas \"Shadow Hog\" Igoe",
|
||||
"Iestyn \"Monster Iestyn\" Jealous",
|
||||
"Ronald \"Furyhunter\" Kinard", // The SDL2 port
|
||||
|
@ -986,6 +988,7 @@ static const char *credits[] = {
|
|||
"Ehab \"Wolfy\" Saeed",
|
||||
"\"Kaito Sinclaire\"",
|
||||
"\"SSNTails\"",
|
||||
"Marco \"mazmazz\" Zafra",
|
||||
"",
|
||||
"\1Programming",
|
||||
"\1Assistance",
|
||||
|
@ -993,7 +996,6 @@ static const char *credits[] = {
|
|||
"Andrew \"orospakr\" Clunis",
|
||||
"Gregor \"Oogaland\" Dick",
|
||||
"Louis-Antoine \"LJSonic\" de Moulins", // for fixing 2.1's netcode (de Rochefort doesn't quite fit on the screen sorry lol)
|
||||
"Vivian \"toaster\" Grannell",
|
||||
"Julio \"Chaos Zero 64\" Guir",
|
||||
"\"Kalaron\"", // Coded some of Sryder13's collection of OpenGL fixes, especially fog
|
||||
"Matthew \"Shuffle\" Marsalko",
|
||||
|
@ -1001,7 +1003,12 @@ static const char *credits[] = {
|
|||
"\"Morph\"", // For SRB2Morphed stuff
|
||||
"Colin \"Sonict\" Pfaff",
|
||||
"Sean \"Sryder13\" Ryder",
|
||||
"Tasos \"tatokis\" Sahanidis", // Corrected C FixedMul, making 64-bit builds netplay compatible
|
||||
"\"Steel Titanium\"",
|
||||
"Ben \"Cue\" Woodford",
|
||||
// Git contributors with 5+ approved merges, at least a few of substantive quality, may be named
|
||||
// Everyone else is acknowledged here
|
||||
"STJr Git Contributors",
|
||||
"",
|
||||
"\1Sprite Artists",
|
||||
"Odi \"Iceman404\" Atunzu",
|
||||
|
@ -1048,13 +1055,13 @@ static const char *credits[] = {
|
|||
"Thomas \"Shadow Hog\" Igoe",
|
||||
"Erik \"Torgo\" Nielsen",
|
||||
"\"Kaito Sinclaire\"",
|
||||
"Wessel \"Spherallic\" Smit",
|
||||
"Wessel \"sphere\" Smit",
|
||||
"\"Spazzo\"",
|
||||
"\"SSNTails\"",
|
||||
"Rob Tisdell",
|
||||
"Jarrett \"JEV3\" Voight",
|
||||
"Johnny \"Sonikku\" Wallbank",
|
||||
"Marco \"Digiku\" Zafra",
|
||||
"Marco \"mazmazz\" Zafra",
|
||||
"",
|
||||
"\1Boss Design",
|
||||
"Ben \"Mystic\" Geyer",
|
||||
|
@ -1152,6 +1159,9 @@ void F_CreditDrawer(void)
|
|||
for (i = 0; credits_pics[i].patch; i++)
|
||||
V_DrawSciencePatch(credits_pics[i].x<<FRACBITS, (credits_pics[i].y<<FRACBITS) - 4*(animtimer<<FRACBITS)/5, 0, W_CachePatchName(credits_pics[i].patch, PU_CACHE), FRACUNIT>>1);
|
||||
|
||||
// Dim the background
|
||||
V_DrawFadeScreen();
|
||||
|
||||
// Draw credits text on top
|
||||
for (i = 0; credits[i]; i++)
|
||||
{
|
||||
|
@ -1729,7 +1739,7 @@ static void F_AdvanceToNextScene(void)
|
|||
|
||||
void F_EndCutScene(void)
|
||||
{
|
||||
cutsceneover = true; // do this first, just in case Y_EndGame or something wants to turn it back false later
|
||||
cutsceneover = true; // do this first, just in case G_EndGame or something wants to turn it back false later
|
||||
if (runningprecutscene)
|
||||
{
|
||||
if (server)
|
||||
|
@ -1744,7 +1754,7 @@ void F_EndCutScene(void)
|
|||
else if (nextmap < 1100-1)
|
||||
G_NextLevel();
|
||||
else
|
||||
Y_EndGame();
|
||||
G_EndGame();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 2013-2016 by Matthew "Inuyasha" Walsh.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
55
src/g_game.c
55
src/g_game.c
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -350,11 +350,13 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
|
|||
consvar_t cv_crosshair = {"crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_invertmouse = {"invertmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_alwaysfreelook = {"alwaysmlook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_invertmouse2 = {"invertmouse2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_alwaysfreelook = {"alwaysmlook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_alwaysfreelook2 = {"alwaysmlook2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousemove = {"mousemove", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousemove2 = {"mousemove2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_chasefreelook = {"chasemlook", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_chasefreelook2 = {"chasemlook2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousemove = {"mousemove", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousemove2 = {"mousemove2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_analog = {"analog", "Off", CV_CALL, CV_OnOff, Analog_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_analog2 = {"analog2", "Off", CV_CALL, CV_OnOff, Analog2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
#ifdef DC
|
||||
|
@ -979,7 +981,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
|||
|
||||
turnright = PLAYER1INPUTDOWN(gc_turnright);
|
||||
turnleft = PLAYER1INPUTDOWN(gc_turnleft);
|
||||
mouseaiming = (PLAYER1INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook.value;
|
||||
mouseaiming = (PLAYER1INPUTDOWN(gc_mouseaiming)) ^
|
||||
(cv_chasecam.value ? cv_chasefreelook.value : cv_alwaysfreelook.value);
|
||||
analogjoystickmove = cv_usejoystick.value && !Joystick.bGamepadStyle;
|
||||
gamepadjoystickmove = cv_usejoystick.value && Joystick.bGamepadStyle;
|
||||
|
||||
|
@ -1270,7 +1273,8 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
|
|||
|
||||
turnright = PLAYER2INPUTDOWN(gc_turnright);
|
||||
turnleft = PLAYER2INPUTDOWN(gc_turnleft);
|
||||
mouseaiming = (PLAYER2INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook2.value;
|
||||
mouseaiming = (PLAYER2INPUTDOWN(gc_mouseaiming)) ^
|
||||
(cv_chasecam2.value ? cv_chasefreelook2.value : cv_alwaysfreelook2.value);
|
||||
analogjoystickmove = cv_usejoystick2.value && !Joystick2.bGamepadStyle;
|
||||
gamepadjoystickmove = cv_usejoystick2.value && Joystick2.bGamepadStyle;
|
||||
|
||||
|
@ -1814,7 +1818,8 @@ boolean G_Responder(event_t *ev)
|
|||
{
|
||||
case ev_keydown:
|
||||
if (ev->data1 == gamecontrol[gc_pause][0]
|
||||
|| ev->data1 == gamecontrol[gc_pause][1])
|
||||
|| ev->data1 == gamecontrol[gc_pause][1]
|
||||
|| ev->data1 == KEY_PAUSE)
|
||||
{
|
||||
if (!pausedelay)
|
||||
{
|
||||
|
@ -2605,7 +2610,7 @@ void G_ExitLevel(void)
|
|||
CONS_Printf(M_GetText("The round has ended.\n"));
|
||||
|
||||
// Remove CEcho text on round end.
|
||||
HU_DoCEcho("");
|
||||
HU_ClearCEcho();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2901,7 +2906,7 @@ void G_AfterIntermission(void)
|
|||
if (nextmap < 1100-1)
|
||||
G_NextLevel();
|
||||
else
|
||||
Y_EndGame();
|
||||
G_EndGame();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2987,6 +2992,38 @@ static void G_DoContinued(void)
|
|||
gameaction = ga_nothing;
|
||||
}
|
||||
|
||||
//
|
||||
// G_EndGame (formerly Y_EndGame)
|
||||
// Frankly this function fits better in g_game.c than it does in y_inter.c
|
||||
//
|
||||
// ...Gee, (why) end the game?
|
||||
// Because G_AfterIntermission and F_EndCutscene would
|
||||
// both do this exact same thing *in different ways* otherwise,
|
||||
// which made it so that you could only unlock Ultimate mode
|
||||
// if you had a cutscene after the final level and crap like that.
|
||||
// This function simplifies it so only one place has to be updated
|
||||
// when something new is added.
|
||||
void G_EndGame(void)
|
||||
{
|
||||
// Only do evaluation and credits in coop games.
|
||||
if (gametype == GT_COOP)
|
||||
{
|
||||
if (nextmap == 1102-1) // end game with credits
|
||||
{
|
||||
F_StartCredits();
|
||||
return;
|
||||
}
|
||||
if (nextmap == 1101-1) // end game with evaluation
|
||||
{
|
||||
F_StartGameEvaluation();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 1100 or competitive multiplayer, so go back to title screen.
|
||||
D_StartTitle();
|
||||
}
|
||||
|
||||
//
|
||||
// G_LoadGameSettings
|
||||
//
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -55,8 +55,8 @@ extern INT16 rw_maximums[NUM_WEAPONS];
|
|||
|
||||
// used in game menu
|
||||
extern consvar_t cv_crosshair, cv_crosshair2;
|
||||
extern consvar_t cv_invertmouse, cv_alwaysfreelook, cv_mousemove;
|
||||
extern consvar_t cv_invertmouse2, cv_alwaysfreelook2, cv_mousemove2;
|
||||
extern consvar_t cv_invertmouse, cv_alwaysfreelook, cv_chasefreelook, cv_mousemove;
|
||||
extern consvar_t cv_invertmouse2, cv_alwaysfreelook2, cv_chasefreelook2, cv_mousemove2;
|
||||
extern consvar_t cv_useranalog, cv_useranalog2;
|
||||
extern consvar_t cv_analog, cv_analog2;
|
||||
extern consvar_t cv_sideaxis,cv_turnaxis,cv_moveaxis,cv_lookaxis,cv_fireaxis,cv_firenaxis;
|
||||
|
@ -174,6 +174,7 @@ void G_NextLevel(void);
|
|||
void G_Continue(void);
|
||||
void G_UseContinue(void);
|
||||
void G_AfterIntermission(void);
|
||||
void G_EndGame(void); // moved from y_inter.c/h and renamed
|
||||
|
||||
void G_Ticker(boolean run);
|
||||
boolean G_Responder(event_t *ev);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -25,10 +25,10 @@ static CV_PossibleValue_t mousesens_cons_t[] = {{1, "MIN"}, {MAXMOUSESENSITIVITY
|
|||
static CV_PossibleValue_t onecontrolperkey_cons_t[] = {{1, "One"}, {2, "Several"}, {0, NULL}};
|
||||
|
||||
// mouse values are used once
|
||||
consvar_t cv_mousesens = {"mousesens", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousesens2 = {"mousesens2", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens = {"mouseysens", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens2 = {"mouseysens2", "35", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousesens = {"mousesens", "20", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousesens2 = {"mousesens2", "20", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens = {"mouseysens", "20", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mouseysens2 = {"mouseysens2", "20", CV_SAVE, mousesens_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_controlperkey = {"controlperkey", "One", CV_SAVE, onecontrolperkey_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
INT32 mousex, mousey;
|
||||
|
@ -1154,10 +1154,8 @@ void G_Controldefault(void)
|
|||
#else
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_forward ][0] = KEY_UPARROW;
|
||||
gamecontrol[gc_forward ][1] = 'w';
|
||||
gamecontrol[gc_backward ][0] = KEY_DOWNARROW;
|
||||
gamecontrol[gc_backward ][1] = 's';
|
||||
gamecontrol[gc_forward ][0] = 'w';
|
||||
gamecontrol[gc_backward ][0] = 's';
|
||||
gamecontrol[gc_strafeleft ][0] = 'a';
|
||||
gamecontrol[gc_straferight][0] = 'd';
|
||||
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
||||
|
@ -1178,21 +1176,20 @@ void G_Controldefault(void)
|
|||
gamecontrol[gc_fire ][1] = KEY_MOUSE1+0;
|
||||
gamecontrol[gc_firenormal ][0] = 'c';
|
||||
gamecontrol[gc_tossflag ][0] = '\'';
|
||||
gamecontrol[gc_use ][0] = 'x';
|
||||
gamecontrol[gc_use ][0] = KEY_LSHIFT;
|
||||
gamecontrol[gc_camtoggle ][0] = 'v';
|
||||
gamecontrol[gc_camleft ][0] = '[';
|
||||
gamecontrol[gc_camright ][0] = ']';
|
||||
gamecontrol[gc_camreset ][0] = 'r';
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_lookup ][0] = KEY_UPARROW;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_DOWNARROW;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[gc_jump ][0] = 'z';
|
||||
gamecontrol[gc_jump ][1] = KEY_MOUSE1+1;
|
||||
gamecontrol[gc_jump ][0] = KEY_SPACE;
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
||||
gamecontrol[gc_pause ][0] = 'p';
|
||||
#ifdef WMINPUT
|
||||
gamecontrol[gc_forward ][0] = KEY_JOY1+02; //UP
|
||||
gamecontrol[gc_backward ][0] = KEY_JOY1+03; //DOWN
|
||||
|
@ -1330,11 +1327,31 @@ static void setcontrol(INT32 (*gc)[2], INT32 na)
|
|||
return;
|
||||
}
|
||||
keynum = G_KeyStringtoNum(COM_Argv(2));
|
||||
|
||||
if (keynum == KEY_PAUSE) // fail silently; pause is hardcoded
|
||||
{
|
||||
if (na == 4)
|
||||
{
|
||||
na--;
|
||||
keynum = G_KeyStringtoNum(COM_Argv(3));
|
||||
if (keynum == KEY_PAUSE)
|
||||
return;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
G_CheckDoubleUsage(keynum);
|
||||
gc[numctrl][0] = keynum;
|
||||
|
||||
if (na == 4)
|
||||
gc[numctrl][1] = G_KeyStringtoNum(COM_Argv(3));
|
||||
{
|
||||
keynum = G_KeyStringtoNum(COM_Argv(3));
|
||||
if (keynum != KEY_PAUSE)
|
||||
gc[numctrl][1] = keynum;
|
||||
else
|
||||
gc[numctrl][1] = 0;
|
||||
}
|
||||
else
|
||||
gc[numctrl][1] = 0;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -633,6 +633,7 @@ static void WalkBSPNode(INT32 bspnum, poly_t *poly, UINT16 *leafnode, fixed_t *b
|
|||
HWR_SubsecPoly(bspnum&(~NF_SUBSECTOR), poly);
|
||||
//Hurdler: implement a loading status
|
||||
|
||||
#ifdef HWR_LOADING_SCREEN
|
||||
if (ls_count-- <= 0)
|
||||
{
|
||||
char s[16];
|
||||
|
@ -657,6 +658,7 @@ static void WalkBSPNode(INT32 bspnum, poly_t *poly, UINT16 *leafnode, fixed_t *b
|
|||
|
||||
I_UpdateNoVsync();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
M_ClearBox(bbox);
|
||||
poly = extrasubsectors[bspnum&~NF_SUBSECTOR].planepoly;
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
// the original aspect ratio of Doom graphics isn't square
|
||||
#define ORIGINAL_ASPECT (320.0f/200.0f)
|
||||
|
||||
// Uncomment this to enable the OpenGL loading screen
|
||||
//#define HWR_LOADING_SCREEN
|
||||
|
||||
// -----------
|
||||
// structures
|
||||
// -----------
|
||||
|
|
|
@ -2140,6 +2140,10 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
|||
else
|
||||
{
|
||||
fixed_t texturevpeg;
|
||||
boolean attachtobottom = false;
|
||||
#ifdef ESLOPE
|
||||
boolean slopeskew = false; // skew FOF walls with slopes?
|
||||
#endif
|
||||
|
||||
// Wow, how was this missing from OpenGL for so long?
|
||||
// ...Oh well, anyway, Lower Unpegged now changes pegging of FOFs like in software
|
||||
|
@ -2147,24 +2151,50 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
|||
if (newline)
|
||||
{
|
||||
texturevpeg = sides[newline->sidenum[0]].rowoffset;
|
||||
if (newline->flags & ML_DONTPEGBOTTOM)
|
||||
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||
attachtobottom = !!(newline->flags & ML_DONTPEGBOTTOM);
|
||||
#ifdef ESLOPE
|
||||
slopeskew = !!(newline->flags & ML_DONTPEGTOP);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
texturevpeg = sides[rover->master->sidenum[0]].rowoffset;
|
||||
if (gr_linedef->flags & ML_DONTPEGBOTTOM)
|
||||
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||
attachtobottom = !!(gr_linedef->flags & ML_DONTPEGBOTTOM);
|
||||
#ifdef ESLOPE
|
||||
slopeskew = !!(rover->master->flags & ML_DONTPEGTOP);
|
||||
#endif
|
||||
}
|
||||
|
||||
grTex = HWR_GetTexture(texnum);
|
||||
|
||||
#ifdef ESLOPE
|
||||
wallVerts[3].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
||||
wallVerts[2].t = (*rover->topheight - hS + texturevpeg) * grTex->scaleY;
|
||||
wallVerts[0].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
||||
wallVerts[1].t = (*rover->topheight - lS + texturevpeg) * grTex->scaleY;
|
||||
if (!slopeskew) // no skewing
|
||||
{
|
||||
if (attachtobottom)
|
||||
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||
wallVerts[3].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
||||
wallVerts[2].t = (*rover->topheight - hS + texturevpeg) * grTex->scaleY;
|
||||
wallVerts[0].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
||||
wallVerts[1].t = (*rover->topheight - lS + texturevpeg) * grTex->scaleY;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!attachtobottom) // skew by top
|
||||
{
|
||||
wallVerts[3].t = wallVerts[2].t = texturevpeg * grTex->scaleY;
|
||||
wallVerts[0].t = (h - l + texturevpeg) * grTex->scaleY;
|
||||
wallVerts[1].t = (hS - lS + texturevpeg) * grTex->scaleY;
|
||||
}
|
||||
else // skew by bottom
|
||||
{
|
||||
wallVerts[0].t = wallVerts[1].t = texturevpeg * grTex->scaleY;
|
||||
wallVerts[3].t = wallVerts[0].t - (h - l) * grTex->scaleY;
|
||||
wallVerts[2].t = wallVerts[1].t - (hS - lS) * grTex->scaleY;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (attachtobottom)
|
||||
texturevpeg -= *rover->topheight - *rover->bottomheight;
|
||||
wallVerts[3].t = wallVerts[2].t = (*rover->topheight - h + texturevpeg) * grTex->scaleY;
|
||||
wallVerts[0].t = wallVerts[1].t = (*rover->topheight - l + texturevpeg) * grTex->scaleY;
|
||||
#endif
|
||||
|
@ -3527,9 +3557,7 @@ static void HWR_Subsector(size_t num)
|
|||
#ifndef POLYSKY
|
||||
// Moved here because before, when above the ceiling and the floor does not have the sky flat, it doesn't draw the sky
|
||||
if (gr_frontsector->ceilingpic == skyflatnum || gr_frontsector->floorpic == skyflatnum)
|
||||
{
|
||||
drawsky = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef R_FAKEFLOORS
|
||||
|
@ -5601,7 +5629,7 @@ static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing)
|
|||
// ==========================================================================
|
||||
//
|
||||
// ==========================================================================
|
||||
static void HWR_DrawSkyBackground(player_t *player)
|
||||
static void HWR_DrawSkyBackground(void)
|
||||
{
|
||||
FOutVector v[4];
|
||||
angle_t angle;
|
||||
|
@ -5609,18 +5637,18 @@ static void HWR_DrawSkyBackground(player_t *player)
|
|||
float aspectratio;
|
||||
float angleturn;
|
||||
|
||||
// 3--2
|
||||
// | /|
|
||||
// |/ |
|
||||
// 0--1
|
||||
|
||||
(void)player;
|
||||
HWR_GetTexture(skytexture);
|
||||
aspectratio = (float)vid.width/(float)vid.height;
|
||||
|
||||
//Hurdler: the sky is the only texture who need 4.0f instead of 1.0
|
||||
// because it's called just after clearing the screen
|
||||
// and thus, the near clipping plane is set to 3.99
|
||||
// Sryder: Just use the near clipping plane value then
|
||||
|
||||
// 3--2
|
||||
// | /|
|
||||
// |/ |
|
||||
// 0--1
|
||||
v[0].x = v[3].x = -ZCLIP_PLANE-1;
|
||||
v[1].x = v[2].x = ZCLIP_PLANE+1;
|
||||
v[0].y = v[1].y = -ZCLIP_PLANE-1;
|
||||
|
@ -5635,7 +5663,6 @@ static void HWR_DrawSkyBackground(player_t *player)
|
|||
// The only time this will probably be an issue is when a sky wider than 1024 is used as a sky AND a regular wall texture
|
||||
|
||||
angle = (dup_viewangle + gr_xtoviewangle[0]);
|
||||
|
||||
dimensionmultiply = ((float)textures[skytexture]->width/256.0f);
|
||||
|
||||
v[0].sow = v[3].sow = ((float) angle / ((ANGLE_90-1)*dimensionmultiply));
|
||||
|
@ -5643,10 +5670,13 @@ static void HWR_DrawSkyBackground(player_t *player)
|
|||
|
||||
// Y
|
||||
angle = aimingangle;
|
||||
|
||||
aspectratio = (float)vid.width/(float)vid.height;
|
||||
dimensionmultiply = ((float)textures[skytexture]->height/(128.0f*aspectratio));
|
||||
angleturn = (((float)ANGLE_45-1.0f)*aspectratio)*dimensionmultiply;
|
||||
|
||||
if (splitscreen)
|
||||
{
|
||||
dimensionmultiply *= 2;
|
||||
angle *= 2;
|
||||
}
|
||||
|
||||
// Middle of the sky should always be at angle 0
|
||||
// need to keep correct aspect ratio with X
|
||||
|
@ -5662,6 +5692,8 @@ static void HWR_DrawSkyBackground(player_t *player)
|
|||
v[0].tow = v[1].tow = -(0.5f-(0.5f/dimensionmultiply));
|
||||
}
|
||||
|
||||
angleturn = (((float)ANGLE_45-1.0f)*aspectratio)*dimensionmultiply;
|
||||
|
||||
if (angle > ANGLE_180) // Do this because we don't want the sky to suddenly teleport when crossing over 0 to 360 and vice versa
|
||||
{
|
||||
angle = InvAngle(angle);
|
||||
|
@ -5825,12 +5857,8 @@ if (0)
|
|||
HWD.pfnSetSpecialState(HWD_SET_FOG_MODE, 0); // Turn it off
|
||||
}
|
||||
|
||||
#ifndef _NDS
|
||||
if (drawsky)
|
||||
HWR_DrawSkyBackground(player);
|
||||
#else
|
||||
(void)HWR_DrawSkyBackground;
|
||||
#endif
|
||||
HWR_DrawSkyBackground();
|
||||
|
||||
//Hurdler: it doesn't work in splitscreen mode
|
||||
drawsky = splitscreen;
|
||||
|
@ -6046,12 +6074,8 @@ if (0)
|
|||
HWD.pfnSetSpecialState(HWD_SET_FOG_MODE, 0); // Turn it off
|
||||
}
|
||||
|
||||
#ifndef _NDS
|
||||
if (!skybox && drawsky) // Don't draw the regular sky if there's a skybox
|
||||
HWR_DrawSkyBackground(player);
|
||||
#else
|
||||
(void)HWR_DrawSkyBackground;
|
||||
#endif
|
||||
HWR_DrawSkyBackground();
|
||||
|
||||
//Hurdler: it doesn't work in splitscreen mode
|
||||
drawsky = splitscreen;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (C) 1998-2006 by Sonic Team Junior.
|
||||
// Copyright (C) 1998-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2011-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 2011-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2011-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 2011-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
70
src/i_tcp.c
70
src/i_tcp.c
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -713,14 +713,29 @@ static boolean SOCK_CanGet(void)
|
|||
#endif
|
||||
|
||||
#ifndef NONET
|
||||
static void SOCK_Send(void)
|
||||
static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr)
|
||||
{
|
||||
ssize_t c = ERRSOCKET;
|
||||
socklen_t d4 = (socklen_t)sizeof(struct sockaddr_in);
|
||||
#ifdef HAVE_IPV6
|
||||
socklen_t d6 = (socklen_t)sizeof(struct sockaddr_in6);
|
||||
#endif
|
||||
socklen_t d, da = (socklen_t)sizeof(mysockaddr_t);
|
||||
|
||||
switch (sockaddr->any.sa_family)
|
||||
{
|
||||
case AF_INET: d = d4; break;
|
||||
#ifdef HAVE_IPV6
|
||||
case AF_INET6: d = d6; break;
|
||||
#endif
|
||||
default: d = da; break;
|
||||
}
|
||||
|
||||
return sendto(socket, (char *)&doomcom->data, doomcom->datalength, 0, &sockaddr->any, d);
|
||||
}
|
||||
|
||||
static void SOCK_Send(void)
|
||||
{
|
||||
ssize_t c = ERRSOCKET;
|
||||
size_t i, j;
|
||||
|
||||
if (!nodeconnected[doomcom->remotenode])
|
||||
|
@ -733,19 +748,7 @@ static void SOCK_Send(void)
|
|||
for (j = 0; j < broadcastaddresses; j++)
|
||||
{
|
||||
if (myfamily[i] == broadcastaddress[j].any.sa_family)
|
||||
{
|
||||
if (broadcastaddress[i].any.sa_family == AF_INET)
|
||||
d = d4;
|
||||
#ifdef HAVE_IPV6
|
||||
else if (broadcastaddress[i].any.sa_family == AF_INET6)
|
||||
d = d6;
|
||||
#endif
|
||||
else
|
||||
d = da;
|
||||
|
||||
c = sendto(mysockets[i], (char *)&doomcom->data, doomcom->datalength, 0,
|
||||
&broadcastaddress[j].any, d);
|
||||
}
|
||||
SOCK_SendToAddr(mysockets[i], &broadcastaddress[j]);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
@ -755,35 +758,13 @@ static void SOCK_Send(void)
|
|||
for (i = 0; i < mysocketses; i++)
|
||||
{
|
||||
if (myfamily[i] == clientaddress[doomcom->remotenode].any.sa_family)
|
||||
{
|
||||
if (clientaddress[doomcom->remotenode].any.sa_family == AF_INET)
|
||||
d = d4;
|
||||
#ifdef HAVE_IPV6
|
||||
else if (clientaddress[doomcom->remotenode].any.sa_family == AF_INET6)
|
||||
d = d6;
|
||||
#endif
|
||||
else
|
||||
d = da;
|
||||
|
||||
sendto(mysockets[i], (char *)&doomcom->data, doomcom->datalength, 0,
|
||||
&clientaddress[doomcom->remotenode].any, d);
|
||||
}
|
||||
SOCK_SendToAddr(mysockets[i], &clientaddress[doomcom->remotenode]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (clientaddress[doomcom->remotenode].any.sa_family == AF_INET)
|
||||
d = d4;
|
||||
#ifdef HAVE_IPV6
|
||||
else if (clientaddress[doomcom->remotenode].any.sa_family == AF_INET6)
|
||||
d = d6;
|
||||
#endif
|
||||
else
|
||||
d = da;
|
||||
|
||||
c = sendto(nodesocket[doomcom->remotenode], (char *)&doomcom->data, doomcom->datalength, 0,
|
||||
&clientaddress[doomcom->remotenode].any, d);
|
||||
c = SOCK_SendToAddr(nodesocket[doomcom->remotenode], &clientaddress[doomcom->remotenode]);
|
||||
}
|
||||
|
||||
if (c == ERRSOCKET)
|
||||
|
@ -1075,7 +1056,7 @@ static boolean UDP_Socket(void)
|
|||
if (gaie == 0)
|
||||
{
|
||||
runp = ai;
|
||||
while (runp != NULL)
|
||||
while (runp != NULL && s < MAXNETNODES+1)
|
||||
{
|
||||
memcpy(&clientaddress[s], runp->ai_addr, runp->ai_addrlen);
|
||||
s++;
|
||||
|
@ -1090,12 +1071,15 @@ static boolean UDP_Socket(void)
|
|||
clientaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); //GetLocalAddress(); // my own ip
|
||||
s++;
|
||||
}
|
||||
|
||||
s = 0;
|
||||
|
||||
// setup broadcast adress to BROADCASTADDR entry
|
||||
gaie = I_getaddrinfo("255.255.255.255", "0", &hints, &ai);
|
||||
if (gaie == 0)
|
||||
{
|
||||
runp = ai;
|
||||
while (runp != NULL)
|
||||
while (runp != NULL && s < MAXNETNODES+1)
|
||||
{
|
||||
memcpy(&broadcastaddress[s], runp->ai_addr, runp->ai_addrlen);
|
||||
s++;
|
||||
|
@ -1118,7 +1102,7 @@ static boolean UDP_Socket(void)
|
|||
if (gaie == 0)
|
||||
{
|
||||
runp = ai;
|
||||
while (runp != NULL)
|
||||
while (runp != NULL && s < MAXNETNODES+1)
|
||||
{
|
||||
memcpy(&broadcastaddress[s], runp->ai_addr, runp->ai_addrlen);
|
||||
s++;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -12733,7 +12733,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
10, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
|
||||
MF_SCENERY|MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 1998-2000 by DooM Legacy Team.
|
||||
// Copyright (C) 1999-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 1999-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2012-2016 by John "JTE" Muniz.
|
||||
// Copyright (C) 2012-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 2012-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
@ -14,6 +14,9 @@
|
|||
#ifdef HAVE_BLUA
|
||||
#include "p_local.h"
|
||||
#include "p_setup.h" // So we can have P_SetupLevelSky
|
||||
#ifdef ESLOPE
|
||||
#include "p_slopes.h" // P_GetZAt
|
||||
#endif
|
||||
#include "z_zone.h"
|
||||
#include "r_main.h"
|
||||
#include "r_things.h"
|
||||
|
@ -1560,6 +1563,24 @@ static int lib_evCrumbleChain(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef ESLOPE
|
||||
// P_SLOPES
|
||||
////////////
|
||||
|
||||
static int lib_pGetZAt(lua_State *L)
|
||||
{
|
||||
pslope_t *slope = *((pslope_t **)luaL_checkudata(L, 1, META_SLOPE));
|
||||
fixed_t x = luaL_checkfixed(L, 2);
|
||||
fixed_t y = luaL_checkfixed(L, 3);
|
||||
//HUDSAFE
|
||||
if (!slope)
|
||||
return LUA_ErrInvalid(L, "pslope_t");
|
||||
|
||||
lua_pushfixed(L, P_GetZAt(slope, x, y));
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
// R_DEFS
|
||||
////////////
|
||||
|
||||
|
@ -2127,6 +2148,11 @@ static luaL_Reg lib[] = {
|
|||
{"P_StartQuake",lib_pStartQuake},
|
||||
{"EV_CrumbleChain",lib_evCrumbleChain},
|
||||
|
||||
#ifdef ESLOPE
|
||||
// p_slopes
|
||||
{"P_GetZAt",lib_pGetZAt},
|
||||
#endif
|
||||
|
||||
// r_defs
|
||||
{"R_PointToAngle",lib_rPointToAngle},
|
||||
{"R_PointToAngle2",lib_rPointToAngle2},
|
||||
|
|
266
src/lua_blockmaplib.c
Normal file
266
src/lua_blockmaplib.c
Normal file
|
@ -0,0 +1,266 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2016 by Iestyn "Monster Iestyn" Jealous.
|
||||
// Copyright (C) 2016 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
// See the 'LICENSE' file for more details.
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \file lua_blockmaplib.c
|
||||
/// \brief blockmap library for Lua scripting
|
||||
|
||||
#include "doomdef.h"
|
||||
#ifdef HAVE_BLUA
|
||||
#include "p_local.h"
|
||||
#include "r_main.h" // validcount
|
||||
#include "lua_script.h"
|
||||
#include "lua_libs.h"
|
||||
//#include "lua_hud.h" // hud_running errors
|
||||
|
||||
static const char *const search_opt[] = {
|
||||
"objects",
|
||||
"lines",
|
||||
NULL};
|
||||
|
||||
// a quickly-made function pointer typedef used by lib_searchBlockmap...
|
||||
// return values:
|
||||
// 0 - normal, no interruptions
|
||||
// 1 - stop search through current block
|
||||
// 2 - stop search completely
|
||||
typedef UINT8 (*blockmap_func)(lua_State *, INT32, INT32, mobj_t *);
|
||||
|
||||
static boolean blockfuncerror = false; // errors should only print once per search blockmap call
|
||||
|
||||
// Helper function for "objects" search
|
||||
static UINT8 lib_searchBlockmap_Objects(lua_State *L, INT32 x, INT32 y, mobj_t *thing)
|
||||
{
|
||||
mobj_t *mobj, *bnext = NULL;
|
||||
|
||||
if (x < 0 || y < 0 || x >= bmapwidth || y >= bmapheight)
|
||||
return 0;
|
||||
|
||||
// Check interaction with the objects in the blockmap.
|
||||
for (mobj = blocklinks[y*bmapwidth + x]; mobj; mobj = bnext)
|
||||
{
|
||||
P_SetTarget(&bnext, mobj->bnext); // We want to note our reference to bnext here incase it is MF_NOTHINK and gets removed!
|
||||
if (mobj == thing)
|
||||
continue; // our thing just found itself, so move on
|
||||
lua_pushvalue(L, 1); // push function
|
||||
LUA_PushUserdata(L, thing, META_MOBJ);
|
||||
LUA_PushUserdata(L, mobj, META_MOBJ);
|
||||
if (lua_pcall(gL, 2, 1, 0)) {
|
||||
if (!blockfuncerror || cv_debug & DBG_LUA)
|
||||
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
|
||||
lua_pop(gL, 1);
|
||||
blockfuncerror = true;
|
||||
return 0; // *shrugs*
|
||||
}
|
||||
if (!lua_isnil(gL, -1))
|
||||
{ // if nil, continue
|
||||
if (lua_toboolean(gL, -1))
|
||||
return 2; // stop whole search
|
||||
else
|
||||
return 1; // stop block search
|
||||
}
|
||||
lua_pop(gL, 1);
|
||||
if (P_MobjWasRemoved(thing) // func just popped our thing, cannot continue.
|
||||
|| (bnext && P_MobjWasRemoved(bnext))) // func just broke blockmap chain, cannot continue.
|
||||
{
|
||||
P_SetTarget(&bnext, NULL);
|
||||
return (P_MobjWasRemoved(thing)) ? 2 : 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Helper function for "lines" search
|
||||
static UINT8 lib_searchBlockmap_Lines(lua_State *L, INT32 x, INT32 y, mobj_t *thing)
|
||||
{
|
||||
INT32 offset;
|
||||
const INT32 *list; // Big blockmap
|
||||
#ifdef POLYOBJECTS
|
||||
polymaplink_t *plink; // haleyjd 02/22/06
|
||||
#endif
|
||||
line_t *ld;
|
||||
|
||||
if (x < 0 || y < 0 || x >= bmapwidth || y >= bmapheight)
|
||||
return 0;
|
||||
|
||||
offset = y*bmapwidth + x;
|
||||
|
||||
#ifdef POLYOBJECTS
|
||||
// haleyjd 02/22/06: consider polyobject lines
|
||||
plink = polyblocklinks[offset];
|
||||
|
||||
while (plink)
|
||||
{
|
||||
polyobj_t *po = plink->po;
|
||||
|
||||
if (po->validcount != validcount) // if polyobj hasn't been checked
|
||||
{
|
||||
size_t i;
|
||||
po->validcount = validcount;
|
||||
|
||||
for (i = 0; i < po->numLines; ++i)
|
||||
{
|
||||
if (po->lines[i]->validcount == validcount) // line has been checked
|
||||
continue;
|
||||
po->lines[i]->validcount = validcount;
|
||||
|
||||
lua_pushvalue(L, 1);
|
||||
LUA_PushUserdata(L, thing, META_MOBJ);
|
||||
LUA_PushUserdata(L, po->lines[i], META_LINE);
|
||||
if (lua_pcall(gL, 2, 1, 0)) {
|
||||
if (!blockfuncerror || cv_debug & DBG_LUA)
|
||||
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
|
||||
lua_pop(gL, 1);
|
||||
blockfuncerror = true;
|
||||
return 0; // *shrugs*
|
||||
}
|
||||
if (!lua_isnil(gL, -1))
|
||||
{ // if nil, continue
|
||||
if (lua_toboolean(gL, -1))
|
||||
return 2; // stop whole search
|
||||
else
|
||||
return 1; // stop block search
|
||||
}
|
||||
lua_pop(gL, 1);
|
||||
if (P_MobjWasRemoved(thing))
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
plink = (polymaplink_t *)(plink->link.next);
|
||||
}
|
||||
#endif
|
||||
|
||||
offset = *(blockmap + offset); // offset = blockmap[y*bmapwidth+x];
|
||||
|
||||
// First index is really empty, so +1 it.
|
||||
for (list = blockmaplump + offset + 1; *list != -1; list++)
|
||||
{
|
||||
ld = &lines[*list];
|
||||
|
||||
if (ld->validcount == validcount)
|
||||
continue; // Line has already been checked.
|
||||
|
||||
ld->validcount = validcount;
|
||||
|
||||
lua_pushvalue(L, 1);
|
||||
LUA_PushUserdata(L, thing, META_MOBJ);
|
||||
LUA_PushUserdata(L, ld, META_LINE);
|
||||
if (lua_pcall(gL, 2, 1, 0)) {
|
||||
if (!blockfuncerror || cv_debug & DBG_LUA)
|
||||
CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
|
||||
lua_pop(gL, 1);
|
||||
blockfuncerror = true;
|
||||
return 0; // *shrugs*
|
||||
}
|
||||
if (!lua_isnil(gL, -1))
|
||||
{ // if nil, continue
|
||||
if (lua_toboolean(gL, -1))
|
||||
return 2; // stop whole search
|
||||
else
|
||||
return 1; // stop block search
|
||||
}
|
||||
lua_pop(gL, 1);
|
||||
if (P_MobjWasRemoved(thing))
|
||||
return 2;
|
||||
}
|
||||
return 0; // Everything was checked.
|
||||
}
|
||||
|
||||
// The searchBlockmap function
|
||||
// arguments: searchBlockmap(searchtype, function, mobj, [x1, x2, y1, y2])
|
||||
// return value:
|
||||
// true = search completely uninteruppted,
|
||||
// false = searching of at least one block stopped mid-way (including if the whole search was stopped)
|
||||
static int lib_searchBlockmap(lua_State *L)
|
||||
{
|
||||
int searchtype = luaL_checkoption(L, 1, "objects", search_opt);
|
||||
int n;
|
||||
mobj_t *mobj;
|
||||
INT32 xl, xh, yl, yh, bx, by;
|
||||
fixed_t x1, x2, y1, y2;
|
||||
boolean retval = true;
|
||||
UINT8 funcret = 0;
|
||||
blockmap_func searchFunc;
|
||||
|
||||
lua_remove(L, 1); // remove searchtype, stack is now function, mobj, [x1, x2, y1, y2]
|
||||
luaL_checktype(L, 1, LUA_TFUNCTION);
|
||||
|
||||
switch (searchtype)
|
||||
{
|
||||
case 0: // "objects"
|
||||
default:
|
||||
searchFunc = lib_searchBlockmap_Objects;
|
||||
break;
|
||||
case 1: // "lines"
|
||||
searchFunc = lib_searchBlockmap_Lines;
|
||||
break;
|
||||
}
|
||||
|
||||
// the mobj we are searching around, the "calling" mobj we could say
|
||||
mobj = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
|
||||
if (!mobj)
|
||||
return LUA_ErrInvalid(L, "mobj_t");
|
||||
|
||||
n = lua_gettop(L);
|
||||
|
||||
if (n > 2) // specific x/y ranges have been supplied
|
||||
{
|
||||
if (n < 6)
|
||||
return luaL_error(L, "arguments 4 to 6 not all given (expected 4 fixed-point integers)");
|
||||
|
||||
x1 = luaL_checkfixed(L, 3);
|
||||
x2 = luaL_checkfixed(L, 4);
|
||||
y1 = luaL_checkfixed(L, 5);
|
||||
y2 = luaL_checkfixed(L, 6);
|
||||
}
|
||||
else // mobj and function only - search around mobj's radius by default
|
||||
{
|
||||
fixed_t radius = mobj->radius + MAXRADIUS;
|
||||
x1 = mobj->x - radius;
|
||||
x2 = mobj->x + radius;
|
||||
y1 = mobj->y - radius;
|
||||
y2 = mobj->y + radius;
|
||||
}
|
||||
lua_settop(L, 2); // pop everything except function, mobj
|
||||
|
||||
xl = (unsigned)(x1 - bmaporgx)>>MAPBLOCKSHIFT;
|
||||
xh = (unsigned)(x2 - bmaporgx)>>MAPBLOCKSHIFT;
|
||||
yl = (unsigned)(y1 - bmaporgy)>>MAPBLOCKSHIFT;
|
||||
yh = (unsigned)(y2 - bmaporgy)>>MAPBLOCKSHIFT;
|
||||
|
||||
BMBOUNDFIX(xl, xh, yl, yh);
|
||||
|
||||
blockfuncerror = false; // reset
|
||||
validcount++;
|
||||
for (bx = xl; bx <= xh; bx++)
|
||||
for (by = yl; by <= yh; by++)
|
||||
{
|
||||
funcret = searchFunc(L, bx, by, mobj);
|
||||
// return value of searchFunc determines searchFunc's return value and/or when to stop
|
||||
if (funcret == 2){ // stop whole search
|
||||
lua_pushboolean(L, false); // return false
|
||||
return 1;
|
||||
}
|
||||
else if (funcret == 1) // search was interrupted for this block
|
||||
retval = false; // this changes the return value, but doesn't stop the whole search
|
||||
// else don't do anything, continue as normal
|
||||
if (P_MobjWasRemoved(mobj)){ // ...unless the original object was removed
|
||||
lua_pushboolean(L, false); // in which case we have to stop now regardless
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
lua_pushboolean(L, retval);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int LUA_BlockmapLib(lua_State *L)
|
||||
{
|
||||
lua_register(L, "searchBlockmap", lib_searchBlockmap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,7 +1,7 @@
|
|||
// SONIC ROBO BLAST 2
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) 2012-2016 by John "JTE" Muniz.
|
||||
// Copyright (C) 2012-2016 by Sonic Team Junior.
|
||||
// Copyright (C) 2012-2018 by Sonic Team Junior.
|
||||
//
|
||||
// This program is free software distributed under the
|
||||
// terms of the GNU General Public License, version 2.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue