mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 21:31:46 +00:00
Merge branch 'public-musicplus-core' into public-musicplus-libopenmpt
This commit is contained in:
commit
6166fad045
697 changed files with 18998 additions and 4647 deletions
17
.travis.yml
17
.travis.yml
|
@ -70,8 +70,23 @@ 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:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libsdl2-mixer-dev
|
||||
- libpng-dev
|
||||
- libgl1-mesa-dev
|
||||
- libgme-dev
|
||||
- p7zip-full
|
||||
- gcc-8
|
||||
compiler: gcc-8
|
||||
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
|
||||
#clang version 3.5.0 (tags/RELEASE_350/final)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(SRB2
|
||||
VERSION 2.1.20
|
||||
VERSION 2.1.23
|
||||
LANGUAGES C)
|
||||
|
||||
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
|
||||
|
@ -98,10 +98,10 @@ add_subdirectory(assets)
|
|||
## config.h generation
|
||||
set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
|
||||
include(GitUtilities)
|
||||
git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}")
|
||||
git_latest_commit(SRB2_COMP_COMMIT "${CMAKE_SOURCE_DIR}")
|
||||
git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}")
|
||||
set(SRB2_COMP_BRANCH "${SRB2_GIT_BRANCH}")
|
||||
set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}")
|
||||
set(SRB2_COMP_REVISION "${SRB2_COMP_COMMIT}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
|
||||
|
||||
##### PACKAGE CONFIGURATION #####
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
- libupnp (Linux/OS X only)
|
||||
- libgme (Linux/OS X only)
|
||||
|
||||
Warning: 64-bit builds are not netgame compatible with 32-bit builds. Use at your own risk.
|
||||
|
||||
## Compiling
|
||||
|
||||
See [SRB2 Wiki/Source code compiling](http://wiki.srb2.org/wiki/Source_code_compiling)
|
||||
|
|
36
SRB2.cbp
36
SRB2.cbp
|
@ -1174,6 +1174,39 @@ HW3SOUND for 3D hardware sound support
|
|||
<Option target="Debug Mingw64/DirectX" />
|
||||
<Option target="Release Mingw64/DirectX" />
|
||||
</Unit>
|
||||
<Unit filename="src/hardware/hw_clip.c">
|
||||
<Option compilerVar="CC" />
|
||||
<Option target="Debug Native/SDL" />
|
||||
<Option target="Release Native/SDL" />
|
||||
<Option target="Debug Mingw/SDL" />
|
||||
<Option target="Release Mingw/SDL" />
|
||||
<Option target="Debug Mingw/DirectX" />
|
||||
<Option target="Release Mingw/DirectX" />
|
||||
<Option target="Debug Any/Dummy" />
|
||||
<Option target="Release Any/Dummy" />
|
||||
<Option target="Debug Linux/SDL" />
|
||||
<Option target="Release Linux/SDL" />
|
||||
<Option target="Debug Mingw64/SDL" />
|
||||
<Option target="Release Mingw64/SDL" />
|
||||
<Option target="Debug Mingw64/DirectX" />
|
||||
<Option target="Release Mingw64/DirectX" />
|
||||
</Unit>
|
||||
<Unit filename="src/hardware/hw_clip.h">
|
||||
<Option target="Debug Native/SDL" />
|
||||
<Option target="Release Native/SDL" />
|
||||
<Option target="Debug Mingw/SDL" />
|
||||
<Option target="Release Mingw/SDL" />
|
||||
<Option target="Debug Mingw/DirectX" />
|
||||
<Option target="Release Mingw/DirectX" />
|
||||
<Option target="Debug Any/Dummy" />
|
||||
<Option target="Release Any/Dummy" />
|
||||
<Option target="Debug Linux/SDL" />
|
||||
<Option target="Release Linux/SDL" />
|
||||
<Option target="Debug Mingw64/SDL" />
|
||||
<Option target="Release Mingw64/SDL" />
|
||||
<Option target="Debug Mingw64/DirectX" />
|
||||
<Option target="Release Mingw64/DirectX" />
|
||||
</Unit>
|
||||
<Unit filename="src/hardware/hw_data.h">
|
||||
<Option target="Debug Native/SDL" />
|
||||
<Option target="Release Native/SDL" />
|
||||
|
@ -1516,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>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>Debug</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<GenerateDebugInformation>DebugFastLink</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>advapi32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version: 2.1.20.{branch}-{build}
|
||||
version: 2.1.23.{branch}-{build}
|
||||
os: MinGW
|
||||
|
||||
environment:
|
||||
|
|
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; \
|
||||
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/*"
|
Binary file not shown.
|
@ -29,3 +29,15 @@ function(git_current_branch variable path)
|
|||
|
||||
set(${variable} "${output}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_latest_commit variable path)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} "rev-parse" "--short" "HEAD"
|
||||
WORKING_DIRECTORY "${path}"
|
||||
RESULT_VARIABLE result
|
||||
OUTPUT_VARIABLE output
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
set(${variable} "${output}" PARENT_SCOPE)
|
||||
endfunction()
|
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.23~9) trusty; urgency=high
|
||||
|
||||
* SRB2 v2.1.23 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.23)
|
||||
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.23), 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
|
||||
|
|
30
debian/rules
vendored
30
debian/rules
vendored
|
@ -57,21 +57,33 @@ SECTION = Games/Action
|
|||
EXENAME = srb2
|
||||
DBGNAME = debug/$(EXENAME)
|
||||
|
||||
PKGDIR = usr/games
|
||||
PKGDIR = usr/games/SRB2
|
||||
DBGDIR = usr/lib/debug/$(PKGDIR)
|
||||
LINKDIR = usr/games
|
||||
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 +112,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
|
||||
|
@ -122,7 +134,7 @@ binary: binary-arch
|
|||
# dh_installcron
|
||||
# dh_installinfo
|
||||
# dh_installman
|
||||
# dh_link
|
||||
dh_link $(PKGDIR)/$(EXENAME) $(LINKDIR)/$(EXENAME)
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
|
@ -133,6 +145,8 @@ binary: binary-arch
|
|||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-arch
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(DIR)/src $(MAKEARGS) clean cleandep
|
||||
$(RM) $(BINDIR)/*
|
||||
|
@ -145,4 +159,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
|
||||
|
|
43
libs/DLL-README.txt
Normal file
43
libs/DLL-README.txt
Normal file
|
@ -0,0 +1,43 @@
|
|||
# SRB2 - Which DLLs do I need to bundle?
|
||||
|
||||
Updated 12/4/2018 (v2.1.21)
|
||||
|
||||
Here are the required DLLs, per build. For each architecture, copy all the binaries from these folders:
|
||||
|
||||
* libs\dll-binaries\[i686/x86_64]
|
||||
* libs\SDL2\[i686/x86_64]...\bin
|
||||
* libs\SDL2_mixer\[i686/x86_64]...\bin
|
||||
|
||||
and don't forget to build r_opengl.dll for srb2dd.
|
||||
|
||||
## srb2win, 32-bit
|
||||
|
||||
* libs\dll-binaries\i686\exchndl.dll
|
||||
* libs\dll-binaries\i686\libgme.dll
|
||||
* libs\dll-binaries\i686\mgwhelp.dll (depend for exchndl.dll)
|
||||
* libs\SDL2\i686-w64-mingw32\bin\SDL2.dll
|
||||
* libs\SDL2_mixer\i686-w64-mingw32\bin\*.dll (get everything)
|
||||
|
||||
## srb2win, 64-bit
|
||||
|
||||
* libs\dll-binaries\x86_64\exchndl.dll
|
||||
* libs\dll-binaries\x86_64\libgme.dll
|
||||
* libs\dll-binaries\x86_64\mgwhelp.dll (depend for exchndl.dll)
|
||||
* libs\SDL2\x86_64-w64-mingw32\bin\SDL2.dll
|
||||
* libs\SDL2_mixer\x86_64-w64-mingw32\bin\*.dll (get everything)
|
||||
|
||||
## srb2dd, 32-bit
|
||||
|
||||
* libs\dll-binaries\i686\exchndl.dll
|
||||
* libs\dll-binaries\i686\fmodex.dll
|
||||
* libs\dll-binaries\i686\libgme.dll
|
||||
* libs\dll-binaries\i686\mgwhelp.dll (depend for exchndl.dll)
|
||||
* r_opengl.dll (build this from make)
|
||||
|
||||
## srb2dd, 64-bit
|
||||
|
||||
* libs\dll-binaries\x86_64\exchndl.dll
|
||||
* libs\dll-binaries\x86_64\fmodex.dll
|
||||
* libs\dll-binaries\x86_64\libgme.dll
|
||||
* libs\dll-binaries\x86_64\mgwhelp.dll (depend for exchndl.dll)
|
||||
* r_opengl.dll (build this from make)
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#
|
||||
# Makefile for installing the mingw32 version of the SDL library
|
||||
|
||||
CROSS_PATH := /usr/local/cross-tools
|
||||
CROSS_PATH := /usr/local
|
||||
ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32
|
||||
|
||||
all install:
|
||||
@echo "Type \"make native\" to install 32-bit to /usr"
|
||||
@echo "Type \"make cross\" to install 32-bit and 64-bit to CROSS_PATH ($(CROSS_PATH))"
|
||||
@echo "Type \"make cross\" to install 32-bit and 64-bit to $(CROSS_PATH)"
|
||||
|
||||
native:
|
||||
make install-package arch=i686-w64-mingw32 prefix=/usr
|
||||
|
@ -22,6 +22,7 @@ install-package:
|
|||
sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/bin/sdl2-config >$(prefix)/bin/sdl2-config; \
|
||||
chmod 755 $(prefix)/bin/sdl2-config; \
|
||||
sed "s|^libdir=.*|libdir=\'$(prefix)/lib\'|" <$(arch)/lib/libSDL2.la >$(prefix)/lib/libSDL2.la; \
|
||||
sed "s|^libdir=.*|libdir=\'$(prefix)/lib\'|" <$(arch)/lib/libSDL2main.la >$(prefix)/lib/libSDL2main.la; \
|
||||
sed "s|^prefix=.*|prefix=$(prefix)|" <$(arch)/lib/pkgconfig/sdl2.pc >$(prefix)/lib/pkgconfig/sdl2.pc; \
|
||||
else \
|
||||
echo "*** ERROR: $(arch) or $(prefix) does not exist!"; \
|
||||
|
|
15
libs/SDL2/SRB2NOTE.txt
Normal file
15
libs/SDL2/SRB2NOTE.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
# SDL Development Libaries
|
||||
|
||||
Download both the VC and MinGW packages and extract them here.
|
||||
|
||||
https://www.libsdl.org/download-2.0.php
|
||||
|
||||
## VC Package
|
||||
|
||||
* include
|
||||
* lib
|
||||
|
||||
## MinGW Package
|
||||
|
||||
* i686-w64-mingw32
|
||||
* x86_64-w64-mingw32
|
|
@ -1,6 +1,91 @@
|
|||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.9:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added a new sensor API, initialized by passing SDL_INIT_SENSOR to SDL_Init(), and defined in SDL_sensor.h
|
||||
* Added an event SDL_SENSORUPDATE which is sent when a sensor is updated
|
||||
* Added SDL_GetDisplayOrientation() to return the current display orientation
|
||||
* Added an event SDL_DISPLAYEVENT which is sent when the display orientation changes
|
||||
* Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. (Thanks to Valve for contributing the PS4 and Nintendo Switch Pro controller support)
|
||||
* Added support for many other popular game controllers
|
||||
* Added SDL_JoystickGetDevicePlayerIndex(), SDL_JoystickGetPlayerIndex(), and SDL_GameControllerGetPlayerIndex() to get the player index for a controller. For XInput controllers this returns the XInput index for the controller.
|
||||
* Added SDL_GameControllerRumble() and SDL_JoystickRumble() which allow simple rumble without using the haptics API
|
||||
* Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
|
||||
* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_TIME to control the mouse double-click time
|
||||
* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to control the mouse double-click radius, in pixels
|
||||
* Added SDL_HasColorKey() to return whether a surface has a colorkey active
|
||||
* Added SDL_HasAVX512F() to return whether the CPU has AVX-512F features
|
||||
* Added SDL_IsTablet() to return whether the application is running on a tablet
|
||||
* Added SDL_THREAD_PRIORITY_TIME_CRITICAL for threads that must run at the highest priority
|
||||
|
||||
Mac OS X:
|
||||
* Fixed black screen at start on Mac OS X Mojave
|
||||
|
||||
Linux:
|
||||
* Added SDL_LinuxSetThreadPriority() to allow adjusting the thread priority of native threads using RealtimeKit if available.
|
||||
|
||||
iOS:
|
||||
* Fixed Asian IME input
|
||||
|
||||
Android:
|
||||
* Updated required Android SDK to API 26, to match Google's new App Store requirements
|
||||
* Added support for wired USB Xbox, PS4, and Nintendo Switch Pro controllers
|
||||
* Added support for relative mouse mode on Android 7.0 and newer (except where it's broken, on Chromebooks and when in DeX mode with Samsung Experience 9.0)
|
||||
* Added support for custom mouse cursors on Android 7.0 and newer
|
||||
* Added the hint SDL_HINT_ANDROID_TRAP_BACK_BUTTON to control whether the back button will back out of the app (the default) or be passed to the application as SDL_SCANCODE_AC_BACK
|
||||
* Added SDL_AndroidBackButton() to trigger the Android system back button behavior when handling the back button in the application
|
||||
* Added SDL_IsChromebook() to return whether the app is running in the Chromebook Android runtime
|
||||
* Added SDL_IsDeXMode() to return whether the app is running while docked in the Samsung DeX
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.8:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added SDL_fmod() and SDL_log10()
|
||||
* Each of the SDL math functions now has the corresponding float version
|
||||
* Added SDL_SetYUVConversionMode() and SDL_GetYUVConversionMode() to control the formula used when converting to and from YUV colorspace. The options are JPEG, BT.601, and BT.709
|
||||
|
||||
Windows:
|
||||
* Implemented WASAPI support on Windows UWP and removed the deprecated XAudio2 implementation
|
||||
* Added resampling support on WASAPI on Windows 7 and above
|
||||
|
||||
Windows UWP:
|
||||
* Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on
|
||||
|
||||
Mac OS X:
|
||||
* Added support for the Vulkan SDK for Mac:
|
||||
https://www.lunarg.com/lunarg-releases-vulkan-sdk-1-0-69-0-for-mac/
|
||||
* Added support for OpenGL ES using ANGLE when it's available
|
||||
|
||||
Mac OS X / iOS / tvOS:
|
||||
* Added a Metal 2D render implementation
|
||||
* Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder() to insert your own drawing into SDL rendering when using the Metal implementation
|
||||
|
||||
iOS:
|
||||
* Added the hint SDL_HINT_IOS_HIDE_HOME_INDICATOR to control whether the home indicator bar on iPhone X should be hidden. This defaults to dimming the indicator for fullscreen applications and showing the indicator for windowed applications.
|
||||
|
||||
iOS / Android:
|
||||
* Added the hint SDL_HINT_RETURN_KEY_HIDES_IME to control whether the return key on the software keyboard should hide the keyboard or send a key event (the default)
|
||||
|
||||
Android:
|
||||
* SDL now supports building with Android Studio and Gradle by default, and the old Ant project is available in android-project-ant
|
||||
* SDL now requires the API 19 SDK to build, but can still target devices down to API 14 (Android 4.0.1)
|
||||
* Added SDL_IsAndroidTV() to tell whether the application is running on Android TV
|
||||
|
||||
Android / tvOS:
|
||||
* Added the hint SDL_HINT_TV_REMOTE_AS_JOYSTICK to control whether TV remotes should be listed as joystick devices (the default) or send keyboard events.
|
||||
|
||||
Linux:
|
||||
* Added the hint SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR to control whether the X server should skip the compositor for the SDL application. This defaults to "1"
|
||||
* Added the hint SDL_HINT_VIDEO_DOUBLE_BUFFER to control whether the Raspberry Pi and KMSDRM video drivers should use double or triple buffering (the default)
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.7:
|
||||
---------------------------------------------------------------------------
|
||||
|
|
|
@ -4,20 +4,24 @@ Android
|
|||
Matt Styles wrote a tutorial on building SDL for Android with Visual Studio:
|
||||
http://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html
|
||||
|
||||
The rest of this README covers the old style build process.
|
||||
The rest of this README covers the Android gradle style build process.
|
||||
|
||||
If you are using the older ant build process, it is no longer officially
|
||||
supported, but you can use the "android-project-ant" directory as a template.
|
||||
|
||||
|
||||
================================================================================
|
||||
Requirements
|
||||
================================================================================
|
||||
|
||||
Android SDK (version 16 or later)
|
||||
Android SDK (version 26 or later)
|
||||
https://developer.android.com/sdk/index.html
|
||||
|
||||
Android NDK r7 or later
|
||||
Android NDK r15c or later
|
||||
https://developer.android.com/tools/sdk/ndk/index.html
|
||||
|
||||
Minimum API level supported by SDL: 10 (Android 2.3.3)
|
||||
Joystick support is available for API level >= 12 devices.
|
||||
Minimum API level supported by SDL: 14 (Android 4.0.1)
|
||||
|
||||
|
||||
================================================================================
|
||||
How the port works
|
||||
|
@ -31,15 +35,12 @@ Joystick support is available for API level >= 12 devices.
|
|||
- This eventually produces a standard Android .apk package
|
||||
|
||||
The Android Java code implements an "Activity" and can be found in:
|
||||
android-project/src/org/libsdl/app/SDLActivity.java
|
||||
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
|
||||
|
||||
The Java code loads your game code, the SDL shared library, and
|
||||
dispatches to native functions implemented in the SDL library:
|
||||
src/core/android/SDL_android.c
|
||||
|
||||
Your project must include some glue code that starts your main() routine:
|
||||
src/main/android/SDL_android_main.c
|
||||
|
||||
|
||||
================================================================================
|
||||
Building an app
|
||||
|
@ -74,71 +75,30 @@ For more complex projects, follow these instructions:
|
|||
|
||||
1. Copy the android-project directory wherever you want to keep your projects
|
||||
and rename it to the name of your project.
|
||||
2. Move or symlink this SDL directory into the "<project>/jni" directory
|
||||
3. Edit "<project>/jni/src/Android.mk" to include your source files
|
||||
4. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
|
||||
2. Move or symlink this SDL directory into the "<project>/app/jni" directory
|
||||
3. Edit "<project>/app/jni/src/Android.mk" to include your source files
|
||||
|
||||
If you want to use the Eclipse IDE, skip to the Eclipse section below.
|
||||
4a. If you want to use Android Studio, simply open your <project> directory and start building.
|
||||
|
||||
5. Create "<project>/local.properties" and use that to point to the Android SDK directory, by writing a line with the following form:
|
||||
|
||||
sdk.dir=PATH_TO_ANDROID_SDK
|
||||
|
||||
6. Run 'ant debug' in android/project. This compiles the .java and eventually
|
||||
creates a .apk with the native code embedded
|
||||
7. 'ant debug install' will push the apk to the device or emulator (if connected)
|
||||
4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
|
||||
|
||||
Here's an explanation of the files in the Android project, so you can customize them:
|
||||
|
||||
android-project/
|
||||
AndroidManifest.xml - package manifest. Among others, it contains the class name
|
||||
of the main Activity and the package name of the application.
|
||||
build.properties - empty
|
||||
build.xml - build description file, used by ant. The actual application name
|
||||
is specified here.
|
||||
default.properties - holds the target ABI for the application, android-10 and up
|
||||
project.properties - holds the target ABI for the application, android-10 and up
|
||||
local.properties - holds the SDK path, you should change this to the path to your SDK
|
||||
android-project/app
|
||||
build.gradle - build info including the application version and SDK
|
||||
src/main/AndroidManifest.xml - package manifest. Among others, it contains the class name of the main Activity and the package name of the application.
|
||||
jni/ - directory holding native code
|
||||
jni/Android.mk - Android makefile that can call recursively the Android.mk files
|
||||
in all subdirectories
|
||||
jni/Application.mk - Application JNI settings, including target platform and STL library
|
||||
jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories
|
||||
jni/SDL/ - (symlink to) directory holding the SDL library files
|
||||
jni/SDL/Android.mk - Android makefile for creating the SDL shared library
|
||||
jni/src/ - directory holding your C/C++ source
|
||||
jni/src/Android.mk - Android makefile that you should customize to include your
|
||||
source code and any library references
|
||||
res/ - directory holding resources for your application
|
||||
res/drawable-* - directories holding icons for different phone hardware. Could be
|
||||
one dir called "drawable".
|
||||
res/layout/main.xml - Usually contains a file main.xml, which declares the screen layout.
|
||||
We don't need it because we use the SDL video output.
|
||||
res/values/strings.xml - strings used in your application, including the application name
|
||||
shown on the phone.
|
||||
src/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding
|
||||
to SDL. Be very careful changing this, as the SDL library relies
|
||||
on this implementation.
|
||||
|
||||
|
||||
================================================================================
|
||||
Build an app with static linking of libSDL
|
||||
================================================================================
|
||||
|
||||
This build uses the Android NDK module system.
|
||||
|
||||
Instructions:
|
||||
1. Copy the android-project directory wherever you want to keep your projects
|
||||
and rename it to the name of your project.
|
||||
2. Rename "<project>/jni/src/Android_static.mk" to "<project>/jni/src/Android.mk"
|
||||
(overwrite the existing one)
|
||||
3. Edit "<project>/jni/src/Android.mk" to include your source files
|
||||
4. create and export an environment variable named NDK_MODULE_PATH that points
|
||||
to the parent directory of this SDL directory. e.g.:
|
||||
|
||||
export NDK_MODULE_PATH="$PWD"/..
|
||||
|
||||
5. Edit "<project>/src/org/libsdl/app/SDLActivity.java" and remove the call to
|
||||
System.loadLibrary("SDL2").
|
||||
6. Run 'ndk-build' (a script provided by the NDK). This compiles the C source
|
||||
jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references
|
||||
src/main/assets/ - directory holding asset files for your application
|
||||
src/main/res/ - directory holding resources for your application
|
||||
src/main/res/mipmap-* - directories holding icons for different phone hardware
|
||||
src/main/res/values/strings.xml - strings used in your application, including the application name
|
||||
src/main/java/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding to SDL. Be very careful changing this, as the SDL library relies on this implementation. You should instead subclass this for your application.
|
||||
|
||||
|
||||
================================================================================
|
||||
|
@ -171,25 +131,23 @@ Here's an example of a minimal class file:
|
|||
Then replace "SDLActivity" in AndroidManifest.xml with the name of your
|
||||
class, .e.g. "MyGame"
|
||||
|
||||
|
||||
================================================================================
|
||||
Customizing your application icon
|
||||
================================================================================
|
||||
|
||||
Conceptually changing your icon is just replacing the "ic_launcher.png" files in
|
||||
the drawable directories under the res directory. There are four directories for
|
||||
different screen sizes. These can be replaced with one dir called "drawable",
|
||||
containing an icon file "ic_launcher.png" with dimensions 48x48 or 72x72.
|
||||
the drawable directories under the res directory. There are several directories
|
||||
for different screen sizes.
|
||||
|
||||
You may need to change the name of your icon in AndroidManifest.xml to match
|
||||
this icon filename.
|
||||
|
||||
================================================================================
|
||||
Loading assets
|
||||
================================================================================
|
||||
|
||||
Any files you put in the "assets" directory of your android-project directory
|
||||
will get bundled into the application package and you can load them using the
|
||||
standard functions in SDL_rwops.h.
|
||||
Any files you put in the "app/src/main/assets" directory of your project
|
||||
directory will get bundled into the application package and you can load
|
||||
them using the standard functions in SDL_rwops.h.
|
||||
|
||||
There are also a few Android specific functions that allow you to get other
|
||||
useful paths for saving and loading data:
|
||||
|
@ -211,6 +169,7 @@ disable this behaviour, see for example:
|
|||
|
||||
http://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/
|
||||
|
||||
|
||||
================================================================================
|
||||
Pause / Resume behaviour
|
||||
================================================================================
|
||||
|
@ -231,6 +190,7 @@ a specific message, (which is not yet implemented!) and restore your textures
|
|||
manually or quit the app (which is actually the kind of behaviour you'll see
|
||||
under iOS, if the OS can not restore your GL context it will just kill your app)
|
||||
|
||||
|
||||
================================================================================
|
||||
Threads and the Java VM
|
||||
================================================================================
|
||||
|
@ -246,6 +206,7 @@ Android_JNI_SetupThread() before doing anything else otherwise SDL will attach
|
|||
your thread automatically anyway (when you make an SDL call), but it'll never
|
||||
detach it.
|
||||
|
||||
|
||||
================================================================================
|
||||
Using STL
|
||||
================================================================================
|
||||
|
@ -253,34 +214,10 @@ detach it.
|
|||
You can use STL in your project by creating an Application.mk file in the jni
|
||||
folder and adding the following line:
|
||||
|
||||
APP_STL := stlport_static
|
||||
APP_STL := c++_shared
|
||||
|
||||
For more information check out CPLUSPLUS-SUPPORT.html in the NDK documentation.
|
||||
|
||||
================================================================================
|
||||
Additional documentation
|
||||
================================================================================
|
||||
|
||||
The documentation in the NDK docs directory is very helpful in understanding the
|
||||
build process and how to work with native code on the Android platform.
|
||||
|
||||
The best place to start is with docs/OVERVIEW.TXT
|
||||
|
||||
|
||||
================================================================================
|
||||
Using Eclipse
|
||||
================================================================================
|
||||
|
||||
First make sure that you've installed Eclipse and the Android extensions as described here:
|
||||
https://developer.android.com/tools/sdk/eclipse-adt.html
|
||||
|
||||
Once you've copied the SDL android project and customized it, you can create an Eclipse project from it:
|
||||
* File -> New -> Other
|
||||
* Select the Android -> Android Project wizard and click Next
|
||||
* Enter the name you'd like your project to have
|
||||
* Select "Create project from existing source" and browse for your project directory
|
||||
* Make sure the Build Target is set to Android 3.1 (API 12)
|
||||
* Click Finish
|
||||
For more information go here:
|
||||
https://developer.android.com/ndk/guides/cpp-support
|
||||
|
||||
|
||||
================================================================================
|
||||
|
@ -295,13 +232,11 @@ Especially useful is the info on setting up OpenGL ES 2.0 emulation.
|
|||
Notice that this software emulator is incredibly slow and needs a lot of disk space.
|
||||
Using a real device works better.
|
||||
|
||||
|
||||
================================================================================
|
||||
Troubleshooting
|
||||
================================================================================
|
||||
|
||||
You can create and run an emulator from the Eclipse IDE:
|
||||
* Window -> Android SDK and AVD Manager
|
||||
|
||||
You can see if adb can see any devices with the following command:
|
||||
|
||||
adb devices
|
||||
|
@ -338,7 +273,10 @@ You can see the complete command line that ndk-build is using by passing V=1 on
|
|||
|
||||
ndk-build V=1
|
||||
|
||||
If your application crashes in native code, you can use addr2line to convert the
|
||||
If your application crashes in native code, you can use ndk-stack to get a symbolic stack trace:
|
||||
https://developer.android.com/ndk/guides/ndk-stack
|
||||
|
||||
If you want to go through the process manually, you can use addr2line to convert the
|
||||
addresses in the stack trace to lines in your code.
|
||||
|
||||
For example, if your crash looks like this:
|
||||
|
@ -426,6 +364,7 @@ When you're done instrumenting with valgrind, you can disable the wrapper:
|
|||
|
||||
adb shell setprop wrap.org.libsdl.app ""
|
||||
|
||||
|
||||
================================================================================
|
||||
Graphics debugging
|
||||
================================================================================
|
||||
|
@ -439,23 +378,16 @@ compatible with applications that use SDL2 for video.
|
|||
The Tegra Graphics Debugger is available from NVidia here:
|
||||
https://developer.nvidia.com/tegra-graphics-debugger
|
||||
|
||||
|
||||
================================================================================
|
||||
Why is API level 10 the minimum required?
|
||||
Why is API level 14 the minimum required?
|
||||
================================================================================
|
||||
|
||||
API level 10 is the minimum required level at runtime (that is, on the device)
|
||||
because SDL requires some functionality for running not
|
||||
available on older devices. Since the incorporation of joystick support into SDL,
|
||||
the minimum SDK required to *build* SDL is version 12. Devices running API levels
|
||||
10-11 are still supported, only with the joystick functionality disabled.
|
||||
|
||||
Support for native OpenGL ES and ES2 applications was introduced in the NDK for
|
||||
API level 4 and 8. EGL was made a stable API in the NDK for API level 9, which
|
||||
has since then been obsoleted, with the recommendation to developers to bump the
|
||||
required API level to 10.
|
||||
The latest NDK toolchain doesn't support targeting earlier than API level 14.
|
||||
As of this writing, according to https://developer.android.com/about/dashboards/index.html
|
||||
about 90% of the Android devices accessing Google Play support API level 10 or
|
||||
higher (March 2013).
|
||||
about 99% of the Android devices accessing Google Play support API level 14 or
|
||||
higher (October 2017).
|
||||
|
||||
|
||||
================================================================================
|
||||
A note regarding the use of the "dirty rectangles" rendering technique
|
||||
|
@ -475,6 +407,7 @@ screen each frame.
|
|||
|
||||
Reference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html
|
||||
|
||||
|
||||
================================================================================
|
||||
Known issues
|
||||
================================================================================
|
||||
|
|
|
@ -64,7 +64,7 @@ level of indirection, we can do things like this:
|
|||
export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0
|
||||
./MyGameThatIsStaticallyLinkedToSDL2
|
||||
|
||||
And now, this game that is staticallly linked to SDL, can still be overridden
|
||||
And now, this game that is statically linked to SDL, can still be overridden
|
||||
with a newer, or better, SDL. The statically linked one will only be used as
|
||||
far as calling into the jump table in this case. But in cases where no override
|
||||
is desired, the statically linked version will provide its own jump table,
|
||||
|
|
|
@ -27,6 +27,16 @@ OpenGL ES 2.x, it usually comes pre-installed, but in any case:
|
|||
|
||||
sudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev
|
||||
|
||||
|
||||
================================================================================
|
||||
NEON
|
||||
================================================================================
|
||||
|
||||
If your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so
|
||||
that SDL will select some otherwise-disabled highly-optimized code. The
|
||||
original Pi units don't have NEON, the Pi2 probably does, and the Pi3
|
||||
definitely does.
|
||||
|
||||
================================================================================
|
||||
Cross compiling from x86 Linux
|
||||
================================================================================
|
||||
|
|
|
@ -23,7 +23,7 @@ Requirements
|
|||
typically do not include support for creating WinRT apps, to note.
|
||||
(The "Community" editions of Visual C++ do, however, support both
|
||||
desktop/Win32 and WinRT development).
|
||||
- Visual Studio 2017 can be used, however it is recommented that you install
|
||||
- Visual Studio 2017 can be used, however it is recommended that you install
|
||||
the Visual C++ 2015 build tools. These build tools can be installed
|
||||
using VS 2017's installer. Be sure to also install the workload for
|
||||
"Universal Windows Platform development", its optional component, the
|
||||
|
@ -33,7 +33,7 @@ Requirements
|
|||
earlier versions of Windows, such as Windows 7, is not always supported
|
||||
by Visual Studio, and you may get error(s) when attempting to do so.
|
||||
- Visual C++ 2012 can only build apps that target versions 8.0 of Windows,
|
||||
or Windows Phone. 8.0-targetted apps will run on devices running 8.1
|
||||
or Windows Phone. 8.0-targeted apps will run on devices running 8.1
|
||||
editions of Windows, however they will not be able to take advantage of
|
||||
8.1-specific features.
|
||||
- Visual C++ 2013 cannot create app projects that target Windows 8.0.
|
||||
|
@ -54,7 +54,7 @@ Requirements
|
|||
Status
|
||||
------
|
||||
|
||||
Here is a rough list of what works, and what doens't:
|
||||
Here is a rough list of what works, and what doesn't:
|
||||
|
||||
* What works:
|
||||
* compilation via Visual C++ 2012 through 2015
|
||||
|
@ -70,7 +70,10 @@ Here is a rough list of what works, and what doens't:
|
|||
SDL_GetPerformanceFrequency(), etc.)
|
||||
* file I/O via SDL_RWops
|
||||
* mouse input (unsupported on Windows Phone)
|
||||
* audio, via a modified version of SDL's XAudio2 backend
|
||||
* audio, via SDL's WASAPI backend (if you want to record, your app must
|
||||
have "Microphone" capabilities enabled in its manifest, and the user must
|
||||
not have blocked access. Otherwise, capture devices will fail to work,
|
||||
presenting as a device disconnect shortly after opening it.)
|
||||
* .DLL file loading. Libraries *MUST* be packaged inside applications. Loading
|
||||
anything outside of the app is not supported.
|
||||
* system path retrieval via SDL's filesystem APIs
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
prefix=/usr/local/i686-w64-mingw32
|
||||
prefix=/opt/local/i686-w64-mingw32
|
||||
exec_prefix=${prefix}
|
||||
exec_prefix_set=no
|
||||
libdir=${exec_prefix}/lib
|
||||
|
@ -39,7 +39,7 @@ while test $# -gt 0; do
|
|||
echo $exec_prefix
|
||||
;;
|
||||
--version)
|
||||
echo 2.0.7
|
||||
echo 2.0.9
|
||||
;;
|
||||
--cflags)
|
||||
echo -I${prefix}/include/SDL2 -Dmain=SDL_main
|
||||
|
@ -49,7 +49,7 @@ while test $# -gt 0; do
|
|||
;;
|
||||
--static-libs)
|
||||
# --libs|--static-libs)
|
||||
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc
|
||||
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc
|
||||
;;
|
||||
*)
|
||||
echo "${usage}" 1>&2
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -51,6 +51,7 @@
|
|||
#include "SDL_power.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_sensor.h"
|
||||
#include "SDL_shape.h"
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_thread.h"
|
||||
|
@ -80,10 +81,11 @@ extern "C" {
|
|||
#define SDL_INIT_HAPTIC 0x00001000u
|
||||
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||
#define SDL_INIT_EVENTS 0x00004000u
|
||||
#define SDL_INIT_SENSOR 0x00008000u
|
||||
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
||||
#define SDL_INIT_EVERYTHING ( \
|
||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
|
||||
)
|
||||
/* @} */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -158,6 +158,9 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
|||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__arm__)
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -140,7 +140,8 @@ typedef Uint16 SDL_AudioFormat;
|
|||
#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001
|
||||
#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002
|
||||
#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004
|
||||
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE)
|
||||
#define SDL_AUDIO_ALLOW_SAMPLES_CHANGE 0x00000008
|
||||
#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
|
||||
/* @} */
|
||||
|
||||
/* @} *//* Audio flags */
|
||||
|
@ -527,7 +528,7 @@ extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioForm
|
|||
*
|
||||
* \param stream The stream the audio data is being added to
|
||||
* \param buf A pointer to the audio data to add
|
||||
* \param int The number of bytes to write to the stream
|
||||
* \param len The number of bytes to write to the stream
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_NewAudioStream
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -82,6 +82,9 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_DSOUND_H 1
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
#define HAVE_MMDEVICEAPI_H 1
|
||||
#define HAVE_AUDIOCLIENT_H 1
|
||||
#define HAVE_ENDPOINTVOLUME_H 1
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
|
@ -109,13 +112,15 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE__STRLWR 1
|
||||
/* These functions have security warnings, so we won't use them */
|
||||
/* #undef HAVE__STRUPR */
|
||||
/* #undef HAVE__STRLWR */
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE__LTOA 1
|
||||
#define HAVE__ULTOA 1
|
||||
/* These functions have security warnings, so we won't use them */
|
||||
/* #undef HAVE__LTOA */
|
||||
/* #undef HAVE__ULTOA */
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOD 1
|
||||
|
@ -125,30 +130,45 @@ typedef unsigned int uintptr_t;
|
|||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#if defined(_MSC_VER)
|
||||
/* These functions were added with the VC++ 2013 C runtime library */
|
||||
#if _MSC_VER >= 1800
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#endif
|
||||
/* This function is available with at least the VC++ 2008 C runtime library */
|
||||
#if _MSC_VER >= 1400
|
||||
|
@ -166,7 +186,6 @@ typedef unsigned int uintptr_t;
|
|||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
#define SDL_AUDIO_DRIVER_XAUDIO2 0
|
||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
@ -174,9 +193,13 @@ typedef unsigned int uintptr_t;
|
|||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_DINPUT 1
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
#define SDL_HAPTIC_DINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
|
||||
/* Enable the dummy sensor driver */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -51,27 +51,35 @@
|
|||
#include <intrin.h>
|
||||
#else
|
||||
#ifdef __ALTIVEC__
|
||||
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__)
|
||||
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
|
||||
#include <altivec.h>
|
||||
#undef pixel
|
||||
#undef bool
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __MMX__
|
||||
#include <mmintrin.h>
|
||||
#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
#ifdef __3dNOW__
|
||||
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#ifdef __SSE__
|
||||
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
|
||||
#include <immintrin.h>
|
||||
#else
|
||||
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#ifdef __SSE2__
|
||||
#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#ifdef __SSE3__
|
||||
#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif /* HAVE_IMMINTRIN_H */
|
||||
#endif /* compiler version */
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
|
@ -154,6 +162,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
|||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has AVX-512F (foundation) features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has NEON (ARM SIMD) features.
|
||||
*/
|
||||
|
@ -164,7 +177,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* This is a simple file to encapsulate the EGL API headers.
|
||||
*/
|
||||
#ifndef _MSC_VER
|
||||
#if !defined(_MSC_VER) && !defined(__ANDROID__)
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -85,6 +85,9 @@ typedef enum
|
|||
Called on Android in onResume()
|
||||
*/
|
||||
|
||||
/* Display events */
|
||||
SDL_DISPLAYEVENT = 0x150, /**< Display state change */
|
||||
|
||||
/* Window events */
|
||||
SDL_WINDOWEVENT = 0x200, /**< Window state change */
|
||||
SDL_SYSWMEVENT, /**< System specific event */
|
||||
|
@ -144,6 +147,9 @@ typedef enum
|
|||
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
|
||||
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
|
||||
|
||||
/* Sensor events */
|
||||
SDL_SENSORUPDATE = 0x1200, /**< A sensor was updated */
|
||||
|
||||
/* Render events */
|
||||
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
|
||||
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
|
||||
|
@ -168,6 +174,21 @@ typedef struct SDL_CommonEvent
|
|||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_CommonEvent;
|
||||
|
||||
/**
|
||||
* \brief Display state change event data (event.display.*)
|
||||
*/
|
||||
typedef struct SDL_DisplayEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DISPLAYEVENT */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 display; /**< The associated display index */
|
||||
Uint8 event; /**< ::SDL_DisplayEventID */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
Sint32 data1; /**< event dependent data */
|
||||
} SDL_DisplayEvent;
|
||||
|
||||
/**
|
||||
* \brief Window state change event data (event.window.*)
|
||||
*/
|
||||
|
@ -471,6 +492,17 @@ typedef struct SDL_DropEvent
|
|||
} SDL_DropEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Sensor event structure (event.sensor.*)
|
||||
*/
|
||||
typedef struct SDL_SensorEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_SENSORUPDATE */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Sint32 which; /**< The instance ID of the sensor */
|
||||
float data[6]; /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */
|
||||
} SDL_SensorEvent;
|
||||
|
||||
/**
|
||||
* \brief The "quit requested" event
|
||||
*/
|
||||
|
@ -526,6 +558,7 @@ typedef union SDL_Event
|
|||
{
|
||||
Uint32 type; /**< Event type, shared with all events */
|
||||
SDL_CommonEvent common; /**< Common event data */
|
||||
SDL_DisplayEvent display; /**< Window event data */
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
|
@ -542,6 +575,7 @@ typedef union SDL_Event
|
|||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
|
||||
SDL_SensorEvent sensor; /**< Sensor event data */
|
||||
SDL_QuitEvent quit; /**< Quit request event data */
|
||||
SDL_UserEvent user; /**< Custom event data */
|
||||
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -175,6 +175,14 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Get the mapping of a game controller.
|
||||
* This can be called before any controllers are opened.
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
|
||||
|
||||
/**
|
||||
* Open a game controller for use.
|
||||
* The index passed as an argument refers to the N'th game controller on the system.
|
||||
|
@ -196,6 +204,13 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the player index of an opened game controller, or -1 if it's not available
|
||||
*
|
||||
* For XInput controllers this returns the XInput user index.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
|
||||
|
||||
/**
|
||||
* Get the USB vendor ID of an opened controller, if available.
|
||||
* If the vendor ID isn't available this function returns 0.
|
||||
|
@ -345,6 +360,19 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
|
|||
extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerButton button);
|
||||
|
||||
/**
|
||||
* Trigger a rumble effect
|
||||
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* \param gamecontroller The controller to vibrate
|
||||
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
|
||||
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
*
|
||||
* \return 0, or -1 if rumble isn't supported on this joystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Close a controller previously opened with SDL_GameControllerOpen().
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -117,6 +117,17 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).
|
||||
*
|
||||
* At the moment the magnitude variables are mixed between signed/unsigned, and
|
||||
* it is also not made clear that ALL of those variables expect a max of 0x7FFF.
|
||||
*
|
||||
* Some platforms may have higher precision than that (Linux FF, Windows XInput)
|
||||
* so we should fix the inconsistency in favor of higher possible precision,
|
||||
* adjusting for platforms that use different scales.
|
||||
* -flibit
|
||||
*/
|
||||
|
||||
/**
|
||||
* \typedef SDL_Haptic
|
||||
*
|
||||
|
@ -656,8 +667,8 @@ typedef struct SDL_HapticRamp
|
|||
* This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.
|
||||
*
|
||||
* The Left/Right effect is used to explicitly control the large and small
|
||||
* motors, commonly found in modern game controllers. One motor is high
|
||||
* frequency, the other is low frequency.
|
||||
* motors, commonly found in modern game controllers. The small (right) motor
|
||||
* is high frequency, and the large (left) motor is low frequency.
|
||||
*
|
||||
* \sa SDL_HAPTIC_LEFTRIGHT
|
||||
* \sa SDL_HapticEffect
|
||||
|
@ -668,7 +679,7 @@ typedef struct SDL_HapticLeftRight
|
|||
Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */
|
||||
|
||||
/* Replay */
|
||||
Uint32 length; /**< Duration of the effect. */
|
||||
Uint32 length; /**< Duration of the effect in milliseconds. */
|
||||
|
||||
/* Rumble */
|
||||
Uint16 large_magnitude; /**< Control of the large controller motor. */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -76,6 +76,7 @@ extern "C" {
|
|||
* "opengl"
|
||||
* "opengles2"
|
||||
* "opengles"
|
||||
* "metal"
|
||||
* "software"
|
||||
*
|
||||
* The default varies by platform, but it's the first one in the list that
|
||||
|
@ -210,6 +211,18 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Disable _NET_WM_BYPASS_COMPOSITOR
|
||||
* "1" - Enable _NET_WM_BYPASS_COMPOSITOR
|
||||
*
|
||||
* By default SDL will use _NET_WM_BYPASS_COMPOSITOR
|
||||
*
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
|
||||
*
|
||||
|
@ -249,6 +262,16 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
|
||||
|
||||
/**
|
||||
* \brief A variable setting the double click time, in milliseconds.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
|
||||
|
||||
/**
|
||||
* \brief A variable setting the double click radius, in pixels.
|
||||
*/
|
||||
#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
|
||||
|
||||
/**
|
||||
* \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
|
||||
*/
|
||||
|
@ -316,7 +339,7 @@ extern "C" {
|
|||
#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling which orientations are allowed on iOS.
|
||||
* \brief A variable controlling which orientations are allowed on iOS/Android.
|
||||
*
|
||||
* In some circumstances it is necessary to be able to explicitly control
|
||||
* which UI orientations are allowed.
|
||||
|
@ -355,16 +378,36 @@ extern "C" {
|
|||
#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Android / iOS built-in
|
||||
* accelerometer should be listed as a joystick device, rather than listing
|
||||
* actual joysticks only.
|
||||
* \brief A variable controlling whether the home indicator bar on iPhone X
|
||||
* should be hidden.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - List only real joysticks and accept input from them
|
||||
* "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default).
|
||||
* "0" - The indicator bar is not hidden (default for windowed applications)
|
||||
* "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
|
||||
* "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
|
||||
*/
|
||||
#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Android / iOS built-in
|
||||
* accelerometer should be listed as a joystick device.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - The accelerometer is not listed as a joystick
|
||||
* "1" - The accelerometer is available as a 3 axis joystick (the default).
|
||||
*/
|
||||
#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the Android / tvOS remotes
|
||||
* should be listed as joystick devices, instead of sending keyboard events.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - Remotes send enter/escape/arrow key events
|
||||
* "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
|
||||
*/
|
||||
#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
|
||||
|
||||
/**
|
||||
* \brief A variable that lets you disable the detection and use of Xinput gamepad devices
|
||||
*
|
||||
|
@ -432,6 +475,88 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI joystick drivers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI drivers are not used
|
||||
* "1" - HIDAPI drivers are used (the default)
|
||||
*
|
||||
* This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - extended reports are not enabled (the default)
|
||||
* "1" - extended reports
|
||||
*
|
||||
* Extended input reports allow rumble on Bluetooth PS4 controllers, but
|
||||
* break DirectInput handling for applications that don't use SDL.
|
||||
*
|
||||
* Once extended reports are enabled, they can not be disabled without
|
||||
* power cycling the controller.
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
* "0" - HIDAPI driver is not used
|
||||
* "1" - HIDAPI driver is used
|
||||
*
|
||||
* The default is the value of SDL_HINT_JOYSTICK_HIDAPI
|
||||
*/
|
||||
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
|
||||
|
||||
/**
|
||||
* \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Do not scan for Steam Controllers
|
||||
* "1" - Scan for Steam Controllers (the default)
|
||||
*
|
||||
* The default value is "1". This hint must be set before initializing the joystick subsystem.
|
||||
*/
|
||||
#define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
|
||||
|
||||
|
||||
/**
|
||||
* \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
|
||||
* This is a debugging aid for developers and not expected to be used by end users. The default is "1"
|
||||
|
@ -494,6 +619,10 @@ extern "C" {
|
|||
* This is specially useful if you build SDL against a non glibc libc library (such as musl) which
|
||||
* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
|
||||
* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
|
||||
*
|
||||
* Instead of this hint, in 2.0.9 and later, you can use
|
||||
* SDL_CreateThreadWithStackSize(). This hint only works with the classic
|
||||
* SDL_CreateThread().
|
||||
*/
|
||||
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
|
||||
|
||||
|
@ -719,6 +848,35 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether we trap the Android back button to handle it manually.
|
||||
* This is necessary for the right mouse button to work on some Android devices, or
|
||||
* to be able to trap the back button for use in your code reliably. If set to true,
|
||||
* the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
|
||||
* SDL_SCANCODE_AC_BACK.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - Back button will be handled as usual for system. (default)
|
||||
* "1" - Back button will be trapped, allowing you to handle the key press
|
||||
* manually. (This will also let right mouse click work on systems
|
||||
* where the right mouse button functions as back.)
|
||||
*
|
||||
* The value of this hint is used at runtime, so it can be changed at any time.
|
||||
*/
|
||||
#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
|
||||
|
||||
/**
|
||||
* \brief A variable to control whether the return key on the soft keyboard
|
||||
* should hide the soft keyboard on Android and iOS.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
* "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
|
||||
* "1" - The return key will hide the keyboard.
|
||||
*
|
||||
* The value of this hint is used at runtime, so it can be changed at any time.
|
||||
*/
|
||||
#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
|
||||
|
||||
/**
|
||||
* \brief override the binding element for keyboard inputs for Emscripten builds
|
||||
*
|
||||
|
@ -797,6 +955,24 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
|
||||
|
||||
/**
|
||||
* \brief Tell the video driver that we only want a double buffer.
|
||||
*
|
||||
* By default, most lowlevel 2D APIs will use a triple buffer scheme that
|
||||
* wastes no CPU time on waiting for vsync after issuing a flip, but
|
||||
* introduces a frame of latency. On the other hand, using a double buffer
|
||||
* scheme instead is recommended for cases where low latency is an important
|
||||
* factor because we save a whole frame of latency.
|
||||
* We do so by waiting for vsync immediately after issuing a flip, usually just
|
||||
* after eglSwapBuffers call in the backend's *_SwapWindow function.
|
||||
*
|
||||
* Since it's driver-specific, it's only supported where possible and
|
||||
* implemented. Currently supported the following drivers:
|
||||
* - KMSDRM (kmsdrm)
|
||||
* - Raspberry Pi (raspberrypi)
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
|
||||
|
||||
/**
|
||||
* \brief A variable controlling what driver to use for OpenGL ES contexts.
|
||||
*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -97,10 +97,10 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
SDL_JOYSTICK_POWER_UNKNOWN = -1,
|
||||
SDL_JOYSTICK_POWER_EMPTY,
|
||||
SDL_JOYSTICK_POWER_LOW,
|
||||
SDL_JOYSTICK_POWER_MEDIUM,
|
||||
SDL_JOYSTICK_POWER_FULL,
|
||||
SDL_JOYSTICK_POWER_EMPTY, /* <= 5% */
|
||||
SDL_JOYSTICK_POWER_LOW, /* <= 20% */
|
||||
SDL_JOYSTICK_POWER_MEDIUM, /* <= 70% */
|
||||
SDL_JOYSTICK_POWER_FULL, /* <= 100% */
|
||||
SDL_JOYSTICK_POWER_WIRED,
|
||||
SDL_JOYSTICK_POWER_MAX
|
||||
} SDL_JoystickPowerLevel;
|
||||
|
@ -132,6 +132,12 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Get the player index of a joystick, or -1 if it's not available
|
||||
* This can be called before any joysticks are opened.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);
|
||||
|
||||
/**
|
||||
* Return the GUID for the joystick at this index
|
||||
* This can be called before any joysticks are opened.
|
||||
|
@ -194,6 +200,13 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID
|
|||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Get the player index of an opened joystick, or -1 if it's not available
|
||||
*
|
||||
* For XInput controllers this returns the XInput user index.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Return the GUID for this opened joystick
|
||||
*/
|
||||
|
@ -361,6 +374,19 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
|
|||
extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
||||
int button);
|
||||
|
||||
/**
|
||||
* Trigger a rumble effect
|
||||
* Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
|
||||
*
|
||||
* \param joystick The joystick to vibrate
|
||||
* \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
|
||||
* \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
|
||||
* \param duration_ms The duration of the rumble effect, in milliseconds
|
||||
*
|
||||
* \return 0, or -1 if rumble isn't supported on this joystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
|
||||
|
||||
/**
|
||||
* Close a joystick previously opened with SDL_JoystickOpen().
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -63,10 +63,13 @@
|
|||
/* On Android SDL provides a Java class in SDLActivity.java that is the
|
||||
main activity entry point.
|
||||
|
||||
See README-android.md for more details on extending that class.
|
||||
See docs/README-android.md for more details on extending that class.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
/* We need to export SDL_main so it can be launched from Java */
|
||||
#define SDLMAIN_DECLSPEC DECLSPEC
|
||||
|
||||
#elif defined(__NACL__)
|
||||
/* On NACL we use ppapi_simple to set up the application helper code,
|
||||
then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
|
||||
|
@ -85,6 +88,10 @@
|
|||
#define C_LINKAGE
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef SDLMAIN_DECLSPEC
|
||||
#define SDLMAIN_DECLSPEC
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_main.h
|
||||
*
|
||||
|
@ -107,7 +114,7 @@
|
|||
/**
|
||||
* The prototype for the application's main() function
|
||||
*/
|
||||
extern C_LINKAGE DECLSPEC int SDL_main(int argc, char *argv[]);
|
||||
extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -287,7 +287,9 @@ enum
|
|||
SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
|
||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
|
||||
SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
|
||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1')
|
||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
|
||||
SDL_PIXELFORMAT_EXTERNAL_OES = /**< Android video texture format */
|
||||
SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
|
||||
};
|
||||
|
||||
typedef struct SDL_Color
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -121,7 +121,12 @@
|
|||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
||||
#if defined(_MSC_VER) && defined(__has_include)
|
||||
#define HAVE_WINAPIFAMILY_H __has_include(<winapifamily.h>)
|
||||
#if __has_include(<winapifamily.h>)
|
||||
#define HAVE_WINAPIFAMILY_H 1
|
||||
#else
|
||||
#define HAVE_WINAPIFAMILY_H 0
|
||||
#endif
|
||||
|
||||
/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
|
||||
#define HAVE_WINAPIFAMILY_H 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -898,6 +898,27 @@ extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
|
||||
|
||||
/**
|
||||
* \brief Get the CAMetalLayer associated with the given Metal renderer
|
||||
*
|
||||
* \param renderer The renderer to query
|
||||
*
|
||||
* \return CAMetalLayer* on success, or NULL if the renderer isn't a Metal renderer
|
||||
*
|
||||
* \sa SDL_RenderGetMetalCommandEncoder()
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);
|
||||
|
||||
/**
|
||||
* \brief Get the Metal command encoder for the current frame
|
||||
*
|
||||
* \param renderer The renderer to query
|
||||
*
|
||||
* \return id<MTLRenderCommandEncoder> on success, or NULL if the renderer isn't a Metal renderer
|
||||
*
|
||||
* \sa SDL_RenderGetMetalLayer()
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#define SDL_REVISION "hg-11645:2088cd828335"
|
||||
#define SDL_REVISION_NUMBER 11645
|
||||
#define SDL_REVISION "hg-12373:8feb5da6f2fb"
|
||||
#define SDL_REVISION_NUMBER 12373
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
251
libs/SDL2/i686-w64-mingw32/include/SDL2/SDL_sensor.h
Normal file
251
libs/SDL2/i686-w64-mingw32/include/SDL2/SDL_sensor.h
Normal file
|
@ -0,0 +1,251 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_sensor.h
|
||||
*
|
||||
* Include file for SDL sensor event handling
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SDL_sensor_h
|
||||
#define _SDL_sensor_h
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
extern "C" {
|
||||
/* *INDENT-ON* */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief SDL_sensor.h
|
||||
*
|
||||
* In order to use these functions, SDL_Init() must have been called
|
||||
* with the ::SDL_INIT_SENSOR flag. This causes SDL to scan the system
|
||||
* for sensors, and load appropriate drivers.
|
||||
*/
|
||||
|
||||
struct _SDL_Sensor;
|
||||
typedef struct _SDL_Sensor SDL_Sensor;
|
||||
|
||||
/**
|
||||
* This is a unique ID for a sensor for the time it is connected to the system,
|
||||
* and is never reused for the lifetime of the application.
|
||||
*
|
||||
* The ID value starts at 0 and increments from there. The value -1 is an invalid ID.
|
||||
*/
|
||||
typedef Sint32 SDL_SensorID;
|
||||
|
||||
/* The different sensors defined by SDL
|
||||
*
|
||||
* Additional sensors may be available, using platform dependent semantics.
|
||||
*
|
||||
* Hare are the additional Android sensors:
|
||||
* https://developer.android.com/reference/android/hardware/SensorEvent.html#values
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_SENSOR_INVALID = -1, /**< Returned for an invalid sensor */
|
||||
SDL_SENSOR_UNKNOWN, /**< Unknown sensor type */
|
||||
SDL_SENSOR_ACCEL, /**< Accelerometer */
|
||||
SDL_SENSOR_GYRO /**< Gyroscope */
|
||||
} SDL_SensorType;
|
||||
|
||||
/**
|
||||
* Accelerometer sensor
|
||||
*
|
||||
* The accelerometer returns the current acceleration in SI meters per
|
||||
* second squared. This includes gravity, so a device at rest will have
|
||||
* an acceleration of SDL_STANDARD_GRAVITY straight down.
|
||||
*
|
||||
* values[0]: Acceleration on the x axis
|
||||
* values[1]: Acceleration on the y axis
|
||||
* values[2]: Acceleration on the z axis
|
||||
*
|
||||
* For phones held in portrait mode, the axes are defined as follows:
|
||||
* -X ... +X : left ... right
|
||||
* -Y ... +Y : bottom ... top
|
||||
* -Z ... +Z : farther ... closer
|
||||
*
|
||||
* The axis data is not changed when the phone is rotated.
|
||||
*
|
||||
* \sa SDL_GetDisplayOrientation()
|
||||
*/
|
||||
#define SDL_STANDARD_GRAVITY 9.80665f
|
||||
|
||||
/**
|
||||
* Gyroscope sensor
|
||||
*
|
||||
* The gyroscope returns the current rate of rotation in radians per second.
|
||||
* The rotation is positive in the counter-clockwise direction. That is,
|
||||
* an observer looking from a positive location on one of the axes would
|
||||
* see positive rotation on that axis when it appeared to be rotating
|
||||
* counter-clockwise.
|
||||
*
|
||||
* values[0]: Angular speed around the x axis
|
||||
* values[1]: Angular speed around the y axis
|
||||
* values[2]: Angular speed around the z axis
|
||||
*
|
||||
* For phones held in portrait mode, the axes are defined as follows:
|
||||
* -X ... +X : left ... right
|
||||
* -Y ... +Y : bottom ... top
|
||||
* -Z ... +Z : farther ... closer
|
||||
*
|
||||
* The axis data is not changed when the phone is rotated.
|
||||
*
|
||||
* \sa SDL_GetDisplayOrientation()
|
||||
*/
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief Count the number of sensors attached to the system right now
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_NumSensors(void);
|
||||
|
||||
/**
|
||||
* \brief Get the implementation dependent name of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor name, or NULL if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Get the type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Get the platform dependent type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor platform dependent type, or -1 if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Get the instance ID of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor instance ID, or -1 if device_index is out of range.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Open a sensor for use.
|
||||
*
|
||||
* The index passed as an argument refers to the N'th sensor on the system.
|
||||
*
|
||||
* \return A sensor identifier, or NULL if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);
|
||||
|
||||
/**
|
||||
* Return the SDL_Sensor associated with an instance id.
|
||||
*/
|
||||
extern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);
|
||||
|
||||
/**
|
||||
* \brief Get the implementation dependent name of a sensor.
|
||||
*
|
||||
* \return The sensor name, or NULL if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* \brief Get the type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* \brief Get the platform dependent type of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor platform dependent type, or -1 if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* \brief Get the instance ID of a sensor.
|
||||
*
|
||||
* This can be called before any sensors are opened.
|
||||
*
|
||||
* \return The sensor instance ID, or -1 if the sensor is NULL.
|
||||
*/
|
||||
extern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);
|
||||
|
||||
/**
|
||||
* Get the current state of an opened sensor.
|
||||
*
|
||||
* The number of values and interpretation of the data is sensor dependent.
|
||||
*
|
||||
* \param sensor The sensor to query
|
||||
* \param data A pointer filled with the current sensor state
|
||||
* \param num_values The number of values to write to data
|
||||
*
|
||||
* \return 0 or -1 if an error occurred.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);
|
||||
|
||||
/**
|
||||
* Close a sensor previously opened with SDL_SensorOpen()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);
|
||||
|
||||
/**
|
||||
* Update the current state of the open sensors.
|
||||
*
|
||||
* This is called automatically by the event loop if sensor events are enabled.
|
||||
*
|
||||
* This needs to be called from the thread that initialized the sensor subsystem.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
}
|
||||
/* *INDENT-ON* */
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_sensor_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -86,6 +86,28 @@
|
|||
#ifdef HAVE_FLOAT_H
|
||||
# include <float.h>
|
||||
#endif
|
||||
#if defined(HAVE_ALLOCA) && !defined(alloca)
|
||||
# if defined(HAVE_ALLOCA_H)
|
||||
# include <alloca.h>
|
||||
# elif defined(__GNUC__)
|
||||
# define alloca __builtin_alloca
|
||||
# elif defined(_MSC_VER)
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# elif defined(__WATCOMC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__BORLANDC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__DMC__)
|
||||
# include <stdlib.h>
|
||||
# elif defined(__AIX__)
|
||||
#pragma alloca
|
||||
# elif defined(__MRC__)
|
||||
void *alloca(unsigned);
|
||||
# else
|
||||
char *alloca();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The number of elements in an array.
|
||||
|
@ -328,28 +350,6 @@ SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ALLOCA) && !defined(alloca)
|
||||
# if defined(HAVE_ALLOCA_H)
|
||||
# include <alloca.h>
|
||||
# elif defined(__GNUC__)
|
||||
# define alloca __builtin_alloca
|
||||
# elif defined(_MSC_VER)
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
# elif defined(__WATCOMC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__BORLANDC__)
|
||||
# include <malloc.h>
|
||||
# elif defined(__DMC__)
|
||||
# include <stdlib.h>
|
||||
# elif defined(__AIX__)
|
||||
#pragma alloca
|
||||
# elif defined(__MRC__)
|
||||
void *alloca(unsigned);
|
||||
# else
|
||||
char *alloca();
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_ALLOCA
|
||||
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
|
||||
#define SDL_stack_free(data)
|
||||
|
@ -445,12 +445,12 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
|
||||
|
||||
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
|
@ -501,18 +501,35 @@ extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size
|
|||
#endif
|
||||
|
||||
extern DECLSPEC double SDLCALL SDL_acos(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_acosf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_asin(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_asinf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_atan(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_atanf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_atan2(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_atan2f(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_ceil(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_ceilf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_copysign(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_cos(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_cosf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_exp(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_expf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_fabs(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_fabsf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_floor(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_floorf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_fmod(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_log(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_logf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_log10(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_log10f(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_pow(double x, double y);
|
||||
extern DECLSPEC float SDLCALL SDL_powf(float x, float y);
|
||||
extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
|
||||
extern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);
|
||||
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_sinf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_sqrt(double x);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -97,6 +97,17 @@ typedef struct SDL_Surface
|
|||
typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
|
||||
struct SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* \brief The formula used for converting between YUV and RGB
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_YUV_CONVERSION_JPEG, /**< Full range JPEG */
|
||||
SDL_YUV_CONVERSION_BT601, /**< BT.601 (the default) */
|
||||
SDL_YUV_CONVERSION_BT709, /**< BT.709 */
|
||||
SDL_YUV_CONVERSION_AUTOMATIC /**< BT.601 for SD content, BT.709 for HD content */
|
||||
} SDL_YUV_CONVERSION_MODE;
|
||||
|
||||
/**
|
||||
* Allocate and free an RGB surface.
|
||||
*
|
||||
|
@ -237,6 +248,13 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
|
|||
extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
|
||||
int flag, Uint32 key);
|
||||
|
||||
/**
|
||||
* \brief Returns whether the surface has a color key
|
||||
*
|
||||
* \return SDL_TRUE if the surface has a color key, or SDL_FALSE if the surface is NULL or has no color key
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* \brief Gets the color key (transparent pixel) in a blittable surface.
|
||||
*
|
||||
|
@ -509,6 +527,20 @@ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
|
|||
(SDL_Surface * src, SDL_Rect * srcrect,
|
||||
SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* \brief Set the YUV conversion mode
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);
|
||||
|
||||
/**
|
||||
* \brief Get the YUV conversion mode
|
||||
*/
|
||||
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);
|
||||
|
||||
/**
|
||||
* \brief Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
|
||||
*/
|
||||
extern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -76,6 +76,18 @@ extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *a
|
|||
#endif /* __WIN32__ */
|
||||
|
||||
|
||||
/* Platform specific functions for Linux */
|
||||
#ifdef __LINUX__
|
||||
|
||||
/**
|
||||
\brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available.
|
||||
|
||||
\return 0 on success, or -1 on error.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
|
||||
|
||||
#endif /* __LINUX__ */
|
||||
|
||||
/* Platform specific functions for iOS */
|
||||
#if defined(__IPHONEOS__) && __IPHONEOS__
|
||||
|
||||
|
@ -108,6 +120,26 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
|
|||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
|
||||
|
||||
/**
|
||||
\brief Return true if the application is running on Android TV
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
|
||||
|
||||
/**
|
||||
\brief Return true if the application is running on a Chromebook
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
|
||||
|
||||
/**
|
||||
\brief Return true is the application is running on a Samsung DeX docking station
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
|
||||
|
||||
/**
|
||||
\brief Trigger the Android system back button behavior.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
|
||||
|
||||
/**
|
||||
See the official Android developer guide for more information:
|
||||
http://developer.android.com/guide/topics/data/data-storage.html
|
||||
|
@ -169,6 +201,25 @@ typedef enum
|
|||
} SDL_WinRT_Path;
|
||||
|
||||
|
||||
/**
|
||||
* \brief WinRT Device Family
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
/** \brief Unknown family */
|
||||
SDL_WINRT_DEVICEFAMILY_UNKNOWN,
|
||||
|
||||
/** \brief Desktop family*/
|
||||
SDL_WINRT_DEVICEFAMILY_DESKTOP,
|
||||
|
||||
/** \brief Mobile family (for example smartphone) */
|
||||
SDL_WINRT_DEVICEFAMILY_MOBILE,
|
||||
|
||||
/** \brief XBox family */
|
||||
SDL_WINRT_DEVICEFAMILY_XBOX,
|
||||
} SDL_WinRT_DeviceFamily;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retrieves a WinRT defined path on the local file system
|
||||
*
|
||||
|
@ -203,8 +254,20 @@ extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path
|
|||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);
|
||||
|
||||
/**
|
||||
* \brief Detects the device family of WinRT plattform on runtime
|
||||
*
|
||||
* \return Device family
|
||||
*/
|
||||
extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
/**
|
||||
\brief Return true if the current device is a tablet.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
@ -33,12 +33,6 @@
|
|||
#include "SDL_video.h"
|
||||
#include "SDL_version.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_syswm.h
|
||||
*
|
||||
|
@ -110,6 +104,12 @@ typedef void *EGLSurface;
|
|||
#include "SDL_egl.h"
|
||||
#endif
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* These are the various supported windowing subsystems
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue