Compare commits

..

No commits in common. "1746c4ee569b722ee5b966795f340199bcbc8117" and "af79bb42d7fc90f1a954552b174964228326cae7" have entirely different histories.

275 changed files with 7607 additions and 837 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 KiB

235
LICENSE Normal file
View File

@ -0,0 +1,235 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are 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.
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.
Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.
A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.
The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.
An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.
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 Affero 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. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.
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 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 work with which it is combined will remain governed by version 3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU Affero 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 Affero 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 Affero 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 Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements.
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 AGPL, see <http://www.gnu.org/licenses/>.

BIN
LogWindow.dat Normal file

Binary file not shown.

35
README.md Normal file
View File

@ -0,0 +1,35 @@
# ScarletBlackMarket
Repository for Kevinmonitor and co.'s Touhou Station Jam 3 game.
Available attacks:
+ Remilia Nonspell 1
+ Remilia Nonspell 2
+ Remilia Spell 2 (Patchouli Card)
+ Remilia Spell 3 (Sakuya Card)
How to install & play available attacks:
+ Install all files in this repo.
+ Open either th_dnh_ph3sx.exe or th_dnh_ph3sx_legacy.exe (if you cannot open the latter)
+ Select "Single" in the Menu.
+ Remilia's attacks have all been titled properly. Other scripts in the list are placeholders or engine samples.
+ Select "Chimata" as the player. Other scripts in the list are placeholders or engine samples.
How to change the difficulty of the attacks:
+ Open the repo and navigate to script/game.
+ Select the attack you want to change the difficulty of. (Non1, Non2, etc.)
+ Open the .dnh file in a text editor (preferably Notepad++ since that's also what I use to code)
+ Search for the @Initialize section. (should be around lines 50-70 depending on attack)
+ Find the "difficultySelect = 0; // debug" line.
+ Change 0 to the difficulty you want to play:
0: Normal
1: Hyper/Hard
2: Unparalleled/Lunatic
NOTE THAT LUNATIC IS STILL NOT BALANCED OR PROPERLY TESTED, AND WILL NOT BE IN THE INITIAL JAM VERSION.
+ Save the file and re-open the attack.

BIN
config.dat Normal file

Binary file not shown.

BIN
config_ph3sx.exe Normal file

Binary file not shown.

550
docs/Change Log.txt Normal file
View File

@ -0,0 +1,550 @@
A mostly-complete history log of engine updates can be found here.
1.32b
Changes:
- All functions and actions that change a shot's graphic ID has an additional feature:
- The actual graphic ID will be the absolute value of the value received.
- If the value received was negative, the graphic change operation will preserve the shot's previous spin angular velocity and Z-angle.
- Affected functions and actions:
- ObjShot_SetGraphic
- ObjMove_AddPatternA3
- ObjMove_AddPatternA4
- ObjMove_AddPatternB3
- ObjMove_AddPatternC3
- ObjMove_AddPatternC4
- TRANSFORM_GRAPHIC_CHANGE
Additions:
- Added an instruction on how to get ph3sx to work with Wine. (Check readme.txt)
- Added SetIntersectionVisualizationRenderPriority.
Bug fixes:
- Fixed incorrect documentation for some functions.
- Fixed AddPoint not working correctly.
- Fixed some issues with acceleration and max speed when converting from B-movement to A-movement or C-movement with AddPattern.
1.32a
Changes:
- Renamed "real" to "float".
- r (number suffix) -> f (number suffix)
- 45.22r -> 45.22f
- real -> float
- as_real -> as_float
- as_real_array -> as_float_array
- VAR_REAL -> VAR_FLOAT
- Changed how setting curvy laser node widths work. Instead of directly setting the width, the functions will set the nodes' width scales.
- Renamed ObjCrLaser_SetNodeWidth to ObjCrLaser_SetNodeWidthScale.
- Renamed ObjCrLaser_GetNodeWidth to ObjCrLaser_GetNodeWidthScale.
- Improved cross-compatibility between different movement types of the following functions:
- ObjMove_SetSpeed
- ObjMove_SetAngle
- ObjMove_SetAcceleration
- ObjMove_SetMaxSpeed
- ObjMove_SetAngularVelocity
- Swapped the "shot graphic ID" and "target ID" arguments in ObjMove_AddPatternA4.
- Swapped the "max speed" and "angular velocity" arguments of the following functions:
- ObjMove_AddPatternA2
- ObjMove_AddPatternA3
- ObjMove_AddPatternA4
- TRANSFORM_ADDPATTERN_A2 in ObjPatternShot transforms
- Completely removed shot scripts.
- Moved SetShotDeleteEventEnable to the stage script.
- Default values for all three delete events are true.
- Furthermore, fixed EV_DELETE_SHOT_IMMEDIATE and EV_DELETE_SHOT_FADE not being notified properly.
- Restructed event arguments of EV_DELETE_SHOT_TO_ITEM.
- The third event argument; "player collision", has been removed.
- Collision with the player will now trigger EV_DELETE_SHOT_IMMEDIATE instead of EV_DELETE_SHOT_TO_ITEM.
- Increased the minimum width for straight and curve lasers, primarily for delay visibility purposes. (Thanks to Naudiz)
- Allowed lasers to lose penetration (life) points. (Thanks to Naudiz)
- Like with any shot object, this will only occur when a laser lacks spell resistance (which it has by default).
- Removed #BGM.
- Made it so that the window sizes list will be autogenerated instead of defaulting to [640x480, 800x600, 960x720, 1280x960] when window.size.list in th_dnh.def doesn't exist.
- Size multipliers are [x1, x1.25, x1.5, x2], with screen.width and screen.height being the base resolution.
- Made it so that the engine will check for the required .dll modules during initialization.
- d3d9.dll
- d3dx9_43.dll
- d3dcompiler_43.dll
- dinput8.dll
- dsound.dll
- In the event where the Direct3D device enters a lost state, the engine will now attempt to restore up to 60 times before throwing an error, rather than only once.
- Removed ObjItem_SetAutoCollectEnable, and replaced it with ObjItem_SetAutoCollectEnableFlags.
Additions:
- Added Interpolate_X_Array, Interpolate_X_Angle, and Interpolate_X_AngleR. (Thanks to Naudiz)
- Added ObjShot_SetEnemyIntersectionInvalidFrame and ObjShot_SetPenetrateShotEnable. (Thanks to Naudiz)
- Added SetShotTextureFilter, SetItemTextureFilter, ObjRender_SetTextureFilter, and ObjShot_SetAngleRounding. (Thanks to Naudiz)
- Added SetEnemyAutoDeleteClip, ObjEnemy_SetAutoDelete, and ObjEnemy_SetDeleteFrame. (Thanks to NicholasLogan)
- Added ObjMove_SetAngularAcceleration, ObjMove_SetAngularMaxVelocity, and ObjMove_AddPatternA5. (Thanks to NicholasLogan)
- Added an overload to CreateShotA2, adding an angular velocity argument in between the acceleration and max speed ones. (Thanks to Naudiz)
- Added ObjMove_GetMovementType. (Thanks to Naudiz)
- Added constants:
- MOVE_NONE
- MOVE_ANGLE
- MOVE_XY
- MOVE_XY_ANGLE
- MOVE_LINE
- Added the C-movement type for ObjMove. (Thanks to Naudiz)
- CreateShotC1
- CreateShotC2
- CreateShotOC1
- ObjMove_AddPatternC1
- ObjMove_AddPatternC2
- ObjMove_AddPatternC3
- Added AddPattern functions for line-movement. (Thanks to Naudiz)
- ObjMove_AddPatternD1 (AddPattern version of ObjMove_SetDestAtSpeed)
- ObjMove_AddPatternD2 (AddPattern version of ObjMove_SetDestAtFrame)
- ObjMove_AddPatternD3 (AddPattern version of ObjMove_SetDestAtWeight)
- Added ObjMove_CancelMovement.
- Added new transformations to pattern shot objects. (Thanks to Naudiz)
- TRANSFORM_ADDPATTERN_C1
- TRANSFORM_ADDPATTERN_C2
- Added psrand.
- Added array overloads to the following functions:
- ObjSprite2D_SetSourceRect
- ObjSprite2D_SetDestRect
- ObjSpriteList2D_SetSourceRect
- ObjSpriteList2D_SetDestRect
- ObjSprite3D_SetSourceRect
- ObjSprite3D_SetDestRect
- ObjSprite3D_SetSourceDestRect
- Added support for hexadecimal numbers in text color tags.
- "[f tc=0xffffff]" is equivalent to "[f tc=(255,255,255)]".
- Added GetWorkingDirectory.
- Added an option to allow the engine to keep running while the window is unfocused. (Thanks to Naudiz)
- Added SetEnableUnfocusedProcessing and IsWindowFocused.
- Added the property "unfocused.processing" to th_dnh.def.
- Added EV_APP_LOSE_FOCUS and EV_APP_RESTORE_FOCUS.
- Added exponent format for numbers.
- "5.462e3" or "-231.9e-2" are now valid numbers.
- Added ObjItem_SetAutoCollectEnableFlags.
- ITEM_AUTOCOLLECT_PLAYER_SCOPE
- ITEM_AUTOCOLLECT_COLLECT_ALL
- ITEM_AUTOCOLLECT_POC_LINE
- ITEM_AUTOCOLLECT_COLLECT_CIRCLE
- ITEM_AUTOCOLLECT_ALL
- Added an overload to atoi.
- Added SetScore, SetGraze, and SetPoint.
Bug fixes:
- Fixed .dat archives not working.
- Fixed incorrect null checks, resulting in the game crashing when trying to operate on a null value.
- For example, using Obj_GetValue on a non-existent key will yield a null value.
- Fixed a crash bug which may sometimes happen when trying to parse a script file that ends with a line comment.
- Fixed ObjMove_AddPatternXX's shot graphic change not working with loose and curvy lasers.
- Fixed SetShotIntersectionCircle/Line not registering intersection, despite showing up in intersection visualization.
1.31b
Bug fixes:
- Fixed a bug where the game would freeze when compiling a script with a syntax error.
- Fixed a minor visual bug where the LogWindow's sub-info fields would all try to display over each other on initialization.
1.31a
Changes:
- This version breaks replay, common data, and .dat archive backwards compatibility.
- Replaced the default script select backgrounds with a radder version. (Thanks to Naudiz)
- Renamed GetShotIdAll to GetAllShotID.
- Changed the text representation of script value types in error messages.
- "real-array-array" -> "real[][]"
- Script matrix functions can now take in a 4x4 array instead of only a 1x16 array previously.
- The element type is also no longer limited to real.
- Made setting ObjRender_SetEnableDefaultTransformMatrix to false still load the camera matrix.
- Allowed multiple ObjSounds to independently stream the same sound file.
- Shortened the module directory in Log messages of the LogWindow to "../".
- Removed the behaviour where the 2D and 3D camera resets upon transitioning from the package scene to the stage scene.
- Fog data is no longer split between package-level and stage-level scripts.
- The default FPS counter no longer briefly appears when starting with package.script.main.
- Maximizing the window now triggers fullscreen mode.
- Objects now have separate tables each for string-indexed and int-indexed.
- Improved support for particle list objects for older PCs.
- Made it so that curvy lasers can be shortened. (Thanks to Naudiz)
- ObjFileT_SplitLineText now splits from pattern rather than from a list of delimiters.
- Reduced the float truncation epsilon. (0.01 -> 0.000001)
- #include in shader source files now behaves like regular script includes.
- Normal shot objects can now have multiple hitboxes again.
- Change loose and curvy lasers behaviour when delay motion is enabled. (Thanks to Naudiz)
- Text objects can now be centered around their object positions. No need to use ObjText_SetMaxWidth for that anymore. (Thanks to Naudiz)
Additions:
- Added missing function documentation for GetAllEnemyID.
- Added an overload each for Rotate2D and Rotate3D, taking in the rotation origin point.
- Expanded the variety of intersection-checking functions:
- IsIntersected_Point_Polygon
- IsIntersected_Point_Circle
- IsIntersected_Point_Ellipse
- IsIntersected_Point_Line
- IsIntersected_Point_RegularPolygon
- IsIntersected_Circle_Polygon
- IsIntersected_Circle_Circle
- IsIntersected_Circle_Ellipse
- IsIntersected_Circle_RegularPolygon
- IsIntersected_Line_Polygon
- IsIntersected_Line_Circle
- IsIntersected_Line_Ellipse
- IsIntersected_Line_Line
- IsIntersected_Line_RegularPolygon
- IsIntersected_Polygon_Polygon
- IsIntersected_Polygon_Ellipse
- IsIntersected_Polygon_RegularPolygon
- Added ReflectAngle and ReflectAngleR. (Thanks to Naudiz)
- Added Python-style reverse indexing of arrays. (Thanks to Naudiz)
- See "New Scripting Features".
- arr[-n] is equivalent to arr[length(arr) - n]
- Also works in erase and insert.
- Added replace and remove. (Thanks to Naudiz)
- #ifdef, #ifndef, #else, and #endif preprocessor directives for scripts.
- Several script macros were added:
- _DNH_PH3SX_
- SCRIPT_PACKAGE (defined in package-level scripts)
- SCRIPT_STAGE (defined in stage-level scripts)
- #define is not yet supported.
- Added ObjItem_GetIntersectionEnable. (Thanks to Naudiz)
- Added ObjRender_GetColorHex, ObjPrim_GetVertexColorHex, and ObjCrLaser_GetNodeColorHex. (Thanks to Naudiz)
- Added ColorHexRGBtoHSV.
- Added another event argument to EV_DELETE_SHOT_PLAYER.
- Added a "Sound Memory" display to the Sound tab of the LogWindow.
- Added INFO_IS_REQUIRE_ALL_DOWN to ObjEnemyBossScene_GetInfo. (Thanks to Naudiz)
- Added ObjEnemy_SetMaximumDamage and ObjEnemy_AddLifeEx.
- Added INFO_DAMAGE_PREVIOUS_FRAME to ObjEnemy_GetInfo.
- Added ObjText_SetFixedWidth.
- Added ObjText_GetText. (Thanks to Naudiz)
- Added ObjText_SetVerticalAlignment. (Thanks to Naudiz)
- Added ObjCrLaser_SetTipCapping, ObjCrLaser_GetNodeRenderWidth, and ObjCrLaser_SetNodeRenderWidth. (Thanks to Naudiz)
- Added overloads to ObjCrLaser_SetNode and ObjCrLaser_AddNode. (Thanks to Naudiz)
- Added ObjShot_SetFixedAngle and ObjShot_SetDelayAngularVelocity. (Thanks to Naudiz)
- Added SplitString2.
- Added Obj_GetValueCount and Obj_GetValueCountI.
- Added a progress bar to the FileArchiver.
- Added an overload to SetStgFrame. (Thanks to Naudiz)
- Added GetConfigVirtualKeyMapping and GetVirtualKeyMapping. (Thanks to Naudiz)
Bug fixes:
- Fixed incorrect documentation of IsIntersected_Circle_RegularPolygon.
- Fixed the Y shot intersection scale not functioning properly on loose lasers.
- Fixed the engine crashing upon trying to parse an excess comma in function parameter lists.
- Fixed type-checking bugs with array-index-assignment operations.
- Fixed an issue where the parser would indefinitely hang upon trying to parse an ill-formed for-loop.
- Fixed a bug where .wav files over 1MB large would get cut off at the end.
- Fixed a bug where multiple streaming ObjSounds playing the same file would not function correctly.
- Fixed ObjSound_IsPlaying returning false if called in the same frame of ObjSound_Play.
- Fixed a bug where shot objects colliding with the player gets deleted before EV_HIT is notified.
- Fixed GetShotIdInCircleA1 incorrectly returning player shot IDs instead of enemy shot IDs.
- Fixed ObjShot_Regist in a player script returning null if IsPermitPlayerShot is true.
- Fixed a bug where the shot object colliding with the player is deleted before the notification of EV_HIT.
- Fixed off-centered shot and item graphics.
- Fixed the game crashing upon trying to parse an ill-formed argument list in user shot/item data files.
- Fixed a bug where 3D render objects drawn below the min STG frame render priority would get abnormally stretched out.
- Fixed ObjMove_GetSpeedX/Y returning incorrect values for ObjMove_SetDestAtXXX functions.
- Fixed the game crashing when setting ObjRender_SetEnableDefaultTransformMatrix to false for 3D objects.
- Fixed incorrect conversion of A-movement to B-movement for ObjMove.
- Fixed CreateItemU1/2 causing the created item to render at (0, 0) for a single frame. (Thanks to Naudiz)
- Fixed ObjMove_AddPatternXX not working on move objects that do not have an existing movement pattern. (Thanks to Naudiz)
- Fixed a rare bug with array initialization.
- Fixed a bug where ObjShot_SetPenetration(obj, 0) would not notify EV_DELETE_SHOT_PLAYER.
- Fixed a rare crash during enemy boss scene loading.
- Fixed a bug where the game would freeze when trying to restart the stage scene in a package script while an enemy boss scene hasn't finished loading.
- Fixed a rare crash with script object deletion.
1.30a:
Changes:
- Greatly improved the speed of the script code interpreter.
- Made the maximum sizes of render targets respect the Direct3D device capabilities.
- EV_REQUEST_LIFE now accepts all types of values (will be converted to reals).
- In case that an array was passed (multiple bosses), each elements will also be converted to reals.
- Direct3D device capabilities will now be checked at the start, and the user will be notified if they are insufficient to run the engine.
- Changed the default render priority of items to 40. (Previously 60, what the fuck mkm)
- Changed the behaviour of resource pre-loading. (LoadTexture, LoadMesh, etc.)
- Loaded resources are no longer script-dependent, they will remain loaded even if the script that loaded them has been closed.
- Changed the arguments of ObjPatternShot_AddTransform/ObjPatternShot_SetTransform.
- Additionally, the above two functions now take in varargs.
- Improved GetObjectDistance.
- Introduced the ability to use StartScript a second time without having to use LoadScript again.
- Renamed ObjSound_SetRestartEnable to ObjSound_SetResumeEnable.
- Usage unchanged.
- Rearranged the arguments of ObjPatternShot_Add/SetTransform.
- ObjFile_Store now use the source file's original line endings.
- Binary, octal, and hexadecimal number literals now default to int.
- Changed the usage of the function "resize".
- Improved the speed of boss scene scripts loading.
Additions:
- Many new additions to the scripting language.
- See "New Scripting Features".
- Added GetObjectDistanceSq and GetObjectDeltaAngle.
- Added an overload each for GetCommonData and GetAreaCommonData.
- Added GetSystemTimeMilliS and GetSystemTimeNanoS.
- Added SetInvalidPositionReturn, a function for changing the "invalid position" from (0, 0).
- Added functions for pointer-based common data access:
- LoadCommonDataValuePointer
- LoadAreaCommonDataValuePointer
- IsValidCommonDataValuePointer
- SetCommonDataPtr
- GetCommonDataPtr
- Added IsVertexShaderSupported.
- Added the ability to set the read offset of .dat archives.
- Added new ObjPatternShot transforms:
- TRANSFORM_ADDPATTERN_B1
- TRANSFORM_ADDPATTERN_B2
- Renamed TRANSFORM_ADDPATTERNA1 to TRANSFORM_ADDPATTERN_A1
- Renamed TRANSFORM_ADDPATTERNA2 to TRANSFORM_ADDPATTERN_A2
- Added new ObjPatternShot patterns: (thanks to Naudiz)
- PATTERN_LINE
- PATTERN_ROSE
- Added back in script source caching, plus the ability to remove a script from the cache.
- Added ObjEnemyBossScene_SetUnloadCache.
- Added a "Cached Scripts" panel to the Script tab of the LogWindow.
- Added a "CPU Time" column to the Script tab of the LogWindow.
- Added a "Shader" tab to the LogWindow.
- Added an overload for ColorARGBToHex.
- Added ObjItem_SetPositionRounding.
- Added new maths functions:
- log2
- logn
- erf
- gamma
- distance
- distancesq
- dottheta
- rdottheta
- cbrt
- AngularDistance
- AngularDistanceR
- Rotate2D
- Rotate3D
- Added count_rand, count_prand, reset_count_rand, and reset_count_prand.
- Added Interpolate_X and Interpolate_X_PackedInt.
- Added GetScriptStatus.
- STATUS_LOADING
- STATUS_LOADED
- STATUS_RUNNING
- STATUS_PAUSED
- STATUS_CLOSING
- STATUS_INVALID
- Added implicit array casting for initialization, assignment, and concatenation.
- Only applicable for int[] <-> real[] <-> null
- Added array casting functions:
- as_int_array
- as_real_array
- as_bool_array
- as_char_array
- as_x_array
- Added StringFormat, a string formatting function in the style of C's sprintf.
- Added IsIntersected_Circle_RegularPolygon and IsIntersected_Circle_Ellipse.
- Added new array functions: contains, insert.
- Added ObjRender_SetEnableDefaultTransformMatrix.
- Added ObjPrim_GetTexture.
Bug fixes:
- Fixed LoadMesh crashing the engine.
- Fixed ObjCol_GetListOfIntersectedShotID incorrectly expecting only 1 argument.
- Fixed a bug where whitespaces in parameter lists in text object tags are incorrectly parsed.
- Fixed a bug where the "Show LogWindow" option would disappear if the game was set to start in (borderless) fullscreen mode.
- Fixed the sound streamer behaving incorrectly when playing a .wav file larger than 1MB a second time.
- Fixed a bug where ObjSound_Seek would be ineffectual if used when the sound isn't playing or within 2 frames after being played.
- Fixed the Y hitbox scale not affecting the hitboxes of laser objects.
- Fixed the LogWindow not able to output logs to file.
- Fixed a bug where penetrating player shots may randomly not correctly collide with enemy hitboxes and mess up replays.
- Fixed the engine crashing if the stage scene is quit and there is an ObjPatternShot, whose parent is a dead boss object, that wasn't manually deleted.
- Fixed the LogWindow's Log tab not horizontally scrolling the newest line into view.
- Fixed a bug with the remainder operation where using (kn % -n) or (-kn % n) where (k) is an integer results in (-n).
- Fixed crash bugs with ternary statements in the following cases:
- let a = [condition ? 0 : 1];
- a[condition ? 0 : 1] = 100;
- Fixed a package crash that happens when LoadScriptInLoadThread loads a stage script that contains a parser error.
- Fixed a bug that made variable-overshadowing a function throw a parser error.
- let power = 100; //This is possible again.
- Fixed a bug where an ObjMove would lag for one frame after applying its last AddPattern transform.
- Fixed a "feature" where a multidimensional array can host values of different types.
- Fixed a bug where Windows' list-searching feature was interfering with key remapping in the config.
- Fixed a bug where empty lines in text file object are skipped over in some devices.
- Fixed ObjFileT_SplitLineText having an incorrect return value if the object is invalid.
- Fixed an issue where the engine's default 3D render shader and 3D particle list shader don't work on AMD graphics cards.
- Also updated the shader source files in the sample scripts with this fix.
- Fixed a null pointer read crash bug during engine initialization.
- Fixed a bug where short-circuited logical expressions would not convert to boolean.
1.21a:
- Fixed MatrixMultiply and MatrixDivide functioning incorrectly.
- Added MatrixTransformVector for transforming a Vector3 by a transformation matrix.
- Added a hex overload for SetFogParam.
- Added a floored division operation. ("~/" and "~/=")
- Added "resize", a function for resizing arrays.
- Modified the functionality of the array slice operation and operator.
- Upper slice bound is automatically capped at the array's size.
- More options for text object tags.
- Increased the smoothness of rendered fonts.
- Fixed SetShotIntersectionCircle and SetShotIntersectionLine not working.
- Fixed a memory leak issue that was causing the "too many open files" error message.
- Using ObjRender_SetAlpha on a 2D sprite list object whose vertices were closed will now have an alpha-multiply effect.
- Optimizations.
1.20b:
- Fixed a bug that caused for loops using new variables to not function correctly.
- Fixed a bug that caused all GetColor functions to return incorrect values. (Including GetShotDataInfoA1)
- Fixed a bug where off-centered player hitboxes would behave strangely.
- Fixed the game crashing on script end/retry. (How the fuck did I not notice this before 1.20a release bloody hell)
- Added ObjShot_SetSpinAngularVelocity.
1.20a:
- Reworked some math calculations. SIMD instructions are utilized.
- A legacy version will also be provided in case your CPU do not support vectorization.
- The vectorized version requires the following instruction sets:
- SSE
- SSE2
- SSE3
- SSE4.1
- Generally, you should be able to run it unless your PC is from 30000BC or you're using a literal potato.
- Added a native hitbox visualization mode.
- Improved the line-circle intersection algorithm. New algorithm behaves like a circle-polygon intersection.
- Overloaded ObjMove_SetDestAtFrame, where movement interpolation mode can be specified.
- Fixed a bug where the graze count obtained via GetGraze() may desync with the one obtained via EV_GRAZE's event argument.
- Fixed a bug where ObjText_GetTotalWidth/Height may break the font tag.
- Fixed a bug where font text tag properties do not get reset after using ObjText_SetText.
- Obj_GetValue will now ACTUALLY NOT crash the game if the requested value does not exist.
- Renamed the "Obj_[..]ValueR" function series to "Obj_[..]ValueI".
- Removed the constant 'pi'. Please use 'M_PI' instead.
- Changed error messages of some default functions to be more descriptive to aid debugging.
- Greatly improved script variable allocation.
- Added a concatenate-assign operator. (~=)
- Added bitwise operators. (~, &, |, ^^)
- Int values can now be declared with a suffix 'i' or 'I'.
- Static type declaration is planned.
- Added implicit type casting in default script operations, including comparison and assignment.
- Optimized the process of calling default constants.
- The default constants SCREEN_WIDTH and SCREEN_HEIGHT will now change to reflect the settings in th_dnh.def.
- Some functions will now return int values rather than real values.
- Fixed a bug where itoa, atoi, and IntToString would underflow if the input is larger than 2^31-1. (New limit is 2^63-1)
- Fixed a bug where the 3D viewport would get stretched out based on the size of the STG frame.
- Made the game no longer freeze and crash after Alt-Tab'ing out of true fullscreen mode or after waking the desktop from sleep.
- Pseudo-fullscreen mode now stops Windows from drifting off to Dreamland.
- Fixed a mistake involving matrix multiplication order in the internal shader for particle list objects.
- Removed CollectItemsByType and SetItemIntersectionRadius.
- Added new event, EV_COLLECT_ITEM, which triggers when the item starts to move towards the player.
- Fixed a bug where ObjShot_SetIntersectionScale[XY] does not scale the position offset.
- If ObjFile_Open/ObjFile_OpenNW fails, the reason for failure will now be written to the LogWindow.
- The ObjFileB_Read[...] functions no longer throw an error when attempting to read past EOF.
- ObjFileB_GetLastRead can be used to obtain the amount of bytes read in the last read operation.
- Various optimizations.
- Un-Utilized UPX Executable Packer to not-reduce file size.
1.10c:
- Fixed a bug in the UserShotData where rect can override animation_data.
- Fixed a bug in the UserShotData where collision did not work at all.
- Added functionality to change the color of the delay cloud per-shot.
- Fixed a parser bug with nested single-lined statements.
- Fixed a rare bug where object IDs may get duplicated when objects are created in rapid succession.
- Fixed a bug where the default charset for some fonts are incorrectly determined.
- Utilized UPX Executable Packer to reduce file size.
1.10b:
- Fixed bugs with logical and ternary statements.
- Improved data packing of common data files. (Files saved with 1.10a are now incompatible.)
- Bug fixes and optimizations.
1.10a:
- Fixed some random and function-related crashes.
- RenderToTextureXX alpha fix ported+modified from th_dnh_woo.
- Replaced ObjLaser_SetGrazeInvalidFrame with ObjShot_SetGrazeInvalidFrame.
- Alpha channel blending now exists in all blend modes except BLEND_NONE and BLEND_ADD_RGB.
- Fixed a bug where NotifyEvent and SetScriptArgument could not reach package-level scripts when called from a stage-level script.
- Event arguments will no longer be overwritten when notifying nested events inside @Event.
- Utilized variadic argument counts for the functions in the NotifyEvent series.
- Utilized variadic argument counts for the WriteLog function.
- Added transform functions for ObjPatternShot and relevant sample scripts, for former and current ECL modders.
- Please note that they may not be able to fully emulate ECL's behaviours.
- Added functionality to customize delay clouds.
- Added an option to use true fullscreen mode in the config.
- "Operation-assign" operators (+=, -=, ++, etc.) now work on indexed arrays.
- Given: a = [1, 2, 3]
- a[0]++ = [2, 2, 3]
- a[2] *= 3 = [1, 2, 9]
- a += [5, 6] = [6, 8, 3]
- Given: b = [[1, 2], [3, 4], [5, 6]]
- b[0] += 3 = [[4, 5], [3, 4], [5, 6]]
- b[2]-- = [[1, 2], [3, 4], [4, 5]]
- Array indexing/slicing operations now automatically truncate indices.
- Array slicing operation can now reverse an array.
- Given: a = [10, 12, 14, 16, 18, 20]
- a[0..3] = [10, 12, 14]
- a[3..0] = [14, 12, 10]
- a[1..0] = [10]
- a[6..2] = [20, 18, 16, 14]
- a[2..2] = []
- Added ternary statements.
- NO_CHANGE can now be used in the ObjMove_AddPatternBX functions.
- ObjMove_SetAngle and ObjMove_SetSpeed can now be used on B-pattern objects.
- Line-line intersection is now properly implemented.
- IsIntersected_Line_Circle can now be used in package-level scripts.
- Added a particle renderer object (ObjParticleList) and new relevant sample scripts.
- Added support for vertex indexing.
- Added support for basic directional lighting.
- Improved vertex shader support, and added sample scripts for demonstration.
- Fixed underflowing and overflowing issues with SetColor/SetAlpha functions.
- Fixed a bug where ObjText_SetFontCharacterSet doesn't work at all.
- Added more options to the [font] text tag.
- Available tag options:
- reset
- Resets the text to its original settings. Present in vanilla ph3 as "clear".
- size
- Adjusts font size. Unchanged from vanilla ph3.
- ox/oy
- Adjusts position offset.
- it
- Toggles italic. (true/false or 1/0)
- wg
- Adjusts font weight.
- br/bg/bb
- Adjusts font bottom color.
- tr/tg/tb
- Adjusts font top color.
- or/og/ob
- Adjusts font border color.
- bc
- Adjusts font bottom color as an (r, g, b) list.
- tc
- Adjusts font top color as an (r, g, b) list.
- oc
- Adjusts font border color as an (r, g, b) list.
- Added more options to the [ruby] text tag.
- Available tag options:
- rb
- Sets text. Unchanged from vanilla ph3.
- rt
- Sets ruby(furigana) text. Unchanged from vanilla ph3.
- sz
- Adjusts the ruby text's font size.
- wg
- Adjusts the ruby text's font weight.
- ox
- Adjusts the ruby text's left margin.
- op
- Adjusts the ruby text's side pitch.
- Improved spacing of ruby text.
- ObjFileT now properly reads from and writes to UTF-8 text files.
- ObjFile_OpenNW now allows both reading and writing, unless the file was stored in a .dat archive, in which case all write functions will fail.
- Pulled the plug on Shift-JIS support in favour of proper Unicode (UTF-8 and UTF-8-BOM) handling.
- Better Metasequoia mesh support, and temporarily(?) suspended Elfreina mesh support. Blender .obj mesh support is planned.
- The player object will now set its own movement speed and angle according to user key input.
- Collecting user-defined items now notify EV_GET_ITEM to the player script.
- Minimum custom window size is reduced to 320*240.
- GetShotDataInfoA1 no longer throws an error upon receiving an invalid graphic ID, and will instead return default values.
- Fixed a bug where the right and bottom source rect set with ObjSprite3D_SetSourceDestRect are 1 greater than expected.
- Improved loading of .wav files.
- Attempted to fix a bug where multiple sound objects simultaneously playing the same sound file (>1MB .wav, .ogg, or .mp3) would display strange behaviours.
- Improved the precision of ObjSound_GetWavePosition, and fixed an issue where ObjSound_GetTotalLength would work incorrectly with .ogg files.
- Added bitwise operators.
- Greatly improved the LogWindow's Script panel.
- Added a text showing the available video memory in the LogWindow's Texture panel.
- Added a text showing the used RAM and CPU in the LogWindow's Info panel.
- Enforced semicolons before closing braces.
- Removed ObjShot_AddShotA1/2.
- Various optimizations.
1.00a:
- Multidimensional array assignments are now possible.
- Arithmetic operations on array(s) are possible. (Left-right order is important)
- [1, 2, 3] + 5 = [6, 7, 8]
- [5, 5, 1] * 2 = [10, 10, 2]
- [2, 3, 4] - [7, 0, 2] = [-5, 3, 1]
- [10, 10, 10] / [5, 2] = [2, 5, 10]
- [2, 3] % [4, 2, 1, 6] = [2, 1]
- 4 + [2, 3, 6, 2] = 8
- Added support for multiple-pass shaders.
- Shot and item objects no longer respond to changes in X and Y angles.
- Bullet limit of 8192 for performance reasons.
- Multiple hitbox support for shot objects has been removed.
- Vertex shader support.
- Much smaller replay files.
- Added an option to specify the skip mode speed in th_dnh.def.
- Obj_GetValue will not crash the game if the requested value does not exist.

View File

@ -0,0 +1,5 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
[InternetShortcut]
IDList=
URL=https://github.com/Natashi/Touhou-Danmakufu-ph3sx-2

View File

@ -0,0 +1,605 @@
Preamble:
The following keywords are used to clarify the importance of each convention: MUST, SHOULD, MAY, SHOULD NOT, MUST NOT.
In the code examples below, the sequence "// ..." (two slashes, one space, three full stops) denotes a line where, in most cases, more code should be written.
However, such code is unnecessary for the purposes of each example.
Comments from the writer that do not necessarily dictate style guidelines are preceded by the sequence "// NAZ: ".
1: Identifiers
1.1: Variables and Constants
Note:
Variables and constants SHOULD be declared with explicit type keywords (float, int, bool, char, string, etc.), unless the type is unknown,
in which case either "let" or "var" is used. These keywords are interchangeable, but the scripter MUST decide on one to use consistently.
Variables MUST be written using camelCase*, while constants MUST use SCREAMING_SNAKE_CASE.
Related identifiers SHOULD share the leading parts of their names for alphabetization purposes.
In cases where variables have short names or are uninitialized, multiple variables MAY be declared on the same line, separated by commas.
They SHOULD be of the same type, so fewer keywords are necessary.
*If necessary, a prefix or suffix MAY be added to a variable in the snake_case style.
DO:
float posX, posY;
const int BOSS_RUMIA = 0;
const int BOSS_CIRNO = 1;
DON'T:
let xPos;
let yPos;
const RUMIA_BOSS = 0, CIRNO_BOSS = 1;
1.1.1: Local Variables
Variables defined within a local scope, such as inside a function or task, MUST use camelCase without any underscores.
EXAMPLE:
function<void> DoSomething()
{
float posX, posY;
// ...
}
1.1.2: Global Variables
Variables defined globally in any script SHOULD be denoted with a leading underscore.
This is similar to the notation used for tasks, but with camelCase instead of PascalCase.
EXAMPLE:
int _objEnemy;
int _objPlayer;
@Initialize
{
// ...
}
1.1.3: Parameters
Function and task parameters SHOULD be denoted with a trailing underscore.
Parameters SHOULD be declared with type keywords, or either "let" or "var" if unknown.
EXAMPLE:
function<void> DoSomethingElse(int foo_, float bar_)
{
// ...
}
1.1.4: Iterators
Iterator variables declared in for-loops, ascent-loops, and descent-loops SHOULD be named lowercase letters of the alphabet starting with "i",
progressing to the next letter for each nested loop. This convention MAY be bypassed if more semantic information is necessary.
Iterator variables declared in for-each-loops SHOULD have single-word names prefixed with "i".
Fun fact: It is possible to add a second iterator to a for-each-loop, which is listed before the first and iterates through the array's indices (starting from 0) instead of its elements.
This variable SHOULD follow the same rules as those declared in for-loops.
EXAMPLE:
for (int i = 0; i < 2; i++) {
ascent (j in 0 .. 3) {
descent (k in 0 .. 4) {
// ...
}
}
}
for each (iObj in arrObj) {
// ...
}
for each ((i, iObj) in arrObj) {
// ...
}
1.1.5: Constants
As mentioned previously, constants MUST use SCREAMING_SNAKE_CASE. All constants SHOULD be defined in a dedicated constant library.
Numeric constants SHOULD be integers instead of float numbers (denoted in decimal literals by appending the character "i" at the end,
but this is not necessary if the constant type is explicitly defined).
EXAMPLE:
const int PLAYER_REIMU = 0;
const int PLAYER_MARISA = 1;
const int PLAYER_SAKUYA = 2;
const int PLAYER_SANAE = 3;
1.2: Functions, Tasks, and Subroutines
Note:
Function, task, and subroutine names all MUST use PascalCase to differentiate them from other identifiers.
The root of the identifier name SHOULD begin with a verb.
// NAZ: The "Is...Exists" structure is Engrish through and through, but I use it for consistency with built-in function names.
EXAMPLE:
function<void> DoSomething()
{
// ...
}
function<int> GetSomething(int foo_)
{
// ...
}
function<void> SetSomething(int foo_, float bar_)
{
// ...
}
function<bool> IsSomethingExists(int foo_)
{
// ...
}
1.2.1: Functions
Functions SHOULD be declared with explicit type keywords in angle brackets, unless the type is unknown or variant.
Function names MUST use PascalCase with no underscores.*
Function calls require trailing parentheses, even when there are no arguments.
*Excluding cases where there is a necessary prefix or suffix denoting important information, such as object type.
EXAMPLE:
function<void> DoSomething()
{
// ...
}
function<void> DoSomethingElse(bool foo_, float bar_)
{
DoSomething();
// ...
}
function<void> Obj_DoSomething(int obj_)
{
// ...
}
function<void> DoSomething_Obj_Obj(int obj1_, int obj2_)
{
// ...
}
1.2.2: Tasks
Task names SHOULD use one of the following styles (and consistently): PascalCase with a leading underscore, OR PascalCase with a leading uppercase T.
The same rules about affixes and parentheses that apply to functions apply here.
// NAZ: I like to treat my tasks as private routines, so often times you'll see me create a "public" function that calls task nested inside.
EXAMPLE:
task _RenderPlayer(int id_)
{
// ...
}
task _RenderPlayer_Reimu()
{
_RenderPlayer(PLAYER_REIMU);
// ...
}
1.2.3: Subroutines
Subroutines MUST use PascalCase, and SHOULD include a trailing underscore. Parentheses MAY be used.
It is possible to use the at sign (@) in place of the "sub" keyword, but scripters SHOULD NOT do so, to prevent confusion with built-in routines (@Initialize, @MainLoop, @Finalize, etc.).
// NAZ: I don't think I've ever used one of these, lol. I came up with the underscore rule on the fly.
EXAMPLE:
sub DoSomethingDifferent_
{
// ...
}
2: Whitespace
Note:
For the sake of consistency, spaces SHOULD be used instead of tabs in ALL cases.
The default tab is equivalent to 4 spaces; any decent editor should have an option to insert spaces upon pressing the tab key.
2.1: Operators
Expressions and statements consisting of one or more literals and/or identifiers MUST employ one space on both sides of all binary and ternary operators
(= +, -, *, /, ~/, %, ^, ~, +=, -=, *=, /=, ~/=, %=, ^=, ~=, ==, !=, >, <, >=, <=, &&, ||, &, |, ^^, .., ?, :).
Expressions and statements consisting of an identifier and a unary operator (!, ++, --) MUST NOT employ a space between the operator and operand.
DO:
float someNum = 6 * 9 + 4 / 20 - 6 % 66;
someNum++;
DON'T:
float someNum = 6*9+4/20-6%66;
someNum ++;
// NAZ: I will send you to the Shadow Realm if you don't put spaces in between your operators like in the "DON'T" example. It's entirely unreadable for me.
2.2: Variables and Constants
Variable and constant declaration and assignment statements MUST employ one space between the keyword (let, var, const) and the identifier,
and on both sides of the assignment operator (=) if applicable.*
As stated previously, if identifiers have short names or are uninitialized, their declarations MAY go on the same line, separated by commas and followed by spaces.
*Additional spaces MAY be used to vertically align the operator and right-hand side of each statement in a group of statements. See the example.
EXAMPLE:
const int BGM_TITLE = 0;
const int BGM_1_ROAD = 1;
const int BGM_1_BOSS = 2;
const int BGM_GAMEOVER = 3;
2.3: Functions, Tasks, and Subroutines
Function, task, and subroutine definitions MUST employ one space between the keyword (function, task, or sub) and the identifier,
and NO space between the identifier and the parentheses, differently from flow control statements.
Parameters contained inside the parentheses MUST employ one space between each identifier, i.e. after each comma.
The opening and closing braces of a function, task, or subroutine block MUST go on their own lines, and all lines in between them MUST be indented.
There MUST also be an empty line following each closing brace.
The same rules also apply to @Initialize, @MainLoop, @Event, @Finalize, and @Loading.
// Natashi: I don't like placing opening curly braces on newlines. *turns half of your body into pizza dough*
Function, task, and subroutine invocations MUST NOT include a space between the identifier and parentheses, if applicable.
Like parameters, arguments MUST be separated by whitespace, i.e. after each comma.
Function and task arguments MAY span several indented lines for readability purposes.
There SHOULD be an empty space following each multi-line function call, unless it precedes a closing brace or parenthesis.
// NAZ: This is only really applicable if the arguments get unbearably long, though. The example just demonstrates it just because.
EXAMPLE:
@Initialize
{
DoSomething(
true,
1,
1.1,
'e',
"abc"
);
// ...
}
function<void> DoSomething(bool foo_, int bar_, float baz_, char qux_, string quux_)
{
// ...
}
2.4: Flow Control Statements
Flow control statements MUST employ whitespace on both sides of each keyword
(if, else, loop, while, ascent, descent, in, for, each, alternative, case, others, switch, default, local, yield, break, continue),
unless said keyword by itself is a statement (yield, break, continue), in which case it is simply terminated with a semicolon.
For conditionals and loops, the opening curly brace SHOULD go on the same line as the preceding keyword or closing parenthesis, following a space.*
The closing curly brace SHOULD go on its own line, except in the case of "else" and "else if" which SHOULD be written after a space following the closing brace.
Loops and conditional structures SHOULD be followed by an empty line.
For for-loops, each statement ending in a semicolon MUST be followed by a space, i.e. the first and second.
The second and third statements may be omitted, in which case a space SHOULD be used instead.
When statements are combined with commas, there MUST be a space after each of them.
*Conditionals and loops containing a single statement terminated with a semicolon MAY be written without curly braces,
in which case they SHOULD be written on the same line as the rest of the statement, following a space.
Nested conditionals and loops may also be written without curly braces, provided that there is only one semicolon-terminated statement within it.
Alternative cases written this way MAY use additional spaces to align their contents.
EXAMPLE 1 (VERBOSE):
for (int i = 1, j = 2; i <= 10; i++, j--) {
alternative (i)
case (1) {
WriteLog("i is 1!", "j is 2!");
}
case (2) {
WriteLog("i is 2!", "j is 1!");
}
others {
WriteLog("I can't count that high!");
}
if (i >= 3) {
break;
} else {
loop (5) {
yield;
}
}
}
EXAMPLE 2 (CONCISE):
for (int i = 1, j = 2; i <= 10; i++, j--) {
alternative (i)
case (1) WriteLog("i is 1!", "j is 2!");
case (2) WriteLog("i is 2!", "j is 1!");
others WriteLog("I can't count that high!");
if (i >= 3) break;
else loop (5) yield;
}
// NAZ: With "wait" being built-in there's no use case for "loop (n) yield;".
// NAZ: I simply wanted to demonstrate nested structures and how they can be shortened.
2.5: Arrays
Arrays elements MUST be separated by whitespace, i.e. after each comma.
Multidimensional or otherwise verbose arrays MAY be written across several indented lines.
The initial opening square brace MUST go on the same line as the operator that precedes it.
The new lines and indenting SHOULD be consistent throughout each dimension of the array.
There SHOULD be an empty space following each multi-line array, unless it precedes a closing brace or parenthesis.
For performance reasons, arrays SHOULD be indexed as infrequently as possible.
If only one element is needed, storing it in a variable is recommended.
EXAMPLE:
int[] arrSmall = [1, 2, 3];
int[][] arrBig = [
[1, 2, 3],
[4, 5, 6, 7],
[8, 9, 10, 11, 12]
];
int[][][] arrBigger = [
[
[1, 2, 3],
[4, 5, 6, 7],
], [
[8, 9, 10, 11, 12],
[13, 14, 15, 16, 17, 18],
[19, 20, 21, 22, 23, 24, 25],
]
];
int numSmall = arrSmall[2];
int numBig = arrBig[2][4];
int numBigger = arrBigger[1][2][6];
3: Organization
3.1: Script Structure
All scripts SHOULD have their sections organized in the following order:
1. Headers (#TouhouDanmakufu, #ScriptVersion*, #Title, #Text, #System, #Background, #BGM)
2. #include directives
3. Global variables
4. Predefined routines (@Initialize, @Event, @MainLoop, @Finalize, @Loading)
5. Script-specific routines
*The #ScriptVersion header can only take one possible argument (3), and SHOULD be omitted altogether.
EXAMPLE:
#TouhouDanmakufu[Stage]
#Title["Example Stage"]
#Text["An example of a stage script."]
#System["script/script_system.dnh"]
#include "script/include_stg.dnh"
int _idScript;
@Initialize
{
_idScript = GetOwnScriptID();
_Main();
}
@MainLoop
{
yield;
}
@Finalize
{
WriteLog("Game over!");
}
task _Main()
{
while (GetPlayerState() != STATE_END) yield;
CloseScript(_idScript);
}
3.2: Included Files
As a preface, what the #include directive does is tell the engine to copy the contents of a given text file and paste them into the script, replacing the #include directive.
If a file has already been included in the script, it will be skipped.
To reduce the amount of boilerplate in each script file, the scripter SHOULD create files with the express purpose of including several other files, ideally in a hierarchical manner.
DO:
// In include_main.dnh
#include "./lib_main.dnh"
#include "./lib_const.dnh"
#include "./lib_math.dnh"
#include "./lib_render.dnh"
#include "./lib_event.dnh"
// In include_stg.dnh
#include "./include_main.dnh"
#include "./lib_stg.dnh"
#include "./lib_move.dnh"
#include "./lib_shot.dnh"
#include "./lib_enemy.dnh"
// In include_boss.dnh
#include "./include_stg.dnh"
#include "./lib_boss.dnh"
#include "./lib_anim.dnh"
#include "./lib_spell.dnh"
// In the main script
#TouhouDanmakufu[Single]
// ...
#include "script/include_boss.dnh"
@Initialize
{
// ...
}
DON'T:
// In the main script
#TouhouDanmakufu[Single]
// ...
#include "./lib_main.dnh"
#include "./lib_const.dnh"
#include "./lib_math.dnh"
#include "./lib_render.dnh"
#include "./lib_event.dnh"
#include "./lib_stg.dnh"
#include "./lib_move.dnh"
#include "./lib_shot.dnh"
#include "./lib_enemy.dnh"
#include "./lib_boss.dnh"
#include "./lib_anim.dnh"
#include "./lib_spell.dnh"
@Initialize
{
// ...
}
// NAZ: These file paths assume that the script as well as all of the library files are located in the base script directory.
// NAZ: Ideally, you should have a dedicated lib folder, possibly with subfolders corresponding to the libraries contained in each "include" file.
3.3: Script Routines
Scripts (particularly those in which danmaku is created) SHOULD call a task named _Main (or TMain, depending on your chosen style) from @Initialize.
This task SHOULD be the ultimate source of all other script-specific routine invocations.
The scripter SHOULD make use of nesting for a few reasons:
1. To ensure that variables are limited to their intended scopes.
2. To prevent the need to pass variables around unnecessarily via arguments.
EXAMPLE 1 (NON-NESTED):
task _Main()
{
float dir;
loop {
dir = rand(0, 360);
_Fire(dir);
wait(60);
}
}
task _Fire(float dir_)
{
float speed = 1;
loop (5) {
Shoot(speed, dir_);
speed++;
wait(2);
}
}
function<void> Shoot(float speed_, float dir_)
{
int obj = CreateShotA1(someX, someY, speed_, dir_, someID, 15);
ObjShot_SetDeleteFrame(obj, 180);
}
EXAMPLE 2 (NESTED):
task _Main()
{
float dir;
loop {
dir = rand(0, 360);
_Fire();
wait(60);
}
task _Fire()
{
float speed = 1;
loop (5) {
Shoot_;
speed++;
wait(2);
}
sub Shoot_
{
int obj = CreateShotA1(someX, someY, speed, dir, someID, 15);
ObjShot_SetDeleteFrame(obj, 180);
}
}
}
// NAZ: These examples are intentionally bare-bones and only exist for the purposes of demonstrating how nesting can simplify task and function signatures and establish a sense of hierarchy.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,716 @@
- Re: Syntax Tutorial
- Number literals
- Base literals
WriteLog(0b1011); //Binary literal, outputs 11
WriteLog(0o503); //Octal literal, outputs 323
WriteLog(0x8f62); //Hexadecimal literal, outputs 36706
Base literals default to integer type unless suffixed otherwise.
- Suffix
- "f" / "F"
Forces a number literal to a float type.
- "i" / "I"
Forces a number literal to an integer type.
Example:
WriteLog(5); //5.000000
WriteLog(5f); //5.000000
WriteLog(5i); //5
WriteLog(0x5f); //95
WriteLog(0x5fi); //95
WriteLog(7.76); //7.760000
WriteLog(7.76f); //7.760000
WriteLog(7.76i); //7
- Digit separator
The "_" character can be used in number literals to aid in visibility.
Has no effect on the resultant value.
WriteLog(5000000000i); //5000000000
WriteLog(5_000_000_000i); //still 5000000000
WriteLog(0x7f23a7e2); //2133043170
WriteLog(0x7f23_a7e2); //still 2133043170
- Variables
- Explicit types
Originally, you'd declare a variable with one of these three keywords:
- let
- var
- real
All three keywords had the same effect on the declaration.
However, with version 1.30a, the scripting language has gone through a considerable amount of changes as follows:
- "real" has been renamed to "float". (1.32a)
- You may now explicitly state the type of the variable you are declaring.
Example:
int a = 700; //typeof(a) == VAR_INT
float b = 56.243; //typeof(b) == VAR_FLOAT
char c = '0'; //typeof(c) == VAR_CHAR
bool d = false; //typeof(d) == VAR_BOOL
string e = "aubergine"; //typeof(e) == VAR_STRING
int[] f = [4i, 8]; //typeof(f) == VAR_ARRAY, ftypeof(f) == VAR_INT
- This does not change "let" and "var", they will still behave similarly to "auto" in C++.
Example:
let a = 700i; //typeof(a) == VAR_INT
let b = 56.243; //typeof(b) == VAR_FLOAT
let c = '0'; //typeof(c) == VAR_CHAR
let d = false; //typeof(d) == VAR_BOOL
let e = "aubergine"; //typeof(e) == VAR_STRING
let f = [4i, 8]; //typeof(f) == VAR_ARRAY, ftypeof(f) == VAR_INT
- You may not use "let[]" or "const[]".
An array type declaration may only be used with a non-auto type.
- Multiple variables declaration.
Example:
int a, b = 7, c = 100, d; //All will be of type "int"
const bool e = true, f = true; //All will be of type "const bool"
let g = 56, h = true, i = 6i; //g will be "float", h will be "bool", and i will be "int"
bool[][][] j, k; //All will be of type "bool[][][]" (3D bool array)
- Using "const"
"const" is used to declare constant variables.
A standalone "const" will behave like a "let".
"const" can be prefixed or suffixed by another type.
Constant variables cannot be modified.
Attempting to do so will throw a compile-time error.
Example:
const a = 1;
const let b = true;
const string c = "xolotl";
const int d;
a = 6; //ERROR
d = 10; //ERROR
- Supplement for smart people
ph3sx script type | internal C type | size in bytes |
----------------------------------------------------------
int | int64_t | 8 |
float | double | 8 |
bool | bool | 1 |
char | wchar_t | 2 |
- Scoping
- "local" has been deprecated. While they have not yet been completely removed, it is advisable to stop using it.
- But what can I use in its place?
Nothing.
Literally.
What used to be:
local {
//...
}
can now be reduced to just:
{
//...
}
Scoping rules will still apply normally, like so:
let a;
//Only a is accessible here
{
let b;
//a and b are both accessible here
{
let c;
//a, b, and c are all accessible here
}
}
- Operators
All available script operators are listed as follows.
They are arranged in order of precedence, highest-to-lowest.
1. ()
Function call
let c = SomeFunc(a, b);
1. as_x()
Type cast
let a = as_int(x);
let b = as_bool(56);
1. length()
Array length
let a = length(x);
let b = length([1, 2, 3]);
1. []
Array indexing
let a = arr[3];
let b = [10, 100, 1000][x];
1. (| |)
Absolute
let a = (|-4|); //a == 4
let b = (|a|); //b == 4
1. ()
Parentheses
2. ^
Power (Right-associative)
let a = 2 ^ 4; //a == 16
let b = 2 ^ 2 ^ 3; //b == 256
2. [..]
Array slice
let x = [9, 10, 11, 12, 13];
let a = x[0..2]; //a == [9, 10]
let b = x[2..999]; //b == [11, 12, 13]
let c = x[3..0]; //c == [11, 10, 9]
3. +
Unary plus
let a = +6;
3. -
Unary minus
let a = -10;
3. !
Unary logical not
let a = !b;
3. ~
Unary bitwise not
let a = ~312; //a == -313
let b = ~(0b1011001); //b == -90
4. *
Multiply
let a = 4 * 10; //a == 40
4. /
Divide
let a = 10 / 3; //a == 3.333333
4. ~/
Floored divide
let a = 10 ~/ 3; //a == 3
4. %
Remainder (Modulo)
let a = 7 % 4; //a == 3
5. +
Add
let a = 3 + 32; //a == 35
5. -
Subtract
let a = 9 - 12; //a == -3
5. ~
Array concatenate
let a = [8, 3] ~ [10]; //a == [8, 3, 10]
6. <<
Bitwise shift left
let a = 7 << 3; //a == 56
6. >>
Bitwise shift right
let a = 198 >> 2; //a == 49
7. ==
!=
<
<=
>
>=
Comparison
let a = 5 < 6;
let b = a != false;
let c = 10 >= 10;
8. ^^
Bitwise XOR
let a = 63 ^^ 234; //a == 213
9. |
Bitwise OR
let a = 63 | 234; //a == 255
10. &
Bitwise AND
let a = 63 & 234; //a == 42
11. ||
Logical OR
let a = true || false; //a == true
11. &&
Logical AND
let a = true || false; //a == false
12. ?:
Ternary expression
let a = x > y ? 10 : 20;
let b = z == 0 ? x * 10 : y + 4;
let c = k ? (y ? 8 : 0) : p ? 5 : 2 + x;
- Boolean expressions
- Short-circuiting
This feature was present in vanilla ph3 as well, but I have yet to see a tutorial mention it, so here it is.
Short-circuiting (short-circuit evaluation) is an optimization for boolean expressions.
Take these statements, for example:
bool c = a && b;
bool z = x || y;
This !RUN-TIME! optimization will occur when expression (a) evaluates to false,
where the evaluation of expression (b) will be completely skipped over.
Conversely, in the second statement, the evaluation of expression (y) will also be skipped over if
expression (x) evaluates to true.
Short-circuiting will take place left-to-right, so it is beneficial to format your logical expressions
in a way that more lightweight expressions get evaluated sooner rather than later.
Example:
if (bCheckHit && GetShotIdInCircleA2(...)) { /*...*/ }
would benefit more from short-circuit evaluation than
if (GetShotIdInCircleA2(...) && bCheckHit) { /*...*/ }
Short-circuiting only applies to logical expressions, not bitwise expressions.
Example:
bool c = a & b;
bool d = a | b;
Here, both expressions (a) and (b) will be evaluated regardless of the result of expression (a).
- Loops
- Ascent/Descent
Ascent and descent loops remain unchanged, but you may now assign an explicit type to the counter variable.
Example:
ascent (i in 0..3)
WriteLog(i);
Will result in the following output:
0.000000
1.000000
2.000000
//-----------------------------------------------
ascent (i in 0i..3)
WriteLog(i);
Will result in the following output:
0
1
2
//-----------------------------------------------
ascent (int i in 0..3)
WriteLog(i);
Will result in the following output:
0
1
2
- In ph3sx, two new loops are available for use.
- For loop
The for loop is the more generalized version of ascent/descent loops.
It's also the standard loop format in most programming languages,
which means I don't have to explain its usage here.
- For-each loop
The for-each loop is a quick and efficient method to iterate through arrays.
Example:
int[] arr = [10, 9, 8, 7];
for each (int i in arr)
WriteLog(i);
Will result in the following output:
10
9
8
7
//-----------------------------------------------
for each (float i in arr)
WriteLog(i);
Will result in the following output:
10.000000
9.000000
8.000000
7.000000
- The "ref" keyword
Normally, the array fed into a for-each loop will be a copy of the original array.
However, you can force the loop to directly read from the original array with the "ref" keyword.
As the array won't be copied, there would also be some performance benefits to be had,
and the loop will respond to any modifications to the array rather than being unaffected.
Example:
int[] arr = [1, 2, 3, 4];
for each (i in arr) {
if (i % 2 == 0)
arr ~= [5];
WriteLog(i);
}
WriteLog(arr);
Will result in the following output:
1
2
3
4
[1, 2, 3, 4, 5, 5]
//-----------------------------------------------
for each (i in ref arr) {
if (i % 2 == 0)
arr ~= [5];
WriteLog(i);
}
WriteLog(arr);
Will result in the following output:
1
2
3
4
5
5
[1, 2, 3, 4, 5, 5]
- Special syntaxes
- There is also another declaration syntax for the for-each loop:
{
int i = 0;
for each (itr in array) {
//...
i++;
}
}
//is equivalent to:
for each (i, itr in array) {
//...
}
- These formats are also allowed:
for each ((i, itr) in array) { /*...*/ }
for each ((int i, itr) in array) { /*...*/ }
for each (i, float itr in array) { /*...*/ }
for each ((float i, string itr) in array) { /*...*/ }
- You may use a colon(:) in place of the keyword "in"
for each (itr : array) { /*...*/ }
for each ((i, itr) : array) { /*...*/ }
- In addition, there is a new flow control statement "continue".
"continue" is used in the same manner as "break", but rather than simply ending the loop,
it will merely skip the current iteration of the loop.
Example:
ascent (int i in 0..8) {
if (i % 2 == 0) continue;
WriteLog(i);
}
Will result in the following output:
1
3
5
7
- Unlike in vanilla ph3, "break" can no longer be used outside a loop.
- Attempting to do so will throw a compile-time error.
- The same applies to "continue".
- Functions, Tasks, Subs ("Callables")
- Parameters
Parameters, like variables, can have explicit types.
Example:
function Func(int a, float b, const string[] c) {}
- Function return type
- You may explicitly specify a function's return type.
function<int> Func1(a, b) {
return a + b;
}
WriteLog(Func1(10, 4.2)); //Output: 14
WriteLog(Func1(10, "sdfs")); //ERROR: Invalid implicit casting
- Marking a function with type "void" will forbid it from returning a value.
function<void> Func1(a, b) {
return; //OK: no return value
}
function<void> Func2(a, b) {
return a + b; //ERROR: void function can't return a value
}
- Overloading
Two callables with the same name, but different argument counts, will be treated as two different, unique callables.
Example:
function<int> Func() {
return 0;
}
function<int> Func(a) {
return 100;
}
function<int> Func(a, b, c) {
return a + b + c;
}
DoStuff(); //Returns 0
DoStuff("asdf"); //Returns 100
DoStuff(1, 2, 3); //Returns 6
- Variadic argument count (varargs)
- Some default functions now allow for varargs.
Example:
NotifyEventAll(EV_USER, 0);
NotifyEventAll(EV_USER, 0, 1, 2, 3);
NotifyEventAll(EV_USER, 0, 1, 2, 3, 4, 5, 6, 7, 8);
//All of the above are valid calls to NotifyEventAll.
- You can pass a maximum of around 357900000 arguments, but please please don't actually do that.
- Scripters currently cannot define their own callables with varargs.
- Async
Async blocks can be placed anywhere in the code, they behave like inlined tasks.
Example:
function Func() {
WriteLog(0);
async {
WriteLog(1);
wait(10);
WriteLog(2);
}
return true;
}
//is equivalent to:
function Func() {
WriteLog(0);
task AsyncTask() {
WriteLog(1);
wait(10);
WriteLog(2);
}
AsyncTask();
return true;
}
- Script
- Char
- Backslash escapes (\\) is properly recognized in char/string literals.
- Hexadecimal char literals (\x[hex]) can be used in char/string literals.
Example:
"\x74" -> "t"
'\x3042' -> 'あ'
"\x042\x5f" -> "B_"
- One-lined statements
Example:
ascent (i in 0..10) WriteLog(i);
if (true) a += 10;
else a -= 4;
Can be used everywhere except in function/task/sub declarations, async blocks, @-blocks, and local{} blocks.
- Optimizations
- The script compiler will try to perform basic optimizations on maths expressions.
Examples:
a = 5 + 5 - 1; -> optimize -> a = 9;
a = 5 * 8 / 7; -> optimize -> a = 5.714286;
a = func(b) + 5 % 10; -> optimize -> a = func(b) + 5;
- Empty loops and blocks will be optimized away during script compiling.
Examples:
while (true) {}
for (let i = 0; i < 10; i++) {}
ascent (i in 0..100000000) {}
{
}
loop (1000) {
}
for each (i in "aaaaaaaaaa") {}
async {}
//All of the above examples will be optimized away
- Loops containing a single yield will be automatically transformed into a wait.
Examples:
loop (60) yield; -> optimize -> wait(60);
loop (a * 2 + 60 - 20) { -> optimize -> wait(a * 2 + 60 - 20);
yield;
}
- Text Object Tags
Text object tags are special formatting patterns that can be used to dynamically alter rendering of text objects.
Available tags:
- r
Inserts a new line. Also resets formatting from other tags.
- font / f
Modifies the font.
Available tag properties:
- reset / rs / r / clear / clr / c
Resets the text to its original settings. Present in vanilla ph3 as "clear".
- size / sz
Changes the font size. Unchanged from vanilla ph3.
- ox / oy
Changes the position offset.
- it
Toggles italic. (true/false or 1/0)
- wg
Changes the font's weight.
- br / bg / bb
Changes the font's bottom color.
- tr / tg / tb
Changes the font's top color.
- or / og / ob
Changes the font's border color.
- bc
Changes the font's bottom color as a (r, g, b) list.
- tc
Changes the font's top color as a (r, g, b) list.
- oc
Changes the font's border color as a (r, g, b) list.
Example:
ObjText_SetText(obj, "Lorem ipsum [font size=48 it=1 bc=(255, 0, 0)]dolor sit[font clr] amet");
- ruby
Creates a ruby(furigana) text.
Available tag properties:
- rb
Sets the main(bottom) text. Unchanged from vanilla ph3.
- rt
Sets the furigana(top) text. Unchanged from vanilla ph3.
- sz
Changes the furigana text's font size.
- wg
Changes the furigana text's font weight.
- ox
Changes the furigana text's left margin.
- op
Changes the furigana text's side pitch.

View File

@ -1,70 +0,0 @@
#TouhouDanmakufu[Plural]
#ScriptVersion[3]
#Title["Boss Plural"]
#Text["..."]
#System["script/KevinSystem/Kevin_System.txt"]
//#Player["script/KevinPackage/KevinScript_Players/PankevKouda/KevKou_Main.dnh", "script/KevinPackage/KevinScript_Players/MariHousui/MariHousui_Main.dnh"]
let csd = GetCurrentScriptDirectory();
let obj = ObjEnemyBossScene_Create();
#include "script/KevinSystem/Universal_Lib.txt"
#include "script/game/Stage_Background.dnh"
@Event{
}
@Initialize{
if(!IsCommonDataAreaExists("PIV")){
CreateCommonDataArea("PIV");
SetAreaCommonData("PIV", "currentvalue", 10000);
}
else{}
SetAutoDeleteObject(true);
_ScrollBackground();
PluralTask();
}
@MainLoop{
yield;
}
@Finalize
{
}
/* TO DO:
+ Single *syncing* - ensure that the boss stays at the same position
*/
// Task to handle the plural's boss scene
task PluralTask(){
// Registering individual singles
ObjEnemyBossScene_Add(obj, 0, csd ~ "Non1.dnh");
ObjEnemyBossScene_Add(obj, 0, csd ~ "Spell1.dnh");
ObjEnemyBossScene_Add(obj, 0, csd ~ "Non2.dnh");
ObjEnemyBossScene_Add(obj, 0, csd ~ "Spell2.dnh");
ObjEnemyBossScene_Add(obj, 0, csd ~ "Non3.dnh");
ObjEnemyBossScene_Add(obj, 0, csd ~ "Spell3.dnh");
// Loading and registering the boss scene
ObjEnemyBossScene_LoadInThread(obj);
ObjEnemyBossScene_Regist(obj);
while(!Obj_IsDeleted(obj)){
yield;
}
_ExplosionEffect(GetCommonData("Boss Position X", STG_WIDTH/2), GetCommonData("Boss Position Y", STG_WIDTH/2), PetalEffect);
SetAutoDeleteObject(true);
wait(120);
CloseScript(GetOwnScriptID());
}

View File

@ -1,259 +0,0 @@
#TouhouDanmakufu[Single]
#ScriptVersion[3]
#Title["Remilia Nonspell 2"]
#Text["yassification"]
#System["script/KevinSystem/Kevin_System.txt"]
int difficultySelect = 0;
let objScene = GetEnemyBossSceneObjectID();
let csd = GetCurrentScriptDirectory();
let bossObj;
float bossX = 0;
float bossY = 0;
float playerY = 0;
float playerX = 0;
let aniframe = 0;
let aniframe2 = 0;
let spellsnd = ObjSound_Create();
let bossdiesnd = ObjSound_Create();
/*Parameters:
+ Laser ring density
+ Laser spin speed
+ Spiral density
+ Spiral speed
+ Spiral angle offset
+ Spiral delay
*/
int[] denseLaser = [7, 8, 9];
float[] speedspinLaser = [0.35, 0.35, 0.35];
int[] timeLaser = [60, 70, 80];
int[] timeDelayLaser = [45, 40, 30];
int[] denseSpiral = [5, 6, 7];
float[] angleoffsetSpiral = [1.618*8, 1.618*7, 1.618*6];
float[] speedSpiral = [8.5, 9.5, 10.5];
int[] delaySpiral = [5, 5, 4];
/*
*/
// Includes ahoy
#include "script/KevinSystem/Universal_Lib.txt" // The library to include all libraries :sans: :nail_care:
@Initialize {
//SetIntersectionVisualization(true);
SetAutoDeleteObject(true);
_InitDifficulty(difficultySelect);
//difficultySelect = 0; // debug
SetShotAutoDeleteClip(64, 64, 64, 64);
if(!IsCommonDataAreaExists("PIV")){
CreateCommonDataArea("PIV");
SetAreaCommonData("PIV", "currentvalue", 10000);
}
else{}
// Create the boss object itself
bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS);
ObjEnemy_Regist(bossObj);
ObjMove_SetPosition(bossObj, GetCommonData("Boss Position X", STG_WIDTH/2), GetCommonData("Boss Position Y", STG_HEIGHT/2));
ObjEnemy_SetMaximumDamage(bossObj, 999);
_RenderBoss(bossObj);
mainTask();
_FadeInvincibility(bossObj, 150, 150, 1);
endingnew();
}
@Event {
alternative(GetEventType())
case(EV_REQUEST_LIFE) {
SetScriptResult(3000);
}
case(EV_REQUEST_TIMER) {
SetScriptResult(25);
}
}
@MainLoop {
playerY = GetPlayerY();
playerX = GetPlayerX();
//The player position is ALWAYS UPDATED
bossX = ObjMove_GetX(bossObj);
bossY = ObjMove_GetY(bossObj);
ObjEnemy_SetIntersectionCircleToShot(bossObj, ObjMove_GetX(bossObj), ObjMove_GetY(bossObj), 180);
yield;
}
@Finalize {
}
/*Nonspell 2 (Patchouli):
Non-directional Laser with Bubble Spiral
Parameters:
+ Laser ring density
+ Laser spin speed
+ Spiral density
+ Spiral speed
+ Spiral angle offset
*/
task mainTask {
ObjMove_SetDestAtFrame(bossObj, STG_WIDTH/2, STG_HEIGHT/6+30, 45, LERP_DECELERATE);
wait(60);
int multiplier = 1;
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE) > 0){
ascent(i in 0..denseLaser[difficultySelect]){
SpawnNDLaser(i, multiplier);
}
wait(timeDelayLaser[difficultySelect]);
float ang = 0;
loop(90/delaySpiral[difficultySelect]){
float ang2 = ang;
loop(denseSpiral[difficultySelect]){
int shot = CreateShotA1(bossX, bossY, speedSpiral[difficultySelect], ang2, KEV_BUBBLE_RED, 10);
if (multiplier == -1) {ObjShot_SetGraphic(shot, KEV_BUBBLE_AQUA);}
else{}
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) <= 0){Obj_Delete(shot);}
else{
_Delay(shot, 10);
_BulletRescale(shot, 0.65, true, 1);
Shoot1;
}
ang2 += 360/denseSpiral[difficultySelect];
}
ang += angleoffsetSpiral[difficultySelect]*-multiplier;
wait(delaySpiral[difficultySelect]);
}
multiplier *= -1;
yield;
}
}
task SpawnNDLaser(int ID, int multiplier){
float objcount = 0;
int obj = CreateStraightLaserA1(bossX + -45*cos(ID*360/denseLaser[difficultySelect]), bossY + -45*sin(ID*360/denseLaser[difficultySelect]), ID * 360/denseLaser[difficultySelect], STG_HEIGHT*1.5, 100, timeLaser[difficultySelect], KEV_AMULET_RED, timeDelayLaser[difficultySelect]);
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) == 0){Obj_Delete(obj);}
int shot = CreateShotA1(bossX + 120*cos(ID*360/denseLaser[difficultySelect]), bossY + 120*sin(ID*360/denseLaser[difficultySelect]), 0, ID * 360/denseLaser[difficultySelect], KEV_AURABALL_RED, 10);
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) == 0){Obj_Delete(shot);}
else{
_Delay(shot, 10);
_BulletRescale(shot, 2, true, 1);
Shoot1;
}
if(multiplier == -1){
ObjShot_SetGraphic(obj, KEV_AMULET_AQUA);
ObjShot_SetGraphic(shot, KEV_AURABALL_AQUA);
}
ObjShot_SetAutoDelete(obj, false);
ObjShot_SetAutoDelete(shot, false);
ObjRender_SetBlendType(obj, BLEND_ADD_ARGB);
ObjRender_SetBlendType(shot, BLEND_ADD_ARGB);
ObjLaser_SetInvalidLength(obj, 0.25, 0.25);
ObjStLaser_SetSource(obj, true);
ObjStLaser_SetEnd(obj, true);
ObjStLaser_SetEndGraphic(obj, ObjShot_GetImageID(obj)-33);
async{
wait(timeDelayLaser[difficultySelect]);
Shoot2;
}
while(!Obj_IsDeleted(obj)){
ObjMove_SetPosition(obj, bossX + -45*cos(ID*360/denseLaser[difficultySelect] + objcount), bossY + -45 * sin(ID*360/denseLaser[difficultySelect] + objcount));
ObjMove_SetPosition(shot, bossX + 120*cos(ID*360/denseLaser[difficultySelect] + objcount), bossY + 120*sin(ID*360/denseLaser[difficultySelect] + objcount));
ObjStLaser_SetAngle(obj, ID*360/denseLaser[difficultySelect] + objcount);
objcount += speedspinLaser[difficultySelect]*multiplier;
yield;
}
ObjShot_FadeDelete(shot);
}
/*task SpawnNDLaser(ID, multiplier){
let objcount = 0;
let obj = CreateStraightLaserA1(ObjMove_GetX(bossObj) + 60*cos(ID*360/denseLaser[difficultySelect]), ObjMove_GetY(bossObj) + 60*sin(ID*360/denseLaser[difficultySelect]), ID * 360/denseLaser[difficultySelect], 512, 24, 300, KEV_AMULET_RED, 60);
while(!Obj_IsDeleted(obj)){
ObjMove_SetPosition(obj, ObjMove_GetX(bossObj) + 60*cos(ID*360/denseLaser[difficultySelect] + objcount), ObjMove_GetY(bossObj) + 60*sin(ID*360/denseLaser[difficultySelect] + objcount));
ObjStLaser_SetAngle(obj, ID*360/denseLaser[difficultySelect] + objcount);
//objcount += 1 * multiplier;
objcount += 0.5;
yield;
}
}*/
task endingnew(){
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE)>0){
yield;
}
_GoToBrazil(objScene, bossObj, 12, 24);
wait(120);
ObjSound_SetVolumeRate(fire2, 20);
CloseScript(GetOwnScriptID);
}

View File

@ -1,341 +0,0 @@
#TouhouDanmakufu[Single]
#ScriptVersion[3]
#Title["Remilia Spell 1 (Remilia Card)"]
#Text["yassification"]
#System["script/KevinSystem/Kevin_System.txt"]
int difficultySelect = 0;
let objScene = GetEnemyBossSceneObjectID();
let csd = GetCurrentScriptDirectory();
let bossObj;
float bossX = 0;
float bossY = 0;
float playerY = 0;
float playerX = 0;
let aniframe = 0;
let aniframe2 = 0;
let spellsnd = ObjSound_Create();
let bossdiesnd = ObjSound_Create();
/*
Parameters:
- Remilia wait time
- Spiral density
- Spiral angle offset per frame
- Ring density
- Ring (max) speed
- Delays between rings
*/
int[] denseSpiral = [6, 7, 8];
float[] angleoffsetSpiral = [1.618*7, 1.618*6, 1.618*5];
float[] speedSpiral = [8, 9.25, 11];
int[] denseRing = [10, 12, 14];
float[] maxspeedRing = [7.5, 8.5, 10];
int[] deceltimeRing = [20, 25, 32];
int[] acceltimeRing = [60, 50, 40];
// Remilia takes 36 frames. Preferably, pick a number 36 can divide with.
int[] delayRing = [9, 6, 5];
// How much time Remilia takes to charge her attack and you get to GTFO.
int[] waittimeRemi = [80, 70, 60];
string tex = "script/game/resourceLib/Spritesheet_StationJam.png";
//LoadTextureEx(tex, true, false);
// Includes ahoy
#include "script/KevinSystem/Universal_Lib.txt" // The library to include all libraries :sans: :nail_care:
@Initialize {
//SetIntersectionVisualization(true);
SetAutoDeleteObject(true);
LoadTextureEx(tex, true, false);
_InitDifficulty(difficultySelect);
//difficultySelect = 2; // debug
SetShotAutoDeleteClip(64, 64, 64, 64);
if(!IsCommonDataAreaExists("PIV")){
CreateCommonDataArea("PIV");
SetAreaCommonData("PIV", "currentvalue", 10000);
}
else{}
// Create the boss object itself
bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS);
ObjEnemy_Regist(bossObj);
ObjMove_SetPosition(bossObj, GetCommonData("Boss Position X", STG_WIDTH/2), GetCommonData("Boss Position Y", STG_HEIGHT/2));
ObjEnemy_SetMaximumDamage(bossObj, 999);
_RenderBoss(bossObj);
//WriteLog(spellPIV);
WriteLog(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
mainTask();
_FadeInvincibility(bossObj, 150, 150, 1);
endingnew();
}
@Event {
alternative(GetEventType())
case(EV_REQUEST_LIFE) {
SetScriptResult(4000);
}
case(EV_REQUEST_TIMER) {
SetScriptResult(40);
}
}
@MainLoop {
playerY = GetPlayerY();
playerX = GetPlayerX();
//The player position is ALWAYS UPDATED
bossX = ObjMove_GetX(bossObj);
bossY = ObjMove_GetY(bossObj);
ObjEnemy_SetIntersectionCircleToShot(bossObj, ObjMove_GetX(bossObj), ObjMove_GetY(bossObj), 180);
yield;
}
@Finalize {
}
/*
Remi Spell 1
Remi moves to your current position (takes 36 frames), fires a dense star of stars (lol) that fades away quickly, and waits a set number of frames before repeating. After 3 waves of this, she moves to the middle and shoots a thick spiral of fireballs that requires you to spin around the screen for a bit.
She also leaves behind trails of rings with every dash.
Remilia takes 36 frames to move to you each time. -> delay between rings: 9, 6, 5
Parameters:
- Remilia wait time
- Spiral density
- Spiral speed
- Spiral angle offset per frame
- Ring density
- Ring speed
- Delays between rings
*/
task mainTask {
int multiplier = 1;
ObjMove_SetDestAtFrame(bossObj, STG_WIDTH/2, STG_HEIGHT/2
, 45, LERP_DECELERATE);
wait(45);
_UseCard();
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE) > 0){
loop(3){
_VampireChase();
}
FitfulNightmare(multiplier);
wait(90);
multiplier *= -1;
}
}
function <void> _UseCard(){
// Remi spell
int cardImg = _Create2DImage(tex, [0, 256, 256, 512]);
ObjRender_SetPosition(cardImg, bossX, bossY, 0);
ascent(i in 0..30){
ObjRender_SetY(cardImg, Interpolate_Decelerate(bossY, bossY - 256, i/30));
ObjRender_SetAlpha(cardImg, Interpolate_Decelerate(0, 255, i/30));
yield;
}
wait(30);
ascent(i in 0..15){
ObjRender_SetAlpha(cardImg, Interpolate_Decelerate(255, 0, i/15));
yield;
}
Obj_Delete(cardImg);
}
function <void> _VampireChase(){
float chaseX = playerX;
float chaseY = playerY;
ChargeSFX;
ObjMove_SetDestAtFrame(bossObj, Interpolate_Decelerate(bossX, chaseX, -0.08), Interpolate_Decelerate(bossY, chaseY, -0.08), 30, LERP_DECELERATE);
wait(25);
ObjMove_SetDestAtFrame(bossObj, Interpolate_Decelerate(bossX, chaseX, 1), Interpolate_Decelerate(bossY, chaseY, 1), 36, LERP_DECELERATE);
float ang = GetAngleToPlayer(bossObj);
loop(36/delayRing){
ascent(i in 0..denseRing[difficultySelect]){
int shot = CreateShotA2(bossX, bossY, maxspeedRing[difficultySelect], ang + 360/denseRing[difficultySelect] * i, -maxspeedRing[difficultySelect]/deceltimeRing[difficultySelect], 0, 0, KEV_AURABALL_RED, 10);
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) <= 0){Obj_Delete(shot);}
else{
_Delay(shot, 10);
ObjMove_AddPatternA2(shot, 30, NO_CHANGE, NO_CHANGE, maxspeedRing[difficultySelect]/acceltimeRing[difficultySelect], maxspeedRing[difficultySelect], 0);
_BulletRescale(shot, 0.6, true, 1);
Shoot2;
}
}
ang += 18;
wait(delayRing);
}
//wait(36);
// BOOM
_FireExplosion(bossObj);
wait(waittimeRemi[difficultySelect]);
}
function <void> FitfulNightmare(int spin){
ObjMove_SetDestAtFrame(bossObj, STG_WIDTH/2, STG_HEIGHT/3, 60, LERP_DECELERATE);
ChargeSFX;
wait(75);
float ang = 0;
loop(40){
float ang2 = ang;
loop(denseSpiral[difficultySelect]){
int shot = CreateShotA1(bossX, bossY, speedSpiral[difficultySelect], ang2, KEV_KNIFE_RED, 10);
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) <= 0){Obj_Delete(shot);}
else{
_Delay(shot, 10);
_BulletRescale(shot, 1.25, true, 1);
Shoot1;
}
ang2 += 360/denseSpiral[difficultySelect]*spin;
}
ang += angleoffsetSpiral[difficultySelect];
wait(3);
}
}
task _FireExplosion(int target){
int objPattern = ObjPatternShot_Create();
ObjPatternShot_SetParentObject(objPattern, target);
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) == 0){Obj_Delete(objPattern); return;}
ObjPatternShot_SetPatternType(objPattern, PATTERN_SCATTER_ANGLE);
ObjPatternShot_SetShotType(objPattern, OBJ_SHOT);
ObjPatternShot_SetInitialBlendMode(objPattern, BLEND_ADD_ARGB);
ObjPatternShot_SetShotCount(objPattern, 24, 6);
ObjPatternShot_SetSpeed(objPattern, 18, 2);
ObjPatternShot_SetAngle(objPattern, 360, 360);
ObjPatternShot_SetDelay(objPattern, 5);
ObjPatternShot_SetGraphic(objPattern, KEV_LEAF_RED);
Shoot2;
int[] arrayPattern = ObjPatternShot_FireReturn(objPattern);
int i = 0;
for each (int bullet in ref arrayPattern){
_BulletRescale(bullet, 1.2, true, 1);
_Delay(bullet, 15);
Obj_SetRenderPriorityI(bullet, 50);
_DeletionHandling(bullet, waittimeRemi[difficultySelect]+i);
//ObjMove_SetAcceleration(bullet, -0.25);
//ObjMove_SetMaxSpeed(bullet, 5);
}
}
task _DeletionHandling(int target, int frameDel){
float spd = ObjMove_GetSpeed(target);
ObjMove_SetAcceleration(target, -spd/[30, 34, 38][difficultySelect]);
ObjMove_SetMaxSpeed(target, 0.2);
wait(frameDel);
ObjShot_FadeDelete(target);
}
task endingnew(){
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE)>0){
yield;
}
_GoToBrazil(objScene, bossObj, 12, 24);
wait(120);
ObjSound_SetVolumeRate(fire2, 20);
CloseScript(GetOwnScriptID);
}

View File

@ -1,87 +0,0 @@
let bossBG = "script/game/resourceLib/BGFight.png";
let sound = ObjSound_Create();
let alphaMax = 255*((GetAreaCommonData("Config", "BGOpacity", 100))/100);
let blipVol = GetAreaCommonData("Config", "SEVol", 100) * 0.01;
ObjSound_Load(sound, "script/game/resourceLib/dialogueblip.wav");
ObjSound_SetVolumeRate(sound, 100 * blipVol);
ObjSound_SetSoundDivision(sound, SOUND_SE);
//LoadSound("script/game/StageLib/dialogueblip.wav");
LoadTextureEx(bossBG, true, true);
function <void> _ScrollBackground(){
int BossImg = _Create2DImage(bossBG, [0, 0, 910, 1200]);
ObjRender_SetPosition(BossImg, STG_WIDTH/2, STG_HEIGHT/2-150, 0);
Obj_SetRenderPriorityI(BossImg, 24);
ascent(i in 0..30){
ObjRender_SetAlpha(BossImg, Interpolate_Decelerate(0, alphaMax, i/30));
yield;
}
Dialogue();
//ObjRender_SetAlpha(BossImg, 255*((GetAreaCommonData("Config", "BGOpacity", 100))/100));
}
function <void> Dialogue(){
int objText = CreateTextObject(
STG_WIDTH/2, 2*STG_HEIGHT/5+125, 45,
" ", "Origami Mommy",
0x9F9FFF, 0xDCD6FF,
0x000000, 3,
71
);
ObjText_SetHorizontalAlignment(objText, ALIGNMENT_CENTER);
TTextScroll(objText, "AN AWESOME VAMPIRE/IS CONFLICT WITH US//KEEP YOUR SEXINESS");
Obj_Delete(objText);
}
// by Mugenri!
function <void> TTextScroll(int obj_, string text_) { //Makes text fill gradually in text boxes
bool dialogEnd = false;
bool sentenceEnd = false;
string[] tempStrings = SplitString(text_, "/"); //use / for newlines instead of [r]
string tempString = "";
char lastChar;
int waitTime;
async{
while(!dialogEnd){
if(sentenceEnd){wait(4); continue;}
else{ObjSound_Play(sound); wait(4);}
}
}
if (GetVirtualKeyState(VK_OK) == KEY_PUSH) { //Prevents skipping the yield
SetVirtualKeyState(VK_OK, KEY_FREE);
}
ascent (i in 0..length(tempStrings)) { //list of substrings
ascent (j in 0..length(tempStrings[i])) { //for each character in a substring
tempString ~= [tempStrings[i][j]];
lastChar = tempString[-1];
ObjText_SetText(obj_, tempString);
if([tempStrings[i][j]] == "." ||
[tempStrings[i][j]] == "," ||
[tempStrings[i][j]] == "!" ) {sentenceEnd = true; wait(10);}
else {wait(2); sentenceEnd = false;}
}
tempString ~= ['[','r',']']; //append a newline after each substring
}
dialogEnd = true;
wait(90);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
license.txt Normal file

Binary file not shown.

52
readme.txt Normal file
View File

@ -0,0 +1,52 @@
● Before We Get Started
This software is a freeware.
The creators are not liable for any mental, physical, or emotional damages caused by using the application.
● Installation
  1. Use a software that is able to extract .zip files.
If you're seeing this you've probably already done this step. Good job.
2. Select the path to which to extract the files.
3. Yeah.
4. Suffer or enjoy, I don't know.
● Notes
■ Running on Wine
If the engine shows an error regarding shader compilation on startup, it's likely because of Wine failing to load required dlls.
Steps:
1a) Install winetricks if you haven't yet.
2a) Run 'winetricks d3dx9 d3dcompiler_43' at the console.
1b) If you've performed the above steps, and the engine still does not work, continue below.
2b) Run winetricks -> "Select the default wineprefix" -> "Run winecfg"
3b) Select either "Default Settings", or "Add application..." and select the ph3sx binary.
- For "Windows Version", select at least Windows 7.
4b) Go to the "Libraries" tab, and add overrides for the following dlls:
- d3dx9_43
- d3dcompiler_43
5b) Apply the settings, and everything should now work.
● Uninstallation
  Simple delete all the related files.
This application does not utilize registry keys nor AppData storage.
● Key Controls (default)
Arrow Keys: Move
Z: Shoot, Select
X: Bomb, Cancel
Left Shift: Hold for Focused Movement
Left Ctrl: Hold for Fast Mode
R: Return to Script Select Screen (Unavailable by default in package scripts)
Backspace: Restart Script (Unavailable by default in package scripts)
** Default key controls are purely engine-default, and may be overridden and changed from script to script.
Check out the sample scripts for demonstrations of new functions and features.
REPORT BUGS AND/OR GIVE FEATURE REQUESTS TO:
● https://github.com/Natashi/Touhou-Danmakufu-ph3sx-2/issues on GitHub
● https://discord.gg/f9KFujKGEx on the ph3sx development Discord server

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 KiB

View File

@ -0,0 +1,33 @@
//書き換えないでください。
@Initialize
{
TEnemy();
}
@MainLoop
{
yield;
}
@Finalize
{
}
task TEnemy
{
let path = GetMainStgScriptPath();
let idScript = LoadScript(path);
StartScript(idScript);
while(!IsCloseScript(idScript) && GetPlayerState() != STATE_END)
{
yield;
}
loop(300){yield;}
CloseStgScene();
}

View File

@ -0,0 +1,35 @@
//書き換えないでください。
@Initialize
{
TEnemy();
}
@MainLoop
{
yield;
}
@Finalize
{
}
task TEnemy
{
let path = GetMainStgScriptPath();
let obj = ObjEnemyBossScene_Create();
ObjEnemyBossScene_Add(obj, 0, path);
ObjEnemyBossScene_LoadInThread(obj);
ObjEnemyBossScene_Regist(obj);
while(!Obj_IsDeleted(obj) && GetPlayerState() != STATE_END)
{
yield;
}
loop(300){yield;}
CloseStgScene();
}

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 444 KiB

After

Width:  |  Height:  |  Size: 444 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 520 KiB

After

Width:  |  Height:  |  Size: 520 KiB

View File

Before

Width:  |  Height:  |  Size: 444 KiB

After

Width:  |  Height:  |  Size: 444 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 324 KiB

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 KiB

View File

Before

Width:  |  Height:  |  Size: 605 KiB

After

Width:  |  Height:  |  Size: 605 KiB

View File

@ -622,18 +622,18 @@ task TBossLife
ascent(iDiv in 1 .. length(listLifeDiv)-1) ascent(iDiv in 1 .. length(listLifeDiv)-1)
{ {
let rate = listLifeDiv[iDiv]; let rate = listLifeDiv[iDiv];
let x = (GetStgFrameWidth()) * 0.98 * (1-rate); let x = (GetStgFrameWidth()) * (1-rate);
ObjSpriteList2D_SetDestRect(objDivision, x-4, 62, x+24, 118); ObjSpriteList2D_SetDestRect(objDivision, x-3, 65, x+24, 115);
ObjSpriteList2D_AddVertex(objDivision); ObjSpriteList2D_AddVertex(objDivision);
} }
//Boss star rendering //Boss star rendering
ObjRender_SetScaleXYZ(objStar, 0.6, 0.6, 1); ObjRender_SetScaleXYZ(objStar, 0.5, 0.5, 1);
ObjSpriteList2D_SetSourceRect(objStar, 0, 169, 268, 430); ObjSpriteList2D_SetSourceRect(objStar, 0, 169, 268, 430);
Obj_SetRenderPriority(objStar, 1); Obj_SetRenderPriority(objStar, 1);
ascent(iStep in 0 .. countRemStep) ascent(iStep in 0 .. countRemStep)
{ {
ObjRender_SetPosition(objStar, GetStgFrameWidth()*1.6, 35+45*iStep, 1); ObjRender_SetPosition(objStar, GetStgFrameWidth()*1.36-iStep*32, 30, 1);
ObjSpriteList2D_SetDestCenter(objStar); ObjSpriteList2D_SetDestCenter(objStar);
ObjSpriteList2D_AddVertex(objStar); ObjSpriteList2D_AddVertex(objStar);
} }

Some files were not shown because too many files have changed in this diff Show More