Compare commits
210 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 944784b329 | |||
| df4c1366fe | |||
| 1ee1ea560b | |||
| 5c7f72253c | |||
| e2e41cf435 | |||
| 674323d445 | |||
| f4e2c11f1b | |||
| 1b130feb85 | |||
| 5f3ecbbd79 | |||
| 250efd69bf | |||
| 7cd5fec3f8 | |||
| 8e612aaa2e | |||
| 2d045642ff | |||
| 01dff96fdc | |||
| 62d1a566c0 | |||
| 39016a3912 | |||
| 866cb56f1b | |||
| 6de3050255 | |||
| f602b5ff7a | |||
| c34b4d8944 | |||
| c835f943b5 | |||
| 9b265c6cca | |||
| 6a526df9b3 | |||
| 3def97bcb8 | |||
| 0a07edcb5c | |||
| 62d90a605f | |||
| d718e20767 | |||
| 20c63c7ef5 | |||
| a68ffa8e21 | |||
| 693939a6d5 | |||
| 031e4b99f4 | |||
| 1a095d292f | |||
| d51d564642 | |||
| bafde2a778 | |||
| 7dcc1d7809 | |||
| 38aadb984d | |||
| e259313cc9 | |||
| c49323cfdf | |||
| 619acbc9b4 | |||
| e39806f1a3 | |||
| e2618f40db | |||
| 97a6ba474f | |||
| 07054544e4 | |||
| 99f6ea7dd4 | |||
| 45b75dc75f | |||
| a4fd00794d | |||
| ee261f4509 | |||
| eb713006c6 | |||
| a07eeff6e4 | |||
| cce0ccba76 | |||
| 0ea7eb0b9c | |||
| 4a2d27dc59 | |||
| 71be364141 | |||
| 16cc725cb3 | |||
| a05dbc7581 | |||
| 2db0b43d23 | |||
| d6c100379e | |||
| 22e8579337 | |||
| d0c0715640 | |||
| 38e0573a0e | |||
| f259fbb3a5 | |||
| 663e1ed32e | |||
| b1887fe6da | |||
| 3fcf3b23e0 | |||
| 284f7d5bad | |||
| adab0b420c | |||
| 4f9d8bec42 | |||
| 31e657d138 | |||
| 8b3d257baf | |||
| d1143b9dfe | |||
| 68ebff722e | |||
| 3be9d4459c | |||
| 76e928e21d | |||
| 9c6924d7bb | |||
| 5007bea835 | |||
| 5e7be1c2fb | |||
| faf2e69b63 | |||
| 4c3c844ccf | |||
| 48b8ae049a | |||
| c0d4eddde7 | |||
| f590101047 | |||
| c7fcbd0258 | |||
| b2061c86d2 | |||
| 510a6ca718 | |||
| ec8209265a | |||
| e963251fd9 | |||
| a2f1efd2a6 | |||
| 8959b7bcce | |||
| 4d8bb46a52 | |||
| 2abde36a5e | |||
| 0a083af712 | |||
| f322b1b81b | |||
| 13fe98edb3 | |||
| c90b49c8be | |||
| d3a5c0e54f | |||
| 254ff50ef3 | |||
| e551206351 | |||
| b22e830dac | |||
| a81d42cb25 | |||
| 3ea0025fb4 | |||
| d7c49a0578 | |||
| 4cbe55c2d4 | |||
| 564f316586 | |||
| 522ab8e726 | |||
| 4911282777 | |||
| 06ecabc676 | |||
| 5d89a3057e | |||
| 75228cc451 | |||
| 357eec20b1 | |||
| 62c1e2715e | |||
| 34fc2b6b06 | |||
| 6557dea2bb | |||
| 2caea7ba6e | |||
| d33d2e4a09 | |||
| d9174dcdb9 | |||
| 22f7204e08 | |||
| 06fab0d457 | |||
| f180f88068 | |||
| 4109d6c938 | |||
| 9c2264ca75 | |||
| c59739c7ba | |||
| 4a430c0d5b | |||
| 5a7f637f4b | |||
| c63298b555 | |||
| 82aa91bead | |||
| f4129e109a | |||
| 5e8714697d | |||
| dd4355051f | |||
| 160b212a43 | |||
| 69d3b076d7 | |||
| 3817a01712 | |||
| ba19dcb904 | |||
| b035b92ff4 | |||
| 8c425f5698 | |||
| d382bb6403 | |||
| da64a5e082 | |||
| 7070dac482 | |||
| ea5360ea74 | |||
| 3aa4440390 | |||
| ce105e252e | |||
| 1aac5b7719 | |||
| a8b467290f | |||
| 706ad6f9c0 | |||
| 54d428ed96 | |||
| c71adfbac4 | |||
| c955543d31 | |||
| fae8e2d82c | |||
| ff7b825cbb | |||
| 09ed0105e9 | |||
| 07ae93fd3a | |||
| 72fb30b927 | |||
| 8d37f31a08 | |||
| e6fb412c4d | |||
| 10c29eb547 | |||
| 1f9e36dc93 | |||
| c114884de1 | |||
| d6a366555d | |||
| fd0d8a05fe | |||
| 79d610a7d9 | |||
| 9060e1c92a | |||
| 0d586c0827 | |||
| fd0bebf533 | |||
| 2665b93b70 | |||
| c35be7d21c | |||
| bc84968b23 | |||
| 1b49097f80 | |||
| 859e3f3b44 | |||
| 3fa7657c79 | |||
| e90c61a416 | |||
| d003b51de4 | |||
| 8d381010c8 | |||
| 2216c9632e | |||
| fdc8797d2b | |||
| 90bdad7d51 | |||
| d50b193d9f | |||
| ee885d5ca7 | |||
| bb3a0f263b | |||
| 85d6c48f42 | |||
| 896dd9daef | |||
| dc8c0c9e4f | |||
| 7af0dda1a0 | |||
| 0adf8c63f4 | |||
| d33f691743 | |||
| a304f50e93 | |||
| 496bf5c05c | |||
| 26a6bd6b1f | |||
| c48dce8634 | |||
| a0de547370 | |||
| 5af554fecd | |||
| ea92241d6e | |||
| 60ea12f51d | |||
| 36c7063b3e | |||
| c6a1f4aab0 | |||
| eed3f9d7d1 | |||
| 02e6929f5f | |||
| 1bae289150 | |||
| d0ec2848f9 | |||
| 79c7856786 | |||
| edb24e92e6 | |||
| 75e5ea50b5 | |||
| d0a1a67da2 | |||
| e5ec5bd627 | |||
| d88b42a516 | |||
| e2846023da | |||
| 6cac55a54f | |||
| a97449adc5 | |||
| bcb6dcd1a5 | |||
| bc66956524 | |||
| 9cd916ccd3 | |||
| eea7849f54 |
9
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
.vscode
|
.vscode
|
||||||
*config.txt
|
*data/config/config.txt
|
||||||
|
*stats.txt
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
thumbs.db
|
thumbs.db
|
||||||
*.exe
|
*.exe
|
||||||
@@ -8,4 +9,8 @@ thumbs.db
|
|||||||
*.dmg
|
*.dmg
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.zip
|
*.zip
|
||||||
*.app
|
*.app
|
||||||
|
*_debug*
|
||||||
|
sync_jail_engine.sh
|
||||||
|
jaildoctors_dilemma*
|
||||||
|
todo
|
||||||
233
LICENSE
@@ -1,232 +1 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU General Public License v3.0 only
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
“This License” refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
|
||||||
|
|
||||||
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
|
|
||||||
|
|
||||||
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
|
|
||||||
|
|
||||||
A “covered work” means either the unmodified Program or a work based on the Program.
|
|
||||||
|
|
||||||
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
|
|
||||||
|
|
||||||
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
|
|
||||||
|
|
||||||
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
|
|
||||||
|
|
||||||
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
|
|
||||||
|
|
||||||
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
|
|
||||||
|
|
||||||
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<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 3 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
||||||
120
Makefile
@@ -1,60 +1,68 @@
|
|||||||
executable = jaildoctors_dilemma
|
executable = jaildoctors_dilemma
|
||||||
source = source/*.cpp source/common/*.cpp
|
source = source/*.cpp source/jail_engine/*.cpp
|
||||||
appName = JailDoctor's Dilemma
|
appName = JailDoctor's Dilemma
|
||||||
releaseFolder = jdd_release
|
releaseFolder = jdd_release
|
||||||
version = v1.0
|
version = v1.08
|
||||||
|
|
||||||
|
# Release names
|
||||||
|
windowsRelease = $(executable)-$(version)-win32-x64.zip
|
||||||
|
macosIntelRelease = $(executable)-$(version)-macos-intel.dmg
|
||||||
|
macosAppleSiliconRelease = $(executable)-$(version)-macos-apple-silicon.dmg
|
||||||
|
linuxRelease = $(executable)-$(version)-linux.tar.gz
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
@echo off
|
@echo off
|
||||||
powershell if (Test-Path data\config) {Remove-Item data\config -Recurse -Force}
|
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable).exe"
|
||||||
powershell if (-not (Test-Path data\config)) {New-Item data\config -ItemType Directory}
|
strip -s -R .comment -R .gnu.version "$(executable).exe" --strip-unneeded
|
||||||
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o $(executable).exe
|
|
||||||
strip -s -R .comment -R .gnu.version $(executable).exe --strip-unneeded
|
windows_debug:
|
||||||
|
@echo off
|
||||||
|
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(executable)_debug.exe"
|
||||||
|
strip -s -R .comment -R .gnu.version "$(executable)_debug.exe" --strip-unneeded
|
||||||
|
|
||||||
windows_release:
|
windows_release:
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
# Remove data
|
# Create release folder
|
||||||
powershell if (Test-Path data\config) {Remove-Item data\config -Recurse -Force}
|
powershell if (Test-Path "$(releaseFolder)") {Remove-Item "$(releaseFolder)" -Recurse -Force}
|
||||||
powershell if (Test-Path $(releaseFolder)) {Remove-Item $(releaseFolder) -Recurse -Force}
|
powershell if (-not (Test-Path "$(releaseFolder)")) {New-Item "$(releaseFolder)" -ItemType Directory}
|
||||||
|
|
||||||
# Create folders
|
# Prepare data folder
|
||||||
powershell if (-not (Test-Path data\config)) {New-Item data\config -ItemType Directory}
|
|
||||||
powershell if (-not (Test-Path $(releaseFolder))) {New-Item $(releaseFolder) -ItemType Directory}
|
|
||||||
|
|
||||||
# Copy data
|
|
||||||
powershell Copy-Item -Path "data" -Destination "$(releaseFolder)" -recurse -Force
|
powershell Copy-Item -Path "data" -Destination "$(releaseFolder)" -recurse -Force
|
||||||
powershell Copy-Item "LICENSE" -Destination "$(releaseFolder)"
|
|
||||||
powershell Copy-Item "README.md" -Destination "$(releaseFolder)"
|
|
||||||
powershell Copy-Item "release/SDL2.dll" -Destination "$(releaseFolder)"
|
|
||||||
|
|
||||||
# Remove data
|
|
||||||
powershell if (Test-Path "$(releaseFolder)\data\room\map.world") {Remove-Item "$(releaseFolder)\data\room\map.world" -Recurse -Force}
|
powershell if (Test-Path "$(releaseFolder)\data\room\map.world") {Remove-Item "$(releaseFolder)\data\room\map.world" -Recurse -Force}
|
||||||
powershell if (Test-Path "$(releaseFolder)\data\room\standard.tsx") {Remove-Item "$(releaseFolder)\data\room\standard.tsx" -Recurse -Force}
|
powershell if (Test-Path "$(releaseFolder)\data\room\standard.tsx") {Remove-Item "$(releaseFolder)\data\room\standard.tsx" -Recurse -Force}
|
||||||
|
|
||||||
|
# Copy root files
|
||||||
|
powershell Copy-Item "LICENSE" -Destination "$(releaseFolder)"
|
||||||
|
powershell Copy-Item "README.md" -Destination "$(releaseFolder)"
|
||||||
|
powershell Copy-Item "release\*.dll" -Destination "$(releaseFolder)"
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
g++ $(source) -D RELEASE -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe"
|
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lws2_32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe"
|
||||||
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable).exe" --strip-unneeded
|
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable).exe" --strip-unneeded
|
||||||
|
|
||||||
# Create ZIP
|
# Create ZIP
|
||||||
powershell if (Test-Path $(executable)_win_$(version).zip) {Remove-Item $(executable)-$(version)-win32-x64.zip}
|
powershell if (Test-Path $(windowsRelease)) {Remove-Item $(windowsRelease)}
|
||||||
powershell Compress-Archive -Path "$(releaseFolder)"/* -DestinationPath $(executable)-$(version)-win32-x64.zip
|
powershell Compress-Archive -Path "$(releaseFolder)"/* -DestinationPath $(windowsRelease)
|
||||||
|
|
||||||
# Remove folder
|
# Remove folder
|
||||||
powershell if (Test-Path $(releaseFolder)) {Remove-Item $(releaseFolder) -Recurse -Force}
|
powershell if (Test-Path "$(releaseFolder)") {Remove-Item "$(releaseFolder)" -Recurse -Force}
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
rm -rdf data/config
|
clang++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o "$(executable)"
|
||||||
mkdir -p data/config
|
|
||||||
clang++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos
|
macos_debug:
|
||||||
|
clang++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o "$(executable)_debug"
|
||||||
|
|
||||||
macos_release:
|
macos_release:
|
||||||
# Remove data
|
# Remove data and possible data from previous builds
|
||||||
rm -rdf data/config
|
|
||||||
rm -rdf "$(releaseFolder)"
|
rm -rdf "$(releaseFolder)"
|
||||||
|
rm -rdf Frameworks
|
||||||
|
rm -f tmp.dmg
|
||||||
|
rm -f "$(macosIntelRelease)"
|
||||||
|
rm -f "$(macosAppleSiliconRelease)"
|
||||||
|
|
||||||
# Create folders
|
# Create folders
|
||||||
mkdir -p data/config
|
|
||||||
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Frameworks"
|
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Frameworks"
|
||||||
mkdir -p "$(releaseFolder)/$(appName).app/Contents/MacOS"
|
mkdir -p "$(releaseFolder)/$(appName).app/Contents/MacOS"
|
||||||
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Resources"
|
mkdir -p "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||||
@@ -62,8 +70,8 @@ macos_release:
|
|||||||
|
|
||||||
# Copy folders
|
# Copy folders
|
||||||
cp -R data "$(releaseFolder)/$(appName).app/Contents/Resources"
|
cp -R data "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||||
cp -R /Library/Frameworks/SDL2.framework "$(releaseFolder)/$(appName).app/Contents/Frameworks"
|
cp -R release/SDL2.framework "$(releaseFolder)/$(appName).app/Contents/Frameworks"
|
||||||
cp -R /Library/Frameworks/SDL2.framework Frameworks
|
cp -R release/SDL2.framework Frameworks
|
||||||
|
|
||||||
# Delete data
|
# Delete data
|
||||||
rm -f "$(releaseFolder)/$(appName).app/Contents/Resources/data/room/map.world"
|
rm -f "$(releaseFolder)/$(appName).app/Contents/Resources/data/room/map.world"
|
||||||
@@ -72,59 +80,63 @@ macos_release:
|
|||||||
# Copy files
|
# Copy files
|
||||||
cp release/*.icns "$(releaseFolder)/$(appName).app/Contents/Resources"
|
cp release/*.icns "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||||
cp release/Info.plist "$(releaseFolder)/$(appName).app/Contents"
|
cp release/Info.plist "$(releaseFolder)/$(appName).app/Contents"
|
||||||
|
cp LICENSE "$(releaseFolder)"
|
||||||
|
cp README.md "$(releaseFolder)"
|
||||||
|
|
||||||
|
# Create links
|
||||||
|
ln -s /Applications "$(releaseFolder)"/Applications
|
||||||
|
|
||||||
# Build INTEL
|
# Build INTEL
|
||||||
clang++ $(source) -D RELEASE -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
|
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
|
||||||
|
|
||||||
# Build INTEL DMG
|
# Build INTEL DMG
|
||||||
rm -f "$(executable)_macos_intel_$(version).dmg"
|
|
||||||
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
||||||
hdiutil convert tmp.dmg -format UDZO -o "$(executable)-$(version)-macos-intel.dmg"
|
hdiutil convert tmp.dmg -format UDZO -o "$(macosIntelRelease)"
|
||||||
rm tmp.dmg
|
rm -f tmp.dmg
|
||||||
|
|
||||||
# Build APPLE SILICON
|
# Build APPLE SILICON
|
||||||
clang++ $(source) -D RELEASE -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
|
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
|
||||||
|
|
||||||
# Build APPLE SILICON DMG
|
# Build APPLE SILICON DMG
|
||||||
rm -f "$(executable)_macos_apple_silicon_$(version).dmg"
|
|
||||||
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
||||||
hdiutil convert tmp.dmg -format UDZO -o "$(executable)-$(version)-macos-apple-silicon.dmg"
|
hdiutil convert tmp.dmg -format UDZO -o "$(macosAppleSiliconRelease)"
|
||||||
rm tmp.dmg
|
rm -f tmp.dmg
|
||||||
|
|
||||||
# Remove data
|
# Remove data
|
||||||
rm -rdf Frameworks
|
rm -rdf Frameworks
|
||||||
rm -rdf "$(releaseFolder)"
|
rm -rdf "$(releaseFolder)"
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
rm -rdf data/config
|
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)"
|
||||||
mkdir -p data/config
|
strip -s -R .comment -R .gnu.version "$(executable)" --strip-unneeded
|
||||||
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(executable)_linux
|
|
||||||
strip -s -R .comment -R .gnu.version $(executable)_linux --strip-unneeded
|
linux_debug:
|
||||||
|
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(executable)_debug"
|
||||||
|
strip -s -R .comment -R .gnu.version "$(executable)_debug" --strip-unneeded
|
||||||
|
|
||||||
linux_release:
|
linux_release:
|
||||||
# Remove data
|
# Remove data
|
||||||
rm -rdf data/config
|
rm -rdf "$(releaseFolder)"
|
||||||
rm -rdf $(releaseFolder)
|
|
||||||
|
|
||||||
# Create folders
|
# Create folders
|
||||||
mkdir -p data/config
|
mkdir -p "$(releaseFolder)"
|
||||||
mkdir -p $(releaseFolder)
|
|
||||||
|
|
||||||
# Copy data
|
# Copy data
|
||||||
cp -R data $(releaseFolder)
|
cp -R data "$(releaseFolder)"
|
||||||
cp LICENSE $(releaseFolder)
|
cp LICENSE "$(releaseFolder)"
|
||||||
cp README.md $(releaseFolder)
|
cp README.md "$(releaseFolder)"
|
||||||
|
|
||||||
# Delete data
|
# Delete data
|
||||||
rm -f "$(releaseFolder)/data/room/map.world"
|
rm -f "$(releaseFolder)/data/room/map.world"
|
||||||
rm -f "$(releaseFolder)/data/room/standard.tsx"
|
rm -f "$(releaseFolder)/data/room/standard.tsx"
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
g++ $(source) -D RELEASE -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(releaseFolder)/$(executable)
|
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o "$(releaseFolder)/$(executable)"
|
||||||
strip -s -R .comment -R .gnu.version $(releaseFolder)/$(executable) --strip-unneeded
|
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable)" --strip-unneeded
|
||||||
|
|
||||||
# Pack files
|
# Pack files
|
||||||
cd $(releaseFolder) && tar -czvf ../$(executable)-$(version)-linux.tar.gz *
|
rm -f "$(linuxRelease)"
|
||||||
|
cd "$(releaseFolder)" && tar -czvf "../$(linuxRelease)" *
|
||||||
|
|
||||||
# Remove data
|
# Remove data
|
||||||
rm -rdf $(releaseFolder)
|
rm -rdf "$(releaseFolder)"
|
||||||
72
README.md
@@ -1,37 +1,89 @@
|
|||||||
# JailDoctor's Dilemma
|
# JailDoctor's Dilemma
|
||||||
|
|
||||||
JailDoc es un Jailer. A los Jailers les gusta empezar proyectos. A nadie le gusta terminarlos. Los Jailers viven en la Jail. A la Jail va uno a empezar proyectos. A la Jail va uno a enseñar sus proyectos. A la Jail va uno a aprender como empezar nuevos proyectos. A la Jail va uno a ayudar a sus compañeros a que empiecen nuevos proyectos.
|
JailDoc es un Jailer. A los Jailers les gusta empezar proyectos. A nadie le gusta terminarlos. Los Jailers viven en la Jail. A la Jail va uno a empezar proyectos. A la Jail va uno a enseñar sus proyectos. A la Jail va uno a aprender como empezar nuevos proyectos. A la Jail va uno a ayudar a sus compañeros a que empiecen nuevos proyectos.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JailDoc es un Jailer destacado entre los Jailers. Tiene más proyectos empezados que nadie y es el que más ayuda a que los demas empiecen los suyos.
|
JailDoc es un Jailer destacado entre los Jailers. Tiene más proyectos empezados que nadie y es el que más ayuda a que los demas empiecen los suyos.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Un día, ocurrió algo. Alguien terminó un proyecto. Alguien liberó el *Puzzle Jail Facker*. Algún desaprensivo.
|
Un día, ocurrió algo. Alguien terminó un proyecto. Alguien liberó el *Puzzle Jail Facker*. Algún desaprensivo.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Esto hizo que JailDoc decidiera terminar y entregar uno de sus proyectos, pero, ¿cual? ¿JailBattle? ¿Sigmasuá? ¿Calculín Doom? Menudo dilema. JailDoc se arremangó y decidió finalizar y entregar todos sus proyectos inacabados. ¿Lo logrará?
|
Esto hizo que JailDoc decidiera terminar y entregar uno de sus proyectos, pero, ¿cual? ¿JailBattle? ¿Sigmasuá? ¿Calculín Doom? Menudo dilema. JailDoc se arremangó y decidió finalizar y entregar todos sus proyectos inacabados. ¿Lo logrará?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Jugabilidad
|
## Jugabilidad
|
||||||
|
|
||||||
Ayuda a JailDoc a recuperar las partes de su proyecto que estan desperdigadas por cualquier lugar del Universo Jailer. Hay mas de **150 piezas** desperdigadas por **60 pantallas**. Algunas son un paseo, pero en otras tendras que calcular muy bien tus movimientos si no quieres acabar como un arounder del montón.
|
Ayuda a JailDoc a recuperar las partes de su proyecto que estan desperdigadas por cualquier lugar del Universo Jailer. Hay mas de **150 piezas** desperdigadas por **60 pantallas**. Algunas son un paseo, pero en otras tendras que calcular muy bien tus movimientos si no quieres acabar como un arounder del montón.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Cuando consigas recuperar gran parte de las piezas desperdigadas, dirigete a la Jail a mostrar a los Jailers como se termina un proyecto. Ten en cuenta que Bry no te dejará entrar. Solo aquellos que han realizado un *Fire Effect* o un *Facedor de Tornejos* son dignos de tal privilegio.
|
Cuando consigas recuperar gran parte de las piezas desperdigadas, dirigete a la Jail a mostrar a los Jailers como se termina un proyecto. Ten en cuenta que Bry no te dejará entrar. Solo aquellos que han realizado un *Fire Effect* o un *Facedor de Tornejos* son dignos de tal privilegio.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Controles
|
## Controles
|
||||||
|
|
||||||
El juego permite tanto el uso del teclado como de un mando de control. Las teclas para manejar el juego son las siguientes:
|
El juego permite tanto el uso del teclado como de un mando de control. Las teclas para manejar el juego son las siguientes:
|
||||||
|
|
||||||
- **Cursores**: Para mover a izquierda o derecha a JailDoc y para saltar
|
|
||||||
- **Tecla M**: Activa o desactiva la música
|
|
||||||
- **Tecla P**: Pone en pausa el juego
|
- **Cursores**: Para mover a izquierda o derecha a JailDoc y para saltar. En el fichero de configuración se pueden cambiar las teclas por otras opciones prefijadas: O, P para moverse y Q para saltar o A, D para moverse y W para saltar.
|
||||||
- **Tecla ESC**: Sale del juego si estas jugando. Sale del programa en cualquier otra circunstancia
|
|
||||||
- **Tecla F**: Cambia a modo de pantalla completa o de ventana
|
- **Tecla M**: Activa o desactiva la música
|
||||||
- **Teclas F1 a F4**: Cambian el tamaño de la ventana
|
|
||||||
- **Tecla B**: Activa o desactiva el borde de colores de la pantalla cuando el programa se ejecuta en modo de ventana
|
- **Tecla P**: Pone en pausa el juego
|
||||||
|
|
||||||
|
- **Tecla ESC**: Sale del juego si estas jugando. Sale del programa en cualquier otra circunstancia
|
||||||
|
|
||||||
|
- **Tecla F1**: Disminuye el tamaño de la ventana
|
||||||
|
|
||||||
|
- **Tecla F2**: Aumenta el tamaño de la ventana
|
||||||
|
|
||||||
|
- **Tecla F3**: Cambia entre el modo de pantalla completa y el de ventana
|
||||||
|
|
||||||
|
- **Tecla F5**: Cambia la paleta de colores del juego
|
||||||
|
|
||||||
|
- **Tecla B**: Activa o desactiva el borde de colores de la pantalla cuando el programa se ejecuta en modo de ventana
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Datos del programa
|
||||||
|
El programa guarda automáticamente la configuración del modo de video y las estadísticas de juego en tu carpeta personal del sistema. Esta carpeta tiene una ubicación distinta en función del sistema operativo que utilices.
|
||||||
|
|
||||||
|
En **Windows** se encuentra en:
|
||||||
|
`C:\Users\<nombre_de_usuario>\AppData\Roaming\jailgames\jaildoctors_dilemma`
|
||||||
|
|
||||||
|
En **MacOS** se encuentra en:
|
||||||
|
`~/Library/Application Support/jailgames/jaildoctors_dilemma`
|
||||||
|
|
||||||
|
En **Linux** se encuentra en:
|
||||||
|
`~/./jailgames/jaildoctors_dilemma`
|
||||||
|
|
||||||
|
En la carpeta está el fichero de configuración `config.txt` donde se puede modificar la configuración para conectarse al servicio online y los ficheros `stats.csv` y `stats_buffer.csv` con información de las estadisticas de juego.
|
||||||
|
|
||||||
## Agradecimientos
|
## Agradecimientos
|
||||||
Agradecimientos como siempre a todos los Jailers por motivarme a hacer el juego y ayudarme en los momentos de duda a la hora de escribir el código. Y como siempre, en especial a JailDoc por su unidad de Jail_Audio y cualquier otro código que haya necesitado para terminar el programa.
|
|
||||||
|
|
||||||
Si no me he descontado, este es el cuarto juego juego que consigo crear.
|
Agradecimientos como siempre a todos los Jailers por motivarme a hacer el juego y ayudarme en los momentos de duda a la hora de escribir el código. Y, como siempre, en especial a JailDoc por su unidad de Jail_Audio y cualquier otro código/ayuda/enseñanzas que haya necesitado para terminar el programa.
|
||||||
|
|
||||||
*13 de noviembre de 2022, JailDesigner*
|
|
||||||
|
|
||||||
|
Si no me he descontado, este es el cuarto juego que consigo crear.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*13 de noviembre de 2022, JailDesigner*
|
||||||
@@ -5,5 +5,5 @@ frameHeight=16
|
|||||||
name=default
|
name=default
|
||||||
speed=6
|
speed=6
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1,2,3,4,5,6,7,8
|
frames=0,1,2,3,4,5
|
||||||
[/animation]
|
[/animation]
|
||||||
|
Before Width: | Height: | Size: 592 B After Width: | Height: | Size: 630 B |
|
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 271 B |
|
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 122 B |
|
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
|
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 189 B |
|
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 378 B |
@@ -3,7 +3,7 @@ frameHeight=16
|
|||||||
|
|
||||||
[animation]
|
[animation]
|
||||||
name=default
|
name=default
|
||||||
speed=8
|
speed=4
|
||||||
loop=0
|
loop=0
|
||||||
frames=0,1,2,3
|
frames=0,1,2,3,4,5,6,7
|
||||||
[/animation]
|
[/animation]
|
||||||
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
BIN
data/font/gauntlet.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
194
data/font/gauntlet.txt
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
# box width
|
||||||
|
8
|
||||||
|
# box height
|
||||||
|
8
|
||||||
|
# 32 espacio ( )
|
||||||
|
6
|
||||||
|
# 33 !
|
||||||
|
2
|
||||||
|
# 34 "
|
||||||
|
5
|
||||||
|
# 35 #
|
||||||
|
6
|
||||||
|
# 36 $
|
||||||
|
6
|
||||||
|
# 37 %
|
||||||
|
7
|
||||||
|
# 38 &
|
||||||
|
7
|
||||||
|
# 39 '
|
||||||
|
2
|
||||||
|
# 40 (
|
||||||
|
4
|
||||||
|
# 41 )
|
||||||
|
4
|
||||||
|
# 42 *
|
||||||
|
6
|
||||||
|
# 43 +
|
||||||
|
8
|
||||||
|
# 44 ,
|
||||||
|
2
|
||||||
|
# 45 -
|
||||||
|
7
|
||||||
|
# 46 .
|
||||||
|
2
|
||||||
|
# 47 /
|
||||||
|
7
|
||||||
|
# 48 0
|
||||||
|
7
|
||||||
|
# 49 1
|
||||||
|
6
|
||||||
|
# 50 2
|
||||||
|
6
|
||||||
|
# 51 3
|
||||||
|
6
|
||||||
|
# 52 4
|
||||||
|
7
|
||||||
|
# 53 5
|
||||||
|
6
|
||||||
|
# 54 6
|
||||||
|
6
|
||||||
|
# 55 7
|
||||||
|
6
|
||||||
|
# 56 8
|
||||||
|
6
|
||||||
|
# 57 9
|
||||||
|
6
|
||||||
|
# 58 :
|
||||||
|
2
|
||||||
|
# 59 ;
|
||||||
|
2
|
||||||
|
# 60 <
|
||||||
|
5
|
||||||
|
# 61 =
|
||||||
|
6
|
||||||
|
# 62 >
|
||||||
|
5
|
||||||
|
# 63 ?
|
||||||
|
6
|
||||||
|
# 64 @
|
||||||
|
6
|
||||||
|
# 65 A
|
||||||
|
6
|
||||||
|
# 66 B
|
||||||
|
7
|
||||||
|
# 67 C
|
||||||
|
7
|
||||||
|
# 68 D
|
||||||
|
7
|
||||||
|
# 69 E
|
||||||
|
7
|
||||||
|
# 70 F
|
||||||
|
7
|
||||||
|
# 71 G
|
||||||
|
7
|
||||||
|
# 72 H
|
||||||
|
6
|
||||||
|
# 73 I
|
||||||
|
6
|
||||||
|
# 74 J
|
||||||
|
7
|
||||||
|
# 75 K
|
||||||
|
7
|
||||||
|
# 76 L
|
||||||
|
7
|
||||||
|
# 77 M
|
||||||
|
7
|
||||||
|
# 78 N
|
||||||
|
7
|
||||||
|
# 79 O
|
||||||
|
7
|
||||||
|
# 80 P
|
||||||
|
7
|
||||||
|
# 81 Q
|
||||||
|
7
|
||||||
|
# 82 R
|
||||||
|
7
|
||||||
|
# 83 S
|
||||||
|
6
|
||||||
|
# 84 T
|
||||||
|
6
|
||||||
|
# 85 U
|
||||||
|
6
|
||||||
|
# 86 V
|
||||||
|
6
|
||||||
|
# 87 W
|
||||||
|
7
|
||||||
|
# 88 X
|
||||||
|
7
|
||||||
|
# 89 Y
|
||||||
|
6
|
||||||
|
# 90 Z
|
||||||
|
7
|
||||||
|
# 91 [
|
||||||
|
8
|
||||||
|
# 92 \
|
||||||
|
3
|
||||||
|
# 93 ]
|
||||||
|
7
|
||||||
|
# 94 ^
|
||||||
|
7
|
||||||
|
# 95 _
|
||||||
|
8
|
||||||
|
# 96 `
|
||||||
|
0
|
||||||
|
# 97 a
|
||||||
|
6
|
||||||
|
# 98 b
|
||||||
|
7
|
||||||
|
# 99 c
|
||||||
|
7
|
||||||
|
# 100 d
|
||||||
|
7
|
||||||
|
# 101 e
|
||||||
|
7
|
||||||
|
# 102 f
|
||||||
|
7
|
||||||
|
# 103 g
|
||||||
|
7
|
||||||
|
# 104 h
|
||||||
|
6
|
||||||
|
# 105 i
|
||||||
|
6
|
||||||
|
# 106 j
|
||||||
|
7
|
||||||
|
# 107 k
|
||||||
|
7
|
||||||
|
# 108 l
|
||||||
|
7
|
||||||
|
# 109 m
|
||||||
|
7
|
||||||
|
# 110 n
|
||||||
|
7
|
||||||
|
# 111 o
|
||||||
|
7
|
||||||
|
# 112 p
|
||||||
|
7
|
||||||
|
# 113 q
|
||||||
|
7
|
||||||
|
# 114 r
|
||||||
|
7
|
||||||
|
# 115 s
|
||||||
|
6
|
||||||
|
# 116 t
|
||||||
|
6
|
||||||
|
# 117 u
|
||||||
|
6
|
||||||
|
# 118 v
|
||||||
|
6
|
||||||
|
# 119 w
|
||||||
|
7
|
||||||
|
# 120 x
|
||||||
|
7
|
||||||
|
# 121 y
|
||||||
|
6
|
||||||
|
# 122 z
|
||||||
|
7
|
||||||
|
# 123 {
|
||||||
|
0
|
||||||
|
# 124 |
|
||||||
|
0
|
||||||
|
# 125 }
|
||||||
|
0
|
||||||
|
# 126 ~
|
||||||
|
0
|
||||||
BIN
data/font/subatomic.png
Normal file
|
After Width: | Height: | Size: 902 B |
194
data/font/subatomic.txt
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
# box width
|
||||||
|
7
|
||||||
|
# box height
|
||||||
|
7
|
||||||
|
# 32 espacio ( )
|
||||||
|
4
|
||||||
|
# 33 !
|
||||||
|
1
|
||||||
|
# 34 "
|
||||||
|
3
|
||||||
|
# 35 #
|
||||||
|
5
|
||||||
|
# 36 $
|
||||||
|
5
|
||||||
|
# 37 %
|
||||||
|
5
|
||||||
|
# 38 &
|
||||||
|
6
|
||||||
|
# 39 '
|
||||||
|
1
|
||||||
|
# 40 (
|
||||||
|
2
|
||||||
|
# 41 )
|
||||||
|
2
|
||||||
|
# 42 *
|
||||||
|
5
|
||||||
|
# 43 +
|
||||||
|
5
|
||||||
|
# 44 ,
|
||||||
|
1
|
||||||
|
# 45 -
|
||||||
|
5
|
||||||
|
# 46 .
|
||||||
|
1
|
||||||
|
# 47 /
|
||||||
|
5
|
||||||
|
# 48 0
|
||||||
|
5
|
||||||
|
# 49 1
|
||||||
|
2
|
||||||
|
# 50 2
|
||||||
|
5
|
||||||
|
# 51 3
|
||||||
|
5
|
||||||
|
# 52 4
|
||||||
|
5
|
||||||
|
# 53 5
|
||||||
|
5
|
||||||
|
# 54 6
|
||||||
|
5
|
||||||
|
# 55 7
|
||||||
|
5
|
||||||
|
# 56 8
|
||||||
|
5
|
||||||
|
# 57 9
|
||||||
|
5
|
||||||
|
# 58 :
|
||||||
|
1
|
||||||
|
# 59 ;
|
||||||
|
2
|
||||||
|
# 60 <
|
||||||
|
3
|
||||||
|
# 61 =
|
||||||
|
5
|
||||||
|
# 62 >
|
||||||
|
3
|
||||||
|
# 63 ?
|
||||||
|
4
|
||||||
|
# 64 @
|
||||||
|
5
|
||||||
|
# 65 A
|
||||||
|
5
|
||||||
|
# 66 B
|
||||||
|
5
|
||||||
|
# 67 C
|
||||||
|
5
|
||||||
|
# 68 D
|
||||||
|
5
|
||||||
|
# 69 E
|
||||||
|
4
|
||||||
|
# 70 F
|
||||||
|
5
|
||||||
|
# 71 G
|
||||||
|
5
|
||||||
|
# 72 H
|
||||||
|
5
|
||||||
|
# 73 I
|
||||||
|
1
|
||||||
|
# 74 J
|
||||||
|
5
|
||||||
|
# 75 K
|
||||||
|
5
|
||||||
|
# 76 L
|
||||||
|
2
|
||||||
|
# 77 M
|
||||||
|
5
|
||||||
|
# 78 N
|
||||||
|
5
|
||||||
|
# 79 O
|
||||||
|
5
|
||||||
|
# 80 P
|
||||||
|
5
|
||||||
|
# 81 Q
|
||||||
|
5
|
||||||
|
# 82 R
|
||||||
|
5
|
||||||
|
# 83 S
|
||||||
|
5
|
||||||
|
# 84 T
|
||||||
|
5
|
||||||
|
# 85 U
|
||||||
|
5
|
||||||
|
# 86 V
|
||||||
|
5
|
||||||
|
# 87 W
|
||||||
|
5
|
||||||
|
# 88 X
|
||||||
|
5
|
||||||
|
# 89 Y
|
||||||
|
5
|
||||||
|
# 90 Z
|
||||||
|
5
|
||||||
|
# 91 [
|
||||||
|
2
|
||||||
|
# 92 \
|
||||||
|
5
|
||||||
|
# 93 ]
|
||||||
|
2
|
||||||
|
# 94 ^
|
||||||
|
3
|
||||||
|
# 95 _
|
||||||
|
5
|
||||||
|
# 96 `
|
||||||
|
2
|
||||||
|
# 97 a
|
||||||
|
4
|
||||||
|
# 98 b
|
||||||
|
4
|
||||||
|
# 99 c
|
||||||
|
3
|
||||||
|
# 100 d
|
||||||
|
4
|
||||||
|
# 101 e
|
||||||
|
4
|
||||||
|
# 102 f
|
||||||
|
3
|
||||||
|
# 103 g
|
||||||
|
4
|
||||||
|
# 104 h
|
||||||
|
4
|
||||||
|
# 105 i
|
||||||
|
1
|
||||||
|
# 106 j
|
||||||
|
2
|
||||||
|
# 107 k
|
||||||
|
3
|
||||||
|
# 108 l
|
||||||
|
1
|
||||||
|
# 109 m
|
||||||
|
5
|
||||||
|
# 110 n
|
||||||
|
4
|
||||||
|
# 111 o
|
||||||
|
4
|
||||||
|
# 112 p
|
||||||
|
4
|
||||||
|
# 113 q
|
||||||
|
4
|
||||||
|
# 114 r
|
||||||
|
3
|
||||||
|
# 115 s
|
||||||
|
4
|
||||||
|
# 116 t
|
||||||
|
2
|
||||||
|
# 117 u
|
||||||
|
4
|
||||||
|
# 118 v
|
||||||
|
4
|
||||||
|
# 119 w
|
||||||
|
5
|
||||||
|
# 120 x
|
||||||
|
3
|
||||||
|
# 121 y
|
||||||
|
4
|
||||||
|
# 122 z
|
||||||
|
4
|
||||||
|
# 123 {
|
||||||
|
0
|
||||||
|
# 124 |
|
||||||
|
0
|
||||||
|
# 125 }
|
||||||
|
0
|
||||||
|
# 126 ~
|
||||||
|
0
|
||||||
BIN
data/notifications/notify.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
@@ -9,8 +9,8 @@ roomLeft=0
|
|||||||
roomRight=02.room
|
roomRight=02.room
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jailer.png
|
tileSetFile=jailer_#1.png
|
||||||
animation=jailer.ani
|
animation=jailer_#1.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=1
|
x=1
|
||||||
@@ -25,8 +25,8 @@ color=white
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jailer3.png
|
tileSetFile=jailer_#3.png
|
||||||
animation=jailer3.ani
|
animation=jailer_#3.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=4
|
x=4
|
||||||
@@ -41,8 +41,8 @@ color=white
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jailer.png
|
tileSetFile=jailer_#1.png
|
||||||
animation=jailer.ani
|
animation=jailer_#1.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=7
|
x=7
|
||||||
@@ -57,8 +57,8 @@ color=white
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jailer2.png
|
tileSetFile=jailer_#2.png
|
||||||
animation=jailer2.ani
|
animation=jailer_#2.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=10
|
x=10
|
||||||
@@ -73,8 +73,8 @@ color=white
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jailer.png
|
tileSetFile=jailer_#1.png
|
||||||
animation=jailer.ani
|
animation=jailer_#1.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=13
|
x=13
|
||||||
@@ -89,8 +89,8 @@ color=white
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=printer.png
|
tileSetFile=elsa.png
|
||||||
animation=printer.ani
|
animation=elsa.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=3
|
x=3
|
||||||
@@ -105,8 +105,8 @@ color=white
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=printer.png
|
tileSetFile=elsa.png
|
||||||
animation=printer.ani
|
animation=elsa.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=6
|
x=6
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<tileset firstgid="1" source="standard.tsx"/>
|
<tileset firstgid="1" source="standard.tsx"/>
|
||||||
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
||||||
<data encoding="csv">
|
<data encoding="csv">
|
||||||
164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
|
192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
|
||||||
164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,164,
|
168,166,185,167,166,185,166,166,168,166,166,167,166,166,185,166,166,43,43,43,43,43,43,43,43,43,43,43,43,43,43,166,
|
||||||
164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
211,181,211,213,211,181,211,212,213,211,181,211,211,212,211,213,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
||||||
164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,164,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
||||||
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,
|
||||||
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
|
43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name=ROAD TO THE JAIL
|
name=ROAD TO THE JAIL
|
||||||
bgColor=black
|
bgColor=black
|
||||||
border=cyan
|
border=blue
|
||||||
tileMapFile=02.tmx
|
tileMapFile=02.tmx
|
||||||
tileSetFile=standard.png
|
tileSetFile=standard.png
|
||||||
roomUp=0
|
roomUp=0
|
||||||
|
|||||||
@@ -3,22 +3,22 @@
|
|||||||
<tileset firstgid="1" source="standard.tsx"/>
|
<tileset firstgid="1" source="standard.tsx"/>
|
||||||
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
||||||
<data encoding="csv">
|
<data encoding="csv">
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,43,43,43,43,
|
192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,43,43,43,43,43,
|
||||||
43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,25,
|
43,166,166,167,168,166,185,167,166,185,166,166,168,166,166,167,166,166,185,166,166,166,185,167,166,166,166,185,25,25,25,25,
|
||||||
43,43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,0,0,0,
|
43,43,211,212,212,211,181,211,213,211,181,211,212,213,211,181,211,211,211,211,212,213,211,181,211,213,181,211,135,0,0,0,
|
||||||
43,43,43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,0,0,0,
|
43,43,43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,0,0,0,
|
||||||
43,43,43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,25,
|
43,43,43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,25,
|
||||||
34,34,304,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,
|
34,34,304,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,
|
||||||
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,303,25,25,
|
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,303,25,25,
|
||||||
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,
|
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,
|
||||||
34,34,0,413,413,413,413,0,0,0,0,413,413,413,413,413,0,0,0,0,413,413,413,413,413,413,413,0,0,0,25,25,
|
34,34,0,413,413,413,413,0,0,0,0,413,304,413,413,413,0,0,0,0,413,304,413,413,413,413,304,0,0,0,25,25,
|
||||||
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,
|
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,
|
||||||
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,387,25,25,
|
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,411,25,25,
|
||||||
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,
|
34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,
|
||||||
34,34,389,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,387,25,25,
|
34,34,413,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,411,25,25,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,513,190,189,190,537,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,524,189,191,548,0,0,0,0,
|
||||||
34,34,189,190,189,190,189,190,189,190,189,190,189,190,189,190,189,190,189,191,0,0,189,190,189,190,189,190,189,190,25,25
|
34,34,189,190,189,190,189,190,189,190,189,190,189,190,189,190,189,190,189,191,0,0,189,190,189,190,189,190,189,191,25,25
|
||||||
</data>
|
</data>
|
||||||
</layer>
|
</layer>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ itemColor1=bright_green
|
|||||||
itemColor2=green
|
itemColor2=green
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=diskette.png
|
tileSetFile=floppy.png
|
||||||
animation=diskette.ani
|
animation=floppy.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=15
|
x=15
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
134,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,
|
134,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,
|
||||||
25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,
|
25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,
|
||||||
25,0,0,0,0,0,0,0,0,0,0,417,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,
|
25,0,0,0,0,0,0,0,0,0,0,417,417,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,
|
||||||
25,0,0,556,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,0,0,0,0,0,0,0,0,0,387,25,
|
25,0,0,556,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,0,0,0,0,0,0,0,0,0,0,25,
|
||||||
25,25,25,25,25,25,0,0,0,417,417,0,0,0,0,0,0,0,305,31,0,0,0,0,0,0,0,0,0,0,0,305,
|
25,25,25,25,25,25,0,0,0,417,417,0,0,0,0,0,0,0,305,31,0,0,0,0,0,0,0,0,0,0,0,305,
|
||||||
0,0,0,0,305,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,417,417,0,0,0,0,0,0,
|
0,0,0,0,305,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,417,417,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,417,417,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,417,417,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
0,0,0,0,0,0,0,0,531,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,
|
0,0,0,0,0,0,0,0,531,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,
|
||||||
0,0,0,0,0,0,0,0,0,531,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,
|
0,0,0,0,0,0,0,0,0,531,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,
|
||||||
0,0,0,0,0,0,0,0,0,0,349,349,349,349,349,349,349,349,349,349,349,538,0,0,0,0,0,0,0,0,0,17,
|
0,0,0,0,0,0,0,0,0,0,349,349,349,349,349,349,349,349,349,349,349,538,0,0,0,0,0,0,0,0,0,17,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,41,41,41,41,349,349,349,349,349,349,349,349,349,349,0,0,349,349,349
|
563,563,563,563,563,563,563,563,563,563,0,0,0,41,41,41,41,349,349,349,349,349,349,349,349,349,349,0,0,349,349,349
|
||||||
</data>
|
</data>
|
||||||
</layer>
|
</layer>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ itemColor1=red
|
|||||||
itemColor2=magenta
|
itemColor2=magenta
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=diskette.png
|
tileSetFile=floppy.png
|
||||||
animation=diskette.ani
|
animation=floppy.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=9
|
x=9
|
||||||
@@ -27,8 +27,8 @@ color=green
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=diskette.png
|
tileSetFile=floppy.png
|
||||||
animation=diskette.ani
|
animation=floppy.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=1
|
x=1
|
||||||
|
|||||||
@@ -9,13 +9,13 @@
|
|||||||
25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
25,0,0,0,527,25,25,25,25,25,25,25,25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
25,0,0,0,527,25,25,25,25,25,25,25,25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,25,25,25,0,0,0,0,0,0,0,0,0,0,0,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,25,25,25,0,0,0,0,0,0,0,0,0,0,0,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,527,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,527,25,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,551,0,0,0,0,0,0,0,0,0,527,25,25,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,551,0,0,0,0,0,0,0,0,0,527,25,25,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,25,0,0,0,0,0,25,25,25,25,25,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,25,0,0,0,0,0,25,25,25,25,25,
|
||||||
25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
25,25,25,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,251,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,251,0,0,0,0,0,25,25,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,
|
||||||
0,0,0,0,395,395,395,395,395,371,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,0,0,0,0,0,0,0,
|
0,0,0,0,395,395,395,395,395,371,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,0,0,0,0,0,0,25,
|
||||||
0,0,0,0,0,0,0,0,0,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
25,25,551,0,0,0,0,0,0,347,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
25,25,551,0,0,0,0,0,0,347,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25
|
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ animation=tuno.ani
|
|||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=28
|
x=28
|
||||||
y=8
|
y=6
|
||||||
vx=0
|
vx=0
|
||||||
vy=0.4
|
vy=-0.4
|
||||||
x1=28
|
x1=28
|
||||||
y1=2
|
y1=2
|
||||||
x2=28
|
x2=28
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ flip=true
|
|||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=bat.png
|
tileSetFile=bat.png
|
||||||
animation=bat.ani
|
animation=bat.ani
|
||||||
width=9
|
width=8
|
||||||
height=7
|
height=7
|
||||||
x=14
|
x=14
|
||||||
y=2
|
y=2
|
||||||
@@ -46,7 +46,7 @@ color=bright_blue
|
|||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=bat.png
|
tileSetFile=bat.png
|
||||||
animation=bat.ani
|
animation=bat.ani
|
||||||
width=9
|
width=8
|
||||||
height=7
|
height=7
|
||||||
x=10
|
x=10
|
||||||
y=10
|
y=10
|
||||||
@@ -62,7 +62,7 @@ color=cyan
|
|||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=bat.png
|
tileSetFile=bat.png
|
||||||
animation=bat.ani
|
animation=bat.ani
|
||||||
width=9
|
width=8
|
||||||
height=7
|
height=7
|
||||||
x=15
|
x=15
|
||||||
y=1
|
y=1
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
||||||
<data encoding="csv">
|
<data encoding="csv">
|
||||||
16,16,16,16,16,0,16,16,16,16,349,349,349,349,349,349,349,349,349,349,302,0,0,302,302,16,16,16,16,16,16,16,
|
16,16,16,16,16,0,16,16,16,16,349,349,349,349,349,349,349,349,349,349,302,0,0,302,302,16,16,16,16,16,16,16,
|
||||||
16,16,0,0,0,0,0,349,16,349,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,
|
16,16,302,0,0,0,0,349,16,349,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,302,16,16,
|
||||||
16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
16,302,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,302,16,
|
||||||
16,0,0,0,0,349,0,0,16,0,0,0,0,0,0,0,0,0,0,0,423,423,423,423,423,0,0,0,0,0,0,16,
|
16,0,0,0,0,349,0,0,16,0,0,0,0,0,0,0,0,0,0,0,423,423,423,423,423,0,0,0,0,0,0,16,
|
||||||
16,0,0,0,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
16,0,0,0,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
||||||
16,0,0,0,0,0,0,16,16,16,16,0,0,0,423,0,0,0,423,547,0,0,0,0,0,0,0,0,0,0,0,16,
|
16,0,0,0,0,0,302,16,16,16,16,0,0,0,423,0,0,0,423,547,0,0,0,0,0,0,0,0,0,0,0,16,
|
||||||
16,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,547,0,0,0,0,424,422,424,422,0,0,16,
|
16,0,0,0,0,0,0,302,16,16,0,0,0,0,0,0,0,0,0,0,547,0,0,0,0,424,422,424,422,0,0,16,
|
||||||
16,0,0,424,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,422,0,0,0,0,0,0,0,0,0,16,
|
16,0,0,424,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,422,0,0,0,0,0,0,0,0,0,16,
|
||||||
16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,422,0,0,0,0,422,0,0,0,0,0,0,0,422,16,
|
16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,422,0,0,0,0,422,0,0,0,0,0,0,0,422,16,
|
||||||
16,422,547,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
16,422,547,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ itemColor1=yellow
|
|||||||
itemColor2=red
|
itemColor2=red
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=diskette.png
|
tileSetFile=floppy.png
|
||||||
animation=diskette.ani
|
animation=floppy.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=5
|
x=5
|
||||||
@@ -27,8 +27,8 @@ color=green
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=diskette.png
|
tileSetFile=floppy.png
|
||||||
animation=diskette.ani
|
animation=floppy.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=12
|
x=12
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
<tileset firstgid="1" source="standard.tsx"/>
|
<tileset firstgid="1" source="standard.tsx"/>
|
||||||
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
||||||
<data encoding="csv">
|
<data encoding="csv">
|
||||||
5,5,5,5,5,5,5,5,5,5,5,0,0,0,506,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
5,5,5,5,5,5,5,5,0,0,0,0,0,0,506,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
|
||||||
5,5,5,5,5,5,5,5,0,0,0,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,
|
5,5,5,5,5,5,5,0,0,0,0,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,
|
||||||
5,5,5,5,5,5,5,0,0,0,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
5,5,5,5,5,5,5,0,0,0,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
||||||
5,5,5,5,5,5,5,0,0,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
5,5,5,5,5,5,5,0,0,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
||||||
5,5,5,5,5,5,5,0,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
5,5,5,5,5,5,5,0,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
||||||
0,0,0,0,0,0,134,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
5,5,5,5,173,0,134,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
||||||
0,0,0,0,0,0,134,0,415,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
557,557,557,557,557,557,134,0,415,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
||||||
5,5,5,5,5,5,5,415,415,415,530,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
5,5,5,5,5,5,5,415,415,415,530,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
||||||
5,5,5,5,5,5,5,0,0,0,0,530,0,0,0,0,0,0,449,449,449,449,449,449,449,449,449,449,449,449,449,5,
|
5,5,5,5,5,5,0,0,0,0,0,530,0,0,0,0,0,0,449,449,449,449,449,449,449,449,449,449,449,449,449,5,
|
||||||
5,5,5,5,5,5,5,0,0,0,0,0,530,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
5,5,5,5,5,0,0,0,0,0,0,0,530,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,530,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,517,367,5,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,530,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,517,367,5,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,367,367,367,367,429,429,0,429,429,367,367,367,367,367,367,367,367,5,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,367,367,367,367,429,429,0,429,429,367,367,367,367,367,367,367,367,5,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,343,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,343,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,
|
||||||
|
|||||||
@@ -4,15 +4,15 @@
|
|||||||
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
||||||
<data encoding="csv">
|
<data encoding="csv">
|
||||||
349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
|
349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,38,38,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,38,38,38,0,0,0,0,0,0,0,0,0,0,0,0,0,188,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,241,241,0,0,0,0,0,0,241,241,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,241,241,0,0,0,0,0,0,241,241,0,0,0,0,0,0,0,0,0,0,188,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,
|
||||||
0,0,0,0,0,0,38,38,241,241,0,0,0,0,0,0,0,0,0,0,0,0,241,241,38,38,0,0,0,0,0,0,
|
0,0,0,0,0,0,38,38,241,241,0,0,0,0,0,0,0,0,0,0,0,0,241,241,38,38,0,0,0,0,0,188,
|
||||||
0,0,0,0,0,38,38,0,0,0,0,241,241,0,0,0,0,0,0,241,241,0,0,0,0,38,38,0,0,0,0,0,
|
0,0,0,0,0,38,38,0,0,0,0,241,241,0,0,0,0,0,0,241,241,0,0,0,0,38,38,0,0,0,0,0,
|
||||||
0,0,0,0,38,38,0,0,0,0,0,0,0,0,241,241,241,241,0,0,0,0,0,0,0,0,38,38,0,0,0,0,
|
0,0,0,0,38,38,0,0,0,0,0,0,0,0,241,241,241,241,0,0,0,0,0,0,0,0,38,38,0,0,0,0,
|
||||||
0,0,0,0,38,0,0,0,0,0,0,241,241,0,0,0,0,0,0,241,241,0,0,0,0,0,0,38,0,0,0,0,
|
0,0,0,0,38,0,0,0,0,0,0,241,241,0,0,0,0,0,0,241,241,0,0,0,0,0,0,38,0,0,0,0,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ itemColor1=yellow
|
|||||||
itemColor2=cyan
|
itemColor2=cyan
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
|
# Batman tocando la campana
|
||||||
tileSetFile=batman_bell.png
|
tileSetFile=batman_bell.png
|
||||||
animation=batman_bell.ani
|
animation=batman_bell.ani
|
||||||
width=16
|
width=16
|
||||||
@@ -27,6 +28,7 @@ color=cyan
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
|
# Campana de Batman
|
||||||
tileSetFile=bell.png
|
tileSetFile=bell.png
|
||||||
animation=bell.ani
|
animation=bell.ani
|
||||||
width=16
|
width=16
|
||||||
@@ -68,7 +70,7 @@ height=16
|
|||||||
x=6
|
x=6
|
||||||
y=4
|
y=4
|
||||||
vx=0
|
vx=0
|
||||||
vy=0.5
|
vy=0.4
|
||||||
x1=6
|
x1=6
|
||||||
y1=4
|
y1=4
|
||||||
x2=6
|
x2=6
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ roomLeft=26.room
|
|||||||
roomRight=0
|
roomRight=0
|
||||||
|
|
||||||
#[enemy]
|
#[enemy]
|
||||||
#tileSetFile=diskette.png
|
#tileSetFile=floppy.png
|
||||||
#animation=diskette.ani
|
#animation=floppy.ani
|
||||||
#width=16
|
#width=16
|
||||||
#height=16
|
#height=16
|
||||||
#x=2
|
#x=2
|
||||||
|
|||||||
@@ -3,17 +3,17 @@
|
|||||||
<tileset firstgid="1" source="standard.tsx"/>
|
<tileset firstgid="1" source="standard.tsx"/>
|
||||||
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
||||||
<data encoding="csv">
|
<data encoding="csv">
|
||||||
90,89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,90,41,235,235,0,0,235,235,41,89,90,89,
|
90,89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,94,41,235,235,0,0,235,235,41,89,90,89,
|
||||||
89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,90,
|
89,94,215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,214,215,0,0,0,0,0,0,0,0,214,89,90,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,
|
214,215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,214,89,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,235,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,235,0,0,0,0,0,214,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,235,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,235,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,0,0,0,0,0,
|
89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,0,0,0,0,0,
|
||||||
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,0,
|
94,215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,0,
|
||||||
89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,415,415,415,415,415,
|
94,215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,415,415,415,415,415,
|
||||||
89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,0,0,0,0,0,0,
|
89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,0,0,0,0,0,0,0,0,0,0,
|
||||||
90,89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
90,89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
89,90,89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
89,90,89,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ itemColor1=green
|
|||||||
itemColor2=red
|
itemColor2=red
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=diskette.png
|
tileSetFile=floppy.png
|
||||||
animation=diskette.ani
|
animation=floppy.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=20
|
x=20
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
116,0,0,0,377,377,377,0,0,0,0,0,0,115,114,115,114,0,0,0,0,0,377,377,377,377,0,0,0,0,140,116,
|
116,0,0,0,377,377,377,0,0,0,0,0,0,115,114,115,114,0,0,0,0,0,377,377,377,377,0,0,0,0,140,116,
|
||||||
140,0,0,0,0,0,0,0,0,0,0,377,0,114,115,114,115,0,0,377,0,0,0,0,0,0,0,0,0,0,116,140,
|
140,0,0,0,0,0,0,0,0,0,0,377,0,114,115,114,115,0,0,377,0,0,0,0,0,0,0,0,0,0,116,140,
|
||||||
116,0,0,0,0,0,0,0,0,0,0,0,0,115,114,115,114,0,0,0,0,0,0,0,0,0,431,432,114,115,140,116,
|
116,0,0,0,0,0,0,0,0,0,0,0,0,115,114,115,114,0,0,0,0,0,0,0,0,0,431,432,114,115,140,116,
|
||||||
140,0,0,0,0,0,0,0,377,0,0,0,0,114,115,114,115,0,0,0,0,0,0,431,432,431,432,431,432,0,116,140,
|
140,0,0,0,0,0,0,377,377,0,0,0,0,114,115,114,115,0,0,0,0,0,0,431,432,431,432,431,432,0,116,140,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,377,115,114,115,114,0,0,377,0,0,0,0,0,0,0,0,0,0,140,116,
|
0,0,0,0,0,0,0,0,0,0,0,0,377,115,114,115,114,0,0,377,0,0,0,0,0,0,0,0,0,0,140,116,
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,114,115,114,115,0,0,0,0,0,0,0,0,0,0,0,0,0,116,140,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,114,115,114,115,0,0,0,0,0,0,0,0,0,0,0,0,0,116,140,
|
||||||
114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,0,0,114,115,114,115,114,115
|
114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,114,115,0,0,114,115,114,115,114,115
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name=STATIC
|
name=BE CAREFUL WITH THE FUSE
|
||||||
bgColor=black
|
bgColor=black
|
||||||
border=bright_cyan
|
border=bright_cyan
|
||||||
tileMapFile=36.tmx
|
tileMapFile=36.tmx
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ roomLeft=39.room
|
|||||||
roomRight=37.room
|
roomRight=37.room
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_stop.png
|
tileSetFile=stopped_arounder.png
|
||||||
animation=arounder_stop.ani
|
animation=stopped_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=8
|
height=8
|
||||||
x=9
|
x=9
|
||||||
@@ -25,8 +25,8 @@ color=white
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_stop.png
|
tileSetFile=stopped_arounder.png
|
||||||
animation=arounder_stop.ani
|
animation=stopped_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=8
|
height=8
|
||||||
x=18
|
x=18
|
||||||
@@ -41,8 +41,8 @@ color=white
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_walk.png
|
tileSetFile=walking_arounder.png
|
||||||
animation=arounder_walk.ani
|
animation=walking_arounder.ani
|
||||||
width=5
|
width=5
|
||||||
height=8
|
height=8
|
||||||
x=12
|
x=12
|
||||||
@@ -75,8 +75,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_fly.png
|
tileSetFile=flying_arounder.png
|
||||||
animation=arounder_fly.ani
|
animation=flying_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=7
|
height=7
|
||||||
x=3
|
x=3
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ color=white
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_fly.png
|
tileSetFile=flying_arounder.png
|
||||||
animation=arounder_fly.ani
|
animation=flying_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=7
|
height=7
|
||||||
x=9
|
x=9
|
||||||
@@ -44,8 +44,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_fly.png
|
tileSetFile=flying_arounder.png
|
||||||
animation=arounder_fly.ani
|
animation=flying_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=7
|
height=7
|
||||||
x=15
|
x=15
|
||||||
@@ -61,8 +61,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_fly.png
|
tileSetFile=flying_arounder.png
|
||||||
animation=arounder_fly.ani
|
animation=flying_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=7
|
height=7
|
||||||
x=22
|
x=22
|
||||||
@@ -78,8 +78,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_fly.png
|
tileSetFile=flying_arounder.png
|
||||||
animation=arounder_fly.ani
|
animation=flying_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=7
|
height=7
|
||||||
x=16
|
x=16
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ color=red
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_walk.png
|
tileSetFile=walking_arounder.png
|
||||||
animation=arounder_walk.ani
|
animation=walking_arounder.ani
|
||||||
width=5
|
width=5
|
||||||
height=8
|
height=8
|
||||||
x=10
|
x=10
|
||||||
@@ -42,8 +42,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_walk.png
|
tileSetFile=walking_arounder.png
|
||||||
animation=arounder_walk.ani
|
animation=walking_arounder.ani
|
||||||
width=5
|
width=5
|
||||||
height=8
|
height=8
|
||||||
x=15
|
x=15
|
||||||
@@ -59,8 +59,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_walk.png
|
tileSetFile=walking_arounder.png
|
||||||
animation=arounder_walk.ani
|
animation=walking_arounder.ani
|
||||||
width=5
|
width=5
|
||||||
height=8
|
height=8
|
||||||
x=20
|
x=20
|
||||||
@@ -76,8 +76,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_walk.png
|
tileSetFile=walking_arounder.png
|
||||||
animation=arounder_walk.ani
|
animation=walking_arounder.ani
|
||||||
width=5
|
width=5
|
||||||
height=8
|
height=8
|
||||||
x=14
|
x=14
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ color=bright_cyan
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_stop.png
|
tileSetFile=stopped_arounder.png
|
||||||
animation=arounder_stop.ani
|
animation=stopped_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=8
|
height=8
|
||||||
x=8
|
x=8
|
||||||
@@ -41,8 +41,8 @@ color=bright_cyan
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_stop.png
|
tileSetFile=stopped_arounder.png
|
||||||
animation=arounder_stop.ani
|
animation=stopped_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=8
|
height=8
|
||||||
x=11
|
x=11
|
||||||
@@ -57,8 +57,8 @@ color=bright_cyan
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_stop.png
|
tileSetFile=stopped_arounder.png
|
||||||
animation=arounder_stop.ani
|
animation=stopped_arounder.ani
|
||||||
width=7
|
width=7
|
||||||
height=8
|
height=8
|
||||||
x=24
|
x=24
|
||||||
@@ -73,8 +73,8 @@ color=bright_cyan
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_walk.png
|
tileSetFile=walking_arounder.png
|
||||||
animation=arounder_walk.ani
|
animation=walking_arounder.ani
|
||||||
width=5
|
width=5
|
||||||
height=8
|
height=8
|
||||||
x=12
|
x=12
|
||||||
@@ -90,8 +90,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_walk.png
|
tileSetFile=walking_arounder.png
|
||||||
animation=arounder_walk.ani
|
animation=walking_arounder.ani
|
||||||
width=5
|
width=5
|
||||||
height=8
|
height=8
|
||||||
x=14
|
x=14
|
||||||
@@ -107,8 +107,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=arounder_walk.png
|
tileSetFile=walking_arounder.png
|
||||||
animation=arounder_walk.ani
|
animation=walking_arounder.ani
|
||||||
width=5
|
width=5
|
||||||
height=8
|
height=8
|
||||||
x=14
|
x=14
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name=P.A.C.O. ON THE GO
|
name=P.A.C.O. ON THE GO
|
||||||
bgColor=black
|
bgColor=black
|
||||||
border=black
|
border=blue
|
||||||
tileMapFile=42.tmx
|
tileMapFile=42.tmx
|
||||||
tileSetFile=standard.png
|
tileSetFile=standard.png
|
||||||
roomUp=0
|
roomUp=0
|
||||||
@@ -23,7 +23,7 @@ x1=10
|
|||||||
y1=2
|
y1=2
|
||||||
x2=10
|
x2=10
|
||||||
y2=11
|
y2=11
|
||||||
color=green
|
color=magenta
|
||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,421,62,
|
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,421,62,
|
||||||
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,421,0,0,0,0,0,0,0,0,
|
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,421,0,0,0,0,0,0,0,0,
|
||||||
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,415,421,415,0,0,0,0,0,0,0,0,0,0,0,
|
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,415,421,415,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
36,0,0,0,0,0,0,0,305,0,0,0,0,305,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
36,0,0,0,0,0,0,0,306,0,0,0,0,306,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
36,0,0,0,305,0,0,0,0,0,0,0,0,0,0,0,0,421,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
36,0,0,0,306,0,0,0,0,0,0,0,0,0,0,0,0,421,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
36,0,415,421,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,415,0,0,421,415,0,0,0,0,0,0,
|
36,0,415,421,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,415,0,0,421,415,0,0,0,0,0,0,
|
||||||
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name=FEEL THE PRESSURE
|
name=FEEL THE PRESSURE
|
||||||
bgColor=bright_black
|
bgColor=bright_black
|
||||||
border=black
|
border=bright_yellow
|
||||||
tileMapFile=45.tmx
|
tileMapFile=45.tmx
|
||||||
tileSetFile=standard.png
|
tileSetFile=standard.png
|
||||||
roomUp=0
|
roomUp=0
|
||||||
|
|||||||
@@ -11,6 +11,22 @@ itemColor1=red
|
|||||||
itemColor2=magenta
|
itemColor2=magenta
|
||||||
autoSurface=left
|
autoSurface=left
|
||||||
|
|
||||||
|
[enemy]
|
||||||
|
tileSetFile=batman_fire.png
|
||||||
|
animation=batman_fire.ani
|
||||||
|
width=16
|
||||||
|
height=16
|
||||||
|
x=10
|
||||||
|
y=13
|
||||||
|
vx=1.3
|
||||||
|
vy=0
|
||||||
|
x1=0
|
||||||
|
y1=13
|
||||||
|
x2=29
|
||||||
|
y2=13
|
||||||
|
color=cyan
|
||||||
|
flip=true
|
||||||
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=heavy.png
|
tileSetFile=heavy.png
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ itemColor1=red
|
|||||||
itemColor2=yellow
|
itemColor2=yellow
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jb_alien.png
|
tileSetFile=jailbattle_alien.png
|
||||||
animation=jb_alien.ani
|
animation=jailbattle_alien.ani
|
||||||
width=13
|
width=13
|
||||||
height=15
|
height=15
|
||||||
x=10
|
x=10
|
||||||
@@ -28,8 +28,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jb_alien.png
|
tileSetFile=jailbattle_alien.png
|
||||||
animation=jb_alien.ani
|
animation=jailbattle_alien.ani
|
||||||
width=13
|
width=13
|
||||||
height=15
|
height=15
|
||||||
x=25
|
x=25
|
||||||
@@ -45,8 +45,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jb_human.png
|
tileSetFile=jailbattle_human.png
|
||||||
animation=jb_human.ani
|
animation=jailbattle_human.ani
|
||||||
width=11
|
width=11
|
||||||
height=13
|
height=13
|
||||||
x=7
|
x=7
|
||||||
@@ -62,8 +62,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jb_human.png
|
tileSetFile=jailbattle_human.png
|
||||||
animation=jb_human.ani
|
animation=jailbattle_human.ani
|
||||||
width=11
|
width=11
|
||||||
height=13
|
height=13
|
||||||
x=18
|
x=18
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ itemColor1=white
|
|||||||
itemColor2=green
|
itemColor2=green
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jb_human.png
|
tileSetFile=jailbattle_human.png
|
||||||
animation=jb_human.ani
|
animation=jailbattle_human.ani
|
||||||
width=11
|
width=11
|
||||||
height=13
|
height=13
|
||||||
x=17
|
x=17
|
||||||
@@ -28,8 +28,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jb_human.png
|
tileSetFile=jailbattle_human.png
|
||||||
animation=jb_human.ani
|
animation=jailbattle_human.ani
|
||||||
width=11
|
width=11
|
||||||
height=13
|
height=13
|
||||||
x=2
|
x=2
|
||||||
@@ -45,8 +45,8 @@ flip=true
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=jb_alien.png
|
tileSetFile=jailbattle_alien.png
|
||||||
animation=jb_alien.ani
|
animation=jailbattle_alien.ani
|
||||||
width=11
|
width=11
|
||||||
height=13
|
height=13
|
||||||
x=24
|
x=24
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ roomLeft=0
|
|||||||
roomRight=49.room
|
roomRight=49.room
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=diskette.png
|
tileSetFile=floppy.png
|
||||||
animation=diskette.ani
|
animation=floppy.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=7
|
x=7
|
||||||
@@ -25,8 +25,8 @@ color=magenta
|
|||||||
[/enemy]
|
[/enemy]
|
||||||
|
|
||||||
[enemy]
|
[enemy]
|
||||||
tileSetFile=diskette.png
|
tileSetFile=floppy.png
|
||||||
animation=diskette.ani
|
animation=floppy.ani
|
||||||
width=16
|
width=16
|
||||||
height=16
|
height=16
|
||||||
x=20
|
x=20
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
<layer id="1" name="Capa de patrones 1" width="32" height="16">
|
||||||
<data encoding="csv">
|
<data encoding="csv">
|
||||||
42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,
|
42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,
|
||||||
42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,
|
42,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,42,
|
||||||
42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,
|
42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,
|
||||||
42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,
|
42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,
|
||||||
42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name=P.A.C.O WORKSHOP
|
name=P.A.C.O. WORKSHOP
|
||||||
bgColor=black
|
bgColor=black
|
||||||
border=yellow
|
border=yellow
|
||||||
tileMapFile=53.tmx
|
tileMapFile=53.tmx
|
||||||
|
|||||||
BIN
data/sound/notify.wav
Normal file
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 7.1 KiB |
BIN
data/title/loading_screen_color.gif
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 8.9 KiB |
BIN
data/title/title_logo.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
@@ -11,9 +11,9 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>jaildoctors_dilemma</string>
|
<string>jaildoctors_dilemma</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>jaildoctors_dilemma</string>
|
<string>icon</string>
|
||||||
<key>CFBundleIconName</key>
|
<key>CFBundleIconName</key>
|
||||||
<string>jaildoctors_dilemma</string>
|
<string>icon</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>org.jailgames.jaildoctors_dilemma</string>
|
<string>org.jailgames.jaildoctors_dilemma</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
@@ -23,11 +23,11 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.4.3</string>
|
<string>1.08</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0.0</string>
|
<string>1.08</string>
|
||||||
<key>CSResourcesFileMapped</key>
|
<key>CSResourcesFileMapped</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
|||||||
1
release/SDL2.framework/Headers
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
Versions/Current/Headers
|
||||||
1
release/SDL2.framework/Resources
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
Versions/Current/Resources
|
||||||
1
release/SDL2.framework/SDL2
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
Versions/Current/SDL2
|
||||||
233
release/SDL2.framework/Versions/A/Headers/SDL.h
Normal file
@@ -0,0 +1,233 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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.h
|
||||||
|
*
|
||||||
|
* Main include header for the SDL library
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef SDL_h_
|
||||||
|
#define SDL_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_main.h>
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
#include <SDL2/SDL_assert.h>
|
||||||
|
#include <SDL2/SDL_atomic.h>
|
||||||
|
#include <SDL2/SDL_audio.h>
|
||||||
|
#include <SDL2/SDL_clipboard.h>
|
||||||
|
#include <SDL2/SDL_cpuinfo.h>
|
||||||
|
#include <SDL2/SDL_endian.h>
|
||||||
|
#include <SDL2/SDL_error.h>
|
||||||
|
#include <SDL2/SDL_events.h>
|
||||||
|
#include <SDL2/SDL_filesystem.h>
|
||||||
|
#include <SDL2/SDL_gamecontroller.h>
|
||||||
|
#include <SDL2/SDL_guid.h>
|
||||||
|
#include <SDL2/SDL_haptic.h>
|
||||||
|
#include <SDL2/SDL_hidapi.h>
|
||||||
|
#include <SDL2/SDL_hints.h>
|
||||||
|
#include <SDL2/SDL_joystick.h>
|
||||||
|
#include <SDL2/SDL_loadso.h>
|
||||||
|
#include <SDL2/SDL_log.h>
|
||||||
|
#include <SDL2/SDL_messagebox.h>
|
||||||
|
#include <SDL2/SDL_metal.h>
|
||||||
|
#include <SDL2/SDL_mutex.h>
|
||||||
|
#include <SDL2/SDL_power.h>
|
||||||
|
#include <SDL2/SDL_render.h>
|
||||||
|
#include <SDL2/SDL_rwops.h>
|
||||||
|
#include <SDL2/SDL_sensor.h>
|
||||||
|
#include <SDL2/SDL_shape.h>
|
||||||
|
#include <SDL2/SDL_system.h>
|
||||||
|
#include <SDL2/SDL_thread.h>
|
||||||
|
#include <SDL2/SDL_timer.h>
|
||||||
|
#include <SDL2/SDL_version.h>
|
||||||
|
#include <SDL2/SDL_video.h>
|
||||||
|
#include <SDL2/SDL_locale.h>
|
||||||
|
#include <SDL2/SDL_misc.h>
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* As of version 0.5, SDL is loaded dynamically into the application */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name SDL_INIT_*
|
||||||
|
*
|
||||||
|
* These are the flags which may be passed to SDL_Init(). You should
|
||||||
|
* specify the subsystems which you will be using in your application.
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
#define SDL_INIT_TIMER 0x00000001u
|
||||||
|
#define SDL_INIT_AUDIO 0x00000010u
|
||||||
|
#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
|
||||||
|
#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
|
||||||
|
#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_SENSOR \
|
||||||
|
)
|
||||||
|
/* @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the SDL library.
|
||||||
|
*
|
||||||
|
* SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
|
||||||
|
* two may be used interchangeably. Though for readability of your code
|
||||||
|
* SDL_InitSubSystem() might be preferred.
|
||||||
|
*
|
||||||
|
* The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
|
||||||
|
* subsystems are initialized by default. Message boxes
|
||||||
|
* (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
|
||||||
|
* video subsystem, in hopes of being useful in showing an error dialog when
|
||||||
|
* SDL_Init fails. You must specifically initialize other subsystems if you
|
||||||
|
* use them in your application.
|
||||||
|
*
|
||||||
|
* Logging (such as SDL_Log) works without initialization, too.
|
||||||
|
*
|
||||||
|
* `flags` may be any of the following OR'd together:
|
||||||
|
*
|
||||||
|
* - `SDL_INIT_TIMER`: timer subsystem
|
||||||
|
* - `SDL_INIT_AUDIO`: audio subsystem
|
||||||
|
* - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
|
||||||
|
* subsystem
|
||||||
|
* - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
|
||||||
|
* events subsystem
|
||||||
|
* - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
|
||||||
|
* - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
|
||||||
|
* initializes the joystick subsystem
|
||||||
|
* - `SDL_INIT_EVENTS`: events subsystem
|
||||||
|
* - `SDL_INIT_EVERYTHING`: all of the above subsystems
|
||||||
|
* - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
|
||||||
|
*
|
||||||
|
* Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
|
||||||
|
* for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
|
||||||
|
* call SDL_Quit() to force shutdown). If a subsystem is already loaded then
|
||||||
|
* this call will increase the ref-count and return.
|
||||||
|
*
|
||||||
|
* \param flags subsystem initialization flags
|
||||||
|
* \returns 0 on success or a negative error code on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_InitSubSystem
|
||||||
|
* \sa SDL_Quit
|
||||||
|
* \sa SDL_SetMainReady
|
||||||
|
* \sa SDL_WasInit
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compatibility function to initialize the SDL library.
|
||||||
|
*
|
||||||
|
* In SDL2, this function and SDL_Init() are interchangeable.
|
||||||
|
*
|
||||||
|
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||||
|
* \returns 0 on success or a negative error code on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Init
|
||||||
|
* \sa SDL_Quit
|
||||||
|
* \sa SDL_QuitSubSystem
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shut down specific SDL subsystems.
|
||||||
|
*
|
||||||
|
* If you start a subsystem using a call to that subsystem's init function
|
||||||
|
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
||||||
|
* SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
|
||||||
|
* that subsystem's quit function (SDL_VideoQuit()) directly instead. But
|
||||||
|
* generally, you should not be using those functions directly anyhow; use
|
||||||
|
* SDL_Init() instead.
|
||||||
|
*
|
||||||
|
* You still need to call SDL_Quit() even if you close all open subsystems
|
||||||
|
* with SDL_QuitSubSystem().
|
||||||
|
*
|
||||||
|
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_InitSubSystem
|
||||||
|
* \sa SDL_Quit
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a mask of the specified subsystems which are currently initialized.
|
||||||
|
*
|
||||||
|
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||||
|
* \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
|
||||||
|
* returns the initialization status of the specified subsystems.
|
||||||
|
*
|
||||||
|
* The return value does not include SDL_INIT_NOPARACHUTE.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Init
|
||||||
|
* \sa SDL_InitSubSystem
|
||||||
|
*/
|
||||||
|
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clean up all initialized subsystems.
|
||||||
|
*
|
||||||
|
* You should call this function even if you have already shutdown each
|
||||||
|
* initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
|
||||||
|
* function even in the case of errors in initialization.
|
||||||
|
*
|
||||||
|
* If you start a subsystem using a call to that subsystem's init function
|
||||||
|
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
||||||
|
* then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
|
||||||
|
* it down before calling SDL_Quit(). But generally, you should not be using
|
||||||
|
* those functions directly anyhow; use SDL_Init() instead.
|
||||||
|
*
|
||||||
|
* You can use this function with atexit() to ensure that it is run when your
|
||||||
|
* application is shutdown, but it is not wise to do this from a library or
|
||||||
|
* other dynamically loaded code.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Init
|
||||||
|
* \sa SDL_QuitSubSystem
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_Quit(void);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
326
release/SDL2.framework/Versions/A/Headers/SDL_assert.h
Normal file
@@ -0,0 +1,326 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_assert_h_
|
||||||
|
#define SDL_assert_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_ASSERT_LEVEL
|
||||||
|
#ifdef SDL_DEFAULT_ASSERT_LEVEL
|
||||||
|
#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
|
||||||
|
#elif defined(_DEBUG) || defined(DEBUG) || \
|
||||||
|
(defined(__GNUC__) && !defined(__OPTIMIZE__))
|
||||||
|
#define SDL_ASSERT_LEVEL 2
|
||||||
|
#else
|
||||||
|
#define SDL_ASSERT_LEVEL 1
|
||||||
|
#endif
|
||||||
|
#endif /* SDL_ASSERT_LEVEL */
|
||||||
|
|
||||||
|
/*
|
||||||
|
These are macros and not first class functions so that the debugger breaks
|
||||||
|
on the assertion line and not in some random guts of SDL, and so each
|
||||||
|
assert can have unique static variables associated with it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
/* Don't include intrin.h here because it contains C++ code */
|
||||||
|
extern void __cdecl __debugbreak(void);
|
||||||
|
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||||
|
#elif _SDL_HAS_BUILTIN(__builtin_debugtrap)
|
||||||
|
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||||
|
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||||
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||||
|
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
||||||
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
||||||
|
#elif defined(__APPLE__) && defined(__arm__)
|
||||||
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
|
||||||
|
#elif defined(__386__) && defined(__WATCOMC__)
|
||||||
|
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||||
|
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
||||||
|
#include <signal.h>
|
||||||
|
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
||||||
|
#else
|
||||||
|
/* How do we trigger breakpoints on this platform? */
|
||||||
|
#define SDL_TriggerBreakpoint()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||||
|
# define SDL_FUNCTION __func__
|
||||||
|
#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||||
|
# define SDL_FUNCTION __FUNCTION__
|
||||||
|
#else
|
||||||
|
# define SDL_FUNCTION "???"
|
||||||
|
#endif
|
||||||
|
#define SDL_FILE __FILE__
|
||||||
|
#define SDL_LINE __LINE__
|
||||||
|
|
||||||
|
/*
|
||||||
|
sizeof (x) makes the compiler still parse the expression even without
|
||||||
|
assertions enabled, so the code is always checked at compile time, but
|
||||||
|
doesn't actually generate code for it, so there are no side effects or
|
||||||
|
expensive checks at run time, just the constant size of what x WOULD be,
|
||||||
|
which presumably gets optimized out as unused.
|
||||||
|
This also solves the problem of...
|
||||||
|
|
||||||
|
int somevalue = blah();
|
||||||
|
SDL_assert(somevalue == 1);
|
||||||
|
|
||||||
|
...which would cause compiles to complain that somevalue is unused if we
|
||||||
|
disable assertions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
||||||
|
this condition isn't constant. And looks like an owl's face! */
|
||||||
|
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
||||||
|
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
||||||
|
#else
|
||||||
|
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SDL_disabled_assert(condition) \
|
||||||
|
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
|
||||||
|
SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
|
||||||
|
SDL_ASSERTION_ABORT, /**< Terminate the program. */
|
||||||
|
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
|
||||||
|
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
|
||||||
|
} SDL_AssertState;
|
||||||
|
|
||||||
|
typedef struct SDL_AssertData
|
||||||
|
{
|
||||||
|
int always_ignore;
|
||||||
|
unsigned int trigger_count;
|
||||||
|
const char *condition;
|
||||||
|
const char *filename;
|
||||||
|
int linenum;
|
||||||
|
const char *function;
|
||||||
|
const struct SDL_AssertData *next;
|
||||||
|
} SDL_AssertData;
|
||||||
|
|
||||||
|
#if (SDL_ASSERT_LEVEL > 0)
|
||||||
|
|
||||||
|
/* Never call this directly. Use the SDL_assert* macros. */
|
||||||
|
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
||||||
|
const char *,
|
||||||
|
const char *, int)
|
||||||
|
#if defined(__clang__)
|
||||||
|
#if __has_feature(attribute_analyzer_noreturn)
|
||||||
|
/* this tells Clang's static analysis that we're a custom assert function,
|
||||||
|
and that the analyzer should assume the condition was always true past this
|
||||||
|
SDL_assert test. */
|
||||||
|
__attribute__((analyzer_noreturn))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
|
/* the do {} while(0) avoids dangling else problems:
|
||||||
|
if (x) SDL_assert(y); else blah();
|
||||||
|
... without the do/while, the "else" could attach to this macro's "if".
|
||||||
|
We try to handle just the minimum we need here in a macro...the loop,
|
||||||
|
the static vars, and break points. The heavy lifting is handled in
|
||||||
|
SDL_ReportAssertion(), in SDL_assert.c.
|
||||||
|
*/
|
||||||
|
#define SDL_enabled_assert(condition) \
|
||||||
|
do { \
|
||||||
|
while ( !(condition) ) { \
|
||||||
|
static struct SDL_AssertData sdl_assert_data = { \
|
||||||
|
0, 0, #condition, 0, 0, 0, 0 \
|
||||||
|
}; \
|
||||||
|
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
|
||||||
|
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
|
||||||
|
continue; /* go again. */ \
|
||||||
|
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
|
||||||
|
SDL_TriggerBreakpoint(); \
|
||||||
|
} \
|
||||||
|
break; /* not retrying. */ \
|
||||||
|
} \
|
||||||
|
} while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||||
|
|
||||||
|
#endif /* enabled assertions support code */
|
||||||
|
|
||||||
|
/* Enable various levels of assertions. */
|
||||||
|
#if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
|
||||||
|
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||||
|
# define SDL_assert_release(condition) SDL_disabled_assert(condition)
|
||||||
|
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||||
|
#elif SDL_ASSERT_LEVEL == 1 /* release settings. */
|
||||||
|
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||||
|
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||||
|
#elif SDL_ASSERT_LEVEL == 2 /* normal settings. */
|
||||||
|
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||||
|
#elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
|
||||||
|
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||||
|
# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
|
||||||
|
#else
|
||||||
|
# error Unknown assertion level.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* this assertion is never disabled at any level. */
|
||||||
|
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A callback that fires when an SDL assertion fails.
|
||||||
|
*
|
||||||
|
* \param data a pointer to the SDL_AssertData structure corresponding to the
|
||||||
|
* current assertion
|
||||||
|
* \param userdata what was passed as `userdata` to SDL_SetAssertionHandler()
|
||||||
|
* \returns an SDL_AssertState value indicating how to handle the failure.
|
||||||
|
*/
|
||||||
|
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
||||||
|
const SDL_AssertData* data, void* userdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set an application-defined assertion handler.
|
||||||
|
*
|
||||||
|
* This function allows an application to show its own assertion UI and/or
|
||||||
|
* force the response to an assertion failure. If the application doesn't
|
||||||
|
* provide this, SDL will try to do the right thing, popping up a
|
||||||
|
* system-specific GUI dialog, and probably minimizing any fullscreen windows.
|
||||||
|
*
|
||||||
|
* This callback may fire from any thread, but it runs wrapped in a mutex, so
|
||||||
|
* it will only fire from one thread at a time.
|
||||||
|
*
|
||||||
|
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||||
|
*
|
||||||
|
* \param handler the SDL_AssertionHandler function to call when an assertion
|
||||||
|
* fails or NULL for the default handler
|
||||||
|
* \param userdata a pointer that is passed to `handler`
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetAssertionHandler
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||||
|
SDL_AssertionHandler handler,
|
||||||
|
void *userdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the default assertion handler.
|
||||||
|
*
|
||||||
|
* This returns the function pointer that is called by default when an
|
||||||
|
* assertion is triggered. This is an internal function provided by SDL, that
|
||||||
|
* is used for assertions when SDL_SetAssertionHandler() hasn't been used to
|
||||||
|
* provide a different function.
|
||||||
|
*
|
||||||
|
* \returns the default SDL_AssertionHandler that is called when an assert
|
||||||
|
* triggers.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetAssertionHandler
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current assertion handler.
|
||||||
|
*
|
||||||
|
* This returns the function pointer that is called when an assertion is
|
||||||
|
* triggered. This is either the value last passed to
|
||||||
|
* SDL_SetAssertionHandler(), or if no application-specified function is set,
|
||||||
|
* is equivalent to calling SDL_GetDefaultAssertionHandler().
|
||||||
|
*
|
||||||
|
* The parameter `puserdata` is a pointer to a void*, which will store the
|
||||||
|
* "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
|
||||||
|
* will always be NULL for the default handler. If you don't care about this
|
||||||
|
* data, it is safe to pass a NULL pointer to this function to ignore it.
|
||||||
|
*
|
||||||
|
* \param puserdata pointer which is filled with the "userdata" pointer that
|
||||||
|
* was passed to SDL_SetAssertionHandler()
|
||||||
|
* \returns the SDL_AssertionHandler that is called when an assert triggers.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_SetAssertionHandler
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all assertion failures.
|
||||||
|
*
|
||||||
|
* This function gets all assertions triggered since the last call to
|
||||||
|
* SDL_ResetAssertionReport(), or the start of the program.
|
||||||
|
*
|
||||||
|
* The proper way to examine this data looks something like this:
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
||||||
|
* while (item) {
|
||||||
|
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
||||||
|
* item->condition, item->function, item->filename,
|
||||||
|
* item->linenum, item->trigger_count,
|
||||||
|
* item->always_ignore ? "yes" : "no");
|
||||||
|
* item = item->next;
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* \returns a list of all failed assertions or NULL if the list is empty. This
|
||||||
|
* memory should not be modified or freed by the application.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_ResetAssertionReport
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the list of all assertion failures.
|
||||||
|
*
|
||||||
|
* This function will clear the list of all assertions triggered up to that
|
||||||
|
* point. Immediately following this call, SDL_GetAssertionReport will return
|
||||||
|
* no items. In addition, any previously-triggered assertions will be reset to
|
||||||
|
* a trigger_count of zero, and their always_ignore state will be false.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetAssertionReport
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
||||||
|
|
||||||
|
|
||||||
|
/* these had wrong naming conventions until 2.0.4. Please update your app! */
|
||||||
|
#define SDL_assert_state SDL_AssertState
|
||||||
|
#define SDL_assert_data SDL_AssertData
|
||||||
|
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_assert_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
415
release/SDL2.framework/Versions/A/Headers/SDL_atomic.h
Normal file
@@ -0,0 +1,415 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_atomic.h
|
||||||
|
*
|
||||||
|
* Atomic operations.
|
||||||
|
*
|
||||||
|
* IMPORTANT:
|
||||||
|
* If you are not an expert in concurrent lockless programming, you should
|
||||||
|
* only be using the atomic lock and reference counting functions in this
|
||||||
|
* file. In all other cases you should be protecting your data structures
|
||||||
|
* with full mutexes.
|
||||||
|
*
|
||||||
|
* The list of "safe" functions to use are:
|
||||||
|
* SDL_AtomicLock()
|
||||||
|
* SDL_AtomicUnlock()
|
||||||
|
* SDL_AtomicIncRef()
|
||||||
|
* SDL_AtomicDecRef()
|
||||||
|
*
|
||||||
|
* Seriously, here be dragons!
|
||||||
|
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
*
|
||||||
|
* You can find out a little more about lockless programming and the
|
||||||
|
* subtle issues that can arise here:
|
||||||
|
* http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
|
||||||
|
*
|
||||||
|
* There's also lots of good information here:
|
||||||
|
* http://www.1024cores.net/home/lock-free-algorithms
|
||||||
|
* http://preshing.com/
|
||||||
|
*
|
||||||
|
* These operations may or may not actually be implemented using
|
||||||
|
* processor specific atomic operations. When possible they are
|
||||||
|
* implemented as true processor specific atomic operations. When that
|
||||||
|
* is not possible the are implemented using locks that *do* use the
|
||||||
|
* available atomic operations.
|
||||||
|
*
|
||||||
|
* All of the atomic operations that modify memory are full memory barriers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_atomic_h_
|
||||||
|
#define SDL_atomic_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
#include <SDL2/SDL_platform.h>
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name SDL AtomicLock
|
||||||
|
*
|
||||||
|
* The atomic locks are efficient spinlocks using CPU instructions,
|
||||||
|
* but are vulnerable to starvation and can spin forever if a thread
|
||||||
|
* holding a lock has been terminated. For this reason you should
|
||||||
|
* minimize the code executed inside an atomic lock and never do
|
||||||
|
* expensive things like API or system calls while holding them.
|
||||||
|
*
|
||||||
|
* The atomic locks are not safe to lock recursively.
|
||||||
|
*
|
||||||
|
* Porting Note:
|
||||||
|
* The spin lock functions and type are required and can not be
|
||||||
|
* emulated because they are used in the atomic emulation code.
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
|
||||||
|
typedef int SDL_SpinLock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Try to lock a spin lock by setting it to a non-zero value.
|
||||||
|
*
|
||||||
|
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||||
|
* doing. Please be careful using any sort of spinlock!***
|
||||||
|
*
|
||||||
|
* \param lock a pointer to a lock variable
|
||||||
|
* \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
|
||||||
|
* held.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicLock
|
||||||
|
* \sa SDL_AtomicUnlock
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lock a spin lock by setting it to a non-zero value.
|
||||||
|
*
|
||||||
|
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||||
|
* doing. Please be careful using any sort of spinlock!***
|
||||||
|
*
|
||||||
|
* \param lock a pointer to a lock variable
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicTryLock
|
||||||
|
* \sa SDL_AtomicUnlock
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unlock a spin lock by setting it to 0.
|
||||||
|
*
|
||||||
|
* Always returns immediately.
|
||||||
|
*
|
||||||
|
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||||
|
* doing. Please be careful using any sort of spinlock!***
|
||||||
|
*
|
||||||
|
* \param lock a pointer to a lock variable
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicLock
|
||||||
|
* \sa SDL_AtomicTryLock
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
||||||
|
|
||||||
|
/* @} *//* SDL AtomicLock */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The compiler barrier prevents the compiler from reordering
|
||||||
|
* reads and writes to globally visible variables across the call.
|
||||||
|
*/
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
|
||||||
|
void _ReadWriteBarrier(void);
|
||||||
|
#pragma intrinsic(_ReadWriteBarrier)
|
||||||
|
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
||||||
|
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||||
|
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
||||||
|
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||||
|
#elif defined(__WATCOMC__)
|
||||||
|
extern __inline void SDL_CompilerBarrier(void);
|
||||||
|
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||||
|
#else
|
||||||
|
#define SDL_CompilerBarrier() \
|
||||||
|
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Memory barriers are designed to prevent reads and writes from being
|
||||||
|
* reordered by the compiler and being seen out of order on multi-core CPUs.
|
||||||
|
*
|
||||||
|
* A typical pattern would be for thread A to write some data and a flag, and
|
||||||
|
* for thread B to read the flag and get the data. In this case you would
|
||||||
|
* insert a release barrier between writing the data and the flag,
|
||||||
|
* guaranteeing that the data write completes no later than the flag is
|
||||||
|
* written, and you would insert an acquire barrier between reading the flag
|
||||||
|
* and reading the data, to ensure that all the reads associated with the flag
|
||||||
|
* have completed.
|
||||||
|
*
|
||||||
|
* In this pattern you should always see a release barrier paired with an
|
||||||
|
* acquire barrier and you should gate the data reads/writes with a single
|
||||||
|
* flag variable.
|
||||||
|
*
|
||||||
|
* For more information on these semantics, take a look at the blog post:
|
||||||
|
* http://preshing.com/20120913/acquire-and-release-semantics
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.6.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
|
||||||
|
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 0 /* defined(__LINUX__) || defined(__ANDROID__) */
|
||||||
|
/* Information from:
|
||||||
|
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
|
||||||
|
|
||||||
|
The Linux kernel provides a helper function which provides the right code for a memory barrier,
|
||||||
|
hard-coded at address 0xffff0fa0
|
||||||
|
*/
|
||||||
|
typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||||
|
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||||
|
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||||
|
#elif 0 /* defined(__QNXNTO__) */
|
||||||
|
#include <sys/cpuinline.h>
|
||||||
|
|
||||||
|
#define SDL_MemoryBarrierRelease() __cpu_membarrier()
|
||||||
|
#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
|
||||||
|
#else
|
||||||
|
#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__) || defined(__ARM_ARCH_8A__)
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||||
|
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
|
||||||
|
#ifdef __thumb__
|
||||||
|
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||||
|
#define SDL_MEMORY_BARRIER_USES_FUNCTION
|
||||||
|
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
|
||||||
|
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
||||||
|
#else
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||||
|
#endif /* __thumb__ */
|
||||||
|
#else
|
||||||
|
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
|
||||||
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
||||||
|
#endif /* __LINUX__ || __ANDROID__ */
|
||||||
|
#endif /* __GNUC__ && __arm__ */
|
||||||
|
#else
|
||||||
|
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||||
|
/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
|
||||||
|
#include <mbarrier.h>
|
||||||
|
#define SDL_MemoryBarrierRelease() __machine_rel_barrier()
|
||||||
|
#define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
|
||||||
|
#else
|
||||||
|
/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
|
||||||
|
#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
|
||||||
|
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
|
||||||
|
#if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||||
|
#define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
|
||||||
|
#elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__)
|
||||||
|
#define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
|
||||||
|
#elif (defined(__powerpc__) || defined(__powerpc64__))
|
||||||
|
#define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
|
||||||
|
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
|
||||||
|
#define SDL_CPUPauseInstruction() _mm_pause() /* this is actually "rep nop" and not a SIMD instruction. No inline asm in MSVC x86-64! */
|
||||||
|
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
|
||||||
|
#define SDL_CPUPauseInstruction() __yield()
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
/* watcom assembler rejects PAUSE if CPU < i686, and it refuses REP NOP as an invalid combination. Hardcode the bytes. */
|
||||||
|
extern __inline void SDL_CPUPauseInstruction(void);
|
||||||
|
#pragma aux SDL_CPUPauseInstruction = "db 0f3h,90h"
|
||||||
|
#else
|
||||||
|
#define SDL_CPUPauseInstruction()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A type representing an atomic integer value. It is a struct
|
||||||
|
* so people don't accidentally use numeric operations on it.
|
||||||
|
*/
|
||||||
|
typedef struct { int value; } SDL_atomic_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set an atomic variable to a new value if it is currently an old value.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to an SDL_atomic_t variable to be modified
|
||||||
|
* \param oldval the old value
|
||||||
|
* \param newval the new value
|
||||||
|
* \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicCASPtr
|
||||||
|
* \sa SDL_AtomicGet
|
||||||
|
* \sa SDL_AtomicSet
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set an atomic variable to a value.
|
||||||
|
*
|
||||||
|
* This function also acts as a full memory barrier.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to an SDL_atomic_t variable to be modified
|
||||||
|
* \param v the desired value
|
||||||
|
* \returns the previous value of the atomic variable.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicGet
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of an atomic variable.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to an SDL_atomic_t variable
|
||||||
|
* \returns the current value of an atomic variable.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicSet
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add to an atomic variable.
|
||||||
|
*
|
||||||
|
* This function also acts as a full memory barrier.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to an SDL_atomic_t variable to be modified
|
||||||
|
* \param v the desired value to add
|
||||||
|
* \returns the previous value of the atomic variable.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicDecRef
|
||||||
|
* \sa SDL_AtomicIncRef
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Increment an atomic variable used as a reference count.
|
||||||
|
*/
|
||||||
|
#ifndef SDL_AtomicIncRef
|
||||||
|
#define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Decrement an atomic variable used as a reference count.
|
||||||
|
*
|
||||||
|
* \return SDL_TRUE if the variable reached zero after decrementing,
|
||||||
|
* SDL_FALSE otherwise
|
||||||
|
*/
|
||||||
|
#ifndef SDL_AtomicDecRef
|
||||||
|
#define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a pointer to a new value if it is currently an old value.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to a pointer
|
||||||
|
* \param oldval the old pointer value
|
||||||
|
* \param newval the new pointer value
|
||||||
|
* \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicCAS
|
||||||
|
* \sa SDL_AtomicGetPtr
|
||||||
|
* \sa SDL_AtomicSetPtr
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a pointer to a value atomically.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to a pointer
|
||||||
|
* \param v the desired pointer value
|
||||||
|
* \returns the previous value of the pointer.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicCASPtr
|
||||||
|
* \sa SDL_AtomicGetPtr
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of a pointer atomically.
|
||||||
|
*
|
||||||
|
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||||
|
* it!***
|
||||||
|
*
|
||||||
|
* \param a a pointer to a pointer
|
||||||
|
* \returns the current value of a pointer.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_AtomicCASPtr
|
||||||
|
* \sa SDL_AtomicSetPtr
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_atomic_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
1500
release/SDL2.framework/Versions/A/Headers/SDL_audio.h
Normal file
126
release/SDL2.framework/Versions/A/Headers/SDL_bits.h
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_bits.h
|
||||||
|
*
|
||||||
|
* Functions for fiddling with bits and bitmasks.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_bits_h_
|
||||||
|
#define SDL_bits_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file SDL_bits.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the index of the most significant bit. Result is undefined when called
|
||||||
|
* with 0. This operation can also be stated as "count leading zeroes" and
|
||||||
|
* "log base 2".
|
||||||
|
*
|
||||||
|
* \return the index of the most significant bit, or -1 if the value is 0.
|
||||||
|
*/
|
||||||
|
#if defined(__WATCOMC__) && defined(__386__)
|
||||||
|
extern __inline int _SDL_bsr_watcom(Uint32);
|
||||||
|
#pragma aux _SDL_bsr_watcom = \
|
||||||
|
"bsr eax, eax" \
|
||||||
|
parm [eax] nomemory \
|
||||||
|
value [eax] \
|
||||||
|
modify exact [eax] nomemory;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
SDL_FORCE_INLINE int
|
||||||
|
SDL_MostSignificantBitIndex32(Uint32 x)
|
||||||
|
{
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||||
|
/* Count Leading Zeroes builtin in GCC.
|
||||||
|
* http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
|
||||||
|
*/
|
||||||
|
if (x == 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 31 - __builtin_clz(x);
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
if (x == 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return _SDL_bsr_watcom(x);
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
unsigned long index;
|
||||||
|
if (_BitScanReverse(&index, x)) {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
#else
|
||||||
|
/* Based off of Bit Twiddling Hacks by Sean Eron Anderson
|
||||||
|
* <seander@cs.stanford.edu>, released in the public domain.
|
||||||
|
* http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
|
||||||
|
*/
|
||||||
|
const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
|
||||||
|
const int S[] = {1, 2, 4, 8, 16};
|
||||||
|
|
||||||
|
int msbIndex = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (x == 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 4; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if (x & b[i])
|
||||||
|
{
|
||||||
|
x >>= S[i];
|
||||||
|
msbIndex |= S[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return msbIndex;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_FORCE_INLINE SDL_bool
|
||||||
|
SDL_HasExactlyOneBitSet32(Uint32 x)
|
||||||
|
{
|
||||||
|
if (x && !(x & (x - 1))) {
|
||||||
|
return SDL_TRUE;
|
||||||
|
}
|
||||||
|
return SDL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_bits_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
198
release/SDL2.framework/Versions/A/Headers/SDL_blendmode.h
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_blendmode.h
|
||||||
|
*
|
||||||
|
* Header file declaring the SDL_BlendMode enumeration
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_blendmode_h_
|
||||||
|
#define SDL_blendmode_h_
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief The blend mode used in SDL_RenderCopy() and drawing operations.
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_BLENDMODE_NONE = 0x00000000, /**< no blending
|
||||||
|
dstRGBA = srcRGBA */
|
||||||
|
SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending
|
||||||
|
dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
|
||||||
|
dstA = srcA + (dstA * (1-srcA)) */
|
||||||
|
SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending
|
||||||
|
dstRGB = (srcRGB * srcA) + dstRGB
|
||||||
|
dstA = dstA */
|
||||||
|
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
|
||||||
|
dstRGB = srcRGB * dstRGB
|
||||||
|
dstA = dstA */
|
||||||
|
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
|
||||||
|
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
|
||||||
|
dstA = (srcA * dstA) + (dstA * (1-srcA)) */
|
||||||
|
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
|
||||||
|
|
||||||
|
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
|
||||||
|
|
||||||
|
} SDL_BlendMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief The blend operation used when combining source and destination pixel components
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||||
|
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||||
|
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||||
|
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
|
||||||
|
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
|
||||||
|
} SDL_BlendOperation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief The normalized factor used to multiply pixel components
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
|
||||||
|
SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
|
||||||
|
SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */
|
||||||
|
SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
|
||||||
|
SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */
|
||||||
|
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
|
||||||
|
SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */
|
||||||
|
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
|
||||||
|
SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
|
||||||
|
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
|
||||||
|
} SDL_BlendFactor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compose a custom blend mode for renderers.
|
||||||
|
*
|
||||||
|
* The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
|
||||||
|
* the SDL_BlendMode returned by this function if the renderer supports it.
|
||||||
|
*
|
||||||
|
* A blend mode controls how the pixels from a drawing operation (source) get
|
||||||
|
* combined with the pixels from the render target (destination). First, the
|
||||||
|
* components of the source and destination pixels get multiplied with their
|
||||||
|
* blend factors. Then, the blend operation takes the two products and
|
||||||
|
* calculates the result that will get stored in the render target.
|
||||||
|
*
|
||||||
|
* Expressed in pseudocode, it would look like this:
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
|
||||||
|
* dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
|
||||||
|
* dst)` can return one of the following:
|
||||||
|
*
|
||||||
|
* - `src + dst`
|
||||||
|
* - `src - dst`
|
||||||
|
* - `dst - src`
|
||||||
|
* - `min(src, dst)`
|
||||||
|
* - `max(src, dst)`
|
||||||
|
*
|
||||||
|
* The red, green, and blue components are always multiplied with the first,
|
||||||
|
* second, and third components of the SDL_BlendFactor, respectively. The
|
||||||
|
* fourth component is not used.
|
||||||
|
*
|
||||||
|
* The alpha component is always multiplied with the fourth component of the
|
||||||
|
* SDL_BlendFactor. The other components are not used in the alpha
|
||||||
|
* calculation.
|
||||||
|
*
|
||||||
|
* Support for these blend modes varies for each renderer. To check if a
|
||||||
|
* specific SDL_BlendMode is supported, create a renderer and pass it to
|
||||||
|
* either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
|
||||||
|
* return with an error if the blend mode is not supported.
|
||||||
|
*
|
||||||
|
* This list describes the support of custom blend modes for each renderer in
|
||||||
|
* SDL 2.0.6. All renderers support the four blend modes listed in the
|
||||||
|
* SDL_BlendMode enumeration.
|
||||||
|
*
|
||||||
|
* - **direct3d**: Supports all operations with all factors. However, some
|
||||||
|
* factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
|
||||||
|
* `SDL_BLENDOPERATION_MAXIMUM`.
|
||||||
|
* - **direct3d11**: Same as Direct3D 9.
|
||||||
|
* - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||||
|
* factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
|
||||||
|
* 2.0.6.
|
||||||
|
* - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||||
|
* factors. Color and alpha factors need to be the same. OpenGL ES 1
|
||||||
|
* implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
|
||||||
|
* and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
|
||||||
|
* operations being different from each other. May support color and alpha
|
||||||
|
* factors being different from each other.
|
||||||
|
* - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
|
||||||
|
* `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
|
||||||
|
* operations with all factors.
|
||||||
|
* - **psp**: No custom blend mode support.
|
||||||
|
* - **software**: No custom blend mode support.
|
||||||
|
*
|
||||||
|
* Some renderers do not provide an alpha component for the default render
|
||||||
|
* target. The `SDL_BLENDFACTOR_DST_ALPHA` and
|
||||||
|
* `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
|
||||||
|
* case.
|
||||||
|
*
|
||||||
|
* \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
|
||||||
|
* blue components of the source pixels
|
||||||
|
* \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
|
||||||
|
* blue components of the destination pixels
|
||||||
|
* \param colorOperation the SDL_BlendOperation used to combine the red,
|
||||||
|
* green, and blue components of the source and
|
||||||
|
* destination pixels
|
||||||
|
* \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
|
||||||
|
* the source pixels
|
||||||
|
* \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
|
||||||
|
* the destination pixels
|
||||||
|
* \param alphaOperation the SDL_BlendOperation used to combine the alpha
|
||||||
|
* component of the source and destination pixels
|
||||||
|
* \returns an SDL_BlendMode that represents the chosen factors and
|
||||||
|
* operations.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.6.
|
||||||
|
*
|
||||||
|
* \sa SDL_SetRenderDrawBlendMode
|
||||||
|
* \sa SDL_GetRenderDrawBlendMode
|
||||||
|
* \sa SDL_SetTextureBlendMode
|
||||||
|
* \sa SDL_GetTextureBlendMode
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
|
||||||
|
SDL_BlendFactor dstColorFactor,
|
||||||
|
SDL_BlendOperation colorOperation,
|
||||||
|
SDL_BlendFactor srcAlphaFactor,
|
||||||
|
SDL_BlendFactor dstAlphaFactor,
|
||||||
|
SDL_BlendOperation alphaOperation);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_blendmode_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
94
release/SDL2.framework/Versions/A/Headers/SDL_clipboard.h
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_clipboard.h
|
||||||
|
*
|
||||||
|
* Include file for SDL clipboard handling
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_clipboard_h_
|
||||||
|
#define SDL_clipboard_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Function prototypes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Put UTF-8 text into the clipboard.
|
||||||
|
*
|
||||||
|
* \param text the text to store in the clipboard
|
||||||
|
* \returns 0 on success or a negative error code on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetClipboardText
|
||||||
|
* \sa SDL_HasClipboardText
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get UTF-8 text from the clipboard, which must be freed with SDL_free().
|
||||||
|
*
|
||||||
|
* This functions returns empty string if there was not enough memory left for
|
||||||
|
* a copy of the clipboard's content.
|
||||||
|
*
|
||||||
|
* \returns the clipboard text on success or an empty string on failure; call
|
||||||
|
* SDL_GetError() for more information. Caller must call SDL_free()
|
||||||
|
* on the returned pointer when done with it (even if there was an
|
||||||
|
* error).
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasClipboardText
|
||||||
|
* \sa SDL_SetClipboardText
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Query whether the clipboard exists and contains a non-empty text string.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetClipboardText
|
||||||
|
* \sa SDL_SetClipboardText
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
|
||||||
|
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_clipboard_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
61
release/SDL2.framework/Versions/A/Headers/SDL_config.h
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_config_h_
|
||||||
|
#define SDL_config_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_platform.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file SDL_config.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Add any platform that doesn't build using the configure system. */
|
||||||
|
#if defined(__WIN32__)
|
||||||
|
#include <SDL2/SDL_config_windows.h>
|
||||||
|
#elif defined(__WINRT__)
|
||||||
|
#include <SDL2/SDL_config_winrt.h>
|
||||||
|
#elif defined(__WINGDK__)
|
||||||
|
#include <SDL2/SDL_config_wingdk.h>
|
||||||
|
#elif defined(__XBOXONE__) || defined(__XBOXSERIES__)
|
||||||
|
#include <SDL2/SDL_config_xbox.h>
|
||||||
|
#elif defined(__MACOSX__)
|
||||||
|
#include <SDL2/SDL_config_macosx.h>
|
||||||
|
#elif defined(__IPHONEOS__)
|
||||||
|
#include <SDL2/SDL_config_iphoneos.h>
|
||||||
|
#elif defined(__ANDROID__)
|
||||||
|
#include <SDL2/SDL_config_android.h>
|
||||||
|
#elif defined(__OS2__)
|
||||||
|
#include <SDL2/SDL_config_os2.h>
|
||||||
|
#elif defined(__EMSCRIPTEN__)
|
||||||
|
#include <SDL2/SDL_config_emscripten.h>
|
||||||
|
#elif defined(__NGAGE__)
|
||||||
|
#include <SDL2/SDL_config_ngage.h>
|
||||||
|
#else
|
||||||
|
/* This is a minimal configuration just to get SDL running on new platforms. */
|
||||||
|
#include <SDL2/SDL_config_minimal.h>
|
||||||
|
#endif /* platform config */
|
||||||
|
|
||||||
|
#ifdef USING_GENERATED_CONFIG_H
|
||||||
|
#error Wrong SDL_config.h, check your include path?
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SDL_config_h_ */
|
||||||
276
release/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h
Normal file
@@ -0,0 +1,276 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_config_macosx_h_
|
||||||
|
#define SDL_config_macosx_h_
|
||||||
|
#define SDL_config_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_platform.h>
|
||||||
|
|
||||||
|
/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
|
||||||
|
#include <AvailabilityMacros.h>
|
||||||
|
|
||||||
|
/* This is a set of defines to configure the SDL features */
|
||||||
|
|
||||||
|
#ifdef __LP64__
|
||||||
|
#define SIZEOF_VOIDP 8
|
||||||
|
#else
|
||||||
|
#define SIZEOF_VOIDP 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Useful headers */
|
||||||
|
#define STDC_HEADERS 1
|
||||||
|
#define HAVE_ALLOCA_H 1
|
||||||
|
#define HAVE_CTYPE_H 1
|
||||||
|
#define HAVE_FLOAT_H 1
|
||||||
|
#define HAVE_INTTYPES_H 1
|
||||||
|
#define HAVE_LIMITS_H 1
|
||||||
|
#define HAVE_MATH_H 1
|
||||||
|
#define HAVE_SIGNAL_H 1
|
||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
#define HAVE_STDIO_H 1
|
||||||
|
#define HAVE_STRING_H 1
|
||||||
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
#define HAVE_LIBUNWIND_H 1
|
||||||
|
|
||||||
|
/* C library functions */
|
||||||
|
#define HAVE_DLOPEN 1
|
||||||
|
#define HAVE_MALLOC 1
|
||||||
|
#define HAVE_CALLOC 1
|
||||||
|
#define HAVE_REALLOC 1
|
||||||
|
#define HAVE_FREE 1
|
||||||
|
#define HAVE_ALLOCA 1
|
||||||
|
#define HAVE_GETENV 1
|
||||||
|
#define HAVE_SETENV 1
|
||||||
|
#define HAVE_PUTENV 1
|
||||||
|
#define HAVE_UNSETENV 1
|
||||||
|
#define HAVE_QSORT 1
|
||||||
|
#define HAVE_BSEARCH 1
|
||||||
|
#define HAVE_ABS 1
|
||||||
|
#define HAVE_BCOPY 1
|
||||||
|
#define HAVE_MEMSET 1
|
||||||
|
#define HAVE_MEMCPY 1
|
||||||
|
#define HAVE_MEMMOVE 1
|
||||||
|
#define HAVE_MEMCMP 1
|
||||||
|
#define HAVE_STRLEN 1
|
||||||
|
#define HAVE_STRLCPY 1
|
||||||
|
#define HAVE_STRLCAT 1
|
||||||
|
#define HAVE_STRCHR 1
|
||||||
|
#define HAVE_STRRCHR 1
|
||||||
|
#define HAVE_STRSTR 1
|
||||||
|
#define HAVE_STRTOK_R 1
|
||||||
|
#define HAVE_STRTOL 1
|
||||||
|
#define HAVE_STRTOUL 1
|
||||||
|
#define HAVE_STRTOLL 1
|
||||||
|
#define HAVE_STRTOULL 1
|
||||||
|
#define HAVE_STRTOD 1
|
||||||
|
#define HAVE_ATOI 1
|
||||||
|
#define HAVE_ATOF 1
|
||||||
|
#define HAVE_STRCMP 1
|
||||||
|
#define HAVE_STRNCMP 1
|
||||||
|
#define HAVE_STRCASECMP 1
|
||||||
|
#define HAVE_STRNCASECMP 1
|
||||||
|
#define HAVE_VSSCANF 1
|
||||||
|
#define HAVE_VSNPRINTF 1
|
||||||
|
#define HAVE_M_PI 1
|
||||||
|
#define HAVE_ACOS 1
|
||||||
|
#define HAVE_ACOSF 1
|
||||||
|
#define HAVE_ASIN 1
|
||||||
|
#define HAVE_ASINF 1
|
||||||
|
#define HAVE_ATAN 1
|
||||||
|
#define HAVE_ATANF 1
|
||||||
|
#define HAVE_ATAN2 1
|
||||||
|
#define HAVE_ATAN2F 1
|
||||||
|
#define HAVE_CEIL 1
|
||||||
|
#define HAVE_CEILF 1
|
||||||
|
#define HAVE_COPYSIGN 1
|
||||||
|
#define HAVE_COPYSIGNF 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_LROUND 1
|
||||||
|
#define HAVE_LROUNDF 1
|
||||||
|
#define HAVE_POW 1
|
||||||
|
#define HAVE_POWF 1
|
||||||
|
#define HAVE_ROUND 1
|
||||||
|
#define HAVE_ROUNDF 1
|
||||||
|
#define HAVE_SCALBN 1
|
||||||
|
#define HAVE_SCALBNF 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_TRUNC 1
|
||||||
|
#define HAVE_TRUNCF 1
|
||||||
|
#define HAVE_SIGACTION 1
|
||||||
|
#define HAVE_SETJMP 1
|
||||||
|
#define HAVE_NANOSLEEP 1
|
||||||
|
#define HAVE_SYSCONF 1
|
||||||
|
#define HAVE_SYSCTLBYNAME 1
|
||||||
|
|
||||||
|
#if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||||
|
# if __has_include(<immintrin.h>)
|
||||||
|
# define HAVE_IMMINTRIN_H 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
|
||||||
|
#define HAVE_O_CLOEXEC 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define HAVE_GCC_ATOMICS 1
|
||||||
|
|
||||||
|
/* Enable various audio drivers */
|
||||||
|
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||||
|
#define SDL_AUDIO_DRIVER_DISK 1
|
||||||
|
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||||
|
|
||||||
|
/* Enable various input drivers */
|
||||||
|
#define SDL_JOYSTICK_HIDAPI 1
|
||||||
|
#define SDL_JOYSTICK_IOKIT 1
|
||||||
|
#define SDL_JOYSTICK_VIRTUAL 1
|
||||||
|
#define SDL_HAPTIC_IOKIT 1
|
||||||
|
|
||||||
|
/* The MFI controller support requires ARC Objective C runtime */
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !defined(__i386__)
|
||||||
|
#define SDL_JOYSTICK_MFI 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Enable the dummy sensor driver */
|
||||||
|
#define SDL_SENSOR_DUMMY 1
|
||||||
|
|
||||||
|
/* Enable various shared object loading systems */
|
||||||
|
#define SDL_LOADSO_DLOPEN 1
|
||||||
|
|
||||||
|
/* Enable various threading systems */
|
||||||
|
#define SDL_THREAD_PTHREAD 1
|
||||||
|
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||||
|
|
||||||
|
/* Enable various timer systems */
|
||||||
|
#define SDL_TIMER_UNIX 1
|
||||||
|
|
||||||
|
/* Enable various video drivers */
|
||||||
|
#define SDL_VIDEO_DRIVER_COCOA 1
|
||||||
|
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||||
|
#undef SDL_VIDEO_DRIVER_X11
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
||||||
|
|
||||||
|
#ifdef MAC_OS_X_VERSION_10_8
|
||||||
|
/*
|
||||||
|
* No matter the versions targeted, this is the 10.8 or later SDK, so you have
|
||||||
|
* to use the external Xquartz, which is a more modern Xlib. Previous SDKs
|
||||||
|
* used an older Xlib.
|
||||||
|
*/
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_VIDEO_RENDER_OGL
|
||||||
|
#define SDL_VIDEO_RENDER_OGL 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_VIDEO_RENDER_OGL_ES2
|
||||||
|
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Metal only supported on 64-bit architectures with 10.11+ */
|
||||||
|
#if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||||
|
#define SDL_PLATFORM_SUPPORTS_METAL 1
|
||||||
|
#else
|
||||||
|
#define SDL_PLATFORM_SUPPORTS_METAL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_VIDEO_RENDER_METAL
|
||||||
|
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||||
|
#define SDL_VIDEO_RENDER_METAL 1
|
||||||
|
#else
|
||||||
|
#define SDL_VIDEO_RENDER_METAL 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Enable OpenGL support */
|
||||||
|
#ifndef SDL_VIDEO_OPENGL
|
||||||
|
#define SDL_VIDEO_OPENGL 1
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_OPENGL_ES2
|
||||||
|
#define SDL_VIDEO_OPENGL_ES2 1
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_OPENGL_EGL
|
||||||
|
#define SDL_VIDEO_OPENGL_EGL 1
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_OPENGL_CGL
|
||||||
|
#define SDL_VIDEO_OPENGL_CGL 1
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_VIDEO_OPENGL_GLX
|
||||||
|
#define SDL_VIDEO_OPENGL_GLX 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Enable Vulkan and Metal support */
|
||||||
|
#ifndef SDL_VIDEO_VULKAN
|
||||||
|
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||||
|
#define SDL_VIDEO_VULKAN 1
|
||||||
|
#else
|
||||||
|
#define SDL_VIDEO_VULKAN 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_VIDEO_METAL
|
||||||
|
#if SDL_PLATFORM_SUPPORTS_METAL
|
||||||
|
#define SDL_VIDEO_METAL 1
|
||||||
|
#else
|
||||||
|
#define SDL_VIDEO_METAL 0
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Enable system power support */
|
||||||
|
#define SDL_POWER_MACOSX 1
|
||||||
|
|
||||||
|
/* enable filesystem support */
|
||||||
|
#define SDL_FILESYSTEM_COCOA 1
|
||||||
|
|
||||||
|
/* Enable assembly routines */
|
||||||
|
#ifdef __ppc__
|
||||||
|
#define SDL_ALTIVEC_BLITTERS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SDL_config_macosx_h_ */
|
||||||
20
release/SDL2.framework/Versions/A/Headers/SDL_copying.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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.
|
||||||
|
*/
|
||||||
593
release/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h
Normal file
@@ -0,0 +1,593 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_cpuinfo.h
|
||||||
|
*
|
||||||
|
* CPU feature detection for SDL.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_cpuinfo_h_
|
||||||
|
#define SDL_cpuinfo_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
|
||||||
|
/* Need to do this here because intrin.h has C++ code in it */
|
||||||
|
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||||
|
#ifdef __clang__
|
||||||
|
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||||
|
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||||
|
|
||||||
|
#ifndef __PRFCHWINTRIN_H
|
||||||
|
#define __PRFCHWINTRIN_H
|
||||||
|
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_prefetch(void *__P)
|
||||||
|
{
|
||||||
|
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* __PRFCHWINTRIN_H */
|
||||||
|
#endif /* __clang__ */
|
||||||
|
#include <intrin.h>
|
||||||
|
#ifndef _WIN64
|
||||||
|
#ifndef __MMX__
|
||||||
|
#define __MMX__
|
||||||
|
#endif
|
||||||
|
#ifndef __3dNOW__
|
||||||
|
#define __3dNOW__
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifndef __SSE__
|
||||||
|
#define __SSE__
|
||||||
|
#endif
|
||||||
|
#ifndef __SSE2__
|
||||||
|
#define __SSE2__
|
||||||
|
#endif
|
||||||
|
#ifndef __SSE3__
|
||||||
|
#define __SSE3__
|
||||||
|
#endif
|
||||||
|
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||||
|
#include <intrin.h>
|
||||||
|
#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
|
||||||
|
# include <arm_neon.h>
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
|
||||||
|
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
|
||||||
|
#include <altivec.h>
|
||||||
|
#endif
|
||||||
|
#if !defined(SDL_DISABLE_ARM_NEON_H)
|
||||||
|
# if defined(__ARM_NEON)
|
||||||
|
# include <arm_neon.h>
|
||||||
|
# elif defined(__WINDOWS__) || defined(__WINRT__) || defined(__GDK__)
|
||||||
|
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
|
||||||
|
# if defined(_M_ARM)
|
||||||
|
# include <armintr.h>
|
||||||
|
# include <arm_neon.h>
|
||||||
|
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||||
|
# endif
|
||||||
|
# if defined (_M_ARM64)
|
||||||
|
# include <arm64intr.h>
|
||||||
|
# include <arm64_neon.h>
|
||||||
|
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#endif /* compiler version */
|
||||||
|
|
||||||
|
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||||
|
#include <mm3dnow.h>
|
||||||
|
#endif
|
||||||
|
#if defined(__loongarch_sx) && !defined(SDL_DISABLE_LSX_H)
|
||||||
|
#include <lsxintrin.h>
|
||||||
|
#define __LSX__
|
||||||
|
#endif
|
||||||
|
#if defined(__loongarch_asx) && !defined(SDL_DISABLE_LASX_H)
|
||||||
|
#include <lasxintrin.h>
|
||||||
|
#define __LASX__
|
||||||
|
#endif
|
||||||
|
#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
|
||||||
|
#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
|
||||||
|
#include <emmintrin.h>
|
||||||
|
#endif
|
||||||
|
#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
|
||||||
|
#include <pmmintrin.h>
|
||||||
|
#endif
|
||||||
|
#endif /* HAVE_IMMINTRIN_H */
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* This is a guess for the cacheline size used for padding.
|
||||||
|
* Most x86 processors have a 64 byte cache line.
|
||||||
|
* The 64-bit PowerPC processors have a 128 byte cache line.
|
||||||
|
* We'll use the larger value to be generally safe.
|
||||||
|
*/
|
||||||
|
#define SDL_CACHELINE_SIZE 128
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of CPU cores available.
|
||||||
|
*
|
||||||
|
* \returns the total number of logical CPU cores. On CPUs that include
|
||||||
|
* technologies such as hyperthreading, the number of logical cores
|
||||||
|
* may be more than the number of physical cores.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine the L1 cache line size of the CPU.
|
||||||
|
*
|
||||||
|
* This is useful for determining multi-threaded structure padding or SIMD
|
||||||
|
* prefetch sizes.
|
||||||
|
*
|
||||||
|
* \returns the L1 cache line size of the CPU, in bytes.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has the RDTSC instruction.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has AltiVec features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using PowerPC instruction
|
||||||
|
* sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has MMX features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has 3DNow! features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using AMD instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE2 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE3 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE4.1 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has SSE4.2 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has AVX features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.2.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX2
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has AVX2 features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.4.
|
||||||
|
*
|
||||||
|
* \sa SDL_Has3DNow
|
||||||
|
* \sa SDL_HasAltiVec
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
* \sa SDL_HasMMX
|
||||||
|
* \sa SDL_HasRDTSC
|
||||||
|
* \sa SDL_HasSSE
|
||||||
|
* \sa SDL_HasSSE2
|
||||||
|
* \sa SDL_HasSSE3
|
||||||
|
* \sa SDL_HasSSE41
|
||||||
|
* \sa SDL_HasSSE42
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has AVX-512F (foundation) features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.9.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasAVX
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has ARM SIMD (ARMv6) features.
|
||||||
|
*
|
||||||
|
* This is different from ARM NEON, which is a different instruction set.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.12.
|
||||||
|
*
|
||||||
|
* \sa SDL_HasNEON
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has NEON (ARM SIMD) features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.6.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has LSX (LOONGARCH SIMD) features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||||
|
* sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has LOONGARCH LSX features or SDL_FALSE if
|
||||||
|
* not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasLSX(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the CPU has LASX (LOONGARCH SIMD) features.
|
||||||
|
*
|
||||||
|
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||||
|
* sets.
|
||||||
|
*
|
||||||
|
* \returns SDL_TRUE if the CPU has LOONGARCH LASX features or SDL_FALSE if
|
||||||
|
* not.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasLASX(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the amount of RAM configured in the system.
|
||||||
|
*
|
||||||
|
* \returns the amount of RAM configured in the system in MiB.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.1.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report the alignment this system needs for SIMD allocations.
|
||||||
|
*
|
||||||
|
* This will return the minimum number of bytes to which a pointer must be
|
||||||
|
* aligned to be compatible with SIMD instructions on the current machine. For
|
||||||
|
* example, if the machine supports SSE only, it will return 16, but if it
|
||||||
|
* supports AVX-512F, it'll return 64 (etc). This only reports values for
|
||||||
|
* instruction sets SDL knows about, so if your SDL build doesn't have
|
||||||
|
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
|
||||||
|
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
|
||||||
|
* Plan accordingly.
|
||||||
|
*
|
||||||
|
* \returns the alignment in bytes needed for available, known SIMD
|
||||||
|
* instructions.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.10.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allocate memory in a SIMD-friendly way.
|
||||||
|
*
|
||||||
|
* This will allocate a block of memory that is suitable for use with SIMD
|
||||||
|
* instructions. Specifically, it will be properly aligned and padded for the
|
||||||
|
* system's supported vector instructions.
|
||||||
|
*
|
||||||
|
* The memory returned will be padded such that it is safe to read or write an
|
||||||
|
* incomplete vector at the end of the memory block. This can be useful so you
|
||||||
|
* don't have to drop back to a scalar fallback at the end of your SIMD
|
||||||
|
* processing loop to deal with the final elements without overflowing the
|
||||||
|
* allocated buffer.
|
||||||
|
*
|
||||||
|
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
|
||||||
|
* delete[], etc.
|
||||||
|
*
|
||||||
|
* Note that SDL will only deal with SIMD instruction sets it is aware of; for
|
||||||
|
* example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
|
||||||
|
* AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
|
||||||
|
* 64. To be clear: if you can't decide to use an instruction set with an
|
||||||
|
* SDL_Has*() function, don't use that instruction set with memory allocated
|
||||||
|
* through here.
|
||||||
|
*
|
||||||
|
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
|
||||||
|
* out of memory, but you are not allowed to dereference it (because you only
|
||||||
|
* own zero bytes of that buffer).
|
||||||
|
*
|
||||||
|
* \param len The length, in bytes, of the block to allocate. The actual
|
||||||
|
* allocated block might be larger due to padding, etc.
|
||||||
|
* \returns a pointer to the newly-allocated block, NULL if out of memory.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.10.
|
||||||
|
*
|
||||||
|
* \sa SDL_SIMDGetAlignment
|
||||||
|
* \sa SDL_SIMDRealloc
|
||||||
|
* \sa SDL_SIMDFree
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reallocate memory obtained from SDL_SIMDAlloc
|
||||||
|
*
|
||||||
|
* It is not valid to use this function on a pointer from anything but
|
||||||
|
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
|
||||||
|
* SDL_malloc, memalign, new[], etc.
|
||||||
|
*
|
||||||
|
* \param mem The pointer obtained from SDL_SIMDAlloc. This function also
|
||||||
|
* accepts NULL, at which point this function is the same as
|
||||||
|
* calling SDL_SIMDAlloc with a NULL pointer.
|
||||||
|
* \param len The length, in bytes, of the block to allocated. The actual
|
||||||
|
* allocated block might be larger due to padding, etc. Passing 0
|
||||||
|
* will return a non-NULL pointer, assuming the system isn't out of
|
||||||
|
* memory.
|
||||||
|
* \returns a pointer to the newly-reallocated block, NULL if out of memory.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.14.
|
||||||
|
*
|
||||||
|
* \sa SDL_SIMDGetAlignment
|
||||||
|
* \sa SDL_SIMDAlloc
|
||||||
|
* \sa SDL_SIMDFree
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deallocate memory obtained from SDL_SIMDAlloc
|
||||||
|
*
|
||||||
|
* It is not valid to use this function on a pointer from anything but
|
||||||
|
* SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
|
||||||
|
* malloc, realloc, SDL_malloc, memalign, new[], etc.
|
||||||
|
*
|
||||||
|
* However, SDL_SIMDFree(NULL) is a legal no-op.
|
||||||
|
*
|
||||||
|
* The memory pointed to by `ptr` is no longer valid for access upon return,
|
||||||
|
* and may be returned to the system or reused by a future allocation. The
|
||||||
|
* pointer passed to this function is no longer safe to dereference once this
|
||||||
|
* function returns, and should be discarded.
|
||||||
|
*
|
||||||
|
* \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
|
||||||
|
* deallocate. NULL is a legal no-op.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.10.
|
||||||
|
*
|
||||||
|
* \sa SDL_SIMDAlloc
|
||||||
|
* \sa SDL_SIMDRealloc
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_cpuinfo_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
348
release/SDL2.framework/Versions/A/Headers/SDL_endian.h
Normal file
@@ -0,0 +1,348 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_endian.h
|
||||||
|
*
|
||||||
|
* Functions for reading and writing endian-specific values
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_endian_h_
|
||||||
|
#define SDL_endian_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
|
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||||
|
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||||
|
#ifdef __clang__
|
||||||
|
#ifndef __PRFCHWINTRIN_H
|
||||||
|
#define __PRFCHWINTRIN_H
|
||||||
|
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||||
|
_m_prefetch(void *__P)
|
||||||
|
{
|
||||||
|
__builtin_prefetch(__P, 0, 3 /* _MM_HINT_T0 */);
|
||||||
|
}
|
||||||
|
#endif /* __PRFCHWINTRIN_H */
|
||||||
|
#endif /* __clang__ */
|
||||||
|
|
||||||
|
#include <intrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name The two types of endianness
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
#define SDL_LIL_ENDIAN 1234
|
||||||
|
#define SDL_BIG_ENDIAN 4321
|
||||||
|
/* @} */
|
||||||
|
|
||||||
|
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <endian.h>
|
||||||
|
#define SDL_BYTEORDER __BYTE_ORDER
|
||||||
|
#elif defined(__OpenBSD__) || defined(__DragonFly__)
|
||||||
|
#include <endian.h>
|
||||||
|
#define SDL_BYTEORDER BYTE_ORDER
|
||||||
|
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
|
#include <sys/endian.h>
|
||||||
|
#define SDL_BYTEORDER BYTE_ORDER
|
||||||
|
/* predefs from newer gcc and clang versions: */
|
||||||
|
#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
|
||||||
|
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||||
|
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||||
|
#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||||
|
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
#error Unsupported endianness
|
||||||
|
#endif /**/
|
||||||
|
#else
|
||||||
|
#if defined(__hppa__) || \
|
||||||
|
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||||
|
(defined(__MIPS__) && defined(__MIPSEB__)) || \
|
||||||
|
defined(__ppc__) || defined(__POWERPC__) || defined(__powerpc__) || defined(__PPC__) || \
|
||||||
|
defined(__sparc__)
|
||||||
|
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||||
|
#endif
|
||||||
|
#endif /* __linux__ */
|
||||||
|
#endif /* !SDL_BYTEORDER */
|
||||||
|
|
||||||
|
#ifndef SDL_FLOATWORDORDER /* Not defined in SDL_config.h? */
|
||||||
|
/* predefs from newer gcc versions: */
|
||||||
|
#if defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__FLOAT_WORD_ORDER__)
|
||||||
|
#if (__FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||||
|
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||||
|
#elif (__FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||||
|
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
#error Unsupported endianness
|
||||||
|
#endif /**/
|
||||||
|
#elif defined(__MAVERICK__)
|
||||||
|
/* For Maverick, float words are always little-endian. */
|
||||||
|
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||||
|
#elif (defined(__arm__) || defined(__thumb__)) && !defined(__VFP_FP__) && !defined(__ARM_EABI__)
|
||||||
|
/* For FPA, float words are always big-endian. */
|
||||||
|
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||||
|
#else
|
||||||
|
/* By default, assume that floats words follow the memory system mode. */
|
||||||
|
#define SDL_FLOATWORDORDER SDL_BYTEORDER
|
||||||
|
#endif /* __FLOAT_WORD_ORDER__ */
|
||||||
|
#endif /* !SDL_FLOATWORDORDER */
|
||||||
|
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file SDL_endian.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* various modern compilers may have builtin swap */
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
# define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
|
||||||
|
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
|
||||||
|
# define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
|
||||||
|
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||||
|
# define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
|
||||||
|
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||||
|
|
||||||
|
/* this one is broken */
|
||||||
|
# define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
|
||||||
|
#else
|
||||||
|
# define HAS_BUILTIN_BSWAP16 0
|
||||||
|
# define HAS_BUILTIN_BSWAP32 0
|
||||||
|
# define HAS_BUILTIN_BSWAP64 0
|
||||||
|
# define HAS_BROKEN_BSWAP 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_BUILTIN_BSWAP16
|
||||||
|
#define SDL_Swap16(x) __builtin_bswap16(x)
|
||||||
|
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
|
#pragma intrinsic(_byteswap_ushort)
|
||||||
|
#define SDL_Swap16(x) _byteswap_ushort(x)
|
||||||
|
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
__asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__x86_64__)
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
__asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
|
__asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
|
||||||
|
return (Uint16)result;
|
||||||
|
}
|
||||||
|
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
extern __inline Uint16 SDL_Swap16(Uint16);
|
||||||
|
#pragma aux SDL_Swap16 = \
|
||||||
|
"xchg al, ah" \
|
||||||
|
parm [ax] \
|
||||||
|
modify [ax];
|
||||||
|
#else
|
||||||
|
SDL_FORCE_INLINE Uint16
|
||||||
|
SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_BUILTIN_BSWAP32
|
||||||
|
#define SDL_Swap32(x) __builtin_bswap32(x)
|
||||||
|
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
|
#pragma intrinsic(_byteswap_ulong)
|
||||||
|
#define SDL_Swap32(x) _byteswap_ulong(x)
|
||||||
|
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
__asm__("bswap %0": "=r"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__x86_64__)
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
__asm__("bswapl %0": "=r"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
Uint32 result;
|
||||||
|
|
||||||
|
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
|
||||||
|
__asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
|
||||||
|
__asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
extern __inline Uint32 SDL_Swap32(Uint32);
|
||||||
|
#pragma aux SDL_Swap32 = \
|
||||||
|
"bswap eax" \
|
||||||
|
parm [eax] \
|
||||||
|
modify [eax];
|
||||||
|
#else
|
||||||
|
SDL_FORCE_INLINE Uint32
|
||||||
|
SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
|
||||||
|
((x >> 8) & 0x0000FF00) | (x >> 24)));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_BUILTIN_BSWAP64
|
||||||
|
#define SDL_Swap64(x) __builtin_bswap64(x)
|
||||||
|
#elif defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||||
|
#pragma intrinsic(_byteswap_uint64)
|
||||||
|
#define SDL_Swap64(x) _byteswap_uint64(x)
|
||||||
|
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||||
|
SDL_FORCE_INLINE Uint64
|
||||||
|
SDL_Swap64(Uint64 x)
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Uint32 a, b;
|
||||||
|
} s;
|
||||||
|
Uint64 u;
|
||||||
|
} v;
|
||||||
|
v.u = x;
|
||||||
|
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
||||||
|
: "=r"(v.s.a), "=r"(v.s.b)
|
||||||
|
: "0" (v.s.a), "1"(v.s.b));
|
||||||
|
return v.u;
|
||||||
|
}
|
||||||
|
#elif defined(__x86_64__)
|
||||||
|
SDL_FORCE_INLINE Uint64
|
||||||
|
SDL_Swap64(Uint64 x)
|
||||||
|
{
|
||||||
|
__asm__("bswapq %0": "=r"(x):"0"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
#elif defined(__WATCOMC__) && defined(__386__)
|
||||||
|
extern __inline Uint64 SDL_Swap64(Uint64);
|
||||||
|
#pragma aux SDL_Swap64 = \
|
||||||
|
"bswap eax" \
|
||||||
|
"bswap edx" \
|
||||||
|
"xchg eax,edx" \
|
||||||
|
parm [eax edx] \
|
||||||
|
modify [eax edx];
|
||||||
|
#else
|
||||||
|
SDL_FORCE_INLINE Uint64
|
||||||
|
SDL_Swap64(Uint64 x)
|
||||||
|
{
|
||||||
|
Uint32 hi, lo;
|
||||||
|
|
||||||
|
/* Separate into high and low 32-bit values and swap them */
|
||||||
|
lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||||
|
x >>= 32;
|
||||||
|
hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||||
|
x = SDL_Swap32(lo);
|
||||||
|
x <<= 32;
|
||||||
|
x |= SDL_Swap32(hi);
|
||||||
|
return (x);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
SDL_FORCE_INLINE float
|
||||||
|
SDL_SwapFloat(float x)
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
float f;
|
||||||
|
Uint32 ui32;
|
||||||
|
} swapper;
|
||||||
|
swapper.f = x;
|
||||||
|
swapper.ui32 = SDL_Swap32(swapper.ui32);
|
||||||
|
return swapper.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* remove extra macros */
|
||||||
|
#undef HAS_BROKEN_BSWAP
|
||||||
|
#undef HAS_BUILTIN_BSWAP16
|
||||||
|
#undef HAS_BUILTIN_BSWAP32
|
||||||
|
#undef HAS_BUILTIN_BSWAP64
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name Swap to native
|
||||||
|
* Byteswap item from the specified endianness to the native endianness.
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||||
|
#define SDL_SwapLE16(X) (X)
|
||||||
|
#define SDL_SwapLE32(X) (X)
|
||||||
|
#define SDL_SwapLE64(X) (X)
|
||||||
|
#define SDL_SwapFloatLE(X) (X)
|
||||||
|
#define SDL_SwapBE16(X) SDL_Swap16(X)
|
||||||
|
#define SDL_SwapBE32(X) SDL_Swap32(X)
|
||||||
|
#define SDL_SwapBE64(X) SDL_Swap64(X)
|
||||||
|
#define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
|
||||||
|
#else
|
||||||
|
#define SDL_SwapLE16(X) SDL_Swap16(X)
|
||||||
|
#define SDL_SwapLE32(X) SDL_Swap32(X)
|
||||||
|
#define SDL_SwapLE64(X) SDL_Swap64(X)
|
||||||
|
#define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
|
||||||
|
#define SDL_SwapBE16(X) (X)
|
||||||
|
#define SDL_SwapBE32(X) (X)
|
||||||
|
#define SDL_SwapBE64(X) (X)
|
||||||
|
#define SDL_SwapFloatBE(X) (X)
|
||||||
|
#endif
|
||||||
|
/* @} *//* Swap to native */
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_endian_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
163
release/SDL2.framework/Versions/A/Headers/SDL_error.h
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_error.h
|
||||||
|
*
|
||||||
|
* Simple error message routines for SDL.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_error_h_
|
||||||
|
#define SDL_error_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Public functions */
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the SDL error message for the current thread.
|
||||||
|
*
|
||||||
|
* Calling this function will replace any previous error message that was set.
|
||||||
|
*
|
||||||
|
* This function always returns -1, since SDL frequently uses -1 to signify an
|
||||||
|
* failing result, leading to this idiom:
|
||||||
|
*
|
||||||
|
* ```c
|
||||||
|
* if (error_code) {
|
||||||
|
* return SDL_SetError("This operation has failed: %d", error_code);
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* \param fmt a printf()-style message format string
|
||||||
|
* \param ... additional parameters matching % tokens in the `fmt` string, if
|
||||||
|
* any
|
||||||
|
* \returns always -1.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_ClearError
|
||||||
|
* \sa SDL_GetError
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve a message about the last error that occurred on the current
|
||||||
|
* thread.
|
||||||
|
*
|
||||||
|
* It is possible for multiple errors to occur before calling SDL_GetError().
|
||||||
|
* Only the last error is returned.
|
||||||
|
*
|
||||||
|
* The message is only applicable when an SDL function has signaled an error.
|
||||||
|
* You must check the return values of SDL function calls to determine when to
|
||||||
|
* appropriately call SDL_GetError(). You should *not* use the results of
|
||||||
|
* SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
|
||||||
|
* an error string even when reporting success.
|
||||||
|
*
|
||||||
|
* SDL will *not* clear the error string for successful API calls. You *must*
|
||||||
|
* check return values for failure cases before you can assume the error
|
||||||
|
* string applies.
|
||||||
|
*
|
||||||
|
* Error strings are set per-thread, so an error set in a different thread
|
||||||
|
* will not interfere with the current thread's operation.
|
||||||
|
*
|
||||||
|
* The returned string is internally allocated and must not be freed by the
|
||||||
|
* application.
|
||||||
|
*
|
||||||
|
* \returns a message with information about the specific error that occurred,
|
||||||
|
* or an empty string if there hasn't been an error message set since
|
||||||
|
* the last call to SDL_ClearError(). The message is only applicable
|
||||||
|
* when an SDL function has signaled an error. You must check the
|
||||||
|
* return values of SDL function calls to determine when to
|
||||||
|
* appropriately call SDL_GetError().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_ClearError
|
||||||
|
* \sa SDL_SetError
|
||||||
|
*/
|
||||||
|
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the last error message that was set for the current thread.
|
||||||
|
*
|
||||||
|
* This allows the caller to copy the error string into a provided buffer, but
|
||||||
|
* otherwise operates exactly the same as SDL_GetError().
|
||||||
|
*
|
||||||
|
* \param errstr A buffer to fill with the last error message that was set for
|
||||||
|
* the current thread
|
||||||
|
* \param maxlen The size of the buffer pointed to by the errstr parameter
|
||||||
|
* \returns the pointer passed in as the `errstr` parameter.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.14.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetError
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear any previous error message for this thread.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetError
|
||||||
|
* \sa SDL_SetError
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \name Internal error functions
|
||||||
|
*
|
||||||
|
* \internal
|
||||||
|
* Private error reporting function - used internally.
|
||||||
|
*/
|
||||||
|
/* @{ */
|
||||||
|
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
|
||||||
|
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
|
||||||
|
#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_ENOMEM,
|
||||||
|
SDL_EFREAD,
|
||||||
|
SDL_EFWRITE,
|
||||||
|
SDL_EFSEEK,
|
||||||
|
SDL_UNSUPPORTED,
|
||||||
|
SDL_LASTERROR
|
||||||
|
} SDL_errorcode;
|
||||||
|
/* SDL_Error() unconditionally returns -1. */
|
||||||
|
extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
|
||||||
|
/* @} *//* Internal error functions */
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_error_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
1162
release/SDL2.framework/Versions/A/Headers/SDL_events.h
Normal file
145
release/SDL2.framework/Versions/A/Headers/SDL_filesystem.h
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_filesystem.h
|
||||||
|
*
|
||||||
|
* \brief Include file for filesystem SDL API functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_filesystem_h_
|
||||||
|
#define SDL_filesystem_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the directory where the application was run from.
|
||||||
|
*
|
||||||
|
* This is not necessarily a fast call, so you should call this once near
|
||||||
|
* startup and save the string if you need it.
|
||||||
|
*
|
||||||
|
* **Mac OS X and iOS Specific Functionality**: If the application is in a
|
||||||
|
* ".app" bundle, this function returns the Resource directory (e.g.
|
||||||
|
* MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
|
||||||
|
* a property to the Info.plist file. Adding a string key with the name
|
||||||
|
* SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
|
||||||
|
* behaviour.
|
||||||
|
*
|
||||||
|
* Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
|
||||||
|
* application in /Applications/SDLApp/MyApp.app):
|
||||||
|
*
|
||||||
|
* - `resource`: bundle resource directory (the default). For example:
|
||||||
|
* `/Applications/SDLApp/MyApp.app/Contents/Resources`
|
||||||
|
* - `bundle`: the Bundle directory. For example:
|
||||||
|
* `/Applications/SDLApp/MyApp.app/`
|
||||||
|
* - `parent`: the containing directory of the bundle. For example:
|
||||||
|
* `/Applications/SDLApp/`
|
||||||
|
*
|
||||||
|
* The returned path is guaranteed to end with a path separator ('\' on
|
||||||
|
* Windows, '/' on most other platforms).
|
||||||
|
*
|
||||||
|
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||||
|
* pointer when done with it.
|
||||||
|
*
|
||||||
|
* \returns an absolute path in UTF-8 encoding to the application data
|
||||||
|
* directory. NULL will be returned on error or when the platform
|
||||||
|
* doesn't implement this functionality, call SDL_GetError() for more
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.1.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetPrefPath
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the user-and-app-specific path where files can be written.
|
||||||
|
*
|
||||||
|
* Get the "pref dir". This is meant to be where users can write personal
|
||||||
|
* files (preferences and save games, etc) that are specific to your
|
||||||
|
* application. This directory is unique per user, per application.
|
||||||
|
*
|
||||||
|
* This function will decide the appropriate location in the native
|
||||||
|
* filesystem, create the directory if necessary, and return a string of the
|
||||||
|
* absolute path to the directory in UTF-8 encoding.
|
||||||
|
*
|
||||||
|
* On Windows, the string might look like:
|
||||||
|
*
|
||||||
|
* `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
|
||||||
|
*
|
||||||
|
* On Linux, the string might look like:
|
||||||
|
*
|
||||||
|
* `/home/bob/.local/share/My Program Name/`
|
||||||
|
*
|
||||||
|
* On Mac OS X, the string might look like:
|
||||||
|
*
|
||||||
|
* `/Users/bob/Library/Application Support/My Program Name/`
|
||||||
|
*
|
||||||
|
* You should assume the path returned by this function is the only safe place
|
||||||
|
* to write files (and that SDL_GetBasePath(), while it might be writable, or
|
||||||
|
* even the parent of the returned path, isn't where you should be writing
|
||||||
|
* things).
|
||||||
|
*
|
||||||
|
* Both the org and app strings may become part of a directory name, so please
|
||||||
|
* follow these rules:
|
||||||
|
*
|
||||||
|
* - Try to use the same org string (_including case-sensitivity_) for all
|
||||||
|
* your applications that use this function.
|
||||||
|
* - Always use a unique app string for each one, and make sure it never
|
||||||
|
* changes for an app once you've decided on it.
|
||||||
|
* - Unicode characters are legal, as long as it's UTF-8 encoded, but...
|
||||||
|
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
|
||||||
|
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
|
||||||
|
*
|
||||||
|
* The returned path is guaranteed to end with a path separator ('\' on
|
||||||
|
* Windows, '/' on most other platforms).
|
||||||
|
*
|
||||||
|
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||||
|
* pointer when done with it.
|
||||||
|
*
|
||||||
|
* \param org the name of your organization
|
||||||
|
* \param app the name of your application
|
||||||
|
* \returns a UTF-8 string of the user directory in platform-dependent
|
||||||
|
* notation. NULL if there's a problem (creating directory failed,
|
||||||
|
* etc.).
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.1.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetBasePath
|
||||||
|
*/
|
||||||
|
extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_filesystem_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
1055
release/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h
Normal file
117
release/SDL2.framework/Versions/A/Headers/SDL_gesture.h
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_gesture.h
|
||||||
|
*
|
||||||
|
* Include file for SDL gesture event handling.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_gesture_h_
|
||||||
|
#define SDL_gesture_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
#include <SDL2/SDL_error.h>
|
||||||
|
#include <SDL2/SDL_video.h>
|
||||||
|
|
||||||
|
#include <SDL2/SDL_touch.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef Sint64 SDL_GestureID;
|
||||||
|
|
||||||
|
/* Function prototypes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Begin recording a gesture on a specified touch device or all touch devices.
|
||||||
|
*
|
||||||
|
* If the parameter `touchId` is -1 (i.e., all devices), this function will
|
||||||
|
* always return 1, regardless of whether there actually are any devices.
|
||||||
|
*
|
||||||
|
* \param touchId the touch device id, or -1 for all touch devices
|
||||||
|
* \returns 1 on success or 0 if the specified device could not be found.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetTouchDevice
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save all currently loaded Dollar Gesture templates.
|
||||||
|
*
|
||||||
|
* \param dst a SDL_RWops to save to
|
||||||
|
* \returns the number of saved templates on success or 0 on failure; call
|
||||||
|
* SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LoadDollarTemplates
|
||||||
|
* \sa SDL_SaveDollarTemplate
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save a currently loaded Dollar Gesture template.
|
||||||
|
*
|
||||||
|
* \param gestureId a gesture id
|
||||||
|
* \param dst a SDL_RWops to save to
|
||||||
|
* \returns 1 on success or 0 on failure; call SDL_GetError() for more
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_LoadDollarTemplates
|
||||||
|
* \sa SDL_SaveAllDollarTemplates
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Dollar Gesture templates from a file.
|
||||||
|
*
|
||||||
|
* \param touchId a touch id
|
||||||
|
* \param src a SDL_RWops to load from
|
||||||
|
* \returns the number of loaded templates on success or a negative error code
|
||||||
|
* (or 0) on failure; call SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_SaveAllDollarTemplates
|
||||||
|
* \sa SDL_SaveDollarTemplate
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_gesture_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
100
release/SDL2.framework/Versions/A/Headers/SDL_guid.h
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_guid.h
|
||||||
|
*
|
||||||
|
* Include file for handling ::SDL_GUID values.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_guid_h_
|
||||||
|
#define SDL_guid_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
#include <SDL2/SDL_error.h>
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An SDL_GUID is a 128-bit identifier for an input device that
|
||||||
|
* identifies that device across runs of SDL programs on the same
|
||||||
|
* platform. If the device is detached and then re-attached to a
|
||||||
|
* different port, or if the base system is rebooted, the device
|
||||||
|
* should still report the same GUID.
|
||||||
|
*
|
||||||
|
* GUIDs are as precise as possible but are not guaranteed to
|
||||||
|
* distinguish physically distinct but equivalent devices. For
|
||||||
|
* example, two game controllers from the same vendor with the same
|
||||||
|
* product ID and revision may have the same GUID.
|
||||||
|
*
|
||||||
|
* GUIDs may be platform-dependent (i.e., the same device may report
|
||||||
|
* different GUIDs on different operating systems).
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
Uint8 data[16];
|
||||||
|
} SDL_GUID;
|
||||||
|
|
||||||
|
/* Function prototypes */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get an ASCII string representation for a given ::SDL_GUID.
|
||||||
|
*
|
||||||
|
* You should supply at least 33 bytes for pszGUID.
|
||||||
|
*
|
||||||
|
* \param guid the ::SDL_GUID you wish to convert to string
|
||||||
|
* \param pszGUID buffer in which to write the ASCII string
|
||||||
|
* \param cbGUID the size of pszGUID
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GUIDFromString
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert a GUID string into a ::SDL_GUID structure.
|
||||||
|
*
|
||||||
|
* Performs no error checking. If this function is given a string containing
|
||||||
|
* an invalid GUID, the function will silently succeed, but the GUID generated
|
||||||
|
* will not be useful.
|
||||||
|
*
|
||||||
|
* \param pchGUID string containing an ASCII representation of a GUID
|
||||||
|
* \returns a ::SDL_GUID structure.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.24.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_GUIDToString
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_GUID SDLCALL SDL_GUIDFromString(const char *pchGUID);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_guid_h_ */
|
||||||
|
|
||||||
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
1341
release/SDL2.framework/Versions/A/Headers/SDL_haptic.h
Normal file
451
release/SDL2.framework/Versions/A/Headers/SDL_hidapi.h
Normal file
@@ -0,0 +1,451 @@
|
|||||||
|
/*
|
||||||
|
Simple DirectMedia Layer
|
||||||
|
Copyright (C) 1997-2022 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_hidapi.h
|
||||||
|
*
|
||||||
|
* Header file for SDL HIDAPI functions.
|
||||||
|
*
|
||||||
|
* This is an adaptation of the original HIDAPI interface by Alan Ott,
|
||||||
|
* and includes source code licensed under the following BSD license:
|
||||||
|
*
|
||||||
|
Copyright (c) 2010, Alan Ott, Signal 11 Software
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of Signal 11 Software nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* If you would like a version of SDL without this code, you can build SDL
|
||||||
|
* with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for example
|
||||||
|
* on iOS or tvOS to avoid a dependency on the CoreBluetooth framework.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SDL_hidapi_h_
|
||||||
|
#define SDL_hidapi_h_
|
||||||
|
|
||||||
|
#include <SDL2/SDL_stdinc.h>
|
||||||
|
|
||||||
|
#include <SDL2/begin_code.h>
|
||||||
|
/* Set up for C function definitions, even when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A handle representing an open HID device
|
||||||
|
*/
|
||||||
|
struct SDL_hid_device_;
|
||||||
|
typedef struct SDL_hid_device_ SDL_hid_device; /**< opaque hidapi structure */
|
||||||
|
|
||||||
|
/** hidapi info structure */
|
||||||
|
/**
|
||||||
|
* \brief Information about a connected HID device
|
||||||
|
*/
|
||||||
|
typedef struct SDL_hid_device_info
|
||||||
|
{
|
||||||
|
/** Platform-specific device path */
|
||||||
|
char *path;
|
||||||
|
/** Device Vendor ID */
|
||||||
|
unsigned short vendor_id;
|
||||||
|
/** Device Product ID */
|
||||||
|
unsigned short product_id;
|
||||||
|
/** Serial Number */
|
||||||
|
wchar_t *serial_number;
|
||||||
|
/** Device Release Number in binary-coded decimal,
|
||||||
|
also known as Device Version Number */
|
||||||
|
unsigned short release_number;
|
||||||
|
/** Manufacturer String */
|
||||||
|
wchar_t *manufacturer_string;
|
||||||
|
/** Product string */
|
||||||
|
wchar_t *product_string;
|
||||||
|
/** Usage Page for this Device/Interface
|
||||||
|
(Windows/Mac only). */
|
||||||
|
unsigned short usage_page;
|
||||||
|
/** Usage for this Device/Interface
|
||||||
|
(Windows/Mac only).*/
|
||||||
|
unsigned short usage;
|
||||||
|
/** The USB interface which this logical device
|
||||||
|
represents.
|
||||||
|
|
||||||
|
* Valid on both Linux implementations in all cases.
|
||||||
|
* Valid on the Windows implementation only if the device
|
||||||
|
contains more than one interface. */
|
||||||
|
int interface_number;
|
||||||
|
|
||||||
|
/** Additional information about the USB interface.
|
||||||
|
Valid on libusb and Android implementations. */
|
||||||
|
int interface_class;
|
||||||
|
int interface_subclass;
|
||||||
|
int interface_protocol;
|
||||||
|
|
||||||
|
/** Pointer to the next device */
|
||||||
|
struct SDL_hid_device_info *next;
|
||||||
|
} SDL_hid_device_info;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the HIDAPI library.
|
||||||
|
*
|
||||||
|
* This function initializes the HIDAPI library. Calling it is not strictly
|
||||||
|
* necessary, as it will be called automatically by SDL_hid_enumerate() and
|
||||||
|
* any of the SDL_hid_open_*() functions if it is needed. This function should
|
||||||
|
* be called at the beginning of execution however, if there is a chance of
|
||||||
|
* HIDAPI handles being opened by different threads simultaneously.
|
||||||
|
*
|
||||||
|
* Each call to this function should have a matching call to SDL_hid_exit()
|
||||||
|
*
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*
|
||||||
|
* \sa SDL_hid_exit
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finalize the HIDAPI library.
|
||||||
|
*
|
||||||
|
* This function frees all of the static data associated with HIDAPI. It
|
||||||
|
* should be called at the end of execution to avoid memory leaks.
|
||||||
|
*
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*
|
||||||
|
* \sa SDL_hid_init
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_exit(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check to see if devices may have been added or removed.
|
||||||
|
*
|
||||||
|
* Enumerating the HID devices is an expensive operation, so you can call this
|
||||||
|
* to see if there have been any system device changes since the last call to
|
||||||
|
* this function. A change in the counter returned doesn't necessarily mean
|
||||||
|
* that anything has changed, but you can call SDL_hid_enumerate() to get an
|
||||||
|
* updated device list.
|
||||||
|
*
|
||||||
|
* Calling this function for the first time may cause a thread or other system
|
||||||
|
* resource to be allocated to track device change notifications.
|
||||||
|
*
|
||||||
|
* \returns a change counter that is incremented with each potential device
|
||||||
|
* change, or 0 if device change detection isn't available.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*
|
||||||
|
* \sa SDL_hid_enumerate
|
||||||
|
*/
|
||||||
|
extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enumerate the HID Devices.
|
||||||
|
*
|
||||||
|
* This function returns a linked list of all the HID devices attached to the
|
||||||
|
* system which match vendor_id and product_id. If `vendor_id` is set to 0
|
||||||
|
* then any vendor matches. If `product_id` is set to 0 then any product
|
||||||
|
* matches. If `vendor_id` and `product_id` are both set to 0, then all HID
|
||||||
|
* devices will be returned.
|
||||||
|
*
|
||||||
|
* \param vendor_id The Vendor ID (VID) of the types of device to open.
|
||||||
|
* \param product_id The Product ID (PID) of the types of device to open.
|
||||||
|
* \returns a pointer to a linked list of type SDL_hid_device_info, containing
|
||||||
|
* information about the HID devices attached to the system, or NULL
|
||||||
|
* in the case of failure. Free this linked list by calling
|
||||||
|
* SDL_hid_free_enumeration().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*
|
||||||
|
* \sa SDL_hid_device_change_count
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free an enumeration Linked List
|
||||||
|
*
|
||||||
|
* This function frees a linked list created by SDL_hid_enumerate().
|
||||||
|
*
|
||||||
|
* \param devs Pointer to a list of struct_device returned from
|
||||||
|
* SDL_hid_enumerate().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
|
||||||
|
* a serial number.
|
||||||
|
*
|
||||||
|
* If `serial_number` is NULL, the first device with the specified VID and PID
|
||||||
|
* is opened.
|
||||||
|
*
|
||||||
|
* \param vendor_id The Vendor ID (VID) of the device to open.
|
||||||
|
* \param product_id The Product ID (PID) of the device to open.
|
||||||
|
* \param serial_number The Serial Number of the device to open (Optionally
|
||||||
|
* NULL).
|
||||||
|
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||||
|
* failure.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a HID device by its path name.
|
||||||
|
*
|
||||||
|
* The path name be determined by calling SDL_hid_enumerate(), or a
|
||||||
|
* platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
|
||||||
|
*
|
||||||
|
* \param path The path name of the device to open
|
||||||
|
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||||
|
* failure.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path, int bExclusive /* = false */);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write an Output report to a HID device.
|
||||||
|
*
|
||||||
|
* The first byte of `data` must contain the Report ID. For devices which only
|
||||||
|
* support a single report, this must be set to 0x0. The remaining bytes
|
||||||
|
* contain the report data. Since the Report ID is mandatory, calls to
|
||||||
|
* SDL_hid_write() will always contain one more byte than the report contains.
|
||||||
|
* For example, if a hid report is 16 bytes long, 17 bytes must be passed to
|
||||||
|
* SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
|
||||||
|
* followed by the report data (16 bytes). In this example, the length passed
|
||||||
|
* in would be 17.
|
||||||
|
*
|
||||||
|
* SDL_hid_write() will send the data on the first OUT endpoint, if one
|
||||||
|
* exists. If it does not, it will send the data through the Control Endpoint
|
||||||
|
* (Endpoint 0).
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data The data to send, including the report number as the first
|
||||||
|
* byte.
|
||||||
|
* \param length The length in bytes of the data to send.
|
||||||
|
* \returns the actual number of bytes written and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read an Input report from a HID device with timeout.
|
||||||
|
*
|
||||||
|
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||||
|
* The first byte will contain the Report number if the device uses numbered
|
||||||
|
* reports.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data A buffer to put the read data into.
|
||||||
|
* \param length The number of bytes to read. For devices with multiple
|
||||||
|
* reports, make sure to read an extra byte for the report
|
||||||
|
* number.
|
||||||
|
* \param milliseconds timeout in milliseconds or -1 for blocking wait.
|
||||||
|
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||||
|
* available to be read within the timeout period, this function
|
||||||
|
* returns 0.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read an Input report from a HID device.
|
||||||
|
*
|
||||||
|
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||||
|
* The first byte will contain the Report number if the device uses numbered
|
||||||
|
* reports.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data A buffer to put the read data into.
|
||||||
|
* \param length The number of bytes to read. For devices with multiple
|
||||||
|
* reports, make sure to read an extra byte for the report
|
||||||
|
* number.
|
||||||
|
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||||
|
* available to be read and the handle is in non-blocking mode, this
|
||||||
|
* function returns 0.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the device handle to be non-blocking.
|
||||||
|
*
|
||||||
|
* In non-blocking mode calls to SDL_hid_read() will return immediately with a
|
||||||
|
* value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
|
||||||
|
* will wait (block) until there is data to read before returning.
|
||||||
|
*
|
||||||
|
* Nonblocking can be turned on and off at any time.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param nonblock enable or not the nonblocking reads - 1 to enable
|
||||||
|
* nonblocking - 0 to disable nonblocking.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a Feature report to the device.
|
||||||
|
*
|
||||||
|
* Feature reports are sent over the Control endpoint as a Set_Report
|
||||||
|
* transfer. The first byte of `data` must contain the Report ID. For devices
|
||||||
|
* which only support a single report, this must be set to 0x0. The remaining
|
||||||
|
* bytes contain the report data. Since the Report ID is mandatory, calls to
|
||||||
|
* SDL_hid_send_feature_report() will always contain one more byte than the
|
||||||
|
* report contains. For example, if a hid report is 16 bytes long, 17 bytes
|
||||||
|
* must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
|
||||||
|
* devices which do not use numbered reports), followed by the report data (16
|
||||||
|
* bytes). In this example, the length passed in would be 17.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data The data to send, including the report number as the first
|
||||||
|
* byte.
|
||||||
|
* \param length The length in bytes of the data to send, including the report
|
||||||
|
* number.
|
||||||
|
* \returns the actual number of bytes written and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a feature report from a HID device.
|
||||||
|
*
|
||||||
|
* Set the first byte of `data` to the Report ID of the report to be read.
|
||||||
|
* Make sure to allow space for this extra byte in `data`. Upon return, the
|
||||||
|
* first byte will still contain the Report ID, and the report data will start
|
||||||
|
* in data[1].
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param data A buffer to put the read data into, including the Report ID.
|
||||||
|
* Set the first byte of `data` to the Report ID of the report to
|
||||||
|
* be read, or set it to zero if your device does not use numbered
|
||||||
|
* reports.
|
||||||
|
* \param length The number of bytes to read, including an extra byte for the
|
||||||
|
* report ID. The buffer can be longer than the actual report.
|
||||||
|
* \returns the number of bytes read plus one for the report ID (which is
|
||||||
|
* still in the first byte), or -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close a HID device.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Manufacturer String from a HID device.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param string A wide string buffer to put the data into.
|
||||||
|
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Product String from a HID device.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param string A wide string buffer to put the data into.
|
||||||
|
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get The Serial Number String from a HID device.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param string A wide string buffer to put the data into.
|
||||||
|
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a string from a HID device, based on its string index.
|
||||||
|
*
|
||||||
|
* \param dev A device handle returned from SDL_hid_open().
|
||||||
|
* \param string_index The index of the string to get.
|
||||||
|
* \param string A wide string buffer to put the data into.
|
||||||
|
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||||
|
* \returns 0 on success and -1 on error.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
|
||||||
|
*
|
||||||
|
* \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 2.0.18.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
|
||||||
|
|
||||||
|
/* Ends C function definitions when using C++ */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#include <SDL2/close_code.h>
|
||||||
|
|
||||||
|
#endif /* SDL_hidapi_h_ */
|
||||||
|
|
||||||
|
/* vi: set sts=4 ts=4 sw=4 expandtab: */
|
||||||