diff --git a/.gitignore b/.gitignore
index 9b58ee2..ff2ac58 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,11 @@
-*.bin
-*.d
-*.o
-*.smdh
-*.elf
-*.cia
-*.3dsx
-*/build
-build/sprites.h
-*.map
-*.lst
+*.bin
+*.d
+*.o
+*.smdh
+*.elf
+*.cia
+*.3dsx
+*/build
+build/sprites.h
+*.map
+*.lst
diff --git a/.vscode/settings.json b/.vscode/settings.json
index dd8ee9f..6d33dc4 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,92 +1,92 @@
-{
- "files.associations": {
- "*.tcc": "cpp",
- "cctype": "cpp",
- "clocale": "cpp",
- "cmath": "cpp",
- "cstdarg": "cpp",
- "cstddef": "cpp",
- "cstdio": "cpp",
- "cstdlib": "cpp",
- "cstring": "cpp",
- "ctime": "cpp",
- "cwchar": "cpp",
- "cwctype": "cpp",
- "exception": "cpp",
- "fstream": "cpp",
- "iosfwd": "cpp",
- "iostream": "cpp",
- "istream": "cpp",
- "limits": "cpp",
- "memory": "cpp",
- "new": "cpp",
- "ostream": "cpp",
- "sstream": "cpp",
- "stdexcept": "cpp",
- "streambuf": "cpp",
- "typeinfo": "cpp",
- "valarray": "cpp",
- "array": "cpp",
- "atomic": "cpp",
- "bit": "cpp",
- "cstdint": "cpp",
- "deque": "cpp",
- "forward_list": "cpp",
- "map": "cpp",
- "unordered_map": "cpp",
- "vector": "cpp",
- "algorithm": "cpp",
- "functional": "cpp",
- "iterator": "cpp",
- "memory_resource": "cpp",
- "numeric": "cpp",
- "optional": "cpp",
- "random": "cpp",
- "string": "cpp",
- "string_view": "cpp",
- "system_error": "cpp",
- "tuple": "cpp",
- "type_traits": "cpp",
- "utility": "cpp",
- "initializer_list": "cpp",
- "bitset": "cpp",
- "chrono": "cpp",
- "condition_variable": "cpp",
- "ratio": "cpp",
- "regex": "cpp",
- "shared_mutex": "cpp"
- },
- "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
-"terminal.integrated.env.windows":
-{
- "MSYSTEM": "MINGW64",
- //"MSYS2_PATH_TYPE": "inherit",
- "MSVSCODE": "1"
-},
-
- "terminal.integrated.profiles.windows": {
-
- "PowerShell": {
- "source": "PowerShell",
- "icon": "terminal-powershell"
- },
- "Test": {
- "path": [
- "C:\\sys64\\sys2_shell.exe"
- ],
- "args": [],
- "icon": "terminal-cmd"
- },
- "Command Prompt": {
- "path": [
- "${env:windir}\\Sysnative\\cmd.exe",
- "${env:windir}\\System32\\cmd.exe"
- ],
- "args": [],
- "icon": "terminal-cmd"
- },
- "Git Bash": {
- "source": "Git Bash"
- }
- }
+{
+ "files.associations": {
+ "*.tcc": "cpp",
+ "cctype": "cpp",
+ "clocale": "cpp",
+ "cmath": "cpp",
+ "cstdarg": "cpp",
+ "cstddef": "cpp",
+ "cstdio": "cpp",
+ "cstdlib": "cpp",
+ "cstring": "cpp",
+ "ctime": "cpp",
+ "cwchar": "cpp",
+ "cwctype": "cpp",
+ "exception": "cpp",
+ "fstream": "cpp",
+ "iosfwd": "cpp",
+ "iostream": "cpp",
+ "istream": "cpp",
+ "limits": "cpp",
+ "memory": "cpp",
+ "new": "cpp",
+ "ostream": "cpp",
+ "sstream": "cpp",
+ "stdexcept": "cpp",
+ "streambuf": "cpp",
+ "typeinfo": "cpp",
+ "valarray": "cpp",
+ "array": "cpp",
+ "atomic": "cpp",
+ "bit": "cpp",
+ "cstdint": "cpp",
+ "deque": "cpp",
+ "forward_list": "cpp",
+ "map": "cpp",
+ "unordered_map": "cpp",
+ "vector": "cpp",
+ "algorithm": "cpp",
+ "functional": "cpp",
+ "iterator": "cpp",
+ "memory_resource": "cpp",
+ "numeric": "cpp",
+ "optional": "cpp",
+ "random": "cpp",
+ "string": "cpp",
+ "string_view": "cpp",
+ "system_error": "cpp",
+ "tuple": "cpp",
+ "type_traits": "cpp",
+ "utility": "cpp",
+ "initializer_list": "cpp",
+ "bitset": "cpp",
+ "chrono": "cpp",
+ "condition_variable": "cpp",
+ "ratio": "cpp",
+ "regex": "cpp",
+ "shared_mutex": "cpp"
+ },
+ "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
+"terminal.integrated.env.windows":
+{
+ "MSYSTEM": "MINGW64",
+ //"MSYS2_PATH_TYPE": "inherit",
+ "MSVSCODE": "1"
+},
+
+ "terminal.integrated.profiles.windows": {
+
+ "PowerShell": {
+ "source": "PowerShell",
+ "icon": "terminal-powershell"
+ },
+ "Test": {
+ "path": [
+ "C:\\sys64\\sys2_shell.exe"
+ ],
+ "args": [],
+ "icon": "terminal-cmd"
+ },
+ "Command Prompt": {
+ "path": [
+ "${env:windir}\\Sysnative\\cmd.exe",
+ "${env:windir}\\System32\\cmd.exe"
+ ],
+ "args": [],
+ "icon": "terminal-cmd"
+ },
+ "Git Bash": {
+ "source": "Git Bash"
+ }
+ }
}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index f8db599..e4da35e 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -1,19 +1,19 @@
-{
- // See https://go.microsoft.com/fwlink/?LinkId=733558
- // for the documentation about the tasks.json format
- "version": "2.0.0",
- "tasks": [
- {
- "label": "Make",
- "command": "make",
- "args": ["-s"],
- "group": {
- "kind": "build",
- "isDefault": true
- },
- "presentation": {
- "reveal": "silent"
- }
- }
- ]
+{
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
+ // for the documentation about the tasks.json format
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "Make",
+ "command": "make",
+ "args": ["-s"],
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "presentation": {
+ "reveal": "silent"
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index f288702..3877ae0 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,674 +1,674 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- 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.
-
-
- Copyright (C)
-
- 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 .
-
-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:
-
- Copyright (C)
- 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
-.
-
- 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
-.
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ 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.
+
+
+ Copyright (C)
+
+ 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 .
+
+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:
+
+ Copyright (C)
+ 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
+.
+
+ 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
+.
diff --git a/Makefile b/Makefile
index 511f6da..92b0365 100644
--- a/Makefile
+++ b/Makefile
@@ -1,316 +1,316 @@
-#---------------------------------------------------------------------------------
-.SUFFIXES:
-#---------------------------------------------------------------------------------
-
-ifeq ($(strip $(DEVKITARM)),)
-$(error "Veuillez régler DEVKITARM dans votre environnement. export DEVKITARM = devkitARM")
-endif
-
-TOPDIR ?= $(CURDIR)
-include $(DEVKITARM)/3ds_rules
-
-# ------------------------------------------------- --------------------------------
-# TARGET est le nom de la sortie
-# BUILD est le répertoire dans lequel les fichiers objets et les fichiers intermédiaires seront placés
-# SOURCES est une liste de répertoires contenant le code source
-# DATA est une liste de répertoires contenant des fichiers de données
-# INCLUDES est une liste de répertoires contenant des fichiers d'en-tête
-# GRAPHICS est une liste de répertoires contenant des fichiers graphiques
-# GFXBUILD est le répertoire dans lequel les fichiers graphiques convertis seront placés
-# S'il est défini sur $ (BUILD), il sera lié statiquement dans le fichier converti
-# fichiers comme s'il s'agissait de fichiers de données.
-#
-# NO_SMDH: s'il est défini sur quelque chose, aucun fichier SMDH n'est généré.
-# ROMFS est le répertoire qui contient le RomFS, relatif au Makefile (facultatif)
-# APP_TITLE est le nom de l'application stockée dans le fichier SMDH (facultatif)
-# APP_DESCRIPTION est la description de l'application stockée dans le fichier SMDH (facultatif)
-# APP_AUTHOR est l'auteur de l'application stockée dans le fichier SMDH (facultatif)
-# ICON est le nom de fichier de l'icône (.png), relatif au dossier du projet.
-# S'il n'est pas défini, il tente d'utiliser l'un des éléments suivants (dans cet ordre):
-# - .png
-# - icon.png
-# - /default_icon.png
-
-#---------------------------------------------------------------------------------
-# Outils externes
-#---------------------------------------------------------------------------------
-ifeq ($(OS),Windows_NT)
-MAKEROM ?= ../makerom.exe
-BANNERTOOL ?= ../bannertool.exe
-
-else
-MAKEROM ?= makerom
-BANNERTOOL ?= bannertool
-
-endif
-
-CURRENT_VERSION := $(shell git describe --abbrev=0 --tags)
-
-# Si sur un commit taggé, utilisez le tag au lieu du commit
-ifneq ($(shell echo $(shell git tag -l --points-at HEAD) | head -c 1),)
-GIT_VER := $(shell git tag -l --points-at HEAD)
-else
-GIT_VER := $(shell git describe --abbrev=0 --tags)-$(shell git rev-parse --short HEAD)
-endif
-
-#---------------------------------------------------------------------------------
-# Version number
-#---------------------------------------------------------------------------------
-ifneq ($(shell echo $(shell git describe --tags) | head -c 2 | tail -c 1),)
-VERSION_MAJOR := $(shell echo $(shell git describe --tags) | head -c 2 | tail -c 1)
-else
-VERSION_MAJOR := 0
-endif
-
-ifneq ($(shell echo $(shell git describe --tags) | head -c 4 | tail -c 1),)
-VERSION_MINOR := $(shell echo $(shell git describe --tags) | head -c 4 | tail -c 1)
-else
-VERSION_MINOR := 0
-endif
-
-ifneq ($(shell echo $(shell git describe --tags) | head -c 6 | tail -c 1),)
-VERSION_MICRO := $(shell echo $(shell git describe --tags) | head -c 6 | tail -c 1)
-else
-VERSION_MICRO := 0
-endif
-
-#---------------------------------------------------------------------------------
-TARGET := DarkStore
-BUILD := build
-UNIVCORE := Universal-Core
-SOURCES := $(UNIVCORE) source source/download source/gui source/lang source/menu source/overlays \
- source/qr source/screens source/store source/utils
-DATA := data
-INCLUDES := $(UNIVCORE) include include/download include/gui include/lang include/overlays include/qr include/screens \
- include/store include/utils
-GRAPHICS := assets/gfx
-ROMFS := romfs
-GFXBUILD := $(ROMFS)/gfx
-APP_AUTHOR := Dark98, Universal Team
-APP_DESCRIPTION := An Alternative eShop for Nintendo 3DS
-ICON := app/icon.png
-BNR_IMAGE := app/banner.png
-BNR_AUDIO := app/BannerAudio.wav
-RSF_FILE := app/build-cia.rsf
-
-#---------------------------------------------------------------------------------
-# options de génération de code
-#---------------------------------------------------------------------------------
-ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
-
-CFLAGS := -g -Wall -Wno-psabi -O2 -mword-relocations \
- -DV_STRING=\"$(GIT_VER)\" \
- -DC_V=\"$(CURRENT_VERSION)\" \
- -fomit-frame-pointer -ffunction-sections \
- $(ARCH)
-
-CFLAGS += $(INCLUDE) -DARM11 -D_3DS -D_GNU_SOURCE=1
-
-CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17
-
-ASFLAGS := -g $(ARCH)
-LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
-
-LIBS := -lcurl -lmbedtls -lmbedx509 -lmbedcrypto -larchive -lbz2 -llzma -lm -lz -lcitro2d -lcitro3d -lctru -lstdc++
-
-#---------------------------------------------------------------------------------
-# liste de répertoires contenant des bibliothèques, ce doit être le niveau supérieur contenant
-# include et lib
-#---------------------------------------------------------------------------------
-LIBDIRS := $(PORTLIBS) $(CTRULIB)
-
-
-#---------------------------------------------------------------------------------
-# pas vraiment besoin de modifier quoi que ce soit au-delà de ce point, sauf si vous devez ajouter des
-# règles pour différentes extensions de fichiers
-#---------------------------------------------------------------------------------
-ifneq ($(BUILD),$(notdir $(CURDIR)))
-#---------------------------------------------------------------------------------
-
-export OUTPUT := $(CURDIR)/$(TARGET)
-export TOPDIR := $(CURDIR)
-
-export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
- $(foreach dir,$(GRAPHICS),$(CURDIR)/$(dir)) \
- $(foreach dir,$(DATA),$(CURDIR)/$(dir))
-
-export DEPSDIR := $(CURDIR)/$(BUILD)
-
-CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
-CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
-SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
-PICAFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.v.pica)))
-SHLISTFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.shlist)))
-GFXFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.t3s)))
-BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
-
-#---------------------------------------------------------------------------------
-# utiliser CXX pour lier des projets C ++, CC pour le C standard
-#---------------------------------------------------------------------------------
-ifeq ($(strip $(CPPFILES)),)
-#---------------------------------------------------------------------------------
- export LD := $(CC)
-#---------------------------------------------------------------------------------
-else
-#---------------------------------------------------------------------------------
- export LD := $(CXX)
-#---------------------------------------------------------------------------------
-endif
-#---------------------------------------------------------------------------------
-
-#---------------------------------------------------------------------------------
-ifeq ($(GFXBUILD),$(BUILD))
-#---------------------------------------------------------------------------------
-export T3XFILES := $(GFXFILES:.t3s=.t3x)
-#---------------------------------------------------------------------------------
-else
-#---------------------------------------------------------------------------------
-export ROMFS_T3XFILES := $(patsubst %.t3s, $(GFXBUILD)/%.t3x, $(GFXFILES))
-export T3XHFILES := $(patsubst %.t3s, $(BUILD)/%.h, $(GFXFILES))
-#---------------------------------------------------------------------------------
-endif
-#---------------------------------------------------------------------------------
-
-export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
-
-export OFILES_BIN := $(addsuffix .o,$(BINFILES)) \
- $(PICAFILES:.v.pica=.shbin.o) $(SHLISTFILES:.shlist=.shbin.o)
-
-export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
-
-export HFILES := $(PICAFILES:.v.pica=_shbin.h) $(SHLISTFILES:.shlist=_shbin.h) \
- $(addsuffix .h,$(subst .,_,$(BINFILES)))
-
-export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
- $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
- -I$(CURDIR)/$(BUILD)
-
-export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
-
-export _3DSXDEPS := $(if $(NO_SMDH),,$(OUTPUT).smdh)
-
-ifeq ($(strip $(ICON)),)
- icons := $(wildcard *.png)
- ifneq (,$(findstring $(TARGET).png,$(icons)))
- export APP_ICON := $(TOPDIR)/$(TARGET).png
- else
- ifneq (,$(findstring icon.png,$(icons)))
- export APP_ICON := $(TOPDIR)/icon.png
- endif
- endif
-else
- export APP_ICON := $(TOPDIR)/$(ICON)
-endif
-
-ifeq ($(strip $(NO_SMDH)),)
- export _3DSXFLAGS += --smdh=$(CURDIR)/$(TARGET).smdh
-endif
-
-ifneq ($(ROMFS),)
- export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS)
-endif
-
-.PHONY: all clean
-
-#---------------------------------------------------------------------------------
-all: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(T3XHFILES)
- @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
-
-#------------------------------------------------------------------------------
-clean:
- @echo clean ...
- @rm -fr DarkStore.elf
- @rm -fr DarkStore.cia
- @rm -fr DarkStore.3dsx
- @rm -fr DarkStore.smdh
- @rm -fr $(OUTDIR)
- @rm -fr $(BUILD)
-
-#---------------------------------------------------------------------------------
-cia: $(BUILD)
- @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile cia
-
-#---------------------------------------------------------------------------------
-3dsx: $(BUILD)
- @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile 3dsx
-
-#---------------------------------------------------------------------------------
-$(GFXBUILD)/%.t3x $(BUILD)/%.h : %.t3s
-#---------------------------------------------------------------------------------
- @echo $(notdir $<)
- $(DEVKITPRO)/tools/bin/tex3ds -i $< -H $(BUILD)/$*.h -d $(DEPSDIR)/$*.d -o $(GFXBUILD)/$*.t3x
-
-#---------------------------------------------------------------------------------
-$(BUILD):
- @[ -d $@ ] || mkdir -p $@
-
-#---------------------------------------------------------------------------------
-else
-
-#---------------------------------------------------------------------------------
-# cibles principales
-#---------------------------------------------------------------------------------
-all: $(OUTPUT).cia $(OUTPUT).elf $(OUTPUT).3dsx
-
-$(OUTPUT).elf : $(OFILES)
-
-$(OUTPUT).cia : $(OUTPUT).elf $(OUTPUT).smdh
- $(BANNERTOOL) makebanner -i "../app/banner.png" -a "../app/BannerAudio.wav" -o "../app/banner.bin"
-
- $(BANNERTOOL) makesmdh -i "../app/icon.png" -s "$(TARGET)" -l "$(APP_DESCRIPTION)" -p "$(APP_AUTHOR)" -o "../app/icon.bin" \
- --flags visible,ratingrequired,recordusage --cero 153 --esrb 153 --usk 153 --pegigen 153 --pegiptr 153 --pegibbfc 153 --cob 153 --grb 153 --cgsrr 153
-
- $(MAKEROM) -f cia -target t -exefslogo -o "../$(TARGET).cia" -elf "../$(TARGET).elf" -rsf "../app/build-cia.rsf" -banner "../app/banner.bin" -icon "../app/icon.bin" -logo "../app/logo.bcma.lz" -DAPP_ROMFS="$(TOPDIR)/$(ROMFS)" -major $(VERSION_MAJOR) -minor $(VERSION_MINOR) -DAPP_VERSION_MAJOR="$(VERSION_MAJOR)"
-#---------------------------------------------------------------------------------
-# vous avez besoin d'une règle comme celle-ci pour chaque extension que vous utilisez comme données binaires
-#---------------------------------------------------------------------------------
-%.bin.o %_bin.h : %.bin
-#---------------------------------------------------------------------------------
- @echo $(notdir $<)
- @$(bin2o)
-
-#---------------------------------------------------------------------------------
-.PRECIOUS : %.t3x
-#---------------------------------------------------------------------------------
-%.t3x.o %_t3x.h : %.t3x
-#---------------------------------------------------------------------------------
- @echo $(notdir $<)
- @$(bin2o)
-
-#---------------------------------------------------------------------------------
-# règles d'assemblage de shaders GPU
-#---------------------------------------------------------------------------------
-define shader-as
- $(eval CURBIN := $*.shbin)
- $(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
- echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
- echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
- echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
- echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
- picasso -o $(CURBIN) $1
- bin2s $(CURBIN) | $(AS) -o $*.shbin.o
-endef
-
-%.shbin.o %_shbin.h : %.v.pica %.g.pica
- @echo $(notdir $^)
- @$(call shader-as,$^)
-
-%.shbin.o %_shbin.h : %.v.pica
- @echo $(notdir $<)
- @$(call shader-as,$<)
-
-%.shbin.o %_shbin.h : %.shlist
- @echo $(notdir $<)
- @$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
-
-#---------------------------------------------------------------------------------
-%.t3x %.h : %.t3s
-#---------------------------------------------------------------------------------
- @echo $(notdir $<)
- @tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
-
--include $(DEPSDIR)/*.d
-
-#---------------------------------------------------------------------------------------
-endif
-#---------------------------------------------------------------------------------------
+#---------------------------------------------------------------------------------
+.SUFFIXES:
+#---------------------------------------------------------------------------------
+
+ifeq ($(strip $(DEVKITARM)),)
+$(error "Veuillez régler DEVKITARM dans votre environnement. export DEVKITARM = devkitARM")
+endif
+
+TOPDIR ?= $(CURDIR)
+include $(DEVKITARM)/3ds_rules
+
+# ------------------------------------------------- --------------------------------
+# TARGET est le nom de la sortie
+# BUILD est le répertoire dans lequel les fichiers objets et les fichiers intermédiaires seront placés
+# SOURCES est une liste de répertoires contenant le code source
+# DATA est une liste de répertoires contenant des fichiers de données
+# INCLUDES est une liste de répertoires contenant des fichiers d'en-tête
+# GRAPHICS est une liste de répertoires contenant des fichiers graphiques
+# GFXBUILD est le répertoire dans lequel les fichiers graphiques convertis seront placés
+# S'il est défini sur $ (BUILD), il sera lié statiquement dans le fichier converti
+# fichiers comme s'il s'agissait de fichiers de données.
+#
+# NO_SMDH: s'il est défini sur quelque chose, aucun fichier SMDH n'est généré.
+# ROMFS est le répertoire qui contient le RomFS, relatif au Makefile (facultatif)
+# APP_TITLE est le nom de l'application stockée dans le fichier SMDH (facultatif)
+# APP_DESCRIPTION est la description de l'application stockée dans le fichier SMDH (facultatif)
+# APP_AUTHOR est l'auteur de l'application stockée dans le fichier SMDH (facultatif)
+# ICON est le nom de fichier de l'icône (.png), relatif au dossier du projet.
+# S'il n'est pas défini, il tente d'utiliser l'un des éléments suivants (dans cet ordre):
+# - .png
+# - icon.png
+# - /default_icon.png
+
+#---------------------------------------------------------------------------------
+# Outils externes
+#---------------------------------------------------------------------------------
+ifeq ($(OS),Windows_NT)
+MAKEROM ?= ../makerom.exe
+BANNERTOOL ?= ../bannertool.exe
+
+else
+MAKEROM ?= makerom
+BANNERTOOL ?= bannertool
+
+endif
+
+CURRENT_VERSION := $(shell git describe --abbrev=0 --tags)
+
+# Si sur un commit taggé, utilisez le tag au lieu du commit
+ifneq ($(shell echo $(shell git tag -l --points-at HEAD) | head -c 1),)
+GIT_VER := $(shell git tag -l --points-at HEAD)
+else
+GIT_VER := $(shell git describe --abbrev=0 --tags)-$(shell git rev-parse --short HEAD)
+endif
+
+#---------------------------------------------------------------------------------
+# Version number
+#---------------------------------------------------------------------------------
+ifneq ($(shell echo $(shell git describe --tags) | head -c 2 | tail -c 1),)
+VERSION_MAJOR := $(shell echo $(shell git describe --tags) | head -c 2 | tail -c 1)
+else
+VERSION_MAJOR := 0
+endif
+
+ifneq ($(shell echo $(shell git describe --tags) | head -c 4 | tail -c 1),)
+VERSION_MINOR := $(shell echo $(shell git describe --tags) | head -c 4 | tail -c 1)
+else
+VERSION_MINOR := 0
+endif
+
+ifneq ($(shell echo $(shell git describe --tags) | head -c 6 | tail -c 1),)
+VERSION_MICRO := $(shell echo $(shell git describe --tags) | head -c 6 | tail -c 1)
+else
+VERSION_MICRO := 0
+endif
+
+#---------------------------------------------------------------------------------
+TARGET := DarkStore
+BUILD := build
+UNIVCORE := Universal-Core
+SOURCES := $(UNIVCORE) source source/download source/gui source/lang source/menu source/overlays \
+ source/qr source/screens source/store source/utils
+DATA := data
+INCLUDES := $(UNIVCORE) include include/download include/gui include/lang include/overlays include/qr include/screens \
+ include/store include/utils
+GRAPHICS := assets/gfx
+ROMFS := romfs
+GFXBUILD := $(ROMFS)/gfx
+APP_AUTHOR := Dark98, Universal Team
+APP_DESCRIPTION := An Alternative eShop for Nintendo 3DS
+ICON := app/icon.png
+BNR_IMAGE := app/banner.png
+BNR_AUDIO := app/BannerAudio.wav
+RSF_FILE := app/build-cia.rsf
+
+#---------------------------------------------------------------------------------
+# options de génération de code
+#---------------------------------------------------------------------------------
+ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
+
+CFLAGS := -g -Wall -Wno-psabi -O2 -mword-relocations \
+ -DV_STRING=\"$(GIT_VER)\" \
+ -DC_V=\"$(CURRENT_VERSION)\" \
+ -fomit-frame-pointer -ffunction-sections \
+ $(ARCH)
+
+CFLAGS += $(INCLUDE) -DARM11 -D_3DS -D_GNU_SOURCE=1
+
+CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17
+
+ASFLAGS := -g $(ARCH)
+LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
+
+LIBS := -lcurl -lmbedtls -lmbedx509 -lmbedcrypto -larchive -lbz2 -llzma -lm -lz -lcitro2d -lcitro3d -lctru -lstdc++
+
+#---------------------------------------------------------------------------------
+# liste de répertoires contenant des bibliothèques, ce doit être le niveau supérieur contenant
+# include et lib
+#---------------------------------------------------------------------------------
+LIBDIRS := $(PORTLIBS) $(CTRULIB)
+
+
+#---------------------------------------------------------------------------------
+# pas vraiment besoin de modifier quoi que ce soit au-delà de ce point, sauf si vous devez ajouter des
+# règles pour différentes extensions de fichiers
+#---------------------------------------------------------------------------------
+ifneq ($(BUILD),$(notdir $(CURDIR)))
+#---------------------------------------------------------------------------------
+
+export OUTPUT := $(CURDIR)/$(TARGET)
+export TOPDIR := $(CURDIR)
+
+export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
+ $(foreach dir,$(GRAPHICS),$(CURDIR)/$(dir)) \
+ $(foreach dir,$(DATA),$(CURDIR)/$(dir))
+
+export DEPSDIR := $(CURDIR)/$(BUILD)
+
+CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
+CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
+SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
+PICAFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.v.pica)))
+SHLISTFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.shlist)))
+GFXFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.t3s)))
+BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
+
+#---------------------------------------------------------------------------------
+# utiliser CXX pour lier des projets C ++, CC pour le C standard
+#---------------------------------------------------------------------------------
+ifeq ($(strip $(CPPFILES)),)
+#---------------------------------------------------------------------------------
+ export LD := $(CC)
+#---------------------------------------------------------------------------------
+else
+#---------------------------------------------------------------------------------
+ export LD := $(CXX)
+#---------------------------------------------------------------------------------
+endif
+#---------------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------------
+ifeq ($(GFXBUILD),$(BUILD))
+#---------------------------------------------------------------------------------
+export T3XFILES := $(GFXFILES:.t3s=.t3x)
+#---------------------------------------------------------------------------------
+else
+#---------------------------------------------------------------------------------
+export ROMFS_T3XFILES := $(patsubst %.t3s, $(GFXBUILD)/%.t3x, $(GFXFILES))
+export T3XHFILES := $(patsubst %.t3s, $(BUILD)/%.h, $(GFXFILES))
+#---------------------------------------------------------------------------------
+endif
+#---------------------------------------------------------------------------------
+
+export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
+
+export OFILES_BIN := $(addsuffix .o,$(BINFILES)) \
+ $(PICAFILES:.v.pica=.shbin.o) $(SHLISTFILES:.shlist=.shbin.o)
+
+export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
+
+export HFILES := $(PICAFILES:.v.pica=_shbin.h) $(SHLISTFILES:.shlist=_shbin.h) \
+ $(addsuffix .h,$(subst .,_,$(BINFILES)))
+
+export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
+ $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
+ -I$(CURDIR)/$(BUILD)
+
+export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
+
+export _3DSXDEPS := $(if $(NO_SMDH),,$(OUTPUT).smdh)
+
+ifeq ($(strip $(ICON)),)
+ icons := $(wildcard *.png)
+ ifneq (,$(findstring $(TARGET).png,$(icons)))
+ export APP_ICON := $(TOPDIR)/$(TARGET).png
+ else
+ ifneq (,$(findstring icon.png,$(icons)))
+ export APP_ICON := $(TOPDIR)/icon.png
+ endif
+ endif
+else
+ export APP_ICON := $(TOPDIR)/$(ICON)
+endif
+
+ifeq ($(strip $(NO_SMDH)),)
+ export _3DSXFLAGS += --smdh=$(CURDIR)/$(TARGET).smdh
+endif
+
+ifneq ($(ROMFS),)
+ export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS)
+endif
+
+.PHONY: all clean
+
+#---------------------------------------------------------------------------------
+all: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(T3XHFILES)
+ @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
+
+#------------------------------------------------------------------------------
+clean:
+ @echo clean ...
+ @rm -fr DarkStore.elf
+ @rm -fr DarkStore.cia
+ @rm -fr DarkStore.3dsx
+ @rm -fr DarkStore.smdh
+ @rm -fr $(OUTDIR)
+ @rm -fr $(BUILD)
+
+#---------------------------------------------------------------------------------
+cia: $(BUILD)
+ @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile cia
+
+#---------------------------------------------------------------------------------
+3dsx: $(BUILD)
+ @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile 3dsx
+
+#---------------------------------------------------------------------------------
+$(GFXBUILD)/%.t3x $(BUILD)/%.h : %.t3s
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ $(DEVKITPRO)/tools/bin/tex3ds -i $< -H $(BUILD)/$*.h -d $(DEPSDIR)/$*.d -o $(GFXBUILD)/$*.t3x
+
+#---------------------------------------------------------------------------------
+$(BUILD):
+ @[ -d $@ ] || mkdir -p $@
+
+#---------------------------------------------------------------------------------
+else
+
+#---------------------------------------------------------------------------------
+# cibles principales
+#---------------------------------------------------------------------------------
+all: $(OUTPUT).cia $(OUTPUT).elf $(OUTPUT).3dsx
+
+$(OUTPUT).elf : $(OFILES)
+
+$(OUTPUT).cia : $(OUTPUT).elf $(OUTPUT).smdh
+ $(BANNERTOOL) makebanner -i "../app/banner.png" -a "../app/BannerAudio.wav" -o "../app/banner.bin"
+
+ $(BANNERTOOL) makesmdh -i "../app/icon.png" -s "$(TARGET)" -l "$(APP_DESCRIPTION)" -p "$(APP_AUTHOR)" -o "../app/icon.bin" \
+ --flags visible,ratingrequired,recordusage --cero 153 --esrb 153 --usk 153 --pegigen 153 --pegiptr 153 --pegibbfc 153 --cob 153 --grb 153 --cgsrr 153
+
+ $(MAKEROM) -f cia -target t -exefslogo -o "../$(TARGET).cia" -elf "../$(TARGET).elf" -rsf "../app/build-cia.rsf" -banner "../app/banner.bin" -icon "../app/icon.bin" -logo "../app/logo.bcma.lz" -DAPP_ROMFS="$(TOPDIR)/$(ROMFS)" -major $(VERSION_MAJOR) -minor $(VERSION_MINOR) -DAPP_VERSION_MAJOR="$(VERSION_MAJOR)"
+#---------------------------------------------------------------------------------
+# vous avez besoin d'une règle comme celle-ci pour chaque extension que vous utilisez comme données binaires
+#---------------------------------------------------------------------------------
+%.bin.o %_bin.h : %.bin
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ @$(bin2o)
+
+#---------------------------------------------------------------------------------
+.PRECIOUS : %.t3x
+#---------------------------------------------------------------------------------
+%.t3x.o %_t3x.h : %.t3x
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ @$(bin2o)
+
+#---------------------------------------------------------------------------------
+# règles d'assemblage de shaders GPU
+#---------------------------------------------------------------------------------
+define shader-as
+ $(eval CURBIN := $*.shbin)
+ $(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
+ echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
+ echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
+ echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
+ echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
+ picasso -o $(CURBIN) $1
+ bin2s $(CURBIN) | $(AS) -o $*.shbin.o
+endef
+
+%.shbin.o %_shbin.h : %.v.pica %.g.pica
+ @echo $(notdir $^)
+ @$(call shader-as,$^)
+
+%.shbin.o %_shbin.h : %.v.pica
+ @echo $(notdir $<)
+ @$(call shader-as,$<)
+
+%.shbin.o %_shbin.h : %.shlist
+ @echo $(notdir $<)
+ @$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
+
+#---------------------------------------------------------------------------------
+%.t3x %.h : %.t3s
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ @tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
+
+-include $(DEPSDIR)/*.d
+
+#---------------------------------------------------------------------------------------
+endif
+#---------------------------------------------------------------------------------------
diff --git a/Universal-Core/.vscode/settings.json b/Universal-Core/.vscode/settings.json
index a7bd7a0..d27cd26 100644
--- a/Universal-Core/.vscode/settings.json
+++ b/Universal-Core/.vscode/settings.json
@@ -1,5 +1,5 @@
-{
- "files.associations": {
- "string": "cpp"
- }
+{
+ "files.associations": {
+ "string": "cpp"
+ }
}
\ No newline at end of file
diff --git a/Universal-Core/LICENSE b/Universal-Core/LICENSE
index f288702..3877ae0 100644
--- a/Universal-Core/LICENSE
+++ b/Universal-Core/LICENSE
@@ -1,674 +1,674 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- 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.
-
-
- Copyright (C)
-
- 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 .
-
-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:
-
- Copyright (C)
- 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
-.
-
- 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
-.
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ 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.
+
+
+ Copyright (C)
+
+ 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 .
+
+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:
+
+ Copyright (C)
+ 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
+.
+
+ 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
+.
diff --git a/Universal-Core/README.md b/Universal-Core/README.md
index 049f604..df391cc 100644
--- a/Universal-Core/README.md
+++ b/Universal-Core/README.md
@@ -1,9 +1,9 @@
-# Universal-Core by Universal-Team
-This contains the GUI & Core part for our 3DS Applications.
-
-Logo created by: [TotallyNotGuy](https://github.com/TotallyNotGuy).
-
-
-
-Licensing:
+# Universal-Core by Universal-Team
+This contains the GUI & Core part for our 3DS Applications.
+
+Logo created by: [TotallyNotGuy](https://github.com/TotallyNotGuy).
+
+
+
+Licensing:
This software is licensed under the terms of the GPLv3. You can find a copy of the license in the LICENSE file.
\ No newline at end of file
diff --git a/Universal-Core/gui.cpp b/Universal-Core/gui.cpp
index 32e71ae..01678d8 100644
--- a/Universal-Core/gui.cpp
+++ b/Universal-Core/gui.cpp
@@ -1,501 +1,501 @@
-/*
-* This file is part of Universal-Core
-* Copyright (C) 2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#include "gui.hpp"
-#include "screenCommon.hpp"
-
-#include <3ds.h>
-#include
-#include
-#include
-
-C3D_RenderTarget *Top, *TopRight, *Bottom;
-
-C2D_TextBuf TextBuf;
-C2D_Font Font;
-std::unique_ptr usedScreen, tempScreen; // tempScreen used for "fade" effects.
-std::stack> screens;
-bool currentScreen = false;
-bool fadeout = false, fadein = false, fadeout2 = false, fadein2 = false;
-int fadealpha = 0;
-int fadecolor = 0;
-
-/*
- Clear the Text Buffer.
-*/
-void Gui::clearTextBufs(void) { C2D_TextBufClear(TextBuf); };
-
-/*
- Draw a sprite from the sheet.
-
- C2D_SpriteSheet sheet: The SpriteSheet.
- size_t imgindex: The image index.
- int x: The X-Position where to draw the sprite.
- int y: The Y-Position where to draw the sprite.
- float ScaleX: The X-Scale of the sprite.
- float ScaleY: The Y-Scale of the sprite.
-
- If the spritesheet is nullptr or image index goes out of scope, this doesn't do anything.
-*/
-void Gui::DrawSprite(C2D_SpriteSheet sheet, size_t imgindex, int x, int y, float ScaleX, float ScaleY) {
- if (sheet) {
- if (C2D_SpriteSheetCount(sheet) >= imgindex) {
- C2D_DrawImageAt(C2D_SpriteSheetGetImage(sheet, imgindex), x, y, 0.5f, nullptr, ScaleX, ScaleY);
- }
- }
-}
-
-/*
- Initialize the GUI.
-
- Contains initializing Citro2D, Citro3D and the screen targets.
- Call this when initing the app.
-*/
-Result Gui::init(void) {
- C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);
- C2D_Init(C2D_DEFAULT_MAX_OBJECTS);
- C2D_Prepare();
-
- /* Create Screen Targets. */
- Top = C2D_CreateScreenTarget(GFX_TOP, GFX_LEFT);
- TopRight = C2D_CreateScreenTarget(GFX_TOP, GFX_RIGHT);
- Bottom = C2D_CreateScreenTarget(GFX_BOTTOM, GFX_LEFT);
-
- /* Load Textbuffer. */
- TextBuf = C2D_TextBufNew(4096);
- Font = C2D_FontLoadSystem(CFG_REGION_USA); // Load System font.
- return 0;
-}
-
-/*
- Load a bcfnt font.
-
- C2D_Font &fnt: The reference to the C2D_Font variable.
- const char *Path: The path to the file.
-*/
-Result Gui::loadFont(C2D_Font &fnt, const char *Path) {
- if (access(Path, F_OK) == 0) fnt = C2D_FontLoad(Path); // Only load if found.
-
- return 0;
-}
-
-/*
- Unload a Font.
-
- C2D_Font &fnt: The reference to the C2D_Font variable.
-*/
-Result Gui::unloadFont(C2D_Font &fnt) {
- if (fnt) C2D_FontFree(fnt); // Make sure to only unload if not nullptr.
-
- return 0;
-}
-
-/*
- Load a t3x SpriteSheet.
-
- const char *Path: The path to the file.
- C2D_SpriteSheet &sheet: The reference to the C2D_SpriteSheet variable.
-*/
-Result Gui::loadSheet(const char *Path, C2D_SpriteSheet &sheet) {
- if (access(Path, F_OK) == 0) sheet = C2D_SpriteSheetLoad(Path); // Only load if found.
-
- return 0;
-}
-
-/*
- Unload a SpriteSheet.
-
- C2D_SpriteSheet &sheet: The reference to the C2D_SpriteSheet variable.
-*/
-Result Gui::unloadSheet(C2D_SpriteSheet &sheet) {
- if (sheet) C2D_SpriteSheetFree(sheet); // Make sure to only unload if not nullptr.
-
- return 0;
-}
-
-/*
- Exit the GUI.
-
- Contains deinitializing Citro2D, Citro3D and clearing the textbuffer.
- Call this when exiting the app.
-*/
-void Gui::exit(void) {
- C2D_TextBufDelete(TextBuf);
- C2D_Fini();
- C3D_Fini();
- if (usedScreen) usedScreen = nullptr;
-}
-
-/*
- Reinitialize the GUI.
-*/
-Result Gui::reinit(void) {
- C2D_TextBufDelete(TextBuf);
- C2D_Fini();
- C3D_Fini();
-
- return Gui::init();
-}
-
-/*
- Draw a Centered String.
-
- float x: The X-Addition offset for the position from 200 (top) or 160 (bottom).
- float y: The Y-Position where to draw.
- float size: The size for the Font.
- u32 color: The Text Color.
- std::string Text: The Text which should be drawn.
- int maxWidth: (Optional) The max width of the Text.
- int maxHeight: (Optional) The max height of the Text.
- C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
- int flags: (Optional) C2D text flags to use.
-*/
-void Gui::DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth, int maxHeight, C2D_Font fnt, int flags) {
- Gui::DrawString(x +(currentScreen ? 200 : 160), y, size, color, Text, maxWidth, maxHeight, fnt, flags | C2D_AlignCenter);
-}
-
-/*
- Draw a String.
-
- float x: The X-Position where to draw.
- float y: The Y-Position where to draw.
- float size: The size for the Font.
- u32 color: The Text Color.
- std::string Text: The Text which should be drawn.
- int maxWidth: (Optional) The max width of the Text.
- int maxHeight: (Optional) The max height of the Text.
- C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
- int flags: (Optional) C2D text flags to use.
-*/
-void Gui::DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth, int maxHeight, C2D_Font fnt, int flags) {
- C2D_Text c2d_text;
-
- if (fnt) C2D_TextFontParse(&c2d_text, fnt, TextBuf, Text.c_str());
- else C2D_TextFontParse(&c2d_text, Font, TextBuf, Text.c_str());
-
- C2D_TextOptimize(&c2d_text);
-
- float heightScale;
-
- if (maxHeight == 0) {
- heightScale = size;
-
- } else {
- if (fnt) heightScale = std::min(size, size*(maxHeight/Gui::GetStringHeight(size, Text, fnt)));
- else heightScale = std::min(size, size*(maxHeight/Gui::GetStringHeight(size, Text)));
- }
-
- if (maxWidth == 0) {
- C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, size, heightScale, color);
- } else if (flags & C2D_WordWrap) {
- C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, size, heightScale, color, (float)maxWidth);
- } else {
- if (fnt) C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, std::min(size, size*(maxWidth/Gui::GetStringWidth(size, Text, fnt))), heightScale, color);
- else C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, std::min(size, size*(maxWidth/Gui::GetStringWidth(size, Text))), heightScale, color);
- }
-}
-
-/*
- Get String or Text Width.
-
- float size: The Textsize.
- std::string Text: The Text.
- C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
-*/
-float Gui::GetStringWidth(float size, std::string Text, C2D_Font fnt) {
- float width = 0;
-
- if (fnt) GetStringSize(size, &width, NULL, Text, fnt);
- else GetStringSize(size, &width, NULL, Text);
-
- return width;
-}
-
-/*
- Get String or Text Size.
-
- float size: The Textsize.
- float *width: Pointer where to store the width.
- float *height: Pointer where to store the height.
- std::string Text: The Text.
- C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
-*/
-void Gui::GetStringSize(float size, float *width, float *height, std::string Text, C2D_Font fnt) {
- C2D_Text c2d_text;
-
- if (fnt) C2D_TextFontParse(&c2d_text, fnt, TextBuf, Text.c_str());
- else C2D_TextFontParse(&c2d_text, Font, TextBuf, Text.c_str());
-
- C2D_TextGetDimensions(&c2d_text, size, size, width, height);
-}
-
-
-/*
- Get String or Text Height.
-
- float size: The Textsize.
- std::string Text: The Text.
- C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
-*/
-float Gui::GetStringHeight(float size, std::string Text, C2D_Font fnt) {
- float height = 0;
-
- if (fnt) GetStringSize(size, NULL, &height, Text.c_str(), fnt);
- else GetStringSize(size, NULL, &height, Text.c_str());
-
- return height;
-}
-
-/*
- Draw a Rectangle.
-
- float x: The X-Position where to draw.
- float y: The Y-Position where to draw.
- float w: The width of the rectangle.
- float h: The height of the rectangle.
- u32 color: The color.
-*/
-bool Gui::Draw_Rect(float x, float y, float w, float h, u32 color) {
- return C2D_DrawRectSolid(x, y, 0.5f, w, h, color);
-}
-
-/*
- Draw's the current screen's draw.
-
- bool stack: If using the stack-screens or not.
-*/
-void Gui::DrawScreen(bool stack) {
- if (!stack) {
- if (usedScreen) usedScreen->Draw();
-
- } else {
- if (!screens.empty()) screens.top()->Draw();
- }
-}
-
-/*
- Do the current screen's logic.
-
- u32 hDown: The hidKeysDown() variable.
- u32 hHeld: The hidKeysHeld() variable.
- touchPosition touch: The touchPosition variable.
- bool waitFade: If waiting for the fade until control of the screen or not.
- bool stack: If using the stack-screens.
-*/
-void Gui::ScreenLogic(u32 hDown, u32 hHeld, touchPosition touch, bool waitFade, bool stack) {
- if (waitFade) {
- if (!fadein && !fadeout && !fadein2 && !fadeout2) {
- if (!stack) if (usedScreen) usedScreen->Logic(hDown, hHeld, touch);
-
- } else {
- if (!screens.empty()) screens.top()->Logic(hDown, hHeld, touch);
- }
-
- } else {
- if (!stack) {
- if (usedScreen) usedScreen->Logic(hDown, hHeld, touch);
-
- } else {
- if (!screens.empty()) screens.top()->Logic(hDown, hHeld, touch);
- }
- }
-}
-
-/*
- Move's the tempScreen to the used one.
-
- bool stack: If using the stack-screens or not.
-*/
-void Gui::transferScreen(bool stack) {
- if (!stack) {
- if (tempScreen) usedScreen = std::move(tempScreen);
-
- } else {
- if (tempScreen) screens.push(std::move(tempScreen));
- }
-}
-
-/*
- Set the current Screen.
-
- std::unique_ptr screen: The screen class.
- bool fade: If doing a fade effect or not.
- bool stack: If using the stack-screens or not.
-*/
-void Gui::setScreen(std::unique_ptr screen, bool fade, bool stack) {
- tempScreen = std::move(screen);
-
- /* Switch screen without fade. */
- if (!fade) {
- Gui::transferScreen(stack);
-
- } else {
- /* Fade, then switch. */
- fadeout = true;
- }
-}
-
-/*
- Fade's the screen in and out and transfer the screen.
- Credits goes to RocketRobz & SavvyManager.
-
- int fadeoutFrames: The fadeout frames.
- int fadeinFrames: The fadein frames.
- bool stack: If using the stack-screens or not. (Used to properly transfer screens).
-*/
-void Gui::fadeEffects(int fadeoutFrames, int fadeinFrames, bool stack) {
- if (fadein) {
- fadealpha -= fadeinFrames;
-
- if (fadealpha < 0) {
- fadealpha = 0;
- fadecolor = 255;
- fadein = false;
- }
- }
-
- if (stack) {
- if (fadein2) {
- fadealpha -= fadeinFrames;
-
- if (fadealpha < 0) {
- fadealpha = 0;
- fadecolor = 255;
- fadein2 = false;
- }
- }
- }
-
- if (fadeout) {
- fadealpha += fadeoutFrames;
-
- if (fadealpha > 255) {
- fadealpha = 255;
- Gui::transferScreen(stack); // Transfer Temp screen to the stack / used one.
- fadein = true;
- fadeout = false;
- }
- }
-
- if (stack) {
- if (fadeout2) {
- fadealpha += fadeoutFrames;
-
- if (fadealpha > 255) {
- fadealpha = 255;
- Gui::screenBack2(); // Go screen back.
- fadein2 = true;
- fadeout2 = false;
- }
- }
- }
-}
-
-/*
- Go a screen back. (Stack only!)
-
- bool fade: If doing a fade or not.
-*/
-void Gui::screenBack(bool fade) {
- if (!fade) {
- if (screens.size() > 0) screens.pop();
-
- } else {
- if (screens.size() > 0) fadeout2 = true;
- }
-}
-void Gui::screenBack2() { if (screens.size() > 0) screens.pop(); };
-
-/*
- Select, on which Screen should be drawn.
-
- C3D_RenderTarget *screen: The render target.
-*/
-void Gui::ScreenDraw(C3D_RenderTarget *screen) {
- C2D_SceneBegin(screen);
- currentScreen = (screen == Top || screen == TopRight) ? 1 : 0;
-}
-
-/*
- Draw a grid.
-
- float xPos: The X-Position of the grid.
- float yPos: The Y-Position of the grid.
- float Width: The width of the grid.
- float Height: The height of the grid.
- u32 color: The color of the grid.
- u32 bgColor: The BG Color of the grid.
-*/
-void Gui::drawGrid(float xPos, float yPos, float Width, float Height, u32 color, u32 bgColor) {
- static constexpr int w = 1;
-
- /* BG Color for the Grid. (Transparent by default.) */
- Gui::Draw_Rect(xPos, yPos, Width, Height, bgColor);
-
- /* Grid part, Top. */
- Gui::Draw_Rect(xPos, yPos, Width, w, color);
- /* Left. */
- Gui::Draw_Rect(xPos, yPos + w, w, Height - 2 * w, color);
- /* Right. */
- Gui::Draw_Rect(xPos + Width - w, yPos + w, w, Height - 2 * w, color);
- /* Bottom. */
- Gui::Draw_Rect(xPos, yPos + Height - w, Width, w, color);
-}
-
-/*
- Draw an animated selector.
-
- float xPos: The X-Position of the selector.
- float yPos: The Y-Position of the selector.
- float Width: The width of the selector.
- float Height: The height of the selector.
- float speed: The selector animation speed. Use .030f or so.
- u32 SelectorColor: The selector fade color.
- u32 bgColor: The selector BG color.
-*/
-void Gui::drawAnimatedSelector(float xPos, float yPos, float Width, float Height, float speed, u32 SelectorColor, u32 bgColor) {
- static constexpr int w = 2;
- static float timer = 0.0f;
- float highlight_multiplier = fmax(0.0, fabs(fmod(timer, 1.0) - 0.5) / 0.5);
- u8 r = SelectorColor & 0xFF;
- u8 g = (SelectorColor >> 8) & 0xFF;
- u8 b = (SelectorColor >> 16) & 0xFF;
- u32 color = C2D_Color32(r + (255 - r) * highlight_multiplier, g + (255 - g) * highlight_multiplier, b + (255 - b) * highlight_multiplier, 255);
-
- /* BG Color for the Selector. */
- Gui::Draw_Rect(xPos, yPos, Width, Height, bgColor);
-
- /* Selector part, Top. */
- Gui::Draw_Rect(xPos, yPos, Width, w, color);
- /* Left. */
- Gui::Draw_Rect(xPos, yPos + w, w, Height - 2 * w, color);
- /* Right. */
- Gui::Draw_Rect(xPos + Width - w, yPos + w, w, Height - 2 * w, color);
- /* Bottom. */
- Gui::Draw_Rect(xPos, yPos + Height - w, Width, w, color);
-
- timer += speed;
+/*
+* This file is part of Universal-Core
+* Copyright (C) 2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#include "gui.hpp"
+#include "screenCommon.hpp"
+
+#include <3ds.h>
+#include
+#include
+#include
+
+C3D_RenderTarget *Top, *TopRight, *Bottom;
+
+C2D_TextBuf TextBuf;
+C2D_Font Font;
+std::unique_ptr usedScreen, tempScreen; // tempScreen used for "fade" effects.
+std::stack> screens;
+bool currentScreen = false;
+bool fadeout = false, fadein = false, fadeout2 = false, fadein2 = false;
+int fadealpha = 0;
+int fadecolor = 0;
+
+/*
+ Clear the Text Buffer.
+*/
+void Gui::clearTextBufs(void) { C2D_TextBufClear(TextBuf); };
+
+/*
+ Draw a sprite from the sheet.
+
+ C2D_SpriteSheet sheet: The SpriteSheet.
+ size_t imgindex: The image index.
+ int x: The X-Position where to draw the sprite.
+ int y: The Y-Position where to draw the sprite.
+ float ScaleX: The X-Scale of the sprite.
+ float ScaleY: The Y-Scale of the sprite.
+
+ If the spritesheet is nullptr or image index goes out of scope, this doesn't do anything.
+*/
+void Gui::DrawSprite(C2D_SpriteSheet sheet, size_t imgindex, int x, int y, float ScaleX, float ScaleY) {
+ if (sheet) {
+ if (C2D_SpriteSheetCount(sheet) >= imgindex) {
+ C2D_DrawImageAt(C2D_SpriteSheetGetImage(sheet, imgindex), x, y, 0.5f, nullptr, ScaleX, ScaleY);
+ }
+ }
+}
+
+/*
+ Initialize the GUI.
+
+ Contains initializing Citro2D, Citro3D and the screen targets.
+ Call this when initing the app.
+*/
+Result Gui::init(void) {
+ C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);
+ C2D_Init(C2D_DEFAULT_MAX_OBJECTS);
+ C2D_Prepare();
+
+ /* Create Screen Targets. */
+ Top = C2D_CreateScreenTarget(GFX_TOP, GFX_LEFT);
+ TopRight = C2D_CreateScreenTarget(GFX_TOP, GFX_RIGHT);
+ Bottom = C2D_CreateScreenTarget(GFX_BOTTOM, GFX_LEFT);
+
+ /* Load Textbuffer. */
+ TextBuf = C2D_TextBufNew(4096);
+ Font = C2D_FontLoadSystem(CFG_REGION_USA); // Load System font.
+ return 0;
+}
+
+/*
+ Load a bcfnt font.
+
+ C2D_Font &fnt: The reference to the C2D_Font variable.
+ const char *Path: The path to the file.
+*/
+Result Gui::loadFont(C2D_Font &fnt, const char *Path) {
+ if (access(Path, F_OK) == 0) fnt = C2D_FontLoad(Path); // Only load if found.
+
+ return 0;
+}
+
+/*
+ Unload a Font.
+
+ C2D_Font &fnt: The reference to the C2D_Font variable.
+*/
+Result Gui::unloadFont(C2D_Font &fnt) {
+ if (fnt) C2D_FontFree(fnt); // Make sure to only unload if not nullptr.
+
+ return 0;
+}
+
+/*
+ Load a t3x SpriteSheet.
+
+ const char *Path: The path to the file.
+ C2D_SpriteSheet &sheet: The reference to the C2D_SpriteSheet variable.
+*/
+Result Gui::loadSheet(const char *Path, C2D_SpriteSheet &sheet) {
+ if (access(Path, F_OK) == 0) sheet = C2D_SpriteSheetLoad(Path); // Only load if found.
+
+ return 0;
+}
+
+/*
+ Unload a SpriteSheet.
+
+ C2D_SpriteSheet &sheet: The reference to the C2D_SpriteSheet variable.
+*/
+Result Gui::unloadSheet(C2D_SpriteSheet &sheet) {
+ if (sheet) C2D_SpriteSheetFree(sheet); // Make sure to only unload if not nullptr.
+
+ return 0;
+}
+
+/*
+ Exit the GUI.
+
+ Contains deinitializing Citro2D, Citro3D and clearing the textbuffer.
+ Call this when exiting the app.
+*/
+void Gui::exit(void) {
+ C2D_TextBufDelete(TextBuf);
+ C2D_Fini();
+ C3D_Fini();
+ if (usedScreen) usedScreen = nullptr;
+}
+
+/*
+ Reinitialize the GUI.
+*/
+Result Gui::reinit(void) {
+ C2D_TextBufDelete(TextBuf);
+ C2D_Fini();
+ C3D_Fini();
+
+ return Gui::init();
+}
+
+/*
+ Draw a Centered String.
+
+ float x: The X-Addition offset for the position from 200 (top) or 160 (bottom).
+ float y: The Y-Position where to draw.
+ float size: The size for the Font.
+ u32 color: The Text Color.
+ std::string Text: The Text which should be drawn.
+ int maxWidth: (Optional) The max width of the Text.
+ int maxHeight: (Optional) The max height of the Text.
+ C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
+ int flags: (Optional) C2D text flags to use.
+*/
+void Gui::DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth, int maxHeight, C2D_Font fnt, int flags) {
+ Gui::DrawString(x +(currentScreen ? 200 : 160), y, size, color, Text, maxWidth, maxHeight, fnt, flags | C2D_AlignCenter);
+}
+
+/*
+ Draw a String.
+
+ float x: The X-Position where to draw.
+ float y: The Y-Position where to draw.
+ float size: The size for the Font.
+ u32 color: The Text Color.
+ std::string Text: The Text which should be drawn.
+ int maxWidth: (Optional) The max width of the Text.
+ int maxHeight: (Optional) The max height of the Text.
+ C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
+ int flags: (Optional) C2D text flags to use.
+*/
+void Gui::DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth, int maxHeight, C2D_Font fnt, int flags) {
+ C2D_Text c2d_text;
+
+ if (fnt) C2D_TextFontParse(&c2d_text, fnt, TextBuf, Text.c_str());
+ else C2D_TextFontParse(&c2d_text, Font, TextBuf, Text.c_str());
+
+ C2D_TextOptimize(&c2d_text);
+
+ float heightScale;
+
+ if (maxHeight == 0) {
+ heightScale = size;
+
+ } else {
+ if (fnt) heightScale = std::min(size, size*(maxHeight/Gui::GetStringHeight(size, Text, fnt)));
+ else heightScale = std::min(size, size*(maxHeight/Gui::GetStringHeight(size, Text)));
+ }
+
+ if (maxWidth == 0) {
+ C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, size, heightScale, color);
+ } else if (flags & C2D_WordWrap) {
+ C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, size, heightScale, color, (float)maxWidth);
+ } else {
+ if (fnt) C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, std::min(size, size*(maxWidth/Gui::GetStringWidth(size, Text, fnt))), heightScale, color);
+ else C2D_DrawText(&c2d_text, C2D_WithColor | flags, x, y, 0.5f, std::min(size, size*(maxWidth/Gui::GetStringWidth(size, Text))), heightScale, color);
+ }
+}
+
+/*
+ Get String or Text Width.
+
+ float size: The Textsize.
+ std::string Text: The Text.
+ C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
+*/
+float Gui::GetStringWidth(float size, std::string Text, C2D_Font fnt) {
+ float width = 0;
+
+ if (fnt) GetStringSize(size, &width, NULL, Text, fnt);
+ else GetStringSize(size, &width, NULL, Text);
+
+ return width;
+}
+
+/*
+ Get String or Text Size.
+
+ float size: The Textsize.
+ float *width: Pointer where to store the width.
+ float *height: Pointer where to store the height.
+ std::string Text: The Text.
+ C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
+*/
+void Gui::GetStringSize(float size, float *width, float *height, std::string Text, C2D_Font fnt) {
+ C2D_Text c2d_text;
+
+ if (fnt) C2D_TextFontParse(&c2d_text, fnt, TextBuf, Text.c_str());
+ else C2D_TextFontParse(&c2d_text, Font, TextBuf, Text.c_str());
+
+ C2D_TextGetDimensions(&c2d_text, size, size, width, height);
+}
+
+
+/*
+ Get String or Text Height.
+
+ float size: The Textsize.
+ std::string Text: The Text.
+ C2D_Font fnt: (Optional) The wanted C2D_Font. Is nullptr by default.
+*/
+float Gui::GetStringHeight(float size, std::string Text, C2D_Font fnt) {
+ float height = 0;
+
+ if (fnt) GetStringSize(size, NULL, &height, Text.c_str(), fnt);
+ else GetStringSize(size, NULL, &height, Text.c_str());
+
+ return height;
+}
+
+/*
+ Draw a Rectangle.
+
+ float x: The X-Position where to draw.
+ float y: The Y-Position where to draw.
+ float w: The width of the rectangle.
+ float h: The height of the rectangle.
+ u32 color: The color.
+*/
+bool Gui::Draw_Rect(float x, float y, float w, float h, u32 color) {
+ return C2D_DrawRectSolid(x, y, 0.5f, w, h, color);
+}
+
+/*
+ Draw's the current screen's draw.
+
+ bool stack: If using the stack-screens or not.
+*/
+void Gui::DrawScreen(bool stack) {
+ if (!stack) {
+ if (usedScreen) usedScreen->Draw();
+
+ } else {
+ if (!screens.empty()) screens.top()->Draw();
+ }
+}
+
+/*
+ Do the current screen's logic.
+
+ u32 hDown: The hidKeysDown() variable.
+ u32 hHeld: The hidKeysHeld() variable.
+ touchPosition touch: The touchPosition variable.
+ bool waitFade: If waiting for the fade until control of the screen or not.
+ bool stack: If using the stack-screens.
+*/
+void Gui::ScreenLogic(u32 hDown, u32 hHeld, touchPosition touch, bool waitFade, bool stack) {
+ if (waitFade) {
+ if (!fadein && !fadeout && !fadein2 && !fadeout2) {
+ if (!stack) if (usedScreen) usedScreen->Logic(hDown, hHeld, touch);
+
+ } else {
+ if (!screens.empty()) screens.top()->Logic(hDown, hHeld, touch);
+ }
+
+ } else {
+ if (!stack) {
+ if (usedScreen) usedScreen->Logic(hDown, hHeld, touch);
+
+ } else {
+ if (!screens.empty()) screens.top()->Logic(hDown, hHeld, touch);
+ }
+ }
+}
+
+/*
+ Move's the tempScreen to the used one.
+
+ bool stack: If using the stack-screens or not.
+*/
+void Gui::transferScreen(bool stack) {
+ if (!stack) {
+ if (tempScreen) usedScreen = std::move(tempScreen);
+
+ } else {
+ if (tempScreen) screens.push(std::move(tempScreen));
+ }
+}
+
+/*
+ Set the current Screen.
+
+ std::unique_ptr screen: The screen class.
+ bool fade: If doing a fade effect or not.
+ bool stack: If using the stack-screens or not.
+*/
+void Gui::setScreen(std::unique_ptr screen, bool fade, bool stack) {
+ tempScreen = std::move(screen);
+
+ /* Switch screen without fade. */
+ if (!fade) {
+ Gui::transferScreen(stack);
+
+ } else {
+ /* Fade, then switch. */
+ fadeout = true;
+ }
+}
+
+/*
+ Fade's the screen in and out and transfer the screen.
+ Credits goes to RocketRobz & SavvyManager.
+
+ int fadeoutFrames: The fadeout frames.
+ int fadeinFrames: The fadein frames.
+ bool stack: If using the stack-screens or not. (Used to properly transfer screens).
+*/
+void Gui::fadeEffects(int fadeoutFrames, int fadeinFrames, bool stack) {
+ if (fadein) {
+ fadealpha -= fadeinFrames;
+
+ if (fadealpha < 0) {
+ fadealpha = 0;
+ fadecolor = 255;
+ fadein = false;
+ }
+ }
+
+ if (stack) {
+ if (fadein2) {
+ fadealpha -= fadeinFrames;
+
+ if (fadealpha < 0) {
+ fadealpha = 0;
+ fadecolor = 255;
+ fadein2 = false;
+ }
+ }
+ }
+
+ if (fadeout) {
+ fadealpha += fadeoutFrames;
+
+ if (fadealpha > 255) {
+ fadealpha = 255;
+ Gui::transferScreen(stack); // Transfer Temp screen to the stack / used one.
+ fadein = true;
+ fadeout = false;
+ }
+ }
+
+ if (stack) {
+ if (fadeout2) {
+ fadealpha += fadeoutFrames;
+
+ if (fadealpha > 255) {
+ fadealpha = 255;
+ Gui::screenBack2(); // Go screen back.
+ fadein2 = true;
+ fadeout2 = false;
+ }
+ }
+ }
+}
+
+/*
+ Go a screen back. (Stack only!)
+
+ bool fade: If doing a fade or not.
+*/
+void Gui::screenBack(bool fade) {
+ if (!fade) {
+ if (screens.size() > 0) screens.pop();
+
+ } else {
+ if (screens.size() > 0) fadeout2 = true;
+ }
+}
+void Gui::screenBack2() { if (screens.size() > 0) screens.pop(); };
+
+/*
+ Select, on which Screen should be drawn.
+
+ C3D_RenderTarget *screen: The render target.
+*/
+void Gui::ScreenDraw(C3D_RenderTarget *screen) {
+ C2D_SceneBegin(screen);
+ currentScreen = (screen == Top || screen == TopRight) ? 1 : 0;
+}
+
+/*
+ Draw a grid.
+
+ float xPos: The X-Position of the grid.
+ float yPos: The Y-Position of the grid.
+ float Width: The width of the grid.
+ float Height: The height of the grid.
+ u32 color: The color of the grid.
+ u32 bgColor: The BG Color of the grid.
+*/
+void Gui::drawGrid(float xPos, float yPos, float Width, float Height, u32 color, u32 bgColor) {
+ static constexpr int w = 1;
+
+ /* BG Color for the Grid. (Transparent by default.) */
+ Gui::Draw_Rect(xPos, yPos, Width, Height, bgColor);
+
+ /* Grid part, Top. */
+ Gui::Draw_Rect(xPos, yPos, Width, w, color);
+ /* Left. */
+ Gui::Draw_Rect(xPos, yPos + w, w, Height - 2 * w, color);
+ /* Right. */
+ Gui::Draw_Rect(xPos + Width - w, yPos + w, w, Height - 2 * w, color);
+ /* Bottom. */
+ Gui::Draw_Rect(xPos, yPos + Height - w, Width, w, color);
+}
+
+/*
+ Draw an animated selector.
+
+ float xPos: The X-Position of the selector.
+ float yPos: The Y-Position of the selector.
+ float Width: The width of the selector.
+ float Height: The height of the selector.
+ float speed: The selector animation speed. Use .030f or so.
+ u32 SelectorColor: The selector fade color.
+ u32 bgColor: The selector BG color.
+*/
+void Gui::drawAnimatedSelector(float xPos, float yPos, float Width, float Height, float speed, u32 SelectorColor, u32 bgColor) {
+ static constexpr int w = 2;
+ static float timer = 0.0f;
+ float highlight_multiplier = fmax(0.0, fabs(fmod(timer, 1.0) - 0.5) / 0.5);
+ u8 r = SelectorColor & 0xFF;
+ u8 g = (SelectorColor >> 8) & 0xFF;
+ u8 b = (SelectorColor >> 16) & 0xFF;
+ u32 color = C2D_Color32(r + (255 - r) * highlight_multiplier, g + (255 - g) * highlight_multiplier, b + (255 - b) * highlight_multiplier, 255);
+
+ /* BG Color for the Selector. */
+ Gui::Draw_Rect(xPos, yPos, Width, Height, bgColor);
+
+ /* Selector part, Top. */
+ Gui::Draw_Rect(xPos, yPos, Width, w, color);
+ /* Left. */
+ Gui::Draw_Rect(xPos, yPos + w, w, Height - 2 * w, color);
+ /* Right. */
+ Gui::Draw_Rect(xPos + Width - w, yPos + w, w, Height - 2 * w, color);
+ /* Bottom. */
+ Gui::Draw_Rect(xPos, yPos + Height - w, Width, w, color);
+
+ timer += speed;
}
\ No newline at end of file
diff --git a/Universal-Core/gui.hpp b/Universal-Core/gui.hpp
index bb639de..58987c0 100644
--- a/Universal-Core/gui.hpp
+++ b/Universal-Core/gui.hpp
@@ -1,246 +1,246 @@
-/*
-* This file is part of Universal-Core
-* Copyright (C) 2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _UNIVERSAL_CORE_GUI_HPP
-#define _UNIVERSAL_CORE_GUI_HPP
-
-#include "screen.hpp"
-
-#include <3ds.h>
-#include
-#include
-
-namespace Gui {
- /*
- Clear the Text Buffer.
- */
- void clearTextBufs(void);
-
- /*
- Draw a sprite from a SpriteSheet.
- sheet: The SpriteSheet which should be used.
- imgIndex: The index of the sprite from the sheet which should be drawn.
- x: The X Position where the sprite should be drawn.
- y: The Y Position where the sprite should be drawn.
- ScaleX: The X-Scale for the sprite. (Optional!)
- ScaleY: The Y-Scale for the sprite. (Optional!)
- */
- void DrawSprite(C2D_SpriteSheet sheet, size_t imgindex, int x, int y, float ScaleX = 1, float ScaleY = 1);
-
- /*
- Initialize the GUI with Citro2D & Citro3D and initialize the Textbuffer.
- call this when initializing.
- */
- Result init(void);
-
- /*
- Load a Font. (BCFNT)
-
- fnt: The C2D_Font variable which should be initialized.
- Path: Path to the BCFNT file.
- if you're unsure, just call 'Gui::init();' and it will load the system font.
- */
- Result loadFont(C2D_Font &fnt, const char *Path = "");
-
- /*
- Unload a Font. (BCFNT)
-
- fnt: The C2D_Font variable which should be unloaded.
- */
- Result unloadFont(C2D_Font &fnt);
-
- /*
- Load a spritesheet.
-
- Path: Path to the SpriteSheet file. (T3X)
- sheet: Reference to the C2D_SpriteSheet declaration.
- */
- Result loadSheet(const char *Path, C2D_SpriteSheet &sheet);
-
- /*
- Unload a spritesheet.
-
- sheet: Reference to the C2D_SpriteSheet which should be free'd.
- */
- Result unloadSheet(C2D_SpriteSheet &sheet);
-
- /*
- Exit the GUI.
- Call this at exit.
- */
- void exit(void);
-
- /*
- Reinit the GUI.
- */
- Result reinit(void);
-
- /*
- Draws a centered String.
- x: The X Offset from center. (Center: 200 px on top, 160 px on Bottom.)
- y: The Y Position of the Text.
- size: The size of the Text.
- color: The Color of the Text.
- Text: The Text which should be displayed.
- maxWidth: The maxWidth for the Text. (Optional!)
- maxHeight: The maxHeight of the Text. (Optional!)
- fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
- int flags: C2D text flags to use. (Optional!)
- */
- void DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth = 0, int maxHeight = 0, C2D_Font fnt = nullptr, int flags = 0);
-
- /*
- Draws a String.
-
- x: The X Position where the Text should be drawn.
- y: The Y Position where the Text should be drawn.
- size: The size of the Text.
- color: The Color of the Text.
- Text: The Text which should be displayed.
- maxWidth: The maxWidth for the Text. (Optional!)
- maxHeight: The maxHeight of the Text. (Optional!)
- fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
- flags: C2D text flags to use.
- */
- void DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth = 0, int maxHeight = 0, C2D_Font fnt = nullptr, int flags = 0);
-
- /*
- Get the width of a String.
-
- size: The size of the Text.
- Text: The Text where the width should be getted from.
- fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
- */
- float GetStringWidth(float size, std::string Text, C2D_Font fnt = nullptr);
-
- /*
- Get the size of a String.
-
- size: The size of the Text.
- width: The width of the Text.
- height: The height of the Text.
- Text: The Text where the size should be getted from.
- fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
- */
- void GetStringSize(float size, float *width, float *height, std::string Text, C2D_Font fnt = nullptr);
-
- /*
- Get the height of a String.
-
- size: The size of the Text.
- Text: The Text where the height should be getted from.
- fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
- */
- float GetStringHeight(float size, std::string Text, C2D_Font fnt = nullptr);
-
- /*
- Draw a Rectangle.
-
- x: X Position of the Rectangle.
- y: Y Position of the Rectangle.
- w: The width of the rectangle.
- h: The height of the rectangle.
- color: The color of the rectangle.
- */
- bool Draw_Rect(float x, float y, float w, float h, u32 color);
-
- /*
- Used for the current Screen's Draw. (Optional!)
- stack: Is it the stack variant?
- */
- void DrawScreen(bool stack = false);
-
- /*
- Used for the current Screen's Logic. (Optional!)
-
- hDown: the hidKeysDown() variable.
- hHeld: the HidKeysHeld() variable.
- touch: The TouchPosition variable.
- waitFade: Wheter to wait until the fade ends.
- stack: Is it the stack variant?
- */
- void ScreenLogic(u32 hDown, u32 hHeld, touchPosition touch, bool waitFade = true, bool stack = false);
-
- /*
- Transfer the Temp Screen to the used one. (Optional!)
-
- stack: Is it the stack variant?
- It will check, if the tempScreen variable is not nullptr, so don't worry.
- */
- void transferScreen(bool stack = false);
-
- /*
- Set a specific Screen with switch function. (Optional!)
-
- screen: unique_ptr of the screen. (Optional by using the screen class.)
- screenSwitch: Wheter to switch to the current screen.
- stack: Is it the stack variant?
- */
- void setScreen(std::unique_ptr screen, bool fade = false, bool stack = false);
-
- /*
- Fades into screens and calls the constructor after it. (Optional!)
- fadeoutFrames: Amount of frames for fadeout.
- fadeinFrames: Amount of frames for fadein.
- stack: Is it the stack variant?
- */
- void fadeEffects(int fadeoutFrames = 6, int fadeinFrames = 6, bool stack = false);
-
- void screenBack(bool fade = false); // Goes a screen back. (Set!) (Stack only!)
- void screenBack2(); // Goes a screen back.(Action!) (Stack only!)
-
- /*
- Set on which screen to draw.
-
- screen: The render target. (Targets are inside the screenCommon.hpp file.)
- */
- void ScreenDraw(C3D_RenderTarget * screen);
-
- /*
- Draws a grid.
- xPos: X Position of the grid.
- yPos: Y Position of the grid.
- Width: Width of the grid.
- Height: Height of the grid.
- color: Color of the grid.
- bgColor: The BG Color from the grid. (Optional! It's transparent by default.)
- */
- void drawGrid(float xPos, float yPos, float Width, float Height, u32 color, u32 bgColor = C2D_Color32(0, 0, 0, 0));
-
- /*
- Draws an animated selector.
- xPos: X Position of the selector.
- yPos: Y Position of the Selector.
- Width: Width of the Selector.
- Height: Height of the Selector.
- speed: The speed of the animation. (Use .030f or something by default.)
- SelectorColor: The Color of the Selector outline.
- bgColor: The BG Color from the selector. (Optional! It's transparent by default.)
- */
- void drawAnimatedSelector(float xPos, float yPos, float Width, float Height, float speed, u32 SelectorColor, u32 bgColor = C2D_Color32(0, 0, 0, 0));
-};
-
+/*
+* This file is part of Universal-Core
+* Copyright (C) 2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _UNIVERSAL_CORE_GUI_HPP
+#define _UNIVERSAL_CORE_GUI_HPP
+
+#include "screen.hpp"
+
+#include <3ds.h>
+#include
+#include
+
+namespace Gui {
+ /*
+ Clear the Text Buffer.
+ */
+ void clearTextBufs(void);
+
+ /*
+ Draw a sprite from a SpriteSheet.
+ sheet: The SpriteSheet which should be used.
+ imgIndex: The index of the sprite from the sheet which should be drawn.
+ x: The X Position where the sprite should be drawn.
+ y: The Y Position where the sprite should be drawn.
+ ScaleX: The X-Scale for the sprite. (Optional!)
+ ScaleY: The Y-Scale for the sprite. (Optional!)
+ */
+ void DrawSprite(C2D_SpriteSheet sheet, size_t imgindex, int x, int y, float ScaleX = 1, float ScaleY = 1);
+
+ /*
+ Initialize the GUI with Citro2D & Citro3D and initialize the Textbuffer.
+ call this when initializing.
+ */
+ Result init(void);
+
+ /*
+ Load a Font. (BCFNT)
+
+ fnt: The C2D_Font variable which should be initialized.
+ Path: Path to the BCFNT file.
+ if you're unsure, just call 'Gui::init();' and it will load the system font.
+ */
+ Result loadFont(C2D_Font &fnt, const char *Path = "");
+
+ /*
+ Unload a Font. (BCFNT)
+
+ fnt: The C2D_Font variable which should be unloaded.
+ */
+ Result unloadFont(C2D_Font &fnt);
+
+ /*
+ Load a spritesheet.
+
+ Path: Path to the SpriteSheet file. (T3X)
+ sheet: Reference to the C2D_SpriteSheet declaration.
+ */
+ Result loadSheet(const char *Path, C2D_SpriteSheet &sheet);
+
+ /*
+ Unload a spritesheet.
+
+ sheet: Reference to the C2D_SpriteSheet which should be free'd.
+ */
+ Result unloadSheet(C2D_SpriteSheet &sheet);
+
+ /*
+ Exit the GUI.
+ Call this at exit.
+ */
+ void exit(void);
+
+ /*
+ Reinit the GUI.
+ */
+ Result reinit(void);
+
+ /*
+ Draws a centered String.
+ x: The X Offset from center. (Center: 200 px on top, 160 px on Bottom.)
+ y: The Y Position of the Text.
+ size: The size of the Text.
+ color: The Color of the Text.
+ Text: The Text which should be displayed.
+ maxWidth: The maxWidth for the Text. (Optional!)
+ maxHeight: The maxHeight of the Text. (Optional!)
+ fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
+ int flags: C2D text flags to use. (Optional!)
+ */
+ void DrawStringCentered(float x, float y, float size, u32 color, std::string Text, int maxWidth = 0, int maxHeight = 0, C2D_Font fnt = nullptr, int flags = 0);
+
+ /*
+ Draws a String.
+
+ x: The X Position where the Text should be drawn.
+ y: The Y Position where the Text should be drawn.
+ size: The size of the Text.
+ color: The Color of the Text.
+ Text: The Text which should be displayed.
+ maxWidth: The maxWidth for the Text. (Optional!)
+ maxHeight: The maxHeight of the Text. (Optional!)
+ fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
+ flags: C2D text flags to use.
+ */
+ void DrawString(float x, float y, float size, u32 color, std::string Text, int maxWidth = 0, int maxHeight = 0, C2D_Font fnt = nullptr, int flags = 0);
+
+ /*
+ Get the width of a String.
+
+ size: The size of the Text.
+ Text: The Text where the width should be getted from.
+ fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
+ */
+ float GetStringWidth(float size, std::string Text, C2D_Font fnt = nullptr);
+
+ /*
+ Get the size of a String.
+
+ size: The size of the Text.
+ width: The width of the Text.
+ height: The height of the Text.
+ Text: The Text where the size should be getted from.
+ fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
+ */
+ void GetStringSize(float size, float *width, float *height, std::string Text, C2D_Font fnt = nullptr);
+
+ /*
+ Get the height of a String.
+
+ size: The size of the Text.
+ Text: The Text where the height should be getted from.
+ fnt: The Font which should be used. Uses SystemFont by default. (Optional!)
+ */
+ float GetStringHeight(float size, std::string Text, C2D_Font fnt = nullptr);
+
+ /*
+ Draw a Rectangle.
+
+ x: X Position of the Rectangle.
+ y: Y Position of the Rectangle.
+ w: The width of the rectangle.
+ h: The height of the rectangle.
+ color: The color of the rectangle.
+ */
+ bool Draw_Rect(float x, float y, float w, float h, u32 color);
+
+ /*
+ Used for the current Screen's Draw. (Optional!)
+ stack: Is it the stack variant?
+ */
+ void DrawScreen(bool stack = false);
+
+ /*
+ Used for the current Screen's Logic. (Optional!)
+
+ hDown: the hidKeysDown() variable.
+ hHeld: the HidKeysHeld() variable.
+ touch: The TouchPosition variable.
+ waitFade: Wheter to wait until the fade ends.
+ stack: Is it the stack variant?
+ */
+ void ScreenLogic(u32 hDown, u32 hHeld, touchPosition touch, bool waitFade = true, bool stack = false);
+
+ /*
+ Transfer the Temp Screen to the used one. (Optional!)
+
+ stack: Is it the stack variant?
+ It will check, if the tempScreen variable is not nullptr, so don't worry.
+ */
+ void transferScreen(bool stack = false);
+
+ /*
+ Set a specific Screen with switch function. (Optional!)
+
+ screen: unique_ptr of the screen. (Optional by using the screen class.)
+ screenSwitch: Wheter to switch to the current screen.
+ stack: Is it the stack variant?
+ */
+ void setScreen(std::unique_ptr screen, bool fade = false, bool stack = false);
+
+ /*
+ Fades into screens and calls the constructor after it. (Optional!)
+ fadeoutFrames: Amount of frames for fadeout.
+ fadeinFrames: Amount of frames for fadein.
+ stack: Is it the stack variant?
+ */
+ void fadeEffects(int fadeoutFrames = 6, int fadeinFrames = 6, bool stack = false);
+
+ void screenBack(bool fade = false); // Goes a screen back. (Set!) (Stack only!)
+ void screenBack2(); // Goes a screen back.(Action!) (Stack only!)
+
+ /*
+ Set on which screen to draw.
+
+ screen: The render target. (Targets are inside the screenCommon.hpp file.)
+ */
+ void ScreenDraw(C3D_RenderTarget * screen);
+
+ /*
+ Draws a grid.
+ xPos: X Position of the grid.
+ yPos: Y Position of the grid.
+ Width: Width of the grid.
+ Height: Height of the grid.
+ color: Color of the grid.
+ bgColor: The BG Color from the grid. (Optional! It's transparent by default.)
+ */
+ void drawGrid(float xPos, float yPos, float Width, float Height, u32 color, u32 bgColor = C2D_Color32(0, 0, 0, 0));
+
+ /*
+ Draws an animated selector.
+ xPos: X Position of the selector.
+ yPos: Y Position of the Selector.
+ Width: Width of the Selector.
+ Height: Height of the Selector.
+ speed: The speed of the animation. (Use .030f or something by default.)
+ SelectorColor: The Color of the Selector outline.
+ bgColor: The BG Color from the selector. (Optional! It's transparent by default.)
+ */
+ void drawAnimatedSelector(float xPos, float yPos, float Width, float Height, float speed, u32 SelectorColor, u32 bgColor = C2D_Color32(0, 0, 0, 0));
+};
+
#endif
\ No newline at end of file
diff --git a/Universal-Core/screen.hpp b/Universal-Core/screen.hpp
index bbb3480..d44ee2c 100644
--- a/Universal-Core/screen.hpp
+++ b/Universal-Core/screen.hpp
@@ -1,40 +1,40 @@
-/*
-* This file is part of Universal-Core
-* Copyright (C) 2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _UNIVERSAL_CORE_SCREEN_HPP
-#define _UNIVERSAL_CORE_SCREEN_HPP
-
-#include <3ds.h>
-#include
-
-class Screen {
-public:
- virtual ~Screen() {}
- virtual void Logic(u32 hDown, u32 hHeld, touchPosition touch) = 0;
- virtual void Draw() const = 0;
-};
-
+/*
+* This file is part of Universal-Core
+* Copyright (C) 2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _UNIVERSAL_CORE_SCREEN_HPP
+#define _UNIVERSAL_CORE_SCREEN_HPP
+
+#include <3ds.h>
+#include
+
+class Screen {
+public:
+ virtual ~Screen() {}
+ virtual void Logic(u32 hDown, u32 hHeld, touchPosition touch) = 0;
+ virtual void Draw() const = 0;
+};
+
#endif
\ No newline at end of file
diff --git a/Universal-Core/screenCommon.hpp b/Universal-Core/screenCommon.hpp
index d77cb85..66bb037 100644
--- a/Universal-Core/screenCommon.hpp
+++ b/Universal-Core/screenCommon.hpp
@@ -1,37 +1,37 @@
-/*
-* This file is part of Universal-Core
-* Copyright (C) 2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _UNIVERSAL_CORE_SCREENCOMMON_HPP
-#define _UNIVERSAL_CORE_SCREENCOMMON_HPP
-
-#include "gui.hpp"
-#include "structs.hpp"
-
-extern C3D_RenderTarget *Top, *TopRight, *Bottom;
-extern bool fadeout, fadein, fadeout2, fadein2;
-extern int fadealpha, fadecolor;
-
+/*
+* This file is part of Universal-Core
+* Copyright (C) 2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _UNIVERSAL_CORE_SCREENCOMMON_HPP
+#define _UNIVERSAL_CORE_SCREENCOMMON_HPP
+
+#include "gui.hpp"
+#include "structs.hpp"
+
+extern C3D_RenderTarget *Top, *TopRight, *Bottom;
+extern bool fadeout, fadein, fadeout2, fadein2;
+extern int fadealpha, fadecolor;
+
#endif
\ No newline at end of file
diff --git a/Universal-Core/structs.hpp b/Universal-Core/structs.hpp
index 00241a7..fc5e0aa 100644
--- a/Universal-Core/structs.hpp
+++ b/Universal-Core/structs.hpp
@@ -1,49 +1,49 @@
-/*
-* This file is part of Universal-Core
-* Copyright (C) 2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _UNIVERSAL_CORE_STRUCTS_HPP
-#define _UNIVERSAL_CORE_STRUCTS_HPP
-
-#include
-
-class Structs {
-public:
- struct ButtonPos {
- int x;
- int y;
- int w;
- int h;
- };
-
- struct Key {
- std::string character;
- int x;
- int y;
- int w;
- };
-};
-
+/*
+* This file is part of Universal-Core
+* Copyright (C) 2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _UNIVERSAL_CORE_STRUCTS_HPP
+#define _UNIVERSAL_CORE_STRUCTS_HPP
+
+#include
+
+class Structs {
+public:
+ struct ButtonPos {
+ int x;
+ int y;
+ int w;
+ int h;
+ };
+
+ struct Key {
+ std::string character;
+ int x;
+ int y;
+ int w;
+ };
+};
+
#endif
\ No newline at end of file
diff --git a/app/build-cia.rsf b/app/build-cia.rsf
index 4643be1..187dca9 100644
--- a/app/build-cia.rsf
+++ b/app/build-cia.rsf
@@ -1,285 +1,285 @@
-BasicInfo:
- Title : "DarkStore"
- ProductCode : "CTR-H-DARK"
- Logo : Homebrew # Nintendo / Licensed / Distributed / iQue / iQueForSystem
-
-RomFs:
- RootPath: "../romfs"
-
-TitleInfo:
- Category : Application
- UniqueId : 0x42042
-
-Option:
- UseOnSD : true # true si l'application doit être installée sur SD
- FreeProductCode : true # Supprime les limitations sur ProductCode
- MediaFootPadding : false # Si de vrais fichiers CCI sont créés avec un remplissage
- EnableCrypt : false # Active le cryptage pour NCCH et CIA
- EnableCompress : true # Compresse le cas échéant (actuellement uniquement exefs: /. Code)
-
-AccessControlInfo:
- CoreVersion : 2
-
- # Version du format Exheader
- DescVersion : 2
-
- # Version minimale requise du noyau (ci-dessous est pour 4.5.0)
- ReleaseKernelMajor : "02"
- ReleaseKernelMinor : "33"
-
- # ExtData
- UseExtSaveData : false # active ExtData
- #ExtSaveDataId : 0x300 # définissez ceci uniquement lorsque l'ID est différent de UniqueId
-
- # FS: autorisations d'accès aux archives USER
- # Décommenter si nécessaire
- FileSystemAccess:
- - CategorySystemApplication
- - CategoryHardwareCheck
- - CategoryFileSystemTool
- - Debug
- - TwlCardBackup
- - TwlNandData
- #- Boss
- - DirectSdmc
- - Core
- #- CtrNandRo
- #- CtrNandRw
- #- CtrNandRoWrite
- - CategorySystemSettings
- #- CardBoard
- #- ExportImportIvs
- - DirectSdmcWrite
- #- SwitchCleanup
- #- SaveDataMove
- #- Shop
- #- Shell
- #- CategoryHomeMenu
- #- SeedDB
- IoAccessControl:
- #- FsMountNand
- #- FsMountNandRoWrite
- - FsMountTwln
- #- FsMountWnand
- - FsMountCardSpi
- - UseSdif3
- #- CreateSeed
- - UseCardSpi
-
- # Paramètres de processus
- MemoryType : Application # Application/System/Base
- SystemMode : 64MB # 64MB(Defaut)/96MB/80MB/72MB/32MB
- IdealProcessor : 0
- AffinityMask : 1
- Priority : 16
- MaxCpu : 0x9E # Defaut
- HandleTableSize : 0x200
- DisableDebug : false
- EnableForceDebug : false
- CanWriteSharedPage : true
- CanUsePrivilegedPriority : false
- CanUseNonAlphabetAndNumber : true
- PermitMainFunctionArgument : true
- CanShareDeviceMemory : true
- RunnableOnSleep : false
- SpecialMemoryArrange : true
-
- # Paramètres de processus exclusifs New3DS
- SystemModeExt : Legacy # Legacy (par défaut) / 124 Mo / 178 Mo Legacy: utilisez le mode système Old3DS
- CpuSpeed : 804MHz # 268MHz(Defaut)/804MHz
- EnableL2Cache : true # false (par défaut) / true
- CanAccessCore2 : true
-
- # Correspondances d’adresses virtuelles
- IORegisterMapping:
- - 1ff00000-1ff7ffff # DSP memory
- MemoryMapping:
- - 1f000000-1f5fffff:r # VRAM
-
- # SVC accessibles, :
- SystemCallAccess:
- ControlMemory: 1
- QueryMemory: 2
- ExitProcess: 3
- GetProcessAffinityMask: 4
- SetProcessAffinityMask: 5
- GetProcessIdealProcessor: 6
- SetProcessIdealProcessor: 7
- CreateThread: 8
- ExitThread: 9
- SleepThread: 10
- GetThreadPriority: 11
- SetThreadPriority: 12
- GetThreadAffinityMask: 13
- SetThreadAffinityMask: 14
- GetThreadIdealProcessor: 15
- SetThreadIdealProcessor: 16
- GetCurrentProcessorNumber: 17
- Run: 18
- CreateMutex: 19
- ReleaseMutex: 20
- CreateSemaphore: 21
- ReleaseSemaphore: 22
- CreateEvent: 23
- SignalEvent: 24
- ClearEvent: 25
- CreateTimer: 26
- SetTimer: 27
- CancelTimer: 28
- ClearTimer: 29
- CreateMemoryBlock: 30
- MapMemoryBlock: 31
- UnmapMemoryBlock: 32
- CreateAddressArbiter: 33
- ArbitrateAddress: 34
- CloseHandle: 35
- WaitSynchronization1: 36
- WaitSynchronizationN: 37
- SignalAndWait: 38
- DuplicateHandle: 39
- GetSystemTick: 40
- GetHandleInfo: 41
- GetSystemInfo: 42
- GetProcessInfo: 43
- GetThreadInfo: 44
- ConnectToPort: 45
- SendSyncRequest1: 46
- SendSyncRequest2: 47
- SendSyncRequest3: 48
- SendSyncRequest4: 49
- SendSyncRequest: 50
- OpenProcess: 51
- OpenThread: 52
- GetProcessId: 53
- GetProcessIdOfThread: 54
- GetThreadId: 55
- GetResourceLimit: 56
- GetResourceLimitLimitValues: 57
- GetResourceLimitCurrentValues: 58
- GetThreadContext: 59
- Break: 60
- OutputDebugString: 61
- ControlPerformanceCounter: 62
- CreatePort: 71
- CreateSessionToPort: 72
- CreateSession: 73
- AcceptSession: 74
- ReplyAndReceive1: 75
- ReplyAndReceive2: 76
- ReplyAndReceive3: 77
- ReplyAndReceive4: 78
- ReplyAndReceive: 79
- BindInterrupt: 80
- UnbindInterrupt: 81
- InvalidateProcessDataCache: 82
- StoreProcessDataCache: 83
- FlushProcessDataCache: 84
- StartInterProcessDma: 85
- StopDma: 86
- GetDmaState: 87
- RestartDma: 88
- DebugActiveProcess: 96
- BreakDebugProcess: 97
- TerminateDebugProcess: 98
- GetProcessDebugEvent: 99
- ContinueDebugEvent: 100
- GetProcessList: 101
- GetThreadList: 102
- GetDebugThreadContext: 103
- SetDebugThreadContext: 104
- QueryDebugProcessMemory: 105
- ReadProcessMemory: 106
- WriteProcessMemory: 107
- SetHardwareBreakPoint: 108
- GetDebugThreadParam: 109
- ControlProcessMemory: 112
- MapProcessMemory: 113
- UnmapProcessMemory: 114
- CreateCodeSet: 115
- CreateProcess: 117
- TerminateProcess: 118
- SetProcessResourceLimits: 119
- CreateResourceLimit: 120
- SetResourceLimitValues: 121
- AddCodeSegment: 122
- Backdoor: 123
- KernelSetState: 124
- QueryProcessMemory: 125
-
- # Liste des services
- # 34 services maximum (32 si le micrologiciel est antérieur à la version 9.6.0)
- ServiceAccessControl:
- - APT:U
- - ac:u
- - am:net
- #- boss:U
- #- cam:u
- #- cecd:u
- #- cfg:nor
- - cfg:u
- #- csnd:SND
- - dsp::DSP
- #- frd:u
- - fs:USER
- - gsp::Gpu
- - gsp::Lcd
- - hid:USER
- - http:C
- #- ir:rst
- #- ir:u
- #- ir:USER
- #- mic:u
- #- ndm:u
- #- news:s
- - nwm::EXT
- - nwm::UDS
- - ptm:sysm
- - ptm:u
- - pxi:dev
- - soc:U
- - ssl:C
- #- y2r:u
-
-
-SystemControlInfo:
- SaveDataSize: 0KB # Change if the app uses savedata
- RemasterVersion: $(APP_VERSION_MAJOR)
- StackSize: 0x40000
-
- # Les modules qui exécutent les services énumérés ci-dessus doivent être inclus sous
- # 48 dépendances maximum
- # :
- Dependency:
- ac: 0x0004013000002402
- #act: 0x0004013000003802
- am: 0x0004013000001502
- boss: 0x0004013000003402
- camera: 0x0004013000001602
- cecd: 0x0004013000002602
- cfg: 0x0004013000001702
- codec: 0x0004013000001802
- csnd: 0x0004013000002702
- dlp: 0x0004013000002802
- dsp: 0x0004013000001a02
- friends: 0x0004013000003202
- gpio: 0x0004013000001b02
- gsp: 0x0004013000001c02
- hid: 0x0004013000001d02
- http: 0x0004013000002902
- i2c: 0x0004013000001e02
- ir: 0x0004013000003302
- mcu: 0x0004013000001f02
- mic: 0x0004013000002002
- ndm: 0x0004013000002b02
- news: 0x0004013000003502
- #nfc: 0x0004013000004002
- nim: 0x0004013000002c02
- nwm: 0x0004013000002d02
- pdn: 0x0004013000002102
- ps: 0x0004013000003102
- ptm: 0x0004013000002202
- #qtm: 0x0004013020004202
- ro: 0x0004013000003702
- socket: 0x0004013000002e02
- spi: 0x0004013000002302
- ssl: 0x0004013000002f02
+BasicInfo:
+ Title : "DarkStore"
+ ProductCode : "CTR-H-DARK"
+ Logo : Homebrew # Nintendo / Licensed / Distributed / iQue / iQueForSystem
+
+RomFs:
+ RootPath: "../romfs"
+
+TitleInfo:
+ Category : Application
+ UniqueId : 0x42042
+
+Option:
+ UseOnSD : true # true si l'application doit être installée sur SD
+ FreeProductCode : true # Supprime les limitations sur ProductCode
+ MediaFootPadding : false # Si de vrais fichiers CCI sont créés avec un remplissage
+ EnableCrypt : false # Active le cryptage pour NCCH et CIA
+ EnableCompress : true # Compresse le cas échéant (actuellement uniquement exefs: /. Code)
+
+AccessControlInfo:
+ CoreVersion : 2
+
+ # Version du format Exheader
+ DescVersion : 2
+
+ # Version minimale requise du noyau (ci-dessous est pour 4.5.0)
+ ReleaseKernelMajor : "02"
+ ReleaseKernelMinor : "33"
+
+ # ExtData
+ UseExtSaveData : false # active ExtData
+ #ExtSaveDataId : 0x300 # définissez ceci uniquement lorsque l'ID est différent de UniqueId
+
+ # FS: autorisations d'accès aux archives USER
+ # Décommenter si nécessaire
+ FileSystemAccess:
+ - CategorySystemApplication
+ - CategoryHardwareCheck
+ - CategoryFileSystemTool
+ - Debug
+ - TwlCardBackup
+ - TwlNandData
+ #- Boss
+ - DirectSdmc
+ - Core
+ #- CtrNandRo
+ #- CtrNandRw
+ #- CtrNandRoWrite
+ - CategorySystemSettings
+ #- CardBoard
+ #- ExportImportIvs
+ - DirectSdmcWrite
+ #- SwitchCleanup
+ #- SaveDataMove
+ #- Shop
+ #- Shell
+ #- CategoryHomeMenu
+ #- SeedDB
+ IoAccessControl:
+ #- FsMountNand
+ #- FsMountNandRoWrite
+ - FsMountTwln
+ #- FsMountWnand
+ - FsMountCardSpi
+ - UseSdif3
+ #- CreateSeed
+ - UseCardSpi
+
+ # Paramètres de processus
+ MemoryType : Application # Application/System/Base
+ SystemMode : 64MB # 64MB(Defaut)/96MB/80MB/72MB/32MB
+ IdealProcessor : 0
+ AffinityMask : 1
+ Priority : 16
+ MaxCpu : 0x9E # Defaut
+ HandleTableSize : 0x200
+ DisableDebug : false
+ EnableForceDebug : false
+ CanWriteSharedPage : true
+ CanUsePrivilegedPriority : false
+ CanUseNonAlphabetAndNumber : true
+ PermitMainFunctionArgument : true
+ CanShareDeviceMemory : true
+ RunnableOnSleep : false
+ SpecialMemoryArrange : true
+
+ # Paramètres de processus exclusifs New3DS
+ SystemModeExt : Legacy # Legacy (par défaut) / 124 Mo / 178 Mo Legacy: utilisez le mode système Old3DS
+ CpuSpeed : 804MHz # 268MHz(Defaut)/804MHz
+ EnableL2Cache : true # false (par défaut) / true
+ CanAccessCore2 : true
+
+ # Correspondances d’adresses virtuelles
+ IORegisterMapping:
+ - 1ff00000-1ff7ffff # DSP memory
+ MemoryMapping:
+ - 1f000000-1f5fffff:r # VRAM
+
+ # SVC accessibles, :
+ SystemCallAccess:
+ ControlMemory: 1
+ QueryMemory: 2
+ ExitProcess: 3
+ GetProcessAffinityMask: 4
+ SetProcessAffinityMask: 5
+ GetProcessIdealProcessor: 6
+ SetProcessIdealProcessor: 7
+ CreateThread: 8
+ ExitThread: 9
+ SleepThread: 10
+ GetThreadPriority: 11
+ SetThreadPriority: 12
+ GetThreadAffinityMask: 13
+ SetThreadAffinityMask: 14
+ GetThreadIdealProcessor: 15
+ SetThreadIdealProcessor: 16
+ GetCurrentProcessorNumber: 17
+ Run: 18
+ CreateMutex: 19
+ ReleaseMutex: 20
+ CreateSemaphore: 21
+ ReleaseSemaphore: 22
+ CreateEvent: 23
+ SignalEvent: 24
+ ClearEvent: 25
+ CreateTimer: 26
+ SetTimer: 27
+ CancelTimer: 28
+ ClearTimer: 29
+ CreateMemoryBlock: 30
+ MapMemoryBlock: 31
+ UnmapMemoryBlock: 32
+ CreateAddressArbiter: 33
+ ArbitrateAddress: 34
+ CloseHandle: 35
+ WaitSynchronization1: 36
+ WaitSynchronizationN: 37
+ SignalAndWait: 38
+ DuplicateHandle: 39
+ GetSystemTick: 40
+ GetHandleInfo: 41
+ GetSystemInfo: 42
+ GetProcessInfo: 43
+ GetThreadInfo: 44
+ ConnectToPort: 45
+ SendSyncRequest1: 46
+ SendSyncRequest2: 47
+ SendSyncRequest3: 48
+ SendSyncRequest4: 49
+ SendSyncRequest: 50
+ OpenProcess: 51
+ OpenThread: 52
+ GetProcessId: 53
+ GetProcessIdOfThread: 54
+ GetThreadId: 55
+ GetResourceLimit: 56
+ GetResourceLimitLimitValues: 57
+ GetResourceLimitCurrentValues: 58
+ GetThreadContext: 59
+ Break: 60
+ OutputDebugString: 61
+ ControlPerformanceCounter: 62
+ CreatePort: 71
+ CreateSessionToPort: 72
+ CreateSession: 73
+ AcceptSession: 74
+ ReplyAndReceive1: 75
+ ReplyAndReceive2: 76
+ ReplyAndReceive3: 77
+ ReplyAndReceive4: 78
+ ReplyAndReceive: 79
+ BindInterrupt: 80
+ UnbindInterrupt: 81
+ InvalidateProcessDataCache: 82
+ StoreProcessDataCache: 83
+ FlushProcessDataCache: 84
+ StartInterProcessDma: 85
+ StopDma: 86
+ GetDmaState: 87
+ RestartDma: 88
+ DebugActiveProcess: 96
+ BreakDebugProcess: 97
+ TerminateDebugProcess: 98
+ GetProcessDebugEvent: 99
+ ContinueDebugEvent: 100
+ GetProcessList: 101
+ GetThreadList: 102
+ GetDebugThreadContext: 103
+ SetDebugThreadContext: 104
+ QueryDebugProcessMemory: 105
+ ReadProcessMemory: 106
+ WriteProcessMemory: 107
+ SetHardwareBreakPoint: 108
+ GetDebugThreadParam: 109
+ ControlProcessMemory: 112
+ MapProcessMemory: 113
+ UnmapProcessMemory: 114
+ CreateCodeSet: 115
+ CreateProcess: 117
+ TerminateProcess: 118
+ SetProcessResourceLimits: 119
+ CreateResourceLimit: 120
+ SetResourceLimitValues: 121
+ AddCodeSegment: 122
+ Backdoor: 123
+ KernelSetState: 124
+ QueryProcessMemory: 125
+
+ # Liste des services
+ # 34 services maximum (32 si le micrologiciel est antérieur à la version 9.6.0)
+ ServiceAccessControl:
+ - APT:U
+ - ac:u
+ - am:net
+ #- boss:U
+ #- cam:u
+ #- cecd:u
+ #- cfg:nor
+ - cfg:u
+ #- csnd:SND
+ - dsp::DSP
+ #- frd:u
+ - fs:USER
+ - gsp::Gpu
+ - gsp::Lcd
+ - hid:USER
+ - http:C
+ #- ir:rst
+ #- ir:u
+ #- ir:USER
+ #- mic:u
+ #- ndm:u
+ #- news:s
+ - nwm::EXT
+ - nwm::UDS
+ - ptm:sysm
+ - ptm:u
+ - pxi:dev
+ - soc:U
+ - ssl:C
+ #- y2r:u
+
+
+SystemControlInfo:
+ SaveDataSize: 0KB # Change if the app uses savedata
+ RemasterVersion: $(APP_VERSION_MAJOR)
+ StackSize: 0x40000
+
+ # Les modules qui exécutent les services énumérés ci-dessus doivent être inclus sous
+ # 48 dépendances maximum
+ # :
+ Dependency:
+ ac: 0x0004013000002402
+ #act: 0x0004013000003802
+ am: 0x0004013000001502
+ boss: 0x0004013000003402
+ camera: 0x0004013000001602
+ cecd: 0x0004013000002602
+ cfg: 0x0004013000001702
+ codec: 0x0004013000001802
+ csnd: 0x0004013000002702
+ dlp: 0x0004013000002802
+ dsp: 0x0004013000001a02
+ friends: 0x0004013000003202
+ gpio: 0x0004013000001b02
+ gsp: 0x0004013000001c02
+ hid: 0x0004013000001d02
+ http: 0x0004013000002902
+ i2c: 0x0004013000001e02
+ ir: 0x0004013000003302
+ mcu: 0x0004013000001f02
+ mic: 0x0004013000002002
+ ndm: 0x0004013000002b02
+ news: 0x0004013000003502
+ #nfc: 0x0004013000004002
+ nim: 0x0004013000002c02
+ nwm: 0x0004013000002d02
+ pdn: 0x0004013000002102
+ ps: 0x0004013000003102
+ ptm: 0x0004013000002202
+ #qtm: 0x0004013020004202
+ ro: 0x0004013000003702
+ socket: 0x0004013000002e02
+ spi: 0x0004013000002302
+ ssl: 0x0004013000002f02
diff --git a/assets/gfx/sprites.t3s b/assets/gfx/sprites.t3s
index 82689da..adad77e 100644
--- a/assets/gfx/sprites.t3s
+++ b/assets/gfx/sprites.t3s
@@ -1,37 +1,37 @@
---atlas -f rgba -z auto
-
-sprites/add.png
-sprites/add_font.png
-sprites/arrow.png
-sprites/checked.png
-sprites/delete.png
-sprites/download.png
-sprites/info.png
-sprites/keyboard.png
-sprites/list.png
-sprites/noIcon.png
-sprites/notes.png
-sprites/qr_code.png
-sprites/queue0.png
-sprites/queue1.png
-sprites/queue2.png
-sprites/queue3.png
-sprites/queue4.png
-sprites/queue5.png
-sprites/queue6.png
-sprites/queue7.png
-sprites/screenshot.png
-sprites/search.png
-sprites/settings.png
-sprites/shortcut.png
-sprites/sort.png
-sprites/sort_checked.png
-sprites/sort_unchecked.png
-sprites/toggle_off.png
-sprites/toggle_on.png
-sprites/unchecked.png
-sprites/DarkStore.png
-sprites/DarkStore-core.png
-sprites/update.png
-sprites/update_app.png
+--atlas -f rgba -z auto
+
+sprites/add.png
+sprites/add_font.png
+sprites/arrow.png
+sprites/checked.png
+sprites/delete.png
+sprites/download.png
+sprites/info.png
+sprites/keyboard.png
+sprites/list.png
+sprites/noIcon.png
+sprites/notes.png
+sprites/qr_code.png
+sprites/queue0.png
+sprites/queue1.png
+sprites/queue2.png
+sprites/queue3.png
+sprites/queue4.png
+sprites/queue5.png
+sprites/queue6.png
+sprites/queue7.png
+sprites/screenshot.png
+sprites/search.png
+sprites/settings.png
+sprites/shortcut.png
+sprites/sort.png
+sprites/sort_checked.png
+sprites/sort_unchecked.png
+sprites/toggle_off.png
+sprites/toggle_on.png
+sprites/unchecked.png
+sprites/DarkStore.png
+sprites/DarkStore-core.png
+sprites/update.png
+sprites/update_app.png
sprites/update_filter.png
\ No newline at end of file
diff --git a/compile.bat b/compile.bat
index 9f397c0..4c543b1 100644
--- a/compile.bat
+++ b/compile.bat
@@ -1,3 +1,3 @@
-@echo off
-make
-pause
+@echo off
+make
+pause
diff --git a/crowdin.yml b/crowdin.yml
index 7eb07c7..dd6c729 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,3 +1,3 @@
-files:
- - source: /romfs/lang/en/app.json
- translation: /romfs/lang/%two_letters_code%/app.json
+files:
+ - source: /romfs/lang/en/app.json
+ translation: /romfs/lang/%two_letters_code%/app.json
diff --git a/include/common.hpp b/include/common.hpp
index 6ebd18d..129bea0 100644
--- a/include/common.hpp
+++ b/include/common.hpp
@@ -1,46 +1,46 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_COMMON_HPP
-#define _GHOST_ESHOP_COMMON_HPP
-
-#include <3ds.h>
-#include "config.hpp"
-#include "gfx.hpp"
-#include "lang.hpp"
-#include "msg.hpp"
-#include "screenCommon.hpp"
-
-#define _STORE_PATH "sdmc:/3ds/DarkStore/stores/"
-#define _META_PATH "sdmc:/3ds/DarkStore/MetaData.json"
-#define _ESHOP_VERSION 4
-
-inline std::unique_ptr config;
-inline uint32_t hRepeat, hDown, hHeld;
-inline touchPosition touch;
-inline C2D_Font font;
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_COMMON_HPP
+#define _DARKSTORE_COMMON_HPP
+
+#include <3ds.h>
+#include "config.hpp"
+#include "gfx.hpp"
+#include "lang.hpp"
+#include "msg.hpp"
+#include "screenCommon.hpp"
+
+#define _STORE_PATH "sdmc:/3ds/DarkStore/stores/"
+#define _META_PATH "sdmc:/3ds/DarkStore/MetaData.json"
+#define _ESHOP_VERSION 4
+
+inline std::unique_ptr config;
+inline uint32_t hRepeat, hDown, hHeld;
+inline touchPosition touch;
+inline C2D_Font font;
+
#endif
\ No newline at end of file
diff --git a/include/gui/gfx.hpp b/include/gui/gfx.hpp
index 57a8e13..8d79dff 100644
--- a/include/gui/gfx.hpp
+++ b/include/gui/gfx.hpp
@@ -1,81 +1,81 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_GFX_HPP
-#define _GHOST_ESHOP_GFX_HPP
-
-#include "common.hpp"
-#include "sprites.h"
-#include
-#include
-
-/*
- Définissez toutes les couleurs utilisées, pour des changements plus faciles.
-*/
-
-/* Couleurs Standard. */
-#define WHITE C2D_Color32(255, 255, 255, 255)
-#define BLACK C2D_Color32(0, 0, 0, 255)
-#define TRANSPARENT C2D_Color32(0, 0, 0, 0)
-#define DIM_COLOR C2D_Color32(0, 0, 0, 190)
-
-/* Barres, Textes, BG Couleurs. */
-#define TEXT_COLOR WHITE
-#define BAR_COLOR C2D_Color32(50, 73, 98, 255)
-#define BAR_OUTL_COLOR C2D_Color32(25, 30, 53, 255)
-#define BG_COLOR C2D_Color32(255, 125, 0, 255)
-
-/* Entrée Des Couleurs. */
-#define ENTRY_BAR_COLOR BAR_COLOR
-#define ENTRY_BAR_OUTL_COLOR BAR_OUTL_COLOR
-
-/* Entrée Des Couleurs De La Boîte. */
-#define BOX_INSIDE_COLOR C2D_Color32(28, 33, 58, 255)
-#define BOX_SELECTED_COLOR C2D_Color32(108, 130, 155, 255)
-#define BOX_UNSELECTED_COLOR BLACK
-
-/* Couleurs De La Barre De Progression. */
-#define PROGRESSBAR_OUT_COLOR BOX_INSIDE_COLOR
-#define PROGRESSBAR_IN_COLOR SIDEBAR_UNSELECTED_COLOR
-
-/* Couleurs du menu de recherche. */
-#define SEARCH_BAR_COLOR C2D_Color32(51, 75, 102, 255)
-#define SEARCH_BAR_OUTL_COLOR BAR_OUTL_COLOR
-
-/* Sidebar Couleurs. */
-#define SIDEBAR_SELECTED_COLOR C2D_Color32(108, 130, 155, 255)
-#define SIDEBAR_UNSELECTED_COLOR C2D_Color32(77, 101, 128, 255)
-
-namespace GFX {
- void DrawTop(void);
- void DrawBottom();
- void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
- void DrawBox(float xPos, float yPos, float width = 50, float height = 50, bool selected = false, uint32_t clr = BOX_INSIDE_COLOR);
- void DrawCheckbox(float xPos, float yPos, bool selected);
- void DrawToggle(float xPos, float yPos, bool toggled);
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_GFX_HPP
+#define _DARKSTORE_GFX_HPP
+
+#include "common.hpp"
+#include "sprites.h"
+#include
+#include
+
+/*
+ Définissez toutes les couleurs utilisées, pour des changements plus faciles.
+*/
+
+/* Couleurs Standard. */
+#define WHITE C2D_Color32(255, 255, 255, 255)
+#define BLACK C2D_Color32(0, 0, 0, 255)
+#define TRANSPARENT C2D_Color32(0, 0, 0, 0)
+#define DIM_COLOR C2D_Color32(0, 0, 0, 190)
+
+/* Barres, Textes, BG Couleurs. */
+#define TEXT_COLOR WHITE
+#define BAR_COLOR C2D_Color32(50, 73, 98, 255)
+#define BAR_OUTL_COLOR C2D_Color32(25, 30, 53, 255)
+#define BG_COLOR C2D_Color32(255, 125, 0, 255)
+
+/* Entrée Des Couleurs. */
+#define ENTRY_BAR_COLOR BAR_COLOR
+#define ENTRY_BAR_OUTL_COLOR BAR_OUTL_COLOR
+
+/* Entrée Des Couleurs De La Boîte. */
+#define BOX_INSIDE_COLOR C2D_Color32(28, 33, 58, 255)
+#define BOX_SELECTED_COLOR C2D_Color32(108, 130, 155, 255)
+#define BOX_UNSELECTED_COLOR BLACK
+
+/* Couleurs De La Barre De Progression. */
+#define PROGRESSBAR_OUT_COLOR BOX_INSIDE_COLOR
+#define PROGRESSBAR_IN_COLOR SIDEBAR_UNSELECTED_COLOR
+
+/* Couleurs du menu de recherche. */
+#define SEARCH_BAR_COLOR C2D_Color32(51, 75, 102, 255)
+#define SEARCH_BAR_OUTL_COLOR BAR_OUTL_COLOR
+
+/* Sidebar Couleurs. */
+#define SIDEBAR_SELECTED_COLOR C2D_Color32(108, 130, 155, 255)
+#define SIDEBAR_UNSELECTED_COLOR C2D_Color32(77, 101, 128, 255)
+
+namespace GFX {
+ void DrawTop(void);
+ void DrawBottom();
+ void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
+ void DrawBox(float xPos, float yPos, float width = 50, float height = 50, bool selected = false, uint32_t clr = BOX_INSIDE_COLOR);
+ void DrawCheckbox(float xPos, float yPos, bool selected);
+ void DrawToggle(float xPos, float yPos, bool toggled);
+};
+
#endif
\ No newline at end of file
diff --git a/include/gui/msg.hpp b/include/gui/msg.hpp
index d7d19da..e19b6da 100644
--- a/include/gui/msg.hpp
+++ b/include/gui/msg.hpp
@@ -1,39 +1,39 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_MSG_HPP
-#define _GHOST_ESHOP_MSG_HPP
-
-#include
-
-namespace Msg {
- void DisplayMsg(const std::string &Text);
- void DisplayWarnMsg(const std::string &Text);
- bool promptMsg(const std::string &promptMsg);
- void waitMsg(const std::string &msg);
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_MSG_HPP
+#define _DARKSTORE_MSG_HPP
+
+#include
+
+namespace Msg {
+ void DisplayMsg(const std::string &Text);
+ void DisplayWarnMsg(const std::string &Text);
+ bool promptMsg(const std::string &promptMsg);
+ void waitMsg(const std::string &msg);
+};
+
#endif
\ No newline at end of file
diff --git a/include/init.hpp b/include/init.hpp
index 14a6a02..b4a2eed 100644
--- a/include/init.hpp
+++ b/include/init.hpp
@@ -1,41 +1,41 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_INIT_HPP
-#define _GHOST_ESHOP_INIT_HPP
-
-#include <3ds.h>
-
-namespace Init {
- Result Initialize();
- Result MainLoop();
- Result Exit();
-
- void LoadFont();
- void UnloadFont();
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_INIT_HPP
+#define _DARKSTORE_INIT_HPP
+
+#include <3ds.h>
+
+namespace Init {
+ Result Initialize();
+ Result MainLoop();
+ Result Exit();
+
+ void LoadFont();
+ void UnloadFont();
+};
+
#endif
\ No newline at end of file
diff --git a/include/keyboard.hpp b/include/keyboard.hpp
index 0db9810..a66153b 100644
--- a/include/keyboard.hpp
+++ b/include/keyboard.hpp
@@ -1,37 +1,37 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_KEYBOARD_HPP
-#define _GHOST_ESHOP_KEYBOARD_HPP
-
-#include "storeEntry.hpp"
-#include
-
-namespace Input {
- std::string setkbdString(uint maxLength, const std::string &Text, const std::vector> &entries);
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_KEYBOARD_HPP
+#define _DARKSTORE_KEYBOARD_HPP
+
+#include "storeEntry.hpp"
+#include
+
+namespace Input {
+ std::string setkbdString(uint maxLength, const std::string &Text, const std::vector> &entries);
+};
+
#endif
\ No newline at end of file
diff --git a/include/overlays/overlay.hpp b/include/overlays/overlay.hpp
index a049aef..6f6ebe4 100644
--- a/include/overlays/overlay.hpp
+++ b/include/overlays/overlay.hpp
@@ -1,42 +1,42 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_OVERLAY_HPP
-#define _GHOST_ESHOP_OVERLAY_HPP
-
-#include "common.hpp"
-#include "store.hpp"
-#include "storeEntry.hpp"
-#include <3ds.h>
-
-namespace Overlays {
- void SelectStore(std::unique_ptr &store, std::vector> &entries, std::unique_ptr &meta);
- void SelectLanguage(const std::unique_ptr &store);
- void ShowCredits();
- std::string SelectDir(const std::string &oldDir, const std::string &msg, const std::unique_ptr &store);
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_OVERLAY_HPP
+#define _DARKSTORE_OVERLAY_HPP
+
+#include "common.hpp"
+#include "store.hpp"
+#include "storeEntry.hpp"
+#include <3ds.h>
+
+namespace Overlays {
+ void SelectStore(std::unique_ptr &store, std::vector> &entries, std::unique_ptr &meta);
+ void SelectLanguage(const std::unique_ptr &store);
+ void ShowCredits();
+ std::string SelectDir(const std::string &oldDir, const std::string &msg, const std::unique_ptr &store);
+};
+
#endif
\ No newline at end of file
diff --git a/include/qr/qrcode.hpp b/include/qr/qrcode.hpp
index ead1762..beadaa7 100644
--- a/include/qr/qrcode.hpp
+++ b/include/qr/qrcode.hpp
@@ -1,126 +1,126 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-/*
- * This file is part of PKSM
- * Copyright (C) 2016-2020 Bernardo Giordano, Admiral Fish, piepie62
- *
- * 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 .
- *
- * Additional Terms 7.b and 7.c of GPLv3 apply to this file:
- * * Requiring preservation of specified reasonable legal notices or
- * author attributions in that material or in the Appropriate Legal
- * Notices displayed by works containing it.
- * * 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.
- */
-
-#ifndef _GHOST_ESHOP_QR_CODE_HPP
-#define _GHOST_ESHOP_QR_CODE_HPP
-
-#include "common.hpp"
-#include "quirc.hpp"
-#include
-#include <3ds.h>
-#include
-#include
-
-class QRCode {
-public:
- QRCode();
- ~QRCode();
-
- void drawThread();
- void captureThread();
- void handler(std::string &result);
- bool done() const { return this->finished; };
- bool cancelled() const { return this->cancel; };
- void List(bool v) { this->displayList = v; };
-private:
- void buffToImage();
- void finish();
- std::array cameraBuffer;
- LightLock bufferLock;
- C2D_Image image;
- LightLock imageLock;
- quirc *qrData;
- Handle exitEvent;
- static constexpr Tex3DS_SubTexture subtex = { 512, 256, 0.0f, 1.0f, 1.0f, 0.0f };
- std::atomic finished = false;
- bool capturing = false;
- bool cancel = false;
- bool displayList = false;
- int selectedStore = 0, sPos = 0;
- std::vector stores = { };
- std::vector out;
-};
-
-/*
- This is, what should get called.
-*/
-namespace QR_Scanner {
- std::string StoreHandle();
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+/*
+ * This file is part of PKSM
+ * Copyright (C) 2016-2020 Bernardo Giordano, Admiral Fish, piepie62
+ *
+ * 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 .
+ *
+ * Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+ * * Requiring preservation of specified reasonable legal notices or
+ * author attributions in that material or in the Appropriate Legal
+ * Notices displayed by works containing it.
+ * * 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.
+ */
+
+#ifndef _DARKSTORE_QR_CODE_HPP
+#define _DARKSTORE_QR_CODE_HPP
+
+#include "common.hpp"
+#include "quirc.hpp"
+#include
+#include <3ds.h>
+#include
+#include
+
+class QRCode {
+public:
+ QRCode();
+ ~QRCode();
+
+ void drawThread();
+ void captureThread();
+ void handler(std::string &result);
+ bool done() const { return this->finished; };
+ bool cancelled() const { return this->cancel; };
+ void List(bool v) { this->displayList = v; };
+private:
+ void buffToImage();
+ void finish();
+ std::array cameraBuffer;
+ LightLock bufferLock;
+ C2D_Image image;
+ LightLock imageLock;
+ quirc *qrData;
+ Handle exitEvent;
+ static constexpr Tex3DS_SubTexture subtex = { 512, 256, 0.0f, 1.0f, 1.0f, 0.0f };
+ std::atomic finished = false;
+ bool capturing = false;
+ bool cancel = false;
+ bool displayList = false;
+ int selectedStore = 0, sPos = 0;
+ std::vector stores = { };
+ std::vector out;
+};
+
+/*
+ This is, what should get called.
+*/
+namespace QR_Scanner {
+ std::string StoreHandle();
+};
+
#endif
\ No newline at end of file
diff --git a/include/qr/quirc.hpp b/include/qr/quirc.hpp
index 4e5c402..9aa661c 100644
--- a/include/qr/quirc.hpp
+++ b/include/qr/quirc.hpp
@@ -1,191 +1,191 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-/* quirc -- QR-code recognition library
- * Copyright (C) 2010-2012 Daniel Beer
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef QUIRC_HPP
-#define QUIRC_HPP
-
-#include
-
-struct quirc;
-
-/* Obtain the library version string. */
-const char *quirc_version(void);
-
-/* Construct a new QR-code recognizer. This function will return NULL
- * if sufficient memory could not be allocated.
- */
-struct quirc *quirc_new(void);
-
-/* Destroy a QR-code recognizer. */
-void quirc_destroy(struct quirc *q);
-
-/* Resize the QR-code recognizer. The size of an image must be
- * specified before codes can be analyzed.
- *
- * This function returns 0 on success, or -1 if sufficient memory could
- * not be allocated.
- */
-int quirc_resize(struct quirc *q, int w, int h);
-
-/* These functions are used to process images for QR-code recognition.
- * quirc_begin() must first be called to obtain access to a buffer into
- * which the input image should be placed. Optionally, the current
- * width and height may be returned.
- *
- * After filling the buffer, quirc_end() should be called to process
- * the image for QR-code recognition. The locations and content of each
- * code may be obtained using accessor functions described below.
- */
-uint8_t *quirc_begin(struct quirc *q, int *w, int *h);
-void quirc_end(struct quirc *q);
-
-/* This structure describes a location in the input image buffer. */
-struct quirc_point {
- int x;
- int y;
-};
-
-/* This enum describes the various decoder errors which may occur. */
-typedef enum {
- QUIRC_SUCCESS = 0,
- QUIRC_ERROR_INVALID_GRID_SIZE,
- QUIRC_ERROR_INVALID_VERSION,
- QUIRC_ERROR_FORMAT_ECC,
- QUIRC_ERROR_DATA_ECC,
- QUIRC_ERROR_UNKNOWN_DATA_TYPE,
- QUIRC_ERROR_DATA_OVERFLOW,
- QUIRC_ERROR_DATA_UNDERFLOW
-} quirc_decode_error_t;
-
-/* Return a string error message for an error code. */
-const char *quirc_strerror(quirc_decode_error_t err);
-
-/* Limits on the maximum size of QR-codes and their content. */
-#define QUIRC_MAX_BITMAP 3917
-#define QUIRC_MAX_PAYLOAD 8896
-
-/* QR-code ECC types. */
-#define QUIRC_ECC_LEVEL_M 0
-#define QUIRC_ECC_LEVEL_L 1
-#define QUIRC_ECC_LEVEL_H 2
-#define QUIRC_ECC_LEVEL_Q 3
-
-/* QR-code data types. */
-#define QUIRC_DATA_TYPE_NUMERIC 1
-#define QUIRC_DATA_TYPE_ALPHA 2
-#define QUIRC_DATA_TYPE_BYTE 4
-#define QUIRC_DATA_TYPE_KANJI 8
-
-/* Common character encodings */
-#define QUIRC_ECI_ISO_8859_1 1
-#define QUIRC_ECI_IBM437 2
-#define QUIRC_ECI_ISO_8859_2 4
-#define QUIRC_ECI_ISO_8859_3 5
-#define QUIRC_ECI_ISO_8859_4 6
-#define QUIRC_ECI_ISO_8859_5 7
-#define QUIRC_ECI_ISO_8859_6 8
-#define QUIRC_ECI_ISO_8859_7 9
-#define QUIRC_ECI_ISO_8859_8 10
-#define QUIRC_ECI_ISO_8859_9 11
-#define QUIRC_ECI_WINDOWS_874 13
-#define QUIRC_ECI_ISO_8859_13 15
-#define QUIRC_ECI_ISO_8859_15 17
-#define QUIRC_ECI_SHIFT_JIS 20
-#define QUIRC_ECI_UTF_8 26
-
-/* This structure is used to return information about detected QR codes
- * in the input image.
- */
-struct quirc_code {
- /* The four corners of the QR-code, from top left, clockwise */
- struct quirc_point corners[4];
-
- /* The number of cells across in the QR-code. The cell bitmap
- * is a bitmask giving the actual values of cells. If the cell
- * at (x, y) is black, then the following bit is set:
- *
- * cell_bitmap[i << 3] & (1 << (i & 7))
- *
- * where i = (y * size) + x.
- */
- int size;
- uint8_t cell_bitmap[QUIRC_MAX_BITMAP];
-};
-
-/* This structure holds the decoded QR-code data */
-struct quirc_data {
- /* Various parameters of the QR-code. These can mostly be
- * ignored if you only care about the data.
- */
- int version;
- int ecc_level;
- int mask;
-
- /* This field is the highest-valued data type found in the QR
- * code.
- */
- int data_type;
-
- /* Data payload. For the Kanji datatype, payload is encoded as
- * Shift-JIS. For all other datatypes, payload is ASCII text.
- */
- uint8_t payload[QUIRC_MAX_PAYLOAD];
- int payload_len;
-
- /* ECI assignment number */
- uint32_t eci;
-};
-
-/* Return the number of QR-codes identified in the last processed
- * image.
- */
-int quirc_count(const struct quirc *q);
-
-/* Extract the QR-code specified by the given index. */
-void quirc_extract(const struct quirc *q, int index,
- struct quirc_code *code);
-
-/* Decode a QR-code, returning the payload data. */
-quirc_decode_error_t quirc_decode(const struct quirc_code *code,
- struct quirc_data *data);
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+/* quirc -- QR-code recognition library
+ * Copyright (C) 2010-2012 Daniel Beer
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef QUIRC_HPP
+#define QUIRC_HPP
+
+#include
+
+struct quirc;
+
+/* Obtain the library version string. */
+const char *quirc_version(void);
+
+/* Construct a new QR-code recognizer. This function will return NULL
+ * if sufficient memory could not be allocated.
+ */
+struct quirc *quirc_new(void);
+
+/* Destroy a QR-code recognizer. */
+void quirc_destroy(struct quirc *q);
+
+/* Resize the QR-code recognizer. The size of an image must be
+ * specified before codes can be analyzed.
+ *
+ * This function returns 0 on success, or -1 if sufficient memory could
+ * not be allocated.
+ */
+int quirc_resize(struct quirc *q, int w, int h);
+
+/* These functions are used to process images for QR-code recognition.
+ * quirc_begin() must first be called to obtain access to a buffer into
+ * which the input image should be placed. Optionally, the current
+ * width and height may be returned.
+ *
+ * After filling the buffer, quirc_end() should be called to process
+ * the image for QR-code recognition. The locations and content of each
+ * code may be obtained using accessor functions described below.
+ */
+uint8_t *quirc_begin(struct quirc *q, int *w, int *h);
+void quirc_end(struct quirc *q);
+
+/* This structure describes a location in the input image buffer. */
+struct quirc_point {
+ int x;
+ int y;
+};
+
+/* This enum describes the various decoder errors which may occur. */
+typedef enum {
+ QUIRC_SUCCESS = 0,
+ QUIRC_ERROR_INVALID_GRID_SIZE,
+ QUIRC_ERROR_INVALID_VERSION,
+ QUIRC_ERROR_FORMAT_ECC,
+ QUIRC_ERROR_DATA_ECC,
+ QUIRC_ERROR_UNKNOWN_DATA_TYPE,
+ QUIRC_ERROR_DATA_OVERFLOW,
+ QUIRC_ERROR_DATA_UNDERFLOW
+} quirc_decode_error_t;
+
+/* Return a string error message for an error code. */
+const char *quirc_strerror(quirc_decode_error_t err);
+
+/* Limits on the maximum size of QR-codes and their content. */
+#define QUIRC_MAX_BITMAP 3917
+#define QUIRC_MAX_PAYLOAD 8896
+
+/* QR-code ECC types. */
+#define QUIRC_ECC_LEVEL_M 0
+#define QUIRC_ECC_LEVEL_L 1
+#define QUIRC_ECC_LEVEL_H 2
+#define QUIRC_ECC_LEVEL_Q 3
+
+/* QR-code data types. */
+#define QUIRC_DATA_TYPE_NUMERIC 1
+#define QUIRC_DATA_TYPE_ALPHA 2
+#define QUIRC_DATA_TYPE_BYTE 4
+#define QUIRC_DATA_TYPE_KANJI 8
+
+/* Common character encodings */
+#define QUIRC_ECI_ISO_8859_1 1
+#define QUIRC_ECI_IBM437 2
+#define QUIRC_ECI_ISO_8859_2 4
+#define QUIRC_ECI_ISO_8859_3 5
+#define QUIRC_ECI_ISO_8859_4 6
+#define QUIRC_ECI_ISO_8859_5 7
+#define QUIRC_ECI_ISO_8859_6 8
+#define QUIRC_ECI_ISO_8859_7 9
+#define QUIRC_ECI_ISO_8859_8 10
+#define QUIRC_ECI_ISO_8859_9 11
+#define QUIRC_ECI_WINDOWS_874 13
+#define QUIRC_ECI_ISO_8859_13 15
+#define QUIRC_ECI_ISO_8859_15 17
+#define QUIRC_ECI_SHIFT_JIS 20
+#define QUIRC_ECI_UTF_8 26
+
+/* This structure is used to return information about detected QR codes
+ * in the input image.
+ */
+struct quirc_code {
+ /* The four corners of the QR-code, from top left, clockwise */
+ struct quirc_point corners[4];
+
+ /* The number of cells across in the QR-code. The cell bitmap
+ * is a bitmask giving the actual values of cells. If the cell
+ * at (x, y) is black, then the following bit is set:
+ *
+ * cell_bitmap[i << 3] & (1 << (i & 7))
+ *
+ * where i = (y * size) + x.
+ */
+ int size;
+ uint8_t cell_bitmap[QUIRC_MAX_BITMAP];
+};
+
+/* This structure holds the decoded QR-code data */
+struct quirc_data {
+ /* Various parameters of the QR-code. These can mostly be
+ * ignored if you only care about the data.
+ */
+ int version;
+ int ecc_level;
+ int mask;
+
+ /* This field is the highest-valued data type found in the QR
+ * code.
+ */
+ int data_type;
+
+ /* Data payload. For the Kanji datatype, payload is encoded as
+ * Shift-JIS. For all other datatypes, payload is ASCII text.
+ */
+ uint8_t payload[QUIRC_MAX_PAYLOAD];
+ int payload_len;
+
+ /* ECI assignment number */
+ uint32_t eci;
+};
+
+/* Return the number of QR-codes identified in the last processed
+ * image.
+ */
+int quirc_count(const struct quirc *q);
+
+/* Extract the QR-code specified by the given index. */
+void quirc_extract(const struct quirc *q, int index,
+ struct quirc_code *code);
+
+/* Decode a QR-code, returning the payload data. */
+quirc_decode_error_t quirc_decode(const struct quirc_code *code,
+ struct quirc_data *data);
+
#endif
\ No newline at end of file
diff --git a/include/qr/quirc_internal.hpp b/include/qr/quirc_internal.hpp
index 02ace54..d726e46 100644
--- a/include/qr/quirc_internal.hpp
+++ b/include/qr/quirc_internal.hpp
@@ -1,140 +1,140 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-/* quirc -- QR-code recognition library
- * Copyright (C) 2010-2012 Daniel Beer
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef QUIRC_INTERNAL_HPP
-#define QUIRC_INTERNAL_HPP
-
-#include "quirc.hpp"
-
-#define QUIRC_PIXEL_WHITE 0
-#define QUIRC_PIXEL_BLACK 1
-#define QUIRC_PIXEL_REGION 2
-
-#ifndef QUIRC_MAX_REGIONS
-#define QUIRC_MAX_REGIONS 254
-#endif
-#define QUIRC_MAX_CAPSTONES 32
-#define QUIRC_MAX_GRIDS 8
-
-#define QUIRC_PERSPECTIVE_PARAMS 8
-
-#if QUIRC_MAX_REGIONS < UINT8_MAX
-typedef uint8_t quirc_pixel_t;
-#elif QUIRC_MAX_REGIONS < UINT16_MAX
-typedef uint16_t quirc_pixel_t;
-#else
-#error "QUIRC_MAX_REGIONS > 65534 is not supported"
-#endif
-
-struct quirc_region {
- struct quirc_point seed;
- int count;
- int capstone;
-};
-
-struct quirc_capstone {
- int ring;
- int stone;
-
- struct quirc_point corners[4];
- struct quirc_point center;
- double c[QUIRC_PERSPECTIVE_PARAMS];
-
- int qr_grid;
-};
-
-struct quirc_grid {
- /* Capstone indices */
- int caps[3];
-
- /* Alignment pattern region and corner */
- int align_region;
- struct quirc_point align;
-
- /* Timing pattern endpoints */
- struct quirc_point tpep[3];
- int hscan;
- int vscan;
-
- /* Grid size and perspective transform */
- int grid_size;
- double c[QUIRC_PERSPECTIVE_PARAMS];
-};
-
-struct quirc {
- uint8_t *image;
- quirc_pixel_t *pixels;
- int w;
- int h;
-
- int num_regions;
- struct quirc_region regions[QUIRC_MAX_REGIONS];
-
- int num_capstones;
- struct quirc_capstone capstones[QUIRC_MAX_CAPSTONES];
-
- int num_grids;
- struct quirc_grid grids[QUIRC_MAX_GRIDS];
-};
-
-/************************************************************************
- * QR-code version information database
- */
-
-#define QUIRC_MAX_VERSION 40
-#define QUIRC_MAX_ALIGNMENT 7
-
-struct quirc_rs_params {
- int bs; /* Block size */
- int dw; /* Data words */
- int ce; /* Correctable errors */
-};
-
-struct quirc_version_info {
- int data_bytes;
- int apat[QUIRC_MAX_ALIGNMENT];
- struct quirc_rs_params ecc[4];
-};
-
-extern const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1];
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+/* quirc -- QR-code recognition library
+ * Copyright (C) 2010-2012 Daniel Beer
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef QUIRC_INTERNAL_HPP
+#define QUIRC_INTERNAL_HPP
+
+#include "quirc.hpp"
+
+#define QUIRC_PIXEL_WHITE 0
+#define QUIRC_PIXEL_BLACK 1
+#define QUIRC_PIXEL_REGION 2
+
+#ifndef QUIRC_MAX_REGIONS
+#define QUIRC_MAX_REGIONS 254
+#endif
+#define QUIRC_MAX_CAPSTONES 32
+#define QUIRC_MAX_GRIDS 8
+
+#define QUIRC_PERSPECTIVE_PARAMS 8
+
+#if QUIRC_MAX_REGIONS < UINT8_MAX
+typedef uint8_t quirc_pixel_t;
+#elif QUIRC_MAX_REGIONS < UINT16_MAX
+typedef uint16_t quirc_pixel_t;
+#else
+#error "QUIRC_MAX_REGIONS > 65534 is not supported"
+#endif
+
+struct quirc_region {
+ struct quirc_point seed;
+ int count;
+ int capstone;
+};
+
+struct quirc_capstone {
+ int ring;
+ int stone;
+
+ struct quirc_point corners[4];
+ struct quirc_point center;
+ double c[QUIRC_PERSPECTIVE_PARAMS];
+
+ int qr_grid;
+};
+
+struct quirc_grid {
+ /* Capstone indices */
+ int caps[3];
+
+ /* Alignment pattern region and corner */
+ int align_region;
+ struct quirc_point align;
+
+ /* Timing pattern endpoints */
+ struct quirc_point tpep[3];
+ int hscan;
+ int vscan;
+
+ /* Grid size and perspective transform */
+ int grid_size;
+ double c[QUIRC_PERSPECTIVE_PARAMS];
+};
+
+struct quirc {
+ uint8_t *image;
+ quirc_pixel_t *pixels;
+ int w;
+ int h;
+
+ int num_regions;
+ struct quirc_region regions[QUIRC_MAX_REGIONS];
+
+ int num_capstones;
+ struct quirc_capstone capstones[QUIRC_MAX_CAPSTONES];
+
+ int num_grids;
+ struct quirc_grid grids[QUIRC_MAX_GRIDS];
+};
+
+/************************************************************************
+ * QR-code version information database
+ */
+
+#define QUIRC_MAX_VERSION 40
+#define QUIRC_MAX_ALIGNMENT 7
+
+struct quirc_rs_params {
+ int bs; /* Block size */
+ int dw; /* Data words */
+ int ce; /* Correctable errors */
+};
+
+struct quirc_version_info {
+ int data_bytes;
+ int apat[QUIRC_MAX_ALIGNMENT];
+ struct quirc_rs_params ecc[4];
+};
+
+extern const struct quirc_version_info quirc_version_db[QUIRC_MAX_VERSION + 1];
+
#endif
\ No newline at end of file
diff --git a/include/screens/mainScreen.hpp b/include/screens/mainScreen.hpp
index 9332447..2cbaf6b 100644
--- a/include/screens/mainScreen.hpp
+++ b/include/screens/mainScreen.hpp
@@ -1,74 +1,74 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_MAIN_SCREEN_HPP
-#define _GHOST_ESHOP_MAIN_SCREEN_HPP
-
-#include "common.hpp"
-#include "store.hpp"
-#include "storeEntry.hpp"
-#include "storeUtils.hpp"
-
-/*
- Modes:
-
- 0: Entry Info.
- 1: Download List.
- 2: Queue.
- 3: Search + Favorites.
- 4: Sorting.
- 5: Settings / Credits(?).
- 6: Screenshot Menu.
- 7: Release Notes.
-*/
-
-class MainScreen : public Screen {
-public:
- MainScreen();
- void Draw(void) const override;
- void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
-private:
- std::unique_ptr store = nullptr;
- std::unique_ptr meta = nullptr;
- std::vector> entries;
- std::vector dwnldList, dwnldSizes;
-
- bool initialized = false, fetchDown = false, showMarks = false, showSettings = false,
- ascending = false, updateFilter = false, screenshotFetch = false, canDisplay = false;
-
- int storeMode = 0, marks = 0, markIndex = 0, sPage = 0, lMode = 0, sSelection = 0,
- lastMode = 0, smallDelay = 0, sPos = 0, screenshotIndex = 0, sSize = 0, zoom = 0, scrollIndex = 0, queueIndex = 0;
-
- SortType sorttype = SortType::LAST_UPDATED;
-
- /* Titre, Auteur, Catégorie, Console. */
- std::vector searchIncludes = { false, false, false, false };
- std::string searchResult = "", screenshotName = "";
-
- C2D_Image Screenshot = { nullptr, nullptr };
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_MAIN_SCREEN_HPP
+#define _DARKSTORE_MAIN_SCREEN_HPP
+
+#include "common.hpp"
+#include "store.hpp"
+#include "storeEntry.hpp"
+#include "storeUtils.hpp"
+
+/*
+ Modes:
+
+ 0: Entry Info.
+ 1: Download List.
+ 2: Queue.
+ 3: Search + Favorites.
+ 4: Sorting.
+ 5: Settings / Credits(?).
+ 6: Screenshot Menu.
+ 7: Release Notes.
+*/
+
+class MainScreen : public Screen {
+public:
+ MainScreen();
+ void Draw(void) const override;
+ void Logic(u32 hDown, u32 hHeld, touchPosition touch) override;
+private:
+ std::unique_ptr store = nullptr;
+ std::unique_ptr meta = nullptr;
+ std::vector> entries;
+ std::vector dwnldList, dwnldSizes;
+
+ bool initialized = false, fetchDown = false, showMarks = false, showSettings = false,
+ ascending = false, updateFilter = false, screenshotFetch = false, canDisplay = false;
+
+ int storeMode = 0, marks = 0, markIndex = 0, sPage = 0, lMode = 0, sSelection = 0,
+ lastMode = 0, smallDelay = 0, sPos = 0, screenshotIndex = 0, sSize = 0, zoom = 0, scrollIndex = 0, queueIndex = 0;
+
+ SortType sorttype = SortType::LAST_UPDATED;
+
+ /* Titre, Auteur, Catégorie, Console. */
+ std::vector searchIncludes = { false, false, false, false };
+ std::string searchResult = "", screenshotName = "";
+
+ C2D_Image Screenshot = { nullptr, nullptr };
+};
+
#endif
\ No newline at end of file
diff --git a/include/store/meta.hpp b/include/store/meta.hpp
index c3f5a8a..6bd4ca7 100644
--- a/include/store/meta.hpp
+++ b/include/store/meta.hpp
@@ -1,64 +1,64 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_META_HPP
-#define _GHOST_ESHOP_META_HPP
-
-#include "json.hpp"
-#include
-
-enum favoriteMarks {
- STAR = 1 << 0,
- HEART = 1 << 1,
- DIAMOND = 1 << 2,
- CLUBS = 1 << 3,
- SPADE = 1 << 4
-};
-
-class Meta {
-public:
- Meta();
- ~Meta() { this->SaveCall(); };
-
- std::string GetUpdated(const std::string &EshopName, const std::string &entry) const;
- int GetMarks(const std::string &EshopName, const std::string &entry) const;
- bool UpdateAvailable(const std::string &EshopName, const std::string &entry, const std::string &updated) const;
-
- void SetUpdated(const std::string &EshopName, const std::string &entry, const std::string &updated) {
- this->metadataJson[EshopName][entry]["updated"] = updated;
- };
-
- void SetMarks(const std::string &EshopName, const std::string &entry, int marks) {
- this->metadataJson[EshopName][entry]["marks"] = marks;
- };
-
- void ImportMetadata();
- void SaveCall();
-private:
- nlohmann::json metadataJson = nullptr;
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_META_HPP
+#define _DARKSTORE_META_HPP
+
+#include "json.hpp"
+#include
+
+enum favoriteMarks {
+ STAR = 1 << 0,
+ HEART = 1 << 1,
+ DIAMOND = 1 << 2,
+ CLUBS = 1 << 3,
+ SPADE = 1 << 4
+};
+
+class Meta {
+public:
+ Meta();
+ ~Meta() { this->SaveCall(); };
+
+ std::string GetUpdated(const std::string &EshopName, const std::string &entry) const;
+ int GetMarks(const std::string &EshopName, const std::string &entry) const;
+ bool UpdateAvailable(const std::string &EshopName, const std::string &entry, const std::string &updated) const;
+
+ void SetUpdated(const std::string &EshopName, const std::string &entry, const std::string &updated) {
+ this->metadataJson[EshopName][entry]["updated"] = updated;
+ };
+
+ void SetMarks(const std::string &EshopName, const std::string &entry, int marks) {
+ this->metadataJson[EshopName][entry]["marks"] = marks;
+ };
+
+ void ImportMetadata();
+ void SaveCall();
+private:
+ nlohmann::json metadataJson = nullptr;
+};
+
#endif
\ No newline at end of file
diff --git a/include/store/store.hpp b/include/store/store.hpp
index dcc7563..9b6941b 100644
--- a/include/store/store.hpp
+++ b/include/store/store.hpp
@@ -1,101 +1,101 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_STORE_HPP
-#define _GHOST_ESHOP_STORE_HPP
-
-#include "json.hpp"
-#include
-#include
-
-class Store {
-public:
- Store(const std::string &file, const std::string &file2, bool ARGMode = false);
- ~Store();
- void LoadFromFile(const std::string &file);
- void loadSheets();
- void unloadSheets();
- void update(const std::string &file);
-
- /* Obtenir des informations sur l’eShop lui-même. */
- std::string GetEshopTitle() const;
- std::string GetEshopAuthor() const;
-
- /* Obtenir des informations sur les entrées eShop. */
- std::string GetTitleEntry(int index) const;
- std::string GetAuthorEntry(int index) const;
- std::string GetDescriptionEntry(int index) const;
- std::vector GetCategoryIndex(int index) const;
- std::string GetVersionEntry(int index) const;
- std::vector GetConsoleEntry(int index) const;
- std::string GetLastUpdatedEntry(int index) const;
- std::string GetSizeEntry(int index) const;
- std::string GetAdditionalcontentEntry(int index) const;
- C2D_Image GetIconEntry(int index) const;
- std::string GetFileSizes(int index, const std::string &entry) const;
- std::vector GetScreenshotList(int index) const;
- std::vector GetScreenshotNames(int index) const;
- std::string GetReleaseNotes(int index) const;
-
- std::vector GetDownloadList(int index) const;
-
- int GetStoreSize() const { return (int)this->storeJson["storeContent"].size(); };
-
- int GetScreenIndx() const { return this->screenIndex; };
- void SetScreenIndx(int v) { this->screenIndex = v; };
-
- int GetEntry() const { return this->entry; };
- void SetEntry(int v) { this->entry = v; };
-
- int GetBox() const { return this->box; };
- void SetBox(int v) { this->box = v; };
-
- int GetDownloadSIndex() const { return this->downIndex; };
- void SetDownloadSIndex(int v) { this->downIndex = v; };
-
- int GetDownloadIndex() const { return this->downEntry; };
- void SetDownloadIndex(int v) { this->downEntry = v; };
-
- nlohmann::json &GetJson() { return this->storeJson; };
- bool GetValid() const { return this->valid; };
-
- /* Ces deux choses sont utilisées pour le support BG personnalisé. */
- C2D_Image GetStoreImg() const { return this->storeBG; };
- bool customBG() const { return this->hasCustomBG; };
-
- /* Renvoie le nom du fichier eShop. */
- std::string GetFileName() const { return this->fileName; };
-private:
- void SetC2DBGImage();
- nlohmann::json storeJson = nullptr;
- std::vector sheets;
- C2D_Image storeBG = { nullptr };
- bool valid = false, hasSheet = false, hasCustomBG = false;
- int screenIndex = 0, entry = 0, box = 0, downEntry = 0, downIndex = 0;
- std::string fileName = "";
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_STORE_HPP
+#define _DARKSTORE_STORE_HPP
+
+#include "json.hpp"
+#include
+#include
+
+class Store {
+public:
+ Store(const std::string &file, const std::string &file2, bool ARGMode = false);
+ ~Store();
+ void LoadFromFile(const std::string &file);
+ void loadSheets();
+ void unloadSheets();
+ void update(const std::string &file);
+
+ /* Obtenir des informations sur l’eShop lui-même. */
+ std::string GetEshopTitle() const;
+ std::string GetEshopAuthor() const;
+
+ /* Obtenir des informations sur les entrées eShop. */
+ std::string GetTitleEntry(int index) const;
+ std::string GetAuthorEntry(int index) const;
+ std::string GetDescriptionEntry(int index) const;
+ std::vector GetCategoryIndex(int index) const;
+ std::string GetVersionEntry(int index) const;
+ std::vector GetConsoleEntry(int index) const;
+ std::string GetLastUpdatedEntry(int index) const;
+ std::string GetSizeEntry(int index) const;
+ std::string GetAdditionalcontentEntry(int index) const;
+ C2D_Image GetIconEntry(int index) const;
+ std::string GetFileSizes(int index, const std::string &entry) const;
+ std::vector GetScreenshotList(int index) const;
+ std::vector GetScreenshotNames(int index) const;
+ std::string GetReleaseNotes(int index) const;
+
+ std::vector GetDownloadList(int index) const;
+
+ int GetStoreSize() const { return (int)this->storeJson["storeContent"].size(); };
+
+ int GetScreenIndx() const { return this->screenIndex; };
+ void SetScreenIndx(int v) { this->screenIndex = v; };
+
+ int GetEntry() const { return this->entry; };
+ void SetEntry(int v) { this->entry = v; };
+
+ int GetBox() const { return this->box; };
+ void SetBox(int v) { this->box = v; };
+
+ int GetDownloadSIndex() const { return this->downIndex; };
+ void SetDownloadSIndex(int v) { this->downIndex = v; };
+
+ int GetDownloadIndex() const { return this->downEntry; };
+ void SetDownloadIndex(int v) { this->downEntry = v; };
+
+ nlohmann::json &GetJson() { return this->storeJson; };
+ bool GetValid() const { return this->valid; };
+
+ /* Ces deux choses sont utilisées pour le support BG personnalisé. */
+ C2D_Image GetStoreImg() const { return this->storeBG; };
+ bool customBG() const { return this->hasCustomBG; };
+
+ /* Renvoie le nom du fichier eShop. */
+ std::string GetFileName() const { return this->fileName; };
+private:
+ void SetC2DBGImage();
+ nlohmann::json storeJson = nullptr;
+ std::vector sheets;
+ C2D_Image storeBG = { nullptr };
+ bool valid = false, hasSheet = false, hasCustomBG = false;
+ int screenIndex = 0, entry = 0, box = 0, downEntry = 0, downIndex = 0;
+ std::string fileName = "";
+};
+
#endif
\ No newline at end of file
diff --git a/include/store/storeEntry.hpp b/include/store/storeEntry.hpp
index 14bd0d8..7f6ebc3 100644
--- a/include/store/storeEntry.hpp
+++ b/include/store/storeEntry.hpp
@@ -1,77 +1,77 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_STORE_ENTRY_HPP
-#define _GHOST_ESHOP_STORE_ENTRY_HPP
-
-#include "meta.hpp"
-#include "store.hpp"
-#include "stringutils.hpp"
-
-class StoreEntry {
-public:
- StoreEntry(const std::unique_ptr &store, const std::unique_ptr &meta, int index);
-
- std::string GetTitle() const { return this->Title; };
- std::string GetAuthor() const { return this->Author; };
- std::string GetDescription() const { return this->Description; };
- std::string GetCategory() const { return this->Category; };
- std::string GetVersion() const { return this->Version; };
- std::string GetConsole() const { return this->Console; };
- std::string GetLastUpdated() const { return this->LastUpdated; };
- std::string GetSize() const { return this->Size; };
- std::string GetAdditionalcontent() const { return this->Additional; };
- int GetMarks() const { return this->Marks; };
-
- C2D_Image GetIcon() const { return this->Icon; };
-
- int GetSheetIndex() const { return this->SheetIndex; };
- int GetEntryIndex() const { return this->EntryIndex; };
-
- std::vector GetCategoryFull() const { return this->FullCategory; };
- std::vector GetConsoleFull() const { return this->FullConsole; };
- std::vector GetSizes() const { return this->Sizes; };
- std::vector GetScreenshots() const { return this->Screenshots; };
- std::vector GetScreenshotNames() const { return this->ScreenshotNames; };
- std::string GetReleaseNotes() const { return this->ReleaseNotes; };
-
- bool GetUpdateAvl() const { return this->UpdateAvailable; };
- void SetUpdateAvl(bool v) { this->UpdateAvailable = v; };
-
- void SetMark(int marks) {
- this->Marks = marks;
- this->MarkString = StringUtils::GetMarkString(this->Marks);
- };
-
-private:
- std::string Title, Author, Description, Category, Version, Console, LastUpdated, Size, MarkString, Additional, ReleaseNotes;
- C2D_Image Icon;
- int SheetIndex, EntryIndex, Marks;
- std::vector FullCategory, FullConsole, Sizes, Screenshots, ScreenshotNames;
- bool UpdateAvailable;
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_STORE_ENTRY_HPP
+#define _DARKSTORE_STORE_ENTRY_HPP
+
+#include "meta.hpp"
+#include "store.hpp"
+#include "stringutils.hpp"
+
+class StoreEntry {
+public:
+ StoreEntry(const std::unique_ptr &store, const std::unique_ptr &meta, int index);
+
+ std::string GetTitle() const { return this->Title; };
+ std::string GetAuthor() const { return this->Author; };
+ std::string GetDescription() const { return this->Description; };
+ std::string GetCategory() const { return this->Category; };
+ std::string GetVersion() const { return this->Version; };
+ std::string GetConsole() const { return this->Console; };
+ std::string GetLastUpdated() const { return this->LastUpdated; };
+ std::string GetSize() const { return this->Size; };
+ std::string GetAdditionalcontent() const { return this->Additional; };
+ int GetMarks() const { return this->Marks; };
+
+ C2D_Image GetIcon() const { return this->Icon; };
+
+ int GetSheetIndex() const { return this->SheetIndex; };
+ int GetEntryIndex() const { return this->EntryIndex; };
+
+ std::vector GetCategoryFull() const { return this->FullCategory; };
+ std::vector GetConsoleFull() const { return this->FullConsole; };
+ std::vector GetSizes() const { return this->Sizes; };
+ std::vector GetScreenshots() const { return this->Screenshots; };
+ std::vector GetScreenshotNames() const { return this->ScreenshotNames; };
+ std::string GetReleaseNotes() const { return this->ReleaseNotes; };
+
+ bool GetUpdateAvl() const { return this->UpdateAvailable; };
+ void SetUpdateAvl(bool v) { this->UpdateAvailable = v; };
+
+ void SetMark(int marks) {
+ this->Marks = marks;
+ this->MarkString = StringUtils::GetMarkString(this->Marks);
+ };
+
+private:
+ std::string Title, Author, Description, Category, Version, Console, LastUpdated, Size, MarkString, Additional, ReleaseNotes;
+ C2D_Image Icon;
+ int SheetIndex, EntryIndex, Marks;
+ std::vector FullCategory, FullConsole, Sizes, Screenshots, ScreenshotNames;
+ bool UpdateAvailable;
+};
+
#endif
\ No newline at end of file
diff --git a/include/store/storeUtils.hpp b/include/store/storeUtils.hpp
index 0293281..e60b071 100644
--- a/include/store/storeUtils.hpp
+++ b/include/store/storeUtils.hpp
@@ -1,111 +1,111 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_STORE_UTILS_HPP
-#define _GHOST_ESHOP_STORE_UTILS_HPP
-
-#include "common.hpp"
-#include "store.hpp"
-#include "storeEntry.hpp"
-#include
-
-enum class SortType : uint8_t {
- TITLE,
- AUTHOR,
- LAST_UPDATED
-};
-
-namespace StoreUtils {
- /* Grille. */
- void DrawGrid(const std::unique_ptr &store, const std::vector> &entries);
- void GridLogic(std::unique_ptr &store, std::vector> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
-
- /* Top Liste. */
- void DrawList(const std::unique_ptr &store, const std::vector> &entries);
- void ListLogic(std::unique_ptr &store, std::vector> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
-
- /* Infos Sur L'Entrée. */
- void DrawEntryInfo(const std::unique_ptr &store, const std::unique_ptr &entry);
- void EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mode, const std::unique_ptr &entry);
-
- /* Menu Latéral. */
- void DrawSideMenu(int currentMenu);
- void SideMenuHandle(int ¤tMenu, bool &fetch, int &lastMenu);
-
- /* Entrées Des Téléchargements. */
- void DrawDownList(const std::unique_ptr &store, const std::vector &entries, bool fetch, const std::unique_ptr &entry, const std::vector &sizes);
- void DownloadHandle(const std::unique_ptr &store, const std::unique_ptr &entry, const std::vector &entries, int ¤tMenu, std::unique_ptr &meta, const int &lastMode, int &smallDelay);
-
- /* Queue System. */
- void DrawQueueMenu(const int queueIndex);
- void QueueMenuHandle(int &queueIndex);
-
- /* Recherche + Menu Favoris. */
- void DrawSearchMenu(const std::vector &searchIncludes, const std::string &searchResult, int marks, bool updateFilter);
- void SearchHandle(std::unique_ptr &store, std::vector> &entries, std::vector &searchIncludes, std::unique_ptr &meta, std::string &searchResult, int &marks, bool &updateFilter, bool ascending, SortType sorttype);
-
- /* Menu Marquer. */
- void DisplayMarkBox(int marks);
- void MarkHandle(std::unique_ptr &entry, const std::unique_ptr &store, bool &showMark, std::unique_ptr &meta);
-
- /* Crédits. */
- void DrawCredits();
-
- /* Screenshot menu. */
- void DrawScreenshotMenu(const C2D_Image &img, const int sIndex, const bool sFetch, const int screenshotSize, const std::string &name, const int zoom, const bool canDisplay);
- void ScreenshotMenu(C2D_Image &img, int &sIndex, bool &sFetch, int &storeMode, const int screenshotSize, int &zoom, bool &canDisplay);
-
- /* Paramètres. */
- void DrawSettings(int page, int selection, int sPos);
- void SettingsHandle(int &page, bool &dspSettings, int &storeMode, int &selection, std::unique_ptr &store, std::vector> &entries, std::unique_ptr &meta, int &sPos);
-
- /* Trie. */
- void DrawSorting(bool asc, SortType st);
- void SortHandle(std::unique_ptr &store, std::vector> &entries, bool &asc, SortType &st);
-
- /* Release Notes. */
- void DrawReleaseNotes(const int &scrollIndex, const std::unique_ptr &entry, const std::unique_ptr &store);
- void ReleaseNotesLogic(int &scrollIndex, int &storeMode);
-
- bool compareTitleDescending(const std::unique_ptr &a, const std::unique_ptr &b);
- bool compareTitleAscending(const std::unique_ptr &a, const std::unique_ptr &b);
-
- bool compareAuthorDescending(const std::unique_ptr &a, const std::unique_ptr &b);
- bool compareAuthorAscending(const std::unique_ptr &a, const std::unique_ptr &b);
-
- bool compareUpdateDescending(const std::unique_ptr &a, const std::unique_ptr &b);
- bool compareUpdateAscending(const std::unique_ptr &a, const std::unique_ptr &b);
-
- void SortEntries(bool Ascending, SortType sorttype, std::vector> &entries);
-
- void search(std::vector> &entries, const std::string &query, bool title, bool author, bool category, bool console, int selectedMarks, bool updateAvl);
-
- void FilterUpdateAvailable(std::vector> &entries);
-
- void ResetAll(const std::unique_ptr &store, const std::unique_ptr &meta, std::vector> &entries);
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_STORE_UTILS_HPP
+#define _DARKSTORE_STORE_UTILS_HPP
+
+#include "common.hpp"
+#include "store.hpp"
+#include "storeEntry.hpp"
+#include
+
+enum class SortType : uint8_t {
+ TITLE,
+ AUTHOR,
+ LAST_UPDATED
+};
+
+namespace StoreUtils {
+ /* Grille. */
+ void DrawGrid(const std::unique_ptr &store, const std::vector> &entries);
+ void GridLogic(std::unique_ptr &store, std::vector> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
+
+ /* Top Liste. */
+ void DrawList(const std::unique_ptr &store, const std::vector> &entries);
+ void ListLogic(std::unique_ptr &store, std::vector> &entries, int ¤tMode, int &lastMode, bool &fetch, int &smallDelay);
+
+ /* Infos Sur L'Entrée. */
+ void DrawEntryInfo(const std::unique_ptr &store, const std::unique_ptr &entry);
+ void EntryHandle(bool &showMark, bool &fetch, bool &sFetch, int &mode, const std::unique_ptr &entry);
+
+ /* Menu Latéral. */
+ void DrawSideMenu(int currentMenu);
+ void SideMenuHandle(int ¤tMenu, bool &fetch, int &lastMenu);
+
+ /* Entrées Des Téléchargements. */
+ void DrawDownList(const std::unique_ptr &store, const std::vector &entries, bool fetch, const std::unique_ptr &entry, const std::vector &sizes);
+ void DownloadHandle(const std::unique_ptr &store, const std::unique_ptr &entry, const std::vector &entries, int ¤tMenu, std::unique_ptr &meta, const int &lastMode, int &smallDelay);
+
+ /* Queue System. */
+ void DrawQueueMenu(const int queueIndex);
+ void QueueMenuHandle(int &queueIndex);
+
+ /* Recherche + Menu Favoris. */
+ void DrawSearchMenu(const std::vector &searchIncludes, const std::string &searchResult, int marks, bool updateFilter);
+ void SearchHandle(std::unique_ptr &store, std::vector> &entries, std::vector &searchIncludes, std::unique_ptr &meta, std::string &searchResult, int &marks, bool &updateFilter, bool ascending, SortType sorttype);
+
+ /* Menu Marquer. */
+ void DisplayMarkBox(int marks);
+ void MarkHandle(std::unique_ptr &entry, const std::unique_ptr &store, bool &showMark, std::unique_ptr &meta);
+
+ /* Crédits. */
+ void DrawCredits();
+
+ /* Screenshot menu. */
+ void DrawScreenshotMenu(const C2D_Image &img, const int sIndex, const bool sFetch, const int screenshotSize, const std::string &name, const int zoom, const bool canDisplay);
+ void ScreenshotMenu(C2D_Image &img, int &sIndex, bool &sFetch, int &storeMode, const int screenshotSize, int &zoom, bool &canDisplay);
+
+ /* Paramètres. */
+ void DrawSettings(int page, int selection, int sPos);
+ void SettingsHandle(int &page, bool &dspSettings, int &storeMode, int &selection, std::unique_ptr &store, std::vector> &entries, std::unique_ptr &meta, int &sPos);
+
+ /* Trie. */
+ void DrawSorting(bool asc, SortType st);
+ void SortHandle(std::unique_ptr &store, std::vector> &entries, bool &asc, SortType &st);
+
+ /* Release Notes. */
+ void DrawReleaseNotes(const int &scrollIndex, const std::unique_ptr &entry, const std::unique_ptr &store);
+ void ReleaseNotesLogic(int &scrollIndex, int &storeMode);
+
+ bool compareTitleDescending(const std::unique_ptr &a, const std::unique_ptr &b);
+ bool compareTitleAscending(const std::unique_ptr &a, const std::unique_ptr &b);
+
+ bool compareAuthorDescending(const std::unique_ptr &a, const std::unique_ptr &b);
+ bool compareAuthorAscending(const std::unique_ptr &a, const std::unique_ptr &b);
+
+ bool compareUpdateDescending(const std::unique_ptr &a, const std::unique_ptr &b);
+ bool compareUpdateAscending(const std::unique_ptr &a, const std::unique_ptr &b);
+
+ void SortEntries(bool Ascending, SortType sorttype, std::vector> &entries);
+
+ void search(std::vector> &entries, const std::string &query, bool title, bool author, bool category, bool console, int selectedMarks, bool updateAvl);
+
+ void FilterUpdateAvailable(std::vector> &entries);
+
+ void ResetAll(const std::unique_ptr &store, const std::unique_ptr &meta, std::vector> &entries);
+};
+
#endif
\ No newline at end of file
diff --git a/include/utils/animation.hpp b/include/utils/animation.hpp
index 819564d..d585675 100644
--- a/include/utils/animation.hpp
+++ b/include/utils/animation.hpp
@@ -1,48 +1,48 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_ANIMATION_HPP
-#define _GHOST_ESHOP_ANIMATION_HPP
-
-#include <3ds.h>
-#include
-
-enum class ProgressBar {
- Downloading,
- Extracting,
- Installing,
- Copying
-};
-
-namespace Animation {
- void DrawProgressBar(u64 currentProgress, u64 totalProgress);
- void displayProgressBar();
-
- void DrawQueue(int x, int y);
- void QueueAnimHandle();
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_ANIMATION_HPP
+#define _DARKSTORE_ANIMATION_HPP
+
+#include <3ds.h>
+#include
+
+enum class ProgressBar {
+ Downloading,
+ Extracting,
+ Installing,
+ Copying
+};
+
+namespace Animation {
+ void DrawProgressBar(u64 currentProgress, u64 totalProgress);
+ void displayProgressBar();
+
+ void DrawQueue(int x, int y);
+ void QueueAnimHandle();
+};
+
#endif
\ No newline at end of file
diff --git a/include/utils/argumentParser.hpp b/include/utils/argumentParser.hpp
index 47f663f..6132045 100644
--- a/include/utils/argumentParser.hpp
+++ b/include/utils/argumentParser.hpp
@@ -1,47 +1,47 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_ARGUMENT_PARSER_HPP
-#define _GHOST_ESHOP_ARGUMENT_PARSER_HPP
-
-#include "json.hpp"
-#include "store.hpp"
-#include
-
-class ArgumentParser {
-public:
- ArgumentParser(const std::string &file, const std::string &entry, int dlIndex);
- void Load();
- void Execute();
- bool GetValid() const { return this->isValid; };
-private:
- std::unique_ptr store = nullptr;
- bool isValid = false;
- std::string file = "", executeEntry = "", entry = "";
- int dlIndex = -1, entryIndex = -1;
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_ARGUMENT_PARSER_HPP
+#define _DARKSTORE_ARGUMENT_PARSER_HPP
+
+#include "json.hpp"
+#include "store.hpp"
+#include
+
+class ArgumentParser {
+public:
+ ArgumentParser(const std::string &file, const std::string &entry, int dlIndex);
+ void Load();
+ void Execute();
+ bool GetValid() const { return this->isValid; };
+private:
+ std::unique_ptr store = nullptr;
+ bool isValid = false;
+ std::string file = "", executeEntry = "", entry = "";
+ int dlIndex = -1, entryIndex = -1;
+};
+
#endif
\ No newline at end of file
diff --git a/include/utils/cia.hpp b/include/utils/cia.hpp
index 4381f9a..ff7eff9 100644
--- a/include/utils/cia.hpp
+++ b/include/utils/cia.hpp
@@ -1,40 +1,40 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_CIA_HPP
-#define _GHOST_ESHOP_CIA_HPP
-
-#include "common.hpp"
-
-#include <3ds.h>
-
-namespace Title {
- Result Launch(u64 titleId, FS_MediaType mediaType);
- Result DeletePrevious(u64 titleid, FS_MediaType media);
- Result Install(const char *ciaPath, bool updateSelf);
-};
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_CIA_HPP
+#define _DARKSTORE_CIA_HPP
+
+#include "common.hpp"
+
+#include <3ds.h>
+
+namespace Title {
+ Result Launch(u64 titleId, FS_MediaType mediaType);
+ Result DeletePrevious(u64 titleid, FS_MediaType media);
+ Result Install(const char *ciaPath, bool updateSelf);
+};
+
#endif
\ No newline at end of file
diff --git a/include/utils/config.hpp b/include/utils/config.hpp
index ea1454e..a8b14ab 100644
--- a/include/utils/config.hpp
+++ b/include/utils/config.hpp
@@ -1,110 +1,110 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_CONFIG_HPP
-#define _GHOST_ESHOP_CONFIG_HPP
-
-#include "json.hpp"
-
-#include <3ds.h>
-#include
-
-class Config {
-public:
- Config();
- void save();
- void initialize();
- void sysLang();
-
- /* Language. */
- std::string language() const { return this->v_language; };
- void language(const std::string &v) { this->v_language = v; if (!this->changesMade) this->changesMade = true; };
-
- /* Dernier Magasin. */
- std::string lastStore() const { return this->v_lastStore; };
- void lastStore(const std::string &v) { this->v_lastStore = v; if (!this->changesMade) this->changesMade = true; };
-
- /* Utilisation De La Liste Supérieure. */
- bool list() const { return this->v_list; };
- void list(bool v) { this->v_list = v; if (!this->changesMade) this->changesMade = true; };
-
- /* Mise à Jour Automatique Au Démarrage. */
- bool autoupdate() const { return this->v_autoUpdate; };
- void autoupdate(bool v) { this->v_autoUpdate = v; if (!this->changesMade) this->changesMade = true; };
-
- std::string _3dsxPath() const { return this->v_3dsxPath; };
- void _3dsxPath(const std::string &v) { this->v_3dsxPath = v; if (!this->changesMade) this->changesMade = true; };
-
- std::string ndsPath() const { return this->v_ndsPath; };
- void ndsPath(const std::string &v) { this->v_ndsPath = v; if (!this->changesMade) this->changesMade = true; };
-
- std::string archPath() const { return this->v_archivePath; };
- void archPath(const std::string &v) { this->v_archivePath = v; if (!this->changesMade) this->changesMade = true; };
-
- /* Récupération d'anciennes métadonnées. */
- bool metadata() const { return this->v_metadata; };
- void metadata(bool v) { this->v_metadata = v; if (!this->changesMade) this->changesMade = true; };
-
- /* Vérification des Mises à Jour de DarkStore au Démarrage. */
- bool updatecheck() const { return this->v_updateCheck; };
- void updatecheck(bool v) { this->v_updateCheck = v; if (!this->changesMade) this->changesMade = true; };
-
- /* Vérification des Mises à Jour de DarkStore au Démarrage. */
- bool usebg() const { return this->v_showBg; };
- void usebg(bool v) { this->v_showBg = v; if (!this->changesMade) this->changesMade = true; };
-
- /* Si vous utilisez une police personnalisée. */
- bool customfont() const { return this->v_customFont; };
- void customfont(bool v) { this->v_customFont = v; if (!this->changesMade) this->changesMade = true; };
-
- /* Le chemin du raccourci. */
- std::string shortcut() const { return this->v_shortcutPath; };
- void shortcut(const std::string &v) { this->v_shortcutPath = v; if (!this->changesMade) this->changesMade = true; };
-
- /* If displaying changelog. */
- bool changelog() const { return this->v_changelog; };
- void changelog(bool v) { this->v_changelog = v; if (!this->changesMade) this->changesMade = true; };
-private:
- /* Principalement aide. */
- bool getBool(const std::string &key);
- void setBool(const std::string &key, bool v);
- int getInt(const std::string &key);
- void setInt(const std::string &key, int v);
- std::string getString(const std::string &key);
- void setString(const std::string &key, const std::string &v);
-
- nlohmann::json json;
- bool changesMade = false;
-
- std::string v_language = "en", v_lastStore = "darkstore-homebrew.eshop",
- v_3dsxPath = "sdmc:/3ds", v_ndsPath = "sdmc:", v_archivePath = "sdmc:",
- v_shortcutPath = "sdmc:/3ds/DarkStore/shortcuts";
-
- bool v_list = false, v_autoUpdate = true, v_metadata = true, v_updateCheck = true,
- v_showBg = false, v_customFont = false, v_changelog = true;
-};
-
-#endif
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_CONFIG_HPP
+#define _DARKSTORE_CONFIG_HPP
+
+#include "json.hpp"
+
+#include <3ds.h>
+#include
+
+class Config {
+public:
+ Config();
+ void save();
+ void initialize();
+ void sysLang();
+
+ /* Language. */
+ std::string language() const { return this->v_language; };
+ void language(const std::string &v) { this->v_language = v; if (!this->changesMade) this->changesMade = true; };
+
+ /* Dernier Magasin. */
+ std::string lastStore() const { return this->v_lastStore; };
+ void lastStore(const std::string &v) { this->v_lastStore = v; if (!this->changesMade) this->changesMade = true; };
+
+ /* Utilisation De La Liste Supérieure. */
+ bool list() const { return this->v_list; };
+ void list(bool v) { this->v_list = v; if (!this->changesMade) this->changesMade = true; };
+
+ /* Mise à Jour Automatique Au Démarrage. */
+ bool autoupdate() const { return this->v_autoUpdate; };
+ void autoupdate(bool v) { this->v_autoUpdate = v; if (!this->changesMade) this->changesMade = true; };
+
+ std::string _3dsxPath() const { return this->v_3dsxPath; };
+ void _3dsxPath(const std::string &v) { this->v_3dsxPath = v; if (!this->changesMade) this->changesMade = true; };
+
+ std::string ndsPath() const { return this->v_ndsPath; };
+ void ndsPath(const std::string &v) { this->v_ndsPath = v; if (!this->changesMade) this->changesMade = true; };
+
+ std::string archPath() const { return this->v_archivePath; };
+ void archPath(const std::string &v) { this->v_archivePath = v; if (!this->changesMade) this->changesMade = true; };
+
+ /* Récupération d'anciennes métadonnées. */
+ bool metadata() const { return this->v_metadata; };
+ void metadata(bool v) { this->v_metadata = v; if (!this->changesMade) this->changesMade = true; };
+
+ /* Vérification des Mises à Jour de DarkStore au Démarrage. */
+ bool updatecheck() const { return this->v_updateCheck; };
+ void updatecheck(bool v) { this->v_updateCheck = v; if (!this->changesMade) this->changesMade = true; };
+
+ /* Vérification des Mises à Jour de DarkStore au Démarrage. */
+ bool usebg() const { return this->v_showBg; };
+ void usebg(bool v) { this->v_showBg = v; if (!this->changesMade) this->changesMade = true; };
+
+ /* Si vous utilisez une police personnalisée. */
+ bool customfont() const { return this->v_customFont; };
+ void customfont(bool v) { this->v_customFont = v; if (!this->changesMade) this->changesMade = true; };
+
+ /* Le chemin du raccourci. */
+ std::string shortcut() const { return this->v_shortcutPath; };
+ void shortcut(const std::string &v) { this->v_shortcutPath = v; if (!this->changesMade) this->changesMade = true; };
+
+ /* If displaying changelog. */
+ bool changelog() const { return this->v_changelog; };
+ void changelog(bool v) { this->v_changelog = v; if (!this->changesMade) this->changesMade = true; };
+private:
+ /* Principalement aide. */
+ bool getBool(const std::string &key);
+ void setBool(const std::string &key, bool v);
+ int getInt(const std::string &key);
+ void setInt(const std::string &key, int v);
+ std::string getString(const std::string &key);
+ void setString(const std::string &key, const std::string &v);
+
+ nlohmann::json json;
+ bool changesMade = false;
+
+ std::string v_language = "en", v_lastStore = "darkstore-homebrew.eshop",
+ v_3dsxPath = "sdmc:/3ds", v_ndsPath = "sdmc:", v_archivePath = "sdmc:",
+ v_shortcutPath = "sdmc:/3ds/DarkStore/shortcuts";
+
+ bool v_list = false, v_autoUpdate = true, v_metadata = true, v_updateCheck = true,
+ v_showBg = false, v_customFont = false, v_changelog = true;
+};
+
+#endif
diff --git a/include/utils/download.hpp b/include/utils/download.hpp
index b2912aa..4f84e1f 100644
--- a/include/utils/download.hpp
+++ b/include/utils/download.hpp
@@ -1,90 +1,90 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_DOWNLOAD_HPP
-#define _GHOST_ESHOP_DOWNLOAD_HPP
-
-#include "common.hpp"
-
-#define APP_TITLE "DarkStore"
-#define VERSION_STRING "12.0"
-
-enum DownloadError {
- DL_ERROR_NONE = 0,
- DL_ERROR_WRITEFILE,
- DL_ERROR_ALLOC,
- DL_ERROR_STATUSCODE,
- DL_ERROR_GIT,
- DL_CANCEL, // Aucune idée si c’est nécessaire.
-};
-
-struct StoreList {
- std::string Title;
- std::string Author;
- std::string URL;
- std::string Description;
-};
-
-struct DSUpdate {
- bool Available = false;
- std::string Notes = "";
- std::string Version = "";
-};
-
-Result downloadToFile(const std::string &url, const std::string &path);
-Result downloadFromRelease(const std::string &url, const std::string &asset, const std::string &path, bool includePrereleases);
-
-/*
- Vérifiez l’état du Wi-Fi.
- @return True si le Wi-Fi est connecté ; false si non.
-*/
-bool checkWifiStatus(void);
-
-/*
- Afficher "Veuillez vous connecter au Wi-Fi" pour 2s.
-*/
-void notConnectedMsg(void);
-
-/*
- Affiche "Not Implemented Yet" pour 2s.
-*/
-void notImplemented(void);
-
-/*
- Afficher le msg done.
-*/
-void doneMsg(void);
-
-bool IsUpdateAvailable(const std::string &URL, int revCurrent);
-bool DownloadEshop(const std::string &URL, int currentRev, std::string &fl, bool isDownload = false, bool isUDB = false);
-bool DownloadSpriteSheet(const std::string &URL, const std::string &file);
-DSUpdate IsDSUpdateAvailable();
-void UpdateAction();
-std::vector FetchStores();
-C2D_Image FetchScreenshot(const std::string &URL);
-std::string GetChangelog();
-
-#endif
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_DOWNLOAD_HPP
+#define _DARKSTORE_DOWNLOAD_HPP
+
+#include "common.hpp"
+
+#define APP_TITLE "DarkStore"
+#define VERSION_STRING "12.0"
+
+enum DownloadError {
+ DL_ERROR_NONE = 0,
+ DL_ERROR_WRITEFILE,
+ DL_ERROR_ALLOC,
+ DL_ERROR_STATUSCODE,
+ DL_ERROR_GIT,
+ DL_CANCEL, // Aucune idée si c’est nécessaire.
+};
+
+struct StoreList {
+ std::string Title;
+ std::string Author;
+ std::string URL;
+ std::string Description;
+};
+
+struct DSUpdate {
+ bool Available = false;
+ std::string Notes = "";
+ std::string Version = "";
+};
+
+Result downloadToFile(const std::string &url, const std::string &path);
+Result downloadFromRelease(const std::string &url, const std::string &asset, const std::string &path, bool includePrereleases);
+
+/*
+ Vérifiez l’état du Wi-Fi.
+ @return True si le Wi-Fi est connecté ; false si non.
+*/
+bool checkWifiStatus(void);
+
+/*
+ Afficher "Veuillez vous connecter au Wi-Fi" pour 2s.
+*/
+void notConnectedMsg(void);
+
+/*
+ Affiche "Not Implemented Yet" pour 2s.
+*/
+void notImplemented(void);
+
+/*
+ Afficher le msg done.
+*/
+void doneMsg(void);
+
+bool IsUpdateAvailable(const std::string &URL, int revCurrent);
+bool DownloadEshop(const std::string &URL, int currentRev, std::string &fl, bool isDownload = false, bool isUDB = false);
+bool DownloadSpriteSheet(const std::string &URL, const std::string &file);
+DSUpdate IsDSUpdateAvailable();
+void UpdateAction();
+std::vector FetchStores();
+C2D_Image FetchScreenshot(const std::string &URL);
+std::string GetChangelog();
+
+#endif
diff --git a/include/utils/extract.hpp b/include/utils/extract.hpp
index cc1e916..df9c00b 100644
--- a/include/utils/extract.hpp
+++ b/include/utils/extract.hpp
@@ -1,46 +1,46 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_EXTRACT_HPP
-#define _GHOST_ESHOP_EXTRACT_HPP
-
-#include "common.hpp"
-
-enum ExtractError {
- EXTRACT_ERROR_NONE = 0,
- EXTRACT_ERROR_ARCHIVE,
- EXTRACT_ERROR_ALLOC,
- EXTRACT_ERROR_FIND,
- EXTRACT_ERROR_READFILE,
- EXTRACT_ERROR_OPENFILE,
- EXTRACT_ERROR_WRITEFILE,
-};
-
-Result getExtractedSize(const std::string &archivePath, const std::string &wantedFile);
-
-Result extractArchive(const std::string &archivePath, const std::string &wantedFile, const std::string &outputPath);
-
+/*
+* This file is part of Universal-Updater
+* Copyright (C) 2019-2020 Universal-Team
+*
+* 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 .
+*
+* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
+* * Requiring preservation of specified reasonable legal notices or
+* author attributions in that material or in the Appropriate Legal
+* Notices displayed by works containing it.
+* * 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.
+*/
+
+#ifndef _DARKSTORE_EXTRACT_HPP
+#define _DARKSTORE_EXTRACT_HPP
+
+#include "common.hpp"
+
+enum ExtractError {
+ EXTRACT_ERROR_NONE = 0,
+ EXTRACT_ERROR_ARCHIVE,
+ EXTRACT_ERROR_ALLOC,
+ EXTRACT_ERROR_FIND,
+ EXTRACT_ERROR_READFILE,
+ EXTRACT_ERROR_OPENFILE,
+ EXTRACT_ERROR_WRITEFILE,
+};
+
+Result getExtractedSize(const std::string &archivePath, const std::string &wantedFile);
+
+Result extractArchive(const std::string &archivePath, const std::string &wantedFile, const std::string &outputPath);
+
#endif
\ No newline at end of file
diff --git a/include/utils/fileBrowse.hpp b/include/utils/fileBrowse.hpp
index c4daea7..8e81db0 100644
--- a/include/utils/fileBrowse.hpp
+++ b/include/utils/fileBrowse.hpp
@@ -1,66 +1,66 @@
-/*
-* This file is part of Universal-Updater
-* Copyright (C) 2019-2020 Universal-Team
-*
-* 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 .
-*
-* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
-* * Requiring preservation of specified reasonable legal notices or
-* author attributions in that material or in the Appropriate Legal
-* Notices displayed by works containing it.
-* * 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.
-*/
-
-#ifndef _GHOST_ESHOP_FILE_BROWSE_HPP
-#define _GHOST_ESHOP_FILE_BROWSE_HPP
-
-#include
-#include
-#include